forked from Wavyzz/dolibarr
clean indent
This commit is contained in:
@@ -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)";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user