diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:05 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:05 +0000 |
commit | a31560aec4f004e58930277758f5412d86c62adc (patch) | |
tree | 845ff6947d26b22a0f4527901dbefc97bca89d78 /lib/class/flag.class.php | |
parent | 8b27d66add7ca9ba57d7e9488612cb54be4b11c1 (diff) | |
download | ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.gz ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.bz2 ampache-a31560aec4f004e58930277758f5412d86c62adc.zip |
it technically logs in and streams.. but thats it, complete rewrite almost everything broken
Diffstat (limited to 'lib/class/flag.class.php')
-rw-r--r-- | lib/class/flag.class.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/class/flag.class.php b/lib/class/flag.class.php index 20ed5d8b..d54879f5 100644 --- a/lib/class/flag.class.php +++ b/lib/class/flag.class.php @@ -70,14 +70,14 @@ class Flag { * _get_info * Private function for getting the information for this object from the database */ - function _get_info() { + private function _get_info() { - $id = sql_escape($this->id); + $id = Dba::escape($this->id); - $sql = "SELECT * FROM flagged WHERE id='$id'"; - $db_results = mysql_query($sql, dbh()); + $sql = "SELECT * FROM `flagged` WHERE `id`='$id'"; + $db_results = Dba::query($sql); - $results = mysql_fetch_assoc($db_results); + $results = Dba::fetch_assoc($db_results); return $results; @@ -88,16 +88,16 @@ class Flag { * This returns the id's of the most recently flagged songs, it takes an int * as an argument which is the count of the object you want to return */ - function get_recent($count=0) { + public static function get_recent($count=0) { if ($count) { $limit = " LIMIT " . intval($count); } $results = array(); $sql = "SELECT id FROM flagged ORDER BY date " . $limit; - $db_results = mysql_query($sql, dbh()); + $db_results = Dba::query($sql); - while ($r = mysql_fetch_assoc($db_results)) { + while ($r = Dba::fetch_assoc($db_results)) { $results[] = $r['id']; } |