Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2
This commit is contained in:
commit
c019857bda
@ -132,6 +132,8 @@ function product_prepare_head($object, $user)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'product', 'remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1373,8 +1373,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
$num=count($menu_array);
|
$num=count($menu_array);
|
||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
|
$showmenu=true;
|
||||||
|
if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) {
|
||||||
|
$showmenu=false;
|
||||||
|
}
|
||||||
|
|
||||||
$alt++;
|
$alt++;
|
||||||
if (empty($menu_array[$i]['level']))
|
if (empty($menu_array[$i]['level']) && $showmenu)
|
||||||
{
|
{
|
||||||
if (($alt%2==0))
|
if (($alt%2==0))
|
||||||
{
|
{
|
||||||
@ -1409,10 +1414,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
{
|
{
|
||||||
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>'."\n";
|
print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>'."\n";
|
||||||
}
|
}
|
||||||
else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
else if ($showmenu)
|
||||||
{
|
{
|
||||||
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
|
||||||
}
|
}
|
||||||
|
if ($showmenu)
|
||||||
print '<div class="menu_top"></div>'."\n";
|
print '<div class="menu_top"></div>'."\n";
|
||||||
}
|
}
|
||||||
// Menu niveau > 0
|
// Menu niveau > 0
|
||||||
@ -1428,7 +1434,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
|
if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
}
|
}
|
||||||
else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
else if ($showmenu)
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
@ -1437,6 +1443,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
// If next is a new block or end
|
// If next is a new block or end
|
||||||
if (empty($menu_array[$i+1]['level']))
|
if (empty($menu_array[$i+1]['level']))
|
||||||
{
|
{
|
||||||
|
if ($showmenu)
|
||||||
print '<div class="menu_end"></div>'."\n";
|
print '<div class="menu_end"></div>'."\n";
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,15 +103,17 @@ class InterfacePaypalWorkflow
|
|||||||
{
|
{
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". source=".$object->source." ref=".$object->ref);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". source=".$object->source." ref=".$object->ref);
|
||||||
|
|
||||||
|
if (! empty($object->source))
|
||||||
|
{
|
||||||
if ($object->source == 'membersubscription')
|
if ($object->source == 'membersubscription')
|
||||||
{
|
{
|
||||||
//require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherents.class.php");
|
//require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherents.class.php';
|
||||||
|
|
||||||
// TODO add subscription treatment
|
// TODO add subscription treatment
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
|
||||||
$soc = new Societe($this->db);
|
$soc = new Societe($this->db);
|
||||||
|
|
||||||
@ -144,6 +146,11 @@ class InterfacePaypalWorkflow
|
|||||||
// Add transaction id
|
// Add transaction id
|
||||||
$obj->setValueFrom('ref_int',$object->resArray["TRANSACTIONID"]);
|
$obj->setValueFrom('ref_int',$object->resArray["TRANSACTIONID"]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// TODO add free tag treatment
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -512,7 +512,7 @@ class User extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.= ", ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
$sql.= " WHERE r.id = ur.fk_id";
|
$sql.= " WHERE r.id = ur.fk_id";
|
||||||
$sql.= " AND r.entity in (0,".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
$sql.= " AND r.entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||||
$sql.= " AND ur.fk_user= ".$this->id;
|
$sql.= " AND ur.fk_user= ".$this->id;
|
||||||
$sql.= " AND r.perms IS NOT NULL";
|
$sql.= " AND r.perms IS NOT NULL";
|
||||||
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
||||||
@ -557,11 +557,14 @@ class User extends CommonObject
|
|||||||
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu,";
|
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.= " ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
$sql.= " WHERE r.id = gr.fk_id";
|
$sql.= " WHERE r.id = gr.fk_id";
|
||||||
|
if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) {
|
||||||
|
$sql.= " AND gu.entity IN (0,".$conf->entity.")";
|
||||||
|
} else {
|
||||||
|
$sql.= " AND r.entity = ".$conf->entity;
|
||||||
|
}
|
||||||
$sql.= " AND gr.fk_usergroup = gu.fk_usergroup";
|
$sql.= " AND gr.fk_usergroup = gu.fk_usergroup";
|
||||||
$sql.= " AND gu.fk_user = ".$this->id;
|
$sql.= " AND gu.fk_user = ".$this->id;
|
||||||
$sql.= " AND r.perms IS NOT NULL";
|
$sql.= " AND r.perms IS NOT NULL";
|
||||||
$sql.= " AND r.entity = ".$conf->entity;
|
|
||||||
$sql.= " AND gu.entity IN (0,".$conf->entity.")";
|
|
||||||
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
|
dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user