From 43ca814f40307b311bdcc395a877709cc456130f Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 23 Jun 2010 19:49:02 +0000 Subject: [PATCH] Minor followup to r68482, fix the fail I introduced + 1 minor improvement to reused method --- includes/api/ApiQueryAllLinks.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index 26336f2256..340aea37df 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -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' ), ) ); -- 2.20.1