Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0

This commit is contained in:
Laurent Destailleur
2017-05-24 13:46:03 +02:00
4 changed files with 49 additions and 50 deletions

View File

@@ -251,7 +251,7 @@ $cleanparam='';
$i=0; $i=0;
foreach($property as $key => $prop) foreach($property as $key => $prop)
{ {
$i++;
$addfield=1; $addfield=1;
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $addfield=0; if ($prop['extra'] == 'auto_increment') $addfield=0;
@@ -263,6 +263,7 @@ foreach($property as $key => $prop)
$varprop.="';"; $varprop.="';";
$varprop.="\n"; $varprop.="\n";
} }
$i++;
} }
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent); $targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent); $targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);

View File

@@ -3806,12 +3806,12 @@ else if ($id > 0 || ! empty($ref))
if ($object->situation_cycle_ref && $object->statut == 0) { if ($object->situation_cycle_ref && $object->statut == 0) {
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<form name="updatealllines" id="updatealllines" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '"#updatealllines" method="POST">'; print '<form name="updatealllines" id="updatealllines" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '#updatealllines" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
print '<input type="hidden" name="action" value="updatealllines" />'; print '<input type="hidden" name="action" value="updatealllines" />';
print '<input type="hidden" name="id" value="' . $object->id . '" />'; print '<input type="hidden" name="id" value="' . $object->id . '" />';
print '<table id="tablelines" class="noborder noshadow" width="100%">'; print '<table id="tablelines_all_progress" class="noborder noshadow" width="100%">';
print '<tr class="liste_titre nodrag nodrop">'; print '<tr class="liste_titre nodrag nodrop">';
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {

View File

@@ -1055,8 +1055,6 @@ class Form
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$events = null;
if ($conf->use_javascript_ajax && ! $forcecombo) if ($conf->use_javascript_ajax && ! $forcecombo)
{ {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';

View File

@@ -1001,7 +1001,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
if (get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; if (get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
if (get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; if (get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
if (get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; if (get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o";
$sql.= " WHERE u.rowid = a.fk_user_author"; $sql.= " WHERE u.rowid = a.fk_user_action";
$sql.= " AND a.entity IN (".getEntity('agenda', 1).")"; $sql.= " AND a.entity IN (".getEntity('agenda', 1).")";
if (get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id; if (get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
if (get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id; if (get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id;