From 170b0536a8e44a3579af11a1397875e16273c41d Mon Sep 17 00:00:00 2001 From: OverlordQ Date: Thu, 23 Sep 2010 02:59:07 +0000 Subject: [PATCH] Fix regression caused by r62087 which failed to insert rows into the image table due to null comment. Also correct indefinite/infinite/infinity protection. --- includes/Article.php | 2 +- maintenance/importImages.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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'; } } -- 2.20.1