From 10a8fe28e6d88dccf2ae168edec51055d1b7079d Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 13 Apr 2011 20:57:41 +1000 Subject: non-image uploads --- inc/display.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'inc/display.php') diff --git a/inc/display.php b/inc/display.php index b6722348..9ba5cac6 100644 --- a/inc/display.php +++ b/inc/display.php @@ -259,14 +259,16 @@ if(!empty($this->file) && $this->file != 'deleted') { $built .= '

File: ' . $this->file . ' (' . // Filesize - format_bytes($this->filesize) . ', ' . + format_bytes($this->filesize) . // File dimensions - $this->filex . 'x' . $this->filey; + ($this->filex && $this->filey ? + ', ' . $this->filex . 'x' . $this->filey + : '' ); // Aspect Ratio - if($config['show_ratio']) { - $fraction = fraction($this->filex, $this->filey, ':'); - $built .= ', ' . $fraction; - } + if($config['show_ratio'] && $this->filex && $this->filey) { + $fraction = fraction($this->filex, $this->filey, ':'); + $built .= ', ' . $fraction; + } // Filename $built .= ', ' . $this->filename . ')

' . @@ -377,11 +379,13 @@ $built = '

File: ' . $this->file . ' (' . // Filesize - format_bytes($this->filesize) . ', ' . + format_bytes($this->filesize) . // File dimensions - $this->filex . 'x' . $this->filey; + ($this->filex && $this->filey ? + ', ' . $this->filex . 'x' . $this->filey + : '' ); // Aspect Ratio - if($config['show_ratio']) { + if($config['show_ratio'] && $this->filex && $this->filey) { $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } -- cgit v1.3