parent::getAuth(); // load company!
//return true;
$au = $this->getAuthUser();
- //if (!$au) {
- // die("Access denied");
- // }
+
+ if (!$au) {
+ die("Access denied");
+ }
+
$this->authUser = $au;
return true;
}
- if(!$this->hasPerm($img)){
+ if(!$this->hasPermission($img)){
header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
- urlencode("image has been removed or deleted."));
+ urlencode("access to this image/file has been denied."));
}
$this->serve($img);
exit;
}
+ function hasPermission($img)
+ {
+ return true;
+ }
function post()
{
return true;
}
- // DEFAULT allowed - override with $cfg['sizes'];
+ // DEFAULT allowed - override with Pman_Core_Images[sizes] => array();
$sizes = array(
'100',
// this should be configurable...
$ff = HTML_FlexyFramework::get();
+
+
$cfg = isset($ff->Pman_Images) ? $ff->Pman_Images :
(isset($ff->Pman_Core_Images) ? $ff->Pman_Core_Images : array());
if (!in_array($this->size, $sizes)) {
+ print_r($sizes);
die("invalid scale - ".$this->size);
}
}