Merge "Move category refreshes to a deferred update"
[lhc/web/wiklou.git] / includes / api / ApiHelp.php
index c33b27b..b1942bc 100644 (file)
@@ -180,7 +180,7 @@ class ApiHelp extends ApiBase {
                                        $href = $m[2] === '' ? '#' . $m[1] : $m[2];
                                } elseif ( $helptitle !== null ) {
                                        $href = Title::newFromText( str_replace( '$1', $m[1], $helptitle ) . $m[2] )
-                                               ->getFullUrl();
+                                               ->getFullURL();
                                } else {
                                        $href = wfAppendQuery( wfScript( 'api' ), array(
                                                'action' => 'help',
@@ -310,6 +310,7 @@ class ApiHelp extends ApiBase {
                                );
                        }
 
+                       $flags = $module->getHelpFlags();
                        $help['flags'] .= Html::openElement( 'div',
                                array( 'class' => 'apihelp-block apihelp-flags' ) );
                        $msg = $context->msg( 'api-help-flags' );
@@ -319,7 +320,7 @@ class ApiHelp extends ApiBase {
                                );
                        }
                        $help['flags'] .= Html::openElement( 'ul' );
-                       foreach ( $module->getHelpFlags() as $flag ) {
+                       foreach ( $flags as $flag ) {
                                $help['flags'] .= Html::rawElement( 'li', null,
                                        self::wrap( $context->msg( "api-help-flag-$flag" ), "apihelp-flag-$flag" )
                                );
@@ -710,7 +711,6 @@ class ApiHelp extends ApiBase {
                                        $suboptions,
                                        $haveModules
                                );
-                               $numSubmodules = count( $submodules );
                        }
 
                        $module->modifyHelp( $help, $suboptions, $haveModules );
@@ -759,6 +759,8 @@ class ApiHelp extends ApiBase {
                return array(
                        'action=help'
                                => 'apihelp-help-example-main',
+                       'action=help&modules=query&submodules=1'
+                               => 'apihelp-help-example-submodules',
                        'action=help&recursivesubmodules=1'
                                => 'apihelp-help-example-recursive',
                        'action=help&modules=help'