Fix: Doxygen documentation

Removed deprecated files
This commit is contained in:
Laurent Destailleur
2010-07-21 11:21:37 +00:00
parent 4a01bd5188
commit d46ed0c984
11 changed files with 179 additions and 328 deletions

View File

@@ -13,21 +13,21 @@ $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
$OPTIONS=""; $OPTIONS="";
#$OPTIONS="-d Preprocessor"; #$OPTIONS="-d Preprocessor";
$CONFFILE="doxygen/dolibarr-doxygen.doxyfile"; $CONFFILE="dolibarr-doxygen.doxyfile";
use Cwd; use Cwd;
my $dir = getcwd; my $dir = getcwd;
print "Current dir is: $dir\n"; print "Current dir is: $dir\n";
print "Running dir for doxygen must be: $DIR\n"; print "Running dir for doxygen must be: $DIR/doxygen\n";
if (! -s $CONFFILE) if (! -s $CONFFILE)
{ {
print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n"; print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n";
print "\n"; print "\n";
print "Change your current directory then, to launch the script, run:\n"; print "Change your current directory then, to launch the script, run:\n";
print '> perl dolibarr-doxygen-build.pl (on Windows)'."\n"; print '> perl ..\dolibarr-doxygen-build.pl (on Windows)'."\n";
print '> perl dolibarr-doxygen-build.pl (on Linux or BSD)'."\n"; print '> perl ../dolibarr-doxygen-build.pl (on Linux or BSD)'."\n";
sleep 4; sleep 4;
exit 1; exit 1;
} }

View File

@@ -38,7 +38,7 @@ PROJECT_NUMBER = 2.9.0
# If a relative path is entered, it will be relative to the location # If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used. # where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = ../build OUTPUT_DIRECTORY = ../../build
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output # 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -450,7 +450,7 @@ SHOW_NAMESPACES = NO
# is used as the file version. See the manual for examples. # is used as the file version. See the manual for examples.
#FILE_VERSION_FILTER = dolibarr-doxygen-getversion.pl #FILE_VERSION_FILTER = dolibarr-doxygen-getversion.pl
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@@ -513,7 +513,7 @@ WARN_LOGFILE = doxygen_warnings.log
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = ../htdocs ../scripts INPUT = ../../htdocs ../../scripts
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -521,8 +521,7 @@ INPUT = ../htdocs ../scripts
# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
# the list of possible encodings. # the list of possible encodings.
#INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
INPUT_ENCODING = ISO-8859-1
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -543,7 +542,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a # excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag. # subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../mssql ../mysql ../pgsql ../CVS ../build ../dev ../doc ../documents ../htdocs/conf/conf.php ../htdocs/includes/adodbtime ../htdocs/includes/artichow ../htdocs/includes/efc_xfss ../htdocs/includes/barcode ../htdocs/includes/fckeditor ../htdocs/includes/fpdf ../htdocs/includes/geoip ../htdocs/includes/magpierss ../htdocs/includes/nusoap ../htdocs/includes/odtphp ../htdocs/includes/pear ../htdocs/includes/php_excelreader ../htdocs/includes/php_writeexcel ../htdocs/includes/phplot ../htdocs/includes/phplot5 ../htdocs/includes/pwc ../htdocs/includes/scriptaculous ../htdocs/includes/simplemail ../htdocs/includes/smarty ../htdocs/includes/smtps ../htdocs/includes/vcard ../htdocs/avoir ../htdocs/document ../htdocs/documents ../htdocs/lolix ../htdocs/postnuke ../htdocs/rapport ../htdocs/telephonie ../htdocs/voyage ../htdocs/oscommerce_ws/ws_client_demo ../htdocs/oscommerce_ws/ws_server ../scripts/addons ../scripts/courrier ../scripts/lolix ../scripts/energie EXCLUDE = ../../mssql ../../mysql ../../pgsql ../../CVS ../../build ../../dev ../../doc ../../documents ../../htdocs/conf/conf.php ../../htdocs/includes/adodbtime ../../htdocs/includes/artichow ../../htdocs/includes/efc_xfss ../../htdocs/includes/barcode ../../htdocs/includes/fckeditor ../../htdocs/includes/fpdf ../../htdocs/includes/geoip ../../htdocs/includes/magpierss ../../htdocs/includes/nusoap ../../htdocs/includes/odtphp ../../htdocs/includes/pear ../../htdocs/includes/php_excelreader ../../htdocs/includes/php_writeexcel ../../htdocs/includes/phplot ../../htdocs/includes/phplot5 ../../htdocs/includes/pwc ../../htdocs/includes/scriptaculous ../../htdocs/includes/simplemail ../../htdocs/includes/smarty ../../htdocs/includes/smtps ../../htdocs/includes/vcard ../../htdocs/avoir ../../htdocs/document ../../htdocs/documents ../../htdocs/lolix ../../htdocs/postnuke ../../htdocs/rapport ../../htdocs/telephonie ../../htdocs/voyage ../../htdocs/oscommerce_ws/ws_client_demo ../../htdocs/oscommerce_ws/ws_server ../../scripts/addons ../../scripts/courrier ../../scripts/lolix ../../scripts/energie
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
@@ -571,7 +570,7 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see # directories that contain example code fragments that are included (see
# the \include command). # the \include command).
EXAMPLE_PATH = ../dev/skeletons EXAMPLE_PATH = ../../dev/skeletons
# If the value of the EXAMPLE_PATH tag contains directories, you can use the # If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -591,7 +590,7 @@ EXAMPLE_RECURSIVE = NO
# directories that contain image that are included in the documentation (see # directories that contain image that are included in the documentation (see
# the \image command). # the \image command).
IMAGE_PATH = ../doc/images IMAGE_PATH = ../../doc/images
# The INPUT_FILTER tag can be used to specify a program that doxygen should # The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program # invoke to filter for each input file. Doxygen will invoke the filter program
@@ -602,8 +601,8 @@ IMAGE_PATH = ../doc/images
# ignored. # ignored.
# Works on Linux only # Works on Linux only
#INPUT_FILTER = build/dolibarr-doxygen-filter.pl #INPUT_FILTER = ../dolibarr-doxygen-filter.pl
#INPUT_FILTER = "perl build/dolibarr-doxygen-filter.pl" #INPUT_FILTER = "perl ../dolibarr-doxygen-filter.pl"
INPUT_FILTER = INPUT_FILTER =
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern

