Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions lib/Compose/LinkedAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
* @license http://www.horde.org/licenses/gpl GPL
* @package IMP
*/
use Horde\Imp\ImpConfig;

class IMP_Compose_LinkedAttachment
{
/**
Expand Down Expand Up @@ -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.');
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
7 changes: 1 addition & 6 deletions lib/Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(). */
Expand Down Expand Up @@ -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)
Expand All @@ -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'])
Expand Down
9 changes: 2 additions & 7 deletions lib/Factory/Sentmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
/**
Expand All @@ -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)) {
Expand Down
Loading