mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
d5cef4fabf
|
@ -31,9 +31,11 @@
|
||||||
class SeedDMS_ExtBase {
|
class SeedDMS_ExtBase {
|
||||||
var $settings;
|
var $settings;
|
||||||
var $dms;
|
var $dms;
|
||||||
|
var $logger;
|
||||||
|
|
||||||
public function __construct($settings, $dms) {
|
public function __construct($settings, $dms, $logger) {
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
$this->dms = $dms;
|
$this->dms = $dms;
|
||||||
|
$this->logger = $logger;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
* @version Release: @package_version@
|
* @version Release: @package_version@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
global $logger;
|
||||||
|
|
||||||
require "inc.ClassExtensionMgr.php";
|
require "inc.ClassExtensionMgr.php";
|
||||||
require_once "inc.ClassSchedulerTaskBase.php";
|
require_once "inc.ClassSchedulerTaskBase.php";
|
||||||
require_once "inc.ClassExtBase.php";
|
require_once "inc.ClassExtBase.php";
|
||||||
|
@ -44,7 +46,7 @@ foreach($extMgr->getExtensionConfiguration() as $extname=>$extconf) {
|
||||||
$classfile = $settings->_rootDir."/ext/".$extname."/".$extconf['class']['file'];
|
$classfile = $settings->_rootDir."/ext/".$extname."/".$extconf['class']['file'];
|
||||||
if(file_exists($classfile)) {
|
if(file_exists($classfile)) {
|
||||||
include($classfile);
|
include($classfile);
|
||||||
$obj = new $extconf['class']['name']($settings, null);
|
$obj = new $extconf['class']['name']($settings, null, $logger);
|
||||||
if(method_exists($obj, 'init'))
|
if(method_exists($obj, 'init'))
|
||||||
$obj->init();
|
$obj->init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
include("../inc/inc.Settings.php");
|
include("../inc/inc.Settings.php");
|
||||||
//include("../inc/inc.LogInit.php");
|
|
||||||
include("../inc/inc.Language.php");
|
|
||||||
include("../inc/inc.Init.php");
|
|
||||||
include("../inc/inc.Extension.php");
|
|
||||||
include("../inc/inc.DBInit.php");
|
|
||||||
include("../inc/inc.ClassNotificationService.php");
|
|
||||||
include("../inc/inc.ClassEmailNotify.php");
|
|
||||||
include("../inc/inc.ClassController.php");
|
|
||||||
include("Log.php");
|
|
||||||
|
|
||||||
|
//include("../inc/inc.LogInit.php");
|
||||||
// LogInit.php cannot be used, because of the different log file
|
// LogInit.php cannot be used, because of the different log file
|
||||||
if($settings->_logFileEnable) {
|
if($settings->_logFileEnable) {
|
||||||
if ($settings->_logFileRotation=="h") $logname=date("YmdH", time());
|
if ($settings->_logFileRotation=="h") $logname=date("YmdH", time());
|
||||||
|
@ -19,15 +11,24 @@ if($settings->_logFileEnable) {
|
||||||
if(!file_exists($settings->_contentDir.'log'))
|
if(!file_exists($settings->_contentDir.'log'))
|
||||||
@mkdir($settings->_contentDir.'log');
|
@mkdir($settings->_contentDir.'log');
|
||||||
if(file_exists($settings->_contentDir.'log') && is_dir($settings->_contentDir.'log')) {
|
if(file_exists($settings->_contentDir.'log') && is_dir($settings->_contentDir.'log')) {
|
||||||
$log = Log::factory('file', $logname);
|
$logger = Log::factory('file', $logname);
|
||||||
$log->setMask(Log::MAX(PEAR_LOG_DEBUG));
|
$logger->setMask(Log::MAX(PEAR_LOG_DEBUG));
|
||||||
} else
|
} else
|
||||||
$log = null;
|
$logger = null;
|
||||||
} else {
|
} else {
|
||||||
$log = null;
|
$logger = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$notifier = new SeedDMS_NotificationService($log);
|
include("../inc/inc.Language.php");
|
||||||
|
include("../inc/inc.Init.php");
|
||||||
|
include("../inc/inc.Extension.php");
|
||||||
|
include("../inc/inc.DBInit.php");
|
||||||
|
include("../inc/inc.ClassNotificationService.php");
|
||||||
|
//include("../inc/inc.ClassEmailNotify.php");
|
||||||
|
include("../inc/inc.ClassController.php");
|
||||||
|
//include("Log.php");
|
||||||
|
|
||||||
|
$notifier = new SeedDMS_NotificationService($logger);
|
||||||
|
|
||||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||||
|
@ -51,7 +52,7 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||||
|
|
||||||
include("webdav.php");
|
include("webdav.php");
|
||||||
$server = new HTTP_WebDAV_Server_SeedDMS();
|
$server = new HTTP_WebDAV_Server_SeedDMS();
|
||||||
$server->ServeRequest($dms, $log, $notifier);
|
$server->ServeRequest($dms, $logger, $notifier);
|
||||||
//$files = array();
|
//$files = array();
|
||||||
//$options = array('path'=>'/Test1/subdir', 'depth'=>1);
|
//$options = array('path'=>'/Test1/subdir', 'depth'=>1);
|
||||||
//echo $server->MKCOL(&$options);
|
//echo $server->MKCOL(&$options);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user