includes/plugins.php
changeset 825 9d5c04c1414f
parent 812 68060328e9c6
child 832 7152ca0a0ce9
--- a/includes/plugins.php	Sat Jan 17 15:16:36 2009 -0500
+++ b/includes/plugins.php	Sun Jan 25 21:18:05 2009 -0500
@@ -121,8 +121,9 @@
    * @param array Deprecated.
    */
   
-  function setHook($name, $opts = Array()) {
-    if(isset($this->hook_list[$name]) && is_array($this->hook_list[$name]))
+  function setHook($name, $opts = Array())
+  {
+    if ( !empty($this->hook_list[$name]) && is_array($this->hook_list[$name]) )
     {
       return array(implode("\n", $this->hook_list[$name]));
     }
@@ -149,8 +150,9 @@
    </code>
    */
   
-  function attachHook($name, $code) {
-    if(!isset($this->hook_list[$name]))
+  function attachHook($name, $code)
+  {
+    if ( !isset($this->hook_list[$name]) )
     {
       $this->hook_list[$name] = Array();
     }