(bug 25717) Fix "Hide/show extended details" toggle in image metadata table
[mediawiki.git] / maintenance / install.php
bloba7b51794fd97096167ffe7aff70c523050eb907e
1 <?php
3 /**
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 * http://www.gnu.org/copyleft/gpl.html
19 * @ingroup Maintenance
20 * @see wfWaitForSlaves()
23 define( 'MW_CONFIG_CALLBACK', 'CoreInstaller::overrideConfig' );
25 require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" );
27 class CommandLineInstaller extends Maintenance {
28 public function __construct() {
29 parent::__construct();
31 $this->addArg( 'name', 'The name of the wiki', true);
33 $this->addArg( 'admin', 'The username of the wiki administrator (WikiSysop)', true );
34 $this->addOption( 'pass', 'The password for the wiki administrator. You will be prompted for this if it isn\'t provided', false, true );
35 $this->addOption( 'email', 'The email for the wiki administrator', false, true );
36 $this->addOption( 'scriptpath', 'The relative path of the wiki in the web server (/wiki)', false, true );
38 $this->addOption( 'lang', 'The language to use (en)', false, true );
39 /* $this->addOption( 'cont-lang', 'The content language (en)', false, true ); */
41 $this->addOption( 'dbtype', 'The type of database (mysql)', false, true );
42 $this->addOption( 'dbserver', 'The database host (localhost)', false, true );
43 $this->addOption( 'dbport', 'The database port; only for PostgreSQL (5432)', false, true );
44 $this->addOption( 'dbname', 'The database name (my_wiki)', false, true );
45 $this->addOption( 'dbpath', 'The path for the SQLite DB (/var/data)', false, true );
46 $this->addOption( 'installdbuser', 'The user to use for installing (root)', false, true );
47 $this->addOption( 'installdbpass', 'The pasword for the DB user to install as.', false, true );
48 $this->addOption( 'dbuser', 'The user to use for normal operations (wikiuser)', false, true );
49 $this->addOption( 'dbpass', 'The pasword for the DB user for normal operations', false, true );
50 /* $this->addOption( 'dbschema', 'The schema for the MediaWiki DB in pg (mediawiki)', false, true ); */
51 /* $this->addOption( 'dbtsearch2schema', 'The schema for the tsearch2 DB in pg (public)', false, true ); */
52 /* $this->addOption( 'namespace', 'The project namespace (same as the name)', false, true ); */
55 public function execute() {
56 $adminName = isset( $this->mArgs[1] ) ? $this->mArgs[1] : null;
58 $installer =
59 new CliInstaller( $this->mArgs[0], $adminName, $this->mOptions );
61 $installer->execute();
65 $maintClass = "CommandLineInstaller";
67 require_once( DO_MAINTENANCE );