From 6ddb16d181e285d4f0ef0ef55bdd0ba787f1b583 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 17 Nov 2012 10:24:09 -0500
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 index.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/index.php b/index.php
index 0ad371a..aee94e9 100644
--- a/index.php
+++ b/index.php
@@ -249,7 +249,6 @@
 $RCMAIL->set_task($plugin['task']);
 $RCMAIL->action = $plugin['action'];
 
-
 // handle special actions
 if ($RCMAIL->action == 'keep-alive') {
   $OUTPUT->reset();
@@ -282,7 +281,8 @@
   else if (($stepfile = $RCMAIL->get_action_file())
     && is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/'.$stepfile)
   ) {
-    include $incfile;
+    // include action file only once (in case it don't exit)
+    include_once $incfile;
     $redirects++;
   }
   else {
@@ -290,6 +290,9 @@
   }
 }
 
+if ($RCMAIL->action == 'refresh') {
+  $RCMAIL->plugins->exec_hook('refresh', array());
+}
 
 // parse main template (default)
 $OUTPUT->send($RCMAIL->task);

--
Gitblit v1.9.1