diff --git a/build/debian/README.howto b/build/debian/README.howto index 7108f0a381f..d3d74693d55 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -65,6 +65,7 @@ END # dpkg-reconfigure -plow package Reconfigure package # dpkg -L packagename List content of installed package # dpkg -r packagename Remove config files and interactive saved answers +# dpkg -s packagename Give status of installed package # dpkg --purge Remove config files and interactive saved answers # # dpkg-buildpackage -us -uc Build a source and binary package @@ -108,7 +109,7 @@ Puis pour se connecter Pour tester un package > cp *.deb /srv/chroot/unstable/tmp -> schroot -c name_of_chroot +> sudo schroot -c name_of_chroot > dpkg -i dolibarr*.deb > sudo apt-get install -f @@ -212,6 +213,8 @@ Warning: Name and email must match value into debian/control file (Entry added h Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file Note: Package is built into directory ../build-area +* Test package (see dedicated chapter to test it with debian unstable env) + * If package .deb is ok: Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit > git-buildpackage --git-tag-only --git-retag diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f8949593e43..37dd19ffe04 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3659,18 +3659,19 @@ class Form * @param string $prefix prefix * @param int $iSecond Default preselected duration (number of seconds) * @param int $disabled Disable the combo box - * @param string $typehour if select then hour in select if text input in text + * @param string $typehour if 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo * @return void */ function select_duration($prefix,$iSecond='',$disabled=0,$typehour='select') { global $langs; + $hourSelected=0; $minSelected=0; if ($iSecond) { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - $hourSelected = convertSecondToTime($iSecond,'hour'); + $hourSelected = convertSecondToTime($iSecond,'allhour'); $minSelected = convertSecondToTime($iSecond,'min'); } @@ -3690,8 +3691,7 @@ class Form } elseif ($typehour=='text') { - $fullhours=convertSecondToTime($iSecond,'fullhour'); - print ''; + print ''; } print $langs->trans('Hours'). " "; print ''; print $s; print ''; diff --git a/htdocs/core/modules/syslog/mod_syslog_chromephp.php b/htdocs/core/modules/syslog/mod_syslog_chromephp.php index 0d838959166..e8291a2daf3 100644 --- a/htdocs/core/modules/syslog/mod_syslog_chromephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_chromephp.php @@ -117,6 +117,10 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_CHROMEPHP)) return; // Global option to disable output of this handler + //We check the configuration to avoid showing PHP warnings if (count($this->checkConfiguration())) return false; diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index 3a03d20ed00..ddb30df4e45 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -116,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface { global $conf, $dolibarr_main_prod; + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_FILE)) return; // Global option to disable output of this handler + $logfile = $this->getFilename($suffixinfilename); if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+'); diff --git a/htdocs/core/modules/syslog/mod_syslog_firephp.php b/htdocs/core/modules/syslog/mod_syslog_firephp.php index 311c43ca207..4a95a89862f 100644 --- a/htdocs/core/modules/syslog/mod_syslog_firephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_firephp.php @@ -115,6 +115,10 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_FIREPHP)) return; // Global option to disable output of this handler + //We check the configuration to avoid showing PHP warnings if (count($this->checkConfiguration())) return false; diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index 09353dc5119..9b0d854e2e8 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -108,6 +108,10 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG)) return; // Global option to disable output of this handler + if (defined("SYSLOG_FACILITY") && constant("SYSLOG_FACILITY")) { if (constant(constant('SYSLOG_FACILITY'))) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 3adf33cfd6f..ba0b6b6dcd2 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -45,6 +45,8 @@ MyActivities=My tasks/activities MyProjects=My projects DurationEffective=Effective duration Progress=Progress +ProgressDeclared=Declared progress +ProgressCalculated=Calculated progress Time=Time ListProposalsAssociatedProject=List of the commercial proposals associated with the project ListOrdersAssociatedProject=List of customer's orders associated with the project diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 9cb5875708a..1f352d98c6f 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -45,6 +45,8 @@ MyActivities=Mes tâches/activités MyProjects=Mes projets DurationEffective=Durée effective Progress=Progression +ProgressDeclared=Progression déclarée +ProgressCalculated=Progression calculée Time=Temps ListProposalsAssociatedProject=Liste des propositions commerciales associées au projet ListOrdersAssociatedProject=Liste des commandes clients associées au projet diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 60a85d4b626..c45248db741 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1,21 +1,21 @@ - * Copyright (C) 2004-2012 Laurent Destailleur -* Copyright (C) 2005-2012 Regis Houssin -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/projet/tasks.php @@ -57,7 +57,7 @@ if ($ref) if (!empty($id)) { $extralabels_projet=$extrafields_project->fetch_name_optionals_label($object->table_element); $extralabels_task=$extrafields_task->fetch_name_optionals_label($taskstatic->table_element); - + } // Security check @@ -71,7 +71,7 @@ $hookmanager->initHooks(array('projecttaskcard')); $progress=GETPOST('progress', 'int'); $label=GETPOST('label', 'alpha'); $description=GETPOST('description'); -$planned_workload=GETPOST('planned_workloadhour'); +$planned_workload=GETPOST('planned_workloadhour')*3600+GETPOST('planned_workloadmin')*60; $userAccess=0; @@ -117,13 +117,13 @@ if ($action == 'createtask' && $user->rights->projet->creer) $task->ref = GETPOST('ref','alpha'); $task->label = $label; $task->description = $description; - $task->planned_workload = $planned_workload * 3600;//We set the planned workload into seconds + $task->planned_workload = $planned_workload; $task->fk_task_parent = $task_parent; $task->date_c = dol_now(); $task->date_start = $date_start; $task->date_end = $date_end; $task->progress = $progress; - + // Fill array 'array_options' with data from add form $ret = $extrafields_task->setOptionalsFromPost($extralabels_task,$task); @@ -241,7 +241,7 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("DateEnd").''; print dol_print_date($object->date_end,'day'); print ''; - + // Other options $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook @@ -268,7 +268,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->socie print ''; print ''; print ''; - + if (! empty($object->id)) print ''; if (! empty($mode)) print ''; @@ -282,9 +282,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->socie $modTask = new $obj; $defaultref = $modTask->getNextValue($soc,$object); } - + if (is_numeric($defaultref) && $defaultref <= 0) $defaultref=''; - + // Ref print ''; print ''.$langs->trans("Ref").''.($_POST["ref"]?$_POST["ref"]:$defaultref).''; @@ -417,8 +417,9 @@ else print ''.$langs->trans("DateStart").''; print ''.$langs->trans("DateEnd").''; print ''.$langs->trans("PlannedWorkload").''; - print ''.$langs->trans("Progress").''; + print ''.$langs->trans("ProgressDeclared").''; print ''.$langs->trans("TimeSpent").''; + print ''.$langs->trans("ProgressCalculated").''; print ' '; print "\n"; if (count($tasksarray) > 0) diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index cabcea2c48c..077a56c1976 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -100,16 +100,20 @@ print ''.$langs->trans("RefTask").''; print ''.$langs->trans("LabelTask").''; print ''.$langs->trans("DateStart").''; print ''.$langs->trans("DateEnd").''; -print ''.$langs->trans("PlannedWorkload").''; -print ''.$langs->trans("Progress").''; +print ''.$langs->trans("PlannedWorkload"); +// TODO Replace 86400 and 7 to take account working hours per day and working day per weeks +//print '
('.$langs->trans("DelayWorkHour").')'; +print ''; +print ''.$langs->trans("ProgressDeclared").''; print ''.$langs->trans("TimeSpent").''; +print ''.$langs->trans("ProgressCalculated").''; print "\n"; print ''; print ''; print ''; print ''; -print ''; +print ''; print ' '; print ''; print ''; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 7e46e1c169c..5e2f20729cc 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -1,21 +1,21 @@ - * Copyright (C) 2006-2012 Laurent Destailleur -* Copyright (C) 2010-2012 Regis Houssin -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/projet/tasks/task.php @@ -46,7 +46,7 @@ $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); $withproject=GETPOST('withproject','int'); $project_ref=GETPOST('project_ref','alpha'); -$planned_workload=GETPOST('planned_workloadhour'); +$planned_workload=GETPOST('planned_workloadhour')*3600+GETPOST('planned_workloadmin')*60; // Security check $socid=0; @@ -86,7 +86,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer) $object->label = $_POST["label"]; $object->description = $_POST['description']; $object->fk_task_parent = $task_parent; - $object->planned_workload = $planned_workload*3600; //We set the planned workload into seconds + $object->planned_workload = $planned_workload; $object->date_start = dol_mktime(0,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']); $object->date_end = dol_mktime(0,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']); $object->progress = $_POST['progress']; @@ -147,7 +147,7 @@ if (! empty($project_ref) && ! empty($withproject)) if ($action == 'builddoc' && $user->rights->projet->creer) { $object->fetch($id,$ref); - + // Save last template used to generate document if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha')); @@ -334,7 +334,7 @@ if ($id > 0 || ! empty($ref)) print $form->select_date($object->date_end?$object->date_end:-1,'datee'); print ''; - // workload planned + // Planned workload print ''.$langs->trans("PlannedWorkload").''; print $form->select_duration('planned_workload',$object->planned_workload,0,'text'); print ''; @@ -423,9 +423,9 @@ if ($id > 0 || ! empty($ref)) print dol_print_date($object->date_end,'day'); print ''; - // planned Workload + // Planned workload print ''.$langs->trans("PlannedWorkload").''; - print convertSecondToTime($object->planned_workload,'all'); + print convertSecondToTime($object->planned_workload,'allhourmin'); print ''; // Progress @@ -445,7 +445,7 @@ if ($id > 0 || ! empty($ref)) { print $object->showOptionals($extrafields); } - + print ''; } @@ -481,10 +481,10 @@ if ($id > 0 || ! empty($ref)) } print ''; - + print '
'; print ''; // ancre - + /* * Documents generes */ @@ -493,13 +493,13 @@ if ($id > 0 || ! empty($ref)) $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed=($user->rights->projet->lire); $delallowed=($user->rights->projet->creer); - + $var=true; - + $somethingshown=$formfile->show_documents('project_task',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf); - - - + + + print '
'; } } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 919f88135b2..f6532e09d31 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1,28 +1,28 @@ - * Copyright (C) 2006-2012 Laurent Destailleur -* Copyright (C) 2010-2012 Regis Houssin -* Copyright (C) 2011 Juanjo Menent -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/projet/tasks/time.php * \ingroup project * \brief Page to add new time spent on a task -*/ + */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -210,8 +210,10 @@ if ($id > 0 || ! empty($ref)) print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1'); print ''; + // Label print ''.$langs->trans("Label").''.$projectstatic->title.''; + // Thirdparty print ''.$langs->trans("Company").''; if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); else print ' '; @@ -265,8 +267,8 @@ if ($id > 0 || ! empty($ref)) // Label print ''.$langs->trans("Label").''.$object->label.''; - // planned workload - print ''.$langs->trans("PlannedWorkload").''.convertSecondToTime($object->planned_workload,'all').''; + // Planned workload + print ''.$langs->trans("PlannedWorkload").''.convertSecondToTime($object->planned_workload,'allhourmin').''; // Project if (empty($withproject)) @@ -443,7 +445,7 @@ if ($id > 0 || ! empty($ref)) } else { - print convertSecondToTime($task_time->task_duration,'all'); + print convertSecondToTime($task_time->task_duration,'allhourmin'); } print ''; @@ -474,7 +476,7 @@ if ($id > 0 || ! empty($ref)) $total += $task_time->task_duration; } print ''.$langs->trans("Total").''; - print ''.convertSecondToTime($total).' '; + print ''.convertSecondToTime($total,'allhourmin').' '; print ''; print "";