Index: trunk/extensions/StableVersion/StableVersion.php |
— | — | @@ -1,17 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | -* Run the following SQL on your database prior to use : |
| 4 | +* Run the SQL on your database prior to use! |
5 | 5 | |
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 | | - |
16 | 6 | * Some global variables: |
17 | 7 | $wgStableVersionThereCanOnlyBeOne // Set this to true is you want to have only a single stable version per article |
18 | 8 | */ |
— | — | @@ -382,6 +372,9 @@ |
383 | 373 | $parserOptions = ParserOptions::newFromUser( $wgUser ); # Dummy |
384 | 374 | |
385 | 375 | $text = $p->parse( $text, $title, $parserOptions ); |
| 376 | + // Forward compatibility for parser object output (bug 9393) |
| 377 | + $text = is_object($text) ? $text->mText : $text; |
| 378 | + |
386 | 379 | $stripState = $p->mStripState; |
387 | 380 | $wgStableVersionCaching = false; |
388 | 381 | $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 |