http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97689

Revision: 97689
Author:   yaron
Date:     2011-09-21 01:38:54 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Follow-up to r97273 - re-added compatibility for MW 1.17

Modified Paths:
--------------
    trunk/extensions/PageSchemas/specials/PS_GeneratePages.php

Modified: trunk/extensions/PageSchemas/specials/PS_GeneratePages.php
===================================================================
--- trunk/extensions/PageSchemas/specials/PS_GeneratePages.php  2011-09-21 
01:35:30 UTC (rev 97688)
+++ trunk/extensions/PageSchemas/specials/PS_GeneratePages.php  2011-09-21 
01:38:54 UTC (rev 97689)
@@ -55,7 +55,13 @@
                // This hook will set an array of strings, with each value
                // as a title of a page to be created.
                wfRunHooks( 'PageSchemasGetPageList', array( $pageSchemaObj, 
&$pageList ) );
-               $skin = $this->getSkin();
+               // SpecialPage::getSkin() was added in MW 1.18
+               if ( is_callable( 'SpecialPage', 'getSkin' ) {
+                       $skin = $this->getSkin();
+               } else {
+                       global $wgUser;
+                       $skin = $wgUser->getSkin();
+               }
                foreach( $pageList as $page ){
                        $pageName = PageSchemas::titleString( $page );
                        $text .= Html::input( 'page[]', $pageName, 'checkbox', 
array( 'checked' => true ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to