projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #12067 from michaelmcandrew/CRM-21576-sms-permission-extra
[civicrm-core.git]
/
CRM
/
Utils
/
File.php
diff --git
a/CRM/Utils/File.php
b/CRM/Utils/File.php
index b23cacf128c39ad5593a6e3d9e29f9edbb8fbeb6..4403bc6e319999476fb19e192f6646d1e872fa68 100644
(file)
--- a/
CRM/Utils/File.php
+++ b/
CRM/Utils/File.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version
4.7
|
+ | CiviCRM version
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
7
|
+ | Copyright CiviCRM LLC (c) 2004-201
8
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
7
+ * @copyright CiviCRM LLC (c) 2004-201
8
*/
/**
*/
/**
@@
-910,10
+910,16
@@
HTACCESS;
$imageURL = CRM_Utils_String::unstupifyUrl($imageURL);
parse_str(parse_url($imageURL, PHP_URL_QUERY), $query);
$imageURL = CRM_Utils_String::unstupifyUrl($imageURL);
parse_str(parse_url($imageURL, PHP_URL_QUERY), $query);
- $path = CRM_Core_Config::singleton()->customFileUploadDir . $query['photo'];
+ $url = NULL;
+ if (!empty($query['photo'])) {
+ $path = CRM_Core_Config::singleton()->customFileUploadDir . $query['photo'];
+ }
+ else {
+ $path = $url = $imageURL;
+ }
$mimeType = 'image/' . strtolower(pathinfo($path, PATHINFO_EXTENSION));
$mimeType = 'image/' . strtolower(pathinfo($path, PATHINFO_EXTENSION));
- return self::getFileURL($path, $mimeType);
+ return self::getFileURL($path, $mimeType
, $url
);
}
/**
}
/**