diff options
-rw-r--r-- | admin/flag.php | 17 | ||||
-rw-r--r-- | admin/index.php | 20 | ||||
-rwxr-xr-x | docs/CHANGELOG | 7 | ||||
-rw-r--r-- | lib/class/catalog.class.php | 6 | ||||
-rw-r--r-- | lib/class/flag.class.php | 2 | ||||
-rw-r--r-- | lib/init.php | 2 | ||||
-rw-r--r-- | templates/header.inc | 3 | ||||
-rw-r--r-- | templates/show_admin_info.inc.php | 1 | ||||
-rw-r--r-- | templates/show_admin_tools.inc.php | 12 | ||||
-rw-r--r-- | templates/show_disabled_songs.inc | 7 | ||||
-rw-r--r-- | templates/show_flagged.inc.php | 27 |
11 files changed, 64 insertions, 40 deletions
diff --git a/admin/flag.php b/admin/flag.php index e6a2d431..a12a55e5 100644 --- a/admin/flag.php +++ b/admin/flag.php @@ -221,7 +221,7 @@ switch ($action) { case 'album': $new_song->album = $catalog->check_album(revert_string($_REQUEST['update_value'])); break; - case 'aritst': + case 'artist': $new_song->artist = $catalog->check_artist(revert_string($_REQUEST['update_value'])); break; case 'year': @@ -255,6 +255,21 @@ switch ($action) { $body = _('Flag Removed from') . " " . $flag->name; show_confirmation($title,$body,$url); break; + case 'reject_flags': + $flags = $_REQUEST['song']; + + foreach ($flags as $flag_id) { + $flag = new Flag($flag_id); + if ($flag->approved) { + $flag->delete_flag(); + } + else { + $flag->approve(); + } + } // end foreach flags + $title = _('Flags Updated'); + show_confirmation($title,'',return_referer()); + break; case 'show_edit_song': $_SESSION['source'] = return_referer(); $song = new Song($_REQUEST['song']); diff --git a/admin/index.php b/admin/index.php index 6217ef0f..96f2616f 100644 --- a/admin/index.php +++ b/admin/index.php @@ -30,19 +30,11 @@ if (!$GLOBALS['user']->has_access(100)) { } -show_template('header'); -?> -<!-- Big Daddy Table --> -<table> -<tr> - <!-- Needs Attention Cell --> - <td valign="top"> - <?php require (conf('prefix') . '/templates/show_admin_info.inc.php'); ?> - </td> - <!-- Catalog Cell --> - <td valign="top"> +show_template('header'); ?> +<div id="admin-tools"> <?php require (conf('prefix') . '/templates/show_admin_tools.inc.php'); ?> - </td> -</tr> -</table> +</div> +<div id="admin-info"> + <?php require (conf('prefix') . '/templates/show_admin_info.inc.php'); ?> +</div> <?php show_footer(); ?> diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 9a14f2c0..ecd61c1a 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,13 @@ -------------------------------------------------------------------------- v.3.3.3 + - Added select boxes to Admin Flag pages to allow rejection or + approval of all songs at once + - Fixed an XMLRPC catalog issues created when I moved comments + - Fixed an issue with localplay controls showing up even if it + was disabled + - Fixed Album of Moment's title tag and prevented it from showing + albums without art (Thx Spocky) - Fixed a play issue on democratic play created when I added the menu - Fixed batch page to correctly show access denied rather then diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index db60e18c..9131aac5 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -1148,7 +1148,6 @@ class Catalog { $new_song->artist = $this->check_artist($data[0]); $new_song->album = $this->check_album($data[1],$data[4]); $new_song->title = $data[2]; - $new_song->comment = $data[3]; $new_song->year = $data[4]; $new_song->bitrate = $data[5]; $new_song->rate = $data[6]; @@ -1932,11 +1931,10 @@ class Catalog { $url = sql_escape($song->file); $title = $this->check_title($song->title); $title = sql_escape($title); - $comment = sql_escape($song->comment); $current_time = time(); - $sql = "INSERT INTO song (file,catalog,album,artist,title,bitrate,rate,mode,size,time,track,genre,addition_time,year,comment)" . - " VALUES ('$url','$song->catalog','$song->album','$song->artist','$title','$song->bitrate','$song->rate','$song->mode','$song->size','$song->time','$song->track','$song->genre','$current_time','$song->year','$comment')"; + $sql = "INSERT INTO song (file,catalog,album,artist,title,bitrate,rate,mode,size,time,track,genre,addition_time,year)" . + " VALUES ('$url','$song->catalog','$song->album','$song->artist','$title','$song->bitrate','$song->rate','$song->mode','$song->size','$song->time','$song->track','$song->genre','$current_time','$song->year')"; $db_results = mysql_query($sql, dbh()); if (!$db_results) { diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php index 05d51583..0e86f643 100644 --- a/lib/class/flag.class.php +++ b/lib/class/flag.class.php @@ -226,7 +226,7 @@ class Flag { switch ($this->object_type) { case 'song': $song = new Song($this->object_id); - $song->format_song(); + $song->format(); $name = $song->f_title . " - " . $song->f_artist; $title = $song->title . " - " . $song->get_artist_name(); break; diff --git a/lib/init.php b/lib/init.php index 02b54184..b0f55d7c 100644 --- a/lib/init.php +++ b/lib/init.php @@ -67,7 +67,7 @@ if (!$results = read_config($configfile,0)) { } /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.3 Build (002)'; +$results['version'] = '3.3.3 Build (003)'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; diff --git a/templates/header.inc b/templates/header.inc index 2168a293..d1ada535 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -65,9 +65,6 @@ if (conf('use_rss')) { ?> </div><!-- End topbar --> <div id="sidebar"><!-- This is the sidebar --> <?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?> - <?php if ($localplay = init_localplay()) { ?> - <?php require_once(conf('prefix') . '/templates/show_localplay_control.inc.php'); ?> - <?php } ?> </div><!-- End sidebar --> <div id="content"> <!-- I hate IE... --> diff --git a/templates/show_admin_info.inc.php b/templates/show_admin_info.inc.php index 8816937c..c8ecb222 100644 --- a/templates/show_admin_info.inc.php +++ b/templates/show_admin_info.inc.php @@ -23,7 +23,6 @@ $web_path = conf('web_path'); /* Flagged Information Gathering */ $flag = new Flag(); $flagged = $flag->get_recent(10); -$total_flagged = $flag->get_total(); /* Disabled Information Gathering */ $catalog = new Catalog(); diff --git a/templates/show_admin_tools.inc.php b/templates/show_admin_tools.inc.php index b604ae32..b68c8631 100644 --- a/templates/show_admin_tools.inc.php +++ b/templates/show_admin_tools.inc.php @@ -25,7 +25,7 @@ $catalogs = $catalog->get_catalogs(); ?> <?php show_box_top(_('Catalogs')); ?> -<table border="0" cellpadding="0" cellspacing="0"> +<table class="tabledata" cellpadding="0" cellspacing="0"> <tr class="table-header"> <th><?php echo _('Name'); ?></th> <th align="center"><?php echo _('Action'); ?></th> @@ -50,6 +50,14 @@ $catalogs = $catalog->get_catalogs(); <?php echo _('Delete'); ?></a> </td> </tr> +<!-- +<tr class="<?php echo flip_class(); ?>"> + <td colspan="2"> + <?php echo _('Fast'); ?><input type="checkbox" name="fast" value="1" /> + <?php echo _('Gather Art'); ?><input type="checkbox" name="gather_art" value="1" /> + </td> +</tr> +--> <?php } // end foreach ?> <?php if (!count($catalogs)) { ?> <tr> @@ -74,10 +82,8 @@ $catalogs = $catalog->get_catalogs(); <div class="text-action"> <a href="<?php echo $web_path; ?>/admin/duplicates.php"><?php echo _('Show Duplicate Songs'); ?></a> <a href="<?php echo $web_path; ?>/admin/catalog.php?action=clear_now_playing"><?php echo _('Clear Now Playing'); ?></a> - <hr noshade="noshade" size="3" /> <a href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a> <a href="<?php echo $web_path; ?>/admin/preferences.php?action=show_set_preferences"><?php echo _('Preferences Permissions'); ?></a> - <hr noshade="noshade" size="3" /> <a href="<?php echo $web_path; ?>/admin/system.php?action=export&export=itunes"><?php echo _('Export To Itunes DB'); ?></a> <!-- <a href="<?php echo $web_path; ?>/admin/system.php?action=check_version"><?php echo _('Check for New Version'); ?></a>--> </div> diff --git a/templates/show_disabled_songs.inc b/templates/show_disabled_songs.inc index 61a47b3d..0c592777 100644 --- a/templates/show_disabled_songs.inc +++ b/templates/show_disabled_songs.inc @@ -44,8 +44,11 @@ <td colspan="7"><span class="error"><?php echo _('No Records Found'); ?></span></td> </tr> <?php } ?> -</table> +<tr class="<?php echo flip_class(); ?>"> + <td colspan="7"> <input class="button" type="submit" value="<?php echo _('Remove'); ?>" /> <input type="hidden" name="action" value="remove_disabled" /> + </td> +</tr> +</table> </form> - diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php index 4d65d8ac..06873ecb 100644 --- a/templates/show_flagged.inc.php +++ b/templates/show_flagged.inc.php @@ -21,8 +21,10 @@ $web_path = conf('web_path'); ?> +<form id="songs" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/admin/flag.php?action=reject_flags"> <table class="tabledata" cellspacing="0" cellpadding="0"> <tr class="table-header"> + <th><a href="#" onclick="check_songs(); return false;"><?php echo _('Select'); ?></a></th> <th><?php echo _('Object'); ?></th> <th><?php echo _('Flag'); ?></th> <th><?php echo _('Status'); ?></th> @@ -30,33 +32,38 @@ $web_path = conf('web_path'); </tr> <?php foreach ($flagged as $data) { $flag = new Flag($data); ?> <tr class="<?php echo flip_class(); ?>"> + <td align="center"> + <input type="checkbox" name="song[]" value="<?php echo $flag->id; ?>" id="song_<?php echo $flag->id; ?>" /> + </td> <td><?php $flag->print_name(); ?></td> <td><?php $flag->print_flag(); ?></td> <td><?php $flag->print_status(); ?></td> - <td> + <td align="center"> <?php if ($flag->approved) { ?> <a href="<?php echo $web_path; ?>/admin/flag.php?action=reject_flag&flag_id=<?php echo $flag->id; ?>"> - <?php echo _('Reject'); ?> + <?php echo get_user_icon('disable'); ?> </a> <?php } else { ?> <a href="<?php echo $web_path; ?>/admin/flag.php?action=approve_flag&flag_id=<?php echo $flag->id; ?>"> - <?php echo _('Approve'); ?> + <?php echo get_user_icon('enable'); ?> </a> <?php } ?> </td> </tr> <?php } if (!count($flagged)) { ?> <tr class="<?php echo flip_class(); ?>"> - <td colspan="4" class="error"><?php echo _('No Records Found'); ?></td> + <td colspan="5" class="error"><?php echo _('No Records Found'); ?></td> </tr> <?php } ?> -<?php if ($total_flagged > count($flagged)) { ?> <tr class="<?php echo flip_class(); ?>"> - <td colspan="4"> - <a href="<?php echo $web_path; ?>/admin/flag.php?action=show_flagged"> - <?php echo _('Show All'); ?>... - </a> + <td colspan="5"> + <input class="button" type="submit" value="<?php echo _('Update'); ?>" /> </td> </tr> -<?php } ?> </table> +</form> +<div class="text-action"> +<a href="<?php echo $web_path; ?>/admin/flag.php?action=show_flagged"> + <?php echo _('Show All'); ?>... +</a> +</div> |