Merge "Select column page_lang in prop=info"
[lhc/web/wiklou.git] / includes / api / ApiHelp.php
index 9be2d92..b33b087 100644 (file)
@@ -60,7 +60,7 @@ class ApiHelp extends ApiBase {
                if ( $params['wrap'] ) {
                        $data = array(
                                'mime' => 'text/html',
-                               'help' => $help,
+                               'help' => $html,
                        );
                        $result->setSubelements( $data, 'help' );
                        $result->addValue( null, $this->getModuleName(), $data );
@@ -376,6 +376,7 @@ class ApiHelp extends ApiBase {
                                                        $info[] = $context->msg( "apihelp-{$path}-paraminfo-{$tag}" )
                                                                ->numParams( count( $i ) )
                                                                ->params( $context->getLanguage()->commaList( $i ) )
+                                                               ->params( $module->getModulePrefix() )
                                                                ->parse();
                                                }
                                        }
@@ -528,11 +529,11 @@ class ApiHelp extends ApiBase {
                                                        ->parse();
                                        }
 
-                                       if ( !$description && !$info ) {
-                                               $description[] = self::wrap(
+                                       if ( !array_filter( $description ) ) {
+                                               $description = array( self::wrap(
                                                        $context->msg( 'api-help-param-no-description' ),
                                                        'apihelp-empty'
-                                               );
+                                               ) );
                                        }
 
                                        // Add "deprecated" flag
@@ -650,7 +651,7 @@ class ApiHelp extends ApiBase {
                );
        }
 
-       public function getExamplesMessages() {
+       protected function getExamplesMessages() {
                return array(
                        'action=help'
                                => 'apihelp-help-example-main',