From bbc8565e5afa7e5352bc3aaf7cf067066ec6d4b1 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 04 Mar 2010 03:17:04 -0500
Subject: [PATCH] Flag original messages after sending a draft (#1486203)

---
 program/include/rcube_plugin_api.php |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index 1eeadce..6b6a0a2 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -69,7 +69,7 @@
   /**
    * Load and init all enabled plugins
    *
-   * This has to be done after rcmail::load_gui() or rcmail::init_json()
+   * This has to be done after rcmail::load_gui() or rcmail::json_init()
    * was called because plugins need to have access to rcmail->output
    */
   public function init()
@@ -90,7 +90,7 @@
         if (class_exists($plugin_name, false)) {
           $plugin = new $plugin_name($this);
           // check inheritance and task specification
-          if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/('.$plugin->task.')/i', $rcmail->task))) {
+          if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $rcmail->task))) {
             $plugin->init();
             $this->plugins[] = $plugin;
           }
@@ -150,15 +150,6 @@
     $this->register_hook('template_container', array($this, 'template_container_hook'));
     
     // maybe also register a shudown function which triggers shutdown functions of all plugin objects
-    
-    
-    // call imap_init right now
-    // (should actually be done in rcmail::imap_init() but plugins are not initialized then)
-    if ($rcmail->imap) {
-      $hook = $this->exec_hook('imap_init', array('fetch_headers' => $rcmail->imap->fetch_add_headers));
-      if ($hook['fetch_headers'])
-        $rcmail->imap->fetch_add_headers = $hook['fetch_headers'];
-    }
   }
   
   

--
Gitblit v1.9.1