diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/permissions.php | 2 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 1 | ||||
-rw-r--r-- | include/photo/photo_gd.php | 5 | ||||
-rw-r--r-- | include/photo/photo_imagick.php | 13 | ||||
-rw-r--r-- | include/photos.php | 4 | ||||
-rw-r--r-- | include/taxonomy.php | 3 |
6 files changed, 26 insertions, 2 deletions
diff --git a/include/permissions.php b/include/permissions.php index f97142fab..185d37b6a 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -46,7 +46,7 @@ function get_all_perms($uid, $observer_xchan, $internal_use = true) { // First find out what the channel owner declared permissions to be. - $channel_perm = \Zotlabs\Access\PermissionLimits::Get($uid,$perm_name); + $channel_perm = intval(\Zotlabs\Access\PermissionLimits::Get($uid,$perm_name)); if(! $channel_checked) { $r = q("select * from channel where channel_id = %d limit 1", 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'); diff --git a/include/taxonomy.php b/include/taxonomy.php index e8d33986f..46d95458c 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -312,7 +312,8 @@ function article_tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags function pubtagblock($net,$site,$limit,$recent = 0,$safemode = 1, $type = TERM_HASHTAG) { $o = ''; - $r = pub_tagadelic($net,$site,$limit,$since,$safemode,$type); + $r = pub_tagadelic($net,$site,$limit,$recent,$safemode,$type); + $link = z_root() . '/pubstream'; if($r) { |