Skip to content

Commit

Permalink
[mms] Remove 'mailboxarray' hook.
Browse files Browse the repository at this point in the history
This is not necessary anymore, now that template code can directly execute
PHP. And the template code needs to be modified anyway to handle the
array additions.
  • Loading branch information
slusarz committed Oct 27, 2014
1 parent aa56917 commit 143d52b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 38 deletions.
29 changes: 0 additions & 29 deletions imp/config/hooks.php.dist
Expand Up @@ -526,35 +526,6 @@ class IMP_Hooks
// }


/**
* Allow additional information to be added/edited from the data that is
* passed to the mailbox display template:
*
* imp/templates/dynamic/msglist_[horiz|vert].html
*
* If you are going to add new columns, you also have to update the
* fields in imp/themes/dynamic/screen.css to specify the column width.
*
* @param array $msgs The mailbox data.
*
* @return array The altered array to use in the template.
*/
// public function mailboxarray($msgs)
// {
// // Example #1: Adds a 'foo' entry to each message element.
// switch ($GLOBALS['registry']->getView()) {
// case Horde_Registry::VIEW_BASIC:
// case Horde_Registry::VIEW_DYNAMIC:
// foreach (array_keys($msgs) as $key) {
// $msgs[$key]['foo'] = true;
// }
// break;
// }
//
// return $msg;
// }


/**
* Default browser-based preference values for the dynamic view.
* Any value not returned here will use the default value (listed below).
Expand Down
1 change: 1 addition & 0 deletions imp/docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v7.0.0-git
----------

[mms] Remove 'mailboxarray' hook.
[mms] Remove 'display_folder' hook.
[mms] Auto-detect EAI support on mail backends and provide validation feedback
without the need to submit to the backend.
Expand Down
1 change: 1 addition & 0 deletions imp/docs/UPGRADING
Expand Up @@ -66,6 +66,7 @@ The following hooks have been added::
The following hooks have been removed::

display_folder (use IMAP ACLs and/or 'mbox_acl' hook)
mailboxarray (directly edit template code instead)
mbox_redirect


Expand Down
9 changes: 0 additions & 9 deletions imp/lib/Ajax/Application/ListMessages.php
Expand Up @@ -474,15 +474,6 @@ private function _getOverviewData($mbox, $msglist)
$msgs[$list_ob->getBuid($ob['mailbox'], $ob['uid'])] = $msg;
}

/* Allow user to alter template array. */
try {
$msgs = $injector->getInstance('Horde_Core_Hooks')->callHook(
'mailboxarray',
'imp',
array($msgs)
);
} catch (Horde_Exception_HookNotSet $e) {}

return $msgs;
}

Expand Down
1 change: 1 addition & 0 deletions imp/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [mms] Remove &apos;mailboxarray&apos; hook.
* [mms] Remove &apos;display_folder&apos; hook.
* [mms] Auto-detect EAI support on mail backends and provide validation feedback without the need to submit to the backend.
* [mms] Removed basic view.
Expand Down

0 comments on commit 143d52b

Please sign in to comment.