51 if ( !self::isPresent() ) {
52 throw new MWException(
"Can't check SQL syntax: SQLite not found" );
65 $db = DatabaseSqlite::newStandaloneInstance(
':memory:' );
67 foreach ( $files as $file ) {
68 $err = $db->sourceFile( $file );
74 $tables = $db->query(
"SELECT name FROM sqlite_master WHERE type='table'", __METHOD__ );
76 if (
strpos( $table->name,
'sqlite_' ) === 0 ) {
80 $columns = $db->query(
"PRAGMA table_info({$table->name})", __METHOD__ );
81 foreach ( $columns as $col ) {
85 return "Table {$table->name} has column {$col->name} with non-native type '{$col->type}'";
90 return $e->getMessage();
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
This class contains code common to different SQLite-related maintenance scripts.
static isPresent()
Checks whether PHP has SQLite support.
static checkSqlSyntax( $files)
Checks given files for correctness of SQL syntax.
this hook is for auditing only RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
returning false will NOT prevent logging $e