r21544 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21543‎ | r21544 | r21545 >
Date:20:47, 24 April 2007
Author:aaron
Status:old
Tags:
Comment:
*Forward compatibility for parser object output (bug 9393), move query to separate file
Modified paths:
  • /trunk/extensions/StableVersion/StableVersion.php (modified) (history)
  • /trunk/extensions/StableVersion/StableVersion.sql (added) (history)

Diff [purge]

Index: trunk/extensions/StableVersion/StableVersion.php
@@ -1,17 +1,7 @@
22 <?php
33 /**
4 -* Run the following SQL on your database prior to use :
 4+* Run the SQL on your database prior to use!
55
6 -CREATE TABLE stableversions (
7 - sv_page_id int(8) unsigned NOT NULL default '0',
8 - sv_page_rev int(8) unsigned NOT NULL default '0',
9 - sv_type tinyint(2) unsigned NOT NULL default '0',
10 - sv_user int(8) unsigned NOT NULL default '0',
11 - sv_date varchar(14) NOT NULL default '',
12 - sv_cache mediumblob NOT NULL,
13 - KEY sv_page_id (sv_page_id,sv_page_rev,sv_type)
14 -) TYPE=InnoDB;
15 -
166 * Some global variables:
177 $wgStableVersionThereCanOnlyBeOne // Set this to true is you want to have only a single stable version per article
188 */
@@ -382,6 +372,9 @@
383373 $parserOptions = ParserOptions::newFromUser( $wgUser ); # Dummy
384374
385375 $text = $p->parse( $text, $title, $parserOptions );
 376+ // Forward compatibility for parser object output (bug 9393)
 377+ $text = is_object($text) ? $text->mText : $text;
 378+
386379 $stripState = $p->mStripState;
387380 $wgStableVersionCaching = false;
388381 $text = $p->replaceVariables( $text, $parserOptions );
Index: trunk/extensions/StableVersion/StableVersion.sql
@@ -0,0 +1,11 @@
 2+-- Run the following SQL on your database prior to use :
 3+
 4+CREATE TABLE stableversions (
 5+ sv_page_id int(8) unsigned NOT NULL default '0',
 6+ sv_page_rev int(8) unsigned NOT NULL default '0',
 7+ sv_type tinyint(2) unsigned NOT NULL default '0',
 8+ sv_user int(8) unsigned NOT NULL default '0',
 9+ sv_date varchar(14) NOT NULL default '',
 10+ sv_cache mediumblob NOT NULL,
 11+ KEY sv_page_id (sv_page_id,sv_page_rev,sv_type)
 12+) TYPE=InnoDB;
\ No newline at end of file