summaryrefslogtreecommitdiff
path: root/maintenance/namespace2sql.php
blob: 43a8cc64ac431db644fcd98b251a7eb6726d55cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * Print SQL to insert namespace names into database.
 * This source code is in the public domain.
 *
 * @file
 * @ingroup Maintenance
 */

require_once( "commandLine.inc" );

for ($i = -2; $i < 16; ++$i) {
	$nsname = mysql_escape_string( $wgLang->getNsText( $i ) );
	$dbname = mysql_escape_string( $wgDBname );
	print "INSERT INTO ns_name(ns_db, ns_num, ns_name) VALUES('$dbname', $i, '$nsname');\n";
}