From 0b39cf3100870d54e13039a4e5d8635f121df4ab Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Fri, 12 Jan 2007 07:45:01 +0000 Subject: few minor fixes including a XML-RPC fix --- admin/flag.php | 17 ++++++++++++++++- admin/index.php | 20 ++++++-------------- docs/CHANGELOG | 7 +++++++ lib/class/catalog.class.php | 6 ++---- lib/class/flag.class.php | 2 +- lib/init.php | 2 +- templates/header.inc | 3 --- templates/show_admin_info.inc.php | 1 - templates/show_admin_tools.inc.php | 12 +++++++++--- templates/show_disabled_songs.inc | 7 +++++-- 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'); -?> - - - - - - - - -
- - +show_template('header'); ?> +
-
+ +
+ +
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')) { ?>
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(); ?> - +
@@ -50,6 +50,14 @@ $catalogs = $catalog->get_catalogs(); + @@ -74,10 +82,8 @@ $catalogs = $catalog->get_catalogs();
-
-
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 @@ -
+ +    + + + - 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'); ?> +
+ @@ -30,33 +32,38 @@ $web_path = conf('web_path'); + - - + - count($flagged)) { ?> - -
+ + print_name(); ?> print_flag(); ?> print_status(); ?> + approved) { ?> - + - +
- - ... - + +
+
+ -- cgit