2
0
forked from Wavyzz/dolibarr

clean indent

This commit is contained in:
Frédéric FRANCE
2019-10-27 11:53:20 +01:00
parent e203f87c84
commit e2afcfb999
21 changed files with 132 additions and 129 deletions

View File

@@ -76,10 +76,9 @@ class FormContract
if ($socid > 0) if ($socid > 0)
{ {
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) {
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') } elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') {
{
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
$sql.= " OR c.fk_soc IS NULL)"; $sql.= " OR c.fk_soc IS NULL)";
} }

View File

@@ -139,8 +139,7 @@ class Menubase
{ {
$sql = "SELECT MAX(rowid) as maxrowid FROM ".MAIN_DB_PREFIX."menu"; $sql = "SELECT MAX(rowid) as maxrowid FROM ".MAIN_DB_PREFIX."menu";
$resqlrowid=$this->db->query($sql); $resqlrowid=$this->db->query($sql);
if ($resqlrowid) if ($resqlrowid) {
{
$obj=$this->db->fetch_object($resqlrowid); $obj=$this->db->fetch_object($resqlrowid);
$maxrowid=$obj->maxrowid; $maxrowid=$obj->maxrowid;

View File

@@ -835,7 +835,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
$start = "{user_extra_"; $start = "{user_extra_";
$end = "\}"; $end = "\}";
$extra= get_string_between($mask, "user_extra_", "}"); $extra= get_string_between($mask, "user_extra_", "}");
if(!empty($user->array_options['options_'.$extra])){ if (!empty($user->array_options['options_'.$extra])) {
$mask = preg_replace('#('.$start.')(.*?)('.$end.')#si', $user->array_options['options_'.$extra], $mask); $mask = preg_replace('#('.$start.')(.*?)('.$end.')#si', $user->array_options['options_'.$extra], $mask);
} }
} }

View File

@@ -137,7 +137,7 @@ function invoice_admin_prepare_head()
$head[$h][2] = 'payment'; $head[$h][2] = 'payment';
$h++; $h++;
if($conf->global->INVOICE_USE_SITUATION){ if ($conf->global->INVOICE_USE_SITUATION) {
$head[$h][0] = DOL_URL_ROOT.'/admin/facture_situation.php'; $head[$h][0] = DOL_URL_ROOT.'/admin/facture_situation.php';
$head[$h][1] = $langs->trans("InvoiceSituation"); $head[$h][1] = $langs->trans("InvoiceSituation");
$head[$h][2] = 'situation'; $head[$h][2] = 'situation';

View File

@@ -1417,7 +1417,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
//print '>'.$outputlangs->charset_output.','.$period; //print '>'.$outputlangs->charset_output.','.$period;
if(!empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){ if(!empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){
$libelleproduitservice.= '<b style="color:#333666;" ><em>'."__N__</b> ".$period.'</em>'; $libelleproduitservice.= '<b style="color:#333666;" ><em>'."__N__</b> ".$period.'</em>';
}else{ } else {
$libelleproduitservice.="__N__".$period; $libelleproduitservice.="__N__".$period;
} }
//print $libelleproduitservice; //print $libelleproduitservice;

View File

@@ -313,8 +313,14 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
{ {
if (empty($user->rights->$feature->$subfeature->creer) if (empty($user->rights->$feature->$subfeature->creer)
&& empty($user->rights->$feature->$subfeature->write) && empty($user->rights->$feature->$subfeature->write)
&& empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; } && empty($user->rights->$feature->$subfeature->create)) {
else { $createok=1; break; } // Break to bypass second test if the first is ok $createok=0;
$nbko++;
} else {
$createok=1;
// Break to bypass second test if the first is ok
break;
}
} }
} }
elseif (! empty($feature)) // This is for permissions on 2 levels ('creer' or 'write') elseif (! empty($feature)) // This is for permissions on 2 levels ('creer' or 'write')
@@ -322,7 +328,10 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
//print '<br>feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; //print '<br>feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write;
if (empty($user->rights->$feature->creer) if (empty($user->rights->$feature->creer)
&& empty($user->rights->$feature->write) && empty($user->rights->$feature->write)
&& empty($user->rights->$feature->create)) { $createok=0; $nbko++; } && empty($user->rights->$feature->create)) {
$createok=0;
$nbko++;
}
} }
} }

View File

@@ -690,10 +690,10 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$out.=$actionstatic->getNomUrl(1, -1).' '; $out.=$actionstatic->getNomUrl(1, -1).' ';
} }
// if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) //if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id)
// { //{
// $out.='<a href="'.$url.'" class="timeline-btn" title="'.$langs->trans('Show').'" ><i class="fa fa-calendar" ></i>'.$langs->trans('Show').'</a>'; // $out.='<a href="'.$url.'" class="timeline-btn" title="'.$langs->trans('Show').'" ><i class="fa fa-calendar" ></i>'.$langs->trans('Show').'</a>';
// } //}
if ($user->rights->agenda->allactions->create || if ($user->rights->agenda->allactions->create ||
@@ -723,10 +723,8 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$out.="</span>\n"; $out.="</span>\n";
// Ref // Ref
$out.='<h3 class="timeline-header">'; $out.='<h3 class="timeline-header">';
// Author of event // Author of event
$out.='<span class="messaging-author">'; $out.='<span class="messaging-author">';
if ($histo[$key]['userid'] > 0) if ($histo[$key]['userid'] > 0)
@@ -739,11 +737,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
} }
$out.='</span>'; $out.='</span>';
// Title // Title
$out .= ' <span class="messaging-title">'; $out .= ' <span class="messaging-title">';
if($actionstatic->code == 'TICKET_MSG') { if($actionstatic->code == 'TICKET_MSG') {
$out .= $langs->trans('TicketNewMessage'); $out .= $langs->trans('TicketNewMessage');
} }