From d2152a8342b4a9c65efc84baad13e154b0d35fd3 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 26a1905a6af..8b6002c29c5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2482,7 +2482,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 b836c001152..5c84534f9f5 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