Add $y = 0; and a try catch block to the menu.
This commit is contained in:
@@ -51,9 +51,10 @@
|
|||||||
$db = $this->db;
|
$db = $this->db;
|
||||||
|
|
||||||
//get the $apps array from the installed apps from the core and mod directories
|
//get the $apps array from the installed apps from the core and mod directories
|
||||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_menu.php");
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_{config|menu}.php");
|
||||||
$x=0;
|
$x = 0;
|
||||||
foreach ($config_list as &$config_path) {
|
foreach ($config_list as &$config_path) {
|
||||||
|
$y = 0;
|
||||||
try {
|
try {
|
||||||
include($config_path);
|
include($config_path);
|
||||||
$x++;
|
$x++;
|
||||||
@@ -210,11 +211,18 @@
|
|||||||
$db->beginTransaction();
|
$db->beginTransaction();
|
||||||
|
|
||||||
//get the $apps array from the installed apps from the core and mod directories
|
//get the $apps array from the installed apps from the core and mod directories
|
||||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_menu.php");
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_{config|menu}.php");
|
||||||
$x=0;
|
$x = 0;
|
||||||
foreach ($config_list as &$config_path) {
|
foreach ($config_list as &$config_path) {
|
||||||
include($config_path);
|
$y = 0;
|
||||||
$x++;
|
try {
|
||||||
|
include($config_path);
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
echo 'exception caught: ' . $e->getMessage() . "\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//use the app array to restore the default menu
|
//use the app array to restore the default menu
|
||||||
|
|||||||
Reference in New Issue
Block a user