From 34fd387438f5f3d06b0a1c26d5c7ca5c1f5bd270 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 17:17:49 +0100 Subject: this commit is an attempt to make conv items better scalable on smaller screens. also save some horizontal space. --- include/bbcode.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 8bbf7ae01..cd0bf527e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -46,7 +46,7 @@ function tryzrlvideo($match) { } if($zrl) $link = zid($link); - return ''; + return ''; } @@ -620,24 +620,24 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // [img=widthxheight]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [img=widthxheight float={left, right}]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // style (sanitized) -- cgit v1.2.3 From 55fe471ce889cd377a54d9b219e9c8c0bff10bfb Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Mar 2014 15:29:26 -0700 Subject: version update --- include/event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/event.php b/include/event.php index 08b94dafa..8e6a3fe71 100644 --- a/include/event.php +++ b/include/event.php @@ -8,7 +8,7 @@ function format_event_html($ev) { if(! ((is_array($ev)) && count($ev))) return ''; - $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM + $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM $o = '
' . "\r\n"; -- cgit v1.2.3 From 5e41ef921999e1dc4d29101d4d764db967e257ee Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Mar 2014 17:41:56 -0700 Subject: protect filed conversations from expiration - we check the parent to see if it is filed, but one may have filed a comment and that will vanish when the parent expires unless the parent is protected. --- include/expire.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/expire.php b/include/expire.php index f1002b890..2d94d64c0 100644 --- a/include/expire.php +++ b/include/expire.php @@ -9,7 +9,7 @@ function expire_run($argv, $argc){ // physically remove anything that has been deleted for more than two months - $r = q("delete from item where item_flags & %d and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY", + $r = q("delete from item where ( item_flags & %d ) and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY", intval(ITEM_DELETED) ); -- cgit v1.2.3 From 3f337dad2c783e62338a88887d1ef3d7754da410 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Mar 2014 21:45:20 -0700 Subject: file had wrong extension --- include/config.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/config.php b/include/config.php index 8d98d56fa..add7b5f71 100644 --- a/include/config.php +++ b/include/config.php @@ -25,14 +25,6 @@ function load_config($family) { $r = q("SELECT * FROM config WHERE cat = '%s'", dbesc($family)); - // This is often one of the earliest database calls in the life of the page. - // If the DB was successfully opened, but we can't read from it, - // we must assume catastrophic failure of the DB. Report the system down. - -// if($r === false) { -// system_unavailable(); -// } - if($r !== false) { if($r) { foreach($r as $rr) { @@ -285,7 +277,6 @@ function load_xconfig($xchan,$family = '') { $a->config[$xchan][$c][$k] = $rr['v']; } } - } -- cgit v1.2.3 From 3cb179aff19d803b91261e410c50b36e4bae1246 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 13 Mar 2014 17:13:36 -0700 Subject: contact_block() not being shown to unauthenticated visitors - even if perms allow. Also separate the permissions logic for this function so that we can have a mini-profile widget and a separate contact_block widget instead of always lumping them together. We probably also should move contact_block() outside of include/text.php as it doesn't really belong there. Just not sure where it belongs - perhaps contact_widgets wouold be a good place. --- include/identity.php | 5 +---- include/text.php | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/identity.php b/include/identity.php index ed6920e67..efc0d7d87 100644 --- a/include/identity.php +++ b/include/identity.php @@ -711,10 +711,7 @@ logger('online: ' . $profile['online']); ? trim(substr($profile['name'],0,strpos($profile['name'],' '))) : $profile['name']); $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'],strlen($firstname)))); - if(is_array($observer) - && perm_is_allowed($profile['uid'],$observer['xchan_hash'],'view_contacts')) { - $contact_block = contact_block(); - } + $contact_block = contact_block(); $channel_menu = false; $menu = get_pconfig($profile['uid'],'system','channel_menu'); diff --git a/include/text.php b/include/text.php index 839e63f5e..53b92c05f 100755 --- a/include/text.php +++ b/include/text.php @@ -656,6 +656,12 @@ function contact_block() { $o = ''; $a = get_app(); + if(! $a->profile['uid']) + return; + + if(! perm_is_allowed($a->profile['uid'],get_observer_hash(),'view_contacts')) + return; + $shown = get_pconfig($a->profile['uid'],'system','display_friend_count'); if($shown === false) -- cgit v1.2.3