Add support for HD versions of the wiki logo in MonoBook-like skins.
[lhc/web/wiklou.git] / maintenance / sqlite.php
index 7a22df5..edc9e14 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Performs some operations specific to SQLite database backend
+ * Performs some operations specific to SQLite database backend.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
+/**
+ * Maintenance script that performs some operations specific to SQLite database backend.
+ *
+ * @ingroup Maintenance
+ */
 class SqliteMaintenance extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Performs some operations specific to SQLite database backend";
-               $this->addOption( 'vacuum', 'Clean up database by removing deleted pages. Decreases database file size' );
+               $this->addOption(
+                       'vacuum',
+                       'Clean up database by removing deleted pages. Decreases database file size'
+               );
                $this->addOption( 'integrity', 'Check database for integrity' );
                $this->addOption( 'backup-to', 'Backup database to the given file', false, true );
                $this->addOption( 'check-syntax', 'Check SQL file(s) for syntax errors', false, true );
@@ -46,6 +55,7 @@ class SqliteMaintenance extends Maintenance {
                // Should work even if we use a non-SQLite database
                if ( $this->hasOption( 'check-syntax' ) ) {
                        $this->checkSyntax();
+
                        return;
                }
 
@@ -53,6 +63,7 @@ class SqliteMaintenance extends Maintenance {
 
                if ( $this->db->getType() != 'sqlite' ) {
                        $this->error( "This maintenance script requires a SQLite database.\n" );
+
                        return;
                }
 
@@ -92,6 +103,7 @@ class SqliteMaintenance extends Maintenance {
 
                if ( !$res || $res->numRows() == 0 ) {
                        $this->error( "Error: integrity check query returned nothing.\n" );
+
                        return;
                }
 
@@ -131,4 +143,4 @@ class SqliteMaintenance extends Maintenance {
 }
 
 $maintClass = "SqliteMaintenance";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;