* @param array $params All supplied parameters for the module
* @return bool
*/
- public final function validateToken( $token, array $params ) {
+ final public function validateToken( $token, array $params ) {
$tokenType = $this->needsToken();
$salts = ApiQueryTokens::getTokenTypeSalts();
if ( !isset( $salts[$tokenType] ) ) {
'code' => 'missingtitle',
'info' => "The article you tried to edit doesn't exist"
),
+ 'cantchangecontentmodel' => array(
+ 'code' => 'cantchangecontentmodel',
+ 'info' => "You don't have permission to change the content model of a page"
+ ),
'nosuchrcid' => array(
'code' => 'nosuchrcid',
'info' => "There is no change with rcid \"\$1\""
' "' . wfUrlencode( str_replace( ' ', '_', $this->getUser()->getName() ) ) . '"' .
' "' . $request->getIP() . '"' .
' "' . addslashes( $request->getHeader( 'Referer' ) ) . '"' .
- ' "' . addslashes( $request->getHeader( 'User-agent' ) ) . '"';
+ ' "' . addslashes( $this->getMain()->getUserAgent() ) . '"';
wfDebugLog( 'api-feature-usage', $s, 'private' );
}