Fix: strict mode mother
This commit is contained in:
parent
5e583b65f2
commit
474b68b3e4
@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.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
|
||||
* the Free Software Foundation; either version 2 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.
|
||||
*
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file holiday.class.php
|
||||
@ -1182,12 +1183,12 @@ class Holiday extends CommonObject
|
||||
// On séléctionne les utilisateurs qui ne sont pas déjà dans le module
|
||||
$sql = "SELECT u.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as u";
|
||||
$sql.= " WHERE u.fk_user NOT IN(".$listUsersDolibarr.")";
|
||||
$sql.= " WHERE u.fk_user NOT IN (".$listUsersDolibarr.")";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
// Si pas d'erreur SQL
|
||||
if($result) {
|
||||
if ($resql) {
|
||||
|
||||
$i = 0;
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
@ -43,14 +43,14 @@ if (empty($conf->holiday->enabled))
|
||||
}
|
||||
|
||||
|
||||
$verifConf.= "SELECT value";
|
||||
$verifConf.= " FROM ".MAIN_DB_PREFIX."holiday_config";
|
||||
$verifConf.= " WHERE name = 'userGroup'";
|
||||
$sql = "SELECT value";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
|
||||
$sql.= " WHERE name = 'userGroup'";
|
||||
|
||||
$result = $db->query($verifConf);
|
||||
$result = $db->query($sql);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if($obj->value == NULL)
|
||||
if ($obj->value == NULL)
|
||||
{
|
||||
llxHeader('',$langs->trans('CPTitreMenu'));
|
||||
print '<div class="tabBar">';
|
||||
|
||||
@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.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
|
||||
* the Free Software Foundation; either version 2 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.
|
||||
*
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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 2 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file fiche.php
|
||||
@ -33,14 +34,14 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Get parameters
|
||||
$myparam = GETPOST("myparam");
|
||||
$action=GETPOST('action');
|
||||
$id=GETPOST('id');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$id=GETPOST('id', 'int');
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
|
||||
$user_id = $user->id;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
@ -50,7 +51,6 @@ $user_id = $user->id;
|
||||
// Si création de la demande
|
||||
if ($action == 'create')
|
||||
{
|
||||
|
||||
// Si pas le droit de créer une demande
|
||||
if(!$user->rights->holiday->write)
|
||||
{
|
||||
@ -290,7 +290,6 @@ if ($action == 'confirm_send')
|
||||
$delayForRequest = $cp->getConfCP('delayForRequest');
|
||||
//$delayForRequest = $delayForRequest * (60*60*24);
|
||||
|
||||
$now=dol_now();
|
||||
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
|
||||
|
||||
// Si l'option pour avertir le valideur en cas de délai trop court
|
||||
@ -703,11 +702,11 @@ if (empty($id) || $action == 'add' || $action == 'request')
|
||||
// Liste des utiliseurs du groupes choisi dans la config
|
||||
$idGroupValid = $cp->getConfCP('userGroup');
|
||||
|
||||
$validator = new UserGroup($db,$idGroupValid);
|
||||
$validator = new UserGroup($db, $idGroupValid);
|
||||
$valideurarray = $validator->listUsersForGroup();
|
||||
|
||||
print '<td>';
|
||||
print $html->select_dolusers($valideur,"valideur",1,"",0,$valideurarray,'');
|
||||
print $html->select_dolusers($validator->id, "valideur", 1, "", 0, $valideurarray);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -71,6 +71,7 @@ $search_statut = GETPOST('select_statut');
|
||||
|
||||
$max_year = 5;
|
||||
$min_year = 10;
|
||||
$filter='';
|
||||
|
||||
llxHeader(array(),$langs->trans('CPTitreMenu'));
|
||||
|
||||
@ -185,7 +186,7 @@ if($holiday_payes == '-1')
|
||||
$var=true; $num = count($holiday->holiday);
|
||||
$html = new Form($db);
|
||||
$htmlother = new FormOther($db);
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num,$nbtotalofrecords);
|
||||
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, "", $num);
|
||||
|
||||
print '<div class="tabBar">';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user