Merge remote branch 'upstream/master'

This commit is contained in:
zottel 2012-03-18 01:02:30 +01:00
commit df78c9be0b
8 changed files with 21 additions and 22 deletions

View file

@ -286,7 +286,12 @@ class App {
startup(); 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')) { if(x($_SERVER,'SERVER_NAME')) {
$this->hostname = $_SERVER['SERVER_NAME']; $this->hostname = $_SERVER['SERVER_NAME'];
@ -380,7 +385,7 @@ class App {
$scheme = $this->scheme; $scheme = $this->scheme;
if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { 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'; $scheme = 'https';
// We need to populate the $ssl flag across the entire program before turning this on. // We need to populate the $ssl flag across the entire program before turning this on.

View file

@ -96,7 +96,7 @@
$this->_push_stack(); $this->_push_stack();
$r = $this->r; $r = $this->r;
$r[$varname] = $v; $r[$varname] = $v;
if ($keyname!='') $r[$keyname] = $k; if ($keyname!='') $r[$keyname] = (($k === 0) ? '0' : $k);
$ret .= $this->replace($args[3], $r); $ret .= $this->replace($args[3], $r);
$this->_pop_stack(); $this->_pop_stack();
} }

View file

@ -325,7 +325,7 @@ function admin_page_site(&$a) {
'$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$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), '$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.")), '$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), '$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices),

View file

@ -857,7 +857,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
if(strpos($tag,'@') === 0) { if(strpos($tag,'@') === 0) {
//is it already replaced? //is it already replaced?
if(strpos($tag,'[url=')) if(strpos($tag,'[url='))
continue; return;
$stat = false; $stat = false;
//get the person's name //get the person's name
$name = substr($tag,1); $name = substr($tag,1);

View file

@ -4,18 +4,15 @@
<div id="photo-edit-link-wrap"> <div id="photo-edit-link-wrap">
{{ if $tools }} {{ if $tools }}
<a id="photo-edit-link" href="$tools.edit.0">$tools.edit.1</a> <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> <a id="photo-toprofile-link" href="$tools.profile.0">$tools.profile.1</a>
{{ endif }} {{ endif }}
{{ if $lock }} - <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo$id');" /> {{ endif }} {{ if $lock }} | <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo/$id');" /> {{ endif }}
</div> </div>
<div id="photo-photo">
{{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }} {{ 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> <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 }} {{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
</div>
<div id="photo-photo-end"></div> <div id="photo-photo-end"></div>
<div id="photo-caption">$desc</div> <div id="photo-caption">$desc</div>
{{ if $tags }} {{ if $tags }}

View file

@ -108,9 +108,6 @@ $(document).ready(function() {
$(this).css({color: '#eec'}); $(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-photo-wrapper').mouseover(function() {
$('.profile-edit-side-div').css({display: 'block'}); $('.profile-edit-side-div').css({display: 'block'});
}).mouseout(function() { }).mouseout(function() {