From fc706aec4d5bf279a00e7c72db3a580829fae7b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Mar 2008 18:39:07 +0000 Subject: [PATCH] Minor changes --- htdocs/client.class.php | 5 +---- htdocs/lib/menubase.class.php | 19 ++++++++++--------- htdocs/menu.class.php | 7 ++----- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/htdocs/client.class.php b/htdocs/client.class.php index 95ccb3cd814..35972fe6ef0 100644 --- a/htdocs/client.class.php +++ b/htdocs/client.class.php @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/client.class.php \ingroup societe \brief Fichier de la classe des clients - \version $Revision$ + \version $Id$ */ diff --git a/htdocs/lib/menubase.class.php b/htdocs/lib/menubase.class.php index d8d42e92908..c83682b6d46 100644 --- a/htdocs/lib/menubase.class.php +++ b/htdocs/lib/menubase.class.php @@ -91,7 +91,8 @@ class Menubase $this->leftmenu=trim($this->leftmenu); $this->perms=trim($this->perms); $this->user=trim($this->user); - + if (! $this->level) $this->level=0; + // Check parameters // Put here code to add control on parameters values @@ -128,7 +129,7 @@ class Menubase $sql.= " '".$this->user."'"; $sql.= ")"; - dolibarr_syslog("Menu::create sql=".$sql, LOG_DEBUG); + dolibarr_syslog("Menubase::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -139,7 +140,7 @@ class Menubase else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menu::create ".$this->error, LOG_ERR); + dolibarr_syslog("Menubase::create ".$this->error, LOG_ERR); return -1; } } @@ -192,12 +193,12 @@ class Menubase $sql.= " user='".$this->user."'"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Menu::update sql=".$sql, LOG_DEBUG); + dolibarr_syslog("Menubase::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menu::update ".$this->error, LOG_ERR); + dolibarr_syslog("Menubase::update ".$this->error, LOG_ERR); return -1; } @@ -235,7 +236,7 @@ class Menubase $sql.= " FROM ".MAIN_DB_PREFIX."menu as t"; $sql.= " WHERE t.rowid = ".$id; - dolibarr_syslog("Menu::fetch sql=".$sql, LOG_DEBUG); + dolibarr_syslog("Menubase::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -268,7 +269,7 @@ class Menubase else { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menu::fetch ".$this->error, LOG_ERR); + dolibarr_syslog("Menubase::fetch ".$this->error, LOG_ERR); return -1; } } @@ -286,12 +287,12 @@ class Menubase $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu"; $sql.= " WHERE rowid=".$this->id; - dolibarr_syslog("Menu::delete sql=".$sql); + dolibarr_syslog("Menubase::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dolibarr_syslog("Menu::delete ".$this->error, LOG_ERR); + dolibarr_syslog("Menubase::delete ".$this->error, LOG_ERR); return -1; } diff --git a/htdocs/menu.class.php b/htdocs/menu.class.php index 1ae7926e1fd..a4d2adb6b10 100644 --- a/htdocs/menu.class.php +++ b/htdocs/menu.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur + * Copyright (C) 2005-2008 Laurent Destailleur * * 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 @@ -15,15 +15,12 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/menu.class.php \brief Fichier de la classe de gestion du menu gauche - \version $Revision$ + \version $Id$ */