Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.5' into 3.5_backported
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 2, 2014
2 parents 355bf1d + 1f0653d commit 286e89e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Expand Up @@ -20,9 +20,10 @@ Fix: Update impayees.php
Fix: Link product, In list view and label product.
Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
Fix: When disabled, all fields to add time into task line must be disabled.
Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive.
Fix: Missing include files.lib.php in some pages to use dol_delete_recursive.
Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref.
Fix: [ bug #1553 ] Saving User displays setup removes menu.
Fix: [ bug #1544 ] Can remove date from invoice

***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.
Expand Down
2 changes: 1 addition & 1 deletion htdocs/categories/fiche.php
Expand Up @@ -132,7 +132,7 @@
// Create category in database
if (! $error)
{
$result = $object->create();
$result = $object->create($user);
if ($result > 0)
{
$action = 'confirmed';
Expand Down
10 changes: 9 additions & 1 deletion htdocs/compta/facture.php
Expand Up @@ -286,7 +286,15 @@
{
$object->fetch($id);
$old_date_lim_reglement=$object->date_lim_reglement;
$object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
$date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
if (empty($date))
{
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate');
exit;

}
$object->date=$date;
$new_date_lim_reglement=$object->calculate_date_lim_reglement();
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement=$new_date_lim_reglement;
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
Expand Down
18 changes: 9 additions & 9 deletions htdocs/core/class/html.formfile.class.php
@@ -1,10 +1,10 @@
<?php
/* Copyright (c) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (c) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (c) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (c) 2014 Marcos García <marcosgdf@gmail.com>
/* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -268,7 +268,7 @@ function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed
if (! empty($iconPDF)) {
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
}
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
$printer = (!empty($user->rights->printipp->read) && !empty($conf->printipp->enabled))?true:false;
$hookmanager->initHooks(array('formfile'));
$forname='builddoc';
$out='';
Expand Down Expand Up @@ -513,11 +513,11 @@ function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed
$out.= $genbutton;
$out.= '</th>';

if($hookmanager->hooks['formfile'])
if (!empty($hookmanager->hooks['formfile']))
{
foreach($hookmanager->hooks['formfile'] as $module)
{
if(method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
if (method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
}
}
$out.= '</tr>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -1176,7 +1176,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu);

// We update newmenu for special dynamic menus
if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account
{
$sql = "SELECT rowid, label, courant, rappro, courant";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
Expand Down Expand Up @@ -1206,7 +1206,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
else dol_print_error($db);
$db->free($resql);
}
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP
if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP
{
$MAXFTP=20;
$i=1;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/tpl/document_actions_pre_headers.tpl.php
Expand Up @@ -74,7 +74,7 @@
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
}
}
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.($withproject?'&withproject=1':''));
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.(!empty($withproject)?'&withproject=1':''));
exit;
}
}
Expand Down
Expand Up @@ -131,7 +131,7 @@ function run_trigger($action,$object,$user,$langs,$conf)
$object->actiontypecode='AC_OTH_AUTO';
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("NewCompanyToDolibarr",$object->nom);
$object->actionmsg=$langs->transnoentities("NewCompanyToDolibarr",$object->nom);
if ($object->prefix) $object->actionmsg.=" (".$object->prefix.")";
if (! empty($object->prefix)) $object->actionmsg.=" (".$object->prefix.")";
//$this->desc.="\n".$langs->transnoentities("Customer").': '.yn($object->client);
//$this->desc.="\n".$langs->transnoentities("Supplier").': '.yn($object->fournisseur);
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fichinter/class/fichinter.class.php
Expand Up @@ -235,7 +235,7 @@ function update($user, $notrigger=0)
$this->db->begin();

$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
$sql.= ", description = '".$this->db->escape($this->description)."'";
$sql.= "description = '".$this->db->escape($this->description)."'";
$sql.= ", duree = ".$this->duree;
$sql.= ", fk_projet = ".$this->fk_project;
$sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
Expand Down

0 comments on commit 286e89e

Please sign in to comment.