2 if (!defined('GNUSOCIAL')) { exit(1); }
4 class GS_DataObject extends DB_DataObject
6 public function _autoloadClass($class, $table=false)
8 // avoid those annoying PEAR::DB strict standards warnings it causes
9 $old = error_reporting();
10 error_reporting(error_reporting() & ~E_STRICT);
12 $res = parent::_autoloadClass($class, $table);
15 error_reporting($old);
19 // wraps the _connect call so we don't throw E_STRICT warnings during it
20 public function _connect()
22 // avoid those annoying PEAR::DB strict standards warnings it causes
23 $old = error_reporting();
24 error_reporting(error_reporting() & ~E_STRICT);
26 $res = parent::_connect();
29 error_reporting($old);
33 // wraps the _loadConfig call so we don't throw E_STRICT warnings during it
34 // doesn't actually return anything, but we'll follow the same model as the rest of the wrappers
35 public function _loadConfig()
37 // avoid those annoying PEAR::DB strict standards warnings it causes
38 $old = error_reporting();
39 error_reporting(error_reporting() & ~E_STRICT);
41 $res = parent::_loadConfig();
44 error_reporting($old);
48 // wraps the count call so we don't throw E_STRICT warnings during it
49 public function count($countWhat = false,$whereAddOnly = false)
51 // avoid those annoying PEAR::DB strict standards warnings it causes
52 $old = error_reporting();
53 error_reporting(error_reporting() & ~E_STRICT);
55 $res = parent::count($countWhat, $whereAddOnly);
58 error_reporting($old);
62 static public function debugLevel($v = null)
64 // avoid those annoying PEAR::DB strict standards warnings it causes
65 $old = error_reporting();
66 error_reporting(error_reporting() & ~E_STRICT);
68 $res = parent::debugLevel($v);
71 error_reporting($old);
75 static public function factory($table = '')
77 // avoid those annoying PEAR::DB strict standards warnings it causes
78 $old = error_reporting();
79 error_reporting(error_reporting() & ~E_STRICT);
81 $res = parent::factory($table);
84 error_reporting($old);
88 public function get($k = null, $v = null)
90 // avoid those annoying PEAR::DB strict standards warnings it causes
91 $old = error_reporting();
92 error_reporting(error_reporting() & ~E_STRICT);
94 $res = parent::get($k, $v);
97 error_reporting($old);
101 public function fetch()
103 // avoid those annoying PEAR::DB strict standards warnings it causes
104 $old = error_reporting();
105 error_reporting(error_reporting() & ~E_STRICT);
107 $res = parent::fetch();
110 error_reporting($old);
114 public function find($n = false)
116 // avoid those annoying PEAR::DB strict standards warnings it causes
117 $old = error_reporting();
118 error_reporting(error_reporting() & ~E_STRICT);
120 $res = parent::find($n);
123 error_reporting($old);
127 public function fetchRow($row = null)
129 // avoid those annoying PEAR::DB strict standards warnings it causes
130 $old = error_reporting();
131 error_reporting(error_reporting() & ~E_STRICT);
133 $res = parent::fetchRow($row);
136 error_reporting($old);
140 // DB_DataObject's joinAdd calls DB_DataObject::factory explicitly, so our factory-override doesn't work
141 public function joinAdd($obj = false, $joinType='INNER', $joinAs=false, $joinCol=false)
143 // avoid those annoying PEAR::DB strict standards warnings it causes
144 $old = error_reporting();
145 error_reporting(error_reporting() & ~E_STRICT);
147 $res = parent::joinAdd($obj, $joinType, $joinAs, $joinCol);
150 error_reporting($old);
154 public function links()
156 // avoid those annoying PEAR::DB strict standards warnings it causes
157 $old = error_reporting();
158 error_reporting(error_reporting() & ~E_STRICT);
160 $res = parent::links();
163 error_reporting($old);
167 // wraps the update call so we don't throw E_STRICT warnings during it
168 public function update($dataObject = false)
170 // avoid those annoying PEAR::DB strict standards warnings it causes
171 $old = error_reporting();
172 error_reporting(error_reporting() & ~E_STRICT);
174 $res = parent::update($dataObject);
177 error_reporting($old);
181 static public function staticGet($class, $k, $v = null)
183 // avoid those annoying PEAR::DB strict standards warnings it causes
184 $old = error_reporting();
185 error_reporting(error_reporting() & ~E_STRICT);
187 $res = parent::staticGet($class, $k, $v);
190 error_reporting($old);
194 public function staticGetAutoloadTable($table)
196 // avoid those annoying PEAR::DB strict standards warnings it causes
197 $old = error_reporting();
198 error_reporting(error_reporting() & ~E_STRICT);
200 $res = parent::staticGetAutoloadTable($table);
203 error_reporting($old);