[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/35: Fix : check if a LOB exists before unl
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/35: Fix : check if a LOB exists before unlinking Doc |
Date: |
Tue, 24 May 2016 21:25:38 +0000 (UTC) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b330f103f1d953c11291727197a5975d75309d63
Author: Dany De Bontridder <address@hidden>
Date: Sat Apr 2 04:29:21 2016 +0200
Fix : check if a LOB exists before unlinking
Doc
---
include/lib/class_database.php | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/lib/class_database.php b/include/lib/class_database.php
index 6e775ba..48c7dd2 100644
--- a/include/lib/class_database.php
+++ b/include/lib/class_database.php
@@ -20,13 +20,15 @@
// Copyright Author Dany De Bontridder address@hidden
-/**\file
+/**
+ * \file
* \brief contains the class for connecting to a postgresql database
*/
require_once NOALYSS_INCLUDE.'/constant.php';
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
-/**\brief
+/**
+ * \brief
* This class allow you to connect to the postgresql database, execute sql,
retrieve data
*
*/
@@ -202,7 +204,8 @@ class Database
return $this->ret;
}
- /** \brief Count the number of row returned by a sql statement
+ /**
+ * \brief Count the number of row returned by a sql statement
*
* \param $p_sql sql string
* \param $p_array if not null we use the safer pg_query_params
@@ -214,7 +217,8 @@ class Database
return pg_NumRows($r_sql);
}
- /**\brief get the current sequence value
+ /**
+ * \brief get the current sequence value
*/
function get_current_seq($p_seq)
@@ -223,7 +227,8 @@ class Database
return $Res;
}
- /**\brief get the next sequence value
+ /**
+ * \brief get the next sequence value
*/
function get_next_seq($p_seq)
@@ -234,7 +239,7 @@ class Database
}
/**
- * @ brief : start a transaction
+ * @brief : start a transaction
*
*/
function start()
@@ -611,7 +616,8 @@ class Database
return true;
}
- /**\brief test if a table exist
+ /**
+ * \brief test if a table exist
* \param $p_name table name
* \param $schema name of the schema default public
* \return true if a table exist otherwise false
@@ -951,6 +957,7 @@ class Database
function lo_unlink($p_oid)
{
+ if ( ! $this->exist_blob($p_oid)) return;
return pg_lo_unlink($this->db, $p_oid);
}
@@ -965,7 +972,8 @@ class Database
return pg_prepare($this->db, $p_string, $p_sql);
}
- /**\brief wrapper for the function pg_execute
+ /**
+ * \brief wrapper for the function pg_execute
* \param $p_string string name of the stmt given in pg_prepare function
* \param $p_array contains the variables
* \note set this->ret to the return of pg_execute
@@ -978,7 +986,8 @@ class Database
return $this->ret;
}
- /**\brief wrapper for the function pg_lo_export
+ /**
+ * \brief wrapper for the function pg_lo_export
* \param $p_oid is the oid of the log
* \param $tmp is the file
* \return result of the operation
- [Noalyss-commit] [noalyss] 13/35: translation, (continued)
- [Noalyss-commit] [noalyss] 13/35: translation, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 19/35: CFGPLUGIN : Add filter to plugin table, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 20/35: Fiche : détail fiche , change taille id fiche, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 25/35: Fix several small bugs, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 24/35: Cosmetic change CSS for mobile, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 11/35: Anc_Operation :fix undefined offset in Anc_Operation::save_form_plan, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 32/35: Fix problem with orphan_lob_clean instead of clean_orphan_lob and fix problem when checking analytic when amount == 0, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 07/35: Improve : Admin/user for admin , no database details since he can connect all of them, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 31/35: Export CSV print ledger , add the qcode for ODS and FIN, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 30/35: Update IDate with HTML5, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 06/35: Fix : check if a LOB exists before unlinking Doc,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 16/35: Limit email by folder, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 34/35: Adapt CSS for mobile, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 28/35: Improve Doc : doxygen, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 29/35: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 04/35: Fix bug with pg_largeobject, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 03/35: Fix small bug : PHP Notice: Undefined property: Acc_Tva::$tva_both_side, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 33/35: Translation, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 21/35: Translate, Dany De Bontridder, 2016/05/24
- [Noalyss-commit] [noalyss] 09/35: Translation , after export from ANC GREAT LEDGER does not clean old files, Dany De Bontridder, 2016/05/24