';
+ }
+
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
+
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
@@ -849,8 +859,11 @@ if ($resql)
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['origin']['checked'])) print_liste_field_titre($arrayfields['origin']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['m.value']['checked'])) print_liste_field_titre($arrayfields['m.value']['label'],$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
+ if (! empty($arrayfields['m.price']['checked'])) print_liste_field_titre($arrayfields['m.price']['label'],$_SERVER["PHP_SELF"], "m.price","",$param,'align="right"',$sortfield,$sortorder);
+
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
+
// Hook fields
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
@@ -976,6 +989,13 @@ if ($resql)
print $objp->qty;
print '';
}
+ if (! empty($arrayfields['m.price']['checked']))
+ {
+ // Price
+ print '
';
+ print price($objp->price);
+ print '
';
+ }
// Action column
print '
';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index b83a6831053..209bc2541a8 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -176,11 +176,9 @@ $db->commit();
// Lecture des droits utilisateurs
$permsuser = array();
-$sql = "SELECT DISTINCT r.id, r.libelle, r.module";
-$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r,";
-$sql.= " ".MAIN_DB_PREFIX."user_rights as ur";
-$sql.= " WHERE ur.fk_id = r.id";
-$sql.= " AND ur.entity = ".$entity;
+$sql = "SELECT DISTINCT ur.fk_id";
+$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
+$sql.= " WHERE ur.entity = ".$entity;
$sql.= " AND ur.fk_user = ".$object->id;
dol_syslog("get user perms", LOG_DEBUG);
@@ -192,7 +190,7 @@ if ($result)
while ($i < $num)
{
$obj = $db->fetch_object($result);
- array_push($permsuser,$obj->id);
+ array_push($permsuser,$obj->fk_id);
$i++;
}
$db->free($result);
@@ -205,12 +203,10 @@ else
// Lecture des droits groupes
$permsgroupbyentity = array();
-$sql = "SELECT DISTINCT r.id, r.libelle, r.module, gu.entity";
-$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r,";
-$sql.= " ".MAIN_DB_PREFIX."usergroup_rights as gr,";
+$sql = "SELECT DISTINCT gr.fk_id, gu.entity";
+$sql.= " FROM ".MAIN_DB_PREFIX."usergroup_rights as gr,";
$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu";
-$sql.= " WHERE gr.fk_id = r.id";
-$sql.= " AND gr.entity = ".$entity;
+$sql.= " WHERE gr.entity = ".$entity;
$sql.= " AND gr.fk_usergroup = gu.fk_usergroup";
$sql.= " AND gu.fk_user = ".$object->id;
@@ -225,7 +221,7 @@ if ($result)
$obj = $db->fetch_object($result);
if (! isset($permsgroupbyentity[$obj->entity]))
$permsgroupbyentity[$obj->entity] = array();
- array_push($permsgroupbyentity[$obj->entity], $obj->id);
+ array_push($permsgroupbyentity[$obj->entity], $obj->fk_id);
$i++;
}
$db->free($result);
diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php
index 98a5c4d51bc..d72c60f05e5 100755
--- a/scripts/product/migrate_picture_path.php
+++ b/scripts/product/migrate_picture_path.php
@@ -104,6 +104,7 @@ function migrate_product_photospath($product)
global $conf;
$dir = $conf->product->multidir_output[$product->entity];
+ $conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO = 1;
$origin = $dir .'/'. get_exdir($product->id,2,0,0,$product,'product') . $product->id ."/photos";
$destin = $dir.'/'.dol_sanitizeFileName($product->ref);