summaryrefslogtreecommitdiffstats
path: root/lib/class/database_object.abstract.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-10-29 06:47:00 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-10-29 06:47:00 +0000
commite8559dd683eba762b2bd374c731e7f7e8116bf70 (patch)
treed14ca2253febee2ea214d3501b02ca4e59010d2f /lib/class/database_object.abstract.php
parentf593f18131d6a0cbf30b558b208e86b9fc957f13 (diff)
downloadampache-e8559dd683eba762b2bd374c731e7f7e8116bf70.tar.gz
ampache-e8559dd683eba762b2bd374c731e7f7e8116bf70.tar.bz2
ampache-e8559dd683eba762b2bd374c731e7f7e8116bf70.zip
fix http auth issues, fix missing line sfrom dipsols patch, few other minor things
Diffstat (limited to 'lib/class/database_object.abstract.php')
-rw-r--r--lib/class/database_object.abstract.php27
1 files changed, 5 insertions, 22 deletions
diff --git a/lib/class/database_object.abstract.php b/lib/class/database_object.abstract.php
index 5c6020c6..ed83d198 100644
--- a/lib/class/database_object.abstract.php
+++ b/lib/class/database_object.abstract.php
@@ -34,10 +34,6 @@ abstract class database_object {
/**
* get_info
* retrieves the info from the database and puts it in the cache
- *
- * @param string $id
- * @param string $table_name
- * @return array
*/
public function get_info($id,$table_name='') {
@@ -65,6 +61,9 @@ abstract class database_object {
* this checks the cache to see if the specified object is there
*/
public static function is_cached($index,$id) {
+
+ // Make sure we've got some parents here before we dive below
+ if (!isset(self::$object_cache) || !isset(self::$object_cache[$index])) { return false; }
return isset(self::$object_cache[$index][$id]);
@@ -73,10 +72,6 @@ abstract class database_object {
/**
* get_from_cache
* This attempts to retrive the specified object from the cache we've got here
- *
- * @param string $index
- * @param string $id
- * @return array
*/
public static function get_from_cache($index,$id) {
@@ -97,23 +92,11 @@ abstract class database_object {
/**
* add_to_cache
* This adds the specified object to the specified index in the cache
- *
- * @param string $index
- * @param string $id
- * @param array $data
- * @return boolean
*/
public static function add_to_cache($index,$id,$data) {
- $hasbeenset = false;
-
- // Set the data if it is set
- if (isset($data)) {
- self::$object_cache[$index][$id] = $data;
- $hasbeenset = true;
- }
-
- return $hasbeenset;
+ self::$object_cache[$index][$id] = $data;
+
} // add_to_cache
} // end database_object