View File

@@ -17,141 +17,142 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
class Auth {
protected $db; class Auth {
protected $login;
protected $passwd;
protected $reponse; protected $db;
protected $sqlQuery; protected $login;
protected $passwd;
public function __construct ($DB) { protected $reponse;
$this->db = $DB; protected $sqlQuery;
$this->reponse (null);
} public function __construct ($DB) {
public function login ($aLogin) { $this->db = $DB;
$this->reponse (null);
$this->login = $aLogin; }
} public function login ($aLogin) {
public function passwd ($aPasswd) { $this->login = $aLogin;
$this->passwd = $aPasswd; }
public function passwd ($aPasswd) {
$this->passwd = $aPasswd;
} }
public function reponse ($aReponse) { public function reponse ($aReponse) {
$this->reponse = $aReponse; $this->reponse = $aReponse;
} }
/** /**
* Authentification d'un demandeur * Authentification d'un demandeur
* @return (int) 0 = Ok; -1 = login incorrect; -2 = login ok, mais compte desactive; -10 = aucune entree trouvee dans la base * @return (int) 0 = Ok; -1 = login incorrect; -2 = login ok, mais compte desactive; -10 = aucune entree trouvee dans la base
*/ */
protected function verif_utilisateurs () { protected function verif_utilisateurs () {
global $conf; global $conf;
// Verification des informations dans la base // Verification des informations dans la base
$resql = $this->db->query ($this->sqlQuery); $resql = $this->db->query ($this->sqlQuery);
if ($resql) if ($resql)
{
$num = $this->db->num_rows ($resql);
if ( $num ) {
// fetchFirst
$ret=array();
$tab = $this->db->fetch_array($resql);
foreach ( $tab as $cle => $valeur )
{ {
$num = $this->db->num_rows ($resql); $ret[$cle] = $valeur;
}
$tab=$ret;
if ( $num ) { if ( ($tab['pass_crypted'] == md5 ($this->passwd)) || (($tab['pass'] == $this->passwd) && ($tab['pass'] != ''))) {
// fetchFirst // On verifie que le compte soit bien actif
$ret=array(); if ( $tab['statut'] ) {
$tab = $this->db->fetch_array($resql);
foreach ( $tab as $cle => $valeur )
{
$ret[$cle] = $valeur;
}
$tab=$ret;
if ( ($tab['pass_crypted'] == md5 ($this->passwd)) || (($tab['pass'] == $this->passwd) && ($tab['pass'] != ''))) { $this->reponse(0);
// On verifie que le compte soit bien actif
if ( $tab['statut'] ) {
$this->reponse(0);
} else {
$this->reponse(-2);
}
} else {
$this->reponse(-1);
}
} else { } else {
$this->reponse(-10); $this->reponse(-2);
} }
}
else } else {
{
$this->reponse(-1);
} }
} } else {
public function verif ($aLogin, $aPasswd) { $this->reponse(-10);
global $conf;
$this->login ($aLogin);
$this->passwd ($aPasswd);
$this->sqlQuery = "SELECT rowid, pass_crypted, statut";
$this->sqlQuery.= " FROM ".MAIN_DB_PREFIX."user";
$this->sqlQuery.= " WHERE login = '".$this->login."'";
$this->sqlQuery.= " AND entity IN (0,".$conf->entity.")";
$this->verif_utilisateurs();
switch ($this->reponse) {
default:
$ret = '-1';
break;
case 0:
$ret = '0';
break;
case -1:
$ret = '-1';
break;
case -2:
$ret = '-2';
break;
case -10:
$ret = '-10';
break;
} }
}
return $ret; else
{
} }
} }
public function verif ($aLogin, $aPasswd) {
global $conf;
$this->login ($aLogin);
$this->passwd ($aPasswd);
$this->sqlQuery = "SELECT rowid, pass_crypted, statut";
$this->sqlQuery.= " FROM ".MAIN_DB_PREFIX."user";
$this->sqlQuery.= " WHERE login = '".$this->login."'";
$this->sqlQuery.= " AND entity IN (0,".$conf->entity.")";
$this->verif_utilisateurs();
switch ($this->reponse) {
default:
$ret = '-1';
break;
case 0:
$ret = '0';
break;
case -1:
$ret = '-1';
break;
case -2:
$ret = '-2';
break;
case -10:
$ret = '-10';
break;
}
return $ret;
}
}
?> ?>

