Skip to content
Permalink
Browse files

Handle the possibility of having no videos more grecefully.

This adds a new translatable string ("No videos") that will be shown
when there are no videos to be shown in a video folder.
  • Loading branch information
nriendeau committed Dec 4, 2012
1 parent a6aed28 commit 12ded899d73169a917127cef691ecd23d27916c3
Showing with 8 additions and 1 deletion.
  1. +8 −1 modules/video/tmpl/default/video.php
@@ -288,7 +288,14 @@ function reload() {
</form>
</td>
<td style="text-align: right;">
<?php echo tn('$1 video', '$1 videos', count($All_Videos)); ?>
<?php
$video_count = count($All_Videos);
if( $video_count ) {
echo tn('$1 video', '$1 videos', $video_count);
} else {
echo t('No videos');
}
?>
</td>
</tr>
</table>

0 comments on commit 12ded89

Please sign in to comment.
You can’t perform that action at this time.