'ApiQuerySiteinfo' => 'ApiQuerySiteinfo.php',\r
'ApiQueryInfo' => 'ApiQueryInfo.php',\r
'ApiQueryRevisions' => 'ApiQueryRevisions.php',\r
- 'ApiQueryAllpages' => 'ApiQueryAllpages.php' \r
+ 'ApiQueryAllpages' => 'ApiQueryAllpages.php'\r
);\r
\r
/**\r
// Prefix each api class with the proper prefix,\r
// and append them to $wgAutoloadClasses\r
global $wgAutoloadClasses;\r
- \r
+\r
if (!isset ($wgAutoloadClasses))\r
- $wgAutoloadClasses = array();\r
+ $wgAutoloadClasses = array ();\r
\r
foreach ($apiAutoloadClasses as $className => $classFile)\r
$wgAutoloadClasses[$className] = $apiDirectory . $classFile;\r
\r
// More validation only when choices were not given\r
// choices were validated in ParseMultiValue()\r
- if (!is_array ($type) && isset ($value)) {\r
+ if (!is_array($type) && isset ($value)) {\r
\r
switch ($type) {\r
case 'NULL' : // nothing to do\r
case 'integer' : // Force everything using intval()\r
$value = is_array($value) ? array_map('intval', $value) : intval($value);\r
break;\r
- case 'limit':\r
- if (!isset ($enumParams[GN_ENUM_MAX1]) || !isset($enumParams[GN_ENUM_MAX2]))\r
+ case 'limit' :\r
+ if (!isset ($enumParams[GN_ENUM_MAX1]) || !isset ($enumParams[GN_ENUM_MAX2]))\r
$this->DieDebug("MAX1 or MAX2 are not defined for the limit $param");\r
if ($multi)\r
$this->DieDebug("Multi-values not supported for $param");\r
- $min = isset($enumParams[GN_ENUM_MIN]) ? $enumParams[GN_ENUM_MIN] : 0;\r
+ $min = isset ($enumParams[GN_ENUM_MIN]) ? $enumParams[GN_ENUM_MIN] : 0;\r
$value = intval($value);\r
- $this->ValidateLimit($param, $value, $min, $enumParams[GN_ENUM_MAX1], $enumParams[GN_ENUM_MAX2]); \r
+ $this->ValidateLimit($param, $value, $min, $enumParams[GN_ENUM_MAX1], $enumParams[GN_ENUM_MAX2]);\r
break;\r
case 'boolean' :\r
if ($multi)\r
break;\r
default :\r
$this->DieDebug("Param $param's type is unknown - $type");\r
- \r
+\r
}\r
}\r
\r
/**\r
* Validate the value against the minimum and user/bot maximum limits. Prints usage info on failure.\r
*/\r
- function ValidateLimit( $varname, $value, $min, $max, $botMax )\r
- {\r
+ function ValidateLimit($varname, $value, $min, $max, $botMax) {\r
global $wgUser;\r
- \r
- if ( $value < $min ) {\r
- $this->dieUsage( "$varname may not be less than $min (set to $value)", $varname );\r
+\r
+ if ($value < $min) {\r
+ $this->dieUsage("$varname may not be less than $min (set to $value)", $varname);\r
}\r
- \r
- if( $this->GetMain()->IsBot() ) {\r
- if ( $value > $botMax ) {\r
- $this->dieUsage( "$varname may not be over $botMax (set to $value) for bots", $varname );\r
+\r
+ if ($this->GetMain()->IsBot()) {\r
+ if ($value > $botMax) {\r
+ $this->dieUsage("$varname may not be over $botMax (set to $value) for bots", $varname);\r
}\r
} else {\r
- if( $value > $max ) {\r
- $this->dieUsage( "$varname may not be over $max (set to $value) for users", $varname );\r
+ if ($value > $max) {\r
+ $this->dieUsage("$varname may not be over $max (set to $value) for users", $varname);\r
}\r
}\r
}\r
$text = ereg_replace("api\\.php\\?[^ ()<\n\t]+", '<a href="\\0">\\0</a>', $text);
// make strings inside * bold
$text = ereg_replace("\\*[^<>\n]+\\*", '<b>\\0</b>', $text);
-
+
return $text;
}
public function Execute() {
require_once ('ApiFormatJson_json.php');
$json = new Services_JSON();
- $this->PrintText( $json->encode( $this->GetResult()->GetData(), true ));
+ $this->PrintText($json->encode($this->GetResult()->GetData(), true));
}
protected function GetDescription() {
public function GetMimeType() {
return 'text/xml';
}
-
+
public function GetNeedsRawData() {
return true;
}
public function Execute() {\r
$this->DieUsage('', 'help');\r
}\r
- \r
+\r
protected function GetDescription() {\r
- return array('Display this help screen.');\r
+ return array (\r
+ 'Display this help screen.'\r
+ );\r
}\r
}\r
?>
\ No newline at end of file
'wpDomain' => $lgdomain,
'wpRemember' => ''
));
-
- $result = array();
-
+
+ $result = array ();
+
$loginForm = new LoginForm($params);
- switch ($loginForm->authenticateUserData())
- {
- case (AuthSuccess):
+ switch ($loginForm->authenticateUserData()) {
+ case (AuthSuccess) :
$result['result'] = 'Success';
$result['lguserid'] = $_SESSION['wsUserID'];
$result['lgusername'] = $_SESSION['wsUserName'];
$result['lgtoken'] = $_SESSION['wsToken'];
break;
- case (AuthNoName):
+ case (AuthNoName) :
$result['result'] = 'AuthNoName';
break;
- case (AuthIllegal):
+ case (AuthIllegal) :
$result['result'] = 'AuthIllegal';
break;
- case (AuthWrongPluginPass):
+ case (AuthWrongPluginPass) :
$result['result'] = 'AuthWrongPluginPass';
break;
- case (AuthNotExists):
+ case (AuthNotExists) :
$result['result'] = 'AuthNotExists';
break;
- case (AuthWrongPass):
+ case (AuthWrongPass) :
$result['result'] = 'AuthWrongPass';
break;
- case (AuthEmptyPass):
+ case (AuthEmptyPass) :
$result['result'] = 'AuthEmptyPass';
break;
- default:
- $this->DieDebug( "Unhandled case value" );
+ default :
+ $this->DieDebug("Unhandled case value");
}
-
+
$this->GetResult()->AddMessage('login', null, $result);
}
return array (
'lgname' => '',
'lgpassword' => '',
- 'lgdomain' => null
+ 'lgdomain' => null
);
}
return array (
'lgname' => 'User Name',
'lgpassword' => 'Password',
- 'lgdomain' => 'Domain (optional)'
+ 'lgdomain' => 'Domain (optional)'
);
}
protected function GetDescription() {
- return array('This module is used to login and get the authentication tokens.');
+ return array (
+ 'This module is used to login and get the authentication tokens.'
+ );
}
}
?>
\ No newline at end of file
* @desc This exception will be thrown when DieUsage is called to stop module execution.\r
*/\r
class UsageException extends Exception {\r
- var $codestr;\r
+\r
+ private $codestr;\r
\r
public function __construct($message, $codestr) {\r
parent :: __construct($message);\r
\r
return $msg;\r
}\r
- \r
+\r
private $mIsBot = null;\r
public function IsBot() {\r
- if (!isset($this->mIsBot)) {\r
+ if (!isset ($this->mIsBot)) {\r
global $wgUser;\r
- $this->mIsBot = $wgUser->isAllowed( 'bot' );\r
+ $this->mIsBot = $wgUser->isAllowed('bot');\r
}\r
return $this->mIsBot;\r
}\r
if (!defined('MEDIAWIKI')) {
// Eclipse helper - will be ignored in production
- require_once ("ApiBase.php");
+ require_once ("ApiQueryBase.php");
}
-class ApiPageSet extends ApiBase {
+class ApiPageSet extends ApiQueryBase {
private $allPages; // [ns][dbkey] => page_id or 0 when missing
- private $db, $resolveRedirs;
+ private $resolveRedirs;
private $goodTitles, $missingTitles, $redirectTitles, $normalizedTitles;
- public function __construct($main, $db, $resolveRedirs) {
- parent :: __construct($main);
- $this->db = $db;
+ public function __construct($query, $resolveRedirs) {
+ parent :: __construct($query, __CLASS__);
$this->resolveRedirs = $resolveRedirs;
$this->allPages = array ();
$this->goodTitles = array ();
$this->missingTitles = array ();
$this->redirectTitles = array ();
- $this->normalizedTitles = array();
+ $this->normalizedTitles = array ();
}
/**
public function GetNormalizedTitles() {
return $this->normalizedTitles;
}
-
+
/**
* Given an array of title strings, convert them into Title objects.
* This method validates access rights for the title,
// Get validated and normalized title objects
$linkBatch = $this->ProcessTitlesStrings($titles);
-
+
+ $db = $this->GetDB();
+
//
// Repeat until all redirects have been resolved
//
- while (false !== ($set = $linkBatch->constructSet('page', $this->db))) {
+ while (false !== ($set = $linkBatch->constructSet('page', $db))) {
// Hack: Get the ns:titles stored in array(ns => array(titles)) format
$remaining = $linkBatch->data;
//
// Get data about $linkBatch from `page` table
//
- $res = $this->db->select('page', $pageFlds, $set, __CLASS__ . '::' . __FUNCTION__);
- while ($row = $this->db->fetchObject($res)) {
+ $res = $db->select('page', $pageFlds, $set, __CLASS__ . '::' . __FUNCTION__);
+ while ($row = $db->fetchObject($res)) {
unset ($remaining[$row->page_namespace][$row->page_title]);
$title = Title :: makeTitle($row->page_namespace, $row->page_title);
$this->goodTitles[$row->page_id] = $title;
}
}
- $this->db->freeResult($res);
+ $db->freeResult($res);
//
// The remaining titles in $remaining are non-existant pages
//
// Resolve redirects by querying the pagelinks table, and repeat the process
//
-
+
// Create a new linkBatch object for the next pass
$linkBatch = new LinkBatch();
// find redirect targets for all redirect pages
- $res = $this->db->select('pagelinks', array (
+ $res = $db->select('pagelinks', array (
'pl_from',
'pl_namespace',
'pl_title'
'pl_from' => array_keys($redirectIds
)), __CLASS__ . '::' . __FUNCTION__);
- while ($row = $this->db->fetchObject($res)) {
+ while ($row = $db->fetchObject($res)) {
// Bug 7304 workaround
// ( http://bugzilla.wikipedia.org/show_bug.cgi?id=7304 )
// A redirect page may have more than one link.
// This code will only use the first link returned.
- if (isset ($redirectIds[$row->pl_from])) { // remove line when 7304 is fixed
+ if (isset ($redirectIds[$row->pl_from])) { // remove line when 7304 is fixed
$titleStrFrom = $redirectIds[$row->pl_from]->getPrefixedText();
$titleStrTo = Title :: makeTitle($row->pl_namespace, $row->pl_title)->getPrefixedText();
$this->redirectTitles[$titleStrFrom] = $titleStrTo;
- unset ($redirectIds[$row->pl_from]); // remove line when 7304 is fixed
+ unset ($redirectIds[$row->pl_from]); // remove line when 7304 is fixed
// Avoid an infinite loop by checking if we have already processed this target
if (!isset ($this->allPages[$row->pl_namespace][$row->pl_title])) {
}
}
}
- $this->db->freeResult($res);
+ $db->freeResult($res);
}
}
\r
class ApiQuery extends ApiBase {\r
\r
- var $mMetaModuleNames, $mPropModuleNames, $mListModuleNames;\r
+ private $mMetaModuleNames, $mPropModuleNames, $mListModuleNames;\r
+ private $mData;\r
\r
private $mQueryMetaModules = array (\r
'siteinfo' => 'ApiQuerySiteinfo'\r
return $this->mSlaveDB;\r
}\r
\r
+ public function GetData() {\r
+ return $this->mData;\r
+ }\r
+\r
/**\r
* Query execution happens in the following steps:\r
* #1 Create a PageSet object with any pages requested by the user\r
$dataSource = 'revids';\r
}\r
\r
- $data = new ApiPageSet($this->GetMain(), $this->GetDB(), $redirects);\r
+ $this->mData = new ApiPageSet($this, $redirects);\r
\r
switch ($dataSource) {\r
case 'titles' :\r
- $data->PopulateTitles($titles);\r
+ $this->mData->PopulateTitles($titles);\r
break;\r
case 'pageids' :\r
- $data->PopulatePageIDs($pageids);\r
+ $this->mData->PopulatePageIDs($pageids);\r
break;\r
case 'titles' :\r
- $data->PopulateRevIDs($revids);\r
+ $this->mData->PopulateRevIDs($revids);\r
break;\r
default :\r
// Do nothing - some queries do not need any of the data sources.\r
// If generator is provided, get a new dataset to work on\r
//\r
if (isset ($generator))\r
- $data = $this->ExecuteGenerator($generator, $data, $redirects);\r
+ $this->ExecuteGenerator($generator, $redirects);\r
\r
// Instantiate required modules\r
- // During instantiation, modules may optimize data requests through the $data object \r
- // $data will be lazy loaded when modules begin to request data during execution\r
+ // During instantiation, modules may optimize data requests through the $this->mData object \r
+ // $this->mData will be lazy loaded when modules begin to request data during execution\r
$modules = array ();\r
if (isset ($meta))\r
foreach ($meta as $moduleName)\r
- $modules[] = new $this->mQueryMetaModules[$moduleName] ($this->GetMain(), $this, $moduleName, $data);\r
+ $modules[] = new $this->mQueryMetaModules[$moduleName] ($this, $moduleName);\r
if (isset ($prop))\r
foreach ($prop as $moduleName)\r
- $modules[] = new $this->mQueryPropModules[$moduleName] ($this->GetMain(), $this, $moduleName, $data);\r
+ $modules[] = new $this->mQueryPropModules[$moduleName] ($this, $moduleName);\r
if (isset ($list))\r
foreach ($list as $moduleName)\r
- $modules[] = new $this->mQueryListModules[$moduleName] ($this->GetMain(), $this, $moduleName, $data);\r
+ $modules[] = new $this->mQueryListModules[$moduleName] ($this, $moduleName);\r
\r
// Title normalizations\r
- foreach ($data->GetNormalizedTitles() as $rawTitleStr => $titleStr) {\r
+ foreach ($this->mData->GetNormalizedTitles() as $rawTitleStr => $titleStr) {\r
$this->GetResult()->AddMessage('query', 'normalized', array (\r
'from' => $rawTitleStr,\r
'to' => $titleStr\r
\r
// Show redirect information\r
if ($redirects) {\r
- foreach ($data->GetRedirectTitles() as $titleStrFrom => $titleStrTo) {\r
+ foreach ($this->mData->GetRedirectTitles() as $titleStrFrom => $titleStrTo) {\r
$this->GetResult()->AddMessage('query', 'redirects', array (\r
'from' => $titleStrFrom,\r
'to' => $titleStrTo\r
$module->Execute();\r
}\r
\r
- protected function ExecuteGenerator($generator, $data, $redirects) {\r
- \r
+ protected function ExecuteGenerator($generator, $redirects) {\r
+\r
// Find class that implements requested generator\r
if (isset ($this->mQueryListModules[$generator]))\r
$className = $this->mQueryListModules[$generator];\r
- else if (isset ($this->mQueryPropModules[$generator]))\r
- $className = $this->mQueryPropModules[$generator];\r
else\r
- $this->DieDebug("Unknown generator=$generator");\r
- \r
- \r
- $module = new $className($this->GetMain(), $this, $generator, $data, true);\r
+ if (isset ($this->mQueryPropModules[$generator]))\r
+ $className = $this->mQueryPropModules[$generator];\r
+ else\r
+ $this->DieDebug("Unknown generator=$generator");\r
+\r
+ $module = new $className ($this, $generator, true);\r
+\r
+ // change $this->mData\r
\r
// TODO: implement\r
$this->DieUsage("Generator execution has not been implemented", 'notimplemented');\r
// Use parent to make default message for the query module\r
$msg = parent :: MakeHelpMsg();\r
\r
+ // Make sure the internal object is empty\r
+ // (just in case a sub-module decides to optimize during instantiation)\r
+ $this->mData = null;\r
+\r
$astriks = str_repeat('--- ', 8);\r
$msg .= "\n$astriks Query: Meta $astriks\n\n";\r
$msg .= $this->MakeHelpMsgHelper($this->mQueryMetaModules, 'meta');\r
\r
foreach ($moduleList as $moduleName => $moduleClass) {\r
$msg .= "* $paramName=$moduleName *";\r
- $module = new $moduleClass ($this->GetMain(), $this, $moduleName, null);\r
+ $module = new $moduleClass ($this, $moduleName);\r
$msg2 = $module->MakeHelpMsg();\r
if ($msg2 !== false)\r
$msg .= $msg2;\r
class ApiQueryAllpages extends ApiQueryBase {
- public function __construct($main, $query, $moduleName, $data, $generator = false) {
- parent :: __construct($main, $query, $moduleName, $data, $generator);
+ public function __construct($query, $moduleName, $generator = false) {
+ parent :: __construct($query, $moduleName, $generator);
}
public function Execute() {
$aplimit = $apfrom = $apnamespace = $apfilterredir = null;
extract($this->ExtractRequestParams());
- $db = $this->GetQuery()->GetDB();
- $where = array( 'page_namespace' => $apnamespace );
- if( isset($apfrom))
- $where[] = 'page_title>=' . $db->addQuotes(ApiQueryBase::TitleToKey($apfrom));
+ $db = $this->GetDB();
+ $where = array (
+ 'page_namespace' => $apnamespace
+ );
+ if (isset ($apfrom))
+ $where[] = 'page_title>=' . $db->addQuotes(ApiQueryBase :: TitleToKey($apfrom));
if ($apfilterredir === 'redirects')
- $where['page_is_redirect'] = 1;
- else if ($apfilterredir === 'nonredirects')
- $where['page_is_redirect'] = 0;
-
- $res = $db->select(
- 'page',
- array( 'page_id', 'page_namespace', 'page_title' ),
- $where,
- __CLASS__ . '::' . __METHOD__,
- array( 'USE INDEX' => 'name_title', 'LIMIT' => $aplimit+1, 'ORDER BY' => 'page_namespace, page_title' ));
-
- $data = array();
+ $where['page_is_redirect'] = 1;
+ else
+ if ($apfilterredir === 'nonredirects')
+ $where['page_is_redirect'] = 0;
+
+ $res = $db->select('page', array (
+ 'page_id',
+ 'page_namespace',
+ 'page_title'
+ ), $where, __CLASS__ . '::' . __METHOD__, array (
+ 'USE INDEX' => 'name_title',
+ 'LIMIT' => $aplimit +1,
+ 'ORDER BY' => 'page_namespace, page_title'
+ ));
+
+ $data = array ();
$data['_element'] = 'p';
$count = 0;
- while ( $row = $db->fetchObject( $res ) ) {
- if( ++$count > $aplimit ) {
+ while ($row = $db->fetchObject($res)) {
+ if (++ $count > $aplimit) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
- $msg = array('continue' => 'apfrom=' . ApiQueryBase::KeyToTitle($row->page_title));
+ $msg = array (
+ 'continue' => 'apfrom=' . ApiQueryBase :: KeyToTitle($row->page_title
+ ));
$this->GetResult()->AddMessage('query-status', 'allpages', $msg);
break;
}
- $title = Title::makeTitle( $row->page_namespace, $row->page_title );
+ $title = Title :: makeTitle($row->page_namespace, $row->page_title);
// skip any pages that user has no rights to read
- if ( $title->userCanRead() ) {
-
+ if ($title->userCanRead()) {
+
$id = intval($row->page_id);
- $pagedata = array();
- $pagedata['id'] = $id;
+ $pagedata = array ();
+ $pagedata['id'] = $id;
if ($title->getNamespace() !== 0)
$pagedata['ns'] = $title->getNamespace();
$pagedata['title'] = $title->getPrefixedText();
$data[$id] = $pagedata;
}
}
- $db->freeResult( $res );
+ $db->freeResult($res);
$this->GetResult()->AddMessage('query', 'allpages', $data);
}
protected function GetAllowedParams() {
global $wgContLang;
- $validNamespaces = array();
+ $validNamespaces = array ();
foreach (array_keys($wgContLang->getNamespaces()) as $ns) {
if ($ns >= 0)
$validNamespaces[] = $ns; // strval($ns);
}
-
+
return array (
'apfrom' => null,
'apnamespace' => array (
\r
abstract class ApiQueryBase extends ApiBase {\r
\r
- private $mQueryModule, $mModuleName, $mData, $mGenerator;\r
- \r
- public function __construct($main, $query, $moduleName, $data, $generator=false) {\r
- parent :: __construct($main);\r
+ private $mQueryModule, $mModuleName, $mGenerator;\r
+\r
+ public function __construct($query, $moduleName, $generator = false) {\r
+ parent :: __construct($query->GetMain());\r
$this->mQueryModule = $query;\r
$this->mModuleName = $moduleName;\r
- $this->mData = $data;\r
$this->mGenerator = $generator;\r
}\r
- \r
+\r
/**\r
* Get the main Query module \r
*/\r
public function GetQuery() {\r
return $this->mQueryModule;\r
}\r
- \r
+\r
/**\r
* Get the name of the query being executed by this instance \r
- */ \r
+ */\r
public function GetModuleName() {\r
return $this->mModuleName;\r
- } \r
- \r
+ }\r
+\r
+ /**\r
+ * Get the Query database connection (readonly)\r
+ */\r
+ protected function GetDB() {\r
+ return $this->GetQuery()->GetDB();\r
+ }\r
+\r
/**\r
* Get the PageSet object to work on\r
*/\r
protected function GetData() {\r
- return $this->mData;\r
+ return $this->mQueryModule->GetData();\r
}\r
- \r
+\r
/**\r
* Return true if this instance is being used as a generator.\r
*/\r
public function GetCanGenerate() {\r
return false;\r
}\r
- \r
- public static function TitleToKey($title)\r
- {\r
- return str_replace(' ', '_', $title);\r
+\r
+ public static function TitleToKey($title) {\r
+ return str_replace(' ', '_', $title);\r
}\r
- public static function KeyToTitle($key)\r
- {\r
- return str_replace('_', ' ', $key);\r
+ public static function KeyToTitle($key) {\r
+ return str_replace('_', ' ', $key);\r
}\r
}\r
-?>
\ No newline at end of file
+?>\r
+++ /dev/null
-<?php\r
-\r
-\r
-/*\r
- * Created on Sep 7, 2006\r
- *\r
- * API for MediaWiki 1.8+\r
- *\r
- * Copyright (C) 2006 Yuri Astrakhan <FirstnameLastname@gmail.com>\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\r
- * http://www.gnu.org/copyleft/gpl.html\r
- */\r
-\r
-if (!defined('MEDIAWIKI')) {\r
- // Eclipse helper - will be ignored in production\r
- require_once ("ApiQueryBase.php");\r
-}\r
-\r
-class ApiQueryContent extends ApiQueryBase {\r
-\r
- /**\r
- * Constructor\r
- */\r
- public function __construct($main, $query, $data) {\r
- parent :: __construct($main, $query);\r
- }\r
-\r
- public function Execute() {\r
- \r
- }\r
-\r
- /**\r
- * Returns an array of allowed parameters (keys) => default value for that parameter\r
- */\r
- protected function GetAllowedParams() {\r
- return array (\r
- 'param' => 'default',\r
- 'enumparam' => array (\r
- GN_ENUM_DFLT => 'default',\r
- GN_ENUM_ISMULTI => false,\r
- GN_ENUM_CHOICES => array (\r
- 'a',\r
- 'b'\r
- )\r
- )\r
- );\r
- }\r
-\r
- /**\r
- * Returns the description string for this module\r
- */\r
- protected function GetDescription() {\r
- return 'module a';\r
- }\r
-\r
- /**\r
- * Returns usage examples for this module. Return null if no examples are available.\r
- */\r
- protected function GetExamples() {\r
- return array (\r
- 'http://...'\r
- );\r
- }\r
-}\r
-?>
\ No newline at end of file
class ApiQueryInfo extends ApiQueryBase {
- public function __construct($main, $moduleName, $query, $data) {
- parent :: __construct($main, $moduleName, $query, $data);
+ public function __construct($main, $moduleName, $query) {
+ parent :: __construct($main, $moduleName, $query);
}
public function Execute() {
-
+
}
protected function GetAllowedParams() {
}
protected function GetParamDescription() {
- return array();
+ return array ();
}
protected function GetDescription() {
class ApiQueryRevisions extends ApiQueryBase {
- public function __construct($main, $query, $moduleName, $data, $generator=false) {
- parent :: __construct($main, $query, $moduleName, $data, $generator);
+ public function __construct($query, $moduleName, $generator = false) {
+ parent :: __construct($query, $moduleName, $generator);
}
public function Execute() {
class ApiQuerySiteinfo extends ApiQueryBase {
- public function __construct($main, $query, $moduleName, $data) {
- parent :: __construct($main, $query, $moduleName, $data);
+ public function __construct($query, $moduleName) {
+ parent :: __construct($query, $moduleName);
}
public function Execute() {