From b0c11373978867eec537cb53ae71e15339e8206a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 22 Jan 2013 17:43:41 +0100 Subject: [PATCH] Restore correct code: A module decide if standard code is used or not after running by a return code that is an int 0=execute standard code, 1=disable standard code To return a string to show or an array or error codes, this must be done by setting $actionclassinstance->results or $actionclassinstance->resprints --- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/hookmanager.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d77b7487e1e..34a68f58fc4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2479,7 +2479,7 @@ abstract class CommonObject $parameters=array(); $reshook=$hookmanager->executeHooks('showLinkedObjectBlock',$parameters,$this,$action); // Note that $action and $object may have been modified by hook - if (empty($hookmanager->resPrint)) + if (empty($reshook)) { $num = count($this->linkedObjects); diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 8b0ac34b6e2..c6e5895f450 100755 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -41,8 +41,8 @@ class HookManager // Array result var $resArray=array(); - // Printable result (int, string) - var $resPrint; + // Printable result + var $resPrint=''; /** * Constructor