API * version param now links to the SVN
* debug case fixes * renamed ApiQueryContributions to ApiQueryUserContributions (a bit clearer)
This commit is contained in:
parent
d201dbf9b7
commit
b900efa97f
5 changed files with 17 additions and 7 deletions
|
|
@ -256,7 +256,7 @@ function __autoload($className) {
|
|||
'ApiQueryAllpages' => 'includes/api/ApiQueryAllpages.php',
|
||||
'ApiQueryBase' => 'includes/api/ApiQueryBase.php',
|
||||
'ApiQueryBacklinks' => 'includes/api/ApiQueryBacklinks.php',
|
||||
'ApiQueryContributions' => 'includes/api/ApiQueryContributions.php',
|
||||
'ApiQueryContributions' => 'includes/api/ApiQueryUserContributions.php',
|
||||
'ApiQueryInfo' => 'includes/api/ApiQueryInfo.php',
|
||||
'ApiQueryLogEvents' => 'includes/api/ApiQueryLogEvents.php',
|
||||
'ApiQueryRecentChanges'=> 'includes/api/ApiQueryRecentChanges.php',
|
||||
|
|
|
|||
|
|
@ -150,8 +150,18 @@ abstract class ApiBase {
|
|||
|
||||
if ($this->getMain()->getShowVersions()) {
|
||||
$versions = $this->getVersion();
|
||||
if (is_array($versions))
|
||||
$pattern = '(\$.*) ([0-9a-z_]+\.php) (.*\$)';
|
||||
$replacement = '\\0' . "\n " . 'http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/\\2';
|
||||
|
||||
if (is_array($versions)) {
|
||||
$ver2 = array();
|
||||
foreach ($versions as &$v)
|
||||
$v = eregi_replace($pattern, $replacement, $v);
|
||||
$versions = implode("\n ", $versions);
|
||||
}
|
||||
else
|
||||
$versions = eregi_replace($pattern, $replacement, $versions);
|
||||
|
||||
$msg .= "Version:\n $versions\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ class ApiPageSet extends ApiQueryBase {
|
|||
*/
|
||||
private function initFromQueryResult($db, $res, &$remaining = null, $processTitles = null) {
|
||||
if (!is_null($remaining) && is_null($processTitles))
|
||||
ApiBase :: dieDebug('Missing $processTitles parameter when $remaining is provided');
|
||||
ApiBase :: dieDebug(__METHOD__, 'Missing $processTitles parameter when $remaining is provided');
|
||||
|
||||
while ($row = $db->fetchObject($res)) {
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ class ApiPageSet extends ApiQueryBase {
|
|||
|
||||
// Populate all the page information
|
||||
if($this->mResolveRedirects)
|
||||
$this->dieDebug('revids may not be used with redirect resolution');
|
||||
ApiBase :: dieDebug(__METHOD__, 'revids may not be used with redirect resolution');
|
||||
$this->initFromPageIds(array_keys($pageids));
|
||||
}
|
||||
|
||||
|
|
@ -527,7 +527,7 @@ class ApiPageSet extends ApiQueryBase {
|
|||
|
||||
// All IDs must exist in the page table
|
||||
if (!empty($this->mPendingRedirectIDs[$plfrom]))
|
||||
$this->dieDebug('Invalid redirect IDs were found');
|
||||
ApiBase :: dieDebug(__METHOD__, 'Invalid redirect IDs were found');
|
||||
|
||||
return $linkBatch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
|
|||
extract($this->extractRequestParams());
|
||||
|
||||
if ($redirect)
|
||||
$this->dieDebug('Redirect is not yet been implemented', 'notimplemented');
|
||||
ApiBase :: dieDebug(__METHOD__, 'Redirect is not yet been implemented', 'notimplemented');
|
||||
|
||||
$this->processContinue($continue, $redirect);
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class ApiQueryContributions extends ApiQueryBase {
|
|||
}
|
||||
|
||||
public function getVersion() {
|
||||
return __CLASS__ . ': $Id: ApiQueryContributions.php 17335 2006-11-01 09:36:00Z Werdna $';
|
||||
return __CLASS__ . ': $Id$';
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in a new issue