]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Safe_DataObject.php
MITM the DB_DataObject to avoid PEAR::DB strict standards warnings
[quix0rs-gnu-social.git] / classes / Safe_DataObject.php
index f0ea6b136f92f5229b1376d57f6a26f29af203ab..8e5e72c013bdc6ebe7d68cada500fb408e294efa 100644 (file)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Extended DB_DataObject to improve a few things:
@@ -26,7 +26,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
  * - don't leak memory when loading already-used .ini files
  *   (eg when using the same schema on thousands of databases)
  */
-class Safe_DataObject extends DB_DataObject
+class Safe_DataObject extends GS_DataObject
 {
     /**
      * Destructor to free global memory resources associated with
@@ -177,7 +177,6 @@ class Safe_DataObject extends DB_DataObject
             }
 
         }
-
         if (!$this->_database) {
             $this->_connect();
         }
@@ -204,7 +203,7 @@ class Safe_DataObject extends DB_DataObject
         }
 
         if (empty($_DB_DATAOBJECT['CONFIG'])) {
-            DB_DataObject::_loadConfig();
+            self::_loadConfig();
         }
 
         // if you supply this with arguments, then it will take those
@@ -259,7 +258,7 @@ class Safe_DataObject extends DB_DataObject
      * @param array of .ini file names $schemas
      * @return array
      */
-    protected function parseIniFiles($schemas)
+    protected function parseIniFiles(array $schemas)
     {
         $key = implode("|", $schemas);
         if (!isset(Safe_DataObject::$iniCache[$key])) {
@@ -287,4 +286,3 @@ class Safe_DataObject extends DB_DataObject
         return Safe_DataObject::$iniCache[$key];
     }
 }
-