mirror of
https://github.com/slawkens/myaac.git
synced 2025-09-14 20:43:34 +02:00
Compare commits
25 Commits
feature/de
...
feature/cs
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8ec08b5a61 | ||
![]() |
19346efc38 | ||
![]() |
c9d5c6cfd7 | ||
![]() |
4461c03d48 | ||
![]() |
60c7ef2391 | ||
![]() |
d6c35bcbb5 | ||
![]() |
4e87e7e9dc | ||
![]() |
08a19158b3 | ||
![]() |
9a306886fb | ||
![]() |
719c542757 | ||
![]() |
1ed24afc7d | ||
![]() |
66479e64ed | ||
![]() |
4e26f07ab6 | ||
![]() |
13e6eb5666 | ||
![]() |
56306dfb0a | ||
![]() |
f27172691c | ||
![]() |
5578dbaa83 | ||
![]() |
549c08c096 | ||
![]() |
0127a4f417 | ||
![]() |
08074d8d4f | ||
![]() |
198cc5a09d | ||
![]() |
3e7cbbb63b | ||
![]() |
8e3a71b36b | ||
![]() |
0e33fd103c | ||
![]() |
046c0b5cf4 |
@@ -30,27 +30,6 @@ if(!$db->hasTable('myaac_account_actions')) {
|
|||||||
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
|
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hooks->register('debugbar_admin_head_end', HOOK_ADMIN_HEAD_END, function ($params) {
|
|
||||||
global $debugBar;
|
|
||||||
|
|
||||||
if (!isset($debugBar)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
|
||||||
echo $debugBarRenderer->renderHead();
|
|
||||||
});
|
|
||||||
$hooks->register('debugbar_admin_body_end', HOOK_ADMIN_BODY_END, function ($params) {
|
|
||||||
global $debugBar;
|
|
||||||
|
|
||||||
if (!isset($debugBar)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
|
||||||
echo $debugBarRenderer->render();
|
|
||||||
});
|
|
||||||
|
|
||||||
require SYSTEM . 'status.php';
|
require SYSTEM . 'status.php';
|
||||||
require SYSTEM . 'login.php';
|
require SYSTEM . 'login.php';
|
||||||
require __DIR__ . '/includes/functions.php';
|
require __DIR__ . '/includes/functions.php';
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
if (version_compare(phpversion(), '8.0', '<')) die('PHP version 8.0 or higher is required.');
|
if (version_compare(phpversion(), '8.0', '<')) die('PHP version 8.0 or higher is required.');
|
||||||
|
|
||||||
const MYAAC = true;
|
const MYAAC = true;
|
||||||
const MYAAC_VERSION = '1.0-dev';
|
const MYAAC_VERSION = '0.10.0-dev';
|
||||||
const DATABASE_VERSION = 36;
|
const DATABASE_VERSION = 36;
|
||||||
const TABLE_PREFIX = 'myaac_';
|
const TABLE_PREFIX = 'myaac_';
|
||||||
define('START_TIME', microtime(true));
|
define('START_TIME', microtime(true));
|
||||||
|
@@ -16,8 +16,7 @@
|
|||||||
"peppeocchi/php-cron-scheduler": "4.*"
|
"peppeocchi/php-cron-scheduler": "4.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"filp/whoops": "^2.15",
|
"filp/whoops": "^2.15"
|
||||||
"maximebf/debugbar": "dev-master"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
@@ -469,30 +469,20 @@ function tickers()
|
|||||||
*/
|
*/
|
||||||
function template_place_holder($type): string
|
function template_place_holder($type): string
|
||||||
{
|
{
|
||||||
global $twig, $template_place_holders, $debugBar;
|
global $twig, $template_place_holders;
|
||||||
$ret = '';
|
$ret = '';
|
||||||
|
|
||||||
if (isset($debugBar)) {
|
|
||||||
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(array_key_exists($type, $template_place_holders) && is_array($template_place_holders[$type]))
|
if(array_key_exists($type, $template_place_holders) && is_array($template_place_holders[$type]))
|
||||||
$ret = implode($template_place_holders[$type]);
|
$ret = implode($template_place_holders[$type]);
|
||||||
|
|
||||||
if($type === 'head_start') {
|
if($type === 'head_start') {
|
||||||
$ret .= template_header();
|
$ret .= template_header();
|
||||||
if (isset($debugBar)) {
|
|
||||||
$ret .= $debugBarRenderer->renderHead();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elseif ($type === 'body_start') {
|
elseif ($type === 'body_start') {
|
||||||
$ret .= $twig->render('browsehappy.html.twig');
|
$ret .= $twig->render('browsehappy.html.twig');
|
||||||
}
|
}
|
||||||
elseif($type === 'body_end') {
|
elseif($type === 'body_end') {
|
||||||
$ret .= template_ga_code();
|
$ret .= template_ga_code();
|
||||||
if (isset($debugBar)) {
|
|
||||||
$ret .= $debugBarRenderer->render();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
@@ -16,16 +16,10 @@ if(!isset($config['installed']) || !$config['installed']) {
|
|||||||
throw new RuntimeException('MyAAC has not been installed yet or there was error during installation. Please install again.');
|
throw new RuntimeException('MyAAC has not been installed yet or there was error during installation. Please install again.');
|
||||||
}
|
}
|
||||||
|
|
||||||
use DebugBar\StandardDebugBar;
|
|
||||||
|
|
||||||
if(config('env') === 'dev') {
|
if(config('env') === 'dev') {
|
||||||
require SYSTEM . 'exception.php';
|
require SYSTEM . 'exception.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config('env') === 'dev' || getBoolean(config('enable_debugbar'))) {
|
|
||||||
$debugBar = new StandardDebugBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($config['server_path'])) {
|
if(empty($config['server_path'])) {
|
||||||
throw new RuntimeException('Server Path has been not set. Go to config.php and set it.');
|
throw new RuntimeException('Server Path has been not set. Go to config.php and set it.');
|
||||||
}
|
}
|
||||||
|
@@ -370,14 +370,7 @@ class POT
|
|||||||
throw new RuntimeException('Please install PHP pdo extension. MyAAC will not work without it.');
|
throw new RuntimeException('Please install PHP pdo extension. MyAAC will not work without it.');
|
||||||
}
|
}
|
||||||
|
|
||||||
global $debugBar;
|
$this->db = new OTS_DB_MySQL($params);
|
||||||
if (isset($debugBar)) {
|
|
||||||
$this->db = new DebugBar\DataCollector\PDO\TraceablePDO(new OTS_DB_MySQL($params));
|
|
||||||
$debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($this->db));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->db = new OTS_DB_MySQL($params);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
@@ -123,7 +123,7 @@ if(isset($config['boxes']))
|
|||||||
document.getElementById("submenu_"+activeSubmenuItem).style.color = "white";
|
document.getElementById("submenu_"+activeSubmenuItem).style.color = "white";
|
||||||
document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
|
document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
|
||||||
menus = localStorage.getItem('menus');
|
menus = localStorage.getItem('menus');
|
||||||
if(menus == null || menus.lastIndexOf("&") === -1) {
|
if(menus.lastIndexOf("&") === -1) {
|
||||||
menus = "news=1&account=0&community=0&library=0&forum=0<?php if (setting('core.gifts_system')) echo '&shops=0'; ?>&";
|
menus = "news=1&account=0&community=0&library=0&forum=0<?php if (setting('core.gifts_system')) echo '&shops=0'; ?>&";
|
||||||
}
|
}
|
||||||
FillMenuArray();
|
FillMenuArray();
|
||||||
|
Reference in New Issue
Block a user