View File

@@ -1,112 +0,0 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008 Laurent Destailleur <eldy@uers.sourceforge.net>
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
require_once ('Sql.interface.php');
class Sql implements intSql {
/**
* Constructeur : initialise la connection <20> la base de donn<6E>es
* @param $aHost Domaine ou adresse IP du serveur de base de donn<6E>es (ex : localhost ou db.monsite.fr)
* @param $aUser Utilisateur de la base de donn<6E>es
* @param $aPass Mot de passe de l'utilisateur de la base de donn<6E>es
* @param $aBase Nom de la base de donn<6E>es <20> utiliser
*/
public function __construct ($aHost, $aUser, $aPass, $aBase) {
$db = mysql_connect ($aHost, $aUser, $aPass);
mysql_select_db ($aBase, $db);
}
/**
* Destructeur : ferme la connection <20> la base de donn<6E>es
*/
// D<>sactivation pour cause bug avec 1and1
// public function __destruct () {
//
// mysql_close ();
//
// }
/**
* Effectue une requete sur la base de donn<6E>es, et renvoi la ressource correspondante
* @param $aRequete Requete SQL (ex : SELECT nom, prenom FROM table1 WHERE id = 127)
* @return Ressource vers la requ<71>te venant d'<27>tre effectu<74>e
*/
public function query ($aRequete) {
dol_syslog("cashdesk query sql=".$aRequete, LOG_DEBUG);
return mysql_query($aRequete);
}
/**
* Renvoi le nombre de r<>sultats d'une requ<71>te
* @param $aRes Ressource d'une requ<71>te effectu<74>e pr<70>c<EFBFBD>demment
* @return Entier : nombre de r<>sultats de la requ<71>te
*/
public function num_rows ($aRes) {
return mysql_num_rows($aRes);
}
/**
* Enregistre tous les r<>sultats d'une requ<71>te dans un tableau <20> deux dimensions
* @param $aRes Ressource d'une requ<71>te effectu<74>e pr<70>c<EFBFBD>demment
* @return Tableau <20> deux dimensions : $tab[indice_resultat(integer)][indice_champ(integer) / nom_champ(string)]
*/
public function fetch_array ($aRes) {
$ret=array(); $i=0;
while ( $tab = mysql_fetch_array($aRes) )
{
foreach ( $tab as $cle => $valeur )
{
$ret[$i][$cle] = $valeur;
}
$i++;
}
return $ret;
}
/**
* Enregistre seulement le premier r<>sultat d'une requ<71>te dans un tableau <20> une dimension
* @param $aRes Ressource d'une requ<71>te effectu<74>e pr<70>c<EFBFBD>demment
* @return Tableau <20> une dimension : $tab[indice_champ(integer) / nom_champ(string)]
*/
public function fetchFirst ($aRes)
{
$ret=array();
$tab = mysql_fetch_array($aRes);
foreach ( $tab as $cle => $valeur )
{
$ret[$cle] = $valeur;
}
return $ret;
}
}
?>

