optimize code
This commit is contained in:
parent
a6ee04a0bb
commit
cb89e4477b
3 changed files with 58 additions and 49 deletions
|
@ -25,20 +25,23 @@ if (!defined("CON_FRAMEWORK")) {
|
|||
// Contenido startup process
|
||||
include_once ('../includes/startup.php');
|
||||
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.con.php');
|
||||
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes');
|
||||
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes');
|
||||
|
||||
include_once ($classPath . 'class.user.php');
|
||||
include_once ($classPath . 'class.xml.php');
|
||||
include_once ($classPath . 'class.navigation.php');
|
||||
include_once ($classPath . 'template/class.template.php');
|
||||
include_once ($classPath . 'class.backend.php');
|
||||
include_once ($classPath . 'class.table.php');
|
||||
include_once ($classPath . 'class.notification.php');
|
||||
include_once ($classPath . 'class.area.php');
|
||||
include_once ($classPath . 'class.layout.php');
|
||||
include_once ($classPath . 'class.client.php');
|
||||
include_once ($classPath . 'class.cat.php');
|
||||
include_once ($classPath . 'class.treeitem.php');
|
||||
include_once ($includesPath . 'cfg_language_de.inc.php');
|
||||
include_once ($includesPath . 'functions.con.php');
|
||||
|
||||
if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") {
|
||||
$db = new DB_ConLite;
|
||||
|
|
|
@ -25,20 +25,23 @@ if (!defined("CON_FRAMEWORK")) {
|
|||
// Contenido startup process
|
||||
include_once ('../includes/startup.php');
|
||||
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.stat.php');
|
||||
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes');
|
||||
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes');
|
||||
|
||||
include_once ($classPath . 'class.user.php');
|
||||
include_once ($classPath . 'class.xml.php');
|
||||
include_once ($classPath . 'class.navigation.php');
|
||||
include_once ($classPath . 'template/class.template.php');
|
||||
include_once ($classPath . 'class.backend.php');
|
||||
include_once ($classPath . 'class.table.php');
|
||||
include_once ($classPath . 'class.notification.php');
|
||||
include_once ($classPath . 'class.area.php');
|
||||
include_once ($classPath . 'class.layout.php');
|
||||
include_once ($classPath . 'class.client.php');
|
||||
include_once ($classPath . 'class.cat.php');
|
||||
include_once ($classPath . 'class.treeitem.php');
|
||||
include_once ($includesPath . 'cfg_language_de.inc.php');
|
||||
include_once ($includesPath . 'functions.stat.php');
|
||||
|
||||
if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs")
|
||||
{
|
||||
|
@ -57,5 +60,4 @@ if (!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs")
|
|||
|
||||
statsArchive(sprintf("%04d%02d",$year,$month));
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
|
@ -25,37 +25,41 @@ if (!defined("CON_FRAMEWORK")) {
|
|||
// Contenido startup process
|
||||
include_once ('../includes/startup.php');
|
||||
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.user.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.xml.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.navigation.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'template/class.template.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.backend.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.table.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.notification.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.area.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.layout.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.client.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.cat.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["classes"] . 'class.treeitem.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'cfg_language_de.inc.php');
|
||||
include_once ($cfg['path']['contenido'].$cfg["path"]["includes"] . 'functions.stat.php');
|
||||
$classPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'classes');
|
||||
$includesPath = cRegistry::getConfigValue('path', 'conlite') . cRegistry::getConfigValue('path', 'includes');
|
||||
|
||||
include_once ($classPath . 'class.user.php');
|
||||
include_once ($classPath . 'class.xml.php');
|
||||
include_once ($classPath . 'class.navigation.php');
|
||||
include_once ($classPath . 'template/class.template.php');
|
||||
include_once ($classPath . 'class.backend.php');
|
||||
include_once ($classPath . 'class.table.php');
|
||||
include_once ($classPath . 'class.notification.php');
|
||||
include_once ($classPath . 'class.area.php');
|
||||
include_once ($classPath . 'class.layout.php');
|
||||
include_once ($classPath . 'class.client.php');
|
||||
include_once ($classPath . 'class.cat.php');
|
||||
include_once ($classPath . 'class.treeitem.php');
|
||||
include_once ($includesPath . 'cfg_language_de.inc.php');
|
||||
include_once ($includesPath . 'functions.stat.php');
|
||||
|
||||
global $cfg;
|
||||
|
||||
if(!isRunningFromWeb() || function_exists("runJob") || $area == "cronjobs") {
|
||||
$db = new DB_ConLite;
|
||||
|
||||
foreach ($cfg["tab"] as $key => $value)
|
||||
$tables = cRegistry::getConfigValue('tab');
|
||||
|
||||
foreach ($tables as $key => $value)
|
||||
{
|
||||
$sql = "OPTIMIZE TABLE ".$value;
|
||||
$db->query($sql);
|
||||
|
||||
}
|
||||
|
||||
if ($cfg["statistics_heap_table"]) {
|
||||
$sHeapTable = $cfg['tab']['stat_heap_table'];
|
||||
if (cRegistry::getConfigValue('statistics_heap_table')) {
|
||||
$sHeapTable = cRegistry::getConfigValue('tab', 'stat_heap_table');
|
||||
|
||||
buildHeapTable ($sHeapTable, $db);
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
Loading…
Reference in a new issue