/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
public static function Exists(...$key):?bool {
if ($i = static::getInstance()) {
return $i->exists($key);
}
return null;
}
public static function Expire($key, $ttl) {
if ($i = static::getInstance()) {
return $i->expire($key, $ttl);
}
return false;
}
/**
Arguments
"MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error."
/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
public static function Exists(...$key):?bool {
if ($i = static::getInstance()) {
return $i->exists($key);
}
return null;
}
public static function Expire($key, $ttl) {
if ($i = static::getInstance()) {
return $i->expire($key, $ttl);
}
return false;
}
/**
Arguments
"navtabs_20201"
86400
"a:0:{}"
/home
/deploy
/EHungry-8-simon
/Web
/classes
/Cache.class.php
if (!@static::$redisObj->connect(static::$host, (int)static::$port)) {
static::$redisObj = false;
Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting']);
} else {
static::$redisObj->select(static::$db);
}
} catch (RedisException $e) {
static::$redisObj = false;
Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting: '.$e->getMessage()]);
}
}
return static::$redisObj;
}
public static function SetObject($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetArray($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function SetBoolean($key, $var, $expire = 86400) {
return static::Set($key, serialize($var), $expire);
}
public static function Set($key, $var, $expire = 86400) {
App::debugbarLog('debug', "Cache set: $key");
if ($i = static::getInstance()) {
$var = static::beforeSet($var);
return $expire > 0?
$i->setEx($key, $expire, $var) :
$i->set($key, $var);
}
return null;
}
public static function Exists(...$key):?bool {
if ($i = static::getInstance()) {
return $i->exists($key);
Arguments
"navtabs_20201"
"a:0:{}"
86400
/home
/deploy
/EHungry-8-simon
/Web
/classes
/CustomNavigationTab.class.php
$cacheKey = 'navtabs_'.$aid;
$co = Cache::GetArray($cacheKey);
if ($co) {
return $co;
}
$db_conn = DB::conn();
$rbs = [];
$sql = "SELECT * FROM ".CustomNavigationTab::getTableName()." WHERE account_id = ? ORDER BY priority ASC";
$db_conn->bindParameter($sql, 1, $aid, "integer");
$result = $db_conn->query($sql);
if ($result && $result->rowCount() > 0) {
while ($row = $result->fetch()) {
$r = new CustomNavigationTab();
$r->loadFromArray($row, true);
$rbs[] = $r;
}
}
Cache::SetArray($cacheKey, $rbs);
return $rbs;
}
public static function deleteAllForAccount($aid) {
self::where('account_id', $aid)->delete();
Cache::Delete('navtabs_'.$aid);
}
public static function deleteAllForPage($aid, $pid) {
self::where(['account_id' => $aid, 'page_id' => $pid])->delete();
Cache::Delete('navtabs_'.$aid);
}
}
Arguments
/home
/deploy
/EHungry-8-simon
/Web
/controllers
/customer.php
}
$restaurantRequiredPages = [
'login',
'customerorders'
];
if (is_null($restaurant) && in_array($_REQUEST['form'], $restaurantRequiredPages)) {
redirectTo('home');
}
$modelPath = CORE_PATH . 'model4.0/customer/'.$_REQUEST['form'].'.php';
} else {
$_REQUEST['mobiledetect'] = new Mobile_Detect;
}
if (is_readable($modelPath)) {
include_once($modelPath);
}
App::debugbarTime("model '{$_REQUEST['form']}'");
$custom_nav = CustomNavigationTab::getAllForAccount($account->getId());
$view2HideRightColumns = ['checkout', 'dashboard', 'customerdetails', 'customerorders',
'mydeliveryaddresses', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword',
'customerorderdetails', 'editcustomer', 'adddeliveryaddress',
'editlocation', 'orderconfirmation','viewcart', 'map', 'validatecallback'];
if (in_array($_REQUEST['form'], $view2HideRightColumns)) {
$hideRightColumn = true;
}
$myAccountPages = ['accountsettings', 'dashboard', 'customerdetails', 'customerorders', 'editaddress', 'editcustomer', 'mydeliveryaddresses', 'editlocation', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword', 'adddeliveryaddress', 'map', 'myloyalty'];
if (in_array($_REQUEST['form'], $myAccountPages)) {
$isMyAccountPage = true;
}
if (!isset($cart) || !is_object($cart)) {
$GLOBALS['cart'] = \Cart::getCurrent();
}
//unset callback data in the event someone didn't hit the callback validation page
if (!in_array($_REQUEST['form'], ['checkout', 'nosuchpage', 'validatecallback', 'viewdeliveryzone'])) {
Arguments
/home
/deploy
/EHungry-8-simon
/Web
/index.php
App::startTime();
ErrorHandlers::register();
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
Arguments
"/home/deploy/EHungry-8-simon/Web/controllers/customer.php"