Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -21,12 +21,12 @@ |
22 | 22 | * Constructor. |
23 | 23 | * Parameters $server, $user and $password are not used. |
24 | 24 | */ |
25 | | - function __construct( $server = false, $user = false, $password = false, $dbName = false, $failFunction = false, $flags = 0 ) { |
| 25 | + function __construct( $server = false, $user = false, $password = false, $dbName = false, $failFunction = false, $flags = 0, $fileame = false ) { |
26 | 26 | global $wgSQLiteDataDir; |
27 | 27 | $this->mFailFunction = $failFunction; |
28 | 28 | $this->mFlags = $flags; |
29 | 29 | $this->mDatabaseFile = self::generateFileName( $wgSQLiteDataDir, $dbName ); |
30 | | - if( !is_readable( $this->mDatabaseFile ) ) |
| 30 | + if ( !is_readable( $this->mDatabaseFile ) ) |
31 | 31 | throw new DBConnectionError( $this, "SQLite database not accessible" ); |
32 | 32 | $this->mName = $dbName; |
33 | 33 | $this->open( $server, $user, $password, $dbName ); |
— | — | @@ -136,8 +136,8 @@ |
137 | 137 | $res = null; |
138 | 138 | } |
139 | 139 | |
140 | | - function fetchObject($res) { |
141 | | - if ($res instanceof ResultWrapper) |
| 140 | + function fetchObject( $res ) { |
| 141 | + if ( $res instanceof ResultWrapper ) |
142 | 142 | $r =& $res->result; |
143 | 143 | else |
144 | 144 | $r =& $res; |
— | — | @@ -155,15 +155,15 @@ |
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | |
159 | | - function fetchRow($res) { |
| 159 | + function fetchRow( $res ) { |
160 | 160 | if ( $res instanceof ResultWrapper ) |
161 | 161 | $r =& $res->result; |
162 | 162 | else |
163 | 163 | $r =& $res; |
164 | 164 | |
165 | | - $cur = current($r); |
166 | | - if (is_array($cur)) { |
167 | | - next($r); |
| 165 | + $cur = current( $r ); |
| 166 | + if ( is_array( $cur ) ) { |
| 167 | + next( $r ); |
168 | 168 | return $cur; |
169 | 169 | } |
170 | 170 | return false; |