array($this, '_callback'),
$tplcontent);
if (count($this->_blockStack)) {
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
return $result;
}
}
if ($count != 0)
- throw new IPF_Exception(sprintf(__('Blocks are not nested properly.')));
+ throw new IPF_Template_Exception('Blocks are not nested properly.');
return $result;
}
{
list(,$tag, $firstcar) = $matches;
if (!preg_match('/^\$|[\'"]|[a-zA-Z\/]$/', $firstcar)) {
- trigger_error(sprintf(__('Invalid tag syntax: %s'), $tag), E_USER_ERROR);
+ trigger_error(sprintf('Invalid tag syntax: %s', $tag), E_USER_ERROR);
return '';
}
if (in_array($firstcar, array('$', '\'', '"'))) {
}
} else {
if (!preg_match('/^(\/?[a-zA-Z0-9_]+)(?:(?:\s+(.*))|(?:\((.*)\)))?$/', $tag, $m)) {
- trigger_error(sprintf(__('Invalid function syntax: %s'), $tag), E_USER_ERROR);
+ trigger_error(sprintf('Invalid function syntax: %s', $tag), E_USER_ERROR);
return '';
}
if (count($m) == 4){
$res = $this->_parseFinal(array_shift($tok), self::$allowedInVar);
foreach ($tok as $modifier) {
if (!preg_match('/^(\w+)(?:\:(.*))?$/', $modifier, $m)) {
- trigger_error(sprintf(__('Invalid modifier syntax: (%s) %s'), $expr, $modifier), E_USER_ERROR);
+ trigger_error(sprintf('Invalid modifier syntax: (%s) %s', $expr, $modifier), E_USER_ERROR);
return '';
}
if ($this->environment->hasModifier($m[1])) {
- trigger_error(sprintf(__('Unknown modifier: (%s) %s'), $expr, $m[1]), E_USER_ERROR);
+ trigger_error(sprintf('Unknown modifier: (%s) %s', $expr, $m[1]), E_USER_ERROR);
return '';
}
break;
case 'else':
if (end($this->_blockStack) != 'if') {
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
$res = 'else: ';
break;
case 'elseif':
if (end($this->_blockStack) != 'if') {
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
$res = 'elseif('.$this->_parseFinal($args, self::$allowedInExpr).'):';
break;
break;
case '/foreach':
if(end($this->_blockStack) != 'foreach'){
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
array_pop($this->_blockStack);
$res =
case '/while':
$short = substr($name,1);
if(end($this->_blockStack) != $short){
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
array_pop($this->_blockStack);
$res = 'end'.$short.'; ';
if (count($this->_literals)) {
$res = '?>'.array_shift($this->_literals).'<?php ';
} else {
- trigger_error(__('End tag of a block missing: literal'), E_USER_ERROR);
+ trigger_error('End tag of a block missing: literal', E_USER_ERROR);
}
break;
case '/literal':
- trigger_error(__('Start tag of a block missing: literal'), E_USER_ERROR);
+ trigger_error('Start tag of a block missing: literal', E_USER_ERROR);
break;
case 'block':
if (isset($this->_extendBlocks[$args]))
case '/blocktrans':
$short = substr($name,1);
if(end($this->_blockStack) != $short){
- trigger_error(sprintf(__('End tag of a block missing: %s'), end($this->_blockStack)), E_USER_ERROR);
+ trigger_error(sprintf('End tag of a block missing: %s', end($this->_blockStack)), E_USER_ERROR);
}
$res = '';
if ($this->_transPlural) {
// Here we start the template tag calls at the template tag
// {tag ...} is not a block, so it must be a function.
if (!$this->environment->isTagAllowed($name)) {
- trigger_error(sprintf(__('The function tag "%s" is not allowed.'), $name), E_USER_ERROR);
+ trigger_error(sprintf('The function tag "%s" is not allowed.', $name), E_USER_ERROR);
}
// $argfct is a string that can be copy/pasted in the PHP code
// but we need the array of args.
} elseif (in_array($type, $allowed)) {
$result[] = $tok;
} else {
- throw new IPF_Exception_Template(sprintf(__('Invalid syntax: (%s) %s.'), $string, $str));
+ throw new IPF_Template_Exception(sprintf('Invalid syntax: (%s) %s.', $string, $str));
}
} else {
if (in_array($tok, $exceptchar)) {
- trigger_error(sprintf(__('Invalid character: (%s) %s.'), $string, $tok), E_USER_ERROR);
+ trigger_error(sprintf('Invalid character: (%s) %s.', $string, $tok), E_USER_ERROR);
} else {
$result[] = $tok;
}