From: Jens Frank Date: Sun, 22 Aug 2004 07:38:16 +0000 (+0000) Subject: BUG#175 Don't show confusing "* (Lschen) (Aktuell) 23:59, 31. Dez 1969 . . ( Byte... X-Git-Tag: 1.5.0alpha1~2259 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=2036e1a434cf28011306e259a61976a0afc0e288;p=lhc%2Fweb%2Fwiklou.git BUG#175 Don't show confusing "* (Lschen) (Aktuell) 23:59, 31. Dez 1969 . . ( Byte)" line if there is no entry in the database --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 9f0eab9758..fc63c881a4 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -76,20 +76,22 @@ class ImagePage extends Article { global $wgUser, $wgOut; $sk = $wgUser->getSkin(); - $s = $sk->beginImageHistoryList(); $line = $this->img->nextHistoryLine(); - $s .= $sk->imageHistoryLine( true, $line->img_timestamp, - $this->mTitle->getDBkey(), $line->img_user, - $line->img_user_text, $line->img_size, $line->img_description ); + if ( $line ) { + $s = $sk->beginImageHistoryList() . + $sk->imageHistoryLine( true, $line->img_timestamp, + $this->mTitle->getDBkey(), $line->img_user, + $line->img_user_text, $line->img_size, $line->img_description ); - while ( $line = $this->img->nextHistoryLine() ) { - $s .= $sk->imageHistoryLine( false, $line->img_timestamp, - $line->oi_archive_name, $line->img_user, - $line->img_user_text, $line->img_size, $line->img_description ); - } - $s .= $sk->endImageHistoryList(); + while ( $line = $this->img->nextHistoryLine() ) { + $s .= $sk->imageHistoryLine( false, $line->img_timestamp, + $line->oi_archive_name, $line->img_user, + $line->img_user_text, $line->img_size, $line->img_description ); + } + $s .= $sk->endImageHistoryList(); + } else { $s=""; } $wgOut->addHTML( $s ); }