forked from Wavyzz/dolibarr
clean indent
This commit is contained in:
@@ -76,10 +76,9 @@ class FormContract
|
||||
if ($socid > 0)
|
||||
{
|
||||
// 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)";
|
||||
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.= " OR c.fk_soc IS NULL)";
|
||||
}
|
||||
|
||||
@@ -139,8 +139,7 @@ class Menubase
|
||||
{
|
||||
$sql = "SELECT MAX(rowid) as maxrowid FROM ".MAIN_DB_PREFIX."menu";
|
||||
$resqlrowid=$this->db->query($sql);
|
||||
if ($resqlrowid)
|
||||
{
|
||||
if ($resqlrowid) {
|
||||
$obj=$this->db->fetch_object($resqlrowid);
|
||||
$maxrowid=$obj->maxrowid;
|
||||
|
||||
|
||||
@@ -835,7 +835,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
$start = "{user_extra_";
|
||||
$end = "\}";
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ function invoice_admin_prepare_head()
|
||||
$head[$h][2] = 'payment';
|
||||
$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][1] = $langs->trans("InvoiceSituation");
|
||||
$head[$h][2] = 'situation';
|
||||
|
||||
@@ -1417,7 +1417,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
||||
//print '>'.$outputlangs->charset_output.','.$period;
|
||||
if(!empty($conf->global->ADD_HTML_FORMATING_INTO_DESC_DOC)){
|
||||
$libelleproduitservice.= '<b style="color:#333666;" ><em>'."__N__</b> ".$period.'</em>';
|
||||
}else{
|
||||
} else {
|
||||
$libelleproduitservice.="__N__".$period;
|
||||
}
|
||||
//print $libelleproduitservice;
|
||||
|
||||
@@ -313,8 +313,14 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
||||
{
|
||||
if (empty($user->rights->$feature->$subfeature->creer)
|
||||
&& empty($user->rights->$feature->$subfeature->write)
|
||||
&& empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; }
|
||||
else { $createok=1; break; } // Break to bypass second test if the first is ok
|
||||
&& empty($user->rights->$feature->$subfeature->create)) {
|
||||
$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')
|
||||
@@ -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;
|
||||
if (empty($user->rights->$feature->creer)
|
||||
&& empty($user->rights->$feature->write)
|
||||
&& empty($user->rights->$feature->create)) { $createok=0; $nbko++; }
|
||||
&& empty($user->rights->$feature->create)) {
|
||||
$createok=0;
|
||||
$nbko++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -690,10 +690,10 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
||||
$out.=$actionstatic->getNomUrl(1, -1).' ';
|
||||
}
|
||||
|
||||
// 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>';
|
||||
// }
|
||||
//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>';
|
||||
//}
|
||||
|
||||
|
||||
if ($user->rights->agenda->allactions->create ||
|
||||
@@ -723,10 +723,8 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
||||
$out.="</span>\n";
|
||||
|
||||
// Ref
|
||||
|
||||
$out.='<h3 class="timeline-header">';
|
||||
|
||||
|
||||
// Author of event
|
||||
$out.='<span class="messaging-author">';
|
||||
if ($histo[$key]['userid'] > 0)
|
||||
@@ -739,11 +737,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
||||
}
|
||||
$out.='</span>';
|
||||
|
||||
|
||||
// Title
|
||||
$out .= ' <span class="messaging-title">';
|
||||
|
||||
|
||||
if($actionstatic->code == 'TICKET_MSG') {
|
||||
$out .= $langs->trans('TicketNewMessage');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user