/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Plugin
/Broker.php
}
}
}
}
/**
* Called after an action is dispatched by Zend_Controller_Dispatcher.
*
* @param Zend_Controller_Request_Abstract $request
* @return void
*/
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
foreach ($this->_plugins as $plugin) {
try {
$plugin->postDispatch($request);
} catch (Exception $e) {
if (Zend_Controller_Front::getInstance()->throwExceptions()) {
throw new Zend_Controller_Exception($e->getMessage() . $e->getTraceAsString(), $e->getCode(), $e);
} else {
$this->getResponse()->setException($e);
}
}
}
}
/**
* Called before Zend_Controller_Front exits its dispatch loop.
*
* @param Zend_Controller_Request_Abstract $request
* @return void
*/
public function dispatchLoopShutdown()
{
foreach ($this->_plugins as $plugin) {
try {
$plugin->dispatchLoopShutdown();
} catch (Exception $e) {
Arguments
"""
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction SQL: \n
\t\t\tREPLACE INTO\n
\t\t\t\ttblSeoUrl\n
\t\t\tSET\n
\t\t\t\tpage_id = :page_id,domain = :domain,path = :path,parameters = NULL,no_seo_url = :no_seo_url,type = :type,lang = :lang PARAMS: array (\n
':page_id' => 5326,\n
':domain' => 'www.sksi.sk',\n
':path' => '/clenstvo-a-vykon-povolania-autorizovanych-stavebnych-inzinierov-1',\n
':no_seo_url' => '0',\n
':type' => 'automatic',\n
':lang' => 'sk',\n
)#0 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): BuxusDB_Statement_PDO->_execute()\n
#1 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()\n
#2 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()\n
#3 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/buxus/includes/classes/db/buxus_db_adapter_mysql.php(92): Zend_Db_Adapter_Pdo_Abstract->query()\n
#4 /home/sksi/live/releases/20181220140310/vendor/buxus/seourl-legacy/src/SeoUrl.php(1119): BuxusDB_Adapter_Mysql->query()\n
#5 /home/sksi/live/releases/20181220140310/vendor/buxus/seourl-legacy/src/SeoUrl.php(1430): Buxus\SeoUrlLegacy\SeoUrl->saveSeoUrl()\n
#6 /home/sksi/live/releases/20181220140310/vendor/buxus/seourl-legacy/src/SeoUrl.php(1502): Buxus\SeoUrlLegacy\SeoUrl->getSeoUrl()\n
#7 /home/sksi/live/releases/20181220140310/vendor/illuminate/support/Facades/Facade.php(221): Buxus\SeoUrlLegacy\SeoUrl->createUrlForPage()\n
#8 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/buxus/includes/generate_functions.php(221): Illuminate\Support\Facades\Facade::__callStatic()\n
#9 /home/sksi/live/releases/20181220140310/buxus/application/models/App/LayoutItems/ExtendedLinkList.php(19): CreateUrlForPage()\n
#10 /home/sksi/live/releases/20181220140310/vendor/buxus-libs/layouts/src/Items/LinkList.php(45): App\LayoutItems\ExtendedLinkList->getLinks()\n
#11 /home/sksi/live/releases/20181220140310/vendor/buxus-libs/layouts/src/AbstractLayoutItem.php(62): Layout\Items\LinkList->render()\n
#12 /home/sksi/live/releases/20181220140310/buxus/application/models/App/LayoutItems/ExtendedMenuLink.php(28): Layout\AbstractLayoutItem->renderChildrenContent()\n
#13 /home/sksi/live/releases/20181220140310/vendor/buxus-libs/layouts/src/AbstractLayoutItem.php(62): App\LayoutItems\ExtendedMenuLink->render()\n
#14 /home/sksi/live/releases/20181220140310/vendor/buxus-libs/mega-menu/src/Layout/Items/Megamenu.php(16): Layout\AbstractLayoutItem->renderChildrenContent()\n
#15 /home/sksi/live/releases/20181220140310/buxus/application/views/scripts/index/megamenu.phtml(41): Krabica\MegaMenu\Layout\Items\Megamenu->render()\n
#16 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View.php(157): include('/home/sksi/live...')\n
#17 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Abstract.php(888): Zend_View->_run()\n
#18 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render()\n
#19 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript()\n
#20 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()\n
#21 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()\n
#22 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/src/Buxus/Controller.php(36): Zend_Controller_Action_HelperBroker->notifyPostDispatch()\n
#23 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Buxus\Controller->dispatch()\n
#24 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Helper/Action.php(135): Zend_Controller_Dispatcher_Standard->dispatch()\n
#25 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Abstract.php(349): Zend_View_Helper_Action->action()\n
#26 /home/sksi/live/releases/20181220140310/buxus/application/views/scripts/index/header.phtml(4): Zend_View_Abstract->__call()\n
#27 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View.php(157): include('/home/sksi/live...')\n
#28 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Abstract.php(888): Zend_View->_run()\n
#29 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render()\n
#30 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript()\n
#31 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()\n
#32 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()\n
#33 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/src/Buxus/Controller.php(36): Zend_Controller_Action_HelperBroker->notifyPostDispatch()\n
#34 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Buxus\Controller->dispatch()\n
#35 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Helper/Action.php(135): Zend_Controller_Dispatcher_Standard->dispatch()\n
#36 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Abstract.php(349): Zend_View_Helper_Action->action()\n
#37 /home/sksi/live/releases/20181220140310/buxus/application/layouts/main.phtml(46): Zend_View_Abstract->__call()\n
#38 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View.php(157): include('/home/sksi/live...')\n
#39 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/View/Abstract.php(888): Zend_View->_run()\n
#40 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/src/Buxus/Zend/Layout.php(58): Zend_View_Abstract->render()\n
#41 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Layout/Controller/Plugin/Layout.php(143): Buxus\Zend\Layout->render()\n
#42 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Plugin/Broker.php(333): Zend_Layout_Controller_Plugin_Layout->postDispatch()\n
#43 /home/sksi/live/releases/20181220140310/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(965): Zend_Controller_Plugin_Broker->postDispatch()\n
#44 /home/sksi/live/releases/20181220140310/vendor/buxus/legacy-base/buxus/includes/generate_functions.php(151): Zend_Controller_Front->dispatch()\n
#45 /home/sksi/live/releases/20181220140310/vendor/buxus/core/src/handler/generate_page.php(47): GeneratePage()\n
#46 /home/sksi/live/releases/20181220140310/vendor/buxus/core/src/Buxus/Router/BuxusRouter.php(86): include('/home/sksi/live...')\n
#47 /home/sksi/live/releases/20181220140310/public/buxus.php(7): Buxus\Router\BuxusRouter->dispatch()\n
#48 {main}
"""
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/classes
/db
/buxus_db_statement_pdo.php
* Executes a prepared statement.
*
* @param array $params OPTIONAL Values to bind to parameter placeholders.
* @return bool
* @throws Zend_Db_Statement_Exception
*/
public function _execute(array $params = null) {
$_previous_error_level = error_reporting();
error_reporting(0);
$_start = microtime(true);
try {
if ($params !== null) {
$result = $this->_stmt->execute($params);
} else {
$result = $this->_stmt->execute();
}
} catch (PDOException $e) {
error_reporting($_previous_error_level);
throw new Zend_Db_Statement_Exception($e->getMessage() . ' SQL: ' . $this->_stmt->queryString . ' PARAMS: ' . var_export($params, true), (int) $e->getCode(), $e);
}
error_reporting($_previous_error_level);
\Buxus\Event\BuxusEvent::fire(new \Buxus\Event\Database\QueryExecuted($this->_stmt->queryString, $params, (microtime(true) - $_start)));
return $result;
}
}
Arguments
"""
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction SQL: \n
\t\t\tREPLACE INTO\n
\t\t\t\ttblSeoUrl\n
\t\t\tSET\n
\t\t\t\tpage_id = :page_id,domain = :domain,path = :path,parameters = NULL,no_seo_url = :no_seo_url,type = :type,lang = :lang PARAMS: array (\n
':page_id' => 5326,\n
':domain' => 'www.sksi.sk',\n
':path' => '/clenstvo-a-vykon-povolania-autorizovanych-stavebnych-inzinierov-1',\n
':no_seo_url' => '0',\n
':type' => 'automatic',\n
':lang' => 'sk',\n
)
"""
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/classes
/db
/buxus_db_statement_pdo.php
<?php
class BuxusDB_Statement_PDO extends Zend_Db_Statement_Pdo {
/**
* Executes a prepared statement.
*
* @param array $params OPTIONAL Values to bind to parameter placeholders.
* @return bool
* @throws Zend_Db_Statement_Exception
*/
public function _execute(array $params = null) {
$_previous_error_level = error_reporting();
error_reporting(0);
$_start = microtime(true);
try {
if ($params !== null) {
$result = $this->_stmt->execute($params);
} else {
$result = $this->_stmt->execute();
}
} catch (PDOException $e) {
error_reporting($_previous_error_level);
throw new Zend_Db_Statement_Exception($e->getMessage() . ' SQL: ' . $this->_stmt->queryString . ' PARAMS: ' . var_export($params, true), (int) $e->getCode(), $e);
}
error_reporting($_previous_error_level);
\Buxus\Event\BuxusEvent::fire(new \Buxus\Event\Database\QueryExecuted($this->_stmt->queryString, $params, (microtime(true) - $_start)));
return $result;
}
}
Arguments
"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/classes
/db
/buxus_db_statement_pdo.php
<?php
class BuxusDB_Statement_PDO extends Zend_Db_Statement_Pdo {
/**
* Executes a prepared statement.
*
* @param array $params OPTIONAL Values to bind to parameter placeholders.
* @return bool
* @throws Zend_Db_Statement_Exception
*/
public function _execute(array $params = null) {
$_previous_error_level = error_reporting();
error_reporting(0);
$_start = microtime(true);
try {
if ($params !== null) {
$result = $this->_stmt->execute($params);
} else {
$result = $this->_stmt->execute();
}
} catch (PDOException $e) {
error_reporting($_previous_error_level);
throw new Zend_Db_Statement_Exception($e->getMessage() . ' SQL: ' . $this->_stmt->queryString . ' PARAMS: ' . var_export($params, true), (int) $e->getCode(), $e);
}
error_reporting($_previous_error_level);
\Buxus\Event\BuxusEvent::fire(new \Buxus\Event\Database\QueryExecuted($this->_stmt->queryString, $params, (microtime(true) - $_start)));
return $result;
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Db
/Statement.php
* @return bool
*/
public function bindValue($parameter, $value, $type = null)
{
return $this->bindParam($parameter, $value, $type);
}
/**
* Executes a prepared statement.
*
* @param array $params OPTIONAL Values to bind to parameter placeholders.
* @return bool
*/
public function execute(array $params = null)
{
/*
* Simple case - no query profiler to manage.
*/
if ($this->_queryId === null) {
return $this->_execute($params);
}
/*
* Do the same thing, but with query profiler
* management before and after the execute.
*/
$prof = $this->_adapter->getProfiler();
$qp = $prof->getQueryProfile($this->_queryId);
if ($qp->hasEnded()) {
$this->_queryId = $prof->queryClone($qp);
$qp = $prof->getQueryProfile($this->_queryId);
}
if ($params !== null) {
$qp->bindParams($params);
} else {
$qp->bindParams($this->_bindParam);
}
$qp->start($this->_queryId);
$retval = $this->_execute($params);
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Db
/Adapter
/Abstract.php
// is the $sql a Zend_Db_Select object?
if ($sql instanceof Zend_Db_Select) {
if (empty($bind)) {
$bind = $sql->getBind();
}
$sql = $sql->assemble();
}
// make sure $bind to an array;
// don't use (array) typecasting because
// because $bind may be a Zend_Db_Expr object
if (!is_array($bind)) {
$bind = array($bind);
}
// prepare and execute the statement with profiling
$stmt = $this->prepare($sql);
$stmt->execute($bind);
// return the results embedded in the prepared statement object
$stmt->setFetchMode($this->_fetchMode);
return $stmt;
}
/**
* Leave autocommit mode and begin a transaction.
*
* @return Zend_Db_Adapter_Abstract
*/
public function beginTransaction()
{
$this->_connect();
$q = $this->_profiler->queryStart('begin', Zend_Db_Profiler::TRANSACTION);
$this->_beginTransaction();
$this->_profiler->queryEnd($q);
return $this;
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Db
/Adapter
/Pdo
/Abstract.php
* @throws Zend_Db_Adapter_Exception To re-throw PDOException.
*/
public function query($sql, $bind = array())
{
if (empty($bind) && $sql instanceof Zend_Db_Select) {
$bind = $sql->getBind();
}
if (is_array($bind)) {
foreach ($bind as $name => $value) {
if (!is_int($name) && !preg_match('/^:/', $name)) {
$newName = ":$name";
unset($bind[$name]);
$bind[$newName] = $value;
}
}
}
try {
return parent::query($sql, $bind);
} catch (PDOException $e) {
/**
* @see Zend_Db_Statement_Exception
*/
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
/**
* Executes an SQL statement and return the number of affected rows
*
* @param mixed $sql The SQL statement with placeholders.
* May be a string or Zend_Db_Select.
* @return integer Number of rows that were modified
* or deleted by the SQL statement
*/
public function exec($sql)
{
if ($sql instanceof Zend_Db_Select) {
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/classes
/db
/buxus_db_adapter_mysql.php
$this->_connection = null;
$this->_connect();
}
public function disconnect()
{
$this->_connection = null;
}
public function query($sql, $bind = array()) {
try {
if (is_array($bind)) {
foreach ($bind as $key => $value) {
if (is_string($key) && is_array($value)) {
$sql = preg_replace('@' . preg_quote($key) . '@', implode(',', $value), $sql);
unset($bind[$key]);
}
}
}
$result = parent::query($sql, $bind);
} catch (\Exception $e) {
if ($this->causedByLostConnection($e)) {
$this->reconnect();
$result = parent::query($sql, $bind);
} else {
throw $e;
}
}
return $result;
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/seourl-legacy
/src
/SeoUrl.php
$sql_params[':parameters'] = $parameters;
} else {
$set_variables[] = "parameters = NULL";
unset($sql_params[':parameters']);
}
$set_variables[] = "no_seo_url = :no_seo_url";
if (!is_null($type)) { // The type is not defined
$set_variables[] = "type = :type";
$sql_params[':type'] = $type;
}
if (!is_null($language)) { // The protocol is not defined
$set_variables[] = "lang = :lang";
$sql_params[':lang'] = $language;
}
$query = "
REPLACE INTO
tblSeoUrl
SET
" . implode(',', $set_variables);
\BuxusDB::get()->query($query, $sql_params);
if ($this->memcached_urls) {
$storage = $this->getStorage();
$storage->forget($this->getPageCacheKey($page_id, $domain));
}
}
/**
* Add page, which has not SEO URL parent
*
* @param int $page_id
*/
public function addNoParentPage($page_id)
{
$this->no_parent_pages[] = $page_id;
}
/**
* Return true if the page has not SEO URL parent
*
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/seourl-legacy
/src
/SeoUrl.php
if ($this->adding_index) { // The index should be added
$index = 1;
$path_original = $path;
while (!$this->isUnique($page_id, $protocol, $domain, $path, \Trans::getActiveLanguage())) { // Duplicate SEO URL
$path = $path_original . '-' . $index;
$index++;
$seo_url = $protocol . $domain . $path;
}
} else {
if (!$this->isUnique($page_id, $protocol, $domain, $path, \Trans::getActiveLanguage())) { // Duplicate SEO URL
$this->saveSeoUrl($page_id, null, $hostDomain, true, null, null, self::TYPE_AUTOMATIC, \Trans::getActiveLanguage());
// Save to cache
$this->cache_seo_urls[$hostDomain][\Trans::getActiveLanguage()][$page_id] = null;
return null;
}
}
$this->saveSeoUrl($page_id, null, $domain, false, $path, null, self::TYPE_AUTOMATIC, \Trans::getActiveLanguage());
// process the url before storing
//$seo_url = $this->processUrl($seo_url);
// Save to cache
$this->cache_seo_urls[$hostDomain][\Trans::getActiveLanguage()][$page_id] = $seo_url;
if ($this->ignore_protocol) {
$seo_url = $this->alterUrlForCurrentProtocol($seo_url);
}
return $seo_url;
}
// /**
// * Convert virtual SEO URL from DB to real SEO URL for this web
// *
// * @param string $virtual_seo_url
// * @return string
// */
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/seourl-legacy
/src
/SeoUrl.php
* @param string $url_parameter
* @param string $quotes
* @return string
*/
public function createUrlForPage($page_id, $url_parameter, $quotes)
{
if (!empty($this->seo_page_types)) { // The SEO URL is defined
$parameter_mark_included = false;
if (count($this->domainHomePageIds) && in_array($page_id, $this->domainHomePageIds) && (is_null($this->default_language) || $this->default_language == \Trans::getActiveLanguage())) {
$seo_url_str = $this->default_protocol . array_search($page_id, $this->domainHomePageIds);
$url_appendix = '/';
} elseif ($page_id == $this->getHomePageId() && (is_null($this->default_language) || $this->default_language == \Trans::getActiveLanguage())) { // It is the home page
$seo_url_str = $this->default_protocol . $this->getWebHostName();
$url_appendix = '/';
} else { // It is not the homepage
$seo_url_str = $this->getSeoUrl($page_id);
if ($this->append_page_id) {
$url_appendix = $this->url_postix . '?page_id=' . $page_id;
$parameter_mark_included = true;
} else {
$url_appendix = $this->url_postix;
}
}
if (!empty($url_parameter)) { // The URL parameters are defined
if (is_array($url_parameter)) {//if array, multiple params inside
foreach ($url_parameter as $key => $value) {
$parameters[] = $key . '=' . $value;
}
$url_parameter = ($parameter_mark_included ? '&' : '?') . implode('&', $parameters);
} else {
$url_parameter = preg_replace('/^&(amp;)?/', '', $url_parameter);
$url_parameter = preg_replace('/^\?/', '', $url_parameter);
if (!empty($url_parameter)) {
$url_parameter = ($parameter_mark_included ? '&' : '?') . $url_parameter;
/home
/sksi
/live
/releases
/20181220140310
/vendor
/illuminate
/support
/Facades
/Facade.php
}
/**
* Handle dynamic, static calls to the object.
*
* @param string $method
* @param array $args
* @return mixed
*
* @throws \RuntimeException
*/
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
if (! $instance) {
throw new RuntimeException('A facade root has not been set.');
}
return $instance->$method(...$args);
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/generate_functions.php
if ((!array_key_exists('buxus_page_names', $GLOBALS)) || (!is_array($GLOBALS['buxus_page_names'])))
{// The cache array is not defined
$GLOBALS['buxus_page_names'] = array();
}
if (!array_key_exists($page_id, $GLOBALS['buxus_page_names']))
{// The page name has not used before
$GLOBALS['buxus_page_names'][$page_id] = BuxusDB::get()->fetchOne("SELECT page_name FROM tblPages WHERE page_id = :page_id", array(':page_id' => $page_id));
}
$static_file_name = str_replace('<page_name>', $GLOBALS['buxus_page_names'][$page_id], $static_file_name);
}
$static_file_name = str_replace('\\', '/', $static_file_name);
// Remove diacritic and spaces
$static_file_name = \Buxus\SeoUrlLegacy\Facades\SeoUrl::cleanUrl($static_file_name, true);
return ($quotes . GetSystemOption('C_static_url_prefix') . $static_file_name . '?' . $url_parameter . $quotes);
} else {
return \Buxus\SeoUrlLegacy\Facades\SeoUrl::createUrlForPage($page_id, $url_parameter, $quotes);
}
}
function CreateUrlForImageName($image_name, $quotes = "'", $dummy = false, $modificator = null, $no_custom = false)
{
if ($no_custom == false && function_exists('CustomCreateUrlForImageName'))
{
return CustomCreateUrlForImageName($image_name, $quotes, $dummy, $modificator);
}
global $as_static;
$image_file = $image_name;
$protocol = \Buxus\Util\Url::getProtocol();
$hostname = $protocol . getenv('HOST');
if (GetSystemOption('C_static_hostname'))
{
/home
/sksi
/live
/releases
/20181220140310
/buxus
/application
/models
/App
/LayoutItems
/ExtendedLinkList.php
<?php
namespace App\LayoutItems;
use Buxus\Property\LinkPropertyItem;
use Layout\Items\LinkList;
class ExtendedLinkList extends LinkList
{
protected function getLinks()
{
if (is_null($this->links)) {
$list = $this->source->getValue('link_list');
$links = array();
if (is_array($list)) {
/** @var LinkPropertyItem $row */
foreach ($list as $row) {
if (!empty($row['to_page_id'])) {
$url = CreateUrlForPage($row['to_page_id'], '', '');
} else {
$url = $row['url'];
}
$name = $row['text'];
$item = new ExtendedLinkItem($url, $name);
$data = $row->getAdditionalData();
if (!empty($data) && isset($data['target']) && !empty($data['target'])) {
$item->setTarget('_blank');
}
$links[] = $item;
}
}
$this->links = $links;
}
return $this->links;
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus-libs
/layouts
/src
/Items
/LinkList.php
} else {
$url = $row['url'];
}
$name = $row['text'];
$item = new LinkItem($url, $name);
$links[] = $item;
}
}
$this->links = $links;
}
return $this->links;
}
public function render(PageInterface $source_page, $data = [])
{
$view = new View(__DIR__);
$view->class = $this->class;
$view->links = $this->getLinks();
$view->title = $this->source->evalValue('title');
$this->fillLayoutInfo($view);
return $view->render('link-list.phtml');
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus-libs
/layouts
/src
/AbstractLayoutItem.php
public function getId() {
return 'item-' . $this->source->getPageId();
}
public function processRequest(\Zend_Controller_Request_Abstract $request) {
foreach ($this->children as $child) {
$child->processRequest($request);
}
}
protected function fillLayoutInfo(View $view) {
$view->addLayoutInfo('page_id', $this->source->getPageId());
}
protected function renderChildrenContent(PageInterface $source_page) {
$content = '';
foreach ($this->children as $child) {
$content .= $child->render($source_page);
}
return $content;
}
public function getSource()
{
return $this->source;
}
}
/home
/sksi
/live
/releases
/20181220140310
/buxus
/application
/models
/App
/LayoutItems
/ExtendedMenuLink.php
use Krabica\MegaMenu\Layout\Items\MenuLink;
use Layout\View;
class ExtendedMenuLink extends MenuLink
{
public function render(PageInterface $source_page, $data = []) {
$view = new View(__DIR__);
$page_id = $this->source->getValue('link');
$active = false;
if (is_numeric($page_id)) {
$active = (ActiveStack::getInstance()->getCurrentPageId() == $page_id);
}
$view->class = $this->class;
$view->title = $this->source->getValue('title');
$view->url = new UrlEntity($page_id);
$view->active = $active;
$content = $this->renderChildrenContent($source_page);
$content_before = $this->source->evalValue('content_before');
$content_after = $this->source->evalValue('content_after');
if (!empty($view->url) && $this->source->hasProperty(PropertyTag::TARGET_BLANK_TAG())) {
$view->target = $this->source->getValue(PropertyTag::TARGET_BLANK_TAG()) == C_True_Char;
}
$view->content = $content;
$view->content_before = $content_before;
$view->content_after = $content_after;
$view->submenu_visible = (!empty($content) || !empty($content_before) || !empty($content_after));
$this->fillLayoutInfo($view);
return $view->render('menu-link.phtml');
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus-libs
/layouts
/src
/AbstractLayoutItem.php
public function getId() {
return 'item-' . $this->source->getPageId();
}
public function processRequest(\Zend_Controller_Request_Abstract $request) {
foreach ($this->children as $child) {
$child->processRequest($request);
}
}
protected function fillLayoutInfo(View $view) {
$view->addLayoutInfo('page_id', $this->source->getPageId());
}
protected function renderChildrenContent(PageInterface $source_page) {
$content = '';
foreach ($this->children as $child) {
$content .= $child->render($source_page);
}
return $content;
}
public function getSource()
{
return $this->source;
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus-libs
/mega-menu
/src
/Layout
/Items
/Megamenu.php
<?php
namespace Krabica\MegaMenu\Layout\Items;
use Buxus\Page\PageInterface;
use Layout\View;
use Layout\Items\Container;
class Megamenu extends Container
{
public function render(PageInterface $source_page, $data = [])
{
$view = new View(__DIR__);
$view->class = $this->class;
$view->content = $this->renderChildrenContent($source_page);
$this->fillLayoutInfo($view);
return $view->render('mega-menu.phtml');
}
}
/home
/sksi
/live
/releases
/20181220140310
/buxus
/application
/views
/scripts
/index
/megamenu.phtml
];
if ($webUser && in_array($webUser->getEmail(), $allowedEmails)) {
$shopEnabled = true;
}
}
if (!$shopEnabled) {
$width_class = 'col-md-12';
}
if (BuxusMVC::pageId() == \Buxus\Util\PageIds::getHomepage()) {
$width_class = 'col-md-12';
}
?>
<nav class="menu jetmenu navbar-collapse collapse">
<div class="container">
<div class="row">
<div class="col-xs-12 <?= $width_class ?>">
<?= $layout->render($this->page_properties) ?>
</div>
<?php if ($shopEnabled): ?>
<?= $shopping_cart_menu ?>
<?php endif; ?>
</div>
</div>
</nav>
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View.php
* Should the stream wrapper be used if short_open_tag is off?
*
* @return bool
*/
public function useStreamWrapper()
{
return $this->_useStreamWrapper;
}
/**
* Includes the view script in a scope with only public $this variables.
*
* @param string The view script to execute.
*/
protected function _run()
{
if ($this->_useViewStream && $this->useStreamWrapper()) {
include 'zend.view://' . func_get_arg(0);
} else {
include func_get_arg(0);
}
}
}
Arguments
"/home/sksi/live/releases/20181220140310/buxus/application/views/scripts/index/megamenu.phtml"
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Abstract.php
if ('_' != substr($key, 0, 1)) {
unset($this->$key);
}
}
}
/**
* Processes a view script and returns the output.
*
* @param string $name The script name to process.
* @return string The script output.
*/
public function render($name)
{
// find the script file name using the parent private method
$this->_file = $this->_script($name);
unset($name); // remove $name from local scope
ob_start();
$this->_run($this->_file);
return $this->_filter(ob_get_clean()); // filter output
}
/**
* Escapes a value for output in a view script.
*
* If escaping mechanism is one of htmlspecialchars or htmlentities, uses
* {@link $_encoding} setting.
*
* @param mixed $var The output to escape.
* @return mixed The escaped value.
*/
public function escape($var)
{
if (in_array($this->_escape, array('htmlspecialchars', 'htmlentities'))) {
return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_encoding);
}
if (1 == func_num_args()) {
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
return $filtered;
}
/**
* Render a view script (optionally to a named response segment)
*
* Sets the noRender flag to true when called.
*
* @param string $script
* @param string $name
* @return void
*/
public function renderScript($script, $name = null)
{
if (null === $name) {
$name = $this->getResponseSegment();
}
$this->getResponse()->appendBody(
$this->view->render($script),
$name
);
$this->setNoRender();
}
/**
* Render a view based on path specifications
*
* Renders a view based on the view script path specifications.
*
* @param string $action
* @param string $name
* @param boolean $noController
* @return void
*/
public function render($action = null, $name = null, $noController = null)
{
$this->setRender($action, $name, $noController);
$path = $this->getViewScript();
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
);
$this->setNoRender();
}
/**
* Render a view based on path specifications
*
* Renders a view based on the view script path specifications.
*
* @param string $action
* @param string $name
* @param boolean $noController
* @return void
*/
public function render($action = null, $name = null, $noController = null)
{
$this->setRender($action, $name, $noController);
$path = $this->getViewScript();
$this->renderScript($path, $name);
}
/**
* Render a script based on specification variables
*
* Pass an action, and one or more specification variables (view script suffix)
* to determine the view script path, and render that script.
*
* @param string $action
* @param array $vars
* @param string $name
* @return void
*/
public function renderBySpec($action = null, array $vars = array(), $name = null)
{
if (null !== $name) {
$this->setResponseSegment($name);
}
$path = $this->getViewScript($action, $vars);
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
$path = $this->getViewScript($action, $vars);
$this->renderScript($path);
}
/**
* postDispatch - auto render a view
*
* Only autorenders if:
* - _noRender is false
* - action controller is present
* - request has not been re-dispatched (i.e., _forward() has not been called)
* - response is not a redirect
*
* @return void
*/
public function postDispatch()
{
if ($this->_shouldRender()) {
$this->render();
}
}
/**
* Should the ViewRenderer render a view script?
*
* @return boolean
*/
protected function _shouldRender()
{
return (!$this->getFrontController()->getParam('noViewRenderer')
&& !$this->_neverRender
&& !$this->_noRender
&& (null !== $this->_actionController)
&& $this->getRequest()->isDispatched()
&& !$this->getResponse()->isRedirect()
);
}
/**
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/HelperBroker.php
* notifyPreDispatch() - called by action controller dispatch method
*
* @return void
*/
public function notifyPreDispatch()
{
foreach (self::getStack() as $helper) {
$helper->preDispatch();
}
}
/**
* notifyPostDispatch() - called by action controller dispatch method
*
* @return void
*/
public function notifyPostDispatch()
{
foreach (self::getStack() as $helper) {
$helper->postDispatch();
}
}
/**
* getHelper() - get helper by name
*
* @param string $name
* @return Zend_Controller_Action_Helper_Abstract
*/
public function getHelper($name)
{
$name = self::_normalizeHelperName($name);
$stack = self::getStack();
if (!isset($stack->{$name})) {
self::_loadHelper($name);
}
$helper = $stack->{$name};
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/src
/Buxus
/Controller.php
// @see ZF-7496
if (!($this->getResponse()->isRedirect())) {
// preDispatch() didn't change the action, so we can continue
if ($this->getInvokeArg('useCaseSensitiveActions') || in_array($action, $this->_classMethods)) {
if ($this->getInvokeArg('useCaseSensitiveActions')) {
trigger_error('Using case sensitive actions without word separators is deprecated; please do not rely on this "feature"');
}
app()->call(array($this, $action));
} else {
$this->__call($action, array());
}
}
$this->postDispatch();
}
// whats actually important here is that this action controller is
// shutting down, regardless of dispatching; notify the helpers of this
// state
$this->_helper->notifyPostDispatch();
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Dispatcher
/Standard.php
/**
* Retrieve the action name
*/
$action = $this->getActionMethod($request);
/**
* Dispatch the method call
*/
$request->setDispatched(true);
// by default, buffer output
$disableOb = $this->getParam('disableOutputBuffering');
$obLevel = ob_get_level();
if (empty($disableOb)) {
ob_start();
}
try {
$controller->dispatch($action);
} catch (Exception $e) {
// Clean output buffer on error
$curObLevel = ob_get_level();
if ($curObLevel > $obLevel) {
do {
ob_get_clean();
$curObLevel = ob_get_level();
} while ($curObLevel > $obLevel);
}
throw $e;
}
if (empty($disableOb)) {
$content = ob_get_clean();
$response->appendBody($content);
}
// Destroy the page controller instance and reflection objects
$controller = null;
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Helper
/Action.php
* @return string
*/
public function action($action, $controller, $module = null, array $params = array())
{
$this->resetObjects();
if (null === $module) {
$module = $this->defaultModule;
}
// clone the view object to prevent over-writing of view variables
$viewRendererObj = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
Zend_Controller_Action_HelperBroker::addHelper(clone $viewRendererObj);
$this->request->setParams($params)
->setModuleName($module)
->setControllerName($controller)
->setActionName($action)
->setDispatched(true);
$this->dispatcher->dispatch($this->request, $this->response);
// reset the viewRenderer object to it's original state
Zend_Controller_Action_HelperBroker::addHelper($viewRendererObj);
if (!$this->request->isDispatched()
|| $this->response->isRedirect())
{
// forwards and redirects render nothing
return '';
}
$return = $this->response->getBody();
$this->resetObjects();
return $return;
}
/**
* Clone the current View
*
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Abstract.php
/**
* Accesses a helper object from within a script.
*
* If the helper class has a 'view' property, sets it with the current view
* object.
*
* @param string $name The helper name.
* @param array $args The parameters for the helper.
* @return string The result of the helper output.
*/
public function __call($name, $args)
{
// is the helper already loaded?
$helper = $this->getHelper($name);
// call the helper method
return call_user_func_array(
array($helper, $name),
$args
);
}
/**
* Given a base path, sets the script, helper, and filter paths relative to it
*
* Assumes a directory structure of:
* <code>
* basePath/
* scripts/
* helpers/
* filters/
* </code>
*
* @param string $path
* @param string $prefix Prefix to use for helper and filter paths
* @return Zend_View_Abstract
*/
public function setBasePath($path, $classPrefix = 'Zend_View')
{
/home
/sksi
/live
/releases
/20181220140310
/buxus
/application
/views
/scripts
/index
/header.phtml
<?php
$top_page_menu = $this->action('top-page-menu', $this->controller_name);
$search_menu = $this->action('search-menu', $this->controller_name);
$mega_menu = $this->action('megamenu', $this->controller_name);
?>
<header>
<div class="top-menu">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="tbl">
<div class="tbl-row">
<div class="top-menu__logo-area">
<?php $brand_logo = $this->design->getValue(PCT::BRAND_LOGO_TAG); ?>
<a href="<?= \Buxus\Util\Url::page(\Buxus\Util\PageIds::getHomepage()) ?>">
<?php if (!empty($brand_logo)): ?>
<img class="header-logo"
src="<?= $this->design->getImageUrl(PCT::BRAND_LOGO_TAG) ?>"
alt="logo SKSI">
<?php endif; ?>
</a>
</div>
<div class="top-menu__name-area">
<div class="logo-text">
<?php if (is_object($this->udaje) && strlen($this->udaje->getValue(PCT::CATCHWORD_TAG))): ?><?= $this->udaje->evalValue(PCT::CATCHWORD_TAG); ?><?php endif; ?>
</div>
</div>
<div class="top-menu__search-area tbl-cell w45">
<?= $search_menu ?>
</div>
<!-- <div class="top-menu__lang-area">-->
<?= ''; // $this->action('language-menu', $this->controller_name); ?>
<!-- </div>-->
<?php if(!empty($facebookUrl = $this->design->getValue(\Buxus\Util\PropertyTag::FACEBOOK_URL_TAG()))): ?>
<div class="social-icons-in-header" style="margin-top: 10px;">
<a href="<?= $facebookUrl ?>" target="_blank" title="Facebook">
<img class="header-logo" alt="Facebook" style="width: 38px; margin: 0 4px; padding: 2px 0;"
src="<?= '/buxus/assets/images/facebook.svg' ?>">
</a>
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View.php
* Should the stream wrapper be used if short_open_tag is off?
*
* @return bool
*/
public function useStreamWrapper()
{
return $this->_useStreamWrapper;
}
/**
* Includes the view script in a scope with only public $this variables.
*
* @param string The view script to execute.
*/
protected function _run()
{
if ($this->_useViewStream && $this->useStreamWrapper()) {
include 'zend.view://' . func_get_arg(0);
} else {
include func_get_arg(0);
}
}
}
Arguments
"/home/sksi/live/releases/20181220140310/buxus/application/views/scripts/index/header.phtml"
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Abstract.php
if ('_' != substr($key, 0, 1)) {
unset($this->$key);
}
}
}
/**
* Processes a view script and returns the output.
*
* @param string $name The script name to process.
* @return string The script output.
*/
public function render($name)
{
// find the script file name using the parent private method
$this->_file = $this->_script($name);
unset($name); // remove $name from local scope
ob_start();
$this->_run($this->_file);
return $this->_filter(ob_get_clean()); // filter output
}
/**
* Escapes a value for output in a view script.
*
* If escaping mechanism is one of htmlspecialchars or htmlentities, uses
* {@link $_encoding} setting.
*
* @param mixed $var The output to escape.
* @return mixed The escaped value.
*/
public function escape($var)
{
if (in_array($this->_escape, array('htmlspecialchars', 'htmlentities'))) {
return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_encoding);
}
if (1 == func_num_args()) {
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
return $filtered;
}
/**
* Render a view script (optionally to a named response segment)
*
* Sets the noRender flag to true when called.
*
* @param string $script
* @param string $name
* @return void
*/
public function renderScript($script, $name = null)
{
if (null === $name) {
$name = $this->getResponseSegment();
}
$this->getResponse()->appendBody(
$this->view->render($script),
$name
);
$this->setNoRender();
}
/**
* Render a view based on path specifications
*
* Renders a view based on the view script path specifications.
*
* @param string $action
* @param string $name
* @param boolean $noController
* @return void
*/
public function render($action = null, $name = null, $noController = null)
{
$this->setRender($action, $name, $noController);
$path = $this->getViewScript();
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
);
$this->setNoRender();
}
/**
* Render a view based on path specifications
*
* Renders a view based on the view script path specifications.
*
* @param string $action
* @param string $name
* @param boolean $noController
* @return void
*/
public function render($action = null, $name = null, $noController = null)
{
$this->setRender($action, $name, $noController);
$path = $this->getViewScript();
$this->renderScript($path, $name);
}
/**
* Render a script based on specification variables
*
* Pass an action, and one or more specification variables (view script suffix)
* to determine the view script path, and render that script.
*
* @param string $action
* @param array $vars
* @param string $name
* @return void
*/
public function renderBySpec($action = null, array $vars = array(), $name = null)
{
if (null !== $name) {
$this->setResponseSegment($name);
}
$path = $this->getViewScript($action, $vars);
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/Helper
/ViewRenderer.php
$path = $this->getViewScript($action, $vars);
$this->renderScript($path);
}
/**
* postDispatch - auto render a view
*
* Only autorenders if:
* - _noRender is false
* - action controller is present
* - request has not been re-dispatched (i.e., _forward() has not been called)
* - response is not a redirect
*
* @return void
*/
public function postDispatch()
{
if ($this->_shouldRender()) {
$this->render();
}
}
/**
* Should the ViewRenderer render a view script?
*
* @return boolean
*/
protected function _shouldRender()
{
return (!$this->getFrontController()->getParam('noViewRenderer')
&& !$this->_neverRender
&& !$this->_noRender
&& (null !== $this->_actionController)
&& $this->getRequest()->isDispatched()
&& !$this->getResponse()->isRedirect()
);
}
/**
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Action
/HelperBroker.php
* notifyPreDispatch() - called by action controller dispatch method
*
* @return void
*/
public function notifyPreDispatch()
{
foreach (self::getStack() as $helper) {
$helper->preDispatch();
}
}
/**
* notifyPostDispatch() - called by action controller dispatch method
*
* @return void
*/
public function notifyPostDispatch()
{
foreach (self::getStack() as $helper) {
$helper->postDispatch();
}
}
/**
* getHelper() - get helper by name
*
* @param string $name
* @return Zend_Controller_Action_Helper_Abstract
*/
public function getHelper($name)
{
$name = self::_normalizeHelperName($name);
$stack = self::getStack();
if (!isset($stack->{$name})) {
self::_loadHelper($name);
}
$helper = $stack->{$name};
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/src
/Buxus
/Controller.php
// @see ZF-7496
if (!($this->getResponse()->isRedirect())) {
// preDispatch() didn't change the action, so we can continue
if ($this->getInvokeArg('useCaseSensitiveActions') || in_array($action, $this->_classMethods)) {
if ($this->getInvokeArg('useCaseSensitiveActions')) {
trigger_error('Using case sensitive actions without word separators is deprecated; please do not rely on this "feature"');
}
app()->call(array($this, $action));
} else {
$this->__call($action, array());
}
}
$this->postDispatch();
}
// whats actually important here is that this action controller is
// shutting down, regardless of dispatching; notify the helpers of this
// state
$this->_helper->notifyPostDispatch();
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Dispatcher
/Standard.php
/**
* Retrieve the action name
*/
$action = $this->getActionMethod($request);
/**
* Dispatch the method call
*/
$request->setDispatched(true);
// by default, buffer output
$disableOb = $this->getParam('disableOutputBuffering');
$obLevel = ob_get_level();
if (empty($disableOb)) {
ob_start();
}
try {
$controller->dispatch($action);
} catch (Exception $e) {
// Clean output buffer on error
$curObLevel = ob_get_level();
if ($curObLevel > $obLevel) {
do {
ob_get_clean();
$curObLevel = ob_get_level();
} while ($curObLevel > $obLevel);
}
throw $e;
}
if (empty($disableOb)) {
$content = ob_get_clean();
$response->appendBody($content);
}
// Destroy the page controller instance and reflection objects
$controller = null;
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Helper
/Action.php
* @return string
*/
public function action($action, $controller, $module = null, array $params = array())
{
$this->resetObjects();
if (null === $module) {
$module = $this->defaultModule;
}
// clone the view object to prevent over-writing of view variables
$viewRendererObj = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
Zend_Controller_Action_HelperBroker::addHelper(clone $viewRendererObj);
$this->request->setParams($params)
->setModuleName($module)
->setControllerName($controller)
->setActionName($action)
->setDispatched(true);
$this->dispatcher->dispatch($this->request, $this->response);
// reset the viewRenderer object to it's original state
Zend_Controller_Action_HelperBroker::addHelper($viewRendererObj);
if (!$this->request->isDispatched()
|| $this->response->isRedirect())
{
// forwards and redirects render nothing
return '';
}
$return = $this->response->getBody();
$this->resetObjects();
return $return;
}
/**
* Clone the current View
*
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Abstract.php
/**
* Accesses a helper object from within a script.
*
* If the helper class has a 'view' property, sets it with the current view
* object.
*
* @param string $name The helper name.
* @param array $args The parameters for the helper.
* @return string The result of the helper output.
*/
public function __call($name, $args)
{
// is the helper already loaded?
$helper = $this->getHelper($name);
// call the helper method
return call_user_func_array(
array($helper, $name),
$args
);
}
/**
* Given a base path, sets the script, helper, and filter paths relative to it
*
* Assumes a directory structure of:
* <code>
* basePath/
* scripts/
* helpers/
* filters/
* </code>
*
* @param string $path
* @param string $prefix Prefix to use for helper and filter paths
* @return Zend_View_Abstract
*/
public function setBasePath($path, $classPrefix = 'Zend_View')
{
/home
/sksi
/live
/releases
/20181220140310
/buxus
/application
/layouts
/main.phtml
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '283292996958996');
fbq('track', 'PageView');
</script>
<!-- End Facebook Pixel Code -->
</head>
<body class="<?= implode(' ', isset($this->layout()->bodyClasses) && is_array($this->layout()->bodyClasses) ? $this->layout()->bodyClasses : array()) ?>">
<?= \Analytics\Facades\BuxusTracker::getCode(); ?>
<?= $this->action('header', $this->controller_name) ?>
<?= $this->action('page-navigator', $this->controller_name) ?>
<?php \App\FullTextSearch\FulltextParser::start();?>
<?= $this->layout()->content; ?>
<?php \App\FullTextSearch\FulltextParser::end();?>
<?= $this->action('footer', 'index') ?>
<?php if (config('krabica.modules.cart')): ?>
<?php /*echo $this->action('html-alert', 'eshop_cart') */ ?>
<?php endif; ?>
<?php if (!$this->jsModules()->renderInHead()): ?>
<?= $this->jsModules() ?>
<?php endif; ?>
<?= BuxusToolbar::getInstance()->renderBuxusToolbar(); ?>
</body>
</html>
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View.php
* Should the stream wrapper be used if short_open_tag is off?
*
* @return bool
*/
public function useStreamWrapper()
{
return $this->_useStreamWrapper;
}
/**
* Includes the view script in a scope with only public $this variables.
*
* @param string The view script to execute.
*/
protected function _run()
{
if ($this->_useViewStream && $this->useStreamWrapper()) {
include 'zend.view://' . func_get_arg(0);
} else {
include func_get_arg(0);
}
}
}
Arguments
"/home/sksi/live/releases/20181220140310/buxus/application/layouts/main.phtml"
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/View
/Abstract.php
if ('_' != substr($key, 0, 1)) {
unset($this->$key);
}
}
}
/**
* Processes a view script and returns the output.
*
* @param string $name The script name to process.
* @return string The script output.
*/
public function render($name)
{
// find the script file name using the parent private method
$this->_file = $this->_script($name);
unset($name); // remove $name from local scope
ob_start();
$this->_run($this->_file);
return $this->_filter(ob_get_clean()); // filter output
}
/**
* Escapes a value for output in a view script.
*
* If escaping mechanism is one of htmlspecialchars or htmlentities, uses
* {@link $_encoding} setting.
*
* @param mixed $var The output to escape.
* @return mixed The escaped value.
*/
public function escape($var)
{
if (in_array($this->_escape, array('htmlspecialchars', 'htmlentities'))) {
return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_encoding);
}
if (1 == func_num_args()) {
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/src
/Buxus
/Zend
/Layout.php
foreach ($theme_paths as $theme_path) {
$abs_file = $theme_path . '/layouts/' . $name;
if (file_exists($abs_file)) {
$view_script_path = $theme_path . '/layouts/';
break;
}
}
}
if (!is_null($view_script_path)) {
if (method_exists($view, 'addScriptPath')) {
$view->addScriptPath($view_script_path);
} else {
$view->setScriptPath($view_script_path);
}
} elseif (null !== ($path = $this->getViewBasePath())) {
$view->addBasePath($path, $this->_viewBasePrefix);
}
return $view->render($name);
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Layout
/Controller
/Plugin
/Layout.php
return;
}
$response = $this->getResponse();
$content = $response->getBody(true);
$contentKey = $layout->getContentKey();
if (isset($content['default'])) {
$content[$contentKey] = $content['default'];
}
if ('default' != $contentKey) {
unset($content['default']);
}
$layout->assign($content);
$fullContent = null;
$obStartLevel = ob_get_level();
try {
$fullContent = $layout->render();
$response->setBody($fullContent);
} catch (Exception $e) {
while (ob_get_level() > $obStartLevel) {
$fullContent .= ob_get_clean();
}
$request->setParam('layoutFullContent', $fullContent);
$request->setParam('layoutContent', $layout->content);
$response->setBody(null);
throw $e;
}
}
}
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Plugin
/Broker.php
$this->getResponse()->setException($e);
// skip rendering of normal dispatch give the error handler a try
$this->getRequest()->setDispatched(false);
}
}
}
}
/**
* Called after an action is dispatched by Zend_Controller_Dispatcher.
*
* @param Zend_Controller_Request_Abstract $request
* @return void
*/
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
foreach ($this->_plugins as $plugin) {
try {
$plugin->postDispatch($request);
} catch (Exception $e) {
if (Zend_Controller_Front::getInstance()->throwExceptions()) {
throw new Zend_Controller_Exception($e->getMessage() . $e->getTraceAsString(), $e->getCode(), $e);
} else {
$this->getResponse()->setException($e);
}
}
}
}
/**
* Called before Zend_Controller_Front exits its dispatch loop.
*
* @param Zend_Controller_Request_Abstract $request
* @return void
*/
public function dispatchLoopShutdown()
{
foreach ($this->_plugins as $plugin) {
/home
/sksi
/live
/releases
/20181220140310
/vendor
/zendframework
/zendframework1
/library
/Zend
/Controller
/Front.php
if (!$this->_request->isDispatched()) {
continue;
}
/**
* Dispatch request
*/
try {
$dispatcher->dispatch($this->_request, $this->_response);
} catch (Exception $e) {
if ($this->throwExceptions()) {
throw $e;
}
$this->_response->setException($e);
}
/**
* Notify plugins of dispatch completion
*/
$this->_plugins->postDispatch($this->_request);
} while (!$this->_request->isDispatched());
} catch (Exception $e) {
if ($this->throwExceptions()) {
throw $e;
}
$this->_response->setException($e);
}
/**
* Notify plugins of dispatch loop completion
*/
try {
$this->_plugins->dispatchLoopShutdown();
} catch (Exception $e) {
if ($this->throwExceptions()) {
throw $e;
}
$this->_response->setException($e);
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/legacy-base
/buxus
/includes
/generate_functions.php
// Set router
$front->setRouter(new ControllerRouter());
// Set controller and action
$request = new Zend_Controller_Request_Http();
$request->setControllerName($controller_name);
$request->setActionName($controller_action);
\Buxus\Event\BuxusEvent::fire(new \Buxus\Event\MvcStartedEvent());
// add registered view helpers
//$view = \Zend_Layout::getMvcInstance()->getView();
/* $module_view_helper_paths = \Buxus\Module\BuxusModule::helperPaths();
foreach ($module_view_helper_paths as $helper_path) {
$view->addHelperPath($helper_path['path'], $helper_path['prefix']);
}*/
$front->dispatch($request);
}
}
function CreateUrlForPageName ($page_name, $url_parameter="", $quotes = "'")
{
global $as_static;
$page_dsc = BuxusDB::get()->fetchAll("SELECT tblPages.page_id FROM tblPages WHERE tblPages.page_name = :page_name", array(':page_name' => $page_name));
$i = 0;
foreach($page_dsc as $page_row)
{
$page_id = $page_row["page_id"];
$i++;
}
if ($i>1)
//echo "What now? There are more than one unique page with given name.";
if ($i == 0) { $page_id = 0; }
if ($as_static != '')
return ($quotes.GetSystemOption("C_static_url_prefix")."page_$page_id.htm".$url_parameter.$quotes);
else
return ($quotes.config('buxus_core.base_url')."generate_page.php?page_id=$page_id".$url_parameter.$quotes);
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/core
/src
/handler
/generate_page.php
$page_name = (isset($_GET['page_name']) ? $_GET['page_name'] : '');
if (!empty($page_name)) {
//funckia skonci, ak nenajde, alebo najde viac
$page_id = GetPageIdByPageName($page_name);
} else {
if (!showCustomError('404')) {
header('HTTP/1.0 404 Not Found');
echo 'Wrong page ID specified.';
}
exit;
}
} else {
$wrong_page_id = C_True;
}
$_REQUEST['page_id'] = $page_id;
$_GET['page_id'] = $page_id;
GeneratePage($page_id);
\Buxus\Event\BuxusEvent::fire(new \Buxus\Event\FrontendRequestFinishedEvent());
exit;
/home
/sksi
/live
/releases
/20181220140310
/vendor
/buxus
/core
/src
/Buxus
/Router
/BuxusRouter.php
echo '<html><head><title>maintenance</title></head><body>This BUXUS application is undergoing maintenance. Please try again later</body></html>';
} else {
include $template_path;
}
}
public function dispatch($request_uri) {
if ($this->app->isDownForMaintenance()) {
$this->display503();
exit;
}
$script = $this->getScript($request_uri);
foreach ($this->auto_scripts as $auto_script) {
include($auto_script);
}
if (!empty($script)) {
include($script);
}
if ($this->default_script != $script) {
include($this->default_script);
}
header('HTTP/1.0 404 Not Found');
echo '404 Not Found';
exit;
}
}
Arguments
"/home/sksi/live/releases/20181220140310/vendor/buxus/core/src/handler/generate_page.php"
/home
/sksi
/live
/releases
/20181220140310
/public
/buxus.php
<?php
define('BASE_BUXUS_DIR', realpath(__DIR__ . '/../'));
require_once __DIR__ . '/../vendor/autoload.php';
require_once CORE_BUXUS_DIR . '/src/buxus_bootstrap.php';
$router = app('buxus-router');
$router->dispatch($_SERVER['REQUEST_URI']);