Merge branch '3.3' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.3

This commit is contained in:
Regis Houssin 2013-01-23 11:28:49 +01:00
commit 173740157f

View File

@ -117,7 +117,7 @@ class HookManager
* @param Object &$object Object to use hooks on
* @param string &$action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
* @return mixed For doActions,formObjectOptions: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Must always return an int and things to print into ->resprints.
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Must always return an int and things to print into ->resprints.
* Can also return some values into an array ->results.
* $this->error or this->errors are also defined by class called by this function if error.
*/
@ -176,11 +176,13 @@ class HookManager
// TODO. remove this. result must not be a string. we must use $actionclassinstance->resprint to return a string
if (! is_array($result) && ! is_numeric($result)) $this->resPrint.=$result;
}
//print "method=".$method." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." result=".$result." resaction=".$resaction;
}
}
}
if ($method != 'doActions' && $method != 'formObjectOptions') return $this->resPrint; // TODO remove this. When there is something to print, ->resPrint is filled.
if ($method != 'doActions' && $method != 'formObjectOptions') return $this->resPrint; // TODO remove this. When there is something to print, ->resPrint is filled.
return ($error?-1:$resaction);
}