diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index d9487e658de..df5d7c740f3 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -261,7 +261,7 @@ if ($action == 'create') if ($res) { - while ($menu = $db->fetch_array ($res)) + while ($menu = $db->fetch_array($res)) { $parent_rowid = $menu['rowid']; $parent_mainmenu = $menu['mainmenu']; diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 9a72df931d8..c21503b15d2 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -300,7 +300,7 @@ if ($conf->use_javascript_ajax) $num = $db->num_rows($res); $i = 1; - while ($menu = $db->fetch_array ($res)) + while ($menu = $db->fetch_array($res)) { if (! empty($menu['langs'])) $langs->load($menu['langs']); $titre = $langs->trans($menu['titre']); diff --git a/htdocs/admin/menus/menu.js.php b/htdocs/admin/menus/menu.js.php index 89a04a11dee..8526569f1fc 100644 --- a/htdocs/admin/menus/menu.js.php +++ b/htdocs/admin/menus/menu.js.php @@ -32,7 +32,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter( FALSE ); +session_cache_limiter(FALSE); require_once("../../master.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php"); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 89ff251f65e..85b5ee9b08e 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -40,9 +40,11 @@ $action = GETPOST("action"); if ($action == "set") { + $db->begin(); for ($i = 0 ; $i < 2 ; $i++) { $res = dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; } $id=$_POST["PRELEVEMENT_ID_BANKACCOUNT"]; @@ -51,23 +53,32 @@ if ($action == "set") if($account->fetch($id)>0) { $res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; } + else $error++; - if (! $res > 0) $error++; - if (! $error) { + $db->commit(); $mesg = "".$langs->trans("SetupSaved").""; } else { + $db->rollback(); $mesg = "".$langs->trans("Error").""; } } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 0775afdf83f..b9fe58eed1f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1804,7 +1804,7 @@ else print_liste_field_titre($langs->trans('Price'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'p.fk_statut','',$param,'align="right"',$sortfield,$sortorder); - print ' '; + print_liste_field_titre(''); print "\n"; // Lignes des champs de filtre print '
'; diff --git a/htdocs/lib/databases/mssql.lib.php b/htdocs/lib/databases/mssql.lib.php index 4f6a512cb35..7b8cc68f989 100644 --- a/htdocs/lib/databases/mssql.lib.php +++ b/htdocs/lib/databases/mssql.lib.php @@ -72,16 +72,18 @@ class DoliDb var $error; - /** - * Ouverture d'une connexion vers le serveur et eventuellement une database. - * @param type Type de base de donnees (mysql ou pgsql) - * @param host Addresse de la base de donnees - * @param user Nom de l'utilisateur autorise - * @param pass Mot de passe - * @param name Nom de la database - * @param port Port of database server - * @return int 1 en cas de succes, 0 sinon - */ + /** + * Constructor. + * This create an opened connexion to a database server and eventually to a database + * + * @param string $type Type of database (mysql, pgsql...) + * @param string $host Address of database server + * @param string $user Nom de l'utilisateur autorise + * @param string $pass Mot de passe + * @param string $name Nom de la database + * @param int $port Port of database server + * @return int 1 if OK, 0 if not + */ function DoliDb($type='mssql', $host, $user, $pass, $name='', $port=0) { global $conf,$langs; @@ -153,10 +155,11 @@ class DoliDb } /** - * Convert a SQL request in Mysql syntax to PostgreSQL syntax - * @param line SQL request line to convert - * @param type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return string SQL request line converted + * Convert a SQL request in Mysql syntax to native syntax + * + * @param string $line SQL request line to convert + * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) + * @return string SQL request line converted */ function convertSQLFromMysql($line,$type='ddl') { @@ -164,9 +167,10 @@ class DoliDb } /** - * Selectionne une database. - * @param database Nom de la database - * @return boolean true si ok, false si ko + * Select a database + * + * @param string $database Name of database + * @return boolean true if OK, false if KO */ function select_db($database) { @@ -174,14 +178,15 @@ class DoliDb } /** - * Connection vers le serveur - * @param host addresse de la base de donnees - * @param login nom de l'utilisateur autoris - * @param passwd mot de passe - * @param name nom de la database (ne sert pas sous mysql, sert sous pgsql) - * @param port Port of database server - * @return resource handler d'acces a la base - * @see close + * Connexion to server + * + * @param string $host database server host + * @param string $login login + * @param string $passwd password + * @param string $name name of database (not used for mysql, used for pgsql) + * @param string $port Port of database server + * @return resource Database access handler + * @see close */ function connect($host, $login, $passwd, $name, $port=0) { @@ -198,8 +203,9 @@ class DoliDb } /** - * \brief Return label of manager - * \return string Label + * Return label of manager + * + * @return string Label */ function getLabel() { @@ -207,8 +213,9 @@ class DoliDb } /** - * \brief Renvoie la version du serveur - * \return string Chaine version + * Return version of database server + * + * @return string Version string */ function getVersion() { @@ -219,8 +226,9 @@ class DoliDb /** - * \brief Renvoie la version du serveur dans un tableau - * \return array Tableau de chaque niveau de version + * Return version of database server into an array + * + * @return array Version array */ function getVersionArray() { @@ -230,6 +238,7 @@ class DoliDb /** * Close database connexion + * * @return boolean True if disconnect successfull, false otherwise * @see connect */ @@ -246,8 +255,9 @@ class DoliDb /** - * \brief Debut d'une transaction. - * \return int 1 si ouverture transaction ok ou deja ouverte, 0 en cas d'erreur + * Start transaction + * + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ function begin() { @@ -270,10 +280,11 @@ class DoliDb /** * Validate a database transaction - * @param log Add more log to default log line + * + * @param $log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ - function commit() + function commit($log='') { if ($this->transaction_opened <= 1) { @@ -293,8 +304,9 @@ class DoliDb } /** - * \brief Annulation d'une transaction et retour aux anciennes valeurs - * \return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur + * Annulation d'une transaction et retour aux anciennes valeurs + * + * @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ function rollback() { @@ -314,6 +326,7 @@ class DoliDb /** * Execute a SQL request and return the resultset + * * @param query SQL query string * @param usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions). * Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints. @@ -404,9 +417,10 @@ class DoliDb } /** - * \brief Renvoie la ligne courante (comme un objet) pour le curseur resultset. - * \param resultset Curseur de la requete voulue - * \return object Object result line or false if KO or end of cursor + * Renvoie la ligne courante (comme un objet) pour le curseur resultset + * + * @param resultset Curseur de la requete voulue + * @return object Object result line or false if KO or end of cursor */ function fetch_object($resultset) { @@ -416,9 +430,10 @@ class DoliDb } /** - * \brief Renvoie les donnees dans un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees dans un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_array($resultset) { diff --git a/htdocs/lib/databases/mysql.lib.php b/htdocs/lib/databases/mysql.lib.php index 1b159d03ee5..3afd7d21782 100644 --- a/htdocs/lib/databases/mysql.lib.php +++ b/htdocs/lib/databases/mysql.lib.php @@ -72,14 +72,16 @@ class DoliDb /** - * Ouverture d'une connexion vers le serveur et eventuellement une database. - * @param type Type de base de donnees (mysql ou pgsql) - * @param host Addresse de la base de donnees - * @param user Nom de l'utilisateur autorise - * @param pass Mot de passe - * @param name Nom de la database - * @param port Port of database server - * @return int 1 en cas de succes, 0 sinon + * Constructor. + * This create an opened connexion to a database server and eventually to a database + * + * @param string $type Type of database (mysql, pgsql...) + * @param string $host Address of database server + * @param string $user Nom de l'utilisateur autorise + * @param string $pass Mot de passe + * @param string $name Nom de la database + * @param int $port Port of database server + * @return int 1 if OK, 0 if not */ function DoliDb($type='mysql', $host, $user, $pass, $name='', $port=0) { @@ -180,10 +182,11 @@ class DoliDb /** - * Convert a SQL request in Mysql syntax to PostgreSQL syntax - * @param line SQL request line to convert - * @param type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return string SQL request line converted + * Convert a SQL request in Mysql syntax to native syntax + * + * @param string $line SQL request line to convert + * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) + * @return string SQL request line converted */ function convertSQLFromMysql($line,$type='ddl') { @@ -191,9 +194,10 @@ class DoliDb } /** - * \brief Selectionne une database. - * \param database Nom de la database - * \return boolean true si ok, false si ko + * Select a database + * + * @param string $database Name of database + * @return boolean true if OK, false if KO */ function select_db($database) { @@ -202,14 +206,15 @@ class DoliDb } /** - * \brief Connexion to server - * \param host database server host - * \param login login - * \param passwd password - * \param name nom de la database (ne sert pas sous mysql, sert sous pgsql) - * \param port Port of database server - * \return resource Database access handler - * \seealso close + * Connexion to server + * + * @param string $host database server host + * @param string $login login + * @param string $passwd password + * @param string $name name of database (not used for mysql, used for pgsql) + * @param string $port Port of database server + * @return resource Database access handler + * @see close */ function connect($host, $login, $passwd, $name, $port=0) { @@ -227,8 +232,9 @@ class DoliDb } /** - * \brief Return label of manager - * \return string Label + * Return label of manager + * + * @return string Label */ function getLabel() { @@ -236,8 +242,9 @@ class DoliDb } /** - * \brief Renvoie la version du serveur - * \return string Chaine version + * Return version of database server + * + * @return string Version string */ function getVersion() { @@ -245,26 +252,9 @@ class DoliDb } /** - * \brief Renvoie la version du serveur sous forme de nombre - * \return string Chaine version - */ - function getIntVersion() - { - $version= $this->getVersion(); - $vlist=preg_split('/[.-]/',$version); - if (dol_strlen($vlist[1])==1){ - $vlist[1]="0".$vlist[1]; - } - if (dol_strlen($vlist[2])==1){ - $vlist[2]="0".$vlist[2]; - } - return $vlist[0].$vlist[1].$vlist[2]; - } - - - /** - * \brief Renvoie la version du serveur dans un tableau - * \return array Tableau de chaque niveau de version + * Return version of database server into an array + * + * @return array Version array */ function getVersionArray() { @@ -274,6 +264,7 @@ class DoliDb /** * Close database connexion + * * @return boolean True if disconnect successfull, false otherwise * @see connect */ @@ -290,8 +281,9 @@ class DoliDb /** - * \brief Debut d'une transaction. - * \return int 1 si ouverture transaction ok ou deja ouverte, 0 en cas d'erreur + * Start transaction + * + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ function begin() { @@ -314,7 +306,8 @@ class DoliDb /** * Validate a database transaction - * @param log Add more log to default log line + * + * @param $log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ function commit($log='') @@ -337,9 +330,10 @@ class DoliDb } /** - * \brief Annulation d'une transaction et retour aux anciennes valeurs - * \param log Add more log to default log line - * \return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur + * Annulation d'une transaction et retour aux anciennes valeurs + * + * @param $log Add more log to default log line + * @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ function rollback($log='') { @@ -359,6 +353,7 @@ class DoliDb /** * Execute a SQL request and return the resultset + * * @param query SQL query string * @param usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions). * Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints. @@ -398,9 +393,10 @@ class DoliDb } /** - * \brief Renvoie la ligne courante (comme un objet) pour le curseur resultset. - * \param resultset Curseur de la requete voulue - * \return object Object result line or false if KO or end of cursor + * Renvoie la ligne courante (comme un objet) pour le curseur resultset + * + * @param resultset Curseur de la requete voulue + * @return object Object result line or false if KO or end of cursor */ function fetch_object($resultset) { @@ -410,9 +406,10 @@ class DoliDb } /** - * \brief Renvoie les donnees dans un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees dans un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_array($resultset) { @@ -423,9 +420,10 @@ class DoliDb /** - * \brief Renvoie les donnees comme un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees comme un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_row($resultset) { @@ -435,10 +433,11 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete SELECT - * \see affected_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete SELECT + * + * @see affected_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function num_rows($resultset) { @@ -448,10 +447,11 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE - * \see num_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * + * @see num_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function affected_rows($resultset) { @@ -464,8 +464,9 @@ class DoliDb /** - * \brief Libere le dernier resultset utilise sur cette connexion. - * \param resultset Curseur de la requete voulue + * Libere le dernier resultset utilise sur cette connexion. + * + * @param resultset Curseur de la requete voulue */ function free($resultset=0) { @@ -477,10 +478,11 @@ class DoliDb /** - * \brief Defini les limites de la requete. - * \param limit nombre maximum de lignes retournees - * \param offset numero de la ligne a partir de laquelle recuperer les ligne - * \return string chaine exprimant la syntax sql de la limite + * Defini les limites de la requete + * + * @param limit nombre maximum de lignes retournees + * @param offset numero de la ligne a partir de laquelle recuperer les ligne + * @return string chaine exprimant la syntax sql de la limite */ function plimit($limit=0,$offset=0) { @@ -493,6 +495,7 @@ class DoliDb /** * Define sort criteria of request + * * @param sortfield List of sort fields * @param sortorder Sort order * @return string String to provide syntax of a sort sql string @@ -522,7 +525,8 @@ class DoliDb /** - * Escape a string to insert data. + * Escape a string to insert data + * * @param stringtoencode String to escape * @return string String escaped */ @@ -535,6 +539,7 @@ class DoliDb /** * Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field. * Function to use to build INSERT, UPDATE or WHERE predica + * * @param param Date TMS to convert * @return string Date in a string YYYYMMDDHHMMSS */ @@ -546,6 +551,7 @@ class DoliDb /** * Convert (by PHP) a PHP server TZ string date into a GM Timestamps date * 19700101020000 -> 3600 with TZ+1 + * * @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @return date Date TMS */ @@ -559,6 +565,7 @@ class DoliDb /** * Formate a SQL IF + * * @param test chaine test * @param resok resultat si test egal * @param resko resultat si test non egal diff --git a/htdocs/lib/databases/mysqli.lib.php b/htdocs/lib/databases/mysqli.lib.php index fb33ea71c77..8af16e47efe 100644 --- a/htdocs/lib/databases/mysqli.lib.php +++ b/htdocs/lib/databases/mysqli.lib.php @@ -73,14 +73,16 @@ class DoliDb /** - * Ouverture d'une connexion vers le serveur et eventuellement une database. - * @param type Type de base de donnees (mysql ou pgsql) - * @param host Addresse de la base de donnees - * @param user Nom de l'utilisateur autorise - * @param pass Mot de passe - * @param name Nom de la database - * @param port Port of database server - * @return int 1 en cas de succes, 0 sinon + * Constructor. + * This create an opened connexion to a database server and eventually to a database + * + * @param string $type Type of database (mysql, pgsql...) + * @param string $host Address of database server + * @param string $user Nom de l'utilisateur autorise + * @param string $pass Mot de passe + * @param string $name Nom de la database + * @param int $port Port of database server + * @return int 1 if OK, 0 if not */ function DoliDb($type='mysqli', $host, $user, $pass, $name='', $port=0) { @@ -183,21 +185,23 @@ class DoliDb /** - * Convert a SQL request in Mysql syntax to PostgreSQL syntax - * @param line SQL request line to convert - * @param type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return string SQL request line converted + * Convert a SQL request in Mysql syntax to native syntax + * + * @param string $line SQL request line to convert + * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) + * @return string SQL request line converted */ function convertSQLFromMysql($line,$type='ddl') { return $line; } - /** - * \brief Selectionne une database. - * \param database Nom de la database - * \return boolean true si ok, false si ko - */ + /** + * Select a database + * + * @param string $database Name of database + * @return boolean true if OK, false if KO + */ function select_db($database) { dol_syslog("DoliDB::select_db database=".$database, LOG_DEBUG); @@ -206,14 +210,15 @@ class DoliDb /** - * \brief Connexion to server - * \param host database server host - * \param login login - * \param passwd password - * \param name nom de la database (ne sert pas sous mysql, sert sous pgsql) - * \param port Port of database server - * \return resource Database access handler - * \seealso close + * Connexion to server + * + * @param string $host database server host + * @param string $login login + * @param string $passwd password + * @param string $name name of database (not used for mysql, used for pgsql) + * @param string $port Port of database server + * @return resource Database access handler + * @see close */ function connect($host, $login, $passwd, $name, $port=0) { @@ -232,8 +237,9 @@ class DoliDb } /** - * \brief Return label of manager - * \return string Label + * Return label of manager + * + * @return string Label */ function getLabel() { @@ -241,8 +247,9 @@ class DoliDb } /** - * \brief Renvoie la version du serveur - * \return string Chaine version + * Return version of database server + * + * @return string Version string */ function getVersion() { @@ -252,27 +259,11 @@ class DoliDb return mysqli_get_server_info($this->db); } - /** - * \brief Renvoie la version du serveur sous forme de nombre - * \return string Chaine version - */ - function getIntVersion() - { - $version= $this->getVersion(); - $vlist=preg_split('/[.-]/',$version); - if (dol_strlen($vlist[1])==1){ - $vlist[1]="0".$vlist[1]; - } - if (dol_strlen($vlist[2])==1){ - $vlist[2]="0".$vlist[2]; - } - return $vlist[0].$vlist[1].$vlist[2]; - } - - /** - * \brief Renvoie la version du serveur dans un tableau - * \return array Tableau de chaque niveau de version - */ + /** + * Return version of database server into an array + * + * @return array Version array + */ function getVersionArray() { return explode('.',$this->getVersion()); @@ -280,9 +271,10 @@ class DoliDb /** - * Close database connexion - * @return boolean True if disconnect successfull, false otherwise - * @see connect + * Close database connexion + * + * @return boolean True if disconnect successfull, false otherwise + * @see connect */ function close() { @@ -297,8 +289,9 @@ class DoliDb /** - * \brief Debut d'une transaction. - * \return int 1 si ouverture transaction ok ou deja ouverte, 0 en cas d'erreur + * Start transaction + * + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ function begin() { @@ -321,7 +314,8 @@ class DoliDb /** * Validate a database transaction - * @param log Add more log to default log line + * + * @param $log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ function commit($log='') @@ -344,9 +338,10 @@ class DoliDb } /** - * \brief Annulation d'une transaction et retour aux anciennes valeurs - * \param log Add more log to default log line - * \return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur + * Annulation d'une transaction et retour aux anciennes valeurs + * + * @param $log Add more log to default log line + * @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ function rollback($log='') { @@ -366,6 +361,7 @@ class DoliDb /** * Execute a SQL request and return the resultset + * * @param query SQL query string * @param usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions). * Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints. @@ -403,9 +399,10 @@ class DoliDb } /** - * \brief Renvoie la ligne courante (comme un objet) pour le curseur resultset. - * \param resultset Curseur de la requete voulue - * \return object Object result line or false if KO or end of cursor + * Renvoie la ligne courante (comme un objet) pour le curseur resultset + * + * @param resultset Curseur de la requete voulue + * @return object Object result line or false if KO or end of cursor */ function fetch_object($resultset) { @@ -416,9 +413,10 @@ class DoliDb /** - * \brief Renvoie les donnees dans un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees dans un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_array($resultset) { @@ -428,9 +426,10 @@ class DoliDb } /** - * \brief Renvoie les donnees comme un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees comme un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_row($resultset) { @@ -448,10 +447,11 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete SELECT - * \see affected_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete SELECT + * + * @see affected_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function num_rows($resultset) { @@ -461,10 +461,10 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE - * \see num_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * @see num_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function affected_rows($resultset) @@ -478,8 +478,9 @@ class DoliDb /** - * \brief Libere le dernier resultset utilise sur cette connexion. - * \param resultset Curseur de la requete voulue + * Libere le dernier resultset utilise sur cette connexion + * + * @param resultset Curseur de la requete voulue */ function free($resultset=0) { @@ -491,10 +492,11 @@ class DoliDb /** - * \brief Defini les limites de la requete. - * \param limit nombre maximum de lignes retournees - * \param offset numero de la ligne a partir de laquelle recuperer les ligne - * \return string chaine exprimant la syntax sql de la limite + * Defini les limites de la requete + * + * @param limit nombre maximum de lignes retournees + * @param offset numero de la ligne a partir de laquelle recuperer les ligne + * @return string chaine exprimant la syntax sql de la limite */ function plimit($limit=0,$offset=0) { @@ -507,6 +509,7 @@ class DoliDb /** * Define sort criteria of request + * * @param sortfield List of sort fields * @param sortorder Sort order * @return string String to provide syntax of a sort sql string @@ -536,7 +539,8 @@ class DoliDb /** - * Escape a string to insert data. + * Escape a string to insert data + * * @param stringtoencode String to escape * @return string String escaped */ @@ -548,6 +552,7 @@ class DoliDb /** * Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field. * Function to use to build INSERT, UPDATE or WHERE predica + * * @param param Date TMS to convert * @return string Date in a string YYYYMMDDHHMMSS */ @@ -559,6 +564,7 @@ class DoliDb /** * Convert (by PHP) a PHP server TZ string date into a GM Timestamps date * 19700101020000 -> 3600 with TZ+1 + * * @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @return date Date TMS */ @@ -572,6 +578,7 @@ class DoliDb /** * Formate a SQL IF + * * @param test chaine test * @param resok resultat si test egal * @param resko resultat si test non egal diff --git a/htdocs/lib/databases/pgsql.lib.php b/htdocs/lib/databases/pgsql.lib.php index f0f2a0b4268..98723a7f989 100644 --- a/htdocs/lib/databases/pgsql.lib.php +++ b/htdocs/lib/databases/pgsql.lib.php @@ -62,14 +62,16 @@ class DoliDb /** - * \brief Ouverture d'une connexion vers le serveur et une database. - * \param type type de base de donnees (mysql ou pgsql) - * \param host addresse de la base de donnees - * \param user nom de l'utilisateur autorise - * \param pass mot de passe - * \param name nom de la database - * \param port Port of database server - * \return int 1 en cas de succes, 0 sinon + * Constructor. + * This create an opened connexion to a database server and eventually to a database + * + * @param string $type Type of database (mysql, pgsql...) + * @param string $host Address of database server + * @param string $user Nom de l'utilisateur autorise + * @param string $pass Mot de passe + * @param string $name Nom de la database + * @param int $port Port of database server + * @return int 1 if OK, 0 if not */ function DoliDb($type='pgsql', $host, $user, $pass, $name='', $port=0) { @@ -146,12 +148,13 @@ class DoliDb } - /** - * Convert a SQL request in Mysql syntax to PostgreSQL syntax - * @param line SQL request line to convert - * @param type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return string SQL request line converted - */ + /** + * Convert a SQL request in Mysql syntax to native syntax + * + * @param string $line SQL request line to convert + * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) + * @return string SQL request line converted + */ function convertSQLFromMysql($line,$type='auto') { # Removed empty line if this is a comment line for SVN tagging @@ -321,11 +324,12 @@ class DoliDb } /** - * Select a database. - * Ici postgresql n'a aucune fonction equivalente de mysql_select_db - * On compare juste manuellement si la database choisie est bien celle activee par la connexion - * @param database nom de la database - * @return boolean true si ok, false si ko + * Select a database + * Ici postgresql n'a aucune fonction equivalente de mysql_select_db + * On compare juste manuellement si la database choisie est bien celle activee par la connexion + * + * @param string $database Name of database + * @return boolean true if OK, false if KO */ function select_db($database) { @@ -334,13 +338,15 @@ class DoliDb } /** - * Connection vers le serveur - * @param host addresse de la base de donnees - * @param login nom de l'utilisateur autorise - * @param passwd mot de passe - * @param name nom de la database (ne sert pas sous mysql, sert sous pgsql) - * @param port Port of database server - * @return resource handler d'acces a la base + * Connexion to server + * + * @param string $host database server host + * @param string $login login + * @param string $passwd password + * @param string $name name of database (not used for mysql, used for pgsql) + * @param string $port Port of database server + * @return resource Database access handler + * @see close */ function connect($host, $login, $passwd, $name, $port=0) { @@ -364,8 +370,9 @@ class DoliDb } /** - * \brief Return label of manager - * \return string Label + * Return label of manager + * + * @return string Label */ function getLabel() { @@ -373,8 +380,9 @@ class DoliDb } /** - * \brief Return version of server - * \return string String with version + * Return version of database server + * + * @return string Version string */ function getVersion() { @@ -388,25 +396,9 @@ class DoliDb } /** - * \brief Renvoie la version du serveur sous forme de nombre - * \return string Chaine version - */ - function getIntVersion() - { - $version = $this->getVersion(); - $vlist = preg_split('/[.-]/',$version); - if (dol_strlen($vlist[1])==1){ - $vlist[1]="0".$vlist[1]; - } - if (dol_strlen($vlist[2])==1){ - $vlist[2]="0".$vlist[2]; - } - return $vlist[0].$vlist[1].$vlist[2]; - } - - /** - * \brief Renvoie la version du serveur dans un tableau - * \return array Tableau de chaque niveau de version + * Return version of database server into an array + * + * @return array Version array */ function getVersionArray() { @@ -415,6 +407,7 @@ class DoliDb /** * Close database connexion + * * @return boolean True if disconnect successfull, false otherwise * @see connect */ @@ -430,8 +423,9 @@ class DoliDb } /** - * \brief Debut d'une transaction. - * \return int 1 si ouverture transaction ok ou deja ouverte, 0 en cas d'erreur + * Start transaction + * + * @return int 1 if transaction successfuly opened or already opened, 0 if error */ function begin() { @@ -454,6 +448,7 @@ class DoliDb /** * Validate a database transaction + * * @param log Add more log to default log line * @return int 1 if validation is OK or transaction level no started, 0 if ERROR */ @@ -477,8 +472,8 @@ class DoliDb } /** - * \brief Annulation d'une transaction et retour aux anciennes valeurs - * \return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur + * Annulation d'une transaction et retour aux anciennes valeurs + * @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur */ function rollback() { @@ -498,7 +493,8 @@ class DoliDb /** - * Convert request to PostgreSQL syntax, execute it and return the resultset. + * Convert request to PostgreSQL syntax, execute it and return the resultset + * * @param query SQL query string * @param usesavepoint 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions). * @param type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) @@ -555,9 +551,10 @@ class DoliDb } /** - * \brief Renvoie la ligne courante (comme un objet) pour le curseur resultset. - * \param resultset Curseur de la requete voulue - * \return object Object result line or false if KO or end of cursor + * Renvoie la ligne courante (comme un objet) pour le curseur resultset + * + * @param resultset Curseur de la requete voulue + * @return object Object result line or false if KO or end of cursor */ function fetch_object($resultset) { @@ -567,9 +564,10 @@ class DoliDb } /** - * \brief Renvoie les donnees dans un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees dans un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_array($resultset) { @@ -579,9 +577,10 @@ class DoliDb } /** - * \brief Renvoie les donnees comme un tableau. - * \param resultset Curseur de la requete voulue - * \return array + * Renvoie les donnees comme un tableau + * + * @param resultset Curseur de la requete voulue + * @return array */ function fetch_row($resultset) { @@ -591,10 +590,11 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete SELECT - * \see affected_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete SELECT + * + * @see affected_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function num_rows($resultset) { @@ -604,10 +604,11 @@ class DoliDb } /** - * \brief Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE - * \see num_rows - * \param resultset Curseur de la requete voulue - * \return int Nombre de lignes + * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * + * @see num_rows + * @param resultset Curseur de la requete voulue + * @return int Nombre de lignes */ function affected_rows($resultset) { @@ -620,8 +621,9 @@ class DoliDb /** - * \brief Libere le dernier resultset utilise sur cette connexion. - * \param resultset Curseur de la requete voulue + * Libere le dernier resultset utilise sur cette connexion + * + * @param resultset Curseur de la requete voulue */ function free($resultset=0) { @@ -633,10 +635,11 @@ class DoliDb /** - * \brief Defini les limites de la requete. - * \param limit nombre maximum de lignes retournees - * \param offset numero de la ligne a partir de laquelle recuperer les lignes - * \return string chaine exprimant la syntax sql de la limite + * Defini les limites de la requete + * + * @param limit nombre maximum de lignes retournees + * @param offset numero de la ligne a partir de laquelle recuperer les lignes + * @return string chaine exprimant la syntax sql de la limite */ function plimit($limit=0,$offset=0) { @@ -649,6 +652,7 @@ class DoliDb /** * Define sort criteria of request + * * @param sortfield List of sort fields * @param sortorder Sort order * @return string String to provide syntax of a sort sql string @@ -678,7 +682,8 @@ class DoliDb /** - * Escape a string to insert data. + * Escape a string to insert data + * * @param stringtoencode String to escape * @return string String escaped */ @@ -690,6 +695,7 @@ class DoliDb /** * Convert (by PHP) a GM Timestamp date into a GM string date to insert into a date field. * Function to use to build INSERT, UPDATE or WHERE predica + * * @param param Date TMS to convert * @return string Date in a string YYYYMMDDHHMMSS */ @@ -701,6 +707,7 @@ class DoliDb /** * Convert (by PHP) a PHP server TZ string date into a GM Timestamps date * 19700101020000 -> 3600 with TZ+1 + * * @param string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @return date Date TMS */ @@ -714,6 +721,7 @@ class DoliDb /** * Formate a SQL IF + * * @param test chaine test * @param resok resultat si test egal * @param resko resultat si test non egal @@ -726,8 +734,9 @@ class DoliDb /** - * \brief Renvoie la derniere requete soumise par la methode query() - * \return lastquery + * Renvoie la derniere requete soumise par la methode query() + * + * @return lastquery */ function lastquery() { @@ -735,8 +744,9 @@ class DoliDb } /** - * \brief Renvoie la derniere requete en erreur - * \return string lastqueryerror + * Renvoie la derniere requete en erreur + * + * @return string lastqueryerror */ function lastqueryerror() { @@ -744,8 +754,9 @@ class DoliDb } /** - * \brief Renvoie le libelle derniere erreur - * \return string lasterror + * Renvoie le libelle derniere erreur + * + * @return string lasterror */ function lasterror() { @@ -753,8 +764,9 @@ class DoliDb } /** - * \brief Renvoie le code derniere erreur - * \return string lasterrno + * Renvoie le code derniere erreur + * + * @return string lasterrno */ function lasterrno() { @@ -762,8 +774,9 @@ class DoliDb } /** - * \brief Renvoie le code erreur generique de l'operation precedente. - * \return error_num (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...) + * Renvoie le code erreur generique de l'operation precedente. + * + * @return error_num (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...) */ function errno() { @@ -827,8 +840,9 @@ class DoliDb } /** - * \brief Renvoie le texte de l'erreur pgsql de l'operation precedente. - * \return error_text + * Renvoie le texte de l'erreur pgsql de l'operation precedente + * + * @return error_text */ function error() { @@ -836,9 +850,10 @@ class DoliDb } /** - * \brief Get last ID after an insert INSERT. - * \param tab Table name concerned by insert. Ne sert pas sous MySql mais requis pour compatibilite avec Postgresql - * \return int id + * Get last ID after an insert INSERT + * + * @param tab Table name concerned by insert. Ne sert pas sous MySql mais requis pour compatibilite avec Postgresql + * @return int id */ function last_insert_id($tab,$fieldid='rowid') { @@ -857,6 +872,7 @@ class DoliDb /** * Encrypt sensitive data in database * Warning: This function includes the escape, so it must use direct value + * * @param fieldorvalue Field name or value to encrypt * @param withQuotes Return string with quotes * @return return XXX(field) or XXX('value') or field or 'value' @@ -877,9 +893,10 @@ class DoliDb /** - * \brief Decrypt sensitive data in database - * \param value Value to decrypt - * \return return Decrypted value if used + * Decrypt sensitive data in database + * + * @param value Value to decrypt + * @return return Decrypted value if used */ function decrypt($value) { @@ -901,8 +918,9 @@ class DoliDb /** - * \brief Renvoie l'id de la connexion - * \return string Id connexion + * Renvoie l'id de la connexion + * + * @return string Id connexion */ function DDLGetConnectId() { @@ -912,13 +930,14 @@ class DoliDb /** - * \brief Create a new database - * \param database Database name to create - * \param charset Charset used to store data - * \param collation Charset used to sort data - * \param owner Username of database owner - * \return resource resource defined if OK, null if KO - * \remarks Ne pas utiliser les fonctions xxx_create_db (xxx=mysql, ...) car elles sont deprecated + * Create a new database + * Ne pas utiliser les fonctions xxx_create_db (xxx=mysql, ...) car elles sont deprecated + * + * @param database Database name to create + * @param charset Charset used to store data + * @param collation Charset used to sort data + * @param owner Username of database owner + * @return resource resource defined if OK, null if KO */ function DDLCreateDb($database,$charset='',$collation='',$owner='') { @@ -930,9 +949,9 @@ class DoliDb } /** - * \brief Liste des tables dans une database. - * \param database Nom de la database - * \return resource + * Liste des tables dans une database. + * @param database Nom de la database + * @return resource */ function DDLListTables($database, $table='') { @@ -949,9 +968,9 @@ class DoliDb } /** - * \brief Liste les informations des champs d'une table. - * \param table Nom de la table - * \return array Tableau des informations des champs de la table + * Liste les informations des champs d'une table. + * @param table Nom de la table + * @return array Tableau des informations des champs de la table * TODO modifier pour postgresql */ function DDLInfoTable($table) @@ -973,15 +992,16 @@ class DoliDb /** - * \brief Cree une table - * \param table Nom de la table - * \param fields Tableau associatif [nom champ][tableau des descriptions] - * \param primary_key Nom du champ qui sera la clef primaire - * \param unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur - * \param fulltext Tableau des Nom de champs qui seront indexes en fulltext - * \param key Tableau des champs cles noms => valeur - * \param type Type de la table - * \return int <0 si KO, >=0 si OK + * Cree une table + * + * @param table Nom de la table + * @param fields Tableau associatif [nom champ][tableau des descriptions] + * @param primary_key Nom du champ qui sera la clef primaire + * @param unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur + * @param fulltext Tableau des Nom de champs qui seront indexes en fulltext + * @param key Tableau des champs cles noms => valeur + * @param type Type de la table + * @return int <0 si KO, >=0 si OK * TODO */ function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys="",$fulltext_keys="",$keys="") @@ -1050,12 +1070,13 @@ class DoliDb } /** - * \brief Create a user - * \param dolibarr_main_db_host Ip serveur - * \param dolibarr_main_db_user Nom user a creer - * \param dolibarr_main_db_pass Mot de passe user a creer - * \param dolibarr_main_db_name Database name where user must be granted - * \return int <0 si KO, >=0 si OK + * Create a user + * + * @param dolibarr_main_db_host Ip serveur + * @param dolibarr_main_db_user Nom user a creer + * @param dolibarr_main_db_pass Mot de passe user a creer + * @param dolibarr_main_db_name Database name where user must be granted + * @return int <0 si KO, >=0 si OK */ function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name) { @@ -1072,10 +1093,11 @@ class DoliDb } /** - * \brief decrit une table dans une database. - * \param table Nom de la table - * \param field Optionnel : Nom du champ si l'on veut la desc d'un champ - * \return resource + * Decrit une table dans une database + * + * @param table Nom de la table + * @param field Optionnel : Nom du champ si l'on veut la desc d'un champ + * @return resource */ function DDLDescTable($table,$field="") { @@ -1089,12 +1111,13 @@ class DoliDb } /** - * \brief Insert a new field in table - * \param table Nom de la table - * \param field_name Nom du champ a inserer - * \param field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du parametre] - * \param field_position Optionnel ex.: "after champtruc" - * \return int <0 si KO, >0 si OK + * Insert a new field in table + * + * @param table Nom de la table + * @param field_name Nom du champ a inserer + * @param field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du parametre] + * @param field_position Optionnel ex.: "after champtruc" + * @return int <0 si KO, >0 si OK */ function DDLAddField($table,$field_name,$field_desc,$field_position="") { @@ -1126,6 +1149,7 @@ class DoliDb /** * Update format of a field into a table + * * @param table Name of table * @param field_name Name of field to modify * @param field_desc Array with description of field format @@ -1145,10 +1169,11 @@ class DoliDb } /** - * \brief Drop a field in table - * \param table Nom de la table - * \param field_name Nom du champ a inserer - * \return int <0 si KO, >0 si OK + * Drop a field in table + * + * @param table Nom de la table + * @param field_name Nom du champ a inserer + * @return int <0 si KO, >0 si OK */ function DDLDropField($table,$field_name) { @@ -1163,8 +1188,9 @@ class DoliDb } /** - * \brief Return charset used to store data in database - * \return string Charset + * Return charset used to store data in database + * + * @return string Charset */ function getDefaultCharacterSetDatabase() { @@ -1174,8 +1200,9 @@ class DoliDb } /** - * \brief Return list of available charset that can be used to store data in database - * \return array List of Charset + * Return list of available charset that can be used to store data in database + * + * @return array List of Charset */ function getListOfCharacterSet() { @@ -1198,8 +1225,9 @@ class DoliDb } /** - * \brief Return collation used in database - * \return string Collation value + * Return collation used in database + * + * @return string Collation value */ function getDefaultCollationDatabase() { @@ -1209,8 +1237,9 @@ class DoliDb } /** - * \brief Return list of available collation that can be used for database - * \return array Liste of Collation + * Return list of available collation that can be used for database + * + * @return array Liste of Collation */ function getListOfCollation() { @@ -1233,6 +1262,7 @@ class DoliDb /** * Return full path of dump program + * * @return string Full path of dump program */ function getPathOfDump() @@ -1260,6 +1290,7 @@ class DoliDb /** * Return full path of restore program + * * @return string Full path of restore program */ function getPathOfRestore() @@ -1286,9 +1317,10 @@ class DoliDb } /** - * \brief Return value of server parameters - * \param filter Filter list on a particular value - * \return string Value for parameter + * Return value of server parameters + * + * @param filter Filter list on a particular value + * @return string Value for parameter */ function getServerParametersValues($filter='') { diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index dc6d61a208e..c5f2144ce8c 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -58,10 +58,10 @@ function dol_shutdown() /** * Return value of a param into GET or POST supervariable * - * @param paramname Name of parameter to found - * @param check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only) - * @param method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get) - * @return string Value found or '' if check fails + * @param string $paramname Name of parameter to found + * @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only) + * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get) + * @return string Value found or '' if check fails */ function GETPOST($paramname,$check='',$method=0) { @@ -88,7 +88,7 @@ function GETPOST($paramname,$check='',$method=0) * This prefix is unique for instance and avoid conflict between multi-instances, * even when having two instances with one root dir or two instances in virtual servers * - * @return string A calculated prefix + * @return string A calculated prefix */ function dol_getprefix() { @@ -102,8 +102,8 @@ function dol_getprefix() * To link to a module file from a module file, use include('./mymodulefile'); * To link to a module file from a core file, then this function can be used * - * @param relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...) - * @return int false if include fails. + * @param string $relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...) + * @return int false if include fails. */ function dol_include_once($relpath) { @@ -115,9 +115,9 @@ function dol_include_once($relpath) /** * Return path of url or filesystem. Return default_root or alternate root if file_exist fails * - * @param path Relative path to file (if mode=0, ie: mydir/myfile, ../myfile, ...) or relative url (if mode=1). - * @param type 0=Used for a Filesystem path, 1=Used for an URL path (output relative), 2=Used for an URL path (output full path) - * @return string Full filsystem path (if mode=0), Full url path (if mode=1) + * @param string $path Relative path to file (if mode=0, ie: mydir/myfile, ../myfile, ...) or relative url (if mode=1). + * @param int $type 0=Used for a Filesystem path, 1=Used for an URL path (output relative), 2=Used for an URL path (output full path) + * @return string Full filsystem path (if mode=0), Full url path (if mode=1) */ function dol_buildpath($path,$type=0) { @@ -168,8 +168,8 @@ function dol_buildpath($path,$type=0) * Create a clone of instance of object (new instance with same properties) * This function works for both PHP4 and PHP5 * - * @param object Object to clone - * @return date Timestamp + * @param object $object Object to clone + * @return object Object clone */ function dol_clone($object) { @@ -187,11 +187,11 @@ function dol_clone($object) /** * Optimize a size for some browsers (phone, smarphone, ...) * - * @param size Size we want - * @param type Type of optimizing: - * '' = function used to define a size for truncation - * 'width' = function is used to define a width - * @return int New size after optimizing + * @param int $size Size we want + * @param string $type Type of optimizing: + * '' = function used to define a size for truncation + * 'width' = function is used to define a width + * @return int New size after optimizing */ function dol_size($size,$type='') { @@ -318,8 +318,8 @@ function dol_string_nospecial($str,$newstr='_',$badchars='') /** * Returns text escaped for inclusion into javascript code * - * @param $stringtoescape String to escape - * @return string Escaped string + * @param string $stringtoescape String to escape + * @return string Escaped string */ function dol_escape_js($stringtoescape) { @@ -332,9 +332,9 @@ function dol_escape_js($stringtoescape) /** * Returns text escaped for inclusion in HTML alt or title tags * - * @param $stringtoescape String to escape - * @param $keepb Do not clean b tags - * @return string Escaped string + * @param string $stringtoescape String to escape + * @param int $keepb Do not clean b tags + * @return string Escaped string */ function dol_escape_htmltag($stringtoescape,$keepb=0) { @@ -358,8 +358,8 @@ function dol_escape_htmltag($stringtoescape,$keepb=0) * On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=6, LOG_DEBUG=6 si define_syslog_variables ou PHP 5.3+, 7 si dolibarr * On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7 * - * @param string message Line to log. Ne doit pas etre traduit si level = LOG_ERR - * @param int level Log level + * @param string $message Line to log. Ne doit pas etre traduit si level = LOG_ERR + * @param int $level Log level */ function dol_syslog($message, $level=LOG_INFO) { @@ -469,6 +469,7 @@ function dol_syslog($message, $level=LOG_INFO) /** * Show tab header of a card + * * @param links Array of tabs * @param active Active tab name * @param title Title @@ -482,6 +483,7 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto /** * Show tab header of a card + * * @param links Array of tabs * @param active Active tab name * @param title Title @@ -548,7 +550,8 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p /** * Show tab footer of a card - * @param notab 0=Add tab footer, 1=no tab footer + * + * @param int $notab 0=Add tab footer, 1=no tab footer */ function dol_fiche_end($notab=0) { @@ -557,7 +560,8 @@ function dol_fiche_end($notab=0) /** * Return tab footer of a card - * @param notab 0=Add tab footer, 1=no tab footer + * + * @param int $notab 0=Add tab footer, 1=no tab footer */ function dol_get_fiche_end($notab=0) { @@ -574,7 +578,8 @@ function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='',$enc /** * Output date in a string format according to outputlangs (or langs if not defined). - * Return charset is always UTF-8, except if encodetoouput is defined. In this cas charset is output charset. + * Return charset is always UTF-8, except if encodetoouput is defined. In this cas charset is output charset + * * @param time GM Timestamps date (or deprecated strings 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS') * @param format Output date format * "%d %b %Y", @@ -721,6 +726,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e /** * Convert a string date into a GM Timestamps date + * * @param string Date in a string * YYYYMMDD * YYYYMMDDHHMMSS @@ -771,7 +777,8 @@ function dol_stringtotime($string, $gm=1) /** * Return an array with date info - * PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows. + * PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows + * * @param timestamp Timestamp * @param fast Fast mode * @return array Array of informations @@ -825,6 +832,7 @@ function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$chec * Return a timestamp date built from detailed informations (by default a local PHP server timestamp) * Replace function mktime not available under Windows if year < 1970 * PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows + * * @param hour Hour (can be -1 for undefined) * @param minute Minute (can be -1 for undefined) * @param second Second (can be -1 for undefined) @@ -890,6 +898,7 @@ function dolibarr_date($fmt, $timestamp, $gm=false) /** * Returns formated date + * * @param fmt Format (Exemple: 'Y-m-d H:i:s') * @param timestamp Date. Example: If timestamp=0 and gm=1, return 01/01/1970 00:00:00 * @param gm 1 if timestamp was built with gmmktime, 0 if timestamp was build with mktime @@ -917,6 +926,7 @@ function dol_date($fmt, $timestamp, $gm=false) /** * Return string with formated size + * * @param size Size to print * @param shortvalue Tell if we want long value to use another unit (Ex: 1.5Kb instead of 1500b) * @param shortunit Use short value of size unit @@ -949,6 +959,7 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0) /** * Show Url link + * * @param url Url to show * @param target Target for link * @param max Max number of characters to show @@ -970,6 +981,7 @@ function dol_print_url($url,$target='_blank',$max=32) /** * Show EMail link + * * @param email EMail to show (only email, without 'Name of recipient' before) * @param cid Id of contact if known * @param socid Id of third party if known @@ -1026,6 +1038,7 @@ function dolibarr_print_phone($phone,$country="FR",$cid=0,$socid=0,$addlink=0,$s /** * Format phone numbers according to country + * * @param phone Phone number to format * @param country Country to use for formatting * @param cid Id of contact if known @@ -1104,6 +1117,7 @@ function dol_print_phone($phone,$country="FR",$cid=0,$socid=0,$addlink=0,$separ= /** * Return an IP formated to be shown on screen + * * @param ip IP * @param mode 1=return only country/flag,2=return only IP * @return string Formated IP, with country if GeoIP module is enabled @@ -1143,6 +1157,7 @@ function dol_print_ip($ip,$mode=0) /** * Return country code for current user. * If software is used inside a local network, detection may fails (we need a public ip) + * * @return string country code (fr, es, it, us, ...) */ function dol_user_country() @@ -1167,6 +1182,7 @@ function dol_user_country() /** * Format address string + * * @param address Address * @param htmlid Html ID * @param mode thirdparty|contact|member|other @@ -1212,9 +1228,10 @@ function dol_print_address($address, $htmlid='gmap', $mode, $id) /** - * Return true if email syntax is ok. - * @param address email (Ex: "toto@titi.com", "John Do ") - * @return boolean true if email syntax is OK, false if KO or empty string + * Return true if email syntax is ok + * + * @param string $address email (Ex: "toto@titi.com", "John Do ") + * @return boolean true if email syntax is OK, false if KO or empty string */ function isValidEmail($address) { @@ -1234,9 +1251,10 @@ function isValidEmail($address) } /** - * Return true if phone number syntax is ok. - * @param address phone (Ex: "0601010101") - * @return boolean true if phone syntax is OK, false if KO or empty string + * Return true if phone number syntax is ok + * + * @param string $address phone (Ex: "0601010101") + * @return boolean true if phone syntax is OK, false if KO or empty string */ function isValidPhone($address) { @@ -1245,10 +1263,11 @@ function isValidPhone($address) /** - * Make a strlen call. Works even if mbstring module not enabled. - * @param $string - * @param $stringencoding - * @return int + * Make a strlen call. Works even if mbstring module not enabled + * + * @param string $string String to calculate length + * @param string $stringencoding Encoding of string + * @return int Length of string */ function dol_strlen($string,$stringencoding='UTF-8') { @@ -1260,6 +1279,7 @@ function dol_strlen($string,$stringencoding='UTF-8') /** * Make a substring. Works even in mbstring module not enabled + * * @param $string * @param $start * @param $length @@ -2552,79 +2572,71 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar /** * Get title line of an array + * * @param name Label of field * @param thead For thead format * @param file Url used when we click on sort picto * @param field Field to use for new sorting * @param begin ("" by defaut) * @param moreparam Add more parameters on sort url links ("" by default) - * @param td Options of attribute td ("" by defaut) + * @param moreattrib Add more attributes on th ("" by defaut) * @param sortfield Current field used to sort * @param sortorder Current sort order */ -function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="") +function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="") { global $conf; - //print "$name, $file, $field, $begin, $options, $td, $sortfield, $sortorder
\n"; - + //print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder
\n"; + $out=''; - - if ($thead) + // If field is used as sort criteria we use a specific class + // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") + if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) { - $out.= ''.$name.''; + $out.= ''; } else { - // Le champ de tri est mis en evidence. - // Exemple si (sortfield,field)=("nom","xxx.nom") ou (sortfield,field)=("nom","nom") - if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) - { - $out.= ''; - } - else - { - $out.= ''; - } - $out.= $name; - - // If this is a sort field - if ($field) - { - $options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam); - $options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options); - $options=preg_replace('/&+/i','&',$options); - if (! preg_match('/^&/',$options)) $options='&'.$options; - - //print " "; - $out.= ''; - if (! $sortorder) - { - $out.= ''.img_down("A-Z",0).''; - $out.= ''.img_up("Z-A",0).''; - } - else - { - if ($field != $sortfield) - { - $out.= ''.img_down("A-Z",0).''; - $out.= ''.img_up("Z-A",0).''; - } - else { - $sortorder=strtoupper($sortorder); - if ($sortorder == 'DESC' ) { - $out.= ''.img_down("A-Z",0).''; - $out.= ''.img_up("Z-A",1).''; - } - if ($sortorder == 'ASC' ) { - $out.= ''.img_down("A-Z",1).''; - $out.= ''.img_up("Z-A",0).''; - } - } - } - } - $out.= ""; + $out.= ''; } - + $out.=$name; + + if (empty($thead) && $field) // If this is a sort field + { + $options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam); + $options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options); + $options=preg_replace('/&+/i','&',$options); + if (! preg_match('/^&/',$options)) $options='&'.$options; + + //print " "; + $out.= ''; + if (! $sortorder) + { + $out.= ''.img_down("A-Z",0).''; + $out.= ''.img_up("Z-A",0).''; + } + else + { + if ($field != $sortfield) + { + $out.= ''.img_down("A-Z",0).''; + $out.= ''.img_up("Z-A",0).''; + } + else { + $sortorder=strtoupper($sortorder); + if ($sortorder == 'DESC' ) { + $out.= ''.img_down("A-Z",0).''; + $out.= ''.img_up("Z-A",1).''; + } + if ($sortorder == 'ASC' ) { + $out.= ''.img_down("A-Z",1).''; + $out.= ''.img_up("Z-A",0).''; + } + } + } + } + $out.=''; + return $out; } @@ -2652,6 +2664,7 @@ function print_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpat /** * Load a title with picto + * * @param titre Title to show * @param mesg Added message to show on right * @param picto Icon to use before title (should be a 32x32 transparent png file) @@ -2684,6 +2697,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath /** * Print a title with navigation controls for pagination + * * @param titre Title to show (required) * @param page Numero of page (required) * @param file Url of page (required) @@ -2793,6 +2807,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so /** * Fonction servant a afficher les fleches de navigation dans les pages de listes + * * @param page Numero of page * @param file Lien * @param options Autres parametres d'url a propager dans les liens ("" par defaut) @@ -2817,6 +2832,7 @@ function print_fleche_navigation($page,$file,$options='',$nextpage,$betweenarrow /** * Fonction qui retourne un taux de tva formate pour visualisation * Utilisee dans les pdf et les pages html + * * @param rate Rate value to format (19.6 19,6 19.6% 19,6%,...) * @param addpercent Add a percent % sign in output * @param info_bits Miscellanous information on vat @@ -2845,6 +2861,7 @@ function vatrate($rate,$addpercent=false,$info_bits=0) /** * Fonction qui formate un montant pour visualisation * Fonction utilisee dans les pdf et les pages html + * * @param amount Montant a formater * @param html Type de formatage, html ou pas (par defaut) * @param outlangs Objet langs pour formatage text @@ -2917,7 +2934,8 @@ function price($amount, $html=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou /** * Function that return a number with universal decimal format (decimal separator is '.') from * an amount typed by a user. - * Function to use on each input amount before any numeric test or database insert. + * Function to use on each input amount before any numeric test or database insert + * * @param amount Amount to convert/clean * @param rounding ''=No rounding * 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT) @@ -3002,6 +3020,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0) /** * Return localtaxe rate for a particular tva + * * @param tva Vat taxe * @param local Local taxe to search and return * @param societe_acheteuse Object of buying third party @@ -3040,7 +3059,8 @@ function get_localtax($tva, $local, $societe_acheteuse="") /** * Return vat rate of a product in a particular selling country or default country - * vat if product is unknown. + * vat if product is unknown + * * @param idprod Id of product or 0 if not a predefined product * @param countrycode Country code (FR, US, IT, ...) * @return int <0 if KO, Vat rate if OK @@ -3099,6 +3119,7 @@ function get_product_vat_for_country($idprod, $countrycode) /** * Return localtax rate of a product in a particular selling country + * * @param idprod Id of product * @package local 1 for localtax1, 2 for localtax 2 * @param countrycode Country code (FR, US, IT, ...) @@ -3256,6 +3277,7 @@ function get_default_localtax($societe_vendeuse, $societe_acheteuse, $local, $id /** * Return yes or no in current language + * * @param yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false') * @param case 1=Yes/No, 0=yes/no * @param color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color. @@ -3284,6 +3306,7 @@ function yn($yesno, $case=1, $color=0) * Return a path to have a directory according to an id * Examples: '001' with level 3->"0/0/1/", '015' with level 3->"0/1/5/" * Examples: 'ABC-1' with level 3 ->"0/0/1/", '015' with level 1->"5/" + * * @param $num Id to develop * @param $level Level of development (1, 2 or 3 level) * @param $alpha Use alpha ref @@ -3310,6 +3333,7 @@ function create_exdir($dir) /** * Creation of a directory (recursive) + * * @param $dir Directory to create * @return int < 0 if KO, 0 = already exists, > 0 if OK */ @@ -3371,6 +3395,7 @@ function dol_mkdir($dir) /** * Return picto saying a field is required + * * @return string Chaine avec picto obligatoire */ function picto_required() @@ -3381,6 +3406,7 @@ function picto_required() /** * Clean a string from all HTML tags and entities + * * @param StringHtml String to clean * @param removelinefeed Replace also all lines feeds by a space * @return string String cleaned @@ -3405,7 +3431,8 @@ function dol_string_nohtmltag($StringHtml,$removelinefeed=1) /** - * Replace CRLF in string with a HTML BR tag. + * Replace CRLF in string with a HTML BR tag + * * @param stringtoencode String to encode * @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br * @param forxml false=Use
, true=Use
@@ -3435,7 +3462,8 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false) * - writeHTMLCell -> param must be encoded into HTML. * - MultiCell -> param must not be encoded into HTML. * Because writeHTMLCell convert also \n into
, if function - * is used to build PDF, nl2brmode must be 1. + * is used to build PDF, nl2brmode must be 1 + * * @param stringtoencode String to encode * @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example) * @param pagecodefrom Pagecode stringtoencode is encoded @@ -3462,6 +3490,7 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8') /** * This function is called to decode a HTML string (it decodes entities and br tags) + * * @param stringtodecode String to decode * @param pagecodeto Page code for result */ @@ -3477,6 +3506,7 @@ function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8') /** * This function remove all ending \n and br at end + * * @param stringtodecode String to decode */ function dol_htmlcleanlastbr($stringtodecode) @@ -3487,6 +3517,7 @@ function dol_htmlcleanlastbr($stringtodecode) /** * This function is called to decode a string with HTML entities (it decodes entities tags) + * * @param stringhtml stringhtml * @param pagecodeto Encoding of input string * @return string decodestring @@ -3499,6 +3530,7 @@ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8') /** * Replace html_entity_decode functions to manage errors + * * @param a * @param b * @param c @@ -3513,6 +3545,7 @@ function dol_html_entity_decode($a,$b,$c) /** * Replace htmlentities functions to manage errors + * * @param a * @param b * @param c @@ -3529,7 +3562,8 @@ function dol_htmlentities($a,$b,$c) /** * Check if a string is a correct iso string * If not, it will we considered not HTML encoded even if it is by FPDF. - * Example, if string contains euro symbol that has ascii code 128. + * Example, if string contains euro symbol that has ascii code 128 + * * @param s String to check * @return int 0 if bad iso, 1 if good iso */ @@ -3550,6 +3584,7 @@ function dol_string_is_good_iso($s) /** * Return nb of lines of a clear text + * * @param s String to check * @param maxchar Not yet used * @return int Number of lines @@ -3566,6 +3601,7 @@ function dol_nboflines($s,$maxchar=0) /** * Return nb of lines of a formated text with \n and
+ * * @param text Text * @param maxlinesize Largeur de ligne en caracteres (ou 0 si pas de limite - defaut) * @param charset Give the charset used to encode the $text variable in memory. @@ -3602,6 +3638,7 @@ function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8') /** * Same function than microtime in PHP 5 but compatible with PHP4 + * * @return float Time (millisecondes) with microsecondes in decimal part */ function dol_microtime_float() @@ -3612,6 +3649,7 @@ function dol_microtime_float() /** * Return if a text is a html content + * * @param msg Content to check * @param option 0=Full detection, 1=Fast check * @return boolean true/false @@ -4074,7 +4112,8 @@ function verifCond($strRights) /** * Replace eval function to add more security. - * This function is called by verifCond(). + * This function is called by verifCond() + * * @param string $s */ function dol_eval($s) diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index c30bea39788..3bae01cfd80 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -125,26 +125,26 @@ print ''.$langs->trans("Value").''; print "\n"; $var=!$var; -print ''; +print ''; print $langs->trans("PAYPAL_API_SANDBOX").''; print $form->selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1); print ''; $var=!$var; -print ''; +print ''; print $langs->trans("PAYPAL_API_USER").''; print ''; print '   '.$langs->trans("Example").': paypal_api1.mywebsite.com'; print ''; $var=!$var; -print ''; +print ''; print $langs->trans("PAYPAL_API_PASSWORD").''; print ''; print ''; $var=!$var; -print ''; +print ''; print $langs->trans("PAYPAL_API_SIGNATURE").''; print ''; print '
'.$langs->trans("Example").': ASsqXEmw4KzmX-CPChWSVDNCNfd.A3YNR7uz-VncXXAERFDFDFDF'; @@ -157,7 +157,7 @@ print ''.$langs->trans("Value").''; print "\n"; $var=!$var; -print ''; +print ''; print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").''; print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=>'Integral','paypalonly'=>'Paypal only'),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); print ''; @@ -240,7 +240,7 @@ print ''; print '

'; $token=''; -if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); +if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; // Url list print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':
'; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index e8c7b805f8f..fb0d19d721c 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1200,64 +1200,68 @@ padding: 0px 0px; /* For lists */ table.liste { -width: 100%; -border-collapse: collapse; -border-top-color: #FEFEFE; + width: 100%; + border-collapse: collapse; + border-top-color: #FEFEFE; -border-left-width: 1px; -border-left-color: #BBBBBB; -border-left-style: solid; + border-left-width: 1px; + border-left-color: #BBBBBB; + border-left-style: solid; -border-right-width: 1px; -border-right-color: #BBBBBB; -border-right-style: solid; + border-right-width: 1px; + border-right-color: #BBBBBB; + border-right-style: solid; -border-bottom-width: 1px; -border-bottom-color: #BBBBBB; -border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color: #BBBBBB; + border-bottom-style: solid; -margin-bottom: 2px; -margin-top: 0px; + margin-bottom: 2px; + margin-top: 0px; --moz-box-shadow: 4px 4px 4px #CCC; --webkit-box-shadow: 4px 4px 4px #CCC; -box-shadow: 4px 4px 4px #CCC; + -moz-box-shadow: 4px 4px 4px #CCC; + -webkit-box-shadow: 4px 4px 4px #CCC; + box-shadow: 4px 4px 4px #CCC; } table.liste td { -padding-right: 2px; + padding-right: 2px; } -tr.liste_titre { -height: 24px; -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #FFFFFF; -font-family: ; -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; -} -td.liste_titre { -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #FFFFFF; -font-family: ; -font-weight: normal; -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; -} -td.liste_titre_sel +tr.liste_titre { -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #FFFFFF; -font-family: ; -font-weight: normal; -/* text-decoration: underline; */ -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; + height: 24px; + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #FFFFFF; + font-family: ; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; +} +th.liste_titre, td.liste_titre +{ + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; +} +th.liste_titre_sel, td.liste_titre_sel +{ + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* text-decoration: underline; */ + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; } input.liste_titre { background: transparent; @@ -1274,19 +1278,6 @@ font-weight: normal; white-space: nowrap; } -th { -/* background: #7699A9; */ -background: #91ABB3; -color: #334444; -font-family: ; -font-weight: bold; -border-left: 1px solid #FFFFFF; -border-right: 1px solid #FFFFFF; -border-top: 1px solid #FFFFFF; -border-bottom: 1px solid #FFFFFF; -white-space: nowrap; -} - .impair { /* background: #d0d4d7; */ background: #eaeaea; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 4aa1e974344..7312b757d11 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -1402,8 +1402,8 @@ tr.liste_titre:first-child { background-position: top right; } -td.liste_titre_sel, -tr.liste_titre:first-child td { +th.liste_titre_sel, td.liste_titre_sel, +tr.liste_titre:first-child td { color: #FFFFFF !important; } @@ -1430,7 +1430,8 @@ tr.liste_titre td { background: none !important; } -td.liste_titre { +th.liste_titre, td.liste_titre +{ background-repeat: repeat-x; color: #333333; font-family: ; @@ -1438,6 +1439,7 @@ td.liste_titre { white-space: nowrap; background-image: none; background: none; + text-align: ; } /*tr.liste_titre select.flat { @@ -1453,7 +1455,8 @@ tr.liste_titre input.button { /*margin: 30px 10px 10px 0px;*/ } -td.liste_titre_sel { +th.liste_titre_sel, td.liste_titre_sel +{ background: #505050; background-repeat: repeat-x; color: #FFFFFF; @@ -1462,6 +1465,7 @@ td.liste_titre_sel { /* text-decoration: underline; */ /* border-bottom: 1px solid #FDFFFF; */ white-space: nowrap; + text-align: ; } input.liste_titre { @@ -1481,19 +1485,6 @@ white-space: nowrap; padding: 5px; } -th { -/* background: #7699A9; */ -background: #91ABB3; -color: #334444; -font-family: ; -font-weight: bold; -border-left: 1px solid #FFFFFF; -border-right: 1px solid #FFFFFF; -border-top: 1px solid #FFFFFF; -border-bottom: 1px solid #FFFFFF; -white-space: nowrap; -} - .impair { /* background: #d0d4d7; */ background: #eaeaea; @@ -2221,7 +2212,7 @@ a.cke_dialog_ui_button margin-left: -240px; margin-bottom: 30px; } - + div#infoVersion { position: relative; width: 100%; @@ -2231,14 +2222,14 @@ div#infoVersion { font-size: 10px; background-color: #D6D6D6; } - + div#logoBox { position: relative; width: 100%; height: auto; margin-top: 30px; } - + div#parameterBox { position: relative; width: 100%; @@ -2249,14 +2240,14 @@ div#parameterBox { background-repeat: no-repeat; background-position: top center; } - + div#parameterBox div { width: 100%; height: 20px; position: relative; line-height: 20px; } - + div#parameterBox div label { width: 190px; text-align: right; @@ -2264,7 +2255,7 @@ div#parameterBox div label { float: left; margin-right: 10px; } - + div#parameterBox div input[type="text"], div#parameterBox div input[type="password"] { width: 180px; @@ -2272,12 +2263,12 @@ div#parameterBox div input[type="password"] { font-size: 10px; margin-top: 2px; } - + div#connectionLine { margin: 10px 0px; text-align: center; } - + div#logBox { margin-top: 25px; } @@ -2285,7 +2276,7 @@ margin-top: 25px; div.captchaBox { margin-top: 10px; } - + div.captchaImg { margin-bottom: 10px; margin-top: 5px; @@ -2295,7 +2286,7 @@ div.captchaImg { img#captcha { margin-left: 200px; } - + div#infoLogin { width: 100%; height: auto; @@ -2314,11 +2305,11 @@ div.other { left: 50%; margin-left: -240px; } - + form.listactionsfilter img { display: none; } - + form.listactionsfilter input[type="submit"] { margin: 2px 0px; } diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 4af783fde2d..42f43efc8c8 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -1339,30 +1339,31 @@ table.liste td { } tr.liste_titre { -height: 20px; -color: #842F00; -font-weight: bold; -font-family: "Trebuchet MS",Arial,Helvetica,sans-serif; -/*border-bottom: 1px solid #FDFFFF;*/ -border-radius: 8px; -line-height: 18px; -padding-left: 10px; -padding-right: 10px; -white-space: nowrap; + height: 20px; + color: #842F00; + font-weight: bold; + font-family: "Trebuchet MS",Arial,Helvetica,sans-serif; + /*border-bottom: 1px solid #FDFFFF;*/ + border-radius: 8px; + line-height: 18px; + padding-left: 10px; + padding-right: 10px; + white-space: nowrap; } - -tr.liste_titre td { - padding-left: 6px; - padding-right: 6px; - /*vertical-align: text-top;*/ -} - -td.liste_titre_sel +th.liste_titre, td.liste_titre { -background-position: top right; -color: #A51B00; -font-weight: bold; -white-space: nowrap; + padding-left: 6px; + padding-right: 6px; + /*vertical-align: text-top;*/ + text-align: ; +} +th.liste_titre_sel, td.liste_titre_sel +{ + background-position: top right; + color: #A51B00; + font-weight: bold; + white-space: nowrap; + text-align: ; } input.liste_titre { @@ -1383,19 +1384,6 @@ font-weight: normal; white-space: nowrap; } -th { -/* background: #7699A9; */ -background: #91ABB3; -color: #334444; -font-family: ; -font-weight: bold; -border-left: 1px solid #FFFFFF; -border-right: 1px solid #FFFFFF; -border-top: 1px solid #FFFFFF; -border-bottom: 1px solid #FFFFFF; -white-space: nowrap; -} - .impair { /* background: #d0d4d7; */ background: #eaeaea; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 9de61eaaa77..58e2ced4c1e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -228,12 +228,12 @@ div.fichecenter { div.fichethirdleft { browser->phone)) { print "float: ".$left.";\n"; } ?> browser->phone)) { print "width: 35%;\n"; } ?> - browser->phone)) { print "padding-bottom: 6px;\n"; } ?> + browser->phone)) { print "padding-bottom: 6px;\n"; } ?> } div.fichetwothirdright { browser->phone)) { print "float: ".$left.";\n"; } ?> browser->phone)) { print "width: 65%;\n"; } ?> - browser->phone)) { print "padding-bottom: 6px\n"; } ?> + browser->phone)) { print "padding-bottom: 6px\n"; } ?> } div.fichehalfleft { browser->phone)) { print "float: ".$left.";\n"; } ?> @@ -1222,59 +1222,63 @@ padding: 0px 0px; /* For lists */ table.liste { -width: 100%; -border-collapse: collapse; -border-top-color: #FEFEFE; + width: 100%; + border-collapse: collapse; + border-top-color: #FEFEFE; -border-right-width: 1px; -border-right-color: #BBBBBB; -border-right-style: solid; + border-right-width: 1px; + border-right-color: #BBBBBB; + border-right-style: solid; -border-bottom-width: 1px; -border-bottom-color: #BBBBBB; -border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color: #BBBBBB; + border-bottom-style: solid; -margin-bottom: 2px; -margin-top: 0px; + margin-bottom: 2px; + margin-top: 0px; --moz-box-shadow: 4px 4px 4px #CCC; --webkit-box-shadow: 4px 4px 4px #CCC; -box-shadow: 4px 4px 4px #CCC; + -moz-box-shadow: 4px 4px 4px #CCC; + -webkit-box-shadow: 4px 4px 4px #CCC; + box-shadow: 4px 4px 4px #CCC; } table.liste td { -padding-right: 2px; + padding-right: 2px; } -tr.liste_titre { -height: 20px !important; -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #334444; -font-family: ; -border-bottom: 1px solid #FDFFFF; -white-space: nowrap; -} -td.liste_titre { -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #334444; -font-family: ; -font-weight: normal; -border-bottom: 1px solid #FDFFFF; -white-space: nowrap; -} -td.liste_titre_sel +tr.liste_titre { -background: #7699A9; -background-image: url(); -background-repeat: repeat-x; -color: #F5FFFF; -font-family: ; -font-weight: normal; -border-bottom: 1px solid #FDFFFF; -white-space: nowrap; + height: 20px !important; + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #334444; + font-family: ; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; +} +th.liste_titre, td.liste_titre +{ + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #334444; + font-family: ; + font-weight: normal; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; + text-align: ; +} +th.liste_titre_sel, td.liste_titre_sel +{ + background: #7699A9; + background-image: url(); + background-repeat: repeat-x; + color: #F5FFFF; + font-family: ; + font-weight: normal; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; + text-align: ; } input.liste_titre { background: #7699A9; @@ -1292,18 +1296,6 @@ font-weight: normal; white-space: nowrap; } -th { -/* background: #7699A9; */ -background: #91ABB3; -color: #334444; -font-family: ; -font-weight: bold; -border-left: 1px solid #FFFFFF; -border-right: 1px solid #FFFFFF; -border-top: 1px solid #FFFFFF; -border-bottom: 1px solid #FFFFFF; -white-space: nowrap; -} .impair { /* background: #d0d4d7; */ diff --git a/htdocs/theme/phones/smartphone/theme/default/default.css.php b/htdocs/theme/phones/smartphone/theme/default/default.css.php index 89048687034..4145de0a326 100644 --- a/htdocs/theme/phones/smartphone/theme/default/default.css.php +++ b/htdocs/theme/phones/smartphone/theme/default/default.css.php @@ -316,33 +316,37 @@ padding: 0px 0px; -tr.liste_titre { -height: 24px; -background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; -border: 1px solid #456F9A; -color: #FFFFFF; -font-family: ; -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; -} -td.liste_titre { -background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; -border: 1px solid #456F9A; -color: #FFFFFF; -font-family: ; -font-weight: normal; -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; -} -td.liste_titre_sel +tr.liste_titre { -background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; -color: #FFFFFF; -font-family: ; -font-weight: normal; -/* text-decoration: underline; */ -/* border-bottom: 1px solid #FDFFFF; */ -white-space: nowrap; + height: 24px; + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + border: 1px solid #456F9A; + color: #FFFFFF; + font-family: ; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; +} +th.liste_titre, td.liste_titre +{ + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + border: 1px solid #456F9A; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; +} +th.liste_titre_sel, td.liste_titre_sel +{ + background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0; + color: #FFFFFF; + font-family: ; + font-weight: normal; + /* text-decoration: underline; */ + /* border-bottom: 1px solid #FDFFFF; */ + white-space: nowrap; + text-align: ; } input.liste_titre { background: transparent;