r13900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13899‎ | r13900 | r13901 >
Date:16:41, 28 April 2006
Author:hashar
Status:old
Tags:
Comment:
split at column #80
Modified paths:
  • /trunk/wiki2xml/php/extension.php (modified) (history)
  • /trunk/wiki2xml/php/mediawiki_converter.php (modified) (history)
  • /trunk/wiki2xml/php/sample_local.php (modified) (history)

Diff [purge]

Index: trunk/wiki2xml/php/mediawiki_converter.php
@@ -1,6 +1,8 @@
22 <?php
33
4 -require_once ( "filter_named_entities.php" ) ; # PHP4 and early PHP5 bug workaround
 4+# PHP4 and early PHP5 bug workaround:
 5+require_once ( "filter_named_entities.php" ) ;
 6+
57 require_once ( "global_functions.php" ) ;
68 require_once ( "wiki2xml.php" ) ;
79 require_once ( "content_provider.php" ) ;
@@ -260,4 +262,4 @@
261263 }
262264
263265
264 -?>
\ No newline at end of file
 266+?>
Index: trunk/wiki2xml/php/sample_local.php
@@ -1,14 +1,18 @@
22 <?php
33
44 /**
5 - * You can create your own local.php file, similar to this one, to configure your local installation.
6 - * If you do not create a local.php file, the scripts will run with default settings
 5+ * You can create your own local.php file, similar to this one, to configure
 6+ * your local installation.
 7+ * If you do not create a local.php file, the scripts will run with
 8+ * default settings.
79 */
810
911 $xmlg["site_base_url"] = "127.0.0.1/phase3" ;
1012 $xmlg["use_special_export"] = 1 ;
11 -$xmlg["temp_dir"] = "C:/windows/temp" ; # Directory for temporary files
1213
 14+# Directory for temporary files:
 15+$xmlg["temp_dir"] = "C:/windows/temp" ;
 16+
1317 $xmlg["docbook"] = array (
1418 "command_pdf" => "C:/docbook/bat/docbook_pdf.bat %1" ,
1519 "command_html" => "C:/docbook/bat/docbook_html.bat %1" ,
@@ -20,17 +24,26 @@
2125 # On Windows, set
2226 # $xmlg['is_windows'] = true ;
2327
24 -### Uncomment the following to use Special:Export and (potentially) automatic authors list; a little slower, though
 28+### Uncomment the following to use Special:Export and (potentially) automatic
 29+### authors list; a little slower, though:
2530 #$xmlg["use_special_export"] = 1 ;
2631
 32+
2733 ### Uncomment and localize the following to offer ODT export
28 -#$xmlg["zip_odt_path"] = "E:\\Program Files\\7-Zip" ; # Path to the zip/unzip programs; can be omitted if in default execuatable path
29 -#$xmlg["zip_odt"] = '7z.exe a -r -tzip $1 $2*' ; # Command to zip directory $1 to file $2; NOTE THE '*' AFTER '$2' FOR WINDOWS ONLY!
30 -#$xmlg["unzip_odt"] = '7z.exe x $1 -o$2' ; # Command to unzip file $1 to directory $2
3134
 35+# Path to the zip/unzip programs; can be omitted if in path:
 36+#$xmlg["zip_odt_path"] = "E:\\Program Files\\7-Zip" ;
3237
 38+# Command to zip directory $1 to file $2;
 39+# NOTE THE '*' AFTER '$2' FOR WINDOWS ONLY!
 40+#$xmlg["zip_odt"] = '7z.exe a -r -tzip $1 $2*' ;
3341
34 -# If you want to do text-file browsing, run "xmldump2files.php" once (see settings there), then set this:
 42+# Command to unzip file $1 to directory $2:
 43+#$xmlg["unzip_odt"] = '7z.exe x $1 -o$2' ;
 44+
 45+
 46+# If you want to do text-file browsing, run "xmldump2files.php" once
 47+# (see settings there), then set this:
3548 $base_text_dir = "C:/dewiki-20060327-pages-articles" ;
3649
3750 ?>
Index: trunk/wiki2xml/php/extension.php
@@ -1,10 +1,11 @@
22 <?php
33 /*
4 -To enable this extension, put all files in this directory into a "wiki2xml" subdirectory of your MediaWiki extensions directory
 4+To enable this extension, put all files in this directory into a "wiki2xml"
 5+subdirectory of your MediaWiki extensions directory.
56 Also, add
67 require_once ( "extensions/wiki2xml/extension.php" ) ;
78 to your LocalSettings.php
8 -The extension can then be accessed as [[Special:Wiki2XML]]
 9+The extension will then be accessed as [[Special:Wiki2XML]].
910 */
1011
1112 if( !defined( 'MEDIAWIKI' ) ) die();
@@ -31,8 +32,8 @@
3233 #_____________________________________________________________________________
3334
3435 /**
35 -* The special page
36 -*/
 36+ * The special page
 37+ */
3738 function wfWiki2XMLExtension() { # Checked for HTML and MySQL insertion attacks
3839 global $IP, $wgMessageCache;
3940 # wfTasksAddCache();

Status & tagging log