소스 검색

Should be a better fix so this hook now works with plugins that have been using it the old way too

pdontthink 19 년 전
부모
커밋
8fde45ca15
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      functions/plugin.php

+ 2 - 6
functions/plugin.php

@@ -141,8 +141,8 @@ function do_hook_function($name,$parm=NULL) {
  */
  */
 function concat_hook_function($name,$parm=NULL) {
 function concat_hook_function($name,$parm=NULL) {
     global $squirrelmail_plugin_hooks, $currentHookName;
     global $squirrelmail_plugin_hooks, $currentHookName;
-//    $ret = '';
-    $ret = array();
+    $ret = '';
+//    $ret = array();
     $currentHookName = $name;
     $currentHookName = $name;
 
 
     if (isset($squirrelmail_plugin_hooks[$name])
     if (isset($squirrelmail_plugin_hooks[$name])
@@ -160,10 +160,6 @@ function concat_hook_function($name,$parm=NULL) {
 
 
     /* Variable-length argument lists have a slight problem when */
     /* Variable-length argument lists have a slight problem when */
     /* passing values by reference. Pity. This is a workaround.  */
     /* passing values by reference. Pity. This is a workaround.  */
-    // FIXME: empty return array breaks legacy use of this hook, so 
-    // as a workaround, return empty string (let's fix the 
-    // hook calls so we can pull this out)
-    if (empty($ret)) return '';
     return $ret;
     return $ret;
 }
 }