$dbCache["$tpl[filename]"] = $template;
}
}
- foreach ($namearray AS $name)
+ foreach ($namearray as $name)
{
if ($this->dbCacheTable)
{
if (sizeof($this->uncached) > 0)
{
- foreach ($this->uncached AS $name => $count)
+ foreach ($this->uncached as $name => $count)
{
$tpls[] = $name . "($count)";
}
$debugBlock .= "<br />\n" . '<table cellpadding="4" cellspacing="1" border="0" align="center" width="30%" style="background-color: rgb(60, 60, 60); color: white">' . "\n\t" . '<tr><td><strong>Query Debug</strong></td></tr>';
- foreach ($queries AS $query)
+ foreach ($queries as $query)
{
$debugBlock .= "\n\t<tr style=\"background-color: rgb(230, 230, 230); color: black\">";
$debugBlock .= "\n\t\t<td>";
protected function _loadTemplate($name)
{
$path = $this->templateDir . $name . '.' . $this->extension;
- if (is_file($path) AND is_readable($path))
+ if (is_file($path) && is_readable($path))
{
return @file_get_contents($path);
}
for ($i = 0; $i < strlen($template); $i++)
{
// we've run through the template and there's nothing in the stack--done
- if ($i == strlen($template) - 1 AND sizeof($stack) == 0)
+ if ($i == strlen($template) - 1 && sizeof($stack) == 0)
{
return $template;
}
$token = substr($token, 1, strlen($token) - 2);
// language token
- if ($token[0] == '@' AND $token[1] == '\\' AND $token[2] == '"')
+ if ($token[0] == '@' && $token[1] == '\\' && $token[2] == '"')
{
return '" . ' . $this->langcall . '(\'' . str_replace(array('\\\"', "'"), array('"', "\'"), substr($token, 3, strlen($token) - 5)) . '\')' . ' . "';
}
throw new Exception('Invalid language variable index "' . $capture . '"');
}
}
- else if ($template[$i] == '>' AND $template[$i - 1] == '"')
+ else if ($template[$i] == '>' && $template[$i - 1] == '"')
{
// the final variable substitution
$varMap[intval($varNum)] = BSFunctions::substring($template, $capturePos + 3, $i - 2);
// locate else tags
else if (substr($template, $i, strlen($tag_else)) == $tag_else)
{
- if (sizeof($stack) == 0 AND !isset($tag_full['else']))
+ if (sizeof($stack) == 0 && !isset($tag_full['else']))
{
$tag_full['else'] = $i;
}