projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b72b310
)
Changed Images.php
author
Alan
<alan@roojs.com>
Wed, 4 Jan 2023 07:56:11 +0000
(15:56 +0800)
committer
Alan
<alan@roojs.com>
Wed, 4 Jan 2023 07:56:11 +0000
(15:56 +0800)
Images.php
patch
|
blob
|
history
diff --git
a/Images.php
b/Images.php
index
92e40db
..
ce7bb26
100644
(file)
--- a/
Images.php
+++ b/
Images.php
@@
-85,6
+85,8
@@
class Pman_Core_Images extends Pman
//if (!empty($_GET['_post'])) {
// return $this->post();
//}
//if (!empty($_GET['_post'])) {
// return $this->post();
//}
+
+ //DB_DataObject::debugLevel(1);
$this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
$this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
@@
-150,6
+152,7
@@
class Pman_Core_Images extends Pman
}
$img->limit(1);
if (!$img->find(true)) {
}
$img->limit(1);
if (!$img->find(true)) {
+
$this->imgErr("no images for that item: " . htmlspecialchars($id),$s);
}
$this->imgErr("no images for that item: " . htmlspecialchars($id),$s);
}
@@
-217,6
+220,7
@@
class Pman_Core_Images extends Pman
}
function imgErr($reason,$path) {
}
function imgErr($reason,$path) {
+
header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
urlencode($reason) .'&path='.urlencode($path));
exit;
header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
urlencode($reason) .'&path='.urlencode($path));
exit;
@@
-300,6
+304,8
@@
class Pman_Core_Images extends Pman
$x->serveOnly($this->method);
exit;
}
$x->serveOnly($this->method);
exit;
}
+ $x->debug=1;
+
$x->convert( $this->as_mimetype);
$x->serve($this->method);
exit;
$x->convert( $this->as_mimetype);
$x->serve($this->method);
exit;