summaryrefslogtreecommitdiff
path: root/maintenance/namespace2sql.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 18:12:39 +0000
commit183851b06bd6c52f3cae5375f433da720d410447 (patch)
treea477257decbf3360127f6739c2f9d0ec57a03d39 /maintenance/namespace2sql.php
MediaWiki 1.7.1 wiederhergestellt
Diffstat (limited to 'maintenance/namespace2sql.php')
-rw-r--r--maintenance/namespace2sql.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/maintenance/namespace2sql.php b/maintenance/namespace2sql.php
new file mode 100644
index 00000000..8084bfec
--- /dev/null
+++ b/maintenance/namespace2sql.php
@@ -0,0 +1,14 @@
+<?php
+#
+# Print SQL to insert namespace names into database.
+# This source code is in the public domain.
+
+require_once( "commandLine.inc" );
+
+for ($i = -2; $i < 16; ++$i) {
+ $nsname = wfStrencode( $wgLang->getNsText( $i ) );
+ $dbname = wfStrencode( $wgDBname );
+ print "INSERT INTO ns_name(ns_db, ns_num, ns_name) VALUES('$dbname', $i, '$nsname');\n";
+}
+
+?>