mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
no need to create notification service a second time
This commit is contained in:
parent
23a94f8ac8
commit
7790f483f0
|
@ -27,6 +27,7 @@ require_once("../inc/inc.ClassNotificationService.php");
|
|||
require_once("../inc/inc.ClassEmailNotify.php");
|
||||
require_once("../inc/inc.ClassUI.php");
|
||||
require_once("../inc/inc.ClassController.php");
|
||||
require_once("../inc/inc.Notification.php");
|
||||
|
||||
require_once("../inc/inc.ClassSession.php");
|
||||
require_once("../inc/inc.ClassPasswordStrength.php");
|
||||
|
@ -63,27 +64,6 @@ if (isset($_COOKIE["mydms_session"])) {
|
|||
$dms->setRootFolderID($user->getHomeFolder());
|
||||
}
|
||||
|
||||
global $logger;
|
||||
$notifier = new SeedDMS_NotificationService($logger, $settings);
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'preAddService')) {
|
||||
$notificationObj->preAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($settings->_enableEmail) {
|
||||
$notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword), 'email');
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'postAddService')) {
|
||||
$notificationObj->postAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc";
|
||||
} else {
|
||||
$user = null;
|
||||
|
|
|
@ -15,28 +15,6 @@ require_once("../inc/inc.ClassEmailNotify.php");
|
|||
require_once("../inc/inc.Notification.php");
|
||||
require_once("../inc/inc.ClassController.php");
|
||||
|
||||
$notifier = new SeedDMS_NotificationService($logger, $settings);
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'preAddService')) {
|
||||
$notificationObj->preAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($settings->_enableEmail) {
|
||||
$notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'postAddService')) {
|
||||
$notificationObj->postAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require "vendor/autoload.php";
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
|
|
@ -15,28 +15,6 @@ require_once("../inc/inc.ClassEmailNotify.php");
|
|||
require_once("../inc/inc.Notification.php");
|
||||
require_once("../inc/inc.ClassController.php");
|
||||
|
||||
$notifier = new SeedDMS_NotificationService($logger, $settings);
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'preAddService')) {
|
||||
$notificationObj->preAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($settings->_enableEmail) {
|
||||
$notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
|
||||
if(method_exists($notificationObj, 'postAddService')) {
|
||||
$notificationObj->postAddService($dms, $notifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include("webdav.php");
|
||||
$server = new HTTP_WebDAV_Server_SeedDMS();
|
||||
$server->ServeRequest($dms, $settings, $logger, $notifier, $authenticator);
|
||||
|
|
Loading…
Reference in New Issue
Block a user