Mass convert NULL -> null. Left strings and comments alone, obviously.
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index 267df2a..ebfaf3e 100644 (file)
@@ -70,7 +70,7 @@ class ApiDelete extends ApiBase {
                if(!$titleObj->exists())
                        $this->dieUsageMsg(array('notanarticle'));
 
-               $reason = (isset($params['reason']) ? $params['reason'] : NULL);
+               $reason = (isset($params['reason']) ? $params['reason'] : null);
                if ($titleObj->getNamespace() == NS_FILE) {
                        $retval = self::deleteFile($params['token'], $titleObj, $params['oldimage'], $reason, false);
                        if(count($retval))
@@ -115,7 +115,7 @@ class ApiDelete extends ApiBase {
         * @param string $reason - Reason for the deletion. Autogenerated if NULL
         * @return Title::getUserPermissionsErrors()-like array
         */
-       public static function delete(&$article, $token, &$reason = NULL)
+       public static function delete(&$article, $token, &$reason = null)
        {
                global $wgUser;
                if($article->isBigDeletion() && !$wgUser->isAllowed('bigdelete')) {
@@ -149,7 +149,7 @@ class ApiDelete extends ApiBase {
                return array(array('cannotdelete', $article->mTitle->getPrefixedText()));
        }
 
-       public static function deleteFile($token, &$title, $oldimage, &$reason = NULL, $suppress = false)
+       public static function deleteFile($token, &$title, $oldimage, &$reason = null, $suppress = false)
        {
                $errors = self::getPermissionsError($title, $token);
                if (count($errors)) return $errors;