X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Images.php;h=68cc36273600ee5f9ed3f4a5167066203c61ccff;hb=692861c958898f425cc365906c092559d7cfc60c;hp=54984b97edb54da70753c1d383f62d6f23fe5728;hpb=1b6b6c74f42dd2bab99c93dac29cb731b1698fca;p=Pman.Core diff --git a/Images.php b/Images.php index 54984b97..68cc3627 100644 --- a/Images.php +++ b/Images.php @@ -176,8 +176,6 @@ class Pman_Core_Images extends Pman } - - $img = DB_DataObjecT::factory('Images'); if (!$id || !$img->get($id)) { @@ -196,15 +194,13 @@ class Pman_Core_Images extends Pman if ($comp->comptype != 'OWNER') { $this->imgErr("not-owner-company",$s); } + return $this->serve($img); - } - if(!$this->hasPermission($img)){ $this->imgErr("access to this image/file has been denied.",$s); - } $this->serve($img); @@ -465,7 +461,8 @@ class Pman_Core_Images extends Pman $id = $umatch[2]; $hash = ''; if (!empty($umatch[3]) && strpos($umatch[3],'#')) { - $hash = '#'. array_pop(explode('#',$umatch[3])); + $hh = explode('#',$umatch[3]); + $hash = '#'. array_pop($hh); }