aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Webfinger.php28
-rw-r--r--include/photo/photo_driver.php1
-rw-r--r--include/photo/photo_gd.php5
-rw-r--r--include/photo/photo_imagick.php13
-rw-r--r--include/photos.php4
5 files changed, 28 insertions, 23 deletions
diff --git a/Zotlabs/Module/Webfinger.php b/Zotlabs/Module/Webfinger.php
index c50680de7..0dafae23c 100644
--- a/Zotlabs/Module/Webfinger.php
+++ b/Zotlabs/Module/Webfinger.php
@@ -17,33 +17,15 @@ class Webfinger extends \Zotlabs\Web\Controller {
$o .= '<br /><br />';
- $old = false;
if(x($_GET,'addr')) {
$addr = trim($_GET['addr']);
- // if(strpos($addr,'@') !== false) {
- $res = webfinger_rfc7033($addr,true);
- if(! $res) {
- $res = old_webfinger($addr);
- $old = true;
- }
- // }
- // else {
- // if(function_exists('lrdd'))
- // $res = lrdd($addr);
- // }
-
- if($res && $old) {
- foreach($res as $r) {
- if($r['@attributes']['rel'] === 'http://microformats.org/profile/hcard') {
- $hcard = unamp($r['@attributes']['href']);
- require_once('library/HTML5/Parser.php');
- $res['vcard'] = scrape_vcard($hcard);
- break;
- }
- }
+
+ $res = webfinger_rfc7033($addr,true);
+ if(! $res) {
+ $res = old_webfinger($addr);
}
-
+
$o .= '<pre>';
$o .= str_replace("\n",'<br />',print_r($res,true));
$o .= '</pre>';
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 22d2b776d..2e2f5a758 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -75,6 +75,7 @@ abstract class photo_driver {
abstract function imageString();
+ abstract function clearexif();
public function __construct($data, $type='') {
$this->types = $this->supportedTypes();
diff --git a/include/photo/photo_gd.php b/include/photo/photo_gd.php
index 24bdc204f..e98ac2827 100644
--- a/include/photo/photo_gd.php
+++ b/include/photo/photo_gd.php
@@ -35,6 +35,11 @@ class photo_gd extends photo_driver {
}
+ public function clearexif() {
+ return;
+ }
+
+
public function destroy() {
if($this->is_valid()) {
imagedestroy($this->image);
diff --git a/include/photo/photo_imagick.php b/include/photo/photo_imagick.php
index 32bb61342..89577e71e 100644
--- a/include/photo/photo_imagick.php
+++ b/include/photo/photo_imagick.php
@@ -96,6 +96,19 @@ class photo_imagick extends photo_driver {
}
+ public function clearexif() {
+
+ $profiles = $this->image->getImageProfiles("icc", true);
+
+ $this->image->stripImage();
+
+ if(!empty($profiles)) {
+ $this->image->profileImage("icc", $profiles['icc']);
+ }
+ }
+
+
+
public function getImage() {
if(!$this->is_valid())
return FALSE;
diff --git a/include/photos.php b/include/photos.php
index 321f7159c..9ae0e6874 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -211,6 +211,10 @@ function photo_upload($channel, $observer, $args) {
$ph->orient($exif);
}
+
+ $ph->clearexif();
+
+
@unlink($src);
$max_length = get_config('system','max_image_length');