Hey guys,

I've got a short little patch for handling multiple fetchmail drivers. Currently, if you create a new driver in imp/lib/Fetchmail/drivers, it becomes available but uses the 'fetchmailprefs' template - which may not wholly apply. This patch changes the template file to $driver . "prefs.html" so you don't have to confuse your users :)

I realize the template driver has a bit more 'oomph' to it, like selecting which account to use or creating a new one. Maybe that should be split out into a separate file? This patch will break loading the template for creating or editing. In that case, it should be named 'imapprefs.html', as 'imap' is the driver name that comes with IMP by default.
Rick

--- /usr/local/www/data/horde/imp/fetchmailprefs.php Fri Jul 25 15:45:49 2008 +++ /usr/local/www/sub/beta/horde/imp/fetchmailprefs.php Sun Dec 7 13:17:29 2008
@@ -195,7 +195,11 @@
Prefs_UI::generateHeader(null, $chunk);
Horde::addScriptFile('prototype.js', 'imp', true);
Horde::addScriptFile('fetchmailprefs.js', 'imp', true);
-echo $t->fetch(IMP_TEMPLATES . '/fetchmail/fetchmailprefs.html');
+if (!$driver){
+   echo $t->fetch(IMP_TEMPLATES . '/fetchmail/fetchmailprefs.html');
+}else{
+   echo $t->fetch(IMP_TEMPLATES . '/fetchmail/'.$driver.'prefs.html');
+}
if (!$chunk) {
    require $registry->get('templates', 'horde') . '/common-footer.inc';
}

--
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [EMAIL PROTECTED]

Reply via email to