Qual: Removed useless function

This commit is contained in:
Laurent Destailleur 2014-07-05 08:59:41 +02:00
parent b4bffb902f
commit fa82cbceb9
2 changed files with 34 additions and 54 deletions

View File

@ -3383,9 +3383,8 @@ abstract class CommonObject
/** /**
* Call trigger based on this instance * Call trigger based on this instance
* * NB: Error from trigger are stacked in interface->errors
* NB: Error from trigger are stacked in errors * NB2: If return code of triggers are < 0, action calling trigger should cancel all transaction.
* NB2: if trigger fail, action should be canceled.
* *
* @param string $trigger_name trigger's name to execute * @param string $trigger_name trigger's name to execute
* @param User $user Object user * @param User $user Object user
@ -3398,7 +3397,8 @@ abstract class CommonObject
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db); $interface=new Interfaces($this->db);
$result=$interface->run_triggers($trigger_name,$this,$user,$langs,$conf); $result=$interface->run_triggers($trigger_name,$this,$user,$langs,$conf);
if ($result < 0) { if ($result < 0)
{
if (!empty($this->errors)) if (!empty($this->errors))
{ {
$this->errors=array_merge($this->errors,$interface->errors); $this->errors=array_merge($this->errors,$interface->errors);
@ -3409,7 +3409,6 @@ abstract class CommonObject
} }
} }
return $result; return $result;
} }
} }

View File

@ -2281,7 +2281,7 @@ class User extends CommonObject
dol_syslog(get_class($this)."::get_full_tree dol_sort_array", LOG_DEBUG); dol_syslog(get_class($this)."::get_full_tree dol_sort_array", LOG_DEBUG);
$this->users=dol_sort_array($this->users, 'fullname', 'asc', true, false); $this->users=dol_sort_array($this->users, 'fullname', 'asc', true, false);
//$this->debug_users(); //var_dump($this->users);
return $this->users; return $this->users;
} }
@ -2322,24 +2322,5 @@ class User extends CommonObject
return; return;
} }
/**
* Affiche contenu de $this->users
*
* @return void
*/
function debug_users()
{
// Affiche $this->users
foreach($this->users as $key => $val)
{
print 'id: '.$this->users[$key]['id'];
print ' name: '.$this->users[$key]['name'];
print ' parent: '.$this->users[$key]['fk_user'];
print ' fullpath: '.$this->users[$key]['fullpath'];
print ' fullname: '.$this->users[$key]['fullname'];
print "<br>\n";
}
}
} }