* EOL ws clean on ApiBase.php
* Use an actual value for ApiUpload.php * Commit some code I must've missed for r64852
This commit is contained in:
parent
5767c6bc8d
commit
e90d1ecd97
3 changed files with 4 additions and 12 deletions
|
|
@ -551,7 +551,7 @@ abstract class ApiBase {
|
|||
|
||||
case 'preferences':
|
||||
global $wgUser;
|
||||
if ( isset($titleObj) && !$titleObj->userIsWatching() ) {
|
||||
if ( isset($titleObj) && !$titleObj->userIsWatching() ) {
|
||||
if ( $titleObj->exists() ) {
|
||||
if ( $wgUser->getOption( 'watchdefault' ) ) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -81,16 +81,8 @@ class ApiUndelete extends ApiBase {
|
|||
wfRunHooks( 'FileUndeleteComplete',
|
||||
array( $titleObj, array(), $wgUser, $params['reason'] ) );
|
||||
}
|
||||
|
||||
$watch = $this->getWatchlistValue( $params['watchlist'], $titleObj );
|
||||
|
||||
if ( $watch !== null ) {
|
||||
if ( $watch ) {
|
||||
$wgUser->addWatch( $titleObj );
|
||||
} else {
|
||||
$wgUser->removeWatch( $titleObj );
|
||||
}
|
||||
}
|
||||
|
||||
$this->setWatch( $params['watchlist'], $titleObj );
|
||||
|
||||
$info['title'] = $titleObj->getPrefixedText();
|
||||
$info['revisions'] = intval( $retval[0] );
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ class ApiUpload extends ApiBase {
|
|||
}
|
||||
|
||||
$file = $this->mUpload->getLocalFile();
|
||||
$watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() );
|
||||
$watch = $this->getWatchlistValue( $this->mParams['watchlist'], $file->getTitle() );
|
||||
|
||||
// Deprecated parameters
|
||||
if ( $this->mParams['watch'] ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue