mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Clean code
This commit is contained in:
parent
b68cded9c4
commit
be965bdbab
|
|
@ -338,7 +338,7 @@ if ($action == 'create')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -736,7 +736,7 @@ if ($rowid > 0)
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -744,7 +744,7 @@ if ($rowid > 0)
|
|||
print '</table>';
|
||||
|
||||
// Extra field
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ if ($action == 'create')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -715,7 +715,7 @@ if ($rowid > 0)
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -723,7 +723,7 @@ if ($rowid > 0)
|
|||
print '</table>';
|
||||
|
||||
// Extra field
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ if ($user->rights->categorie->creer)
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ print '</td></tr>';
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ if ($action == 'create')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -1260,7 +1260,7 @@ if ($id > 0)
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1646,7 +1646,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
$parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ if ($action == 'create' && !$error)
|
|||
$parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
$object=new Facture($db);
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ if ($action == 'create')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit',$parameters);
|
||||
}
|
||||
|
|
@ -914,7 +914,7 @@ else
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2857,7 +2857,7 @@ if ($action == 'create')
|
|||
$parameters = array('objectsrc' => $objectsrc,'colspan' => ' colspan="2"', 'cols'=>2);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ else
|
|||
$parameters=array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 3);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -963,7 +963,7 @@ else
|
|||
$parameters=array('colspan' => ' colspan="3"', 'cols'=>3);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1287,7 +1287,7 @@ if ($action == 'create')
|
|||
print $hookmanager->resPrint;
|
||||
|
||||
// Other attributes
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ class FormTicketsup
|
|||
|
||||
// Other attributes
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && is_array($extrafields->attributes[$ticketstat->table_element]['label']))
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $ticketstat->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ if (empty($conf) || ! is_object($conf))
|
|||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ if (empty($conf) || ! is_object($conf))
|
|||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ print $hookmanager->resPrint;
|
|||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
//var_dump($extrafields->attributes);
|
||||
if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label']))
|
||||
if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]['label']))
|
||||
{
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ if ($action == 'create')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit',$parameters);
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ if (! empty($id) && $action == 'edit')
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1059,7 +1059,7 @@ if ($action == 'create')
|
|||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
// copy from order
|
||||
$orderExtrafields = new Extrafields($db);
|
||||
$orderExtrafieldLabels = $orderExtrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ if ($action == 'create')
|
|||
$parameters = array('colspan' => ' colspan="3"');
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1609,7 +1609,7 @@ if ($action=='create')
|
|||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ if ($action == 'create' && !$error) {
|
|||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
$object=new FactureFournisseur($db);
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
|
|
|
|||
|
|
@ -1998,7 +1998,7 @@ if ($action == 'create')
|
|||
// print '<td><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>';
|
||||
print '</tr>';
|
||||
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ else
|
|||
$parameters=array('cols' => 3);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit',$parameters);
|
||||
}
|
||||
|
|
@ -1470,7 +1470,7 @@ else
|
|||
$parameters=array('colspan' => ' colspan="3"', 'cols'=>3);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -869,7 +869,7 @@ elseif ($object->id > 0)
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -1055,7 +1055,7 @@ elseif ($object->id > 0)
|
|||
if (parseFloat(oldpercent) != 100) { jQuery("#opp_percent").val(oldpercent); }
|
||||
else { jQuery("#opp_percent").val(defaultpercent); }
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if ((parseFloat(jQuery("#opp_percent").val()) < parseFloat(defaultpercent)));
|
||||
{
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) && ! empty($extrafields_task->attribute_label))
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields_task,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ if ($id > 0 || ! empty($ref))
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ if ($action == 'create' || $object->fetch($id) > 0)
|
|||
$parameters=array('objectsrc' => $objectsrc);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1431,7 +1431,7 @@ else
|
|||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -2018,7 +2018,7 @@ else
|
|||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1151,7 +1151,7 @@ if ($action == 'create')
|
|||
$parameters = array('colspan' => ' colspan="3"');
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook) {
|
||||
if (empty($reshook)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
|||
$parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -2322,7 +2322,7 @@ else
|
|||
$parameters=array('colspan' => ' colspan="2"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ if ($action == 'create')
|
|||
$parameters=array('object' => $object, 'colspan' => ' colspan="2"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
@ -570,7 +570,7 @@ else
|
|||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user