diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-10 01:19:14 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-10 01:19:14 +0000 |
commit | c1ed41a16dcbf1a632ad2ac99b40174628bf072e (patch) | |
tree | ed6c5ff2478d699fd94aae2a8348d5ff429410b7 | |
parent | 617a4b5dfc3a66addca3d28e6c1841a89c1a3f8e (diff) | |
download | ampache-c1ed41a16dcbf1a632ad2ac99b40174628bf072e.tar.gz ampache-c1ed41a16dcbf1a632ad2ac99b40174628bf072e.tar.bz2 ampache-c1ed41a16dcbf1a632ad2ac99b40174628bf072e.zip |
Remove some unused genre stuff.
-rw-r--r-- | batch.php | 6 | ||||
-rw-r--r-- | genre.php | 76 | ||||
-rw-r--r-- | lib/general.lib.php | 7 | ||||
-rw-r--r-- | lib/ui.lib.php | 4 | ||||
-rw-r--r-- | templates/show_genre.inc.php | 41 | ||||
-rw-r--r-- | templates/show_genres.inc.php | 79 |
6 files changed, 0 insertions, 213 deletions
@@ -52,12 +52,6 @@ switch ($_REQUEST['action']) { $media_ids = $artist->get_songs(); $name = $artist->name; break; - case 'genre': - $id = scrub_in($_REQUEST['id']); - $genre = new Genre($id); - $media_ids = $genre->get_songs(); - $name = $genre->name; - break; case 'browse': $media_ids = Browse::get_saved(); $name = 'Batch-' . date("dmY",time()); diff --git a/genre.php b/genre.php deleted file mode 100644 index d8a37620..00000000 --- a/genre.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ -/* - - Copyright (c) Ampache.org - All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -/** - * Genres Pages - * Nuff Said for now - */ -require_once 'lib/init.php'; - -show_header(); - -/** - * switch on action - */ -switch($_REQUEST['action']) { - case 'show_songs': - $genre = new Genre($_REQUEST['genre_id']); - show_genre($_REQUEST['genre_id']); - $object_ids = $genre->get_songs(); - Browse::reset_filters(); - Browse::set_type('song'); - Browse::set_sort('name','ASC'); - Browse::set_static_content(1); - Browse::save_objects($object_ids); - Browse::show_objects($object_ids); - break; - case 'show_genre': - default: - case 'show_albums': - $genre = new Genre($_REQUEST['genre_id']); - show_genre($_REQUEST['genre_id']); - $object_ids = $genre->get_albums(); - Browse::reset_filters(); - Browse::set_type('album'); - Browse::set_sort('name','ASC'); - Browse::set_static_content(1); - Browse::save_objects($object_ids); - Browse::show_objects($object_ids); - break; - case 'show_artists': - $genre = new Genre($_REQUEST['genre_id']); - show_genre($_REQUEST['genre_id']); - $object_ids = $genre->get_artists(); - Browse::reset_filters(); - Browse::set_type('artist'); - Browse::set_sort('name','ASC'); - Browse::set_static_content(1); - Browse::save_objects($object_ids); - Browse::show_objects($object_ids); - break; -} // action - - - -/* Show the Footer */ -show_footer(); - -?> diff --git a/lib/general.lib.php b/lib/general.lib.php index 19b7d779..692dbad5 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -168,13 +168,6 @@ function get_global_popular($type) { $items[] = $album; } // else not album - elseif ($type == 'genre') { - $genre = new Genre($r['object_id']); - $genre->format(); - $genre->link = "<a href=\"$web_path/browse.php?action=genre&genre=" . $r['object_id'] . "\" title=\"" . scrub_out($genre->name) . "\">" . - scrub_out(truncate_with_ellipsis($genre->name,Config::get('ellipse_threshold_title')+3)) . " (" . $r['count'] . ")</a>"; - $items[] = $genre; - } // end if genre } // end foreach return $items; diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 4e761997..fd13da90 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -279,10 +279,6 @@ function get_location() { $location['title'] = _('Artists'); $location['section'] = 'browse'; break; - case 'genre.php': - $location['title'] = _('Genre'); - $location['section'] = 'browse'; - break; case 'stats.php': $location['title'] = _('Statistics'); break; diff --git a/templates/show_genre.inc.php b/templates/show_genre.inc.php deleted file mode 100644 index bf637244..00000000 --- a/templates/show_genre.inc.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ -/* - - Copyright (c) 2001 - 2007 Ampache.org - All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -/** - * Show Genre - * This shows a single genre and lets you pick between - * albums/artists or songs -*/ -$web_path = Config::get('web_path'); -?> -<?php /* HINT: Genre Name */ ?> -<?php show_box_top(sprintf(_('Viewing %s Genre'), $genre->name)); ?> - [<?php echo $genre->get_album_count(); ?>] - <a href="<?php echo $web_path; ?>/genre.php?action=show_albums&genre_id=<?php echo $genre->id; ?>"> - <?php echo _('Albums'); ?></a><br /> - [<?php echo $genre->get_artist_count(); ?>] - <a href="<?php echo $web_path; ?>/genre.php?action=show_artists&genre_id=<?php echo $genre->id; ?>"> - <?php echo _('Artists'); ?></a><br /> - [<?php echo $genre->get_song_count(); ?>] - <a href="<?php echo $web_path; ?>/genre.php?action=show_songs&genre_id=<?php echo $genre->id; ?>"> - <?php echo _('Songs'); ?></a><br /> -<?php show_box_bottom(); ?> diff --git a/templates/show_genres.inc.php b/templates/show_genres.inc.php deleted file mode 100644 index 9195098f..00000000 --- a/templates/show_genres.inc.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ -/* - - Copyright (c) 2001 - 2007 Ampache.org - All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -/** - * Show Genres - * Takes an array of genre objects and displays them out - */ -?> -<?php require Config::get('prefix') . '/templates/list_header.inc.php' ?> -<table class="tabledata" cellpadding="0" cellspacing="0"> -<colgroup> - <col id="col_add" /> - <col id="col_genre" /> - <col id="col_songs" /> - <col id="col_action" /> -</colgroup> -<tr class="th-top"> - <th class="cel_add"><?php echo _('Add'); ?></th> - <th class="cel_genre"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name',_('Genre'),'sort_genre_name'); ?></th> - <th class="cel_songs"><?php echo _('Songs'); ?></th> - <th class="cel_action"><?php echo _('Action'); ?></th> -</tr> -<?php -foreach ($object_ids as $genre_id) { - $genre = new Genre($genre_id); - $genre->format(); -?> - <tr class="<?php echo flip_class(); ?>"> - <td class="cel_add"> - <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=genre&id=<?php echo $genre->id; ?>');return true;" > - <?php echo get_user_icon('add', _('Add')); ?> - </span> - <span onclick="ajaxPut('<?php echo Config::get('ajax_url'); ?>?action=basket&type=genre_random&id=<?php echo $genre->id; ?>');return true;" > - <?php echo get_user_icon('random', _('Random')); ?> - </span> - </td> - <td class="cel_genre"><?php echo $genre->f_link; ?></td> - <td class="cel_songs"><?php echo $genre->get_song_count(); ?></td> - <td class="cel_action"> - <?php if (Access::check_function('batch_download')) { ?> - <a href="<?php echo $genre->download_link; ?>"> - <?php echo get_user_icon('batch_download', _('Batch Download')); ?> - </a> - <?php } ?> - </td> - </tr> -<?php } // end foreach genres ?> -<?php if (!count($object_ids)) { ?> -<tr class="<?php echo flip_class(); ?>"> - <td colspan="4"><span class="fatalerror"><?php echo _('Not Enough Data'); ?></span></td> -</tr> -<?php } ?> -<tr class="th-bottom"> - <th class="cel_add"><?php echo _('Add'); ?></th> - <th class="cel_genre"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name',_('Genre'),'sort_genre_name_bottom'); ?></th> - <th class="cel_songs"><?php echo _('Songs'); ?></th> - <th class="cel_action"><?php echo _('Action'); ?></th> -</tr> -</table> -<?php require Config::get('prefix') . '/templates/list_header.inc.php' ?> |