aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-01 00:16:02 -0800
committerfriendica <info@friendica.com>2013-12-01 00:16:02 -0800
commitbd33e0486d992eb8904f84862c052ee2f9d01d55 (patch)
treea18ecaf9af910d62b310307829da068e37a1321a /include/photo
parent3163731a3d5705dcdd5373c197f7ab9257d9cf17 (diff)
downloadvolse-hubzilla-bd33e0486d992eb8904f84862c052ee2f9d01d55.tar.gz
volse-hubzilla-bd33e0486d992eb8904f84862c052ee2f9d01d55.tar.bz2
volse-hubzilla-bd33e0486d992eb8904f84862c052ee2f9d01d55.zip
deprecate a->get_curl_code() and $a->get_curl_headers()
Diffstat (limited to 'include/photo')
-rw-r--r--include/photo/photo_driver.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 38210ba26..ba95266f9 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -473,19 +473,19 @@ abstract class photo_driver {
* @arg $fromcurl boolean Check Content-Type header from curl request
*/
-function guess_image_type($filename, $fromcurl=false) {
+function guess_image_type($filename, $headers = '') {
logger('Photo: guess_image_type: '.$filename . ($fromcurl?' from curl headers':''), LOGGER_DEBUG);
$type = null;
- if ($fromcurl) {
+ if ($headers) {
$a = get_app();
- $headers=array();
- $h = explode("\n",$a->get_curl_headers());
+ $hdrs=array();
+ $h = explode("\n",$headers);
foreach ($h as $l) {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
- $headers[$k] = $v;
+ $hdrs[$k] = $v;
}
- if (array_key_exists('Content-Type', $headers))
- $type = $headers['Content-Type'];
+ if (array_key_exists('Content-Type', $hdrs))
+ $type = $hdrs['Content-Type'];
}
if (is_null($type)){
// FIXME!!!!