* (bug 14140) URL-encoded page titles are now decoded in edit summaries
* (bug 14243) Only accept post requests in action=edit; patch by HardDisk
* action=block now returns an ISO8601 timestamp, like all other modules do
+* Added md5 parameter to action=edit
=== Languages updated in 1.13 ===
'wasdeleted' => array('code' => 'pagedeleted', 'info' => "The page has been deleted since you fetched its timestamp"),
'blankpage' => array('code' => 'emptypage', 'info' => "Creating new, empty pages is not allowed"),
'editconflict' => array('code' => 'editconflict', 'info' => "Edit conflict detected"),
+ 'hashcheckfailed' => array('code' => 'badmd5', 'info' => "The supplied MD5 hash was incorrect"),
);
/**
if(!empty($errors))
$this->dieUsageMsg($errors[0]);
+ # See if the MD5 hash checks out
+ if(isset($params['md5']))
+ if(md5($params['text']) !== $params['md5'])
+ $this->dieUsageMsg(array('hashcheckfailed'));
+
$articleObj = new Article($titleObj);
$ep = new EditPage($articleObj);
'captchaid' => null,
'watch' => false,
'unwatch' => false,
+ 'md5' => null,
);
}
'unwatch' => 'Remove the page from your watchlist',
'captchaid' => 'CAPTCHA ID from previous request',
'captchaword' => 'Answer to the CAPTCHA',
+ 'md5' => 'The MD5 hash of the new article text. If set, the edit won\'t be done unless the hash is correct',
);
}