summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-07-26 07:43:18 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-07-26 07:43:18 +0000
commit392354df0a4f2c21aabad2f1b527448251a60f99 (patch)
treeab34820cef4990e4139326ccd2e507c5731d216c /lib/class/song.class.php
parent975af37b254ebc74533f1562005dccf75ef0f021 (diff)
downloadampache-392354df0a4f2c21aabad2f1b527448251a60f99.tar.gz
ampache-392354df0a4f2c21aabad2f1b527448251a60f99.tar.bz2
ampache-392354df0a4f2c21aabad2f1b527448251a60f99.zip
switched to sha() password encryption not using sha2 because of limitations of amarok, also added some caching and fixed some misc bugs
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 806a81f9..b73ab1e8 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -86,7 +86,7 @@ class Song extends database_object {
"addition_time FROM `song` " .
"LEFT JOIN `tag_map` ON `tag_map`.`object_id`=`song`.`id` AND `tag_map`.`object_type`='song' " .
"WHERE `song`.`id` IN $idlist";
- $db_results = Dba::query($sql);
+ $db_results = Dba::read($sql);
while ($row = Dba::fetch_assoc($db_results)) {
parent::add_to_cache('song',$row['id'],$row);
@@ -100,9 +100,14 @@ class Song extends database_object {
Tag::build_cache($tags);
Tag::build_map_cache('song',$song_ids);
+ // If we're rating this then cache them as well
+ if (Config::get('ratings')) {
+ Rating::build_cache('song',$song_ids);
+ }
+
// Build a cache for the song's extended table
$sql = "SELECT * FROM `song_data` WHERE `song_id` IN $idlist";
- $db_results = Dba::query($sql);
+ $db_results = Dba::read($sql);
while ($row = Dba::fetch_assoc($db_results)) {
parent::add_to_cache('song_data',$row['song_id'],$row);