r41795 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41794‎ | r41795 | r41796 >
Date:07:04, 7 October 2008
Author:siebrand
Status:old
Tags:
Comment:
Remove dependency on ExtensionFunctions.php when overriding Special:Search
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -8,7 +8,6 @@
99 */
1010 define( 'MV_VERSION', '1.0rc2' );
1111
12 -
1312 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1413
1514 /**
@@ -17,10 +16,6 @@
1817 * if semantic wiki is enabled for this wiki.
1918 */
2019
21 -// pre setup setup
22 -if ( !function_exists( 'extAddSpecialPage' ) ) {
23 - require_once( dirname( __FILE__ ) . '/../ExtensionFunctions.php' );
24 -}
2520 // add language:
2621 $wgExtensionMessagesFiles['MetavidWiki'] = $mvgIP . '/languages/MV_Messages.php';
2722 require_once( $mvgIP . '/languages/MV_Language.php' );
@@ -30,10 +25,10 @@
3126
3227 $markerList = array();
3328
34 -// override special search page: (requires ExtensionFunctions.php)
35 -extAddSpecialPage( dirname( __FILE__ ) . '/specials/MV_SpecialMediaSearch.php', 'Search', 'MV_SpecialSearch' );
 29+// override special search page:
 30+$wgSpecialPages['Search'] = 'MV_SpecialSearch';
 31+$wgAutoloadClasses['MV_SpecialSearch'] = dirname( __FILE__ ) . '/specials/MV_SpecialMediaSearch.php';
3632
37 -
3833 function enableMetavid() {
3934 global $wgExtensionFunctions, $smwgNamespacesWithSemanticLinks;
4035 $wgExtensionFunctions[] = 'mvSetupExtension';

Status & tagging log