[horde] DIMP : Problem/bug as initial_application
Massimiliano Ferrero
m.ferrero at midhgard.it
Mon Nov 17 23:47:24 UTC 2008
Gerard Breiner ha scritto:
> I have a problem with dimp when I set it as "initial_application" .
> After login the url of redirection is
> https://mywebmail/dimp/index.php and the page display "Redirection
> of page incorrect".
>
> It works if I put 'initial_page' => 'imp/login.php' in
> horde/config/registry.php
> and $url = "https://webmail-test.ias.u-psud.fr/dimp"; return $url;
> in imp/redirect.php
>
> Does someone can confirm me this problem/bug and/or how to correct
> it properly :-[ .
I think the problem is not if you put dimp as initial_application: the
problem is that you have to access imp once before accessing dimp OR
load the sidebar: on my installation your problem happened only when
show_sidebar = 0 in prefs table (of false in prefs.php)
I have solved the problem having the sidebar being loaded and then
redirecting to dimp:
patch dimp/lib/base.php this way
--- ./dimp/lib/base.php.original 2008-09-03 22:29:44.000000000 +0200
+++ ./dimp/lib/base.php 2008-11-18 00:34:20.000000000 +0100
@@ -85,6 +85,14 @@
IMP::redirect(str_replace('&', '&', IMP::getLogoutUrl()));
}
+// If not set session variable load_sidebar_once set it (execute
once) and redirect to sidebar
+// Sidebar code will be executed silently and then redirect to dimp
+if (! isset($_SESSION['load_sidebar_once'])) {
+ $_SESSION['load_sidebar_once'] = TRUE;
+ header('Location: ' . $conf['cookie']['path'] .
'/services/portal/sidebar_dimp.php');
+ exit;
+}
+
// Handle session timeouts
if (!IMP::checkAuthentication(true)) {
switch (Util::nonInputVar('session_timeout')) {
then create a duplicate of services/portal/sidebar.php
cp services/portal/sidebar.php services/portal/sidebar_dimp.php
and patch it this way:
--- services/portal/sidebar.php 2008-09-26 11:56:45.000000000 +0200
+++ services/portal/sidebar_dimp.php 2008-11-18 00:35:35.000000000 +0100
@@ -267,5 +267,5 @@
}
Horde::addScriptFile('prototype.js', 'horde', true);
Horde::addScriptFile('sidebar.js', 'horde', true);
-require HORDE_TEMPLATES . '/common-header.inc';
-require HORDE_TEMPLATES . '/portal/sidebar.inc';
+
+header('Location: ' . $conf['cookie']['path'] . '/dimp/');
Best regards
Massimiliano Ferrero
--
Massimiliano Ferrero
Midhgard s.r.l.
C/so Svizzera 185 bis
c/o centro Piero della Francesca
10149 - Torino
tel. +39-0117575375
fax +39-0117768576
e-mail: m.ferrero at midhgard.it
sito web: http://www.midhgard.it
More information about the horde
mailing list