diff --git a/core/ext/view.ext.php b/core/ext/view.ext.php index f32a2973..41c352dd 100644 --- a/core/ext/view.ext.php +++ b/core/ext/view.ext.php @@ -98,8 +98,10 @@ class ViewImage extends Extension { } private function build_info($image) { + global $user; $owner = $image->get_owner(); $h_owner = html_escape($owner->name); + $h_ip = html_escape($image->owner_ip); $i_owner_id = int_escape($owner->id); $html = ""; @@ -108,6 +110,9 @@ class ViewImage extends Extension { $html .= "
Link: "; } $html .= "
Uploaded by $h_owner"; + if($user->is_admin()) { + $html .= " ($h_ip)"; + } $html .= "
".$this->build_pin($image->id); return $html; diff --git a/core/image.class.php b/core/image.class.php index 2ea62bc4..ee2ef8a6 100644 --- a/core/image.class.php +++ b/core/image.class.php @@ -5,6 +5,7 @@ class Image { var $height, $width; var $hash, $filesize; var $filename, $ext; + var $owner_ip; var $posted; public function Image($a=false, $b=false, $c=false) { @@ -19,6 +20,7 @@ class Image { private function create_from_row($row) { $this->id = $row['id']; $this->owner_id = $row['owner_id']; + $this->owner_ip = $row['owner_ip']; $this->filename = $row['filename']; $this->filesize = $row['filesize']; $this->hash = $row['hash'];