@@ -35,17 +35,17 @@ discard block |
||
| 35 | 35 | * @return null|string |
| 36 | 36 | */ |
| 37 | 37 | public function createFile($name, $data = null) { |
| 38 | - if($this->dirid == 0) |
|
| 39 | - throw new DAV\Exception\Forbidden('Permission denied to create file: '.$name); |
|
| 38 | + if ($this->dirid == 0) |
|
| 39 | + throw new DAV\Exception\Forbidden('Permission denied to create file: ' . $name); |
|
| 40 | 40 | include_once 'include/main/WebUI.php'; |
| 41 | 41 | $adb = PearDatabase::getInstance(); |
| 42 | 42 | $log = vglobal('log'); |
| 43 | 43 | $adb = \PearDatabase::getInstance(); |
| 44 | 44 | $log = \LoggerManager::getLogger('DavToCRM'); |
| 45 | 45 | $user = new \Users(); |
| 46 | - $current_user = $user->retrieveCurrentUserInfoFromFile( $this->exData->crmUserId ); |
|
| 46 | + $current_user = $user->retrieveCurrentUserInfoFromFile($this->exData->crmUserId); |
|
| 47 | 47 | |
| 48 | - $path = trim($this->path, 'files') .'/'.$name; |
|
| 48 | + $path = trim($this->path, 'files') . '/' . $name; |
|
| 49 | 49 | $hash = sha1($path); |
| 50 | 50 | $pathParts = pathinfo($path); |
| 51 | 51 | $localPath = $this->localPath . $name; |
@@ -53,26 +53,26 @@ discard block |
||
| 53 | 53 | $stmt = $this->exData->pdo->prepare('SELECT crmid, smownerid, deleted FROM vtiger_files INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_files.filesid WHERE vtiger_files.hash = ?;'); |
| 54 | 54 | $stmt->execute([$hash]); |
| 55 | 55 | $rows = $stmt->fetch(\PDO::FETCH_ASSOC); |
| 56 | - if($rows !== false && ($rows['smownerid'] != $this->exData->crmUserId || $rows['deleted'] == 1)){ |
|
| 56 | + if ($rows !== false && ($rows['smownerid'] != $this->exData->crmUserId || $rows['deleted'] == 1)) { |
|
| 57 | 57 | throw new DAV\Exception\Conflict('File with name ' . $file . ' could not be located'); |
| 58 | 58 | } |
| 59 | 59 | file_put_contents($this->exData->localStorageDir . $localPath, $data); |
| 60 | 60 | |
| 61 | - if($rows){ |
|
| 62 | - $record = \Vtiger_Record_Model::getInstanceById( $rows['crmid'], 'Files' ); |
|
| 61 | + if ($rows) { |
|
| 62 | + $record = \Vtiger_Record_Model::getInstanceById($rows['crmid'], 'Files'); |
|
| 63 | 63 | $record->set('mode', 'edit'); |
| 64 | - }else{ |
|
| 65 | - $record = \Vtiger_Record_Model::getCleanInstance( 'Files' ); |
|
| 66 | - $record->set( 'assigned_user_id', $this->exData->crmUserId ); |
|
| 64 | + } else { |
|
| 65 | + $record = \Vtiger_Record_Model::getCleanInstance('Files'); |
|
| 66 | + $record->set('assigned_user_id', $this->exData->crmUserId); |
|
| 67 | 67 | } |
| 68 | - $record->set( 'title', $pathParts['filename'] ); |
|
| 69 | - $record->set( 'name', $pathParts['filename'] ); |
|
| 70 | - $record->set( 'path', $localPath ); |
|
| 68 | + $record->set('title', $pathParts['filename']); |
|
| 69 | + $record->set('name', $pathParts['filename']); |
|
| 70 | + $record->set('path', $localPath); |
|
| 71 | 71 | $record->save(); |
| 72 | 72 | $id = $record->getId(); |
| 73 | 73 | |
| 74 | 74 | $stmt = $this->exData->pdo->prepare('UPDATE vtiger_files SET dirid=?,extension=?,size=?,hash=?,ctime=? WHERE filesid=?;'); |
| 75 | - $stmt->execute([$this->dirid, $pathParts['extension'], filesize ( $this->exData->localStorageDir . $localPath ), $hash, date('Y-m-d H:i:s'), $id]); |
|
| 75 | + $stmt->execute([$this->dirid, $pathParts['extension'], filesize($this->exData->localStorageDir . $localPath), $hash, date('Y-m-d H:i:s'), $id]); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | * @return void |
| 83 | 83 | */ |
| 84 | 84 | public function createDirectory($name) { |
| 85 | - if($this->dirid == 0) |
|
| 86 | - throw new DAV\Exception\Forbidden('Permission denied to create directory: '.$name); |
|
| 85 | + if ($this->dirid == 0) |
|
| 86 | + throw new DAV\Exception\Forbidden('Permission denied to create directory: ' . $name); |
|
| 87 | 87 | $path = trim($this->path, 'files') . '/' . $name . '/'; |
| 88 | 88 | $dirHash = sha1($path); |
| 89 | - $newPath = $this->localPath . $name. '/'; |
|
| 89 | + $newPath = $this->localPath . $name . '/'; |
|
| 90 | 90 | $parent_dirid = $this->dirid; |
| 91 | 91 | mkdir($this->exData->localStorageDir . $newPath); |
| 92 | 92 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $path = '/'; |
| 99 | 99 | $dirHash = sha1($path); |
| 100 | 100 | $stmt = $this->exData->pdo->prepare('SELECT id, path, size, UNIX_TIMESTAMP(`mtime`) AS mtime FROM vtiger_files_dir WHERE hash = ? && userid IN (?,?);'); |
| 101 | - $stmt->execute([$dirHash,0, $this->exData->crmUserId]); |
|
| 101 | + $stmt->execute([$dirHash, 0, $this->exData->crmUserId]); |
|
| 102 | 102 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
| 103 | 103 | |
| 104 | 104 | $this->mtime = $row['mtime']; |
@@ -122,9 +122,9 @@ discard block |
||
| 122 | 122 | $path = trim($this->path, 'files') . '/' . $file . '/'; |
| 123 | 123 | $hash = sha1($path); |
| 124 | 124 | $stmt = $this->exData->pdo->prepare('SELECT id, path, size, UNIX_TIMESTAMP(`mtime`) AS mtime FROM vtiger_files_dir WHERE hash = ? && userid IN (?,?);'); |
| 125 | - $stmt->execute([$hash,0, $this->exData->crmUserId]); |
|
| 125 | + $stmt->execute([$hash, 0, $this->exData->crmUserId]); |
|
| 126 | 126 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
| 127 | - if ($row){ |
|
| 127 | + if ($row) { |
|
| 128 | 128 | $directory = new WebDAV_Directory($this->path . '/' . $file, $this->exData); |
| 129 | 129 | $directory->mtime = $row['mtime']; |
| 130 | 130 | $directory->size = $row['size']; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $stmt = $this->exData->pdo->prepare('SELECT filesid, path, size, UNIX_TIMESTAMP(`mtime`) AS mtime FROM vtiger_files INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_files.filesid WHERE vtiger_files.hash = ? && vtiger_crmentity.deleted = ? && vtiger_crmentity.smownerid = ?;'); |
| 138 | 138 | $stmt->execute([$hash, 0, $this->exData->crmUserId]); |
| 139 | 139 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
| 140 | - if ($row){ |
|
| 140 | + if ($row) { |
|
| 141 | 141 | $directory = new WebDAV_File($this->path . '/' . $file, $this->exData); |
| 142 | 142 | $directory->size = $row['size']; |
| 143 | 143 | $directory->localPath = $row['path']; |
@@ -222,19 +222,19 @@ discard block |
||
| 222 | 222 | * @return void |
| 223 | 223 | */ |
| 224 | 224 | public function setName($name) { |
| 225 | - list($parentLocalPath, ) = URLUtil::splitPath($this->localPath); |
|
| 226 | - list($parentPath, ) = URLUtil::splitPath($this->path); |
|
| 225 | + list($parentLocalPath,) = URLUtil::splitPath($this->localPath); |
|
| 226 | + list($parentPath,) = URLUtil::splitPath($this->path); |
|
| 227 | 227 | list(, $newName) = URLUtil::splitPath($name); |
| 228 | - $newPath = $parentLocalPath . '/' . $newName.'/'; |
|
| 229 | - $path = trim($parentPath, 'files') . '/' . $newName.'/'; |
|
| 228 | + $newPath = $parentLocalPath . '/' . $newName . '/'; |
|
| 229 | + $path = trim($parentPath, 'files') . '/' . $newName . '/'; |
|
| 230 | 230 | $hash = sha1($path); |
| 231 | 231 | |
| 232 | 232 | $log = print_r([$this->exData->pdo, $name, $newPath, $hash, date('Y-m-d H:i:s'), $this->dirid], true); |
| 233 | - file_put_contents('cache/logs/xxebug.log', ' --- '.date('Y-m-d H:i:s').' --- RequestInterface --- '.PHP_EOL.$log, FILE_APPEND); |
|
| 233 | + file_put_contents('cache/logs/xxebug.log', ' --- ' . date('Y-m-d H:i:s') . ' --- RequestInterface --- ' . PHP_EOL . $log, FILE_APPEND); |
|
| 234 | 234 | |
| 235 | 235 | $stmt = $this->exData->pdo->prepare('UPDATE vtiger_files_dir SET name=?, path = ?, hash=?, mtime=? WHERE id=?;'); |
| 236 | 236 | $stmt->execute([$name, $newPath, $hash, date('Y-m-d H:i:s'), $this->dirid]); |
| 237 | - rename($this->exData->localStorageDir .$this->localPath, $this->exData->localStorageDir .$newPath); |
|
| 237 | + rename($this->exData->localStorageDir . $this->localPath, $this->exData->localStorageDir . $newPath); |
|
| 238 | 238 | $this->path = $newPath; |
| 239 | 239 | } |
| 240 | 240 | |
@@ -259,8 +259,8 @@ discard block |
||
| 259 | 259 | * @return bool |
| 260 | 260 | */ |
| 261 | 261 | public function moveInto($targetName, $sourcePath, DAV\INode $sourceNode) { |
| 262 | - $log = print_r([$targetName, $sourcePath, $sourceNode,$this], true); |
|
| 263 | - file_put_contents('cache/logs/xxebug.log', ' --- '.date('Y-m-d H:i:s').' --- RequestInterface --- '.PHP_EOL.$log, FILE_APPEND); |
|
| 262 | + $log = print_r([$targetName, $sourcePath, $sourceNode, $this], true); |
|
| 263 | + file_put_contents('cache/logs/xxebug.log', ' --- ' . date('Y-m-d H:i:s') . ' --- RequestInterface --- ' . PHP_EOL . $log, FILE_APPEND); |
|
| 264 | 264 | |
| 265 | 265 | if (!$sourceNode instanceof WebDAV_File) { |
| 266 | 266 | return false; |
@@ -41,38 +41,38 @@ discard block |
||
| 41 | 41 | * appenders of their ancestors by default. |
| 42 | 42 | * @var boolean |
| 43 | 43 | */ |
| 44 | - public $additive = true; |
|
| 44 | + public $additive = true; |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @var string fully qualified class name |
| 48 | 48 | */ |
| 49 | - public $fqcn = 'LoggerCategory'; |
|
| 49 | + public $fqcn = 'LoggerCategory'; |
|
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | 52 | * @var LoggerLevel The assigned level of this category. |
| 53 | 53 | */ |
| 54 | - public $level = null; |
|
| 54 | + public $level = null; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * @var string name of this category. |
| 58 | 58 | */ |
| 59 | - public $name = ''; |
|
| 59 | + public $name = ''; |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * @var Logger The parent of this category. |
| 63 | 63 | */ |
| 64 | - public $parent = null; |
|
| 64 | + public $parent = null; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @var LoggerHierarchy the object repository |
| 68 | 68 | */ |
| 69 | - public $repository = null; |
|
| 69 | + public $repository = null; |
|
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * @var array collection of appenders |
| 73 | 73 | * @see LoggerAppender |
| 74 | 74 | */ |
| 75 | - public $aai = array(); |
|
| 75 | + public $aai = array(); |
|
| 76 | 76 | |
| 77 | 77 | /* --------------------------------------------------------------------------*/ |
| 78 | 78 | /* --------------------------------------------------------------------------*/ |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | public function addAppender(&$newAppender) |
| 97 | 97 | { |
| 98 | 98 | $appenderName = $newAppender->getName(); |
| 99 | - $this->aai[$appenderName] =& $newAppender; |
|
| 99 | + $this->aai[$appenderName] = & $newAppender; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | if ($errorLevel->isGreaterOrEqual($this->getEffectiveLevel())) { |
| 162 | 162 | $this->forcedLog($this->fqcn, $caller, $errorLevel, $message); |
| 163 | - $this->forcedLog($this->fqcn, $caller, $errorLevel, PHP_EOL.vtlib\Functions::getBacktrace(1)); |
|
| 163 | + $this->forcedLog($this->fqcn, $caller, $errorLevel, PHP_EOL . vtlib\Functions::getBacktrace(1)); |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $enumAppenders = sizeof($appenderNames); |
| 231 | 231 | for ($i = 0; $i < $enumAppenders; $i++) { |
| 232 | 232 | $appenderName = $appenderNames[$i]; |
| 233 | - $appenders[] =& $this->aai[$appenderName]; |
|
| 233 | + $appenders[] = & $this->aai[$appenderName]; |
|
| 234 | 234 | } |
| 235 | 235 | return $appenders; |
| 236 | 236 | } |
@@ -287,8 +287,8 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | public function getEffectiveLevel() |
| 289 | 289 | { |
| 290 | - for($c = $this; $c !== null; $c = $c->parent) { |
|
| 291 | - if($c->level !== null) |
|
| 290 | + for ($c = $this; $c !== null; $c = $c->parent) { |
|
| 291 | + if ($c->level !== null) |
|
| 292 | 292 | return $c->level; |
| 293 | 293 | } |
| 294 | 294 | return null; |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | if ($this->repository->isDisabled($level)) { |
| 425 | 425 | return false; |
| 426 | 426 | } |
| 427 | - return (bool)($level->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 427 | + return (bool) ($level->isGreaterOrEqual($this->getEffectiveLevel())); |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | /** |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | */ |
| 502 | 502 | public function setAdditivity($additive) |
| 503 | 503 | { |
| 504 | - $this->additive = (bool)$additive; |
|
| 504 | + $this->additive = (bool) $additive; |
|
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | /** |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | */ |
| 522 | 522 | public function setHierarchy(&$repository) |
| 523 | 523 | { |
| 524 | - $this->repository =& $repository; |
|
| 524 | + $this->repository = & $repository; |
|
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | /** |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..'); |
| 24 | 24 | |
| 25 | -define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS_PREFIX', 'log4j'); |
|
| 26 | -define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS', 'http://jakarta.apache.org/log4j/'); |
|
| 25 | +define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS_PREFIX', 'log4j'); |
|
| 26 | +define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4J_NS', 'http://jakarta.apache.org/log4j/'); |
|
| 27 | 27 | |
| 28 | -define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX', 'log4php'); |
|
| 29 | -define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS', 'http://www.vxr.it/log4php/'); |
|
| 28 | +define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX', 'log4php'); |
|
| 29 | +define('LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS', 'http://www.vxr.it/log4php/'); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | */ |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function getHeader() |
| 99 | 99 | { |
| 100 | - return "<{$this->_namespacePrefix}:eventSet ". |
|
| 101 | - "xmlns:{$this->_namespacePrefix}=\"{$this->_namespace}\" ". |
|
| 102 | - "version=\"0.3\" ". |
|
| 103 | - "includesLocationInfo=\"".($this->getLocationInfo() ? "true" : "false")."\"". |
|
| 100 | + return "<{$this->_namespacePrefix}:eventSet " . |
|
| 101 | + "xmlns:{$this->_namespacePrefix}=\"{$this->_namespace}\" " . |
|
| 102 | + "version=\"0.3\" " . |
|
| 103 | + "includesLocationInfo=\"" . ($this->getLocationInfo() ? "true" : "false") . "\"" . |
|
| 104 | 104 | ">\r\n"; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | public function format($event) |
| 114 | 114 | { |
| 115 | 115 | $loggerName = $event->getLoggerName(); |
| 116 | - $timeStamp = number_format((float)($event->getTimeStamp() * 1000), 0, '', ''); |
|
| 116 | + $timeStamp = number_format((float) ($event->getTimeStamp() * 1000), 0, '', ''); |
|
| 117 | 117 | $thread = $event->getThreadName(); |
| 118 | 118 | $level = $event->getLevel(); |
| 119 | 119 | $levelStr = $level->toString(); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $buf .= "]]></{$this->_namespacePrefix}:message>\r\n"; |
| 125 | 125 | |
| 126 | 126 | $ndc = $event->getNDC(); |
| 127 | - if($ndc !== null) { |
|
| 127 | + if ($ndc !== null) { |
|
| 128 | 128 | $buf .= "<{$this->_namespacePrefix}:NDC><![CDATA["; |
| 129 | 129 | LoggerTransform::appendEscapingCDATA($buf, $ndc); |
| 130 | 130 | $buf .= "]]></{$this->_namespacePrefix}:NDC>\r\n"; |
@@ -132,10 +132,10 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | if ($this->getLocationInfo()) { |
| 134 | 134 | $locationInfo = $event->getLocationInformation(); |
| 135 | - $buf .= "<{$this->_namespacePrefix}:locationInfo ". |
|
| 136 | - "class=\"" . $locationInfo->getClassName() . "\" ". |
|
| 137 | - "file=\"" . htmlentities($locationInfo->getFileName(), ENT_QUOTES) . "\" ". |
|
| 138 | - "line=\"" . $locationInfo->getLineNumber() . "\" ". |
|
| 135 | + $buf .= "<{$this->_namespacePrefix}:locationInfo " . |
|
| 136 | + "class=\"" . $locationInfo->getClassName() . "\" " . |
|
| 137 | + "file=\"" . htmlentities($locationInfo->getFileName(), ENT_QUOTES) . "\" " . |
|
| 138 | + "line=\"" . $locationInfo->getLineNumber() . "\" " . |
|
| 139 | 139 | "method=\"" . $locationInfo->getMethodName() . "\" "; |
| 140 | 140 | $buf .= "/>\r\n"; |
| 141 | 141 | |
@@ -44,13 +44,13 @@ discard block |
||
| 44 | 44 | * String constant designating no time information. Current value of |
| 45 | 45 | * this constant is <b>NULL</b>. |
| 46 | 46 | */ |
| 47 | -define ('LOG4PHP_LOGGER_LAYOUT_NULL_DATE_FORMAT', 'NULL'); |
|
| 47 | +define('LOG4PHP_LOGGER_LAYOUT_NULL_DATE_FORMAT', 'NULL'); |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * String constant designating relative time. Current value of |
| 51 | 51 | * this constant is <b>RELATIVE</b>. |
| 52 | 52 | */ |
| 53 | -define ('LOG4PHP_LOGGER_LAYOUT_RELATIVE_TIME_DATE_FORMAT', 'RELATIVE'); |
|
| 53 | +define('LOG4PHP_LOGGER_LAYOUT_RELATIVE_TIME_DATE_FORMAT', 'RELATIVE'); |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * TTCC layout format consists of time, thread, category and nested |
@@ -108,8 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | |
| 110 | 110 | $this->threadPrinting = is_bool($threadPrinting) ? |
| 111 | - $threadPrinting : |
|
| 112 | - (bool)(strtolower($threadPrinting) == 'true'); |
|
| 111 | + $threadPrinting : (bool) (strtolower($threadPrinting) == 'true'); |
|
| 113 | 112 | } |
| 114 | 113 | |
| 115 | 114 | /** |
@@ -126,8 +125,7 @@ discard block |
||
| 126 | 125 | public function setCategoryPrefixing($categoryPrefixing) |
| 127 | 126 | { |
| 128 | 127 | $this->categoryPrefixing = is_bool($categoryPrefixing) ? |
| 129 | - $categoryPrefixing : |
|
| 130 | - (bool)(strtolower($categoryPrefixing) == 'true'); |
|
| 128 | + $categoryPrefixing : (bool) (strtolower($categoryPrefixing) == 'true'); |
|
| 131 | 129 | } |
| 132 | 130 | |
| 133 | 131 | /** |
@@ -144,8 +142,7 @@ discard block |
||
| 144 | 142 | */ |
| 145 | 143 | public function setContextPrinting($contextPrinting) { |
| 146 | 144 | $this->contextPrinting = is_bool($contextPrinting) ? |
| 147 | - $contextPrinting : |
|
| 148 | - (bool)(strtolower($contextPrinting) == 'true'); |
|
| 145 | + $contextPrinting : (bool) (strtolower($contextPrinting) == 'true'); |
|
| 149 | 146 | } |
| 150 | 147 | |
| 151 | 148 | /** |
@@ -163,8 +160,7 @@ discard block |
||
| 163 | 160 | */ |
| 164 | 161 | public function setMicroSecondsPrinting($microSecondsPrinting) { |
| 165 | 162 | $this->microSecondsPrinting = is_bool($microSecondsPrinting) ? |
| 166 | - $microSecondsPrinting : |
|
| 167 | - (bool)(strtolower($microSecondsPrinting) == 'true'); |
|
| 163 | + $microSecondsPrinting : (bool) (strtolower($microSecondsPrinting) == 'true'); |
|
| 168 | 164 | } |
| 169 | 165 | |
| 170 | 166 | /** |
@@ -199,34 +195,34 @@ discard block |
||
| 199 | 195 | */ |
| 200 | 196 | public function format($event) |
| 201 | 197 | { |
| 202 | - $timeStamp = (float)$event->getTimeStamp(); |
|
| 203 | - $format = strftime($this->dateFormat, (int)$timeStamp); |
|
| 198 | + $timeStamp = (float) $event->getTimeStamp(); |
|
| 199 | + $format = strftime($this->dateFormat, (int) $timeStamp); |
|
| 204 | 200 | |
| 205 | 201 | if ($this->microSecondsPrinting) { |
| 206 | - $usecs = round(($timeStamp - (int)$timeStamp) * 1000); |
|
| 202 | + $usecs = round(($timeStamp - (int) $timeStamp) * 1000); |
|
| 207 | 203 | $format .= sprintf(',%03d', $usecs); |
| 208 | 204 | } |
| 209 | 205 | |
| 210 | 206 | $format .= ' '; |
| 211 | 207 | |
| 212 | 208 | if ($this->threadPrinting) |
| 213 | - $format .= '['.getmypid().'] '; |
|
| 209 | + $format .= '[' . getmypid() . '] '; |
|
| 214 | 210 | |
| 215 | 211 | $level = $event->getLevel(); |
| 216 | - $format .= $level->toString().' '; |
|
| 212 | + $format .= $level->toString() . ' '; |
|
| 217 | 213 | |
| 218 | - if($this->categoryPrefixing) { |
|
| 219 | - $format .= $event->getLoggerName().' '; |
|
| 214 | + if ($this->categoryPrefixing) { |
|
| 215 | + $format .= $event->getLoggerName() . ' '; |
|
| 220 | 216 | } |
| 221 | 217 | |
| 222 | - if($this->contextPrinting) { |
|
| 218 | + if ($this->contextPrinting) { |
|
| 223 | 219 | $ndc = $event->getNDC(); |
| 224 | - if($ndc !== null) { |
|
| 225 | - $format .= $ndc.' '; |
|
| 220 | + if ($ndc !== null) { |
|
| 221 | + $format .= $ndc . ' '; |
|
| 226 | 222 | } |
| 227 | 223 | } |
| 228 | 224 | |
| 229 | - $format .= '- '.$event->getRenderedMessage(); |
|
| 225 | + $format .= '- ' . $event->getRenderedMessage(); |
|
| 230 | 226 | $format .= LOG4PHP_LINE_SEP; |
| 231 | 227 | |
| 232 | 228 | return $format; |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | protected $p = -1; |
| 57 | 57 | |
| 58 | - public function __construct($tokenSource, $channel=null) { |
|
| 58 | + public function __construct($tokenSource, $channel = null) { |
|
| 59 | 59 | $this->channel = TokenConst::$DEFAULT_CHANNEL; |
| 60 | 60 | $this->tokens = array(); |
| 61 | 61 | $this->tokenSource = $tokenSource; |
| 62 | - if($channel !== null){ |
|
| 62 | + if ($channel !== null) { |
|
| 63 | 63 | $this->channel = $channel; |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -79,24 +79,24 @@ discard block |
||
| 79 | 79 | protected function fillBuffer() { |
| 80 | 80 | $index = 0; |
| 81 | 81 | $t = $this->tokenSource->nextToken(); |
| 82 | - while ( $t!=null && $t->getType()!=CharStreamConst::$EOF ) { |
|
| 82 | + while ($t != null && $t->getType() != CharStreamConst::$EOF) { |
|
| 83 | 83 | $discard = false; |
| 84 | 84 | // is there a channel override for token type? |
| 85 | - if ( $this->channelOverrideMap!=null ) { |
|
| 85 | + if ($this->channelOverrideMap != null) { |
|
| 86 | 86 | $channelI = $this->channelOverrideMap[$t->getType()]; |
| 87 | - if ( $channelI!=null ) { |
|
| 87 | + if ($channelI != null) { |
|
| 88 | 88 | $t->setChannel($channelI); |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | - if ( $this->discardSet!=null && |
|
| 91 | + if ($this->discardSet != null && |
|
| 92 | 92 | $this->discardSet->contains($t->getType())) |
| 93 | 93 | { |
| 94 | 94 | $discard = true; |
| 95 | 95 | } |
| 96 | - else if ( $this->discardOffChannelTokens && $t->getChannel()!=$this->channel ) { |
|
| 96 | + else if ($this->discardOffChannelTokens && $t->getChannel() != $this->channel) { |
|
| 97 | 97 | $discard = true; |
| 98 | 98 | } |
| 99 | - if ( !$discard ) { |
|
| 99 | + if (!$discard) { |
|
| 100 | 100 | $t->setTokenIndex($index); |
| 101 | 101 | $this->tokens[] = $t; |
| 102 | 102 | $index++; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * Walk past any token not on the channel the parser is listening to. |
| 117 | 117 | */ |
| 118 | 118 | public function consume() { |
| 119 | - if ( $this->p<sizeof($this->tokens)) { |
|
| 119 | + if ($this->p < sizeof($this->tokens)) { |
|
| 120 | 120 | $this->p++; |
| 121 | 121 | $this->p = $this->skipOffTokenChannels($this->p); // leave p on valid token |
| 122 | 122 | } |
@@ -127,14 +127,14 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | protected function skipOffTokenChannels($i) { |
| 129 | 129 | $n = sizeof($this->tokens); |
| 130 | - while ( $i<$n && $this->tokens[$i]->getChannel()!=$this->channel ) { |
|
| 130 | + while ($i < $n && $this->tokens[$i]->getChannel() != $this->channel) { |
|
| 131 | 131 | $i++; |
| 132 | 132 | } |
| 133 | 133 | return $i; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | protected function skipOffTokenChannelsReverse($i) { |
| 137 | - while ( $i>=0 && $this->tokens[$i]->getChannel()!=$this->channel) { |
|
| 137 | + while ($i >= 0 && $this->tokens[$i]->getChannel() != $this->channel) { |
|
| 138 | 138 | $i--; |
| 139 | 139 | } |
| 140 | 140 | return $i; |
@@ -147,17 +147,17 @@ discard block |
||
| 147 | 147 | * channel. |
| 148 | 148 | */ |
| 149 | 149 | public function setTokenTypeChannel($ttype, $channel) { |
| 150 | - if ( $this->channelOverrideMap==null ) { |
|
| 150 | + if ($this->channelOverrideMap == null) { |
|
| 151 | 151 | $this->channelOverrideMap = array(); |
| 152 | 152 | } |
| 153 | 153 | $this->channelOverrideMap[$ttype] = $channel; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | public function discardTokenType($ttype) { |
| 157 | - if ( $this->discardSet==null ) { |
|
| 157 | + if ($this->discardSet == null) { |
|
| 158 | 158 | $this->discardSet = new Set(); |
| 159 | 159 | } |
| 160 | - $this->discardSet.add($ttype); |
|
| 160 | + $this->discardSet . add($ttype); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | public function discardOffChannelTokens($discardOffChannelTokens) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | public function getTokens() { |
| 168 | - if ( $this->p == -1 ) { |
|
| 168 | + if ($this->p == -1) { |
|
| 169 | 169 | $this->fillBuffer(); |
| 170 | 170 | } |
| 171 | 171 | return $this->tokens; |
@@ -180,35 +180,35 @@ discard block |
||
| 180 | 180 | * method looks at both on and off channel tokens. |
| 181 | 181 | */ |
| 182 | 182 | public function getTokensOfTypeInSet($start, $stop, $types) { |
| 183 | - if ( $p == -1 ) { |
|
| 183 | + if ($p == -1) { |
|
| 184 | 184 | fillBuffer(); |
| 185 | 185 | } |
| 186 | - if ( $stop>=sizeof($this->tokens)) { |
|
| 187 | - $stop=sizeof($this->tokens) - 1; |
|
| 186 | + if ($stop >= sizeof($this->tokens)) { |
|
| 187 | + $stop = sizeof($this->tokens) - 1; |
|
| 188 | 188 | } |
| 189 | - if ( $start<0 ) { |
|
| 190 | - $start=0; |
|
| 189 | + if ($start < 0) { |
|
| 190 | + $start = 0; |
|
| 191 | 191 | } |
| 192 | - if ( $start>$stop ) { |
|
| 192 | + if ($start > $stop) { |
|
| 193 | 193 | return null; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | // list = tokens[start:stop]:{Token t, t.getType() in types} |
| 197 | 197 | $filteredTokens = array(); |
| 198 | - for ($i=$start; $i<=$stop; $i++) { |
|
| 198 | + for ($i = $start; $i <= $stop; $i++) { |
|
| 199 | 199 | $t = $this->tokens[$i]; |
| 200 | - if ( $types==null || $types->member($t->getType())) { |
|
| 200 | + if ($types == null || $types->member($t->getType())) { |
|
| 201 | 201 | $filteredTokens->add($t); |
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | - if ( sizeof($filteredTokens)==0 ) { |
|
| 204 | + if (sizeof($filteredTokens) == 0) { |
|
| 205 | 205 | $filteredTokens = null; |
| 206 | 206 | } |
| 207 | 207 | return $filteredTokens; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | public function getTokensOfTypeInArray($start, $stop, $types) { |
| 211 | - return $this->getTokens($start, $stop,new Set(types)); |
|
| 211 | + return $this->getTokens($start, $stop, new Set(types)); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | public function getTokensofType($start, $stop, $ttype) { |
@@ -219,29 +219,29 @@ discard block |
||
| 219 | 219 | * first symbol of lookahead. |
| 220 | 220 | */ |
| 221 | 221 | public function LT($k) { |
| 222 | - if ( $this->p == -1 ) { |
|
| 222 | + if ($this->p == -1) { |
|
| 223 | 223 | $this->fillBuffer(); |
| 224 | 224 | } |
| 225 | - if ( $k==0 ) { |
|
| 225 | + if ($k == 0) { |
|
| 226 | 226 | return null; |
| 227 | 227 | } |
| 228 | - if ( $k<0 ) { |
|
| 228 | + if ($k < 0) { |
|
| 229 | 229 | return $this->LB(-$k); |
| 230 | 230 | } |
| 231 | 231 | //System.out.print("LT(p="+p+","+k+")="); |
| 232 | - if ( ($this->p+$k-1) >= sizeof($this->tokens)) { |
|
| 232 | + if (($this->p + $k - 1) >= sizeof($this->tokens)) { |
|
| 233 | 233 | return TokenConst::$EOF_TOKEN; |
| 234 | 234 | } |
| 235 | 235 | //System.out.println(tokens.get(p+k-1)); |
| 236 | 236 | $i = $this->p; |
| 237 | 237 | $n = 1; |
| 238 | 238 | // find k good tokens |
| 239 | - while ( $n<$k ) { |
|
| 239 | + while ($n < $k) { |
|
| 240 | 240 | // skip off-channel tokens |
| 241 | - $i = $this->skipOffTokenChannels($i+1); // leave p on valid token |
|
| 241 | + $i = $this->skipOffTokenChannels($i + 1); // leave p on valid token |
|
| 242 | 242 | $n++; |
| 243 | 243 | } |
| 244 | - if ( $i>=sizeof($this->tokens)) { |
|
| 244 | + if ($i >= sizeof($this->tokens)) { |
|
| 245 | 245 | return TokenConst::$EOF_TOKEN; |
| 246 | 246 | } |
| 247 | 247 | return $this->tokens[$i]; |
@@ -250,13 +250,13 @@ discard block |
||
| 250 | 250 | /** Look backwards k tokens on-channel tokens */ |
| 251 | 251 | protected function LB($k) { |
| 252 | 252 | //System.out.print("LB(p="+p+","+k+") "); |
| 253 | - if ( $this->p == -1 ) { |
|
| 253 | + if ($this->p == -1) { |
|
| 254 | 254 | $this->fillBuffer(); |
| 255 | 255 | } |
| 256 | - if ( $k==0 ) { |
|
| 256 | + if ($k == 0) { |
|
| 257 | 257 | return null; |
| 258 | 258 | } |
| 259 | - if ( ($this->p-$k)<0 ) { |
|
| 259 | + if (($this->p - $k) < 0) { |
|
| 260 | 260 | return null; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | $i = $this->p; |
| 265 | 265 | $n = 1; |
| 266 | 266 | // find k good tokens looking backwards |
| 267 | - while ( $n<=$k ) { |
|
| 267 | + while ($n <= $k) { |
|
| 268 | 268 | // skip off-channel tokens |
| 269 | - $i = $this->skipOffTokenChannelsReverse($i-1); // leave p on valid token |
|
| 269 | + $i = $this->skipOffTokenChannelsReverse($i - 1); // leave p on valid token |
|
| 270 | 270 | $n++; |
| 271 | 271 | } |
| 272 | - if ( $i<0 ) { |
|
| 272 | + if ($i < 0) { |
|
| 273 | 273 | return null; |
| 274 | 274 | } |
| 275 | 275 | return $this->tokens[$i]; |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | public function mark() { |
| 291 | - if ( $this->p == -1 ) { |
|
| 291 | + if ($this->p == -1) { |
|
| 292 | 292 | $this->fillBuffer(); |
| 293 | 293 | } |
| 294 | 294 | $this->lastMarker = $this->index(); |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | public function rewind($marker = null) { |
| 311 | - if($marker===null){ |
|
| 311 | + if ($marker === null) { |
|
| 312 | 312 | $marker = $this->lastmarker; |
| 313 | 313 | } |
| 314 | 314 | $this->seek($marker); |
@@ -333,38 +333,38 @@ discard block |
||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | public function toString() { |
| 336 | - if ( $this->p == -1 ) { |
|
| 336 | + if ($this->p == -1) { |
|
| 337 | 337 | $this->fillBuffer(); |
| 338 | 338 | } |
| 339 | - return $this->toStringBetween(0, sizeof($this->tokens)-1); |
|
| 339 | + return $this->toStringBetween(0, sizeof($this->tokens) - 1); |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | public function toStringBetween($start, $stop) { |
| 343 | - if ( $start<0 || $stop<0 ) { |
|
| 343 | + if ($start < 0 || $stop < 0) { |
|
| 344 | 344 | return null; |
| 345 | 345 | } |
| 346 | - if ( $this->p == -1 ) { |
|
| 346 | + if ($this->p == -1) { |
|
| 347 | 347 | $this->fillBuffer(); |
| 348 | 348 | } |
| 349 | - if ( $stop>=sizeof($this->tokens)) { |
|
| 350 | - $stop = sizeof($this->tokens)-1; |
|
| 349 | + if ($stop >= sizeof($this->tokens)) { |
|
| 350 | + $stop = sizeof($this->tokens) - 1; |
|
| 351 | 351 | } |
| 352 | 352 | $buf = ""; |
| 353 | 353 | for ($i = $start; $i <= $stop; $i++) { |
| 354 | 354 | $t = $this->tokens[$i]; |
| 355 | - $buf.=$t->getText(); |
|
| 355 | + $buf .= $t->getText(); |
|
| 356 | 356 | } |
| 357 | 357 | return $buf; |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | public function toStringBetweenTokens($start, $stop) { |
| 361 | - if ( $start!=null && $stop!=null ) { |
|
| 361 | + if ($start != null && $stop != null) { |
|
| 362 | 362 | return toString($this->start->getTokenIndex(), $this->stop->getTokenIndex()); |
| 363 | 363 | } |
| 364 | 364 | return null; |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | - public function __toString(){ |
|
| 367 | + public function __toString() { |
|
| 368 | 368 | return $this->toString(); |
| 369 | 369 | } |
| 370 | 370 | } |
@@ -28,18 +28,18 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function offsetExists($offset) |
| 30 | 30 | { |
| 31 | - return isset($this->metadata[ $offset ]); |
|
| 31 | + return isset($this->metadata[$offset]); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function offsetGet($offset) |
| 35 | 35 | { |
| 36 | - return $this->metadata[ $offset ]; |
|
| 36 | + return $this->metadata[$offset]; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public function offsetSet($offset, $value) |
| 40 | 40 | { |
| 41 | 41 | if ($offset === null) { |
| 42 | - if (isset($value[ 0 ])) { |
|
| 42 | + if (isset($value[0])) { |
|
| 43 | 43 | $x = ($value instanceof TP_yyToken) ? $value->metadata : $value; |
| 44 | 44 | $this->metadata = array_merge($this->metadata, $x); |
| 45 | 45 | |
@@ -52,23 +52,23 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | if ($value instanceof TP_yyToken) { |
| 54 | 54 | if ($value->metadata) { |
| 55 | - $this->metadata[ $offset ] = $value->metadata; |
|
| 55 | + $this->metadata[$offset] = $value->metadata; |
|
| 56 | 56 | } |
| 57 | 57 | } elseif ($value) { |
| 58 | - $this->metadata[ $offset ] = $value; |
|
| 58 | + $this->metadata[$offset] = $value; |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | public function offsetUnset($offset) |
| 63 | 63 | { |
| 64 | - unset($this->metadata[ $offset ]); |
|
| 64 | + unset($this->metadata[$offset]); |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | class TP_yyStackEntry |
| 69 | 69 | { |
| 70 | - public $stateno; /* The state-number */ |
|
| 71 | - public $major; /* The major token value. This is the code |
|
| 70 | + public $stateno; /* The state-number */ |
|
| 71 | + public $major; /* The major token value. This is the code |
|
| 72 | 72 | ** number for the token at this stack level */ |
| 73 | 73 | public $minor; /* The user-supplied minor token value. This |
| 74 | 74 | ** is the value of the token */ |
@@ -895,9 +895,9 @@ discard block |
||
| 895 | 895 | |
| 896 | 896 | public $yyTracePrompt; |
| 897 | 897 | |
| 898 | - public $yyidx; /* Index of top element in stack */ |
|
| 899 | - public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | - public $yystack = array(); /* The parser's stack */ |
|
| 898 | + public $yyidx; /* Index of top element in stack */ |
|
| 899 | + public $yyerrcnt; /* Shifts left before out of the error */ |
|
| 900 | + public $yystack = array(); /* The parser's stack */ |
|
| 901 | 901 | |
| 902 | 902 | public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', |
| 903 | 903 | 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | return 'End of Input'; |
| 1028 | 1028 | } |
| 1029 | 1029 | if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) { |
| 1030 | - return $this->yyTokenName[ $tokenType ]; |
|
| 1030 | + return $this->yyTokenName[$tokenType]; |
|
| 1031 | 1031 | } else { |
| 1032 | 1032 | return "Unknown"; |
| 1033 | 1033 | } |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | { |
| 1038 | 1038 | switch ($yymajor) { |
| 1039 | 1039 | default: |
| 1040 | - break; /* If no destructor action specified: do nothing */ |
|
| 1040 | + break; /* If no destructor action specified: do nothing */ |
|
| 1041 | 1041 | } |
| 1042 | 1042 | } |
| 1043 | 1043 | |
@@ -1048,11 +1048,11 @@ discard block |
||
| 1048 | 1048 | } |
| 1049 | 1049 | $yytos = array_pop($this->yystack); |
| 1050 | 1050 | if ($this->yyTraceFILE && $this->yyidx >= 0) { |
| 1051 | - fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n"); |
|
| 1051 | + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n"); |
|
| 1052 | 1052 | } |
| 1053 | 1053 | $yymajor = $yytos->major; |
| 1054 | 1054 | self::yy_destructor($yymajor, $yytos->minor); |
| 1055 | - $this->yyidx --; |
|
| 1055 | + $this->yyidx--; |
|
| 1056 | 1056 | |
| 1057 | 1057 | return $yymajor; |
| 1058 | 1058 | } |
@@ -1071,14 +1071,14 @@ discard block |
||
| 1071 | 1071 | { |
| 1072 | 1072 | static $res3 = array(); |
| 1073 | 1073 | static $res4 = array(); |
| 1074 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1075 | - $expected = self::$yyExpectedTokens[ $state ]; |
|
| 1076 | - if (isset($res3[ $state ][ $token ])) { |
|
| 1077 | - if ($res3[ $state ][ $token ]) { |
|
| 1074 | + $state = $this->yystack[$this->yyidx]->stateno; |
|
| 1075 | + $expected = self::$yyExpectedTokens[$state]; |
|
| 1076 | + if (isset($res3[$state][$token])) { |
|
| 1077 | + if ($res3[$state][$token]) { |
|
| 1078 | 1078 | return $expected; |
| 1079 | 1079 | } |
| 1080 | 1080 | } else { |
| 1081 | - if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1081 | + if ($res3[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) { |
|
| 1082 | 1082 | return $expected; |
| 1083 | 1083 | } |
| 1084 | 1084 | } |
@@ -1090,7 +1090,7 @@ discard block |
||
| 1090 | 1090 | // reduce action |
| 1091 | 1091 | $done = 0; |
| 1092 | 1092 | do { |
| 1093 | - if ($done ++ == 100) { |
|
| 1093 | + if ($done++ == 100) { |
|
| 1094 | 1094 | $this->yyidx = $yyidx; |
| 1095 | 1095 | $this->yystack = $stack; |
| 1096 | 1096 | // too much recursion prevents proper detection |
@@ -1098,20 +1098,20 @@ discard block |
||
| 1098 | 1098 | return array_unique($expected); |
| 1099 | 1099 | } |
| 1100 | 1100 | $yyruleno = $yyact - self::YYNSTATE; |
| 1101 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1102 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1103 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1104 | - if (isset(self::$yyExpectedTokens[ $nextstate ])) { |
|
| 1105 | - $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]); |
|
| 1106 | - if (isset($res4[ $nextstate ][ $token ])) { |
|
| 1107 | - if ($res4[ $nextstate ][ $token ]) { |
|
| 1101 | + $this->yyidx -= self::$yyRuleInfo[$yyruleno][1]; |
|
| 1102 | + $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, |
|
| 1103 | + self::$yyRuleInfo[$yyruleno][0]); |
|
| 1104 | + if (isset(self::$yyExpectedTokens[$nextstate])) { |
|
| 1105 | + $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]); |
|
| 1106 | + if (isset($res4[$nextstate][$token])) { |
|
| 1107 | + if ($res4[$nextstate][$token]) { |
|
| 1108 | 1108 | $this->yyidx = $yyidx; |
| 1109 | 1109 | $this->yystack = $stack; |
| 1110 | 1110 | return array_unique($expected); |
| 1111 | 1111 | } |
| 1112 | 1112 | } else { |
| 1113 | - if ($res4[ $nextstate ][ $token ] = |
|
| 1114 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], true) |
|
| 1113 | + if ($res4[$nextstate][$token] = |
|
| 1114 | + in_array($token, self::$yyExpectedTokens[$nextstate], true) |
|
| 1115 | 1115 | ) { |
| 1116 | 1116 | $this->yyidx = $yyidx; |
| 1117 | 1117 | $this->yystack = $stack; |
@@ -1121,11 +1121,11 @@ discard block |
||
| 1121 | 1121 | } |
| 1122 | 1122 | if ($nextstate < self::YYNSTATE) { |
| 1123 | 1123 | // we need to shift a non-terminal |
| 1124 | - $this->yyidx ++; |
|
| 1124 | + $this->yyidx++; |
|
| 1125 | 1125 | $x = new TP_yyStackEntry; |
| 1126 | 1126 | $x->stateno = $nextstate; |
| 1127 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1128 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1127 | + $x->major = self::$yyRuleInfo[$yyruleno][0]; |
|
| 1128 | + $this->yystack[$this->yyidx] = $x; |
|
| 1129 | 1129 | continue 2; |
| 1130 | 1130 | } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
| 1131 | 1131 | $this->yyidx = $yyidx; |
@@ -1161,13 +1161,13 @@ discard block |
||
| 1161 | 1161 | if ($token === 0) { |
| 1162 | 1162 | return true; // 0 is not part of this |
| 1163 | 1163 | } |
| 1164 | - $state = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1165 | - if (isset($res[ $state ][ $token ])) { |
|
| 1166 | - if ($res[ $state ][ $token ]) { |
|
| 1164 | + $state = $this->yystack[$this->yyidx]->stateno; |
|
| 1165 | + if (isset($res[$state][$token])) { |
|
| 1166 | + if ($res[$state][$token]) { |
|
| 1167 | 1167 | return true; |
| 1168 | 1168 | } |
| 1169 | 1169 | } else { |
| 1170 | - if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) { |
|
| 1170 | + if ($res[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) { |
|
| 1171 | 1171 | return true; |
| 1172 | 1172 | } |
| 1173 | 1173 | } |
@@ -1179,7 +1179,7 @@ discard block |
||
| 1179 | 1179 | // reduce action |
| 1180 | 1180 | $done = 0; |
| 1181 | 1181 | do { |
| 1182 | - if ($done ++ == 100) { |
|
| 1182 | + if ($done++ == 100) { |
|
| 1183 | 1183 | $this->yyidx = $yyidx; |
| 1184 | 1184 | $this->yystack = $stack; |
| 1185 | 1185 | // too much recursion prevents proper detection |
@@ -1187,18 +1187,18 @@ discard block |
||
| 1187 | 1187 | return true; |
| 1188 | 1188 | } |
| 1189 | 1189 | $yyruleno = $yyact - self::YYNSTATE; |
| 1190 | - $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 1191 | - $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, |
|
| 1192 | - self::$yyRuleInfo[ $yyruleno ][ 0 ]); |
|
| 1193 | - if (isset($res2[ $nextstate ][ $token ])) { |
|
| 1194 | - if ($res2[ $nextstate ][ $token ]) { |
|
| 1190 | + $this->yyidx -= self::$yyRuleInfo[$yyruleno][1]; |
|
| 1191 | + $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, |
|
| 1192 | + self::$yyRuleInfo[$yyruleno][0]); |
|
| 1193 | + if (isset($res2[$nextstate][$token])) { |
|
| 1194 | + if ($res2[$nextstate][$token]) { |
|
| 1195 | 1195 | $this->yyidx = $yyidx; |
| 1196 | 1196 | $this->yystack = $stack; |
| 1197 | 1197 | return true; |
| 1198 | 1198 | } |
| 1199 | 1199 | } else { |
| 1200 | - if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) && |
|
| 1201 | - in_array($token, self::$yyExpectedTokens[ $nextstate ], |
|
| 1200 | + if ($res2[$nextstate][$token] = (isset(self::$yyExpectedTokens[$nextstate]) && |
|
| 1201 | + in_array($token, self::$yyExpectedTokens[$nextstate], |
|
| 1202 | 1202 | true)) |
| 1203 | 1203 | ) { |
| 1204 | 1204 | $this->yyidx = $yyidx; |
@@ -1208,11 +1208,11 @@ discard block |
||
| 1208 | 1208 | } |
| 1209 | 1209 | if ($nextstate < self::YYNSTATE) { |
| 1210 | 1210 | // we need to shift a non-terminal |
| 1211 | - $this->yyidx ++; |
|
| 1211 | + $this->yyidx++; |
|
| 1212 | 1212 | $x = new TP_yyStackEntry; |
| 1213 | 1213 | $x->stateno = $nextstate; |
| 1214 | - $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 1215 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 1214 | + $x->major = self::$yyRuleInfo[$yyruleno][0]; |
|
| 1215 | + $this->yystack[$this->yyidx] = $x; |
|
| 1216 | 1216 | continue 2; |
| 1217 | 1217 | } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) { |
| 1218 | 1218 | $this->yyidx = $yyidx; |
@@ -1247,37 +1247,37 @@ discard block |
||
| 1247 | 1247 | |
| 1248 | 1248 | public function yy_find_shift_action($iLookAhead) |
| 1249 | 1249 | { |
| 1250 | - $stateno = $this->yystack[ $this->yyidx ]->stateno; |
|
| 1250 | + $stateno = $this->yystack[$this->yyidx]->stateno; |
|
| 1251 | 1251 | |
| 1252 | 1252 | /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */ |
| 1253 | - if (!isset(self::$yy_shift_ofst[ $stateno ])) { |
|
| 1253 | + if (!isset(self::$yy_shift_ofst[$stateno])) { |
|
| 1254 | 1254 | // no shift actions |
| 1255 | - return self::$yy_default[ $stateno ]; |
|
| 1255 | + return self::$yy_default[$stateno]; |
|
| 1256 | 1256 | } |
| 1257 | - $i = self::$yy_shift_ofst[ $stateno ]; |
|
| 1257 | + $i = self::$yy_shift_ofst[$stateno]; |
|
| 1258 | 1258 | if ($i === self::YY_SHIFT_USE_DFLT) { |
| 1259 | - return self::$yy_default[ $stateno ]; |
|
| 1259 | + return self::$yy_default[$stateno]; |
|
| 1260 | 1260 | } |
| 1261 | 1261 | if ($iLookAhead == self::YYNOCODE) { |
| 1262 | 1262 | return self::YY_NO_ACTION; |
| 1263 | 1263 | } |
| 1264 | 1264 | $i += $iLookAhead; |
| 1265 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1265 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { |
|
| 1266 | 1266 | if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && |
| 1267 | - ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0 |
|
| 1267 | + ($iFallback = self::$yyFallback[$iLookAhead]) != 0 |
|
| 1268 | 1268 | ) { |
| 1269 | 1269 | if ($this->yyTraceFILE) { |
| 1270 | 1270 | fwrite($this->yyTraceFILE, |
| 1271 | - $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " . |
|
| 1272 | - $this->yyTokenName[ $iFallback ] . "\n"); |
|
| 1271 | + $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . |
|
| 1272 | + $this->yyTokenName[$iFallback] . "\n"); |
|
| 1273 | 1273 | } |
| 1274 | 1274 | |
| 1275 | 1275 | return $this->yy_find_shift_action($iFallback); |
| 1276 | 1276 | } |
| 1277 | 1277 | |
| 1278 | - return self::$yy_default[ $stateno ]; |
|
| 1278 | + return self::$yy_default[$stateno]; |
|
| 1279 | 1279 | } else { |
| 1280 | - return self::$yy_action[ $i ]; |
|
| 1280 | + return self::$yy_action[$i]; |
|
| 1281 | 1281 | } |
| 1282 | 1282 | } |
| 1283 | 1283 | |
@@ -1285,29 +1285,29 @@ discard block |
||
| 1285 | 1285 | { |
| 1286 | 1286 | /* $stateno = $this->yystack[$this->yyidx]->stateno; */ |
| 1287 | 1287 | |
| 1288 | - if (!isset(self::$yy_reduce_ofst[ $stateno ])) { |
|
| 1289 | - return self::$yy_default[ $stateno ]; |
|
| 1288 | + if (!isset(self::$yy_reduce_ofst[$stateno])) { |
|
| 1289 | + return self::$yy_default[$stateno]; |
|
| 1290 | 1290 | } |
| 1291 | - $i = self::$yy_reduce_ofst[ $stateno ]; |
|
| 1291 | + $i = self::$yy_reduce_ofst[$stateno]; |
|
| 1292 | 1292 | if ($i == self::YY_REDUCE_USE_DFLT) { |
| 1293 | - return self::$yy_default[ $stateno ]; |
|
| 1293 | + return self::$yy_default[$stateno]; |
|
| 1294 | 1294 | } |
| 1295 | 1295 | if ($iLookAhead == self::YYNOCODE) { |
| 1296 | 1296 | return self::YY_NO_ACTION; |
| 1297 | 1297 | } |
| 1298 | 1298 | $i += $iLookAhead; |
| 1299 | - if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) { |
|
| 1300 | - return self::$yy_default[ $stateno ]; |
|
| 1299 | + if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) { |
|
| 1300 | + return self::$yy_default[$stateno]; |
|
| 1301 | 1301 | } else { |
| 1302 | - return self::$yy_action[ $i ]; |
|
| 1302 | + return self::$yy_action[$i]; |
|
| 1303 | 1303 | } |
| 1304 | 1304 | } |
| 1305 | 1305 | |
| 1306 | 1306 | public function yy_shift($yyNewState, $yyMajor, $yypMinor) |
| 1307 | 1307 | { |
| 1308 | - $this->yyidx ++; |
|
| 1308 | + $this->yyidx++; |
|
| 1309 | 1309 | if ($this->yyidx >= self::YYSTACKDEPTH) { |
| 1310 | - $this->yyidx --; |
|
| 1310 | + $this->yyidx--; |
|
| 1311 | 1311 | if ($this->yyTraceFILE) { |
| 1312 | 1312 | fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt); |
| 1313 | 1313 | } |
@@ -1329,8 +1329,8 @@ discard block |
||
| 1329 | 1329 | if ($this->yyTraceFILE && $this->yyidx > 0) { |
| 1330 | 1330 | fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState); |
| 1331 | 1331 | fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); |
| 1332 | - for ($i = 1; $i <= $this->yyidx; $i ++) { |
|
| 1333 | - fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]); |
|
| 1332 | + for ($i = 1; $i <= $this->yyidx; $i++) { |
|
| 1333 | + fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]); |
|
| 1334 | 1334 | } |
| 1335 | 1335 | fwrite($this->yyTraceFILE, "\n"); |
| 1336 | 1336 | } |
@@ -1443,17 +1443,17 @@ discard block |
||
| 1443 | 1443 | #line 228 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1444 | 1444 | public function yy_r1() |
| 1445 | 1445 | { |
| 1446 | - if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1447 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1446 | + if ($this->yystack[$this->yyidx + 0]->minor !== null) { |
|
| 1447 | + $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); |
|
| 1448 | 1448 | } |
| 1449 | 1449 | } |
| 1450 | 1450 | |
| 1451 | 1451 | #line 235 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1452 | 1452 | public function yy_r2() |
| 1453 | 1453 | { |
| 1454 | - if ($this->yystack[ $this->yyidx + 0 ]->minor !== null) { |
|
| 1454 | + if ($this->yystack[$this->yyidx + 0]->minor !== null) { |
|
| 1455 | 1455 | // because of possible code injection |
| 1456 | - $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1456 | + $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); |
|
| 1457 | 1457 | } |
| 1458 | 1458 | } |
| 1459 | 1459 | |
@@ -1461,7 +1461,7 @@ discard block |
||
| 1461 | 1461 | public function yy_r4() |
| 1462 | 1462 | { |
| 1463 | 1463 | if ($this->compiler->has_code) { |
| 1464 | - $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1464 | + $this->_retvalue = $this->mergePrefixCode($this->yystack[$this->yyidx + 0]->minor); |
|
| 1465 | 1465 | } else { |
| 1466 | 1466 | $this->_retvalue = null; |
| 1467 | 1467 | } |
@@ -1472,14 +1472,14 @@ discard block |
||
| 1472 | 1472 | #line 260 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1473 | 1473 | public function yy_r5() |
| 1474 | 1474 | { |
| 1475 | - $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1475 | + $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[$this->yyidx + 0]->minor); |
|
| 1476 | 1476 | } |
| 1477 | 1477 | |
| 1478 | 1478 | #line 264 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1479 | 1479 | public function yy_r6() |
| 1480 | 1480 | { |
| 1481 | 1481 | $code = $this->compiler->compileTag('private_php', |
| 1482 | - array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1482 | + array(array('code' => $this->yystack[$this->yyidx + 0]->minor), |
|
| 1483 | 1483 | array('type' => $this->lex->phpType)), array()); |
| 1484 | 1484 | if ($this->compiler->has_code && !empty($code)) { |
| 1485 | 1485 | $tmp = ''; |
@@ -1508,19 +1508,19 @@ discard block |
||
| 1508 | 1508 | #line 282 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1509 | 1509 | public function yy_r8() |
| 1510 | 1510 | { |
| 1511 | - $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1511 | + $this->_retvalue = $this->compiler->processText($this->yystack[$this->yyidx + 0]->minor); |
|
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | 1514 | #line 286 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1515 | 1515 | public function yy_r9() |
| 1516 | 1516 | { |
| 1517 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1517 | + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; |
|
| 1518 | 1518 | } |
| 1519 | 1519 | |
| 1520 | 1520 | #line 290 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1521 | 1521 | public function yy_r10() |
| 1522 | 1522 | { |
| 1523 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1523 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; |
|
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | 1526 | #line 295 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -1544,31 +1544,31 @@ discard block |
||
| 1544 | 1544 | #line 308 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1545 | 1545 | public function yy_r14() |
| 1546 | 1546 | { |
| 1547 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1547 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; |
|
| 1548 | 1548 | } |
| 1549 | 1549 | |
| 1550 | 1550 | #line 312 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1551 | 1551 | public function yy_r15() |
| 1552 | 1552 | { |
| 1553 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1553 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; |
|
| 1554 | 1554 | } |
| 1555 | 1555 | |
| 1556 | 1556 | #line 328 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1557 | 1557 | public function yy_r19() |
| 1558 | 1558 | { |
| 1559 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1559 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; |
|
| 1560 | 1560 | } |
| 1561 | 1561 | |
| 1562 | 1562 | #line 334 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1563 | 1563 | public function yy_r20() |
| 1564 | 1564 | { |
| 1565 | 1565 | $var = |
| 1566 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1566 | + trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1567 | 1567 | ' $'); |
| 1568 | 1568 | if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { |
| 1569 | 1569 | $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'), |
| 1570 | 1570 | array('value' => $this->compiler->compileVariable('\'' . |
| 1571 | - $match[ 1 ] . |
|
| 1571 | + $match[1] . |
|
| 1572 | 1572 | '\''))); |
| 1573 | 1573 | } else { |
| 1574 | 1574 | $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
@@ -1582,25 +1582,25 @@ discard block |
||
| 1582 | 1582 | public function yy_r21() |
| 1583 | 1583 | { |
| 1584 | 1584 | $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
| 1585 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1585 | + array('value' => $this->yystack[$this->yyidx + 0]->minor)); |
|
| 1586 | 1586 | } |
| 1587 | 1587 | |
| 1588 | 1588 | #line 348 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1589 | 1589 | public function yy_r22() |
| 1590 | 1590 | { |
| 1591 | 1591 | $this->_retvalue = |
| 1592 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1593 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1592 | + $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, |
|
| 1593 | + array('value' => $this->yystack[$this->yyidx + - 1]->minor)); |
|
| 1594 | 1594 | } |
| 1595 | 1595 | |
| 1596 | 1596 | #line 371 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1597 | 1597 | public function yy_r27() |
| 1598 | 1598 | { |
| 1599 | - $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1600 | - 0 ]->minor), |
|
| 1599 | + $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[$this->yyidx + |
|
| 1600 | + 0]->minor), |
|
| 1601 | 1601 | array('var' => '\'' . |
| 1602 | - substr($this->yystack[ $this->yyidx + |
|
| 1603 | - - 2 ]->minor, |
|
| 1602 | + substr($this->yystack[$this->yyidx + |
|
| 1603 | + - 2]->minor, |
|
| 1604 | 1604 | 1) . '\''))); |
| 1605 | 1605 | } |
| 1606 | 1606 | |
@@ -1608,36 +1608,36 @@ discard block |
||
| 1608 | 1608 | public function yy_r29() |
| 1609 | 1609 | { |
| 1610 | 1610 | $this->_retvalue = $this->compiler->compileTag('assign', |
| 1611 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1612 | - - 1 ]->minor), |
|
| 1611 | + array_merge(array(array('value' => $this->yystack[$this->yyidx + |
|
| 1612 | + - 1]->minor), |
|
| 1613 | 1613 | array('var' => '\'' . |
| 1614 | - substr($this->yystack[ $this->yyidx + |
|
| 1615 | - - 3 ]->minor, |
|
| 1614 | + substr($this->yystack[$this->yyidx + |
|
| 1615 | + - 3]->minor, |
|
| 1616 | 1616 | 1) . '\'')), |
| 1617 | - $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1617 | + $this->yystack[$this->yyidx + 0]->minor)); |
|
| 1618 | 1618 | } |
| 1619 | 1619 | |
| 1620 | 1620 | #line 383 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1621 | 1621 | public function yy_r30() |
| 1622 | 1622 | { |
| 1623 | 1623 | $this->_retvalue = $this->compiler->compileTag('assign', |
| 1624 | - array_merge(array(array('value' => $this->yystack[ $this->yyidx + |
|
| 1625 | - - 1 ]->minor), |
|
| 1626 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1627 | - - 3 ]->minor[ 'var' ])), |
|
| 1628 | - $this->yystack[ $this->yyidx + 0 ]->minor), |
|
| 1629 | - array('smarty_internal_index' => $this->yystack[ $this->yyidx + |
|
| 1630 | - - 3 ]->minor[ 'smarty_internal_index' ])); |
|
| 1624 | + array_merge(array(array('value' => $this->yystack[$this->yyidx + |
|
| 1625 | + - 1]->minor), |
|
| 1626 | + array('var' => $this->yystack[$this->yyidx + |
|
| 1627 | + - 3]->minor['var'])), |
|
| 1628 | + $this->yystack[$this->yyidx + 0]->minor), |
|
| 1629 | + array('smarty_internal_index' => $this->yystack[$this->yyidx + |
|
| 1630 | + - 3]->minor['smarty_internal_index'])); |
|
| 1631 | 1631 | } |
| 1632 | 1632 | |
| 1633 | 1633 | #line 388 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1634 | 1634 | public function yy_r31() |
| 1635 | 1635 | { |
| 1636 | 1636 | $tag = |
| 1637 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1637 | + trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); |
|
| 1638 | 1638 | if ($tag == 'strip') { |
| 1639 | 1639 | $this->strip = true; |
| 1640 | - $this->_retvalue = null;; |
|
| 1640 | + $this->_retvalue = null; ; |
|
| 1641 | 1641 | } else { |
| 1642 | 1642 | if (defined($tag)) { |
| 1643 | 1643 | if ($this->security) { |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag)); |
| 1648 | 1648 | } else { |
| 1649 | 1649 | if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) { |
| 1650 | - $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'")); |
|
| 1650 | + $this->_retvalue = $this->compiler->compileTag($match[1], array("'nocache'")); |
|
| 1651 | 1651 | } else { |
| 1652 | 1652 | $this->_retvalue = $this->compiler->compileTag($tag, array()); |
| 1653 | 1653 | } |
@@ -1658,209 +1658,209 @@ discard block |
||
| 1658 | 1658 | #line 410 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1659 | 1659 | public function yy_r32() |
| 1660 | 1660 | { |
| 1661 | - if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) { |
|
| 1661 | + if (defined($this->yystack[$this->yyidx + - 1]->minor)) { |
|
| 1662 | 1662 | if ($this->security) { |
| 1663 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler); |
|
| 1663 | + $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 1]->minor, $this->compiler); |
|
| 1664 | 1664 | } |
| 1665 | 1665 | $this->_retvalue = |
| 1666 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1667 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1666 | + $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, |
|
| 1667 | + array('value' => $this->yystack[$this->yyidx + - 1]->minor)); |
|
| 1668 | 1668 | } else { |
| 1669 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 1670 | - $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1669 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor, |
|
| 1670 | + $this->yystack[$this->yyidx + 0]->minor); |
|
| 1671 | 1671 | } |
| 1672 | 1672 | } |
| 1673 | 1673 | |
| 1674 | 1674 | #line 420 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1675 | 1675 | public function yy_r33() |
| 1676 | 1676 | { |
| 1677 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1677 | + if (defined($this->yystack[$this->yyidx + 0]->minor)) { |
|
| 1678 | 1678 | if ($this->security) { |
| 1679 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1679 | + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); |
|
| 1680 | 1680 | } |
| 1681 | 1681 | $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), |
| 1682 | - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 1682 | + array('value' => $this->yystack[$this->yyidx + 0]->minor)); |
|
| 1683 | 1683 | } else { |
| 1684 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); |
|
| 1684 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor, array()); |
|
| 1685 | 1685 | } |
| 1686 | 1686 | } |
| 1687 | 1687 | |
| 1688 | 1688 | #line 433 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1689 | 1689 | public function yy_r34() |
| 1690 | 1690 | { |
| 1691 | - if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) { |
|
| 1691 | + if (defined($this->yystack[$this->yyidx + - 2]->minor)) { |
|
| 1692 | 1692 | if ($this->security) { |
| 1693 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler); |
|
| 1693 | + $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 2]->minor, $this->compiler); |
|
| 1694 | 1694 | } |
| 1695 | 1695 | $this->_retvalue = |
| 1696 | - $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1697 | - array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1698 | - 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor)); |
|
| 1696 | + $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, |
|
| 1697 | + array('value' => $this->yystack[$this->yyidx + - 2]->minor, |
|
| 1698 | + 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor)); |
|
| 1699 | 1699 | } else { |
| 1700 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1701 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1702 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1703 | - - 1 ]->minor)); |
|
| 1700 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor, |
|
| 1701 | + $this->yystack[$this->yyidx + 0]->minor, |
|
| 1702 | + array('modifierlist' => $this->yystack[$this->yyidx + |
|
| 1703 | + - 1]->minor)); |
|
| 1704 | 1704 | } |
| 1705 | 1705 | } |
| 1706 | 1706 | |
| 1707 | 1707 | #line 445 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1708 | 1708 | public function yy_r35() |
| 1709 | 1709 | { |
| 1710 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor, |
|
| 1711 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1712 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1713 | - - 1 ]->minor)); |
|
| 1710 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor, |
|
| 1711 | + $this->yystack[$this->yyidx + 0]->minor, |
|
| 1712 | + array('object_method' => $this->yystack[$this->yyidx + |
|
| 1713 | + - 1]->minor)); |
|
| 1714 | 1714 | } |
| 1715 | 1715 | |
| 1716 | 1716 | #line 450 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1717 | 1717 | public function yy_r36() |
| 1718 | 1718 | { |
| 1719 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor, |
|
| 1720 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1721 | - array('modifierlist' => $this->yystack[ $this->yyidx + |
|
| 1722 | - - 1 ]->minor, |
|
| 1723 | - 'object_method' => $this->yystack[ $this->yyidx + |
|
| 1724 | - - 2 ]->minor)); |
|
| 1719 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, |
|
| 1720 | + $this->yystack[$this->yyidx + 0]->minor, |
|
| 1721 | + array('modifierlist' => $this->yystack[$this->yyidx + |
|
| 1722 | + - 1]->minor, |
|
| 1723 | + 'object_method' => $this->yystack[$this->yyidx + |
|
| 1724 | + - 2]->minor)); |
|
| 1725 | 1725 | } |
| 1726 | 1726 | |
| 1727 | 1727 | #line 455 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1728 | 1728 | public function yy_r37() |
| 1729 | 1729 | { |
| 1730 | 1730 | $this->_retvalue = $this->compiler->compileTag('make_nocache', array(array('var' => '\'' . |
| 1731 | - substr($this->yystack[ $this->yyidx + |
|
| 1732 | - 0 ]->minor, |
|
| 1731 | + substr($this->yystack[$this->yyidx + |
|
| 1732 | + 0]->minor, |
|
| 1733 | 1733 | 1) . '\''))); |
| 1734 | 1734 | } |
| 1735 | 1735 | |
| 1736 | 1736 | #line 460 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1737 | 1737 | public function yy_r38() |
| 1738 | 1738 | { |
| 1739 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1739 | + $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length)); |
|
| 1740 | 1740 | $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
| 1741 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1742 | - 0 ]->minor)); |
|
| 1741 | + array('if condition' => $this->yystack[$this->yyidx + |
|
| 1742 | + 0]->minor)); |
|
| 1743 | 1743 | } |
| 1744 | 1744 | |
| 1745 | 1745 | #line 465 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1746 | 1746 | public function yy_r39() |
| 1747 | 1747 | { |
| 1748 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length)); |
|
| 1748 | + $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length)); |
|
| 1749 | 1749 | $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, |
| 1750 | - $this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1751 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1752 | - - 1 ]->minor)); |
|
| 1750 | + $this->yystack[$this->yyidx + 0]->minor, |
|
| 1751 | + array('if condition' => $this->yystack[$this->yyidx + |
|
| 1752 | + - 1]->minor)); |
|
| 1753 | 1753 | } |
| 1754 | 1754 | |
| 1755 | 1755 | #line 470 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1756 | 1756 | public function yy_r40() |
| 1757 | 1757 | { |
| 1758 | - $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length)); |
|
| 1758 | + $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length)); |
|
| 1759 | 1759 | $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), |
| 1760 | - array('if condition' => $this->yystack[ $this->yyidx + |
|
| 1761 | - 0 ]->minor)); |
|
| 1760 | + array('if condition' => $this->yystack[$this->yyidx + |
|
| 1761 | + 0]->minor)); |
|
| 1762 | 1762 | } |
| 1763 | 1763 | |
| 1764 | 1764 | #line 481 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1765 | 1765 | public function yy_r42() |
| 1766 | 1766 | { |
| 1767 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1768 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1769 | - - 6 ]->minor), |
|
| 1770 | - array('ifexp' => $this->yystack[ $this->yyidx + |
|
| 1771 | - - 4 ]->minor), |
|
| 1772 | - array('var' => $this->yystack[ $this->yyidx + |
|
| 1773 | - - 2 ]->minor), |
|
| 1774 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1775 | - - 1 ]->minor))), |
|
| 1767 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, |
|
| 1768 | + array(array('start' => $this->yystack[$this->yyidx + |
|
| 1769 | + - 6]->minor), |
|
| 1770 | + array('ifexp' => $this->yystack[$this->yyidx + |
|
| 1771 | + - 4]->minor), |
|
| 1772 | + array('var' => $this->yystack[$this->yyidx + |
|
| 1773 | + - 2]->minor), |
|
| 1774 | + array('step' => $this->yystack[$this->yyidx + |
|
| 1775 | + - 1]->minor))), |
|
| 1776 | 1776 | 1); |
| 1777 | 1777 | } |
| 1778 | 1778 | |
| 1779 | 1779 | #line 485 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1780 | 1780 | public function yy_r43() |
| 1781 | 1781 | { |
| 1782 | - $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1782 | + $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 1783 | 1783 | } |
| 1784 | 1784 | |
| 1785 | 1785 | #line 493 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1786 | 1786 | public function yy_r45() |
| 1787 | 1787 | { |
| 1788 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1789 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1790 | - - 3 ]->minor), |
|
| 1791 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1792 | - - 1 ]->minor))), |
|
| 1788 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, |
|
| 1789 | + array(array('start' => $this->yystack[$this->yyidx + |
|
| 1790 | + - 3]->minor), |
|
| 1791 | + array('to' => $this->yystack[$this->yyidx + |
|
| 1792 | + - 1]->minor))), |
|
| 1793 | 1793 | 0); |
| 1794 | 1794 | } |
| 1795 | 1795 | |
| 1796 | 1796 | #line 497 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1797 | 1797 | public function yy_r46() |
| 1798 | 1798 | { |
| 1799 | - $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1800 | - array(array('start' => $this->yystack[ $this->yyidx + |
|
| 1801 | - - 5 ]->minor), |
|
| 1802 | - array('to' => $this->yystack[ $this->yyidx + |
|
| 1803 | - - 3 ]->minor), |
|
| 1804 | - array('step' => $this->yystack[ $this->yyidx + |
|
| 1805 | - - 1 ]->minor))), |
|
| 1799 | + $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, |
|
| 1800 | + array(array('start' => $this->yystack[$this->yyidx + |
|
| 1801 | + - 5]->minor), |
|
| 1802 | + array('to' => $this->yystack[$this->yyidx + |
|
| 1803 | + - 3]->minor), |
|
| 1804 | + array('step' => $this->yystack[$this->yyidx + |
|
| 1805 | + - 1]->minor))), |
|
| 1806 | 1806 | 0); |
| 1807 | 1807 | } |
| 1808 | 1808 | |
| 1809 | 1809 | #line 502 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1810 | 1810 | public function yy_r47() |
| 1811 | 1811 | { |
| 1812 | - $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1812 | + $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[$this->yyidx + 0]->minor); |
|
| 1813 | 1813 | } |
| 1814 | 1814 | |
| 1815 | 1815 | #line 507 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1816 | 1816 | public function yy_r48() |
| 1817 | 1817 | { |
| 1818 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1819 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1820 | - - 3 ]->minor), |
|
| 1821 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1822 | - - 1 ]->minor)))); |
|
| 1818 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, |
|
| 1819 | + array(array('from' => $this->yystack[$this->yyidx + |
|
| 1820 | + - 3]->minor), |
|
| 1821 | + array('item' => $this->yystack[$this->yyidx + |
|
| 1822 | + - 1]->minor)))); |
|
| 1823 | 1823 | } |
| 1824 | 1824 | |
| 1825 | 1825 | #line 511 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1826 | 1826 | public function yy_r49() |
| 1827 | 1827 | { |
| 1828 | - $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, |
|
| 1829 | - array(array('from' => $this->yystack[ $this->yyidx + |
|
| 1830 | - - 5 ]->minor), |
|
| 1831 | - array('item' => $this->yystack[ $this->yyidx + |
|
| 1832 | - - 1 ]->minor), |
|
| 1833 | - array('key' => $this->yystack[ $this->yyidx + |
|
| 1834 | - - 3 ]->minor)))); |
|
| 1828 | + $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, |
|
| 1829 | + array(array('from' => $this->yystack[$this->yyidx + |
|
| 1830 | + - 5]->minor), |
|
| 1831 | + array('item' => $this->yystack[$this->yyidx + |
|
| 1832 | + - 1]->minor), |
|
| 1833 | + array('key' => $this->yystack[$this->yyidx + |
|
| 1834 | + - 3]->minor)))); |
|
| 1835 | 1835 | } |
| 1836 | 1836 | |
| 1837 | 1837 | #line 524 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1838 | 1838 | public function yy_r52() |
| 1839 | 1839 | { |
| 1840 | 1840 | $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
| 1841 | - array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1842 | - - 1 ]->minor), |
|
| 1843 | - $this->yystack[ $this->yyidx + |
|
| 1844 | - 0 ]->minor)))); |
|
| 1841 | + array('modifier_list' => array(array_merge(array($this->yystack[$this->yyidx + |
|
| 1842 | + - 1]->minor), |
|
| 1843 | + $this->yystack[$this->yyidx + |
|
| 1844 | + 0]->minor)))); |
|
| 1845 | 1845 | } |
| 1846 | 1846 | |
| 1847 | 1847 | #line 528 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1848 | 1848 | public function yy_r53() |
| 1849 | 1849 | { |
| 1850 | 1850 | $this->_retvalue = $this->compiler->compileTag('setfilter', array(), |
| 1851 | - array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + |
|
| 1852 | - - 2 ]->minor), |
|
| 1853 | - $this->yystack[ $this->yyidx + |
|
| 1854 | - - 1 ]->minor)), |
|
| 1855 | - $this->yystack[ $this->yyidx + |
|
| 1856 | - 0 ]->minor))); |
|
| 1851 | + array('modifier_list' => array_merge(array(array_merge(array($this->yystack[$this->yyidx + |
|
| 1852 | + - 2]->minor), |
|
| 1853 | + $this->yystack[$this->yyidx + |
|
| 1854 | + - 1]->minor)), |
|
| 1855 | + $this->yystack[$this->yyidx + |
|
| 1856 | + 0]->minor))); |
|
| 1857 | 1857 | } |
| 1858 | 1858 | |
| 1859 | 1859 | #line 533 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1860 | 1860 | public function yy_r54() |
| 1861 | 1861 | { |
| 1862 | - $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); |
|
| 1863 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { |
|
| 1862 | + $j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.'); |
|
| 1863 | + if ($this->yystack[$this->yyidx + 0]->minor[$j + 1] == 'c') { |
|
| 1864 | 1864 | // {$smarty.block.child} |
| 1865 | 1865 | $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); |
| 1866 | 1866 | } else { |
@@ -1873,7 +1873,7 @@ discard block |
||
| 1873 | 1873 | public function yy_r55() |
| 1874 | 1874 | { |
| 1875 | 1875 | $tag = |
| 1876 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1876 | + trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 1877 | 1877 | ' /'); |
| 1878 | 1878 | if ($tag == 'strip') { |
| 1879 | 1879 | $this->strip = false; |
@@ -1886,46 +1886,46 @@ discard block |
||
| 1886 | 1886 | #line 555 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1887 | 1887 | public function yy_r56() |
| 1888 | 1888 | { |
| 1889 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); |
|
| 1889 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array()); |
|
| 1890 | 1890 | } |
| 1891 | 1891 | |
| 1892 | 1892 | #line 559 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1893 | 1893 | public function yy_r57() |
| 1894 | 1894 | { |
| 1895 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(), |
|
| 1896 | - array('modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1897 | - 0 ]->minor)); |
|
| 1895 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor . 'close', array(), |
|
| 1896 | + array('modifier_list' => $this->yystack[$this->yyidx + |
|
| 1897 | + 0]->minor)); |
|
| 1898 | 1898 | } |
| 1899 | 1899 | |
| 1900 | 1900 | #line 564 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1901 | 1901 | public function yy_r58() |
| 1902 | 1902 | { |
| 1903 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(), |
|
| 1904 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1905 | - 0 ]->minor)); |
|
| 1903 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor . 'close', array(), |
|
| 1904 | + array('object_method' => $this->yystack[$this->yyidx + |
|
| 1905 | + 0]->minor)); |
|
| 1906 | 1906 | } |
| 1907 | 1907 | |
| 1908 | 1908 | #line 568 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1909 | 1909 | public function yy_r59() |
| 1910 | 1910 | { |
| 1911 | - $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(), |
|
| 1912 | - array('object_method' => $this->yystack[ $this->yyidx + |
|
| 1913 | - - 1 ]->minor, |
|
| 1914 | - 'modifier_list' => $this->yystack[ $this->yyidx + |
|
| 1915 | - 0 ]->minor)); |
|
| 1911 | + $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor . 'close', array(), |
|
| 1912 | + array('object_method' => $this->yystack[$this->yyidx + |
|
| 1913 | + - 1]->minor, |
|
| 1914 | + 'modifier_list' => $this->yystack[$this->yyidx + |
|
| 1915 | + 0]->minor)); |
|
| 1916 | 1916 | } |
| 1917 | 1917 | |
| 1918 | 1918 | #line 576 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1919 | 1919 | public function yy_r60() |
| 1920 | 1920 | { |
| 1921 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 1922 | - $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1921 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; |
|
| 1922 | + $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; |
|
| 1923 | 1923 | } |
| 1924 | 1924 | |
| 1925 | 1925 | #line 582 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1926 | 1926 | public function yy_r61() |
| 1927 | 1927 | { |
| 1928 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1928 | + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); |
|
| 1929 | 1929 | } |
| 1930 | 1930 | |
| 1931 | 1931 | #line 587 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -1937,15 +1937,15 @@ discard block |
||
| 1937 | 1937 | #line 592 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1938 | 1938 | public function yy_r63() |
| 1939 | 1939 | { |
| 1940 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 1940 | + if (defined($this->yystack[$this->yyidx + 0]->minor)) { |
|
| 1941 | 1941 | if ($this->security) { |
| 1942 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 1942 | + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); |
|
| 1943 | 1943 | } |
| 1944 | 1944 | $this->_retvalue = |
| 1945 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1945 | + array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor); |
|
| 1946 | 1946 | } else { |
| 1947 | 1947 | $this->_retvalue = |
| 1948 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 1948 | + array($this->yystack[$this->yyidx + - 2]->minor => '\'' . $this->yystack[$this->yyidx + 0]->minor . |
|
| 1949 | 1949 | '\''); |
| 1950 | 1950 | } |
| 1951 | 1951 | } |
@@ -1954,201 +1954,201 @@ discard block |
||
| 1954 | 1954 | public function yy_r64() |
| 1955 | 1955 | { |
| 1956 | 1956 | $this->_retvalue = |
| 1957 | - array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + |
|
| 1958 | - 0 ]->minor); |
|
| 1957 | + array(trim($this->yystack[$this->yyidx + - 1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + |
|
| 1958 | + 0]->minor); |
|
| 1959 | 1959 | } |
| 1960 | 1960 | |
| 1961 | 1961 | #line 611 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1962 | 1962 | public function yy_r66() |
| 1963 | 1963 | { |
| 1964 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 1964 | + $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\''; |
|
| 1965 | 1965 | } |
| 1966 | 1966 | |
| 1967 | 1967 | #line 623 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1968 | 1968 | public function yy_r69() |
| 1969 | 1969 | { |
| 1970 | 1970 | $this->_retvalue = |
| 1971 | - array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1971 | + array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor); |
|
| 1972 | 1972 | } |
| 1973 | 1973 | |
| 1974 | 1974 | #line 636 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1975 | 1975 | public function yy_r71() |
| 1976 | 1976 | { |
| 1977 | - $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 1978 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor; |
|
| 1977 | + $this->yystack[$this->yyidx + - 2]->minor[] = $this->yystack[$this->yyidx + 0]->minor; |
|
| 1978 | + $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor; |
|
| 1979 | 1979 | } |
| 1980 | 1980 | |
| 1981 | 1981 | #line 641 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1982 | 1982 | public function yy_r72() |
| 1983 | 1983 | { |
| 1984 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'', |
|
| 1985 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1984 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'', |
|
| 1985 | + 'value' => $this->yystack[$this->yyidx + 0]->minor); |
|
| 1986 | 1986 | } |
| 1987 | 1987 | |
| 1988 | 1988 | #line 648 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1989 | 1989 | public function yy_r74() |
| 1990 | 1990 | { |
| 1991 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 1992 | - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 1991 | + $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 2]->minor, |
|
| 1992 | + 'value' => $this->yystack[$this->yyidx + 0]->minor); |
|
| 1993 | 1993 | } |
| 1994 | 1994 | |
| 1995 | 1995 | #line 672 "../smarty/lexer/smarty_internal_templateparser.y" |
| 1996 | 1996 | public function yy_r78() |
| 1997 | 1997 | { |
| 1998 | 1998 | $this->_retvalue = |
| 1999 | - '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' . |
|
| 2000 | - $this->yystack[ $this->yyidx + 0 ]->minor . '\')'; |
|
| 1999 | + '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '://' . |
|
| 2000 | + $this->yystack[$this->yyidx + 0]->minor . '\')'; |
|
| 2001 | 2001 | } |
| 2002 | 2002 | |
| 2003 | 2003 | #line 677 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2004 | 2004 | public function yy_r79() |
| 2005 | 2005 | { |
| 2006 | 2006 | $this->_retvalue = |
| 2007 | - $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2008 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2007 | + $this->yystack[$this->yyidx + - 2]->minor . trim($this->yystack[$this->yyidx + - 1]->minor) . |
|
| 2008 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2009 | 2009 | } |
| 2010 | 2010 | |
| 2011 | 2011 | #line 691 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2012 | 2012 | public function yy_r82() |
| 2013 | 2013 | { |
| 2014 | 2014 | $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), |
| 2015 | - array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2016 | - 'modifierlist' => $this->yystack[ $this->yyidx + |
|
| 2017 | - 0 ]->minor)); |
|
| 2015 | + array('value' => $this->yystack[$this->yyidx + - 1]->minor, |
|
| 2016 | + 'modifierlist' => $this->yystack[$this->yyidx + |
|
| 2017 | + 0]->minor)); |
|
| 2018 | 2018 | } |
| 2019 | 2019 | |
| 2020 | 2020 | #line 697 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2021 | 2021 | public function yy_r83() |
| 2022 | 2022 | { |
| 2023 | 2023 | $this->_retvalue = |
| 2024 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2025 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] . $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2024 | + $this->yystack[$this->yyidx + - 1]->minor['pre'] . $this->yystack[$this->yyidx + - 2]->minor . |
|
| 2025 | + $this->yystack[$this->yyidx + - 1]->minor['op'] . $this->yystack[$this->yyidx + 0]->minor . ')'; |
|
| 2026 | 2026 | } |
| 2027 | 2027 | |
| 2028 | 2028 | #line 701 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2029 | 2029 | public function yy_r84() |
| 2030 | 2030 | { |
| 2031 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2032 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2031 | + $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . |
|
| 2032 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2033 | 2033 | } |
| 2034 | 2034 | |
| 2035 | 2035 | #line 705 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2036 | 2036 | public function yy_r85() |
| 2037 | 2037 | { |
| 2038 | 2038 | $this->_retvalue = |
| 2039 | - $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2039 | + $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + - 1]->minor . ')'; |
|
| 2040 | 2040 | } |
| 2041 | 2041 | |
| 2042 | 2042 | #line 709 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2043 | 2043 | public function yy_r86() |
| 2044 | 2044 | { |
| 2045 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . |
|
| 2046 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2045 | + $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',' . |
|
| 2046 | + $this->yystack[$this->yyidx + 0]->minor . ')'; |
|
| 2047 | 2047 | } |
| 2048 | 2048 | |
| 2049 | 2049 | #line 713 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2050 | 2050 | public function yy_r87() |
| 2051 | 2051 | { |
| 2052 | - $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' . |
|
| 2053 | - $this->yystack[ $this->yyidx + 0 ]->minor . ')'; |
|
| 2052 | + $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',(array)' . |
|
| 2053 | + $this->yystack[$this->yyidx + 0]->minor . ')'; |
|
| 2054 | 2054 | } |
| 2055 | 2055 | |
| 2056 | 2056 | #line 721 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2057 | 2057 | public function yy_r88() |
| 2058 | 2058 | { |
| 2059 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2060 | - substr($this->yystack[ $this->yyidx + |
|
| 2061 | - - 2 ]->minor, |
|
| 2059 | + $this->_retvalue = $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->compiler->compileVariable('\'' . |
|
| 2060 | + substr($this->yystack[$this->yyidx + |
|
| 2061 | + - 2]->minor, |
|
| 2062 | 2062 | 1) . |
| 2063 | 2063 | '\'') . |
| 2064 | - ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2064 | + ' : ' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2065 | 2065 | } |
| 2066 | 2066 | |
| 2067 | 2067 | #line 725 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2068 | 2068 | public function yy_r89() |
| 2069 | 2069 | { |
| 2070 | 2070 | $this->_retvalue = |
| 2071 | - $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' . |
|
| 2072 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2071 | + $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' . |
|
| 2072 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2073 | 2073 | } |
| 2074 | 2074 | |
| 2075 | 2075 | #line 740 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2076 | 2076 | public function yy_r92() |
| 2077 | 2077 | { |
| 2078 | - $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2078 | + $this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2079 | 2079 | } |
| 2080 | 2080 | |
| 2081 | 2081 | #line 761 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2082 | 2082 | public function yy_r97() |
| 2083 | 2083 | { |
| 2084 | 2084 | $this->_retvalue = |
| 2085 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2085 | + $this->yystack[$this->yyidx + - 2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2086 | 2086 | } |
| 2087 | 2087 | |
| 2088 | 2088 | #line 765 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2089 | 2089 | public function yy_r98() |
| 2090 | 2090 | { |
| 2091 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.'; |
|
| 2091 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.'; |
|
| 2092 | 2092 | } |
| 2093 | 2093 | |
| 2094 | 2094 | #line 769 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2095 | 2095 | public function yy_r99() |
| 2096 | 2096 | { |
| 2097 | - $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2097 | + $this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2098 | 2098 | } |
| 2099 | 2099 | |
| 2100 | 2100 | #line 774 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2101 | 2101 | public function yy_r100() |
| 2102 | 2102 | { |
| 2103 | - if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { |
|
| 2103 | + if (defined($this->yystack[$this->yyidx + 0]->minor)) { |
|
| 2104 | 2104 | if ($this->security) { |
| 2105 | - $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); |
|
| 2105 | + $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler); |
|
| 2106 | 2106 | } |
| 2107 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2107 | + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; |
|
| 2108 | 2108 | } else { |
| 2109 | - $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; |
|
| 2109 | + $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\''; |
|
| 2110 | 2110 | } |
| 2111 | 2111 | } |
| 2112 | 2112 | |
| 2113 | 2113 | #line 791 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2114 | 2114 | public function yy_r102() |
| 2115 | 2115 | { |
| 2116 | - $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")"; |
|
| 2116 | + $this->_retvalue = "(" . $this->yystack[$this->yyidx + - 1]->minor . ")"; |
|
| 2117 | 2117 | } |
| 2118 | 2118 | |
| 2119 | 2119 | #line 795 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2120 | 2120 | public function yy_r103() |
| 2121 | 2121 | { |
| 2122 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2123 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2122 | + $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . |
|
| 2123 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2124 | 2124 | } |
| 2125 | 2125 | |
| 2126 | 2126 | #line 813 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2127 | 2127 | public function yy_r107() |
| 2128 | 2128 | { |
| 2129 | 2129 | $prefixVar = $this->compiler->getNewPrefixVariable(); |
| 2130 | - if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2130 | + if ($this->yystack[$this->yyidx + - 2]->minor['var'] == '\'smarty\'') { |
|
| 2131 | 2131 | $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
| 2132 | 2132 | $this->compiler->compileTag('private_special_variable', array(), |
| 2133 | - $this->yystack[ $this->yyidx + |
|
| 2134 | - - 2 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2133 | + $this->yystack[$this->yyidx + |
|
| 2134 | + - 2]->minor['smarty_internal_index']) . |
|
| 2135 | 2135 | ';?>'); |
| 2136 | 2136 | } else { |
| 2137 | 2137 | $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . |
| 2138 | - $this->compiler->compileVariable($this->yystack[ $this->yyidx + |
|
| 2139 | - - 2 ]->minor[ 'var' ]) . |
|
| 2140 | - $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] . |
|
| 2138 | + $this->compiler->compileVariable($this->yystack[$this->yyidx + |
|
| 2139 | + - 2]->minor['var']) . |
|
| 2140 | + $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . |
|
| 2141 | 2141 | ';?>'); |
| 2142 | 2142 | } |
| 2143 | - $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2144 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2143 | + $this->_retvalue = $prefixVar . '::' . $this->yystack[$this->yyidx + 0]->minor[0] . |
|
| 2144 | + $this->yystack[$this->yyidx + 0]->minor[1]; |
|
| 2145 | 2145 | } |
| 2146 | 2146 | |
| 2147 | 2147 | #line 824 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2148 | 2148 | public function yy_r108() |
| 2149 | 2149 | { |
| 2150 | 2150 | $prefixVar = $this->compiler->getNewPrefixVariable(); |
| 2151 | - $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2151 | + $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[$this->yyidx + 0]->minor); |
|
| 2152 | 2152 | $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>')); |
| 2153 | 2153 | $this->_retvalue = $prefixVar; |
| 2154 | 2154 | } |
@@ -2156,22 +2156,22 @@ discard block |
||
| 2156 | 2156 | #line 841 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2157 | 2157 | public function yy_r111() |
| 2158 | 2158 | { |
| 2159 | - if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent')) && |
|
| 2159 | + if (!in_array(strtolower($this->yystack[$this->yyidx + - 2]->minor), array('self', 'parent')) && |
|
| 2160 | 2160 | (!$this->security || |
| 2161 | - $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2162 | - $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler)) |
|
| 2161 | + $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + - 2]->minor, |
|
| 2162 | + $this->yystack[$this->yyidx + 0]->minor, $this->compiler)) |
|
| 2163 | 2163 | ) { |
| 2164 | - if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) { |
|
| 2164 | + if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor])) { |
|
| 2165 | 2165 | $this->_retvalue = |
| 2166 | - $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' . |
|
| 2167 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2166 | + $this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor] . '::' . |
|
| 2167 | + $this->yystack[$this->yyidx + 0]->minor[0] . $this->yystack[$this->yyidx + 0]->minor[1]; |
|
| 2168 | 2168 | } else { |
| 2169 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' . |
|
| 2170 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . |
|
| 2171 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]; |
|
| 2169 | + $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '::' . |
|
| 2170 | + $this->yystack[$this->yyidx + 0]->minor[0] . |
|
| 2171 | + $this->yystack[$this->yyidx + 0]->minor[1]; |
|
| 2172 | 2172 | } |
| 2173 | 2173 | } else { |
| 2174 | - $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2174 | + $this->compiler->trigger_template_error("static class '" . $this->yystack[$this->yyidx + - 2]->minor . |
|
| 2175 | 2175 | "' is undefined or not allowed by security setting"); |
| 2176 | 2176 | } |
| 2177 | 2177 | } |
@@ -2179,82 +2179,82 @@ discard block |
||
| 2179 | 2179 | #line 860 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2180 | 2180 | public function yy_r113() |
| 2181 | 2181 | { |
| 2182 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2182 | + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; |
|
| 2183 | 2183 | } |
| 2184 | 2184 | |
| 2185 | 2185 | #line 871 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2186 | 2186 | public function yy_r114() |
| 2187 | 2187 | { |
| 2188 | 2188 | $this->_retvalue = |
| 2189 | - $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); |
|
| 2189 | + $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\''); |
|
| 2190 | 2190 | } |
| 2191 | 2191 | |
| 2192 | 2192 | #line 874 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2193 | 2193 | public function yy_r115() |
| 2194 | 2194 | { |
| 2195 | - if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2195 | + if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { |
|
| 2196 | 2196 | $smarty_var = $this->compiler->compileTag('private_special_variable', array(), |
| 2197 | - $this->yystack[ $this->yyidx + |
|
| 2198 | - 0 ]->minor[ 'smarty_internal_index' ]); |
|
| 2197 | + $this->yystack[$this->yyidx + |
|
| 2198 | + 0]->minor['smarty_internal_index']); |
|
| 2199 | 2199 | $this->_retvalue = $smarty_var; |
| 2200 | 2200 | } else { |
| 2201 | 2201 | // used for array reset,next,prev,end,current |
| 2202 | - $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]; |
|
| 2203 | - $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2204 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) . |
|
| 2205 | - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]; |
|
| 2202 | + $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var']; |
|
| 2203 | + $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; |
|
| 2204 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . |
|
| 2205 | + $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']; |
|
| 2206 | 2206 | } |
| 2207 | 2207 | } |
| 2208 | 2208 | |
| 2209 | 2209 | #line 887 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2210 | 2210 | public function yy_r116() |
| 2211 | 2211 | { |
| 2212 | - $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' . |
|
| 2213 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2212 | + $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[$this->yyidx + - 2]->minor . ']->' . |
|
| 2213 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2214 | 2214 | } |
| 2215 | 2215 | |
| 2216 | 2216 | #line 897 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2217 | 2217 | public function yy_r118() |
| 2218 | 2218 | { |
| 2219 | 2219 | $this->_retvalue = |
| 2220 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'"); |
|
| 2220 | + $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 1]->minor . "'"); |
|
| 2221 | 2221 | } |
| 2222 | 2222 | |
| 2223 | 2223 | #line 901 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2224 | 2224 | public function yy_r119() |
| 2225 | 2225 | { |
| 2226 | 2226 | $this->_retvalue = '(is_array($tmp = ' . |
| 2227 | - $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor . |
|
| 2227 | + $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 2]->minor . |
|
| 2228 | 2228 | "'") . ') ? $tmp' . |
| 2229 | - $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)'; |
|
| 2229 | + $this->yystack[$this->yyidx + 0]->minor . ' :null)'; |
|
| 2230 | 2230 | } |
| 2231 | 2231 | |
| 2232 | 2232 | #line 905 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2233 | 2233 | public function yy_r120() |
| 2234 | 2234 | { |
| 2235 | - $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2235 | + $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 1]->minor); |
|
| 2236 | 2236 | } |
| 2237 | 2237 | |
| 2238 | 2238 | #line 909 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2239 | 2239 | public function yy_r121() |
| 2240 | 2240 | { |
| 2241 | 2241 | $this->_retvalue = |
| 2242 | - '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . |
|
| 2243 | - ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)'; |
|
| 2242 | + '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 2]->minor) . |
|
| 2243 | + ') ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' : null)'; |
|
| 2244 | 2244 | } |
| 2245 | 2245 | |
| 2246 | 2246 | #line 913 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2247 | 2247 | public function yy_r122() |
| 2248 | 2248 | { |
| 2249 | - $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'', |
|
| 2250 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2249 | + $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'', |
|
| 2250 | + 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor); |
|
| 2251 | 2251 | } |
| 2252 | 2252 | |
| 2253 | 2253 | #line 916 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2254 | 2254 | public function yy_r123() |
| 2255 | 2255 | { |
| 2256 | - $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2257 | - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2256 | + $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 1]->minor, |
|
| 2257 | + 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor); |
|
| 2258 | 2258 | } |
| 2259 | 2259 | |
| 2260 | 2260 | #line 929 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2267,47 +2267,47 @@ discard block |
||
| 2267 | 2267 | public function yy_r126() |
| 2268 | 2268 | { |
| 2269 | 2269 | $this->_retvalue = |
| 2270 | - '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') . |
|
| 2270 | + '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'') . |
|
| 2271 | 2271 | ']'; |
| 2272 | 2272 | } |
| 2273 | 2273 | |
| 2274 | 2274 | #line 938 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2275 | 2275 | public function yy_r127() |
| 2276 | 2276 | { |
| 2277 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; |
|
| 2277 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']'; |
|
| 2278 | 2278 | } |
| 2279 | 2279 | |
| 2280 | 2280 | #line 942 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2281 | 2281 | public function yy_r128() |
| 2282 | 2282 | { |
| 2283 | - $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' . |
|
| 2284 | - $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2283 | + $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' . |
|
| 2284 | + $this->yystack[$this->yyidx + 0]->minor . ']'; |
|
| 2285 | 2285 | } |
| 2286 | 2286 | |
| 2287 | 2287 | #line 946 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2288 | 2288 | public function yy_r129() |
| 2289 | 2289 | { |
| 2290 | - $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']"; |
|
| 2290 | + $this->_retvalue = "['" . $this->yystack[$this->yyidx + 0]->minor . "']"; |
|
| 2291 | 2291 | } |
| 2292 | 2292 | |
| 2293 | 2293 | #line 950 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2294 | 2294 | public function yy_r130() |
| 2295 | 2295 | { |
| 2296 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; |
|
| 2296 | + $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']'; |
|
| 2297 | 2297 | } |
| 2298 | 2298 | |
| 2299 | 2299 | #line 955 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2300 | 2300 | public function yy_r131() |
| 2301 | 2301 | { |
| 2302 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2302 | + $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']'; |
|
| 2303 | 2303 | } |
| 2304 | 2304 | |
| 2305 | 2305 | #line 960 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2306 | 2306 | public function yy_r132() |
| 2307 | 2307 | { |
| 2308 | 2308 | $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
| 2309 | - $this->yystack[ $this->yyidx + |
|
| 2310 | - - 1 ]->minor . |
|
| 2309 | + $this->yystack[$this->yyidx + |
|
| 2310 | + - 1]->minor . |
|
| 2311 | 2311 | '\'][\'index\']') . |
| 2312 | 2312 | ']'; |
| 2313 | 2313 | } |
@@ -2316,26 +2316,26 @@ discard block |
||
| 2316 | 2316 | public function yy_r133() |
| 2317 | 2317 | { |
| 2318 | 2318 | $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . |
| 2319 | - $this->yystack[ $this->yyidx + |
|
| 2320 | - - 3 ]->minor . |
|
| 2319 | + $this->yystack[$this->yyidx + |
|
| 2320 | + - 3]->minor . |
|
| 2321 | 2321 | '\'][\'' . |
| 2322 | - $this->yystack[ $this->yyidx + |
|
| 2323 | - - 1 ]->minor . |
|
| 2322 | + $this->yystack[$this->yyidx + |
|
| 2323 | + - 1]->minor . |
|
| 2324 | 2324 | '\']') . ']'; |
| 2325 | 2325 | } |
| 2326 | 2326 | |
| 2327 | 2327 | #line 967 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2328 | 2328 | public function yy_r134() |
| 2329 | 2329 | { |
| 2330 | - $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']'; |
|
| 2330 | + $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']'; |
|
| 2331 | 2331 | } |
| 2332 | 2332 | |
| 2333 | 2333 | #line 973 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2334 | 2334 | public function yy_r136() |
| 2335 | 2335 | { |
| 2336 | 2336 | $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . |
| 2337 | - substr($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2338 | - 1) . '\'') . ']';; |
|
| 2337 | + substr($this->yystack[$this->yyidx + - 1]->minor, |
|
| 2338 | + 1) . '\'') . ']'; ; |
|
| 2339 | 2339 | } |
| 2340 | 2340 | |
| 2341 | 2341 | #line 989 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2347,7 +2347,7 @@ discard block |
||
| 2347 | 2347 | #line 999 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2348 | 2348 | public function yy_r141() |
| 2349 | 2349 | { |
| 2350 | - $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; |
|
| 2350 | + $this->_retvalue = '\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\''; |
|
| 2351 | 2351 | } |
| 2352 | 2352 | |
| 2353 | 2353 | #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2360,14 +2360,14 @@ discard block |
||
| 2360 | 2360 | public function yy_r143() |
| 2361 | 2361 | { |
| 2362 | 2362 | $this->_retvalue = |
| 2363 | - $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2363 | + $this->yystack[$this->yyidx + - 1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2364 | 2364 | } |
| 2365 | 2365 | |
| 2366 | 2366 | #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2367 | 2367 | public function yy_r145() |
| 2368 | 2368 | { |
| 2369 | 2369 | $var = |
| 2370 | - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2370 | + trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), |
|
| 2371 | 2371 | ' $'); |
| 2372 | 2372 | $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); |
| 2373 | 2373 | } |
@@ -2375,44 +2375,44 @@ discard block |
||
| 2375 | 2375 | #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2376 | 2376 | public function yy_r146() |
| 2377 | 2377 | { |
| 2378 | - $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2378 | + $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 1]->minor . ')'; |
|
| 2379 | 2379 | } |
| 2380 | 2380 | |
| 2381 | 2381 | #line 1029 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2382 | 2382 | public function yy_r147() |
| 2383 | 2383 | { |
| 2384 | - if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') { |
|
| 2384 | + if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\'smarty\'') { |
|
| 2385 | 2385 | $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), |
| 2386 | - $this->yystack[ $this->yyidx + |
|
| 2387 | - - 1 ]->minor[ 'smarty_internal_index' ]) . |
|
| 2388 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2386 | + $this->yystack[$this->yyidx + |
|
| 2387 | + - 1]->minor['smarty_internal_index']) . |
|
| 2388 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2389 | 2389 | } else { |
| 2390 | - $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) . |
|
| 2391 | - $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] . |
|
| 2392 | - $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2390 | + $this->_retvalue = $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . |
|
| 2391 | + $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . |
|
| 2392 | + $this->yystack[$this->yyidx + 0]->minor; |
|
| 2393 | 2393 | } |
| 2394 | 2394 | } |
| 2395 | 2395 | |
| 2396 | 2396 | #line 1038 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2397 | 2397 | public function yy_r148() |
| 2398 | 2398 | { |
| 2399 | - $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2399 | + $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; |
|
| 2400 | 2400 | } |
| 2401 | 2401 | |
| 2402 | 2402 | #line 1043 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2403 | 2403 | public function yy_r149() |
| 2404 | 2404 | { |
| 2405 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2405 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2406 | 2406 | } |
| 2407 | 2407 | |
| 2408 | 2408 | #line 1048 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2409 | 2409 | public function yy_r150() |
| 2410 | 2410 | { |
| 2411 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') { |
|
| 2411 | + if ($this->security && substr($this->yystack[$this->yyidx + - 1]->minor, 0, 1) == '_') { |
|
| 2412 | 2412 | $this->compiler->trigger_template_error(self::Err1); |
| 2413 | 2413 | } |
| 2414 | 2414 | $this->_retvalue = |
| 2415 | - '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2415 | + '->' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2416 | 2416 | } |
| 2417 | 2417 | |
| 2418 | 2418 | #line 1055 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2421,8 +2421,8 @@ discard block |
||
| 2421 | 2421 | if ($this->security) { |
| 2422 | 2422 | $this->compiler->trigger_template_error(self::Err2); |
| 2423 | 2423 | } |
| 2424 | - $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) . |
|
| 2425 | - $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2424 | + $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor) . |
|
| 2425 | + $this->yystack[$this->yyidx + 0]->minor . '}'; |
|
| 2426 | 2426 | } |
| 2427 | 2427 | |
| 2428 | 2428 | #line 1062 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2432,7 +2432,7 @@ discard block |
||
| 2432 | 2432 | $this->compiler->trigger_template_error(self::Err2); |
| 2433 | 2433 | } |
| 2434 | 2434 | $this->_retvalue = |
| 2435 | - '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}'; |
|
| 2435 | + '->{' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}'; |
|
| 2436 | 2436 | } |
| 2437 | 2437 | |
| 2438 | 2438 | #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2441,34 +2441,34 @@ discard block |
||
| 2441 | 2441 | if ($this->security) { |
| 2442 | 2442 | $this->compiler->trigger_template_error(self::Err2); |
| 2443 | 2443 | } |
| 2444 | - $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' . |
|
| 2445 | - $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . |
|
| 2444 | + $this->_retvalue = '->{\'' . $this->yystack[$this->yyidx + - 4]->minor . '\'.' . |
|
| 2445 | + $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . |
|
| 2446 | 2446 | '}'; |
| 2447 | 2447 | } |
| 2448 | 2448 | |
| 2449 | 2449 | #line 1077 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2450 | 2450 | public function yy_r154() |
| 2451 | 2451 | { |
| 2452 | - $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2452 | + $this->_retvalue = '->' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2453 | 2453 | } |
| 2454 | 2454 | |
| 2455 | 2455 | #line 1085 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2456 | 2456 | public function yy_r155() |
| 2457 | 2457 | { |
| 2458 | 2458 | if (!$this->security || |
| 2459 | - $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler) |
|
| 2459 | + $this->security->isTrustedPhpFunction($this->yystack[$this->yyidx + - 3]->minor, $this->compiler) |
|
| 2460 | 2460 | ) { |
| 2461 | - if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 || |
|
| 2462 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 || |
|
| 2463 | - strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 || |
|
| 2464 | - is_callable($this->yystack[ $this->yyidx + - 3 ]->minor) |
|
| 2461 | + if (strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'isset') === 0 || |
|
| 2462 | + strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'empty') === 0 || |
|
| 2463 | + strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'array') === 0 || |
|
| 2464 | + is_callable($this->yystack[$this->yyidx + - 3]->minor) |
|
| 2465 | 2465 | ) { |
| 2466 | - $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor); |
|
| 2466 | + $func_name = strtolower($this->yystack[$this->yyidx + - 3]->minor); |
|
| 2467 | 2467 | if ($func_name == 'isset') { |
| 2468 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) { |
|
| 2468 | + if (count($this->yystack[$this->yyidx + - 1]->minor) == 0) { |
|
| 2469 | 2469 | $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"'); |
| 2470 | 2470 | } |
| 2471 | - $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2471 | + $par = implode(',', $this->yystack[$this->yyidx + - 1]->minor); |
|
| 2472 | 2472 | if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', |
| 2473 | 2473 | strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0 |
| 2474 | 2474 | ) { |
@@ -2479,25 +2479,25 @@ discard block |
||
| 2479 | 2479 | } else { |
| 2480 | 2480 | $isset_par = str_replace("')->value", "',null,true,false)->value", $par); |
| 2481 | 2481 | } |
| 2482 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")"; |
|
| 2482 | + $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . $isset_par . ")"; |
|
| 2483 | 2483 | } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) { |
| 2484 | - if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) { |
|
| 2484 | + if (count($this->yystack[$this->yyidx + - 1]->minor) != 1) { |
|
| 2485 | 2485 | $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"'); |
| 2486 | 2486 | } |
| 2487 | 2487 | if ($func_name == 'empty') { |
| 2488 | 2488 | $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", |
| 2489 | - $this->yystack[ $this->yyidx + |
|
| 2490 | - - 1 ]->minor[ 0 ]) . ')'; |
|
| 2489 | + $this->yystack[$this->yyidx + |
|
| 2490 | + - 1]->minor[0]) . ')'; |
|
| 2491 | 2491 | } else { |
| 2492 | - $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')'; |
|
| 2492 | + $this->_retvalue = $func_name . '(' . $this->yystack[$this->yyidx + - 1]->minor[0] . ')'; |
|
| 2493 | 2493 | } |
| 2494 | 2494 | } else { |
| 2495 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2496 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2495 | + $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . |
|
| 2496 | + implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")"; |
|
| 2497 | 2497 | } |
| 2498 | 2498 | } else { |
| 2499 | 2499 | $this->compiler->trigger_template_error("unknown function \"" . |
| 2500 | - $this->yystack[ $this->yyidx + - 3 ]->minor . "\""); |
|
| 2500 | + $this->yystack[$this->yyidx + - 3]->minor . "\""); |
|
| 2501 | 2501 | } |
| 2502 | 2502 | } |
| 2503 | 2503 | } |
@@ -2505,11 +2505,11 @@ discard block |
||
| 2505 | 2505 | #line 1124 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2506 | 2506 | public function yy_r156() |
| 2507 | 2507 | { |
| 2508 | - if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') { |
|
| 2508 | + if ($this->security && substr($this->yystack[$this->yyidx + - 3]->minor, 0, 1) == '_') { |
|
| 2509 | 2509 | $this->compiler->trigger_template_error(self::Err1); |
| 2510 | 2510 | } |
| 2511 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . |
|
| 2512 | - implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")"; |
|
| 2511 | + $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . |
|
| 2512 | + implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")"; |
|
| 2513 | 2513 | } |
| 2514 | 2514 | |
| 2515 | 2515 | #line 1131 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2520,86 +2520,86 @@ discard block |
||
| 2520 | 2520 | } |
| 2521 | 2521 | $prefixVar = $this->compiler->getNewPrefixVariable(); |
| 2522 | 2522 | $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . |
| 2523 | - substr($this->yystack[ $this->yyidx + |
|
| 2524 | - - 3 ]->minor, |
|
| 2523 | + substr($this->yystack[$this->yyidx + |
|
| 2524 | + - 3]->minor, |
|
| 2525 | 2525 | 1) . |
| 2526 | 2526 | '\'') . ';?>'); |
| 2527 | - $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')'; |
|
| 2527 | + $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')'; |
|
| 2528 | 2528 | } |
| 2529 | 2529 | |
| 2530 | 2530 | #line 1142 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2531 | 2531 | public function yy_r158() |
| 2532 | 2532 | { |
| 2533 | 2533 | $this->_retvalue = |
| 2534 | - array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2534 | + array_merge($this->yystack[$this->yyidx + - 2]->minor, array($this->yystack[$this->yyidx + 0]->minor)); |
|
| 2535 | 2535 | } |
| 2536 | 2536 | |
| 2537 | 2537 | #line 1159 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2538 | 2538 | public function yy_r161() |
| 2539 | 2539 | { |
| 2540 | - $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2541 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, |
|
| 2542 | - $this->yystack[ $this->yyidx + 0 ]->minor))); |
|
| 2540 | + $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 2]->minor, |
|
| 2541 | + array(array_merge($this->yystack[$this->yyidx + - 1]->minor, |
|
| 2542 | + $this->yystack[$this->yyidx + 0]->minor))); |
|
| 2543 | 2543 | } |
| 2544 | 2544 | |
| 2545 | 2545 | #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2546 | 2546 | public function yy_r162() |
| 2547 | 2547 | { |
| 2548 | 2548 | $this->_retvalue = |
| 2549 | - array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2549 | + array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor)); |
|
| 2550 | 2550 | } |
| 2551 | 2551 | |
| 2552 | 2552 | #line 1171 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2553 | 2553 | public function yy_r164() |
| 2554 | 2554 | { |
| 2555 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2555 | + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); |
|
| 2556 | 2556 | } |
| 2557 | 2557 | |
| 2558 | 2558 | #line 1179 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2559 | 2559 | public function yy_r165() |
| 2560 | 2560 | { |
| 2561 | 2561 | $this->_retvalue = |
| 2562 | - array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2562 | + array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor); |
|
| 2563 | 2563 | } |
| 2564 | 2564 | |
| 2565 | 2565 | #line 1198 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2566 | 2566 | public function yy_r169() |
| 2567 | 2567 | { |
| 2568 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); |
|
| 2568 | + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method'); |
|
| 2569 | 2569 | } |
| 2570 | 2570 | |
| 2571 | 2571 | #line 1203 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2572 | 2572 | public function yy_r170() |
| 2573 | 2573 | { |
| 2574 | 2574 | $this->_retvalue = |
| 2575 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); |
|
| 2575 | + array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method'); |
|
| 2576 | 2576 | } |
| 2577 | 2577 | |
| 2578 | 2578 | #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2579 | 2579 | public function yy_r171() |
| 2580 | 2580 | { |
| 2581 | - $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); |
|
| 2581 | + $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, ''); |
|
| 2582 | 2582 | } |
| 2583 | 2583 | |
| 2584 | 2584 | #line 1213 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2585 | 2585 | public function yy_r172() |
| 2586 | 2586 | { |
| 2587 | 2587 | $this->_retvalue = |
| 2588 | - array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2588 | + array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property'); |
|
| 2589 | 2589 | } |
| 2590 | 2590 | |
| 2591 | 2591 | #line 1218 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2592 | 2592 | public function yy_r173() |
| 2593 | 2593 | { |
| 2594 | - $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor, |
|
| 2595 | - $this->yystack[ $this->yyidx + - 1 ]->minor . |
|
| 2596 | - $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); |
|
| 2594 | + $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor, |
|
| 2595 | + $this->yystack[$this->yyidx + - 1]->minor . |
|
| 2596 | + $this->yystack[$this->yyidx + 0]->minor, 'property'); |
|
| 2597 | 2597 | } |
| 2598 | 2598 | |
| 2599 | 2599 | #line 1224 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2600 | 2600 | public function yy_r174() |
| 2601 | 2601 | { |
| 2602 | - $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; |
|
| 2602 | + $this->_retvalue = ' ' . trim($this->yystack[$this->yyidx + 0]->minor) . ' '; |
|
| 2603 | 2603 | } |
| 2604 | 2604 | |
| 2605 | 2605 | #line 1228 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2609,8 +2609,8 @@ discard block |
||
| 2609 | 2609 | array('eq' => ' == ', 'ne' => ' != ', 'neq' => ' != ', 'gt' => ' > ', 'ge' => ' >= ', 'gte' => ' >= ', |
| 2610 | 2610 | 'lt' => ' < ', 'le' => ' <= ', 'lte' => ' <= ', 'mod' => ' % ', 'and' => ' && ', 'or' => ' || ', |
| 2611 | 2611 | 'xor' => ' xor ',); |
| 2612 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2613 | - $this->_retvalue = $lops[ $op ]; |
|
| 2612 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); |
|
| 2613 | + $this->_retvalue = $lops[$op]; |
|
| 2614 | 2614 | } |
| 2615 | 2615 | |
| 2616 | 2616 | #line 1247 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2622,8 +2622,8 @@ discard block |
||
| 2622 | 2622 | 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '), |
| 2623 | 2623 | 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '), |
| 2624 | 2624 | 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),); |
| 2625 | - $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2626 | - $this->_retvalue = $tlops[ $op ]; |
|
| 2625 | + $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor)); |
|
| 2626 | + $this->_retvalue = $tlops[$op]; |
|
| 2627 | 2627 | } |
| 2628 | 2628 | |
| 2629 | 2629 | #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" |
@@ -2631,67 +2631,67 @@ discard block |
||
| 2631 | 2631 | { |
| 2632 | 2632 | static $scond = |
| 2633 | 2633 | array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); |
| 2634 | - $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor)); |
|
| 2635 | - $this->_retvalue = $scond[ $op ]; |
|
| 2634 | + $op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor)); |
|
| 2635 | + $this->_retvalue = $scond[$op]; |
|
| 2636 | 2636 | } |
| 2637 | 2637 | |
| 2638 | 2638 | #line 1274 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2639 | 2639 | public function yy_r178() |
| 2640 | 2640 | { |
| 2641 | - $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'; |
|
| 2641 | + $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')'; |
|
| 2642 | 2642 | } |
| 2643 | 2643 | |
| 2644 | 2644 | #line 1282 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2645 | 2645 | public function yy_r180() |
| 2646 | 2646 | { |
| 2647 | 2647 | $this->_retvalue = |
| 2648 | - $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2648 | + $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2649 | 2649 | } |
| 2650 | 2650 | |
| 2651 | 2651 | #line 1290 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2652 | 2652 | public function yy_r182() |
| 2653 | 2653 | { |
| 2654 | 2654 | $this->_retvalue = |
| 2655 | - $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2655 | + $this->yystack[$this->yyidx + - 2]->minor . '=>' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2656 | 2656 | } |
| 2657 | 2657 | |
| 2658 | 2658 | #line 1294 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2659 | 2659 | public function yy_r183() |
| 2660 | 2660 | { |
| 2661 | 2661 | $this->_retvalue = |
| 2662 | - '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; |
|
| 2662 | + '\'' . $this->yystack[$this->yyidx + - 2]->minor . '\'=>' . $this->yystack[$this->yyidx + 0]->minor; |
|
| 2663 | 2663 | } |
| 2664 | 2664 | |
| 2665 | 2665 | #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2666 | 2666 | public function yy_r186() |
| 2667 | 2667 | { |
| 2668 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this); |
|
| 2668 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor->to_smarty_php($this); |
|
| 2669 | 2669 | } |
| 2670 | 2670 | |
| 2671 | 2671 | #line 1315 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2672 | 2672 | public function yy_r187() |
| 2673 | 2673 | { |
| 2674 | - $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2675 | - $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor; |
|
| 2674 | + $this->yystack[$this->yyidx + - 1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); |
|
| 2675 | + $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; |
|
| 2676 | 2676 | } |
| 2677 | 2677 | |
| 2678 | 2678 | #line 1320 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2679 | 2679 | public function yy_r188() |
| 2680 | 2680 | { |
| 2681 | - $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2681 | + $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[$this->yyidx + 0]->minor); |
|
| 2682 | 2682 | } |
| 2683 | 2683 | |
| 2684 | 2684 | #line 1324 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2685 | 2685 | public function yy_r189() |
| 2686 | 2686 | { |
| 2687 | - $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor); |
|
| 2687 | + $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[$this->yyidx + - 1]->minor); |
|
| 2688 | 2688 | } |
| 2689 | 2689 | |
| 2690 | 2690 | #line 1332 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2691 | 2691 | public function yy_r191() |
| 2692 | 2692 | { |
| 2693 | 2693 | $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . |
| 2694 | - substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . |
|
| 2694 | + substr($this->yystack[$this->yyidx + 0]->minor, 1) . |
|
| 2695 | 2695 | '\']->value'); |
| 2696 | 2696 | } |
| 2697 | 2697 | |
@@ -2699,19 +2699,19 @@ discard block |
||
| 2699 | 2699 | public function yy_r193() |
| 2700 | 2700 | { |
| 2701 | 2701 | $this->_retvalue = |
| 2702 | - new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')'); |
|
| 2702 | + new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')'); |
|
| 2703 | 2703 | } |
| 2704 | 2704 | |
| 2705 | 2705 | #line 1344 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2706 | 2706 | public function yy_r194() |
| 2707 | 2707 | { |
| 2708 | - $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2708 | + $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[$this->yyidx + 0]->minor); |
|
| 2709 | 2709 | } |
| 2710 | 2710 | |
| 2711 | 2711 | #line 1348 "../smarty/lexer/smarty_internal_templateparser.y" |
| 2712 | 2712 | public function yy_r195() |
| 2713 | 2713 | { |
| 2714 | - $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); |
|
| 2714 | + $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[$this->yyidx + 0]->minor); |
|
| 2715 | 2715 | } |
| 2716 | 2716 | |
| 2717 | 2717 | private $_retvalue; |
@@ -2720,32 +2720,32 @@ discard block |
||
| 2720 | 2720 | { |
| 2721 | 2721 | if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { |
| 2722 | 2722 | fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, |
| 2723 | - self::$yyRuleName[ $yyruleno ]); |
|
| 2723 | + self::$yyRuleName[$yyruleno]); |
|
| 2724 | 2724 | } |
| 2725 | 2725 | |
| 2726 | 2726 | $this->_retvalue = $yy_lefthand_side = null; |
| 2727 | - if (isset(self::$yyReduceMap[ $yyruleno ])) { |
|
| 2727 | + if (isset(self::$yyReduceMap[$yyruleno])) { |
|
| 2728 | 2728 | // call the action |
| 2729 | 2729 | $this->_retvalue = null; |
| 2730 | - $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}(); |
|
| 2730 | + $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}(); |
|
| 2731 | 2731 | $yy_lefthand_side = $this->_retvalue; |
| 2732 | 2732 | } |
| 2733 | - $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ]; |
|
| 2734 | - $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ]; |
|
| 2733 | + $yygoto = self::$yyRuleInfo[$yyruleno][0]; |
|
| 2734 | + $yysize = self::$yyRuleInfo[$yyruleno][1]; |
|
| 2735 | 2735 | $this->yyidx -= $yysize; |
| 2736 | - for ($i = $yysize; $i; $i --) { |
|
| 2736 | + for ($i = $yysize; $i; $i--) { |
|
| 2737 | 2737 | // pop all of the right-hand side parameters |
| 2738 | 2738 | array_pop($this->yystack); |
| 2739 | 2739 | } |
| 2740 | - $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto); |
|
| 2740 | + $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto); |
|
| 2741 | 2741 | if ($yyact < self::YYNSTATE) { |
| 2742 | 2742 | if (!$this->yyTraceFILE && $yysize) { |
| 2743 | - $this->yyidx ++; |
|
| 2743 | + $this->yyidx++; |
|
| 2744 | 2744 | $x = new TP_yyStackEntry; |
| 2745 | 2745 | $x->stateno = $yyact; |
| 2746 | 2746 | $x->major = $yygoto; |
| 2747 | 2747 | $x->minor = $yy_lefthand_side; |
| 2748 | - $this->yystack[ $this->yyidx ] = $x; |
|
| 2748 | + $this->yystack[$this->yyidx] = $x; |
|
| 2749 | 2749 | } else { |
| 2750 | 2750 | $this->yy_shift($yyact, $yygoto, $yy_lefthand_side); |
| 2751 | 2751 | } |
@@ -2790,7 +2790,7 @@ discard block |
||
| 2790 | 2790 | |
| 2791 | 2791 | public function doParse($yymajor, $yytokenvalue) |
| 2792 | 2792 | { |
| 2793 | - $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2793 | + $yyerrorhit = 0; /* True if yymajor has invoked an error */ |
|
| 2794 | 2794 | |
| 2795 | 2795 | if ($this->yyidx === null || $this->yyidx < 0) { |
| 2796 | 2796 | $this->yyidx = 0; |
@@ -2804,7 +2804,7 @@ discard block |
||
| 2804 | 2804 | $yyendofinput = ($yymajor == 0); |
| 2805 | 2805 | |
| 2806 | 2806 | if ($this->yyTraceFILE) { |
| 2807 | - fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); |
|
| 2807 | + fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]); |
|
| 2808 | 2808 | } |
| 2809 | 2809 | |
| 2810 | 2810 | do { |
@@ -2815,7 +2815,7 @@ discard block |
||
| 2815 | 2815 | } |
| 2816 | 2816 | if ($yyact < self::YYNSTATE) { |
| 2817 | 2817 | $this->yy_shift($yyact, $yymajor, $yytokenvalue); |
| 2818 | - $this->yyerrcnt --; |
|
| 2818 | + $this->yyerrcnt--; |
|
| 2819 | 2819 | if ($yyendofinput && $this->yyidx >= 0) { |
| 2820 | 2820 | $yymajor = 0; |
| 2821 | 2821 | } else { |
@@ -2831,11 +2831,11 @@ discard block |
||
| 2831 | 2831 | if ($this->yyerrcnt < 0) { |
| 2832 | 2832 | $this->yy_syntax_error($yymajor, $yytokenvalue); |
| 2833 | 2833 | } |
| 2834 | - $yymx = $this->yystack[ $this->yyidx ]->major; |
|
| 2834 | + $yymx = $this->yystack[$this->yyidx]->major; |
|
| 2835 | 2835 | if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) { |
| 2836 | 2836 | if ($this->yyTraceFILE) { |
| 2837 | 2837 | fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, |
| 2838 | - $this->yyTokenName[ $yymajor ]); |
|
| 2838 | + $this->yyTokenName[$yymajor]); |
|
| 2839 | 2839 | } |
| 2840 | 2840 | $this->yy_destructor($yymajor, $yytokenvalue); |
| 2841 | 2841 | $yymajor = self::YYNOCODE; |