/[adm]/puppet/modules/mediawiki/files/init_wiki.php
ViewVC logotype

Contents of /puppet/modules/mediawiki/files/init_wiki.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1749 - (show annotations) (download)
Thu Jun 16 22:17:58 2011 UTC (12 years, 10 months ago) by misc
File size: 665 byte(s)
add php script to finish script deployment
1 <?
2 $wiki_root = $argv[1];
3 $mw_root = '/usr/share/mediawiki';
4
5 // DefaultSettings.php complain if not defined
6 define('MEDIAWIKI',1);
7
8 require_once("$mw_root/includes/Defines.php");
9 require_once("$mw_root/includes/AutoLoader.php");
10 require_once("$mw_root/includes/GlobalFunctions.php");
11 include("$wiki_root/LocalSettings.php");
12
13 $dbclass = 'Database'.ucfirst($wgDBtype);
14 $dbc = new $dbclass;
15
16 $wgDatabase = $dbc->newFromParams($wgDBserver,
17 $wgDBuser,
18 $wgDBpassword, $wgDBname, 1);
19
20 $wgDatabase->initial_setup($wgDBpassword, $wgDBname);
21 $wgDatabase->setup_database();
22
23 rmdir("$wiki_root/config");
24 ?>

  ViewVC Help
Powered by ViewVC 1.1.30