aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-07 22:04:31 -0700
committerfriendica <info@friendica.com>2012-07-07 22:04:31 -0700
commit8c3703c4f97ff0f3a54f48a3d02ed15060a2d5c1 (patch)
tree7c8f114e8eb889ca65803d7f28b81388da32ce85
parent1965c7076963e4b0fe43287977f6ece9520ca7c9 (diff)
parent63f10f6c6bb1ce794643b7511ab50cd810b79595 (diff)
downloadvolse-hubzilla-8c3703c4f97ff0f3a54f48a3d02ed15060a2d5c1.tar.gz
volse-hubzilla-8c3703c4f97ff0f3a54f48a3d02ed15060a2d5c1.tar.bz2
volse-hubzilla-8c3703c4f97ff0f3a54f48a3d02ed15060a2d5c1.zip
Merge branch 'master' of file:////home/macgirvin/dev
Conflicts: boot.php
-rw-r--r--include/bb2diaspora.php2
-rw-r--r--include/bbcode.php88
-rw-r--r--include/conversation.php102
-rwxr-xr-xinclude/items.php164
-rw-r--r--[-rwxr-xr-x]include/security.php0
-rw-r--r--mod/message.php101
-rw-r--r--mod/photos.php3
-rw-r--r--util/messages.po434
-rwxr-xr-x[-rw-r--r--]util/run_xgettext.sh0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/ch_directory_item.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/communityhome.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/contact_template.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-aerith/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-blue/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-dark/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-green/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-green/icons/notifications3.pngbin714 -> 714 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-green/icons/notify3.pngbin534 -> 534 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-pink/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-pink/icons/notifications3.pngbin714 -> 714 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-pink/icons/notify3.pngbin534 -> 534 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/diabook-red/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/directory_item.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/group_side.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/attach.pngbin1069 -> 1069 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/audio.pngbin762 -> 762 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/block.pngbin335 -> 335 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/camera.pngbin685 -> 685 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/close_box.pngbin206 -> 206 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/contacts2.pngbin549 -> 549 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/drop.pngbin292 -> 292 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/expand.pngbin263 -> 263 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/file_as.pngbin352 -> 352 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/link.pngbin365 -> 365 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/lock.pngbin366 -> 366 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/lupe.pngbin697 -> 697 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/next.pngbin300 -> 300 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/notifications.pngbin926 -> 926 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/notifications3.pngbin714 -> 714 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/notify.pngbin1001 -> 1001 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/notify3.pngbin534 -> 534 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/pencil.pngbin286 -> 286 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/prev.pngbin336 -> 336 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/recycle.pngbin296 -> 296 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/remote.pngbin427 -> 427 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/scroll_top.pngbin296 -> 296 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/star.pngbin388 -> 388 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/starred.pngbin501 -> 501 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/tagged.pngbin353 -> 353 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/unlock.pngbin362 -> 362 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/unstarred.pngbin468 -> 468 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/video.pngbin472 -> 472 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/icons/weblink.pngbin505 -> 505 bytes
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/jot.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/mail_conv.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/search_item.tpl0
-rw-r--r--[-rwxr-xr-x]view/theme/diabook/theme.php0
57 files changed, 604 insertions, 290 deletions
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);
diff --git a/include/bbcode.php b/include/bbcode.php
index 55a879497..63dd9695e 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 + $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]'));
+
+ $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 . '#$]', '<img src="' . $image .'" alt="' . 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)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
- if(strlen($saved_image))
- $Text = str_replace('[$#saved_image#$]','<img src="' . $saved_image .'" alt="' . 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..240cd374f 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1,30 +1,92 @@
<?php
+// Note: the code in 'item_extract_images' and 'item_redir_and_replace_images'
+// is identical to the code in mod/message.php for 'item_extract_images' and
+// 'item_redir_and_replace_images'
+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 + $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]'));
+
+ $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) {
+
+ $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]' ;
+
+ $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);
+ $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 cf903ac13..36a027eec 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) {
@@ -278,7 +280,99 @@ 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
+ */
+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 time looking for the images
+ if($maxlen && (strlen($body) > $maxlen)) {
+
+ logger('limit_body_size: the total body length exceeds the limit', LOGGER_DEBUG);
+
+ $orig_body = $body;
+ $new_body = '';
+ $textlen = 0;
+ $max_found = false;
+
+ $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;
+ $img_end += strlen('[/img]');
+
+ if(! strcmp(substr($orig_body, $img_start + $img_st_close, 5), 'data:')) {
+ // This is an embedded image
+
+ 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 {
+
+ 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);
+
+ 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);
+ }
+
+ 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 {
+ 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);
+ }
+
+ return $new_body;
+ }
+ else
+ return $body;
+}}
@@ -414,9 +508,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
@@ -3088,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_st_close + 1), '[/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);
@@ -3119,14 +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.
-
- // 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
- // will hit internal regex backtrace limits.
if(has_permissions($r[0])) {
if($cid) {
@@ -3141,15 +3239,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_st_close + 1), '[/img]') : false);
}
- return($s);
+
+ $new_body = $new_body . $orig_body;
+
+ return($new_body);
}
diff --git a/include/security.php b/include/security.php
index af201d2af..af201d2af 100755..100644
--- a/include/security.php
+++ b/include/security.php
diff --git a/mod/message.php b/mod/message.php
index 80d2c6d99..1e9d731a4 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -88,6 +88,84 @@ 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 + $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]'));
+
+ $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) {
+
+ $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]' ;
+
+ $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);
+ $cnt++;
+ }
+
+ return $newbody;
+}}
+
+
+
function message_content(&$a) {
$o = '';
@@ -345,26 +423,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'],
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');
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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 - <a href='#' "
"id='cnftheme'>change theme settings</a>"
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 ""
diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh
index 6ea603c83..6ea603c83 100644..100755
--- a/util/run_xgettext.sh
+++ b/util/run_xgettext.sh
diff --git a/view/theme/diabook/ch_directory_item.tpl b/view/theme/diabook/ch_directory_item.tpl
index db1936e4b..db1936e4b 100755..100644
--- a/view/theme/diabook/ch_directory_item.tpl
+++ b/view/theme/diabook/ch_directory_item.tpl
diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl
index caefed3b3..caefed3b3 100755..100644
--- a/view/theme/diabook/communityhome.tpl
+++ b/view/theme/diabook/communityhome.tpl
diff --git a/view/theme/diabook/contact_template.tpl b/view/theme/diabook/contact_template.tpl
index 48930b48a..48930b48a 100755..100644
--- a/view/theme/diabook/contact_template.tpl
+++ b/view/theme/diabook/contact_template.tpl
diff --git a/view/theme/diabook/diabook-aerith/icons/block.png b/view/theme/diabook/diabook-aerith/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-aerith/icons/block.png
+++ b/view/theme/diabook/diabook-aerith/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/diabook-blue/icons/block.png b/view/theme/diabook/diabook-blue/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-blue/icons/block.png
+++ b/view/theme/diabook/diabook-blue/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/diabook-dark/icons/block.png b/view/theme/diabook/diabook-dark/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-dark/icons/block.png
+++ b/view/theme/diabook/diabook-dark/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/diabook-green/icons/block.png b/view/theme/diabook/diabook-green/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-green/icons/block.png
+++ b/view/theme/diabook/diabook-green/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/diabook-green/icons/notifications3.png b/view/theme/diabook/diabook-green/icons/notifications3.png
index 2c9c791c0..2c9c791c0 100755..100644
--- a/view/theme/diabook/diabook-green/icons/notifications3.png
+++ b/view/theme/diabook/diabook-green/icons/notifications3.png
Binary files differ
diff --git a/view/theme/diabook/diabook-green/icons/notify3.png b/view/theme/diabook/diabook-green/icons/notify3.png
index 9b852d05b..9b852d05b 100755..100644
--- a/view/theme/diabook/diabook-green/icons/notify3.png
+++ b/view/theme/diabook/diabook-green/icons/notify3.png
Binary files differ
diff --git a/view/theme/diabook/diabook-pink/icons/block.png b/view/theme/diabook/diabook-pink/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-pink/icons/block.png
+++ b/view/theme/diabook/diabook-pink/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/diabook-pink/icons/notifications3.png b/view/theme/diabook/diabook-pink/icons/notifications3.png
index 2c9c791c0..2c9c791c0 100755..100644
--- a/view/theme/diabook/diabook-pink/icons/notifications3.png
+++ b/view/theme/diabook/diabook-pink/icons/notifications3.png
Binary files differ
diff --git a/view/theme/diabook/diabook-pink/icons/notify3.png b/view/theme/diabook/diabook-pink/icons/notify3.png
index 9b852d05b..9b852d05b 100755..100644
--- a/view/theme/diabook/diabook-pink/icons/notify3.png
+++ b/view/theme/diabook/diabook-pink/icons/notify3.png
Binary files differ
diff --git a/view/theme/diabook/diabook-red/icons/block.png b/view/theme/diabook/diabook-red/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/diabook-red/icons/block.png
+++ b/view/theme/diabook/diabook-red/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/directory_item.tpl b/view/theme/diabook/directory_item.tpl
index 70d197955..70d197955 100755..100644
--- a/view/theme/diabook/directory_item.tpl
+++ b/view/theme/diabook/directory_item.tpl
diff --git a/view/theme/diabook/group_side.tpl b/view/theme/diabook/group_side.tpl
index ce4b25fbf..ce4b25fbf 100755..100644
--- a/view/theme/diabook/group_side.tpl
+++ b/view/theme/diabook/group_side.tpl
diff --git a/view/theme/diabook/icons/attach.png b/view/theme/diabook/icons/attach.png
index 1958041cf..1958041cf 100755..100644
--- a/view/theme/diabook/icons/attach.png
+++ b/view/theme/diabook/icons/attach.png
Binary files differ
diff --git a/view/theme/diabook/icons/audio.png b/view/theme/diabook/icons/audio.png
index 8d779a409..8d779a409 100755..100644
--- a/view/theme/diabook/icons/audio.png
+++ b/view/theme/diabook/icons/audio.png
Binary files differ
diff --git a/view/theme/diabook/icons/block.png b/view/theme/diabook/icons/block.png
index a0b1dffe9..a0b1dffe9 100755..100644
--- a/view/theme/diabook/icons/block.png
+++ b/view/theme/diabook/icons/block.png
Binary files differ
diff --git a/view/theme/diabook/icons/camera.png b/view/theme/diabook/icons/camera.png
index a5c7f1236..a5c7f1236 100755..100644
--- a/view/theme/diabook/icons/camera.png
+++ b/view/theme/diabook/icons/camera.png
Binary files differ
diff --git a/view/theme/diabook/icons/close_box.png b/view/theme/diabook/icons/close_box.png
index 28e2675b8..28e2675b8 100755..100644
--- a/view/theme/diabook/icons/close_box.png
+++ b/view/theme/diabook/icons/close_box.png
Binary files differ
diff --git a/view/theme/diabook/icons/contacts2.png b/view/theme/diabook/icons/contacts2.png
index 7817279f4..7817279f4 100755..100644
--- a/view/theme/diabook/icons/contacts2.png
+++ b/view/theme/diabook/icons/contacts2.png
Binary files differ
diff --git a/view/theme/diabook/icons/drop.png b/view/theme/diabook/icons/drop.png
index 2abb82ef2..2abb82ef2 100755..100644
--- a/view/theme/diabook/icons/drop.png
+++ b/view/theme/diabook/icons/drop.png
Binary files differ
diff --git a/view/theme/diabook/icons/expand.png b/view/theme/diabook/icons/expand.png
index a46e88ea5..a46e88ea5 100755..100644
--- a/view/theme/diabook/icons/expand.png
+++ b/view/theme/diabook/icons/expand.png
Binary files differ
diff --git a/view/theme/diabook/icons/file_as.png b/view/theme/diabook/icons/file_as.png
index 16713fa53..16713fa53 100755..100644
--- a/view/theme/diabook/icons/file_as.png
+++ b/view/theme/diabook/icons/file_as.png
Binary files differ
diff --git a/view/theme/diabook/icons/link.png b/view/theme/diabook/icons/link.png
index 0ef666a67..0ef666a67 100755..100644
--- a/view/theme/diabook/icons/link.png
+++ b/view/theme/diabook/icons/link.png
Binary files differ
diff --git a/view/theme/diabook/icons/lock.png b/view/theme/diabook/icons/lock.png
index 7e34bf279..7e34bf279 100755..100644
--- a/view/theme/diabook/icons/lock.png
+++ b/view/theme/diabook/icons/lock.png
Binary files differ
diff --git a/view/theme/diabook/icons/lupe.png b/view/theme/diabook/icons/lupe.png
index f8b228347..f8b228347 100755..100644
--- a/view/theme/diabook/icons/lupe.png
+++ b/view/theme/diabook/icons/lupe.png
Binary files differ
diff --git a/view/theme/diabook/icons/next.png b/view/theme/diabook/icons/next.png
index 7b5e25b90..7b5e25b90 100755..100644
--- a/view/theme/diabook/icons/next.png
+++ b/view/theme/diabook/icons/next.png
Binary files differ
diff --git a/view/theme/diabook/icons/notifications.png b/view/theme/diabook/icons/notifications.png
index 347f1519e..347f1519e 100755..100644
--- a/view/theme/diabook/icons/notifications.png
+++ b/view/theme/diabook/icons/notifications.png
Binary files differ
diff --git a/view/theme/diabook/icons/notifications3.png b/view/theme/diabook/icons/notifications3.png
index 2c9c791c0..2c9c791c0 100755..100644
--- a/view/theme/diabook/icons/notifications3.png
+++ b/view/theme/diabook/icons/notifications3.png
Binary files differ
diff --git a/view/theme/diabook/icons/notify.png b/view/theme/diabook/icons/notify.png
index 355abb1eb..355abb1eb 100755..100644
--- a/view/theme/diabook/icons/notify.png
+++ b/view/theme/diabook/icons/notify.png
Binary files differ
diff --git a/view/theme/diabook/icons/notify3.png b/view/theme/diabook/icons/notify3.png
index 9b852d05b..9b852d05b 100755..100644
--- a/view/theme/diabook/icons/notify3.png
+++ b/view/theme/diabook/icons/notify3.png
Binary files differ
diff --git a/view/theme/diabook/icons/pencil.png b/view/theme/diabook/icons/pencil.png
index 772e49b17..772e49b17 100755..100644
--- a/view/theme/diabook/icons/pencil.png
+++ b/view/theme/diabook/icons/pencil.png
Binary files differ
diff --git a/view/theme/diabook/icons/prev.png b/view/theme/diabook/icons/prev.png
index 55c1464ba..55c1464ba 100755..100644
--- a/view/theme/diabook/icons/prev.png
+++ b/view/theme/diabook/icons/prev.png
Binary files differ
diff --git a/view/theme/diabook/icons/recycle.png b/view/theme/diabook/icons/recycle.png
index c3b8d2bf4..c3b8d2bf4 100755..100644
--- a/view/theme/diabook/icons/recycle.png
+++ b/view/theme/diabook/icons/recycle.png
Binary files differ
diff --git a/view/theme/diabook/icons/remote.png b/view/theme/diabook/icons/remote.png
index a560cc55e..a560cc55e 100755..100644
--- a/view/theme/diabook/icons/remote.png
+++ b/view/theme/diabook/icons/remote.png
Binary files differ
diff --git a/view/theme/diabook/icons/scroll_top.png b/view/theme/diabook/icons/scroll_top.png
index 0e7f7ae6a..0e7f7ae6a 100755..100644
--- a/view/theme/diabook/icons/scroll_top.png
+++ b/view/theme/diabook/icons/scroll_top.png
Binary files differ
diff --git a/view/theme/diabook/icons/star.png b/view/theme/diabook/icons/star.png
index 0b00cb189..0b00cb189 100755..100644
--- a/view/theme/diabook/icons/star.png
+++ b/view/theme/diabook/icons/star.png
Binary files differ
diff --git a/view/theme/diabook/icons/starred.png b/view/theme/diabook/icons/starred.png
index 2b82dfca3..2b82dfca3 100755..100644
--- a/view/theme/diabook/icons/starred.png
+++ b/view/theme/diabook/icons/starred.png
Binary files differ
diff --git a/view/theme/diabook/icons/tagged.png b/view/theme/diabook/icons/tagged.png
index 144649ef8..144649ef8 100755..100644
--- a/view/theme/diabook/icons/tagged.png
+++ b/view/theme/diabook/icons/tagged.png
Binary files differ
diff --git a/view/theme/diabook/icons/unlock.png b/view/theme/diabook/icons/unlock.png
index a0cda0ae5..a0cda0ae5 100755..100644
--- a/view/theme/diabook/icons/unlock.png
+++ b/view/theme/diabook/icons/unlock.png
Binary files differ
diff --git a/view/theme/diabook/icons/unstarred.png b/view/theme/diabook/icons/unstarred.png
index ba3183f5c..ba3183f5c 100755..100644
--- a/view/theme/diabook/icons/unstarred.png
+++ b/view/theme/diabook/icons/unstarred.png
Binary files differ
diff --git a/view/theme/diabook/icons/video.png b/view/theme/diabook/icons/video.png
index a03d1d818..a03d1d818 100755..100644
--- a/view/theme/diabook/icons/video.png
+++ b/view/theme/diabook/icons/video.png
Binary files differ
diff --git a/view/theme/diabook/icons/weblink.png b/view/theme/diabook/icons/weblink.png
index 216e78344..216e78344 100755..100644
--- a/view/theme/diabook/icons/weblink.png
+++ b/view/theme/diabook/icons/weblink.png
Binary files differ
diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl
index 1d94cb6d3..1d94cb6d3 100755..100644
--- a/view/theme/diabook/jot.tpl
+++ b/view/theme/diabook/jot.tpl
diff --git a/view/theme/diabook/mail_conv.tpl b/view/theme/diabook/mail_conv.tpl
index 989f17878..989f17878 100755..100644
--- a/view/theme/diabook/mail_conv.tpl
+++ b/view/theme/diabook/mail_conv.tpl
diff --git a/view/theme/diabook/search_item.tpl b/view/theme/diabook/search_item.tpl
index 123834064..123834064 100755..100644
--- a/view/theme/diabook/search_item.tpl
+++ b/view/theme/diabook/search_item.tpl
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 53048df6c..53048df6c 100755..100644
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php