updated docs
[squirrelmail.git] / functions / plugin.php
index 34cb4bd6d1ecb958916fba9533adf0d8e2e35f46..a6371dfa62e1c744e720e055451b2051090fe31e 100644 (file)
  **/
 
 
-   $plugin_php = true;
+   if (defined('plugin_php'))
+      return;
+   define('plugin_php', true);
+
+   global $plugin_general_debug, $squirrelmail_plugin_hooks;
    $plugin_general_debug = false;
+   
+   $squirrelmail_plugin_hooks = array();
 
    // This function adds a plugin
    function use_plugin ($name) {
          use_plugin($name);
       }
 
+   if ($plugin_general_debug)
+   {
+      echo "plugin:  Hook list<br>\n";
+      foreach ($squirrelmail_plugin_hooks as $Hook => $Plugins)
+      {
+          foreach ($Plugins as $Name => $Func)
+         {
+             echo "[$Hook][$Name] = $Func<br>\n";
+         }
+      }
+   }
+
 ?>