Minor followup to r68482, fix the fail I introduced
authorSam Reed <reedy@users.mediawiki.org>
Wed, 23 Jun 2010 19:49:02 +0000 (19:49 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 23 Jun 2010 19:49:02 +0000 (19:49 +0000)
+ 1 minor improvement to reused method

includes/api/ApiQueryAllLinks.php

index 26336f2..340aea3 100644 (file)
@@ -186,10 +186,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                return array(
                        'from' => 'The page title to start enumerating from',
                        'prefix' => 'Search for all page titles that begin with this value',
-                       'unique' => "Only show unique links. Cannot be used with generator or {p}prop=ids",
+                       'unique' => "Only show unique links. Cannot be used with generator or {$p}prop=ids",
                        'prop' => array(
                                'What pieces of information to include',
-                               " ids    - Adds pageid of where the link is from (Cannot be used with {p}unique)",
+                               " ids    - Adds pageid of where the link is from (Cannot be used with {$p}unique)",
                                ' title  - Adds the title of the link',
                        ),
                        'namespace' => 'The namespace to enumerate',
@@ -203,9 +203,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
        }
 
        public function getPossibleErrors() {
+               $m = $this->getModuleName();
                return array_merge( parent::getPossibleErrors(), array(
-                       array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot be used as a generator in unique links mode' ),
-                       array( 'code' => 'params', 'info' => $this->getModuleName() . ' cannot return corresponding page ids in unique links mode' ),
+                       array( 'code' => 'params', 'info' => "{$m} cannot be used as a generator in unique links mode" ),
+                       array( 'code' => 'params', 'info' => "{$m} cannot return corresponding page ids in unique links mode" ),
                        array( 'code' => 'params', 'info' => 'alcontinue and alfrom cannot be used together' ),
                        array( 'code' => 'badcontinue', 'info' => 'Invalid continue parameter' ),
                ) );