*
* Created on Sep 5, 2006
*
- * Copyright © 2006, 2010 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006, 2010 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Get the name of the module as shown in the profiler log
*
- * @param $db DatabaseBase
+ * @param $db DatabaseBase|bool
*
* @return string
*/
*/
protected function getWatchlistValue ( $watchlist, $titleObj, $userOption = null ) {
- $userWatching = $titleObj->userIsWatching();
+ $userWatching = $this->getUser()->isWatched( $titleObj );
switch ( $watchlist ) {
case 'watch':
* @param $errorCode string Brief, arbitrary, stable string to allow easy
* automated identification of the error, e.g., 'unknown_action'
* @param $httpRespCode int HTTP response code
- * @param $extradata array Data to add to the <error> element; array in ApiResult format
+ * @param $extradata array Data to add to the "<error>" element; array in ApiResult format
+ * @throws UsageException
*/
public function dieUsage( $description, $errorCode, $httpRespCode = 0, $extradata = null ) {
Profiler::instance()->close();
'specialpage-cantexecute' => array( 'code' => 'specialpage-cantexecute', 'info' => "You don't have permission to view the results of this special page" ),
'invalidoldimage' => array( 'code' => 'invalidoldimage', 'info' => 'The oldimage parameter has invalid format' ),
'nodeleteablefile' => array( 'code' => 'nodeleteablefile', 'info' => 'No such old version of the file' ),
+ 'fileexists-forbidden' => array( 'code' => 'fileexists-forbidden', 'info' => 'A file with name "$1" already exists, and cannot be overwritten.' ),
+ 'fileexists-shared-forbidden' => array( 'code' => 'fileexists-shared-forbidden', 'info' => 'A file with name "$1" already exists in the shared file repository, and cannot be overwritten.' ),
// ApiEditPage messages
'noimageredirect-anon' => array( 'code' => 'noimageredirect-anon', 'info' => "Anonymous users can't create image redirects" ),