]> git.mxchange.org Git - friendica.git/commitdiff
template processor broken with foreach k=>v and k is integer 0
authorfriendica <info@friendica.com>
Sat, 17 Mar 2012 09:26:52 +0000 (02:26 -0700)
committerfriendica <info@friendica.com>
Sat, 17 Mar 2012 09:26:52 +0000 (02:26 -0700)
include/template_processor.php
mod/admin.php

index 7f7b0b55bd727c16524d03ebef5ed045f5a7a691..93bf391c5f0a431213dbce2150b8463e3e094856 100755 (executable)
@@ -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();
                        }
index 88ccad6d3e42f9c7f970eba972f04417f132d3bd..a64b2690354fa4ae7397223b8981361bc9835591 100755 (executable)
@@ -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),