* opened from a page other than the base DIMP page.
* TODO
*
- * $Horde: dimp/compose.php,v 1.118 2008/08/05 05:48:48 slusarz Exp $
- *
* Copyright 2005-2008 The Horde Project (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
if (empty($index)) {
return;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$idx_array = array($index . IMP_IDX_SEP . IMP::folderPref($GLOBALS['prefs']->getValue('drafts_folder'), true));
$imp_message->delete($idx_array, true);
}
-$load_imp = true;
-@define('DIMP_BASE', dirname(__FILE__));
-require_once DIMP_BASE . '/lib/base.php';
-require_once 'Horde/Identity.php';
+require_once dirname(__FILE__) . '/lib/base.php';
/* The headers of the message. */
$header = array();
$get_sig = true;
$msg = '';
+require_once 'Horde/Identity.php';
$identity = &Identity::singleton(array('imp', 'imp'));
if (!$prefs->isLocked('default_identity')) {
$identity_id = Util::getFormData('identity');
NLS::setTimeZone();
/* Initialize the IMP_Compose:: object. */
-require_once IMP_BASE . '/lib/Compose.php';
$imp_compose = &IMP_Compose::singleton(Util::getFormData('composeCache'));
/* Init IMP_UI_Compose:: object. */
-require_once IMP_BASE . '/lib/UI/Compose.php';
$imp_ui = new IMP_UI_Compose();
if (count($_POST)) {
$info = DIMP::getAttachmentInfo($imp_compose);
$result->success = true;
$result->info = end($info);
- $result->imp_compose = $imp_compose->getMessageCacheId();
+ $result->imp_compose = $imp_compose->getCacheId();
}
IMP::sendHTTPResponse(DIMP::prepareResponse($result, true, false), 'js-json');
exit;
/* Use IMP_Tree to determine whether the sent mail folder was
* created. */
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$imptree->eltDiffStart();
- /* Create the DIMP User-Agent string. */
- require_once DIMP_BASE . '/lib/version.php';
- $useragent = 'Dynamic Internet Messaging Program (DIMP) ' . DIMP_VERSION;
-
$options = array(
'save_sent' => (($prefs->isLocked('save_sent_mail'))
? $identity->getValue('save_sent_mail')
'save_attachments' => Util::getFormData('save_attachments_select'),
'reply_type' => $result->reply_type,
'reply_index' => $result->index . IMP_IDX_SEP . $result->reply_folder,
- 'readreceipt' => Util::getFormData('request_read_receipt'),
- 'useragent' => $useragent
+ 'readreceipt' => Util::getFormData('request_read_receipt')
);
$sent = $imp_compose->buildAndSendMessage($message, $header, $charset, $html, $options);
}
/* Attach spellchecker & auto completer. */
-require_once DIMP_BASE . '/lib/Dimple.php';
-$imp_ui->attachAutoCompleter('Dimple', array('to', 'cc', 'bcc'));
+$imp_ui->attachAutoCompleter(array('to', 'cc', 'bcc'));
$imp_ui->attachSpellChecker('dimp');
$type = Util::getFormData('type');
$type = 'new';
}
- require_once IMP_BASE . '/lib/MIME/Contents.php';
$imp_contents = &IMP_Contents::singleton($index . IMP_IDX_SEP . $folder);
if (is_a($imp_contents, 'PEAR_Error')) {
$notification->push(_("Requested message not found."), 'horde.error');
'qreply' => false,
);
-require_once IMP_BASE . '/lib/Template.php';
-$t = new IMP_Template(DIMP_TEMPLATES . '/imp/');
+$t = new IMP_Template(IMP_TEMPLATES . '/imp/');
$t->setOption('gettext', true);
$t->set('title', $title);
$t->set('closelink', Horde::img('close.png', 'X', array('id' => 'compose_close'), $registry->getImageDir('horde')));
-$compose_result = DIMP_Views_Compose::showCompose($args);
+$compose_result = IMP_Views_Compose::showCompose($args);
$t->set('compose_html', $compose_result['html']);
/* Javscript variables to be set immediately. */
IMP::addInlineScript(array(DIMP::notify()), 'dom');
/* Javascript to be run on window load. */
-require_once 'Horde/Serialize.php';
$compose_result['js_onload'][] = 'DimpCompose.fillForm(' . Horde_Serialize::serialize($msg, SERIALIZE_JSON) . ', ' . Horde_Serialize::serialize($header, SERIALIZE_JSON) . ', "' . (($type == 'new' || $type == 'forward') ? 'to' : 'message') . '", true)';
IMP::addInlineScript($compose_result['js_onload'], 'load');
$spellcheck = false;
if ($has_js) {
if ($redirect) {
- $imp_ui->attachAutoCompleter('IMP_Imple', array('to'));
+ $imp_ui->attachAutoCompleter(array('to'));
} else {
$auto_complete = array('to');
foreach (array('cc', 'bcc') as $val) {
$auto_complete[] = $val;
}
}
- $imp_ui->attachAutoCompleter('IMP_Imple', $auto_complete);
+ $imp_ui->attachAutoCompleter($auto_complete);
if (!empty($conf['spell']['driver'])) {
if (Horde_SpellChecker::factory($conf['spell']['driver'], array()) !== false) {
$spellcheck = true;
* imp.php - performs an AJAX-requested action and returns the DIMP-specific
* JSON object
*
- * $Horde: dimp/imp.php,v 1.234 2008/09/05 17:42:13 slusarz Exp $
- *
* Copyright 2005-2008 The Horde Project (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
function _cacheID($folder)
{
- require_once IMP_BASE . '/lib/Mailbox.php';
$imp_mailbox = &IMP_Mailbox::singleton($folder);
return $imp_mailbox->getCacheId();
}
{
$sort = IMP::getSort($folder);
if ($sort['by'] == SORTTHREAD) {
- require_once IMP_BASE . '/lib/Mailbox.php';
foreach ($indices as $mbox => $mbox_array) {
$imp_mailbox = &IMP_Mailbox::singleton($mbox);
$threadob = $imp_mailbox->getThreadOb();
$search = Util::getPost('search');
if (!empty($search)) {
- require_once 'Horde/Serialize.php';
$search = Horde_Serialize::unserialize($search, SERIALIZE_JSON);
$args += array(
'search_uid' => $search->imapuid,
);
}
- require_once DIMP_BASE . '/lib/Views/ListMessages.php';
- $list_msg = new DIMP_Views_ListMessages();
+ $list_msg = new IMP_Views_ListMessages();
$res = $list_msg->ListMessages($args);
// TODO: This can potentially be optimized for arrival time sort - if the
// cache ID changes, we know the changes must occur at end of mailbox.
function _getPollInformation($mbox)
{
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$elt = $imptree->get($mbox);
if ($imptree->isPolled($elt)) {
$info = $imptree->getElementInfo($mbox);
$authentication = 'none';
$dimp_logout = ($action == 'LogOut');
-$load_imp = true;
$session_timeout = 'json';
@define('AUTH_HANDLER', true);
-@define('DIMP_BASE', dirname(__FILE__));
-require_once DIMP_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
// Process common request variables.
$folder = Util::getPost('folder');
break;
}
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$imptree->eltDiffStart();
- require_once IMP_BASE . '/lib/Folder.php';
$imp_folder = &IMP_Folder::singleton();
$new = String::convertCharset($folder, NLS::getCharset(), 'UTF7-IMAP');
break;
}
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$imptree->eltDiffStart();
- require_once IMP_BASE . '/lib/Folder.php';
$imp_folder = &IMP_Folder::singleton();
$result = $imp_folder->delete(array($folder));
if ($result) {
break;
}
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$imptree->eltDiffStart();
- require_once IMP_BASE . '/lib/Folder.php';
$imp_folder = &IMP_Folder::singleton();
$new = $imptree->createMailboxName($new_parent, $new);
break;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$imp_message->emptyMailbox(array($folder));
$result = new stdClass;
break;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$result = $imp_message->flagAllInMailbox(array('seen'),
array($folder),
break;
case 'ListFolders':
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
- $result = DIMP::getFolderResponse($imptree, array('a' => $imptree->folderList(IMPTREE_FLIST_CONTAINER | IMPTREE_FLIST_VFOLDER), 'c' => array(), 'd' => array()));
+ $imptree = &IMP_IMAP_Tree::singleton();
+ $result = DIMP::getFolderResponse($imptree, array('a' => $imptree->folderList(IMP_IMAP_TREE::FLIST_CONTAINER | IMP_IMAP_TREE::FLIST_VFOLDER), 'c' => array(), 'd' => array()));
break;
case 'PollFolders':
$result = new stdClass;
- require_once IMP_BASE . '/lib/Fetchmail.php';
$fm_account = new IMP_Fetchmail_Account();
$fm_count = $fm_account->count();
if (!empty($fm_count)) {
IMP_Fetchmail::fetchMail(range(0, $fm_count - 1));
}
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$result->poll = array();
foreach ($imptree->getPollList(true) as $val) {
$result = new stdClass;
if (Util::getPost('rangeslice')) {
- require_once DIMP_BASE . '/lib/Views/ListMessages.php';
- $list_msg = new DIMP_Views_ListMessages();
+ $list_msg = new IMP_Views_ListMessages();
$result->viewport = $list_msg->getSlice($folder, intval(Util::getPost('start')) - 1, intval(Util::getPost('length')));
$result->viewport->request_id = Util::getPost('request_id');
$result->viewport->type = 'slice';
$change = _changed($folder, $cacheid, $indices);
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$result = $imp_message->copy($to,
$action == 'MoveMessage'
- ? IMP_MESSAGE_MOVE
- : IMP_MESSAGE_COPY,
+ ? IMP_MESSAGE::MOVE
+ : IMP_MESSAGE::COPY,
$indices);
if ($result) {
if ($action == 'MoveMessage') {
$set = true;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$result = $imp_message->flag(array($flag), $indices, $set);
if ($result) {
break;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
if ($action == 'DeleteMessage') {
$change = _changed($folder, $cacheid, $indices, !$prefs->getValue('hide_deleted') && !$prefs->getValue('use_trash'));
case 'ReportSpam':
case 'ReportHam':
$change = _changed($folder, $cacheid, $indices);
- require_once IMP_BASE . '/lib/Spam.php';
$spam = new IMP_Spam();
$result = $spam->reportSpam($indices,
$action == 'ReportSpam' ? 'spam' : 'notspam');
break;
}
- require_once IMP_BASE . '/lib/Filter.php';
$imp_filter = new IMP_Filter();
if ($action == 'Whitelist') {
$imp_filter->whitelistMessage($indices, false);
'preview' => true,
);
- require_once DIMP_BASE . '/lib/Views/ShowMessage.php';
- $show_msg = new DIMP_Views_ShowMessage();
+ $show_msg = new IMP_Views_ShowMessage();
$result = (object) $show_msg->showMessage($args);
break;
break;
case 'GetForwardData':
- require_once IMP_BASE . '/lib/Compose.php';
- require_once IMP_BASE . '/lib/MIME/Contents.php';
- require_once IMP_BASE . '/lib/UI/Compose.php';
- require_once 'Horde/MIME/Message.php';
$header = array();
$msg = $header = null;
$idx_string = _getIdxString($indices);
$result = new stdClass;
// Can't open read-only since we need to store the message cache id.
- $result->imp_compose = $imp_compose->getMessageCacheId();
+ $result->imp_compose = $imp_compose->getCacheId();
$result->fwd_list = DIMP::getAttachmentInfo($imp_compose);
$result->body = $fwd_msg['body'];
$result->header = $header;
break;
case 'GetReplyData':
- require_once IMP_BASE . '/lib/Compose.php';
- require_once IMP_BASE . '/lib/MIME/Contents.php';
$imp_compose = &IMP_Compose::singleton(Util::getPost('imp_compose'));
$imp_contents = &IMP_Contents::singleton(_getIdxString($indices));
$reply_msg = $imp_compose->replyMessage(Util::getPost('type'), $imp_contents);
if (empty($indices)) {
break;
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$idx_array = array($index . IMP_IDX_SEP . IMP::folderPref($prefs->getValue('drafts_folder'), true));
$imp_message->delete($idx_array, true);
case 'DeleteAttach':
$atc = Util::getPost('atc_indices');
if (!is_null($atc)) {
- require_once IMP_BASE . '/lib/Compose.php';
$imp_compose = &IMP_Compose::singleton(Util::getPost('imp_compose'));
$imp_compose->deleteAttachment($atc);
}
case 'ShowPortal':
// Load the block list. Blocks are located in $dimp_block_list.
// KEY: Block label VALUE: Horde_Block object
- require DIMP_BASE . '/config/portal.php';
+ require IMP_BASE . '/config/portal.php';
$blocks = $linkTags = array();
$css_load = array('dimp' => true);
$result = new stdClass;
$result->portal = '';
if (!empty($blocks)) {
- require_once IMP_BASE . '/lib/Template.php';
- $t = new IMP_Template(DIMP_TEMPLATES . '/imp/');
+ $t = new IMP_Template(IMP_TEMPLATES . '/imp/');
$t->set('block', $blocks);
$result->portal = $t->fetch('portal.html');
}
$chunk = basename(Util::getPost('chunk'));
if (!empty($chunk)) {
$result = new stdClass;
- $result->chunk = Util::bufferOutput('include', DIMP_TEMPLATES . '/chunks/' . $chunk . '.php');
+ $result->chunk = Util::bufferOutput('include', IMP_TEMPLATES . '/chunks/' . $chunk . '.php');
}
break;
$sort = IMP::getSort($folder);
$change = ($sort['by'] == SORTTHREAD);
}
- require_once IMP_BASE . '/lib/Message.php';
$imp_message = &IMP_Message::singleton();
$expunged = $imp_message->expungeMailbox(array($folder => 1));
if (!empty($expunged[$folder])) {
$add = Util::getPost('add');
- require_once IMP_BASE . '/lib/IMAP/Tree.php';
- $imptree = &IMP_Tree::singleton();
+ $imptree = &IMP_IMAP_Tree::singleton();
$result = new stdClass;
$result->add = (bool) $add;
}
/* Get the IMP_Headers:: object. */
- require_once IMP_BASE . '/lib/IMAP/MessageCache.php';
+ // TODO
$msg_cache = &IMP_MessageCache::singleton();
$cache_entry = $msg_cache->retrieve($folder, array($index), 32);
$ob = reset($cache_entry);
break;
}
- require_once IMP_BASE . '/lib/UI/Message.php';
$imp_ui = new IMP_UI_Message();
$imp_ui->MDNCheck($ob->header, true);
break;
<?php
/**
- * $Horde: dimp/index.php,v 1.72 2008/09/29 17:30:19 chuck Exp $
- *
* Copyright 2005-2008 The Horde Project (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Jan Schneider <jan@horde.org>
+ * @author Michael Slusarz <slusarz@horde.org>
*/
-@define('DIMP_BASE', dirname(__FILE__));
-$dimp_configured = (is_readable(DIMP_BASE . '/config/conf.php') &&
- is_readable(DIMP_BASE . '/config/portal.php') &&
- is_readable(DIMP_BASE . '/config/prefs.php'));
-
-if (!$dimp_configured) {
- require DIMP_BASE . '/../lib/Test.php';
- Horde_Test::configFilesMissing('DIMP', DIMP_BASE,
- array('conf.php', 'prefs.php'),
- array('portal.php' => 'This file controls the blocks that appear in DIMP\'s portal'));
-}
-
-$load_imp = true;
-require_once DIMP_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$scripts = array(
- array('DimpBase.js', 'dimp', true),
- array('ContextSensitive.js', 'dimp', true),
- array('ViewPort.js', 'dimp', true),
- array('dragdrop.js', 'dimp', true),
+ array('DimpBase.js', 'imp', true),
+ array('ContextSensitive.js', 'imp', true),
+ array('ViewPort.js', 'imp', true),
+ array('dragdrop.js', 'imp', true),
array('dhtmlHistory.js', 'horde', true),
array('redbox.js', 'horde', true),
- array('mailbox.js', 'dimp'),
- array('DimpSlider.js', 'dimp', true),
+ array('mailbox-dimp.js', 'imp'),
+ array('DimpSlider.js', 'imp', true),
array('unblockImages.js', 'imp', true)
);
/* Get site specific menu items. */
$js_code = $site_menu = array();
-if (is_readable(DIMP_BASE . '/config/menu.php')) {
- include DIMP_BASE . '/config/menu.php';
+if (is_readable(IMP_BASE . '/config/menu.php')) {
+ include IMP_BASE . '/config/menu.php';
}
/* Add the site specific javascript now. */
}
echo "<body>\n";
-require DIMP_TEMPLATES . '/index/index.inc';
+require IMP_TEMPLATES . '/index/index.inc';
IMP::includeScriptFiles();
IMP::outputInlineScript();
$notification->notify(array('listeners' => array('javascript')));
<?php
/**
- * The IMP_UI_Compose:: class is designed to provide a place to dump common
+ * The IMP_UI_Compose:: class is designed to provide a place to store common
* code shared among IMP's various UI views for the compose page.
*
* Copyright 2006-2008 The Horde Project (http://www.horde.org/)
* @author Michael Slusarz <slusarz@horde.org>
* @package IMP
*/
-class IMP_UI_Compose {
-
+class IMP_UI_Compose
+{
/**
*/
function expandAddresses($input, &$imp_compose)
$list = $error->getUserInfo();
if (is_array($list)) {
foreach ($list as $entry) {
- if (is_object($entry)) {
- $result[] = $entry->getUserInfo();
- } else {
- $result[] = $entry;
- }
+ $result[] = is_object($entry)
+ ? $entry->getUserInfo()
+ : $entry;
}
}
$GLOBALS['notification']->push($error, 'horde.warning');
$identity = &Identity::singleton(array('imp', 'imp'));
$from_addr = $identity->getFromAddress();
- /* We need to rebuild the headers ourselves to ensure that all MIME
- * decoding stays as-is. */
- require_once IMP_BASE . '/lib/MIME/Headers.php';
- $imp_imap = &IMP_IMAP::singleton();
- $imp_imap->changeMbox($contents->getMailbox(), IMP_IMAP_AUTO);
-
$headers = $contents->getHeaderOb();
$headers->addResentHeaders($from_addr, $recip['header']['to']);
/* Store history information. */
if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
- require_once IMP_BASE . '/lib/Maillog.php';
IMP_Maillog::log('redirect', $headers->getValue('message-id'), $recipients);
}
Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_INFO);
if ($GLOBALS['conf']['sentmail']['driver'] != 'none') {
- require_once IMP_BASE . '/lib/Sentmail.php';
$sentmail = IMP_Sentmail::factory();
$sentmail->log('redirect', $headers->getValue('message-id'), $recipients);
}
/**
*/
- function attachAutoCompleter($lib, $fields)
+ function attachAutoCompleter($fields)
{
/* Attach autocompleters to the compose form elements. */
foreach ($fields as $val) {
- call_user_func_array(array($lib, 'factory'), array('ContactAutoCompleter', array('triggerId' => $val)));
+ call_user_func_array(array('IMP_Imple', 'factory'), array('ContactAutoCompleter', array('triggerId' => $val)));
}
}
'Error' => $spell_img . $br . _("Spell Check Failed")
)
);
- call_user_func_array(array($mode == 'dimp' ? 'Dimple' : 'IMP_Imple', 'factory'), array('SpellChecker', $args));
+ call_user_func_array(array('IMP_Imple', 'factory'), array('SpellChecker', $args));
}
/**
if (!empty($to)) {
// Although we allow ';' to delimit addresses in the UI, need to
// convert to RFC-compliant ',' delimiter for processing.
- require_once 'Horde/String.php';
$clean_to = '';
foreach (Horde_Mime_Address::explode($to, ',;') as $val) {
$val = trim($val);
if ($expand) {
return $clean_to;
} else {
- require_once IMP_BASE . '/lib/Compose.php';
return IMP_Compose::formatAddr($clean_to);
}
}
*/
function initRTE($mode = 'imp')
{
- require_once 'Horde/Editor.php';
$editor = &Horde_Editor::singleton('fckeditor', array('id' => 'message', 'no_notify' => true));
$fck_buttons = $GLOBALS['prefs']->getValue('fckeditor_buttons');
*
* @package IMP
*/
-class DIMP_Views_Compose
+class IMP_Views_Compose
{
/**
* Create content needed to output the compose screen.
*
* @package IMP
*/
-class DIMP_Views_ListMessages
+class IMP_Views_ListMessages
{
/**
* Returns a list of messages for use with ViewPort.
*
* @package IMP
*/
-class DIMP_Views_ShowMessage
+class IMP_Views_ShowMessage
{
/**
* Builds a list of addresses from header information.
<?php
/**
- * $Horde: dimp/message.php,v 1.73 2008/09/05 06:38:48 slusarz Exp $
- *
* Copyright 2005-2008 The Horde Project (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Jan Schneider <jan@horde.org>
+ * @author Michael Slusarz <slusarz@horde.org>
*/
-$load_imp = true;
-@define('DIMP_BASE', dirname(__FILE__));
-require_once DIMP_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$folder = Util::getFormData('folder');
$index = Util::getFormData('uid');
exit;
}
-require_once IMP_BASE . '/lib/UI/Message.php';
$imp_ui = new IMP_UI_Message();
$args = array(
'preview' => false,
);
-require_once DIMP_BASE . '/lib/Views/ShowMessage.php';
-$show_msg = new DIMP_Views_ShowMessage();
+$show_msg = new IMP_Views_ShowMessage();
$show_msg_result = $show_msg->ShowMessage($args);
if (isset($show_msg_result['error'])) {
echo IMP::wrapInlineScript(array(
'popup' => false,
'qreply' => true,
);
-$compose_result = DIMP_Views_Compose::showCompose($compose_args);
+$compose_result = IMP_Views_Compose::showCompose($compose_args);
/* Need the Header object to check for list information. */
$msg_cache = &IMP_MessageCache::singleton();
$ob = reset($cache_entry);
/* Init IMP_UI_Compose:: object. */
-require_once IMP_BASE . '/lib/UI/Compose.php';
$imp_ui = new IMP_UI_Compose();
/* Attach spellchecker & auto completer. */
-require_once DIMP_BASE . '/lib/Dimple.php';
-$imp_ui->attachAutoCompleter('Dimple', array('to', 'cc', 'bcc'));
+$imp_ui->attachAutoCompleter(array('to', 'cc', 'bcc'));
$imp_ui->attachSpellChecker('dimp');
$compose_result['js'] = array_merge($compose_result['js'], array(
'DIMP.conf.msg_folder = "' . $show_msg_result['folder'] . '"'
));
-require_once 'Horde/Serialize.php';
foreach (array('from', 'to', 'cc', 'bcc', 'replyTo') as $val) {
if (!empty($show_msg_result[$val])) {
$compose_result['js'][] = 'DimpFullmessage.' . $val . ' = ' . Horde_Serialize::serialize($show_msg_result[$val], SERIALIZE_JSON);
IMP::addInlineScript(array(DIMP::notify()), 'dom');
$scripts = array(
- array('ContextSensitive.js', 'dimp', true),
- array('fullmessage.js', 'dimp', true),
- array('compose.js', 'dimp', true),
+ array('ContextSensitive.js', 'imp', true),
+ array('fullmessage-dimp.js', 'imp', true),
+ array('compose-dimp.js', 'imp', true),
array('unblockImages.js', 'imp', true)
);
DIMP::header($show_msg_result['subject'], $scripts);
echo "<body>\n";
-require DIMP_TEMPLATES . '/chunks/message.php';
+require IMP_TEMPLATES . '/chunks/message.php';
IMP::includeScriptFiles();
IMP::outputInlineScript();
echo $compose_result['jsappend'];