View File

@@ -1,37 +0,0 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2009 Régis 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
interface intSql {
// Envoie une requete et retourne le pointeur vers le resultat
public function query ($aRequete);
// Renvoie le nombre de resultats contenus dans la ressource
public function num_rows ($aRes);
// Parcours tous les resultats de la ressource et les enregistre dans un tableau a 2 dimensions : $tab[ligne][nom_champ/indice]
public function fetch_array ($aRes);
// Enregistre seulement le premier resultat de la ressource dans un tableau a 1 dimension : $tab[nom_champ/indice]
public function fetchFirst ($aRes);
}
?>

View File

@@ -22,7 +22,7 @@
*/ */
/** /**
* \file htdocs/categories/categorie.class.php * \file htdocs/categories/class/categorie.class.php
* \ingroup categorie * \ingroup categorie
* \brief Fichier de la classe des categorie * \brief Fichier de la classe des categorie
* \version $Id$ * \version $Id$

View File

@@ -33,8 +33,8 @@
/** /**
* \class Bank_categ * \class BankCateg
* \brief Put here description of your class * \brief Class to manage bank categories
* \remarks Initialy built by build_class_from_table on 2009-01-02 15:26 * \remarks Initialy built by build_class_from_table on 2009-01-02 15:26
*/ */
class BankCateg // extends CommonObject class BankCateg // extends CommonObject
@@ -44,23 +44,23 @@ class BankCateg // extends CommonObject
var $errors=array(); //!< To return several error codes (or messages) var $errors=array(); //!< To return several error codes (or messages)
//var $element='bank_categ'; //!< Id that identify managed objects //var $element='bank_categ'; //!< Id that identify managed objects
//var $table_element='bank_categ'; //!< Name of table without prefix where object is stored //var $table_element='bank_categ'; //!< Name of table without prefix where object is stored
var $id; var $id;
var $label; var $label;
/** /**
* \brief Constructor * \brief Constructor
* \param DB Database handler * \param DB Database handler
*/ */
function BankCateg($DB) function BankCateg($DB)
{ {
$this->db = $DB; $this->db = $DB;
return 1; return 1;
} }
/** /**
* \brief Create in database * \brief Create in database
* \param user User that create * \param user User that create
@@ -71,13 +71,13 @@ class BankCateg // extends CommonObject
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
// Clean parameters // Clean parameters
if (isset($this->label)) $this->label=trim($this->label); if (isset($this->label)) $this->label=trim($this->label);
// Check parameters // Check parameters
// Put here code to add control on parameters values // Put here code to add control on parameters values
// Insert request // Insert request
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ ("; $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (";
$sql.= "label"; $sql.= "label";
@@ -86,22 +86,22 @@ class BankCateg // extends CommonObject
$sql.= " ".(! isset($this->label)?'NULL':"'".addslashes($this->label)."'").""; $sql.= " ".(! isset($this->label)?'NULL':"'".addslashes($this->label)."'")."";
$sql.= ", ".$conf->entity; $sql.= ", ".$conf->entity;
$sql.= ")"; $sql.= ")";
$this->db->begin(); $this->db->begin();
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) if (! $error)
{ {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_categ"); $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_categ");
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//// Call triggers //// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
//$interface=new Interfaces($this->db); //$interface=new Interfaces($this->db);
@@ -118,7 +118,7 @@ class BankCateg // extends CommonObject
{ {
dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg); $this->error.=($this->error?', '.$errmsg:$errmsg);
} }
$this->db->rollback(); $this->db->rollback();
return -1*$error; return -1*$error;
} }
@@ -129,7 +129,7 @@ class BankCateg // extends CommonObject
} }
} }
/** /**
* \brief Load object in memory from database * \brief Load object in memory from database
* \param id id object * \param id id object
@@ -138,14 +138,14 @@ class BankCateg // extends CommonObject
function fetch($id) function fetch($id)
{ {
global $langs,$conf; global $langs,$conf;
$sql = "SELECT"; $sql = "SELECT";
$sql.= " t.rowid,"; $sql.= " t.rowid,";
$sql.= " t.label"; $sql.= " t.label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ as t"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_categ as t";
$sql.= " WHERE t.rowid = ".$id; $sql.= " WHERE t.rowid = ".$id;
$sql.= " AND t.entity = ".$conf->entity; $sql.= " AND t.entity = ".$conf->entity;
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
@@ -153,12 +153,12 @@ class BankCateg // extends CommonObject
if ($this->db->num_rows($resql)) if ($this->db->num_rows($resql))
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->label = $obj->label; $this->label = $obj->label;
} }
$this->db->free($resql); $this->db->free($resql);
return 1; return 1;
} }
else else
@@ -168,7 +168,7 @@ class BankCateg // extends CommonObject
return -1; return -1;
} }
} }
/** /**
* \brief Update database * \brief Update database
@@ -180,32 +180,32 @@ class BankCateg // extends CommonObject
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
// Clean parameters // Clean parameters
if (isset($this->label)) $this->label=trim($this->label); if (isset($this->label)) $this->label=trim($this->label);
// Check parameters // Check parameters
// Put here code to add control on parameters values // Put here code to add control on parameters values
// Update request // Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."bank_categ SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."bank_categ SET";
$sql.= " label=".(isset($this->label)?"'".addslashes($this->label)."'":"null").""; $sql.= " label=".(isset($this->label)?"'".addslashes($this->label)."'":"null")."";
$sql.= " WHERE rowid=".$this->id; $sql.= " WHERE rowid=".$this->id;
$sql.= " AND entity = ".$conf->entity; $sql.= " AND entity = ".$conf->entity;
$this->db->begin(); $this->db->begin();
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) if (! $error)
{ {
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//// Call triggers //// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
//$interface=new Interfaces($this->db); //$interface=new Interfaces($this->db);
@@ -214,7 +214,7 @@ class BankCateg // extends CommonObject
//// End call triggers //// End call triggers
} }
} }
// Commit or rollback // Commit or rollback
if ($error) if ($error)
{ {
@@ -222,7 +222,7 @@ class BankCateg // extends CommonObject
{ {
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg); $this->error.=($this->error?', '.$errmsg:$errmsg);
} }
$this->db->rollback(); $this->db->rollback();
return -1*$error; return -1*$error;
} }
@@ -230,10 +230,10 @@ class BankCateg // extends CommonObject
{ {
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
} }
/** /**
* \brief Delete object in database * \brief Delete object in database
* \param user User that delete * \param user User that delete
@@ -244,33 +244,33 @@ class BankCateg // extends CommonObject
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE rowid=".$this->id; $sql.= " WHERE rowid=".$this->id;
$sql.= " AND entity = ".$conf->entity; $sql.= " AND entity = ".$conf->entity;
$this->db->begin(); $this->db->begin();
dol_syslog(get_class($this)."::delete sql=".$sql); dol_syslog(get_class($this)."::delete sql=".$sql);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) if (! $error)
{ {
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//// Call triggers //// Call triggers
//include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
//$interface=new Interfaces($this->db); //$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; } //if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers //// End call triggers
} }
} }
// Commit or rollback // Commit or rollback
if ($error) if ($error)
{ {
@@ -278,7 +278,7 @@ class BankCateg // extends CommonObject
{ {
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg); $this->error.=($this->error?', '.$errmsg:$errmsg);
} }
$this->db->rollback(); $this->db->rollback();
return -1*$error; return -1*$error;
} }
@@ -290,7 +290,7 @@ class BankCateg // extends CommonObject
} }
/** /**
* \brief Load an object from its id and create a new one in database * \brief Load an object from its id and create a new one in database
* \param fromid Id of object to clone * \param fromid Id of object to clone
@@ -299,9 +299,9 @@ class BankCateg // extends CommonObject
function createFromClone($fromid) function createFromClone($fromid)
{ {
global $user,$langs; global $user,$langs;
$error=0; $error=0;
$object=new Bank_categ($this->db); $object=new Bank_categ($this->db);
$this->db->begin(); $this->db->begin();
@@ -313,24 +313,24 @@ class BankCateg // extends CommonObject
// Clear fields // Clear fields
// ... // ...
// Create clone // Create clone
$result=$object->create($user); $result=$object->create($user);
// Other options // Other options
if ($result < 0) if ($result < 0)
{ {
$this->error=$object->error; $this->error=$object->error;
$error++; $error++;
} }
if (! $error) if (! $error)
{ {
} }
// End // End
if (! $error) if (! $error)
{ {
@@ -344,7 +344,7 @@ class BankCateg // extends CommonObject
} }
} }
/** /**
* \brief Initialise object with example values * \brief Initialise object with example values
* \remarks id must be 0 if object instance is a specimen. * \remarks id must be 0 if object instance is a specimen.
@@ -352,10 +352,10 @@ class BankCateg // extends CommonObject
function initAsSpecimen() function initAsSpecimen()
{ {
$this->id=0; $this->id=0;
$this->label=''; $this->label='';
} }
} }

View File

@@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/chargesociales.class.php * \file htdocs/compta/sociales/class/chargesociales.class.php
* \ingroup facture * \ingroup facture
* \brief Fichier de la classe des charges sociales * \brief Fichier de la classe des charges sociales
* \version $Id$ * \version $Id$

View File

@@ -18,12 +18,12 @@
*/ */
/** /**
\file htdocs/lib/invoice.lib.php * \file htdocs/lib/bookmark.lib.php
\brief Ensemble de fonctions de base pour le module factures * \brief List of functions for bookmark module
\version $Id$ * \version $Id$
*
Ensemble de fonctions de base de dolibarr sous forme d'include * Ensemble de fonctions de base de dolibarr sous forme d'include
*/ */
function showArrayOfBookmark($fac) function showArrayOfBookmark($fac)
{ {

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -20,9 +20,9 @@
/** /**
* \mainpage Dolibarr project * \mainpage Dolibarr project
* *
* This is source documentation for Dolibarr.<br> * This is source documentation for Dolibarr ERP/CRM.<br>
* This documentation can be built or updated running the script <b>dolibarr-doxygen-build.pl</b><br> * This documentation can be built or updated running the script <b>dolibarr-doxygen-build.pl</b> or from Eclipse with Doxygen plugin.<br>
* <br> * <br>
* Dolibarr official web site: <a href="http://www.dolibarr.org">www.dolibarr.org</a><br> * Dolibarr official web site: <a href="http://www.dolibarr.org">www.dolibarr.org</a><br>
* Dolibarr site francophone: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br> * Dolibarr site francophone: <a href="http://www.dolibarr.fr">www.dolibarr.fr</a><br>

View File

@@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/societe/client.class.php * \file htdocs/societe/class/client.class.php
* \ingroup societe * \ingroup societe
* \brief File for class of customers * \brief File for class of customers
* \version $Id$ * \version $Id$