diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index dfd3f3f36c1..a12d1cc3ed4 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -414,24 +414,26 @@ class PrestaShopWebservice * } * ?> * - * @param array $options Array representing resource to delete. + * + * @param array $options Array representing resource to delete. + * @return boolean True */ public function delete($options) { if (isset($options['url'])) $url = $options['url']; - elseif (isset($options['resource']) && isset($options['id'])) - if (is_array($options['id'])) - $url = $this->url.'/api/'.$options['resource'].'/?id=['.implode(',', $options['id']).']'; - else - $url = $this->url.'/api/'.$options['resource'].'/'.$options['id']; - if (isset($options['id_shop'])) - $url .= '&id_shop='.$options['id_shop']; - if (isset($options['id_group_shop'])) - $url .= '&id_group_shop='.$options['id_group_shop']; - $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE')); - self::checkStatusCode($request['status_code']);// check the response validity - return true; + elseif (isset($options['resource']) && isset($options['id'])) + if (is_array($options['id'])) + $url = $this->url.'/api/'.$options['resource'].'/?id=['.implode(',', $options['id']).']'; + else + $url = $this->url.'/api/'.$options['resource'].'/'.$options['id']; + if (isset($options['id_shop'])) + $url .= '&id_shop='.$options['id_shop']; + if (isset($options['id_group_shop'])) + $url .= '&id_group_shop='.$options['id_group_shop']; + $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE')); + self::checkStatusCode($request['status_code']);// check the response validity + return true; } } diff --git a/htdocs/core/actions_changeselectedfields.inc.php b/htdocs/core/actions_changeselectedfields.inc.php index 6f2d863e143..1e001e4a7b7 100644 --- a/htdocs/core/actions_changeselectedfields.inc.php +++ b/htdocs/core/actions_changeselectedfields.inc.php @@ -28,7 +28,7 @@ // $object must be defined (object is loaded in this file with fetch) // Save selection -if (GETPOST('formfilteraction','none') == 'listafterchangingselectedfields') +if (GETPOST('formfilteraction', 'none') == 'listafterchangingselectedfields') { $tabparam=array(); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 23a5a6e2e7a..cd677e7b8e0 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -921,7 +921,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec * @param array $extralabels Array of additional column * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0, $arrayfields=array(), $extrafields='', $extralabels=array()) +function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = '', $extralabels = array()) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1301,7 +1301,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr * @param array $extralabels Array of additional column * @return array Array with time spent for $fuser for each day of week on tasks in $lines and substasks */ -function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $arrayfields=array(), $extrafields='', $extralabels=array()) +function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $arrayfields = array(), $extrafields = '', $extralabels = array()) { global $conf, $db, $user, $bc, $langs; global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic; @@ -1479,7 +1479,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ if (! empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { print ''; - if ($oldprojectforbreak == -1) print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + if ($oldprojectforbreak == -1) print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); print ""; } diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 0d073dca768..8a11a6c87b4 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -354,4 +354,4 @@ class modMyModule extends DolibarrModules $sql = array(); return $this->_remove($sql, $options); } -} \ No newline at end of file +} diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 4f86613f556..3f059cd8694 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -605,7 +605,7 @@ if (! empty($arrayfields['t.progress']['checked'])) if ($usertoprocess->id == $user->id) print ''.$langs->trans("TimeSpentByYou").''; else print ''.$langs->trans("TimeSpentByUser").'';*/ print ''.$langs->trans("TimeSpent").'
('.$langs->trans("Everybody").')'; -print ''.$langs->trans("TimeSpent").($usertoprocess->firstname?'
('.dol_trunc($usertoprocess->firstname,10).')':'').''; +print ''.$langs->trans("TimeSpent").($usertoprocess->firstname?'
('.dol_trunc($usertoprocess->firstname, 10).')':'').''; print ''.$langs->trans("HourStart").''; // By default, we can edit only tasks we are assigned to diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 8ad21746a68..ba3f6a5b608 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -657,7 +657,7 @@ if (! empty($arrayfields['t.progress']['checked'])) if ($usertoprocess->id == $user->id) print ''.$langs->trans("TimeSpentByYou").''; else print ''.$langs->trans("TimeSpentByUser").'';*/ print ''.$langs->trans("TimeSpent").'
('.$langs->trans("Everybody").')'; -print ''.$langs->trans("TimeSpent").($usertoprocess->firstname?'
('.dol_trunc($usertoprocess->firstname,10).')':'').''; +print ''.$langs->trans("TimeSpent").($usertoprocess->firstname?'
('.dol_trunc($usertoprocess->firstname, 10).')':'').''; for ($idw=0; $idw<7; $idw++) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 73d3603ea25..8c12131ce50 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -729,11 +729,11 @@ class Task extends CommonObject * @param string $morewherefilter Add more filter into where SQL request (must start with ' AND ...') * @param string $filteronprojuser Filter on user that is a contact of project * @param string $filterontaskuser Filter on user assigned to task - * @param array $extrafields Show additional column from project or task - * @param int $includebilltime Calculate also the time to bill and billed + * @param array $extrafields Show additional column from project or task + * @param int $includebilltime Calculate also the time to bill and billed * @return array Array of tasks */ - public function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0, $extrafields=array(), $includebilltime = 0) + public function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0, $extrafields = array(), $includebilltime = 0) { global $conf;