diff options
author | Christian Vogeley <christian.vogeley@hotmail.de> | 2014-03-15 21:54:10 +0100 |
---|---|---|
committer | Christian Vogeley <christian.vogeley@hotmail.de> | 2014-03-15 21:54:10 +0100 |
commit | 521b091779ddb2a4ca58c28af9312cb5bcf2dd9f (patch) | |
tree | 27d854c5b8668470a3005425e428b8c115550aad /include | |
parent | f0736fc955e69d4650f95dc937f26be222967199 (diff) | |
parent | 3cb179aff19d803b91261e410c50b36e4bae1246 (diff) | |
download | volse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.tar.gz volse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.tar.bz2 volse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.zip |
merge
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 14 | ||||
-rw-r--r-- | include/config.php | 9 | ||||
-rw-r--r-- | include/event.php | 2 | ||||
-rw-r--r-- | include/expire.php | 2 | ||||
-rw-r--r-- | include/identity.php | 5 | ||||
-rwxr-xr-x | include/text.php | 6 |
6 files changed, 16 insertions, 22 deletions
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 '<video src="' . $link . '" controls="controls" width="' . get_app()->videowidth . '" height="' . $a->videoheight . '"><a href="' . $link . '">' . $link . '</a></video>'; + return '<video controls="controls" src="' . $link . '" style="width:100%; max-width:' . get_app()->videowidth . 'px"><a href="' . $link . '">' . $link . '</a></video>'; } @@ -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", '<img src="$3" style="width: $1px;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="width: 100%; max-width: $1px;" alt="' . t('Image/photo') . '" >', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: $1px;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: 100%; max-width: $1px;" alt="' . 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", '<img src="$3" style="width: $1px; float: left;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '<img src="$3" style="width: 100%; max-width: $1px; float: left;" alt="' . t('Image/photo') . '" >', $Text); } if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '<img src="$3" style="width: $1px; float: right;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '<img src="$3" style="width: 100%; max-width: $1px; float: right;" alt="' . t('Image/photo') . '" >', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: $1px; float: left;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: 100%; max-width: $1px; float: left;" alt="' . t('Image/photo') . '" >', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: $1px; float: right;" alt="' . t('Image/photo') . '" >', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '<img class="zrl" src="$3" style="width: 100%; max-width: $1px; float: right;" alt="' . t('Image/photo') . '" >', $Text); } // style (sanitized) 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']; } } - } 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 = '<div class="vevent">' . "\r\n"; 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) ); 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) |