aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-18 01:02:30 +0100
committerzottel <github@zottel.net>2012-03-18 01:02:30 +0100
commitdf78c9be0bab909dfa8cf196f7aaa4ea3423be8c (patch)
tree2dafebccd7de10089eef3dd1356a5760a280b590
parent3bbd82abb3b33f041ec35b85de5bddcd79ed5471 (diff)
parent26258bca77aa3385dacf36874f7f5603eaef9a6b (diff)
downloadvolse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.tar.gz
volse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.tar.bz2
volse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.zip
Merge remote branch 'upstream/master'
-rwxr-xr-xboot.php9
-rwxr-xr-xinclude/template_processor.php2
-rwxr-xr-xmod/admin.php4
-rwxr-xr-xmod/item.php2
-rwxr-xr-xview/like_noshare.tpl8
-rwxr-xr-xview/photo_view.tpl2
-rw-r--r--view/theme/dispy-dark/photo_view.tpl13
-rw-r--r--view/theme/dispy-dark/theme.php3
8 files changed, 21 insertions, 22 deletions
diff --git a/boot.php b/boot.php
index 322340e5d..b0a631170 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'];
@@ -380,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.
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),
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);
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 @@
<div class="wall-item-like-buttons" id="wall-item-like-buttons-$id">
- <a href="#" class="icon like"title="$likethis" onclick="dolike($id,'like'); return false"></a>
- <a href="#" class="icon dislike" title="$nolike" onclick="dolike($id,'dislike'); return false"></a>
- <img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
- </div>
+ <a href="#" class="icon like" title="$likethis" onclick="dolike($id,'like'); return false"></a>
+ <a href="#" class="icon dislike" title="$nolike" onclick="dolike($id,'dislike'); return false"></a>
+ <img id="like-rotator-$id" class="like-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
+</div>
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 @@
<div id="photo-photo"><a href="$photo.href" title="$photo.title"><img src="$photo.src" /></a></div>
{{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
<div id="photo-photo-end"></div>
-<div id="photo-caption" >$desc</div>
+<div id="photo-caption">$desc</div>
{{ if $tags }}
<div id="in-this-photo-text">$tags.0</div>
<div id="in-this-photo">$tags.1</div>
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 @@
<div id="photo-edit-link-wrap">
{{ if $tools }}
<a id="photo-edit-link" href="$tools.edit.0">$tools.edit.1</a>
--
+|
<a id="photo-toprofile-link" href="$tools.profile.0">$tools.profile.1</a>
{{ endif }}
-{{ if $lock }} - <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo$id');" /> {{ endif }}
-</div>
-
-<div id="photo-photo">
- {{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }}
- <a href="$photo.href" title="$photo.title"><img src="$photo.src" /></a>
- {{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
+{{ if $lock }} | <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo/$id');" /> {{ endif }}
</div>
+{{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }}
+<div id="photo-photo"><a href="$photo.href" title="$photo.title"><img src="$photo.src" /></a></div>
+{{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
<div id="photo-photo-end"></div>
<div id="photo-caption">$desc</div>
{{ 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() {