Fix: works on repair broken features
This commit is contained in:
parent
dcd3ab435d
commit
00aaaac8aa
@ -25,7 +25,7 @@
|
||||
* \file htdocs/commande/fiche.php
|
||||
* \ingroup commande
|
||||
* \brief Page to show customer order
|
||||
* \version $Id: fiche.php,v 1.533 2011/08/10 22:47:34 eldy Exp $
|
||||
* \version $Id: fiche.php,v 1.534 2011/08/11 15:14:51 hregis Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -1392,7 +1392,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$objectsrc->printOriginLinesList();
|
||||
$objectsrc->printOriginLinesList($hookmanager);
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
@ -2070,5 +2070,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/10 22:47:34 $ - $Revision: 1.533 $');
|
||||
llxFooter('$Date: 2011/08/11 15:14:51 $ - $Revision: 1.534 $');
|
||||
?>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \file htdocs/compta/facture.php
|
||||
* \ingroup facture
|
||||
* \brief Page to create/see an invoice
|
||||
* \version $Id: facture.php,v 1.854 2011/08/10 22:47:34 eldy Exp $
|
||||
* \version $Id: facture.php,v 1.855 2011/08/11 15:14:50 hregis Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@ -782,7 +782,7 @@ if ($action == 'add' && $user->rights->facture->creer)
|
||||
}
|
||||
|
||||
// Hooks
|
||||
$parameters=array('srcobject'=>$srcobject);
|
||||
$parameters=array('objFrom'=>$srcobject);
|
||||
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
@ -1835,7 +1835,7 @@ if ($action == 'create')
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$objectsrc->printOriginLinesList($object);
|
||||
$objectsrc->printOriginLinesList($hookmanager);
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
@ -3185,5 +3185,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/10 22:47:34 $ - $Revision: 1.854 $');
|
||||
llxFooter('$Date: 2011/08/11 15:14:50 $ - $Revision: 1.855 $');
|
||||
?>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* \file htdocs/compta/facture/class/facture.class.php
|
||||
* \ingroup facture
|
||||
* \brief Fichier de la classe des factures clients
|
||||
* \version $Id: facture.class.php,v 1.126 2011/08/10 22:47:33 eldy Exp $
|
||||
* \version $Id: facture.class.php,v 1.127 2011/08/11 15:14:50 hregis Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@ -661,8 +661,8 @@ class Facture extends CommonObject
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('objFrom'=>$objFrom);
|
||||
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$parameters=array('objFrom'=>$object);
|
||||
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/core/class/commonobject.class.php
|
||||
* \ingroup core
|
||||
* \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...)
|
||||
* \version $Id: commonobject.class.php,v 1.154 2011/08/10 22:47:34 eldy Exp $
|
||||
* \version $Id: commonobject.class.php,v 1.155 2011/08/11 15:14:51 hregis Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1800,7 +1800,7 @@ class CommonObject
|
||||
* If lines are into a template, title must also be into a template
|
||||
* But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
|
||||
*/
|
||||
function printOriginLinesList()
|
||||
function printOriginLinesList($hookmanager=false)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -1820,14 +1820,12 @@ class CommonObject
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
if (! empty($this->hooks) && ( ($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line) ) )
|
||||
if (is_object($hookmanager) && ( ($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line) ) )
|
||||
{
|
||||
if (empty($line->fk_parent_line))
|
||||
{
|
||||
foreach($this->hooks as $hook)
|
||||
{
|
||||
if (method_exists($hook['modules'][$line->special_code],'printOriginObjectLine')) $hook['modules'][$line->special_code]->printOriginObjectLine($this,$line,$var,$i);
|
||||
}
|
||||
$parameters=array('line'=>$line,'var'=>$var,'i'=>$i);
|
||||
$reshook=$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user