From 6eaaa70ea8ee9cd1044dbd101d6573d2e134d0f2 Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Mon, 01 Dec 2008 05:19:20 -0500
Subject: [PATCH] added auto-revision from svn to version
---
server/lib/classes/modules.inc.php | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php
index a8de65b..6ad967f 100644
--- a/server/lib/classes/modules.inc.php
+++ b/server/lib/classes/modules.inc.php
@@ -33,15 +33,15 @@
var $notification_hooks = array();
/*
- This function is called to load the modules from the mods-available folder
+ This function is called to load the modules from the mods-enabled or the mods-core folder
*/
-
- function loadModules() {
+ function loadModules($type) {
global $app, $conf;
-
-
- $modules_dir = $conf["rootpath"].$conf["fs_div"]."mods-enabled".$conf["fs_div"];
+ $subPath = 'mods-enabled';
+ if ($type == 'core') $subPath = 'mods-core';
+
+ $modules_dir = $conf["rootpath"].$conf["fs_div"].$subPath.$conf["fs_div"];
if (is_dir($modules_dir)) {
if ($dh = opendir($modules_dir)) {
while (($file = readdir($dh)) !== false) {
@@ -78,14 +78,16 @@
*/
function processDatalog() {
- global $app;
+ global $app,$conf;
// TODO: process only new entries.
- $sql = "SELECT * FROM sys_datalog WHERE 1";
+ $sql = "SELECT * FROM sys_datalog WHERE server_id = ".$conf["server_id"]." ORDER BY datalog_id";
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$data = unserialize(stripslashes($rec["data"]));
$this->raiseTableHook($rec["dbtable"],$rec["action"],$data);
+ $app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]);
+ $app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG);
}
}
--
Gitblit v1.9.1