From: Sam Reed Date: Fri, 19 Aug 2011 23:30:12 +0000 (+0000) Subject: Couple more pieces of wikia upstreaming X-Git-Tag: 1.31.0-rc.0~28153 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=ead951a4ad6782b21497c586e8b32fe7400c80c1;p=lhc%2Fweb%2Fwiklou.git Couple more pieces of wikia upstreaming --- diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index c4c4a8a1be..bcedf2f329 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -34,6 +34,11 @@ class ChangesFeed { return false; } + if( !array_key_exists( $this->format, $wgFeedClasses ) ) { + // falling back to atom + $this->format = 'atom'; + } + $feedTitle = "$wgSitename - {$title} [$wgLanguageCode]"; return new $wgFeedClasses[$this->format]( $feedTitle, htmlspecialchars( $description ), $url ); diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 515768ff7c..e2c95c2e0b 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -37,7 +37,7 @@ class FileDeleteForm { return; } $permission_errors = $this->title->getUserPermissionsErrors('delete', $wgUser); - if (count($permission_errors)>0) { + if ( count( $permission_errors ) > 0 ) { $wgOut->showPermissionsErrorPage( $permission_errors ); return; } @@ -74,8 +74,12 @@ class FileDeleteForm { $status = self::doDelete( $this->title, $this->file, $this->oldimage, $reason, $suppress ); - if( !$status->isGood() ) + if( !$status->isGood() ) { + $wgOut->addHTML( '

' . $this->prepareMessage( 'filedeleteerror-short' ) . "

\n" ); + $wgOut->addHTML( '' ); $wgOut->addWikiText( $status->getWikiText( 'filedeleteerror-short', 'filedeleteerror-long' ) ); + $wgOut->addHTML( '' ); + } if( $status->ok ) { $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); $wgOut->addHTML( $this->prepareMessage( 'filedelete-success' ) ); @@ -141,7 +145,7 @@ class FileDeleteForm { throw $e; } } - if( $status->isGood() ) + if( $status->isGood() ) wfRunHooks('FileDeleteComplete', array( &$file, &$oldimage, &$article, &$wgUser, &$reason)); return $status; @@ -193,7 +197,7 @@ class FileDeleteForm { " {$suppress}"; - if( $wgUser->isLoggedIn() ) { + if( $wgUser->isLoggedIn() ) { $form .= "