api troubles bzt we're getting there
All checks were successful
Build and push / Pulling repo on server (push) Has been skipped

This commit is contained in:
2023-10-18 19:08:38 +02:00
parent 4e60d5a6f6
commit 04af3a34bd
6 changed files with 120 additions and 76 deletions

View File

@ -20,6 +20,8 @@ class Page
public $menu_priority;
public $submenu;
private $r;
function __construct($controller, $action, $r = 1, $params = [])
{
$this->_controller = $controller;
@ -31,6 +33,11 @@ class Page
if(is_array($GLOBALS['vars']) && is_array($this->params))
$this->params = array_merge($this->params, $GLOBALS['vars']);
$this->menu_image = '/css/imgs/empty.png';
if($GLOBALS['redis'] !== false)
$this->r = $GLOBALS['redis'];
else
$this->r = false;
}
function setMenu()

View File

@ -22,6 +22,12 @@ function includeManagement()
if(file_exists(ROOT.DS.'inc'.DS.'vendor'.DS.'autoload.php'))
require_once(ROOT.DS.'inc'.DS.'vendor'.DS.'autoload.php');
//DB
if(defined('REDIS_SERVER') && REDIS_SERVER !='')
$GLOBALS['redis'] = new Redis();
else
$GLOBALS['redis'] = false;
}
function callHook($url)

View File

@ -1,2 +1,7 @@
<?php
define('REDIS_SERVER', 'ingress');
define('REDIS_PORT', 6379);
define('REDIS_DB', 1);
define('DEV',true);