//if (!empty($_GET['_post'])) {
// return $this->post();
//}
-
+
$this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
}
if (strpos($id,':') > 0) { // id format tablename:id:-imgtype
-
+ //DB_DataObject::debugLevel(1);
if (!$this->authUser) {
$this->imgErr("not-authenticated-using-colon-format",$s);
}
$img->limit(1);
if (!$img->find(true)) {
+ die("HERE");
$this->imgErr("no images for that item: " . htmlspecialchars($id),$s);
}
$img = DB_DataObjecT::factory('Images');
- if (!$id || !$img->get($id)) {
+ if (!$id || !$img->get($id) || !$img->exists()) {
$this->imgErr("image has been removed or deleted.",$s);
}
function serve($img)
{
$this->sessionState(0); // turn off session... - locking...
-
require_once 'File/Convert.php';
if (!file_exists($img->getStoreName())) {
// print_r($img);exit;