Index: trunk/extensions/Offline/DatabaseBz2.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | function select( $table, $fields, $conds='', $fname = 'Database::select', $options = array() ) { |
31 | 31 | require_once(dirname(__FILE__).'/DumpReader.php'); |
32 | 32 | require_once(dirname(__FILE__).'/CachedStorage.php'); |
33 | | - $row = null; |
| 33 | + $row = array(); |
34 | 34 | $title = false; |
35 | 35 | if (isset($conds['page_title'])) { |
36 | 36 | $title = $conds['page_title']; |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | } |
57 | 57 | |
58 | 58 | if (!isset($textid)) |
59 | | - return false; |
| 59 | + return $this->resultObject(array()); |
60 | 60 | |
61 | 61 | if ($table == 'page') { |
62 | 62 | // Given a page_title, get the id of text content. For efficiency, |
— | — | @@ -75,23 +75,13 @@ |
76 | 76 | } |
77 | 77 | else { print_r($table); print_r($conds); } |
78 | 78 | |
79 | | - if (!$row) |
80 | | - return false; |
81 | 79 | return $this->resultObject($row); |
82 | 80 | } |
83 | 81 | |
84 | 82 | |
85 | 83 | ////////////////////////////////////////////////BOILERPLATE FOLLOWS |
86 | 84 | |
87 | | - static $instance; |
88 | 85 | |
89 | | - static function getInstance() { |
90 | | - if ( !isset( self::$instance ) ) { |
91 | | - self::$instance = new self(); |
92 | | - } |
93 | | - return self::$instance; |
94 | | - } |
95 | | - |
96 | 86 | #------------------------------------------------------------------------------ |
97 | 87 | # Accessors |
98 | 88 | #------------------------------------------------------------------------------ |