From 8465ad6e1e2a59474a19a8ab9eebd675b0d86b34 Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Sat, 21 Apr 2012 00:22:48 +0530 Subject: Few more files with unnecessary executable permissions --- include/security.php | 0 view/theme/diabook-aerith/ch_directory_item.tpl | 0 view/theme/diabook-aerith/directory_item.tpl | 0 view/theme/diabook-aerith/group_side.tpl | 0 view/theme/diabook-aerith/icons/block.png | Bin view/theme/diabook-blue/ch_directory_item.tpl | 0 view/theme/diabook-blue/directory_item.tpl | 0 view/theme/diabook-blue/group_side.tpl | 0 view/theme/diabook-blue/icons/block.png | Bin view/theme/diabook-red/ch_directory_item.tpl | 0 view/theme/diabook-red/directory_item.tpl | 0 view/theme/diabook-red/group_side.tpl | 0 view/theme/diabook-red/icons/block.png | Bin view/theme/diabook/ch_directory_item.tpl | 0 view/theme/diabook/communityhome.tpl | 0 view/theme/diabook/contact_template.tpl | 0 view/theme/diabook/diabook-aerith/ch_directory_item.tpl | 0 view/theme/diabook/diabook-aerith/directory_item.tpl | 0 view/theme/diabook/diabook-aerith/group_side.tpl | 0 view/theme/diabook/diabook-aerith/icons/block.png | Bin view/theme/diabook/diabook-blue/ch_directory_item.tpl | 0 view/theme/diabook/diabook-blue/directory_item.tpl | 0 view/theme/diabook/diabook-blue/group_side.tpl | 0 view/theme/diabook/diabook-blue/icons/block.png | Bin view/theme/diabook/diabook-green/ch_directory_item.tpl | 0 view/theme/diabook/diabook-green/directory_item.tpl | 0 view/theme/diabook/diabook-green/group_side.tpl | 0 view/theme/diabook/diabook-green/icons/block.png | Bin view/theme/diabook/diabook-green/icons/notifications3.png | Bin view/theme/diabook/diabook-green/icons/notify3.png | Bin view/theme/diabook/diabook-pink/ch_directory_item.tpl | 0 view/theme/diabook/diabook-pink/directory_item.tpl | 0 view/theme/diabook/diabook-pink/group_side.tpl | 0 view/theme/diabook/diabook-pink/icons/block.png | Bin view/theme/diabook/diabook-pink/icons/notifications3.png | Bin view/theme/diabook/diabook-pink/icons/notify3.png | Bin view/theme/diabook/diabook-red/ch_directory_item.tpl | 0 view/theme/diabook/diabook-red/directory_item.tpl | 0 view/theme/diabook/diabook-red/group_side.tpl | 0 view/theme/diabook/diabook-red/icons/block.png | Bin view/theme/diabook/directory_item.tpl | 0 view/theme/diabook/group_side.tpl | 0 view/theme/diabook/icons/attach.png | Bin view/theme/diabook/icons/audio.png | Bin view/theme/diabook/icons/block.png | Bin view/theme/diabook/icons/camera.png | Bin view/theme/diabook/icons/close_box.png | Bin view/theme/diabook/icons/contacts2.png | Bin view/theme/diabook/icons/drop.png | Bin view/theme/diabook/icons/expand.png | Bin view/theme/diabook/icons/file_as.png | Bin view/theme/diabook/icons/link.png | Bin view/theme/diabook/icons/lock.png | Bin view/theme/diabook/icons/lupe.png | Bin view/theme/diabook/icons/next.png | Bin view/theme/diabook/icons/notifications.png | Bin view/theme/diabook/icons/notifications3.png | Bin view/theme/diabook/icons/notify.png | Bin view/theme/diabook/icons/notify3.png | Bin view/theme/diabook/icons/pencil.png | Bin view/theme/diabook/icons/prev.png | Bin view/theme/diabook/icons/recycle.png | Bin view/theme/diabook/icons/remote.png | Bin view/theme/diabook/icons/scroll_top.png | Bin view/theme/diabook/icons/star.png | Bin view/theme/diabook/icons/starred.png | Bin view/theme/diabook/icons/tagged.png | Bin view/theme/diabook/icons/unlock.png | Bin view/theme/diabook/icons/unstarred.png | Bin view/theme/diabook/icons/video.png | Bin view/theme/diabook/icons/weblink.png | Bin view/theme/diabook/jot.tpl | 0 view/theme/diabook/mail_conv.tpl | 0 view/theme/diabook/search_item.tpl | 0 view/theme/diabook/theme.php | 0 75 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 include/security.php mode change 100755 => 100644 view/theme/diabook-aerith/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook-aerith/directory_item.tpl mode change 100755 => 100644 view/theme/diabook-aerith/group_side.tpl mode change 100755 => 100644 view/theme/diabook-aerith/icons/block.png mode change 100755 => 100644 view/theme/diabook-blue/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook-blue/directory_item.tpl mode change 100755 => 100644 view/theme/diabook-blue/group_side.tpl mode change 100755 => 100644 view/theme/diabook-blue/icons/block.png mode change 100755 => 100644 view/theme/diabook-red/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook-red/directory_item.tpl mode change 100755 => 100644 view/theme/diabook-red/group_side.tpl mode change 100755 => 100644 view/theme/diabook-red/icons/block.png mode change 100755 => 100644 view/theme/diabook/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/communityhome.tpl mode change 100755 => 100644 view/theme/diabook/contact_template.tpl mode change 100755 => 100644 view/theme/diabook/diabook-aerith/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-aerith/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-aerith/group_side.tpl mode change 100755 => 100644 view/theme/diabook/diabook-aerith/icons/block.png mode change 100755 => 100644 view/theme/diabook/diabook-blue/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-blue/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-blue/group_side.tpl mode change 100755 => 100644 view/theme/diabook/diabook-blue/icons/block.png mode change 100755 => 100644 view/theme/diabook/diabook-green/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-green/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-green/group_side.tpl mode change 100755 => 100644 view/theme/diabook/diabook-green/icons/block.png mode change 100755 => 100644 view/theme/diabook/diabook-green/icons/notifications3.png mode change 100755 => 100644 view/theme/diabook/diabook-green/icons/notify3.png mode change 100755 => 100644 view/theme/diabook/diabook-pink/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-pink/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-pink/group_side.tpl mode change 100755 => 100644 view/theme/diabook/diabook-pink/icons/block.png mode change 100755 => 100644 view/theme/diabook/diabook-pink/icons/notifications3.png mode change 100755 => 100644 view/theme/diabook/diabook-pink/icons/notify3.png mode change 100755 => 100644 view/theme/diabook/diabook-red/ch_directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-red/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/diabook-red/group_side.tpl mode change 100755 => 100644 view/theme/diabook/diabook-red/icons/block.png mode change 100755 => 100644 view/theme/diabook/directory_item.tpl mode change 100755 => 100644 view/theme/diabook/group_side.tpl mode change 100755 => 100644 view/theme/diabook/icons/attach.png mode change 100755 => 100644 view/theme/diabook/icons/audio.png mode change 100755 => 100644 view/theme/diabook/icons/block.png mode change 100755 => 100644 view/theme/diabook/icons/camera.png mode change 100755 => 100644 view/theme/diabook/icons/close_box.png mode change 100755 => 100644 view/theme/diabook/icons/contacts2.png mode change 100755 => 100644 view/theme/diabook/icons/drop.png mode change 100755 => 100644 view/theme/diabook/icons/expand.png mode change 100755 => 100644 view/theme/diabook/icons/file_as.png mode change 100755 => 100644 view/theme/diabook/icons/link.png mode change 100755 => 100644 view/theme/diabook/icons/lock.png mode change 100755 => 100644 view/theme/diabook/icons/lupe.png mode change 100755 => 100644 view/theme/diabook/icons/next.png mode change 100755 => 100644 view/theme/diabook/icons/notifications.png mode change 100755 => 100644 view/theme/diabook/icons/notifications3.png mode change 100755 => 100644 view/theme/diabook/icons/notify.png mode change 100755 => 100644 view/theme/diabook/icons/notify3.png mode change 100755 => 100644 view/theme/diabook/icons/pencil.png mode change 100755 => 100644 view/theme/diabook/icons/prev.png mode change 100755 => 100644 view/theme/diabook/icons/recycle.png mode change 100755 => 100644 view/theme/diabook/icons/remote.png mode change 100755 => 100644 view/theme/diabook/icons/scroll_top.png mode change 100755 => 100644 view/theme/diabook/icons/star.png mode change 100755 => 100644 view/theme/diabook/icons/starred.png mode change 100755 => 100644 view/theme/diabook/icons/tagged.png mode change 100755 => 100644 view/theme/diabook/icons/unlock.png mode change 100755 => 100644 view/theme/diabook/icons/unstarred.png mode change 100755 => 100644 view/theme/diabook/icons/video.png mode change 100755 => 100644 view/theme/diabook/icons/weblink.png mode change 100755 => 100644 view/theme/diabook/jot.tpl mode change 100755 => 100644 view/theme/diabook/mail_conv.tpl mode change 100755 => 100644 view/theme/diabook/search_item.tpl mode change 100755 => 100644 view/theme/diabook/theme.php diff --git a/include/security.php b/include/security.php old mode 100755 new mode 100644 diff --git a/view/theme/diabook-aerith/ch_directory_item.tpl b/view/theme/diabook-aerith/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-aerith/directory_item.tpl b/view/theme/diabook-aerith/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-aerith/group_side.tpl b/view/theme/diabook-aerith/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-aerith/icons/block.png b/view/theme/diabook-aerith/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook-blue/ch_directory_item.tpl b/view/theme/diabook-blue/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-blue/directory_item.tpl b/view/theme/diabook-blue/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-blue/group_side.tpl b/view/theme/diabook-blue/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-blue/icons/block.png b/view/theme/diabook-blue/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook-red/ch_directory_item.tpl b/view/theme/diabook-red/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-red/directory_item.tpl b/view/theme/diabook-red/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-red/group_side.tpl b/view/theme/diabook-red/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook-red/icons/block.png b/view/theme/diabook-red/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/ch_directory_item.tpl b/view/theme/diabook/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/contact_template.tpl b/view/theme/diabook/contact_template.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-aerith/ch_directory_item.tpl b/view/theme/diabook/diabook-aerith/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-aerith/directory_item.tpl b/view/theme/diabook/diabook-aerith/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-aerith/group_side.tpl b/view/theme/diabook/diabook-aerith/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-aerith/icons/block.png b/view/theme/diabook/diabook-aerith/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-blue/ch_directory_item.tpl b/view/theme/diabook/diabook-blue/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-blue/directory_item.tpl b/view/theme/diabook/diabook-blue/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-blue/group_side.tpl b/view/theme/diabook/diabook-blue/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-blue/icons/block.png b/view/theme/diabook/diabook-blue/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/ch_directory_item.tpl b/view/theme/diabook/diabook-green/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/directory_item.tpl b/view/theme/diabook/diabook-green/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/group_side.tpl b/view/theme/diabook/diabook-green/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/icons/block.png b/view/theme/diabook/diabook-green/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/icons/notifications3.png b/view/theme/diabook/diabook-green/icons/notifications3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-green/icons/notify3.png b/view/theme/diabook/diabook-green/icons/notify3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/ch_directory_item.tpl b/view/theme/diabook/diabook-pink/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/directory_item.tpl b/view/theme/diabook/diabook-pink/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/group_side.tpl b/view/theme/diabook/diabook-pink/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/icons/block.png b/view/theme/diabook/diabook-pink/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/icons/notifications3.png b/view/theme/diabook/diabook-pink/icons/notifications3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-pink/icons/notify3.png b/view/theme/diabook/diabook-pink/icons/notify3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-red/ch_directory_item.tpl b/view/theme/diabook/diabook-red/ch_directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-red/directory_item.tpl b/view/theme/diabook/diabook-red/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-red/group_side.tpl b/view/theme/diabook/diabook-red/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/diabook-red/icons/block.png b/view/theme/diabook/diabook-red/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/directory_item.tpl b/view/theme/diabook/directory_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/group_side.tpl b/view/theme/diabook/group_side.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/attach.png b/view/theme/diabook/icons/attach.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/audio.png b/view/theme/diabook/icons/audio.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/block.png b/view/theme/diabook/icons/block.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/camera.png b/view/theme/diabook/icons/camera.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/close_box.png b/view/theme/diabook/icons/close_box.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/contacts2.png b/view/theme/diabook/icons/contacts2.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/drop.png b/view/theme/diabook/icons/drop.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/expand.png b/view/theme/diabook/icons/expand.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/file_as.png b/view/theme/diabook/icons/file_as.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/link.png b/view/theme/diabook/icons/link.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/lock.png b/view/theme/diabook/icons/lock.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/lupe.png b/view/theme/diabook/icons/lupe.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/next.png b/view/theme/diabook/icons/next.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/notifications.png b/view/theme/diabook/icons/notifications.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/notifications3.png b/view/theme/diabook/icons/notifications3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/notify.png b/view/theme/diabook/icons/notify.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/notify3.png b/view/theme/diabook/icons/notify3.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/pencil.png b/view/theme/diabook/icons/pencil.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/prev.png b/view/theme/diabook/icons/prev.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/recycle.png b/view/theme/diabook/icons/recycle.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/remote.png b/view/theme/diabook/icons/remote.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/scroll_top.png b/view/theme/diabook/icons/scroll_top.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/star.png b/view/theme/diabook/icons/star.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/starred.png b/view/theme/diabook/icons/starred.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/tagged.png b/view/theme/diabook/icons/tagged.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/unlock.png b/view/theme/diabook/icons/unlock.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/unstarred.png b/view/theme/diabook/icons/unstarred.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/video.png b/view/theme/diabook/icons/video.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/icons/weblink.png b/view/theme/diabook/icons/weblink.png old mode 100755 new mode 100644 diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/mail_conv.tpl b/view/theme/diabook/mail_conv.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/search_item.tpl b/view/theme/diabook/search_item.tpl old mode 100755 new mode 100644 diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php old mode 100755 new mode 100644 -- cgit v1.2.3 From 4499ce96a0c5fd7ca9feb2b9b5e62876155aa63e Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Sat, 21 Apr 2012 12:00:19 +0530 Subject: Executable permission missing on script --- util/run_xgettext.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 util/run_xgettext.sh diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 4fb996d9f783ccc9fd2f029615c6630d55435e87 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Fri, 6 Jul 2012 17:10:40 -0600 Subject: remove check for event description, since it's not required to create an event --- include/bb2diaspora.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 042177fd9..d0cb60302 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -346,7 +346,7 @@ function bb2diaspora($Text,$preserve_nl = false) { // If we found an event earlier, strip out all the event code and replace with a reformatted version. - if(x($ev,'desc') && x($ev,'start')) { + if(x($ev,'start')) { $sub = format_event_diaspora($ev); -- cgit v1.2.3 From 1b3d84422e27b5d1f728a4e4fedc8231e6e81453 Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Sat, 7 Jul 2012 16:17:26 +0530 Subject: orient function uses exif_read_data for which valid image types are only JPEG and TIFF as per the document [1]. When trying to upload an screenshot with png type I was getting message as *failed* even though image was uploading. So added a fix to check image type before calling orient function. Not sure if this is a proper fix but after this i'm not getting any error during file upload [1] http://au2.php.net/manual/en/function.exif-read-data.php --- mod/photos.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 624f0bdca..42cad42f9 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -740,7 +740,8 @@ function photos_post(&$a) { killme(); } - $ph->orient($src); + if($ph->getType() != 'image/png') + $ph->orient($src); @unlink($src); $max_length = get_config('system','max_image_length'); -- cgit v1.2.3 From 57635e768473d30c5d2bd390027c9c043b4f31b8 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Fri, 6 Jul 2012 17:09:23 -0600 Subject: add function to exclude embedded images when checking message length --- include/items.php | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 112 insertions(+), 4 deletions(-) diff --git a/include/items.php b/include/items.php index cf903ac13..2cd0e6107 100755 --- a/include/items.php +++ b/include/items.php @@ -278,7 +278,116 @@ function construct_activity_target($item) { } return ''; -} +} + +/* limit_body_size() + * + * The purpose of this function is to apply system message length limits to + * imported messages without including any embedded photos in the length + * + * How it works (other than when the body length is less than the max length at the outset): + * 1. When the text length without embedded images is less than the max length + * a. The while() loop does run, since there are embedded images + * b. + * + * 2. When the text length exceeds the max length before the first embedded image + * + * 3. When the text length exceeds the max length in between embedded images + * + * 4. When the text length exceeds the max length after the last embedded image + * + * 5. When there are no embedded images + */ +if(! function_exists('limit_body_size')) { +function limit_body_size($body) { + + logger('limit_body_size: start', LOGGER_DEBUG); + + $maxlen = get_max_import_size(); + + // If the length of the body, including the embedded images, is smaller + // than the maximum, then don't waste processing looking for the images + if($maxlen && (strlen($body) > $maxlen)) { + + logger('limit_body_size: the body length exceeds the limit', LOGGER_DEBUG); + + $img_pos = array(); + $max_pos = 0; + + $body_left = $body; + $cnt = 0; + $img_pos[$cnt] = array('start' => strpos($body_left, '[img]data:')); + while($img_pos[$cnt]['start'] !== false) { + + // We're assuming that at this point, every opening '[img]data:' tag has a closing [/img] tag + $img_pos[$cnt]['end'] = strpos(substr($body_left, $img_pos[$cnt]['start'], strlen($body_left) - $img_pos[$cnt]['start']), '[/img]'); + $img_pos[$cnt]['end'] += strlen('[/img]'); + $img_pos[$cnt]['end'] += $img_pos[$cnt]['start']; + + if(! $cnt) { + // This code should only run in the first loop + $textlen = $img_pos[$cnt]['start']; + if( ($maxlen - $textlen) <= 0 ) { + $maxpos = $maxlen; + $maxcnt = $cnt; + } + } + else { + $newlen = $img_pos[$cnt]['start'] - $img_pos[$cnt - 1]['end']; // The length between the last embedded image and the next + if( (! $max_pos) && (($maxlen - ($textlen + $newlen)) <= 0) ) { + // $max_pos should be 0 until the message text exceeds the limit. + // If the limit has already been set, don't set it again + $len_left = $maxlen - $textlen; + $maxpos = $img_pos[$cnt - 1]['end'] + $len_left; // We'll cut off the text at this position + $maxcnt = $cnt; + } + + $textlen += $newlen; + } + + $body_left = substr($body_left, $img_pos[$cnt]['end'], strlen($body_left) - $img_pos[$cnt]['end']); + $cnt++; + $img_pos[$cnt] = array('start' => strpos($body_left, '[img]data:') + $img_pos[$cnt - 1]['end']); + } + + logger('limit_body_size: the while loop ran ' . $cnt . ' times', LOGGER_DEBUG); + + if(! $cnt) { + // The while() loop never ran -- there are no embedded images + $maxpos = $maxlen; + $maxcnt = $cnt; + $textlen = strlen($body); + } + else { + // The while() loop did run. But the end of the last embedded image may not be the end of the body + // Check if the maximum length occurs between the end of the last embedded image and the end of the text + $newlen = strlen($body_left); + if( (! $max_pos) && (($maxlen - ($textlen + $newlen)) <= 0) ) { + $len_left = $maxlen - $textlen; + $maxpos = $img_pos[$cnt - 1]['end'] + $len_left; // We'll cut off the text at this position + $maxcnt = $cnt; + } + $textlen += $newlen; + } + + + if($textlen > $maxlen) { + $newbody = substr($body, 0, $maxpos); // Note: $maxpos is the position of the character AFTER the maximum length + + // Now pile all the remaining embedded images onto the end + for($i = $maxcnt; $i < $cnt; $i++) + $newbody = $newbody . substr($body, $img_pos[$i]['start'], $img_pos[$i]['end'] - $img_pos[$i]['start']); + + logger('limit_body_size: the text length (w/o embedded images) was ' . $textlen . ' and the limit was ' . $maxlen . '. Body truncated', LOGGER_DEBUG); + + return $newbody; + } + else // When embedded images are excluded, the text length is less than the maximum, so we're good + return $body; + } + else + return $body; +}} @@ -414,9 +523,8 @@ function get_atom_elements($feed,$item) { $res['body'] = notags(base64url_decode($res['body'])); } - $maxlen = get_max_import_size(); - if($maxlen && (strlen($res['body']) > $maxlen)) - $res['body'] = substr($res['body'],0, $maxlen); + + $res['body'] = limit_body_size($res['body']); // It isn't certain at this point whether our content is plaintext or html and we'd be foolish to trust // the content type. Our own network only emits text normally, though it might have been converted to -- cgit v1.2.3 From 173b3a1b9ad926937ec152e41756c5b63f6c5951 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 7 Jul 2012 16:20:24 -0600 Subject: allow more than one embedded private photo --- include/bbcode.php | 88 +++++++++++++++++----- include/conversation.php | 95 +++++++++++++++++++----- include/items.php | 189 +++++++++++++++++++++++++++-------------------- mod/message.php | 94 ++++++++++++++++++----- 4 files changed, 327 insertions(+), 139 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 55a879497..6a1c4b043 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -47,6 +47,67 @@ function bb_unspacefy_and_trim($st) { return $unspacefied; } +if(! function_exists('bb_extract_images')) { +function bb_extract_images($body) { + + $saved_image = array(); + $orig_body = $body; + $new_body = ''; + + $cnt = 0; + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + while(($img_st_close !== false) && ($img_end !== false)) { + + $img_st_close++; // make it point to AFTER the closing bracket + $img_end += $img_start; + + if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { + // This is an embedded image + + $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start); + $cnt++; + + $new_body = $new_body . substr($orig_body, 0, $img_start) . '[$#saved_image' . $cnt . '#$]'; + } + else + $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); + + $orig_body = substr($orig_body, $img_end + strlen('[/img]')); + + if($orig_body === false) // in case the body ends on a closing image tag + $orig_body = ''; + + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + } + + $new_body = $new_body . $orig_body; + + return array('body' => $new_body, 'images' => $saved_image); +}} + +if(! function_exists('bb_replace_images')) { +function bb_replace_images($body, $images) { + + $newbody = $body; + + $cnt = 0; + foreach($images as $image) { + // We're depending on the property of 'foreach' (specified on the PHP website) that + // it loops over the array starting from the first element and going sequentially + // to the last element + $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '' . t('Image/photo') . '', $newbody); + $cnt++; + } + + return $newbody; +}} + + + // BBcode 2 HTML was written by WAY2WEB.net // extended to work with Mistpark/Friendica - Mike Macgirvin @@ -54,29 +115,21 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $a = get_app(); - // Hide all [noparse] contained bbtags spacefying them + // Hide all [noparse] contained bbtags by spacefying them + // POSSIBLE BUG --> Will the 'preg' functions crash if there's an embedded image? $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text); $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_spacefy',$Text); $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text); - // Extract a single private image which uses data url's since preg has issues with - // large data sizes. Stash it away while we do bbcode conversion, and then put it back + // Extract the private images which use data url's since preg has issues with + // large data sizes. Stash them away while we do bbcode conversion, and then put them back // in after we've done all the regex matching. We cannot use any preg functions to do this. - $saved_image = ''; - $img_start = strpos($Text,'[img]data:'); - $img_end = strpos($Text,'[/img]'); - - if($img_start !== false && $img_end !== false && $img_end > $img_start) { - $start_fragment = substr($Text,0,$img_start); - $img_start += strlen('[img]'); - $saved_image = substr($Text,$img_start,$img_end - $img_start); - $end_fragment = substr($Text,$img_end + strlen('[/img]')); -// logger('saved_image: ' . $saved_image,LOGGER_DEBUG); - $Text = $start_fragment . '[$#saved_image#$]' . $end_fragment; - } + $extracted = bb_extract_images($Text); + $Text = $extracted['body']; + $saved_image = $extracted['images']; // If we find any event code, turn it into an event. // After we're finished processing the bbcode we'll @@ -333,8 +386,9 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // fix any escaped ampersands that may have been converted into links $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); - if(strlen($saved_image)) - $Text = str_replace('[$#saved_image#$]','' . t('Image/photo') . '',$Text); + + if($saved_image) + $Text = bb_replace_images($Text, $saved_image); call_hooks('bbcode',$Text); diff --git a/include/conversation.php b/include/conversation.php index bbb6a1f85..4fea52c9c 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1,30 +1,85 @@ $new_body, 'images' => $saved_image); +}} + +if(! function_exists('item_redir_and_replace_images')) { +function item_redir_and_replace_images($body, $images, $cid) { + + $newbody = $body; + + for($i = 0; $i < count($images); $i++) { + $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is'; + $replace = '[url=' . z_path() . '/redir/' . $cid + . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; + + $newbody = preg_replace($search, $replace, $newbody); + } + + $cnt = 0; + foreach($images as $image) { + // We're depending on the property of 'foreach' (specified on the PHP website) that + // it loops over the array starting from the first element and going sequentially + // to the last element + $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '[img]' . $image . '[/img]', $newbody); + $cnt++; + } + + return $newbody; +}} + + + /** * Render actions localized */ function localize_item(&$item){ - $Text = $item['body']; - $saved_image = ''; - $img_start = strpos($Text,'[img]data:'); - $img_end = strpos($Text,'[/img]'); - - if($img_start !== false && $img_end !== false && $img_end > $img_start) { - $start_fragment = substr($Text,0,$img_start); - $img_start += strlen('[img]'); - $saved_image = substr($Text,$img_start,$img_end - $img_start); - $end_fragment = substr($Text,$img_end + strlen('[/img]')); - $Text = $start_fragment . '[!#saved_image#!]' . $end_fragment; - $search = '/\[url\=(.*?)\]\[!#saved_image#!\]\[\/url\]' . '/is'; - $replace = '[url=' . z_path() . '/redir/' . $item['contact-id'] - . '?f=1&url=' . '$1' . '][!#saved_image#!][/url]' ; - - $Text = preg_replace($search,$replace,$Text); - - if(strlen($saved_image)) - $item['body'] = str_replace('[!#saved_image#!]', '[img]' . $saved_image . '[/img]',$Text); - } + $extracted = item_extract_images($item['body']); + if($extracted['images']) + $item['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $item['contact-id']); $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">"; if ($item['verb']=== ACTIVITY_LIKE || $item['verb']=== ACTIVITY_DISLIKE){ diff --git a/include/items.php b/include/items.php index 2cd0e6107..7bb33d943 100755 --- a/include/items.php +++ b/include/items.php @@ -4,6 +4,8 @@ require_once('include/bbcode.php'); require_once('include/oembed.php'); require_once('include/salmon.php'); require_once('include/crypto.php'); +require_once('include/Photo.php'); + function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { @@ -284,19 +286,6 @@ function construct_activity_target($item) { * * The purpose of this function is to apply system message length limits to * imported messages without including any embedded photos in the length - * - * How it works (other than when the body length is less than the max length at the outset): - * 1. When the text length without embedded images is less than the max length - * a. The while() loop does run, since there are embedded images - * b. - * - * 2. When the text length exceeds the max length before the first embedded image - * - * 3. When the text length exceeds the max length in between embedded images - * - * 4. When the text length exceeds the max length after the last embedded image - * - * 5. When there are no embedded images */ if(! function_exists('limit_body_size')) { function limit_body_size($body) { @@ -306,84 +295,80 @@ function limit_body_size($body) { $maxlen = get_max_import_size(); // If the length of the body, including the embedded images, is smaller - // than the maximum, then don't waste processing looking for the images + // than the maximum, then don't waste time looking for the images if($maxlen && (strlen($body) > $maxlen)) { - logger('limit_body_size: the body length exceeds the limit', LOGGER_DEBUG); + logger('limit_body_size: the total body length exceeds the limit', LOGGER_DEBUG); + + $orig_body = $body; + $new_body = ''; + $textlen = 0; + $max_found = false; - $img_pos = array(); - $max_pos = 0; + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + while(($img_st_close !== false) && ($img_end !== false)) { - $body_left = $body; - $cnt = 0; - $img_pos[$cnt] = array('start' => strpos($body_left, '[img]data:')); - while($img_pos[$cnt]['start'] !== false) { + $img_st_close++; // make it point to AFTER the closing bracket + $img_end += $img_start; + $img_end += strlen('[/img]'); - // We're assuming that at this point, every opening '[img]data:' tag has a closing [/img] tag - $img_pos[$cnt]['end'] = strpos(substr($body_left, $img_pos[$cnt]['start'], strlen($body_left) - $img_pos[$cnt]['start']), '[/img]'); - $img_pos[$cnt]['end'] += strlen('[/img]'); - $img_pos[$cnt]['end'] += $img_pos[$cnt]['start']; + if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { + // This is an embedded image - if(! $cnt) { - // This code should only run in the first loop - $textlen = $img_pos[$cnt]['start']; - if( ($maxlen - $textlen) <= 0 ) { - $maxpos = $maxlen; - $maxcnt = $cnt; + if( ($textlen + $img_start) > $maxlen ) { + if($textlen < $maxlen) { + logger('limit_body_size: the limit happens before an embedded image', LOGGER_DEBUG); + $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen); + $textlen = $maxlen; + } } + else { + $new_body = $new_body . substr($orig_body, 0, $img_start); + $textlen += $img_start + } + + $new_body = $new_body . substr($orig_body, $img_start, $img_end - $img_start); } else { - $newlen = $img_pos[$cnt]['start'] - $img_pos[$cnt - 1]['end']; // The length between the last embedded image and the next - if( (! $max_pos) && (($maxlen - ($textlen + $newlen)) <= 0) ) { - // $max_pos should be 0 until the message text exceeds the limit. - // If the limit has already been set, don't set it again - $len_left = $maxlen - $textlen; - $maxpos = $img_pos[$cnt - 1]['end'] + $len_left; // We'll cut off the text at this position - $maxcnt = $cnt; - } - $textlen += $newlen; + if( ($textlen + $img_end) > $maxlen ) { + if($textlen < $maxlen) { + logger('limit_body_size: the limit happens before the end of a non-embedded image', LOGGER_DEBUG); + $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen); + $textlen = $maxlen; + } + } + else { + $new_body = $new_body . substr($orig_body, 0, $img_end); + $textlen += $img_end; + } } + $orig_body = substr($orig_body, $img_end); - $body_left = substr($body_left, $img_pos[$cnt]['end'], strlen($body_left) - $img_pos[$cnt]['end']); - $cnt++; - $img_pos[$cnt] = array('start' => strpos($body_left, '[img]data:') + $img_pos[$cnt - 1]['end']); - } + if($orig_body === false) // in case the body ends on a closing image tag + $orig_body = ''; - logger('limit_body_size: the while loop ran ' . $cnt . ' times', LOGGER_DEBUG); + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + } - if(! $cnt) { - // The while() loop never ran -- there are no embedded images - $maxpos = $maxlen; - $maxcnt = $cnt; - $textlen = strlen($body); + if( ($textlen + strlen($orig_body)) > $maxlen) { + if($textlen < $maxlen) { + logger('limit_body_size: the limit happens after the end of the last image', LOGGER_DEBUG); + $new_body = $new_body . substr($orig_body, 0, $maxlen - $textlen); + $textlen = $maxlen; + } } else { - // The while() loop did run. But the end of the last embedded image may not be the end of the body - // Check if the maximum length occurs between the end of the last embedded image and the end of the text - $newlen = strlen($body_left); - if( (! $max_pos) && (($maxlen - ($textlen + $newlen)) <= 0) ) { - $len_left = $maxlen - $textlen; - $maxpos = $img_pos[$cnt - 1]['end'] + $len_left; // We'll cut off the text at this position - $maxcnt = $cnt; - } - $textlen += $newlen; + logger('limit_body_size: the text size with embedded images extracted did not violate the limit', LOGGER_DEBUG); + $new_body = $new_body . $orig_body; + $textlen += strlen($orig_body); } - - if($textlen > $maxlen) { - $newbody = substr($body, 0, $maxpos); // Note: $maxpos is the position of the character AFTER the maximum length - - // Now pile all the remaining embedded images onto the end - for($i = $maxcnt; $i < $cnt; $i++) - $newbody = $newbody . substr($body, $img_pos[$i]['start'], $img_pos[$i]['end'] - $img_pos[$i]['start']); - - logger('limit_body_size: the text length (w/o embedded images) was ' . $textlen . ' and the limit was ' . $maxlen . '. Body truncated', LOGGER_DEBUG); - - return $newbody; - } - else // When embedded images are excluded, the text length is less than the maximum, so we're good - return $body; + return $new_body; } else return $body; @@ -3196,20 +3181,33 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { return $o; } -function fix_private_photos($s,$uid, $item = null, $cid = 0) { +function fix_private_photos($s, $uid, $item = null, $cid = 0) { $a = get_app(); logger('fix_private_photos', LOGGER_DEBUG); $site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')); - if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/is",$s,$matches)) { - $image = $matches[2]; + $orig_body = $s; + $new_body = ''; + + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + while( ($img_st_close !== false) && ($img_len !== false) ) { + + $img_st_close++; // make it point to AFTER the closing bracket + $image = substr($orig_body, $img_start + $img_st_close, $img_len); + logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG); + + if(stristr($image , $site . '/photo/')) { + // Only embed locally hosted photos $replace = false; $i = basename($image); $i = str_replace(array('.jpg','.png'),array('',''),$i); $x = strpos($i,'-'); + if($x) { $res = substr($i,$x+1); $i = substr($i,0,$x); @@ -3228,9 +3226,6 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) { // permissions, regardless of order but first check to see if they're an exact // match to save some processing overhead. - // Currently we only embed one private photo per message so as not to hit import - // size limits at the receiving end. - // To embed multiples, we would need to parse out the embedded photos on message // receipt and limit size based only on the text component. Would also need to // ignore all photos during bbcode translation and item localisation, as these @@ -3249,15 +3244,45 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) { } } if($replace) { + $data = $r[0]['data']; + $type = $r[0]['type']; + + // If a custom width and height were specified, apply before embedding + if(preg_match("/\[img\=([0-9]*)x([0-9]*)\]/is", substr($orig_body, $img_start, $img_st_close), $match)) { + logger('fix_private_photos: scaling photo', LOGGER_DEBUG); + + $width = intval($match[1]); + $height = intval($match[2]); + + $ph = new Photo($data, $type); + if($ph->is_valid()) { + $ph->scaleImage(max($width, $height)); + $data = $ph->imageString(); + $type = $ph->getType(); + } + } + logger('fix_private_photos: replacing photo', LOGGER_DEBUG); - $s = str_replace($image, 'data:' . $r[0]['type'] . ';base64,' . base64_encode($r[0]['data']), $s); - logger('fix_private_photos: replaced: ' . $s, LOGGER_DATA); + $image = 'data:' . $type . ';base64,' . base64_encode($data); + logger('fix_private_photos: replaced: ' . $image, LOGGER_DATA); } } } } + + $new_body = $new_body . substr($orig_body, 0, $img_start + $img_st_close) . $image . '[/img]'; + $orig_body = substr($orig_body, $img_start + $img_st_close + $img_len + strlen('[/img]')); + if($orig_body === false) + $orig_body = ''; + + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); } - return($s); + + $new_body = $new_body + $orig_body; + + return($new_body); } diff --git a/mod/message.php b/mod/message.php index 80d2c6d99..4ffdebb12 100644 --- a/mod/message.php +++ b/mod/message.php @@ -88,6 +88,77 @@ function message_post(&$a) { } +// Note: the code in 'item_extract_images' and 'item_redir_and_replace_images' +// is identical to the code in include/conversation.php +if(! function_exists('item_extract_images')) { +function item_extract_images($body) { + + $saved_image = array(); + $orig_body = $body; + $new_body = ''; + + $cnt = 0; + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + while(($img_st_close !== false) && ($img_end !== false)) { + + $img_st_close++; // make it point to AFTER the closing bracket + $img_end += $img_start; + + if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { + // This is an embedded image + + $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start); + $cnt++; + + $new_body = $new_body . substr($orig_body, 0, $img_start) . '[!#saved_image' . $cnt . '#!]'; + } + else + $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); + + $orig_body = substr($orig_body, $img_end + strlen('[/img]')); + + if($orig_body === false) // in case the body ends on a closing image tag + $orig_body = ''; + + $img_start = strpos($orig_body, '[img'); + $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); + $img_end = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + } + + $new_body = $new_body . $orig_body; + + return array('body' => $new_body, 'images' => $saved_image); +}} + +if(! function_exists('item_redir_and_replace_images')) { +function item_redir_and_replace_images($body, $images, $cid) { + + $newbody = $body; + + for($i = 0; $i < count($images); $i++) { + $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is'; + $replace = '[url=' . z_path() . '/redir/' . $cid + . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; + + $newbody = preg_replace($search, $replace, $newbody); + } + + $cnt = 0; + foreach($images as $image) { + // We're depending on the property of 'foreach' (specified on the PHP website) that + // it loops over the array starting from the first element and going sequentially + // to the last element + $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '[img]' . $image . '[/img]', $newbody); + $cnt++; + } + + return $newbody; +}} + + + function message_content(&$a) { $o = ''; @@ -345,26 +416,9 @@ function message_content(&$a) { } - $Text = $message['body']; - $saved_image = ''; - $img_start = strpos($Text,'[img]data:'); - $img_end = strpos($Text,'[/img]'); - - if($img_start !== false && $img_end !== false && $img_end > $img_start) { - $start_fragment = substr($Text,0,$img_start); - $img_start += strlen('[img]'); - $saved_image = substr($Text,$img_start,$img_end - $img_start); - $end_fragment = substr($Text,$img_end + strlen('[/img]')); - $Text = $start_fragment . '[!#saved_image#!]' . $end_fragment; - $search = '/\[url\=(.*?)\]\[!#saved_image#!\]\[\/url\]' . '/is'; - $replace = '[url=' . z_path() . '/redir/' . $message['contact-id'] - . '?f=1&url=' . '$1' . '][!#saved_image#!][/url]' ; - - $Text = preg_replace($search,$replace,$Text); - - if(strlen($saved_image)) - $message['body'] = str_replace('[!#saved_image#!]', '[img]' . $saved_image . '[/img]',$Text); - } + $extracted = item_extract_images($message['body']); + if($extracted['images']) + $message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']); $mails[] = array( 'id' => $message['id'], -- cgit v1.2.3 From e94f7ed23d18e811e31cb4656a55b97f328534b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 7 Jul 2012 16:20:34 -0700 Subject: rev update --- boot.php | 2 +- util/messages.po | 434 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 222 insertions(+), 214 deletions(-) diff --git a/boot.php b/boot.php index effe23785..59dd68ff6 100644 --- a/boot.php +++ b/boot.php @@ -10,7 +10,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1395' ); +define ( 'FRIENDICA_VERSION', '3.0.1397' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1153 ); diff --git a/util/messages.po b/util/messages.po index c4a47cc25..a3d78e5ea 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 3.0.1395\n" +"Project-Id-Version: 3.0.1397\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-05 10:00-0700\n" +"POT-Creation-Date: 2012-07-07 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -56,7 +56,7 @@ msgstr "" #: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 #: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:510 #: ../../addon/facebook/facebook.php:516 ../../addon/dav/layout.fnk.php:353 -#: ../../include/items.php:3455 ../../index.php:309 +#: ../../include/items.php:3457 ../../index.php:309 msgid "Permission denied." msgstr "" @@ -86,7 +86,7 @@ msgid "Return to contact editor" msgstr "" #: ../../mod/crepair.php:148 ../../mod/settings.php:557 -#: ../../mod/settings.php:583 ../../mod/admin.php:659 ../../mod/admin.php:668 +#: ../../mod/settings.php:583 ../../mod/admin.php:661 ../../mod/admin.php:670 msgid "Name" msgstr "" @@ -131,8 +131,8 @@ msgstr "" #: ../../mod/contacts.php:343 ../../mod/settings.php:555 #: ../../mod/settings.php:709 ../../mod/settings.php:770 #: ../../mod/settings.php:971 ../../mod/group.php:85 ../../mod/message.php:216 -#: ../../mod/message.php:412 ../../mod/admin.php:420 ../../mod/admin.php:656 -#: ../../mod/admin.php:792 ../../mod/admin.php:991 ../../mod/admin.php:1078 +#: ../../mod/message.php:412 ../../mod/admin.php:422 ../../mod/admin.php:658 +#: ../../mod/admin.php:794 ../../mod/admin.php:993 ../../mod/admin.php:1080 #: ../../mod/profiles.php:569 ../../mod/invite.php:119 #: ../../addon/fromgplus/fromgplus.php:40 #: ../../addon/facebook/facebook.php:619 @@ -229,7 +229,7 @@ msgid "link to source" msgstr "" #: ../../mod/events.php:328 ../../view/theme/diabook/theme.php:131 -#: ../../include/nav.php:52 ../../boot.php:1577 +#: ../../include/nav.php:52 ../../boot.php:1595 msgid "Events" msgstr "" @@ -284,8 +284,8 @@ msgid "Description:" msgstr "" #: ../../mod/events.php:429 ../../mod/directory.php:132 -#: ../../include/event.php:40 ../../include/bb2diaspora.php:377 -#: ../../boot.php:1154 +#: ../../include/event.php:40 ../../include/bb2diaspora.php:409 +#: ../../boot.php:1172 msgid "Location:" msgstr "" @@ -366,7 +366,7 @@ msgstr "" msgid "No" msgstr "" -#: ../../mod/photos.php:46 ../../boot.php:1571 +#: ../../mod/photos.php:46 ../../boot.php:1589 msgid "Photo Albums" msgstr "" @@ -420,7 +420,7 @@ msgstr "" #: ../../mod/photos.php:591 ../../mod/like.php:144 ../../mod/tagger.php:70 #: ../../addon/communityhome/communityhome.php:163 #: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1321 -#: ../../include/diaspora.php:1710 ../../include/conversation.php:53 +#: ../../include/diaspora.php:1777 ../../include/conversation.php:53 #: ../../include/conversation.php:126 msgid "photo" msgstr "" @@ -590,7 +590,7 @@ msgstr "" #: ../../mod/photos.php:1348 ../../mod/photos.php:1388 #: ../../mod/photos.php:1419 ../../mod/content.php:690 -#: ../../include/conversation.php:579 ../../boot.php:546 +#: ../../include/conversation.php:579 ../../boot.php:564 msgid "Comment" msgstr "" @@ -602,7 +602,7 @@ msgstr "" #: ../../mod/photos.php:1447 ../../mod/content.php:439 #: ../../mod/content.php:720 ../../mod/settings.php:618 -#: ../../mod/settings.php:707 ../../mod/group.php:168 ../../mod/admin.php:663 +#: ../../mod/settings.php:707 ../../mod/group.php:168 ../../mod/admin.php:665 #: ../../include/conversation.php:328 ../../include/conversation.php:609 msgid "Delete" msgstr "" @@ -854,7 +854,7 @@ msgstr "" msgid "Confirm" msgstr "" -#: ../../mod/dfrn_request.php:715 ../../include/items.php:2881 +#: ../../mod/dfrn_request.php:715 ../../include/items.php:2883 msgid "[Name Withheld]" msgstr "" @@ -1180,7 +1180,7 @@ msgid "" msgstr "" #: ../../mod/localtime.php:12 ../../include/event.php:11 -#: ../../include/bb2diaspora.php:355 +#: ../../include/bb2diaspora.php:387 msgid "l F d, Y \\@ g:i A" msgstr "" @@ -1226,7 +1226,7 @@ msgid "is interested in:" msgstr "" #: ../../mod/match.php:58 ../../mod/suggest.php:59 -#: ../../include/contact_widgets.php:9 ../../boot.php:1098 +#: ../../include/contact_widgets.php:9 ../../boot.php:1116 msgid "Connect" msgstr "" @@ -1286,7 +1286,7 @@ msgstr[1] "" #: ../../mod/content.php:587 ../../addon/page/page.php:76 #: ../../addon/page/page.php:110 ../../addon/showmore/showmore.php:87 #: ../../include/contact_widgets.php:188 ../../include/conversation.php:476 -#: ../../boot.php:547 +#: ../../boot.php:565 msgid "show more" msgstr "" @@ -1455,7 +1455,7 @@ msgid "if applicable" msgstr "" #: ../../mod/notifications.php:157 ../../mod/notifications.php:204 -#: ../../mod/admin.php:661 +#: ../../mod/admin.php:663 msgid "Approve" msgstr "" @@ -1656,12 +1656,12 @@ msgid "View all contacts" msgstr "" #: ../../mod/contacts.php:310 ../../mod/contacts.php:369 -#: ../../mod/admin.php:665 +#: ../../mod/admin.php:667 msgid "Unblock" msgstr "" #: ../../mod/contacts.php:310 ../../mod/contacts.php:369 -#: ../../mod/admin.php:664 +#: ../../mod/admin.php:666 msgid "Block" msgstr "" @@ -1758,7 +1758,7 @@ msgstr "" msgid "Update public posts" msgstr "" -#: ../../mod/contacts.php:366 ../../mod/admin.php:1136 +#: ../../mod/contacts.php:366 ../../mod/admin.php:1138 msgid "Update now" msgstr "" @@ -1888,8 +1888,8 @@ msgstr "" #: ../../addon/facebook/facebook.php:702 #: ../../addon/facebook/facebook.php:1192 #: ../../addon/public_server/public_server.php:62 -#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2890 -#: ../../boot.php:748 +#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2892 +#: ../../boot.php:766 msgid "Administrator" msgstr "" @@ -1899,7 +1899,7 @@ msgid "" "Password reset failed." msgstr "" -#: ../../mod/lostpass.php:83 ../../boot.php:880 +#: ../../mod/lostpass.php:83 ../../boot.php:898 msgid "Password Reset" msgstr "" @@ -1971,7 +1971,7 @@ msgstr "" msgid "Remove account" msgstr "" -#: ../../mod/settings.php:89 ../../mod/admin.php:751 ../../mod/admin.php:956 +#: ../../mod/settings.php:89 ../../mod/admin.php:753 ../../mod/admin.php:958 #: ../../addon/dav/layout.fnk.php:116 ../../addon/mathjax/mathjax.php:36 #: ../../view/theme/diabook/theme.php:643 #: ../../view/theme/diabook/theme.php:773 ../../include/nav.php:137 @@ -2562,7 +2562,7 @@ msgstr "" msgid "Invalid contact." msgstr "" -#: ../../mod/notes.php:44 ../../boot.php:1583 +#: ../../mod/notes.php:44 ../../boot.php:1601 msgid "Personal Notes" msgstr "" @@ -2813,7 +2813,7 @@ msgstr "" #: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128 #: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:84 -#: ../../include/nav.php:50 ../../boot.php:1562 +#: ../../include/nav.php:50 ../../boot.php:1580 msgid "Profile" msgstr "" @@ -2894,7 +2894,7 @@ msgstr "" msgid "Your invitation ID: " msgstr "" -#: ../../mod/register.php:255 ../../mod/admin.php:421 +#: ../../mod/register.php:255 ../../mod/admin.php:423 msgid "Registration" msgstr "" @@ -2917,7 +2917,7 @@ msgstr "" msgid "Choose a nickname: " msgstr "" -#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:846 +#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:864 msgid "Register" msgstr "" @@ -2930,7 +2930,7 @@ msgstr "" #: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:167 #: ../../view/theme/diabook/theme.php:565 -#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1710 +#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1777 #: ../../include/conversation.php:48 ../../include/conversation.php:57 #: ../../include/conversation.php:121 ../../include/conversation.php:130 msgid "status" @@ -2938,7 +2938,7 @@ msgstr "" #: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1590 #: ../../addon/communityhome/communityhome.php:172 -#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726 +#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1793 #: ../../include/conversation.php:65 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -2950,8 +2950,8 @@ msgid "%1$s doesn't like %2$s's %3$s" msgstr "" #: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159 -#: ../../mod/admin.php:700 ../../mod/admin.php:899 ../../mod/display.php:37 -#: ../../mod/display.php:142 ../../include/items.php:3334 +#: ../../mod/admin.php:702 ../../mod/admin.php:901 ../../mod/display.php:37 +#: ../../mod/display.php:142 ../../include/items.php:3336 msgid "Item not found." msgstr "" @@ -2960,7 +2960,7 @@ msgid "Access denied." msgstr "" #: ../../mod/fbrowser.php:25 ../../view/theme/diabook/theme.php:130 -#: ../../include/nav.php:51 ../../boot.php:1568 +#: ../../include/nav.php:51 ../../boot.php:1586 msgid "Photos" msgstr "" @@ -3181,19 +3181,19 @@ msgstr "" msgid "Theme settings updated." msgstr "" -#: ../../mod/admin.php:96 ../../mod/admin.php:419 +#: ../../mod/admin.php:96 ../../mod/admin.php:421 msgid "Site" msgstr "" -#: ../../mod/admin.php:97 ../../mod/admin.php:655 ../../mod/admin.php:667 +#: ../../mod/admin.php:97 ../../mod/admin.php:657 ../../mod/admin.php:669 msgid "Users" msgstr "" -#: ../../mod/admin.php:98 ../../mod/admin.php:749 ../../mod/admin.php:791 +#: ../../mod/admin.php:98 ../../mod/admin.php:751 ../../mod/admin.php:793 msgid "Plugins" msgstr "" -#: ../../mod/admin.php:99 ../../mod/admin.php:954 ../../mod/admin.php:990 +#: ../../mod/admin.php:99 ../../mod/admin.php:956 ../../mod/admin.php:992 msgid "Themes" msgstr "" @@ -3201,7 +3201,7 @@ msgstr "" msgid "DB updates" msgstr "" -#: ../../mod/admin.php:115 ../../mod/admin.php:122 ../../mod/admin.php:1077 +#: ../../mod/admin.php:115 ../../mod/admin.php:122 ../../mod/admin.php:1079 msgid "Logs" msgstr "" @@ -3217,553 +3217,561 @@ msgstr "" msgid "User registrations waiting for confirmation" msgstr "" -#: ../../mod/admin.php:183 ../../mod/admin.php:637 +#: ../../mod/admin.php:183 ../../mod/admin.php:639 msgid "Normal Account" msgstr "" -#: ../../mod/admin.php:184 ../../mod/admin.php:638 +#: ../../mod/admin.php:184 ../../mod/admin.php:640 msgid "Soapbox Account" msgstr "" -#: ../../mod/admin.php:185 ../../mod/admin.php:639 +#: ../../mod/admin.php:185 ../../mod/admin.php:641 msgid "Community/Celebrity Account" msgstr "" -#: ../../mod/admin.php:186 ../../mod/admin.php:640 +#: ../../mod/admin.php:186 ../../mod/admin.php:642 msgid "Automatic Friend Account" msgstr "" -#: ../../mod/admin.php:205 +#: ../../mod/admin.php:187 +msgid "Blog Account" +msgstr "" + +#: ../../mod/admin.php:188 +msgid "Private Forum" +msgstr "" + +#: ../../mod/admin.php:207 msgid "Message queues" msgstr "" -#: ../../mod/admin.php:210 ../../mod/admin.php:418 ../../mod/admin.php:654 -#: ../../mod/admin.php:748 ../../mod/admin.php:790 ../../mod/admin.php:953 -#: ../../mod/admin.php:989 ../../mod/admin.php:1076 +#: ../../mod/admin.php:212 ../../mod/admin.php:420 ../../mod/admin.php:656 +#: ../../mod/admin.php:750 ../../mod/admin.php:792 ../../mod/admin.php:955 +#: ../../mod/admin.php:991 ../../mod/admin.php:1078 msgid "Administration" msgstr "" -#: ../../mod/admin.php:211 +#: ../../mod/admin.php:213 msgid "Summary" msgstr "" -#: ../../mod/admin.php:213 +#: ../../mod/admin.php:215 msgid "Registered users" msgstr "" -#: ../../mod/admin.php:215 +#: ../../mod/admin.php:217 msgid "Pending registrations" msgstr "" -#: ../../mod/admin.php:216 +#: ../../mod/admin.php:218 msgid "Version" msgstr "" -#: ../../mod/admin.php:218 +#: ../../mod/admin.php:220 msgid "Active plugins" msgstr "" -#: ../../mod/admin.php:357 +#: ../../mod/admin.php:359 msgid "Site settings updated." msgstr "" -#: ../../mod/admin.php:405 +#: ../../mod/admin.php:407 msgid "Closed" msgstr "" -#: ../../mod/admin.php:406 +#: ../../mod/admin.php:408 msgid "Requires approval" msgstr "" -#: ../../mod/admin.php:407 +#: ../../mod/admin.php:409 msgid "Open" msgstr "" -#: ../../mod/admin.php:411 +#: ../../mod/admin.php:413 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: ../../mod/admin.php:412 +#: ../../mod/admin.php:414 msgid "Force all links to use SSL" msgstr "" -#: ../../mod/admin.php:413 +#: ../../mod/admin.php:415 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: ../../mod/admin.php:422 +#: ../../mod/admin.php:424 msgid "File upload" msgstr "" -#: ../../mod/admin.php:423 +#: ../../mod/admin.php:425 msgid "Policies" msgstr "" -#: ../../mod/admin.php:424 +#: ../../mod/admin.php:426 msgid "Advanced" msgstr "" -#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:558 +#: ../../mod/admin.php:430 ../../addon/statusnet/statusnet.php:558 msgid "Site name" msgstr "" -#: ../../mod/admin.php:429 +#: ../../mod/admin.php:431 msgid "Banner/Logo" msgstr "" -#: ../../mod/admin.php:430 +#: ../../mod/admin.php:432 msgid "System language" msgstr "" -#: ../../mod/admin.php:431 +#: ../../mod/admin.php:433 msgid "System theme" msgstr "" -#: ../../mod/admin.php:431 +#: ../../mod/admin.php:433 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: ../../mod/admin.php:432 +#: ../../mod/admin.php:434 msgid "SSL link policy" msgstr "" -#: ../../mod/admin.php:432 +#: ../../mod/admin.php:434 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: ../../mod/admin.php:433 +#: ../../mod/admin.php:435 msgid "Maximum image size" msgstr "" -#: ../../mod/admin.php:433 +#: ../../mod/admin.php:435 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: ../../mod/admin.php:435 +#: ../../mod/admin.php:437 msgid "Register policy" msgstr "" -#: ../../mod/admin.php:436 +#: ../../mod/admin.php:438 msgid "Register text" msgstr "" -#: ../../mod/admin.php:436 +#: ../../mod/admin.php:438 msgid "Will be displayed prominently on the registration page." msgstr "" -#: ../../mod/admin.php:437 +#: ../../mod/admin.php:439 msgid "Accounts abandoned after x days" msgstr "" -#: ../../mod/admin.php:437 +#: ../../mod/admin.php:439 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: ../../mod/admin.php:438 +#: ../../mod/admin.php:440 msgid "Allowed friend domains" msgstr "" -#: ../../mod/admin.php:438 +#: ../../mod/admin.php:440 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: ../../mod/admin.php:439 +#: ../../mod/admin.php:441 msgid "Allowed email domains" msgstr "" -#: ../../mod/admin.php:439 +#: ../../mod/admin.php:441 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: ../../mod/admin.php:440 +#: ../../mod/admin.php:442 msgid "Block public" msgstr "" -#: ../../mod/admin.php:440 +#: ../../mod/admin.php:442 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: ../../mod/admin.php:441 +#: ../../mod/admin.php:443 msgid "Force publish" msgstr "" -#: ../../mod/admin.php:441 +#: ../../mod/admin.php:443 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: ../../mod/admin.php:442 +#: ../../mod/admin.php:444 msgid "Global directory update URL" msgstr "" -#: ../../mod/admin.php:442 +#: ../../mod/admin.php:444 msgid "" "URL to update the global directory. If this is not set, the global directory " "is completely unavailable to the application." msgstr "" -#: ../../mod/admin.php:444 +#: ../../mod/admin.php:446 msgid "Block multiple registrations" msgstr "" -#: ../../mod/admin.php:444 +#: ../../mod/admin.php:446 msgid "Disallow users to register additional accounts for use as pages." msgstr "" -#: ../../mod/admin.php:445 +#: ../../mod/admin.php:447 msgid "OpenID support" msgstr "" -#: ../../mod/admin.php:445 +#: ../../mod/admin.php:447 msgid "OpenID support for registration and logins." msgstr "" -#: ../../mod/admin.php:446 +#: ../../mod/admin.php:448 msgid "Fullname check" msgstr "" -#: ../../mod/admin.php:446 +#: ../../mod/admin.php:448 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "" -#: ../../mod/admin.php:447 +#: ../../mod/admin.php:449 msgid "UTF-8 Regular expressions" msgstr "" -#: ../../mod/admin.php:447 +#: ../../mod/admin.php:449 msgid "Use PHP UTF8 regular expressions" msgstr "" -#: ../../mod/admin.php:448 +#: ../../mod/admin.php:450 msgid "Show Community Page" msgstr "" -#: ../../mod/admin.php:448 +#: ../../mod/admin.php:450 msgid "" "Display a Community page showing all recent public postings on this site." msgstr "" -#: ../../mod/admin.php:449 +#: ../../mod/admin.php:451 msgid "Enable OStatus support" msgstr "" -#: ../../mod/admin.php:449 +#: ../../mod/admin.php:451 msgid "" "Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "" -#: ../../mod/admin.php:450 +#: ../../mod/admin.php:452 msgid "Enable Diaspora support" msgstr "" -#: ../../mod/admin.php:450 +#: ../../mod/admin.php:452 msgid "Provide built-in Diaspora network compatibility." msgstr "" -#: ../../mod/admin.php:451 +#: ../../mod/admin.php:453 msgid "Only allow Friendica contacts" msgstr "" -#: ../../mod/admin.php:451 +#: ../../mod/admin.php:453 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "" -#: ../../mod/admin.php:452 +#: ../../mod/admin.php:454 msgid "Verify SSL" msgstr "" -#: ../../mod/admin.php:452 +#: ../../mod/admin.php:454 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you " "cannot connect (at all) to self-signed SSL sites." msgstr "" -#: ../../mod/admin.php:453 +#: ../../mod/admin.php:455 msgid "Proxy user" msgstr "" -#: ../../mod/admin.php:454 +#: ../../mod/admin.php:456 msgid "Proxy URL" msgstr "" -#: ../../mod/admin.php:455 +#: ../../mod/admin.php:457 msgid "Network timeout" msgstr "" -#: ../../mod/admin.php:455 +#: ../../mod/admin.php:457 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: ../../mod/admin.php:456 +#: ../../mod/admin.php:458 msgid "Delivery interval" msgstr "" -#: ../../mod/admin.php:456 +#: ../../mod/admin.php:458 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "" -#: ../../mod/admin.php:457 +#: ../../mod/admin.php:459 msgid "Poll interval" msgstr "" -#: ../../mod/admin.php:457 +#: ../../mod/admin.php:459 msgid "" "Delay background polling processes by this many seconds to reduce system " "load. If 0, use delivery interval." msgstr "" -#: ../../mod/admin.php:458 +#: ../../mod/admin.php:460 msgid "Maximum Load Average" msgstr "" -#: ../../mod/admin.php:458 +#: ../../mod/admin.php:460 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: ../../mod/admin.php:472 +#: ../../mod/admin.php:474 msgid "Update has been marked successful" msgstr "" -#: ../../mod/admin.php:482 +#: ../../mod/admin.php:484 #, php-format msgid "Executing %s failed. Check system logs." msgstr "" -#: ../../mod/admin.php:485 +#: ../../mod/admin.php:487 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: ../../mod/admin.php:489 +#: ../../mod/admin.php:491 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: ../../mod/admin.php:492 +#: ../../mod/admin.php:494 #, php-format msgid "Update function %s could not be found." msgstr "" -#: ../../mod/admin.php:507 +#: ../../mod/admin.php:509 msgid "No failed updates." msgstr "" -#: ../../mod/admin.php:511 +#: ../../mod/admin.php:513 msgid "Failed Updates" msgstr "" -#: ../../mod/admin.php:512 +#: ../../mod/admin.php:514 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "" -#: ../../mod/admin.php:513 +#: ../../mod/admin.php:515 msgid "Mark success (if update was manually applied)" msgstr "" -#: ../../mod/admin.php:514 +#: ../../mod/admin.php:516 msgid "Attempt to execute this update step automatically" msgstr "" -#: ../../mod/admin.php:539 +#: ../../mod/admin.php:541 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "" msgstr[1] "" -#: ../../mod/admin.php:546 +#: ../../mod/admin.php:548 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "" msgstr[1] "" -#: ../../mod/admin.php:585 +#: ../../mod/admin.php:587 #, php-format msgid "User '%s' deleted" msgstr "" -#: ../../mod/admin.php:593 +#: ../../mod/admin.php:595 #, php-format msgid "User '%s' unblocked" msgstr "" -#: ../../mod/admin.php:593 +#: ../../mod/admin.php:595 #, php-format msgid "User '%s' blocked" msgstr "" -#: ../../mod/admin.php:657 +#: ../../mod/admin.php:659 msgid "select all" msgstr "" -#: ../../mod/admin.php:658 +#: ../../mod/admin.php:660 msgid "User registrations waiting for confirm" msgstr "" -#: ../../mod/admin.php:659 +#: ../../mod/admin.php:661 msgid "Request date" msgstr "" -#: ../../mod/admin.php:659 ../../mod/admin.php:668 +#: ../../mod/admin.php:661 ../../mod/admin.php:670 #: ../../include/contact_selectors.php:79 msgid "Email" msgstr "" -#: ../../mod/admin.php:660 +#: ../../mod/admin.php:662 msgid "No registrations." msgstr "" -#: ../../mod/admin.php:662 +#: ../../mod/admin.php:664 msgid "Deny" msgstr "" -#: ../../mod/admin.php:668 +#: ../../mod/admin.php:670 msgid "Register date" msgstr "" -#: ../../mod/admin.php:668 +#: ../../mod/admin.php:670 msgid "Last login" msgstr "" -#: ../../mod/admin.php:668 +#: ../../mod/admin.php:670 msgid "Last item" msgstr "" -#: ../../mod/admin.php:668 +#: ../../mod/admin.php:670 msgid "Account" msgstr "" -#: ../../mod/admin.php:670 +#: ../../mod/admin.php:672 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: ../../mod/admin.php:671 +#: ../../mod/admin.php:673 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "" -#: ../../mod/admin.php:712 +#: ../../mod/admin.php:714 #, php-format msgid "Plugin %s disabled." msgstr "" -#: ../../mod/admin.php:716 +#: ../../mod/admin.php:718 #, php-format msgid "Plugin %s enabled." msgstr "" -#: ../../mod/admin.php:726 ../../mod/admin.php:924 +#: ../../mod/admin.php:728 ../../mod/admin.php:926 msgid "Disable" msgstr "" -#: ../../mod/admin.php:728 ../../mod/admin.php:926 +#: ../../mod/admin.php:730 ../../mod/admin.php:928 msgid "Enable" msgstr "" -#: ../../mod/admin.php:750 ../../mod/admin.php:955 +#: ../../mod/admin.php:752 ../../mod/admin.php:957 msgid "Toggle" msgstr "" -#: ../../mod/admin.php:758 ../../mod/admin.php:965 +#: ../../mod/admin.php:760 ../../mod/admin.php:967 msgid "Author: " msgstr "" -#: ../../mod/admin.php:759 ../../mod/admin.php:966 +#: ../../mod/admin.php:761 ../../mod/admin.php:968 msgid "Maintainer: " msgstr "" -#: ../../mod/admin.php:888 +#: ../../mod/admin.php:890 msgid "No themes found." msgstr "" -#: ../../mod/admin.php:947 +#: ../../mod/admin.php:949 msgid "Screenshot" msgstr "" -#: ../../mod/admin.php:995 +#: ../../mod/admin.php:997 msgid "[Experimental]" msgstr "" -#: ../../mod/admin.php:996 +#: ../../mod/admin.php:998 msgid "[Unsupported]" msgstr "" -#: ../../mod/admin.php:1023 +#: ../../mod/admin.php:1025 msgid "Log settings updated." msgstr "" -#: ../../mod/admin.php:1079 +#: ../../mod/admin.php:1081 msgid "Clear" msgstr "" -#: ../../mod/admin.php:1085 +#: ../../mod/admin.php:1087 msgid "Debugging" msgstr "" -#: ../../mod/admin.php:1086 +#: ../../mod/admin.php:1088 msgid "Log file" msgstr "" -#: ../../mod/admin.php:1086 +#: ../../mod/admin.php:1088 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "" -#: ../../mod/admin.php:1087 +#: ../../mod/admin.php:1089 msgid "Log level" msgstr "" -#: ../../mod/admin.php:1137 +#: ../../mod/admin.php:1139 msgid "Close" msgstr "" -#: ../../mod/admin.php:1143 +#: ../../mod/admin.php:1145 msgid "FTP Host" msgstr "" -#: ../../mod/admin.php:1144 +#: ../../mod/admin.php:1146 msgid "FTP Path" msgstr "" -#: ../../mod/admin.php:1145 +#: ../../mod/admin.php:1147 msgid "FTP User" msgstr "" -#: ../../mod/admin.php:1146 +#: ../../mod/admin.php:1148 msgid "FTP Password" msgstr "" -#: ../../mod/profile.php:21 ../../boot.php:1011 +#: ../../mod/profile.php:21 ../../boot.php:1029 msgid "Requested profile is not available." msgstr "" @@ -3850,7 +3858,7 @@ msgstr "" msgid "No contacts in common." msgstr "" -#: ../../mod/share.php:28 ../../include/bb2diaspora.php:200 +#: ../../mod/share.php:28 ../../include/bb2diaspora.php:226 msgid "link" msgstr "" @@ -4158,23 +4166,23 @@ msgstr "" msgid "Edit/Manage Profiles" msgstr "" -#: ../../mod/profiles.php:664 ../../boot.php:1120 +#: ../../mod/profiles.php:664 ../../boot.php:1138 msgid "Change profile photo" msgstr "" -#: ../../mod/profiles.php:665 ../../boot.php:1121 +#: ../../mod/profiles.php:665 ../../boot.php:1139 msgid "Create New Profile" msgstr "" -#: ../../mod/profiles.php:676 ../../boot.php:1131 +#: ../../mod/profiles.php:676 ../../boot.php:1149 msgid "Profile Image" msgstr "" -#: ../../mod/profiles.php:678 ../../boot.php:1134 +#: ../../mod/profiles.php:678 ../../boot.php:1152 msgid "visible to everybody" msgstr "" -#: ../../mod/profiles.php:679 ../../boot.php:1135 +#: ../../mod/profiles.php:679 ../../boot.php:1153 msgid "Edit visibility" msgstr "" @@ -4290,17 +4298,17 @@ msgid "Gender: " msgstr "" #: ../../mod/directory.php:134 ../../include/profile_advanced.php:17 -#: ../../boot.php:1156 +#: ../../boot.php:1174 msgid "Gender:" msgstr "" #: ../../mod/directory.php:136 ../../include/profile_advanced.php:37 -#: ../../boot.php:1159 +#: ../../boot.php:1177 msgid "Status:" msgstr "" #: ../../mod/directory.php:138 ../../include/profile_advanced.php:48 -#: ../../boot.php:1161 +#: ../../boot.php:1179 msgid "Homepage:" msgstr "" @@ -4431,7 +4439,7 @@ msgstr "" msgid "Unable to set contact photo." msgstr "" -#: ../../mod/dfrn_confirm.php:477 ../../include/diaspora.php:510 +#: ../../mod/dfrn_confirm.php:477 ../../include/diaspora.php:577 #: ../../include/conversation.php:101 #, php-format msgid "%1$s is now friends with %2$s" @@ -4895,7 +4903,7 @@ msgstr "" #: ../../addon/communityhome/communityhome.php:34 #: ../../addon/communityhome/twillingham/communityhome.php:28 #: ../../addon/communityhome/twillingham/communityhome.php:34 -#: ../../include/nav.php:64 ../../boot.php:867 +#: ../../include/nav.php:64 ../../boot.php:885 msgid "Login" msgstr "" @@ -6678,11 +6686,11 @@ msgstr "" msgid "Ask me" msgstr "" -#: ../../include/event.php:20 ../../include/bb2diaspora.php:361 +#: ../../include/event.php:20 ../../include/bb2diaspora.php:393 msgid "Starts:" msgstr "" -#: ../../include/event.php:30 ../../include/bb2diaspora.php:369 +#: ../../include/event.php:30 ../../include/bb2diaspora.php:401 msgid "Finishes:" msgstr "" @@ -6850,11 +6858,11 @@ msgstr "" msgid "Item filed" msgstr "" -#: ../../include/diaspora.php:593 +#: ../../include/diaspora.php:660 msgid "Sharing notification from Diaspora network" msgstr "" -#: ../../include/diaspora.php:2085 +#: ../../include/diaspora.php:2152 msgid "Attachments:" msgstr "" @@ -6905,7 +6913,7 @@ msgstr "" msgid "Contacts not in any group" msgstr "" -#: ../../include/nav.php:46 ../../boot.php:866 +#: ../../include/nav.php:46 ../../boot.php:884 msgid "Logout" msgstr "" @@ -6913,7 +6921,7 @@ msgstr "" msgid "End this session" msgstr "" -#: ../../include/nav.php:49 ../../boot.php:1556 +#: ../../include/nav.php:49 ../../boot.php:1574 msgid "Status" msgstr "" @@ -6993,11 +7001,11 @@ msgstr "" msgid "Manage other pages" msgstr "" -#: ../../include/nav.php:138 ../../boot.php:1114 +#: ../../include/nav.php:138 ../../boot.php:1132 msgid "Profiles" msgstr "" -#: ../../include/nav.php:138 ../../boot.php:1114 +#: ../../include/nav.php:138 ../../boot.php:1132 msgid "Manage/edit profiles" msgstr "" @@ -7173,11 +7181,11 @@ msgstr "" msgid "From: " msgstr "" -#: ../../include/bbcode.php:224 ../../include/bbcode.php:244 +#: ../../include/bbcode.php:225 ../../include/bbcode.php:245 msgid "$1 wrote:" msgstr "" -#: ../../include/bbcode.php:259 ../../include/bbcode.php:336 +#: ../../include/bbcode.php:260 ../../include/bbcode.php:337 msgid "Image/photo" msgstr "" @@ -7418,20 +7426,20 @@ msgstr "" msgid "following" msgstr "" -#: ../../include/items.php:2888 +#: ../../include/items.php:2890 msgid "A new person is sharing with you at " msgstr "" -#: ../../include/items.php:2888 +#: ../../include/items.php:2890 msgid "You have a new follower at " msgstr "" -#: ../../include/items.php:3520 +#: ../../include/items.php:3522 msgid "Archives" msgstr "" -#: ../../include/bb2diaspora.php:200 ../../include/bb2diaspora.php:210 -#: ../../include/bb2diaspora.php:211 +#: ../../include/bb2diaspora.php:226 ../../include/bb2diaspora.php:236 +#: ../../include/bb2diaspora.php:237 msgid "image/photo" msgstr "" @@ -7676,96 +7684,96 @@ msgstr "" msgid "This action is not available under your subscription plan." msgstr "" -#: ../../boot.php:545 +#: ../../boot.php:563 msgid "Delete this item?" msgstr "" -#: ../../boot.php:548 +#: ../../boot.php:566 msgid "show fewer" msgstr "" -#: ../../boot.php:743 +#: ../../boot.php:761 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: ../../boot.php:745 +#: ../../boot.php:763 #, php-format msgid "Update Error at %s" msgstr "" -#: ../../boot.php:845 +#: ../../boot.php:863 msgid "Create a New Account" msgstr "" -#: ../../boot.php:869 +#: ../../boot.php:887 msgid "Nickname or Email address: " msgstr "" -#: ../../boot.php:870 +#: ../../boot.php:888 msgid "Password: " msgstr "" -#: ../../boot.php:873 +#: ../../boot.php:891 msgid "Or login using OpenID: " msgstr "" -#: ../../boot.php:879 +#: ../../boot.php:897 msgid "Forgot your password?" msgstr "" -#: ../../boot.php:1046 +#: ../../boot.php:1064 msgid "Edit profile" msgstr "" -#: ../../boot.php:1106 +#: ../../boot.php:1124 msgid "Message" msgstr "" -#: ../../boot.php:1222 ../../boot.php:1301 +#: ../../boot.php:1240 ../../boot.php:1319 msgid "g A l F d" msgstr "" -#: ../../boot.php:1223 ../../boot.php:1302 +#: ../../boot.php:1241 ../../boot.php:1320 msgid "F d" msgstr "" -#: ../../boot.php:1268 ../../boot.php:1342 +#: ../../boot.php:1286 ../../boot.php:1360 msgid "[today]" msgstr "" -#: ../../boot.php:1280 +#: ../../boot.php:1298 msgid "Birthday Reminders" msgstr "" -#: ../../boot.php:1281 +#: ../../boot.php:1299 msgid "Birthdays this week:" msgstr "" -#: ../../boot.php:1335 +#: ../../boot.php:1353 msgid "[No description]" msgstr "" -#: ../../boot.php:1353 +#: ../../boot.php:1371 msgid "Event Reminders" msgstr "" -#: ../../boot.php:1354 +#: ../../boot.php:1372 msgid "Events this week:" msgstr "" -#: ../../boot.php:1559 +#: ../../boot.php:1577 msgid "Status Messages and Posts" msgstr "" -#: ../../boot.php:1565 +#: ../../boot.php:1583 msgid "Profile Details" msgstr "" -#: ../../boot.php:1580 +#: ../../boot.php:1598 msgid "Events and Calendar" msgstr "" -#: ../../boot.php:1586 +#: ../../boot.php:1604 msgid "Only You Can See This" msgstr "" -- cgit v1.2.3 From da2ccebed8f1c87b0481ba476b4d13e601ce5feb Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 7 Jul 2012 18:47:13 -0600 Subject: fix bugs --- include/bbcode.php | 6 +++--- include/conversation.php | 19 +++++++++++++------ include/items.php | 8 ++++---- mod/message.php | 19 +++++++++++++------ 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 6a1c4b043..63dd9695e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -66,10 +66,10 @@ function bb_extract_images($body) { if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { // This is an embedded image - $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start); - $cnt++; - + $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close)); $new_body = $new_body . substr($orig_body, 0, $img_start) . '[$#saved_image' . $cnt . '#$]'; + + $cnt++; } else $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); diff --git a/include/conversation.php b/include/conversation.php index 4fea52c9c..240cd374f 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -22,10 +22,10 @@ function item_extract_images($body) { if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { // This is an embedded image - $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start); - $cnt++; - + $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close)); $new_body = $new_body . substr($orig_body, 0, $img_start) . '[!#saved_image' . $cnt . '#!]'; + + $cnt++; } else $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); @@ -48,22 +48,29 @@ function item_extract_images($body) { if(! function_exists('item_redir_and_replace_images')) { function item_redir_and_replace_images($body, $images, $cid) { - $newbody = $body; + $origbody = $body; + $newbody = ''; for($i = 0; $i < count($images); $i++) { $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is'; $replace = '[url=' . z_path() . '/redir/' . $cid . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; - $newbody = preg_replace($search, $replace, $newbody); + $img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]'); + $process_part = substr($origbody, 0, $img_end); + $origbody = substr($origbody, $img_end); + + $process_part = preg_replace($search, $replace, $process_part); + $newbody = $newbody . $process_part; } + $newbody = $newbody . $origbody; $cnt = 0; foreach($images as $image) { // We're depending on the property of 'foreach' (specified on the PHP website) that // it loops over the array starting from the first element and going sequentially // to the last element - $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '[img]' . $image . '[/img]', $newbody); + $newbody = str_replace('[!#saved_image' . $cnt . '#!]', '[img]' . $image . '[/img]', $newbody); $cnt++; } diff --git a/include/items.php b/include/items.php index 7bb33d943..eb3f27a16 100755 --- a/include/items.php +++ b/include/items.php @@ -326,7 +326,7 @@ function limit_body_size($body) { } else { $new_body = $new_body . substr($orig_body, 0, $img_start); - $textlen += $img_start + $textlen += $img_start; } $new_body = $new_body . substr($orig_body, $img_start, $img_end - $img_start); @@ -3192,7 +3192,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) { $img_start = strpos($orig_body, '[img'); $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); - $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/img]') : false); while( ($img_st_close !== false) && ($img_len !== false) ) { $img_st_close++; // make it point to AFTER the closing bracket @@ -3277,10 +3277,10 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) { $img_start = strpos($orig_body, '[img'); $img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false); - $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false); + $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/img]') : false); } - $new_body = $new_body + $orig_body; + $new_body = $new_body . $orig_body; return($new_body); } diff --git a/mod/message.php b/mod/message.php index 4ffdebb12..1e9d731a4 100644 --- a/mod/message.php +++ b/mod/message.php @@ -109,10 +109,10 @@ function item_extract_images($body) { if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) { // This is an embedded image - $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - $img_start); - $cnt++; - + $saved_image[$cnt] = substr($orig_body, $img_start + $img_st_close, $img_end - ($img_start + $img_st_close)); $new_body = $new_body . substr($orig_body, 0, $img_start) . '[!#saved_image' . $cnt . '#!]'; + + $cnt++; } else $new_body = $new_body . substr($orig_body, 0, $img_end + strlen('[/img]')); @@ -135,22 +135,29 @@ function item_extract_images($body) { if(! function_exists('item_redir_and_replace_images')) { function item_redir_and_replace_images($body, $images, $cid) { - $newbody = $body; + $origbody = $body; + $newbody = ''; for($i = 0; $i < count($images); $i++) { $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is'; $replace = '[url=' . z_path() . '/redir/' . $cid . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ; - $newbody = preg_replace($search, $replace, $newbody); + $img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]'); + $process_part = substr($origbody, 0, $img_end); + $origbody = substr($origbody, $img_end); + + $process_part = preg_replace($search, $replace, $process_part); + $newbody = $newbody . $process_part; } + $newbody = $newbody . $origbody; $cnt = 0; foreach($images as $image) { // We're depending on the property of 'foreach' (specified on the PHP website) that // it loops over the array starting from the first element and going sequentially // to the last element - $newbody = str_replace('[$#saved_image' . $cnt . '#$]', '[img]' . $image . '[/img]', $newbody); + $newbody = str_replace('[!#saved_image' . $cnt . '#!]', '[img]' . $image . '[/img]', $newbody); $cnt++; } -- cgit v1.2.3 From 6d10374c17eb8932d36945532cc47a86628e63ea Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sat, 7 Jul 2012 18:48:20 -0600 Subject: cleanup --- include/items.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/items.php b/include/items.php index eb3f27a16..36a027eec 100755 --- a/include/items.php +++ b/include/items.php @@ -3225,11 +3225,6 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) { // 3. Otherwise, if we have an item, see if the item permissions match the photo // permissions, regardless of order but first check to see if they're an exact // match to save some processing overhead. - - // To embed multiples, we would need to parse out the embedded photos on message - // receipt and limit size based only on the text component. Would also need to - // ignore all photos during bbcode translation and item localisation, as these - // will hit internal regex backtrace limits. if(has_permissions($r[0])) { if($cid) { -- cgit v1.2.3