No need to check if $row->rev_id is set
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 13 Apr 2008 20:02:50 +0000 (20:02 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 13 Apr 2008 20:02:50 +0000 (20:02 +0000)
includes/SpecialNewpages.php

index 8fe496d..ea1d3d8 100644 (file)
@@ -270,13 +270,11 @@ class NewPagesForm {
        }
        
        protected function feedItemDesc( $row ) {
-               if( isset( $row->rev_id ) ) {
-                       $revision = Revision::newFromId( $row->rev_id );
-                       if( $revision ) {
-                               return '<p>' . htmlspecialchars( wfMsg( 'summary' ) ) . ': ' .
-                                       htmlspecialchars( $revision->getComment() ) . "</p>\n<hr />\n<div>" .
-                                       nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
-                       }
+               $revision = Revision::newFromId( $row->rev_id );
+               if( $revision ) {
+                       return '<p>' . htmlspecialchars( wfMsg( 'summary' ) ) . ': ' .
+                               htmlspecialchars( $revision->getComment() ) . "</p>\n<hr />\n<div>" .
+                               nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
                }
                return '';
        }