http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95059
Revision: 95059
Author: reedy
Date: 2011-08-19 23:30:12 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
Couple more pieces of wikia upstreaming
Modified Paths:
--------------
trunk/phase3/includes/ChangesFeed.php
trunk/phase3/includes/FileDeleteForm.php
Modified: trunk/phase3/includes/ChangesFeed.php
===================================================================
--- trunk/phase3/includes/ChangesFeed.php 2011-08-19 23:21:34 UTC (rev
95058)
+++ trunk/phase3/includes/ChangesFeed.php 2011-08-19 23:30:12 UTC (rev
95059)
@@ -34,6 +34,11 @@
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 );
Modified: trunk/phase3/includes/FileDeleteForm.php
===================================================================
--- trunk/phase3/includes/FileDeleteForm.php 2011-08-19 23:21:34 UTC (rev
95058)
+++ trunk/phase3/includes/FileDeleteForm.php 2011-08-19 23:30:12 UTC (rev
95059)
@@ -37,7 +37,7 @@
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 @@
$status = self::doDelete( $this->title, $this->file,
$this->oldimage, $reason, $suppress );
- if( !$status->isGood() )
+ if( !$status->isGood() ) {
+ $wgOut->addHTML( '<h2>' .
$this->prepareMessage( 'filedeleteerror-short' ) . "</h2>\n" );
+ $wgOut->addHTML( '<span class="error">' );
$wgOut->addWikiText( $status->getWikiText(
'filedeleteerror-short', 'filedeleteerror-long' ) );
+ $wgOut->addHTML( '</span>' );
+ }
if( $status->ok ) {
$wgOut->setPagetitle( wfMsg( 'actioncomplete' )
);
$wgOut->addHTML( $this->prepareMessage(
'filedelete-success' ) );
@@ -141,7 +145,7 @@
throw $e;
}
}
- if( $status->isGood() )
+ if( $status->isGood() )
wfRunHooks('FileDeleteComplete', array( &$file,
&$oldimage, &$article, &$wgUser, &$reason));
return $status;
@@ -193,7 +197,7 @@
"</td>
</tr>
{$suppress}";
- if( $wgUser->isLoggedIn() ) {
+ if( $wgUser->isLoggedIn() ) {
$form .= "
<tr>
<td></td>
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs