From: OverlordQ Date: Thu, 23 Sep 2010 02:59:07 +0000 (+0000) Subject: Fix regression caused by r62087 which failed to insert rows into the image table... X-Git-Tag: 1.31.0-rc.0~34823 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=170b0536a8e44a3579af11a1397875e16273c41d;p=lhc%2Fweb%2Fwiklou.git Fix regression caused by r62087 which failed to insert rows into the image table due to null comment. Also correct indefinite/infinite/infinity protection. --- diff --git a/includes/Article.php b/includes/Article.php index e02ca66a42..300c256a09 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2607,7 +2607,7 @@ class Article { $protect_description = ''; foreach ( $limit as $action => $restrictions ) { if ( !isset( $expiry[$action] ) ) - $expiry[$action] = 'infinite'; + $expiry[$action] = Block::infinity(); $encodedExpiry[$action] = Block::encodeExpiry( $expiry[$action], $dbw ); if ( $restrictions != '' ) { diff --git a/maintenance/importImages.php b/maintenance/importImages.php index 20597eb387..4712325f9d 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -186,7 +186,7 @@ if ( isset( $options['protect'] ) && $options['protect'] == 1 ) } if ( !$commentText ) { - $commentText = $comment; + $commentText = $comment ? $comment : 'Importing image file'; } }