aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-08 10:56:08 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-08 10:56:08 +0000
commit4801f813cdf07fd029aac9fccea3d8b09d51612e (patch)
tree323f681583723a1ba3893357936c9281079b9c72 /phpBB/includes
parent431e494ae43257bea251a59ed6b2a4bb20eb7fd4 (diff)
downloadforums-4801f813cdf07fd029aac9fccea3d8b09d51612e.tar
forums-4801f813cdf07fd029aac9fccea3d8b09d51612e.tar.gz
forums-4801f813cdf07fd029aac9fccea3d8b09d51612e.tar.bz2
forums-4801f813cdf07fd029aac9fccea3d8b09d51612e.tar.xz
forums-4801f813cdf07fd029aac9fccea3d8b09d51612e.zip
- fix the template error (no headers displayed, wrong ! assignment, wrong check for .loop)
git-svn-id: file:///svn/phpbb/trunk@5766 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/functions_template.php5
2 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 1d1c0b78ea..5f633b0dfd 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -872,7 +872,7 @@ class acp_users
foreach ($var_ary as $var => $default)
{
- $data[$var] = (in_array($var, array('location', 'occupation', 'interests')) ? request_var($var, $default, true) : $data[$var] = request_var($var, $default);
+ $data[$var] = (in_array($var, array('location', 'occupation', 'interests'))) ? request_var($var, $default, true) : $data[$var] = request_var($var, $default);
}
$var_ary = array(
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index 6ed8c4c1ab..540aa329c1 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -259,7 +259,8 @@ class template_compile
if (strpos($tag_args, '!') === 0)
{
- $no_nesting = substr_count($tag_args, '!', 0, strrpos($tag_args, '!') + 1);
+ // Count the number if ! occurrences (not allowed in vars)
+ $no_nesting = substr_count($tag_args, '!');
$tag_args = substr($tag_args, $no_nesting);
}
@@ -450,7 +451,7 @@ class template_compile
{
$token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->_tpldata[\'.\'][0][\'' . $varrefs[3] . '\']');
}
- else if (preg_match('#^\.([a-z0-9\-_]+\.?)+$#s', $token, $varrefs))
+ else if (preg_match('#^\.(([a-z0-9\-_]+\.?)+)$#s', $token, $varrefs))
{
$_tok = $this->generate_block_data_ref($varrefs[1], false);
$token = "(isset($_tok) && sizeof($_tok))";