diff options
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/browse.class.php | 9 | ||||
-rw-r--r-- | lib/class/flag.class.php | 34 | ||||
-rw-r--r-- | lib/class/shoutbox.class.php | 4 |
3 files changed, 28 insertions, 19 deletions
diff --git a/lib/class/browse.class.php b/lib/class/browse.class.php index caaf79b5..2e65a783 100644 --- a/lib/class/browse.class.php +++ b/lib/class/browse.class.php @@ -139,6 +139,7 @@ class Browse { case 'playlist': case 'playlist_song': case 'song': + case 'flagged': case 'catalog': case 'album': case 'artist': @@ -346,6 +347,9 @@ class Browse { case 'playlist': $sql = "SELECT `playlist`.`id` FROM `playlist` "; break; + case 'flagged': + $sql = "SELECT `flagged`.`id` FROM `flagged` "; + break; case 'playlist_song': case 'song': default: @@ -662,6 +666,11 @@ class Browse { require_once Config::get('prefix') . '/templates/show_catalogs.inc.php'; show_box_bottom(); break; + case 'flagged': + show_box_top(_('Flagged Records'),$class); + require_once Config::get('prefix') . '/templates/show_flagged.inc.php'; + show_box_bottom(); + break; default: // Rien a faire break; diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php index ed833c1b..56256a39 100644 --- a/lib/class/flag.class.php +++ b/lib/class/flag.class.php @@ -27,24 +27,24 @@ class Flag { /* DB based variables */ - var $id; - var $user; - var $object_id; - var $object_type; - var $comment; - var $flag; - var $date; - var $approved=0; + public $id; + public $user; + public $object_id; + public $object_type; + public $comment; + public $flag; + public $date; + public $approved=0; /* Generated Values */ - var $name; // Blank - var $title; // Blank + public $name; // Blank + public $title; // Blank /** * Constructor * This takes a flagged.id and then pulls in the information for said flag entry */ - function Flag($flag_id=0) { + public function __construct($flag_id=0) { $this->id = intval($flag_id); @@ -125,24 +125,24 @@ class Flag { * This returns an array of ids of flagged songs if no limit is passed * it gets everything */ - function get_flagged($count=0) { + public static function get_all($count=0) { if ($count) { $limit_clause = "LIMIT " . intval($count); } - $sql = "SELECT id FROM flagged ORDER BY id $limit_clause"; - $db_results = mysql_query($sql, dbh()); + $sql = "SELECT `id` FROM `flagged` $limit_clause"; + $db_results = Dba::query($sql); /* Default it to an array */ $results = array(); /* While the query */ - while ($r = mysql_fetch_assoc($db_results)) { - $results[] = $r['id']; + while ($row = Dba::fetch_assoc($db_results)) { + $results[] = $row['id']; } return $results; - } // get_flagged + } // get_all /** * get_approved diff --git a/lib/class/shoutbox.class.php b/lib/class/shoutbox.class.php index 3cea772b..98d14548 100644 --- a/lib/class/shoutbox.class.php +++ b/lib/class/shoutbox.class.php @@ -132,14 +132,14 @@ class shoutBox { switch ($this->object_type) { case 'album': - $image_string = "<img height=\"75\" width=\"75\" src=\"" . Config::get('web_path') . "/image.php?id=" . $this->object_id . "&thumb=1\" />"; + $image_string = "<img class=\"shoutboximage\" height=\"75\" width=\"75\" src=\"" . Config::get('web_path') . "/image.php?id=" . $this->object_id . "&thumb=1\" />"; break; case 'artist': break; case 'song': $song = new Song($this->object_id); - $image_string = "<img height=\"75\" width=\"75\" src=\"" . Config::get('web_path') . "/image.php?id=" . $song->album . "&thumb=1\" />"; + $image_string = "<img class=\"shoutboximage\" height=\"75\" width=\"75\" src=\"" . Config::get('web_path') . "/image.php?id=" . $song->album . "&thumb=1\" />"; break; default: // Rien a faire |