X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2Fsqlite.inc;h=08188cade4433a0698cc5122f1853e6e4fcb488e;hb=12b65651c413df795ec5cc644e020b65c4d4f928;hp=16568ac7154aebc88c425f636bc4213834e1ccfe;hpb=181ba1d9b578d6d6f8ed3d65f811ce4f54294f56;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sqlite.inc b/maintenance/sqlite.inc index 16568ac715..08188cade4 100644 --- a/maintenance/sqlite.inc +++ b/maintenance/sqlite.inc @@ -33,10 +33,7 @@ class Sqlite { * @return bool */ public static function isPresent() { - wfSuppressWarnings(); - $compiled = wfDl( 'pdo_sqlite' ); - wfRestoreWarnings(); - return $compiled; + return extension_loaded( 'pdo_sqlite' ); } /** @@ -73,7 +70,9 @@ class Sqlite { $tables = $db->query( "SELECT name FROM sqlite_master WHERE type='table'", __METHOD__ ); foreach ( $tables as $table ) { - if ( strpos( $table->name, 'sqlite_' ) === 0 ) continue; + if ( strpos( $table->name, 'sqlite_' ) === 0 ) { + continue; + } $columns = $db->query( "PRAGMA table_info({$table->name})", __METHOD__ ); foreach ( $columns as $col ) { @@ -89,4 +88,4 @@ class Sqlite { $db->close(); return true; } - }; +};