r32808 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32807‎ | r32808 | r32809 >
Date:11:34, 5 April 2008
Author:btongminh
Status:old
Tags:
Comment:
Fix typos
Modified paths:
  • /branches/ApiEdit_Vodafone/includes/api/ApiDelete.php (modified) (history)

Diff [purge]

Index: branches/ApiEdit_Vodafone/includes/api/ApiDelete.php
@@ -68,7 +68,7 @@
6969 $dbw->immediateBegin();
7070
7171 if ($titleObj->getNamespace() == NS_IMAGE) {
72 - $retval = self::deletefile($params['token'], $titleobj, $params['oldimage'], $reason, false);
 72+ $retval = self::deletefile($params['token'], $titleObj, $params['oldimage'], $reason, false);
7373 if(!empty($retval))
7474 // We don't care about multiple errors, just report one of them
7575 $this->dieUsageMsg(current($retval));
@@ -92,13 +92,13 @@
9393 $this->getResult()->addValue(null, $this->getModuleName(), $r);
9494 }
9595
96 - private static function getPermissionsError($title, $token) {
 96+ private static function getPermissionsError(&$title, $token) {
9797 global $wgUser;
9898 // Check wiki readonly
9999 if (wfReadOnly()) return array(array('readonlytext'));
100100
101101 // Check permissions
102 - $errors = $title->getUserPermissionsError('delete', $wgUser);
 102+ $errors = $title->getUserPermissionsErrors('delete', $wgUser);
103103 if (count($errors)) return $errors;
104104
105105 // Check token
@@ -137,7 +137,7 @@
138138
139139 public static function deleteFile($token, &$title, $oldimage, &$reason = NULL, $suppress = false)
140140 {
141 - $errors = self::getPermissionsError($article->getTitle(), $token);
 141+ $errors = self::getPermissionsError($title, $token);
142142 if (count(errors)) return $errors;
143143
144144 if( $oldimage && !FileDeleteForm::isValidOldSpec($oldimage) )

Status & tagging log