From 2b06b081d32666ed62e47e7e224c8b4b27d4e9d5 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 17 Mar 2012 01:47:53 -0400 Subject: [PATCH 1/6] Merge branch 'master', remote-tracking branch 'remotes/upstream/master' * remotes/upstream/master: * master: From 87fdae2dd8bdb9e01ce3d98f6ea94d83664cb4c2 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 17 Mar 2012 01:55:40 -0400 Subject: [PATCH 2/6] [fix] whitespace in photo_view and like_noshare. dispy-dark clean up Signed-off-by: Simon L'nu --- view/like_noshare.tpl | 8 ++++---- view/photo_view.tpl | 2 +- view/theme/dispy-dark/photo_view.tpl | 13 +++++-------- view/theme/dispy-dark/theme.php | 3 --- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/view/like_noshare.tpl b/view/like_noshare.tpl index 2c467c3c2..2651ea1f8 100755 --- a/view/like_noshare.tpl +++ b/view/like_noshare.tpl @@ -1,5 +1,5 @@ + + + + diff --git a/view/photo_view.tpl b/view/photo_view.tpl index 5dbcabadf..732caf690 100755 --- a/view/photo_view.tpl +++ b/view/photo_view.tpl @@ -14,7 +14,7 @@
{{ if $nextlink }}{{ endif }}
-
$desc
+
$desc
{{ if $tags }}
$tags.0
$tags.1
diff --git a/view/theme/dispy-dark/photo_view.tpl b/view/theme/dispy-dark/photo_view.tpl index f1209ec58..732caf690 100644 --- a/view/theme/dispy-dark/photo_view.tpl +++ b/view/theme/dispy-dark/photo_view.tpl @@ -4,18 +4,15 @@ - -
- {{ if $prevlink }}{{ endif }} - - {{ if $nextlink }}{{ endif }} +{{ if $lock }} | $lock {{ endif }}
+{{ if $prevlink }}{{ endif }} +
+{{ if $nextlink }}{{ endif }}
$desc
{{ if $tags }} diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index b57971db9..700136173 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -108,9 +108,6 @@ $(document).ready(function() { $(this).css({color: '#eec'}); }); - // make auto-complete work in more places - $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); - /* $('#profile-photo-wrapper').mouseover(function() { $('.profile-edit-side-div').css({display: 'block'}); }).mouseout(function() { From 511d8a30a05f76a08582f2d7a9ccd78dbd744c57 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 23:51:49 -0700 Subject: [PATCH 3/6] scheme checking for webservers without $_SERVER['HTTPS'] --- boot.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 322340e5d..836900fc4 100755 --- a/boot.php +++ b/boot.php @@ -286,7 +286,12 @@ class App { startup(); - $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); + $this->scheme = 'http'; + if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) + $this->scheme = 'https'; + elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + $this->scheme = 'https'; + if(x($_SERVER,'SERVER_NAME')) { $this->hostname = $_SERVER['SERVER_NAME']; From 057a142b8cd01cd8ab6212e9d958989c82dfccc3 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 00:08:52 -0700 Subject: [PATCH 4/6] cut/paste error --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 07b4bfef7..fe570075f 100755 --- a/mod/item.php +++ b/mod/item.php @@ -857,7 +857,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { if(strpos($tag,'@') === 0) { //is it already replaced? if(strpos($tag,'[url=')) - continue; + return; $stat = false; //get the person's name $name = substr($tag,1); From e0e008fb8d894c7fe56fbb88fa96224c0796ea75 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 02:26:52 -0700 Subject: [PATCH 5/6] template processor broken with foreach k=>v and k is integer 0 --- include/template_processor.php | 2 +- mod/admin.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/template_processor.php b/include/template_processor.php index 7f7b0b55b..93bf391c5 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -96,7 +96,7 @@ $this->_push_stack(); $r = $this->r; $r[$varname] = $v; - if ($keyname!='') $r[$keyname] = $k; + if ($keyname!='') $r[$keyname] = (($k === 0) ? '0' : $k); $ret .= $this->replace($args[3], $r); $this->_pop_stack(); } diff --git a/mod/admin.php b/mod/admin.php index 88ccad6d3..a64b26903 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -308,7 +308,7 @@ function admin_page_site(&$a) { SSL_POLICY_FULL => t("Force all links to use SSL"), SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)") ); - + $t = get_markup_template("admin_site.tpl"); return replace_macros($t, array( '$title' => t('Administration'), @@ -325,7 +325,7 @@ function admin_page_site(&$a) { '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices), - '$ssl_policy' => array('ssl_policy', t("SSL link policy"), get_config('system','ssl_policy'), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), + '$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), '$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")), '$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices), From 26258bca77aa3385dacf36874f7f5603eaef9a6b Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 02:36:59 -0700 Subject: [PATCH 6/6] compare ssl_policy precisely in case somebody was bitten by template processor bug --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 836900fc4..b0a631170 100755 --- a/boot.php +++ b/boot.php @@ -385,7 +385,7 @@ class App { $scheme = $this->scheme; if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { - if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL) + if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) $scheme = 'https'; // We need to populate the $ssl flag across the entire program before turning this on.