Merge remote-tracking branch 'origin/3.8' into 3.9

This commit is contained in:
Laurent Destailleur 2016-01-30 15:59:40 +01:00
commit 5e9fd25a6e
6 changed files with 26 additions and 22 deletions

View File

@ -484,24 +484,24 @@ if ($object->fetch($id) >= 0)
if ($obj->source_type == 'member') if ($obj->source_type == 'member')
{ {
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$m=new Adherent($db); $objectstatic=new Adherent($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else if ($obj->source_type == 'user') else if ($obj->source_type == 'user')
{ {
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
$m=new User($db); $objectstatic=new User($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
$m->id=$obj->source_id; $objectstatic->id=$obj->source_id;
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else if ($obj->source_type == 'thirdparty') else if ($obj->source_type == 'thirdparty')
{ {
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$m=new Societe($db); $objectstatic=new Societe($db);
$m->fetch($obj->source_id); $objectstatic->fetch($obj->source_id);
print $m->getNomUrl(2); print $objectstatic->getNomUrl(2);
} }
else else
{ {

View File

@ -300,7 +300,8 @@ if (($action == 'create' || $action == 'add') && !$error)
$lines[$i]->rowid, $lines[$i]->rowid,
$fk_parent_line, $fk_parent_line,
$lines[$i]->fk_fournprice, $lines[$i]->fk_fournprice,
$lines[$i]->pa_ht $lines[$i]->pa_ht,
$lines[$i]->label
); );
if ($result > 0) if ($result > 0)
{ {

View File

@ -6,7 +6,7 @@
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* *
@ -1718,9 +1718,11 @@ else
{ {
$tmpaction='activateline'; $tmpaction='activateline';
if ($objp->statut == 4) $tmpaction='unactivateline'; if ($objp->statut == 4) $tmpaction='unactivateline';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;ligne='.$object->lines[$cursorline-1]->id.'&amp;action='.$tmpaction.'">'; if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->unactiver)) {
print img_edit(); print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;ligne=' . $object->lines[$cursorline - 1]->id . '&amp;action=' . $tmpaction . '">';
print '</a>'; print img_edit();
print '</a>';
}
} }
} }
print '</td>'; print '</td>';

View File

@ -175,7 +175,7 @@ class modECM extends DolibarrModules
'langs'=>'ecm', 'langs'=>'ecm',
'position'=>103, 'position'=>103,
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++; $r++;

View File

@ -30,6 +30,7 @@ $langs->load("sendings");
$langs->load("deliveries"); $langs->load("deliveries");
$langs->load('companies'); $langs->load('companies');
$socid=GETPOST('socid','int');
// Security check // Security check
$expeditionid = GETPOST('id','int'); $expeditionid = GETPOST('id','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;

View File

@ -1735,7 +1735,7 @@ class Product extends CommonObject
$sql.= " price_base_type, tva_tx, tosell, price_by_qty, rowid"; $sql.= " price_base_type, tva_tx, tosell, price_by_qty, rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."product_price"; $sql.= " FROM ".MAIN_DB_PREFIX."product_price";
$sql.= " WHERE fk_product = '".$this->id."'"; $sql.= " WHERE fk_product = '".$this->id."'";
$sql.= " ORDER BY date_price, rowid DESC"; $sql.= " ORDER BY date_price DESC, rowid DESC";
$sql.= " LIMIT 1"; $sql.= " LIMIT 1";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)