mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 04:23:38 +01:00
Why did I not do it this way to begin with :)
git-svn-id: file:///svn/phpbb/trunk@9097 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3bd6984785
commit
aa3a2f565b
@ -420,21 +420,24 @@ class template_filter extends php_user_filter
|
|||||||
|
|
||||||
// S_ROW_COUNT is deceptive, it returns the current row number now the number of rows
|
// S_ROW_COUNT is deceptive, it returns the current row number now the number of rows
|
||||||
// hence S_ROW_COUNT is deprecated in favour of S_ROW_NUM
|
// hence S_ROW_COUNT is deprecated in favour of S_ROW_NUM
|
||||||
if ($varrefs[3] == 'S_ROW_NUM' || $varrefs[3] == 'S_ROW_COUNT')
|
switch ($varrefs[3])
|
||||||
{
|
{
|
||||||
$token = "\$_${namespace}_i";
|
case 'S_ROW_NUM':
|
||||||
}
|
case 'S_ROW_COUNT':
|
||||||
else if ($varrefs[3] == 'S_FIRST_ROW')
|
$token = "\$_${namespace}_i";
|
||||||
{
|
break;
|
||||||
$token = "(\$_${namespace}_i == 0)";
|
|
||||||
}
|
case 'S_FIRST_ROW':
|
||||||
else if ($varrefs[3] == 'S_LAST_ROW')
|
$token = "(\$_${namespace}_i == 0)";
|
||||||
{
|
break;
|
||||||
$token = "(\$_${namespace}_i == \$_${namespace}_count - 1)";
|
|
||||||
}
|
case 'S_LAST_ROW':
|
||||||
else
|
$token = "(\$_${namespace}_i == \$_${namespace}_count - 1)";
|
||||||
{
|
break;
|
||||||
$token = $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']';
|
|
||||||
|
default:
|
||||||
|
$token = $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -608,26 +611,29 @@ class template_filter extends php_user_filter
|
|||||||
|
|
||||||
// S_ROW_COUNT is deceptive, it returns the current row number now the number of rows
|
// S_ROW_COUNT is deceptive, it returns the current row number now the number of rows
|
||||||
// hence S_ROW_COUNT is deprecated in favour of S_ROW_NUM
|
// hence S_ROW_COUNT is deprecated in favour of S_ROW_NUM
|
||||||
if ($varname == 'S_ROW_NUM' || $varname == 'S_ROW_COUNT')
|
switch ($varname)
|
||||||
{
|
{
|
||||||
$varref = "\$_${namespace}_i";
|
case 'S_ROW_NUM':
|
||||||
}
|
case 'S_ROW_COUNT':
|
||||||
else if ($varname == 'S_FIRST_ROW')
|
$varref = "\$_${namespace}_i";
|
||||||
{
|
break;
|
||||||
$varref = "(\$_${namespace}_i == 0)";
|
|
||||||
}
|
|
||||||
else if ($varname == 'S_LAST_ROW')
|
|
||||||
{
|
|
||||||
$varref = "(\$_${namespace}_i == \$_${namespace}_count - 1)";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Get a reference to the data block for this namespace.
|
|
||||||
$varref = $this->generate_block_data_ref($namespace, true, $defop);
|
|
||||||
// Prepend the necessary code to stick this in an echo line.
|
|
||||||
|
|
||||||
// Append the variable reference.
|
case 'S_FIRST_ROW':
|
||||||
$varref .= "['$varname']";
|
$varref = "(\$_${namespace}_i == 0)";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'S_LAST_ROW':
|
||||||
|
$varref = "(\$_${namespace}_i == \$_${namespace}_count - 1)";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Get a reference to the data block for this namespace.
|
||||||
|
$varref = $this->generate_block_data_ref($namespace, true, $defop);
|
||||||
|
// Prepend the necessary code to stick this in an echo line.
|
||||||
|
|
||||||
|
// Append the variable reference.
|
||||||
|
$varref .= "['$varname']";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$varref = ($echo) ? "<?php echo $varref; ?>" : ((isset($varref)) ? $varref : '');
|
$varref = ($echo) ? "<?php echo $varref; ?>" : ((isset($varref)) ? $varref : '');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user