projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1007a3d
)
Fix #5648 - New design for post release report
author
Edward
<edward@roojs.com>
Tue, 19 Feb 2019 10:18:41 +0000
(18:18 +0800)
committer
Edward
<edward@roojs.com>
Tue, 19 Feb 2019 10:18:41 +0000
(18:18 +0800)
Images.php
patch
|
blob
|
history
Mailer.php
patch
|
blob
|
history
diff --git
a/Images.php
b/Images.php
index
68cc362
..
3a4b741
100644
(file)
--- a/
Images.php
+++ b/
Images.php
@@
-44,6
+44,8
@@
class Pman_Core_Images extends Pman
// tables that do not need authentication checks before serving.
var $public_image_tables = array();
// tables that do not need authentication checks before serving.
var $public_image_tables = array();
+ var $is_email = false;
+
var $sizes = array(
'100',
'100x100',
var $sizes = array(
'100',
'100x100',
@@
-83,6
+85,10
@@
class Pman_Core_Images extends Pman
// return $this->post();
//}
// return $this->post();
//}
+ if(!empty($_REQUEST['is_email'])) {
+ $this->is_email = true;
+ }
+
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
$this->page = empty($_REQUEST['page']) ? false : (int) $_REQUEST['page'];
$this->as_mimetype = empty($_REQUEST['as']) ? '' : $_REQUEST['as'];
$this->page = empty($_REQUEST['page']) ? false : (int) $_REQUEST['page'];
@@
-184,6
+190,10
@@
class Pman_Core_Images extends Pman
if (!$this->authUser && !in_array($img->ontable,$this->public_image_tables)) {
if (!$this->authUser && !in_array($img->ontable,$this->public_image_tables)) {
+ if($this->is_email) {
+ return $this->serve($img);
+ }
+
if ($img->ontable != 'core_company') {
$this->imgErr("not-authenticated {$img->ontable}",$s);
}
if ($img->ontable != 'core_company') {
$this->imgErr("not-authenticated {$img->ontable}",$s);
}
diff --git
a/Mailer.php
b/Mailer.php
index
7da09a8
..
1211e4e
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-588,6
+588,7
@@
class Pman_Core_Mailer {
$real_url = str_replace(' ', '%20', $this->mapurl($url));
$a = new HTTP_Request($real_url);
$real_url = str_replace(' ', '%20', $this->mapurl($url));
$a = new HTTP_Request($real_url);
+ $a->addQueryString('is_email', 1);
$a->sendRequest();
$data = $a->getResponseBody();
$a->sendRequest();
$data = $a->getResponseBody();