From 6f5d70241c512d2b43d3aa3d08d7054ee99107cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Charles=20Del=C3=A9pine?= Date: Mon, 23 Nov 2026 08:27:21 +0100 Subject: [PATCH] Revert "Attempt to address issue #114" This reverts commit d79afbe2d754e5e153fcf75dd99017536cc4497b. --- lib/Compose/LinkedAttachment.php | 17 +++++------------ lib/Contents.php | 7 +------ lib/Factory/Sentmail.php | 9 ++------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/lib/Compose/LinkedAttachment.php b/lib/Compose/LinkedAttachment.php index 0ce0bd3e2..12b8eb46c 100644 --- a/lib/Compose/LinkedAttachment.php +++ b/lib/Compose/LinkedAttachment.php @@ -22,8 +22,6 @@ * @license http://www.horde.org/licenses/gpl GPL * @package IMP */ -use Horde\Imp\ImpConfig; - class IMP_Compose_LinkedAttachment { /** @@ -58,12 +56,10 @@ class IMP_Compose_LinkedAttachment */ public function __construct($user, $id = null) { - global $injector; - - $config = $injector->get('ImpConfig'); + global $conf, $injector; /* Sanity checking - no gettext needed. */ - if (empty($config->get('compose.link_attachments'))) { + if (empty($conf['compose']['link_attachments'])) { throw new IMP_Exception('Linked attachments are forbidden.'); } @@ -106,9 +102,7 @@ public function sendData() */ public function delete($token) { - $config = $injector->get('ImpConfig'); - - if (empty($config->get('compose.link_attachments_notify') + if (empty($GLOBALS['conf']['compose']['link_attachments_notify']) || !($dtoken = $this->_getDeleteToken()) || ($dtoken != $token)) { return false; @@ -184,10 +178,9 @@ public function convert($ts, $file) */ public function sendNotification() { - global $injector, $registry; + global $conf, $injector, $registry; - $config = $injector->get('ImpConfig'); - if (empty($config->get('compose.link_attachments_notify')) { + if (empty($conf['compose']['link_attachments_notify'])) { return; } diff --git a/lib/Contents.php b/lib/Contents.php index 0e0f3abd8..dfeab5da9 100644 --- a/lib/Contents.php +++ b/lib/Contents.php @@ -22,9 +22,6 @@ * @license http://www.horde.org/licenses/gpl GPL * @package IMP */ - -use Horde\Imp\ImpConfig; - class IMP_Contents { /* Mask entries for getSummary(). */ @@ -584,8 +581,6 @@ public function getMimePart($id, $options = []) public function renderMIMEPart($mime_id, $mode, array $options = []) { $this->_buildMessage(); - - $config = $injector->get('ImpConfig'); $mime_part = empty($options['mime_part']) ? $this->getMimePart($mime_id) @@ -604,7 +599,7 @@ public function renderMIMEPart($mime_id, $mode, array $options = []) } fclose($fp); - $options['type'] = Horde_Mime_Magic::analyzeFile($tempfile, empty($config->get('mime.magic_db') ? null : $config->get('mime.magic_db'); + $options['type'] = Horde_Mime_Magic::analyzeFile($tempfile, empty($GLOBALS['conf']['mime']['magic_db']) ? null : $GLOBALS['conf']['mime']['magic_db']); } $type = empty($options['type']) diff --git a/lib/Factory/Sentmail.php b/lib/Factory/Sentmail.php index e2e8fce45..74b7abe29 100644 --- a/lib/Factory/Sentmail.php +++ b/lib/Factory/Sentmail.php @@ -23,9 +23,6 @@ * @license http://www.horde.org/licenses/gpl GPL * @package IMP */ - -use Horde\Imp\ImpConfig; - class IMP_Factory_Sentmail extends Horde_Core_Factory_Injector { /** @@ -36,11 +33,9 @@ class IMP_Factory_Sentmail extends Horde_Core_Factory_Injector */ public function create(Horde_Injector|Injector $injector) { - $config = $injector->get('ImpConfig'); - - $driver = empty($config->get('sentmail.driver')) + $driver = empty($GLOBALS['conf']['sentmail']['driver']) ? 'null' - : $config->get('sentmail.driver'); + : $GLOBALS['conf']['sentmail']['driver']; $params = Horde::getDriverConfig('sentmail', $driver); switch (Horde_String::lower($driver)) {