[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r573 - in trunk/rapport_avance: . include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r573 - in trunk/rapport_avance: . include |
Date: |
Thu, 7 Nov 2013 16:40:34 +0100 (CET) |
Author: danydb
Date: 2013-11-07 16:40:33 +0100 (Thu, 07 Nov 2013)
New Revision: 573
Modified:
trunk/rapport_avance/include/class_rapav_listing.php
trunk/rapport_avance/rapav_javascript.js
Log:
Add exception
Documentation
Modified: trunk/rapport_avance/include/class_rapav_listing.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_listing.php 2013-11-07
15:34:17 UTC (rev 572)
+++ trunk/rapport_avance/include/class_rapav_listing.php 2013-11-07
15:40:33 UTC (rev 573)
@@ -145,24 +145,44 @@
throw $ex;
}
}
-
+/**
+ * @brief remove a document template
+ * @global type $cn database connection
+ * @return type
+ */
function remove_modele() {
global $cn;
if ($this->Data->l_lob == null)
return;
- $cn->start();
- $this->Data->cn->lo_unlink($this->Data->l_lob);
- $this->Data->l_filename = null;
- $this->Data->l_lob = null;
- $this->Data->l_size = null;
- $this->Data->l_mimetype = null;
- $this->Data->update();
- $cn->commit();
+ try {
+ $cn->start();
+ $this->Data->cn->lo_unlink($this->Data->l_lob);
+ $this->Data->l_filename = null;
+ $this->Data->l_lob = null;
+ $this->Data->l_size = null;
+ $this->Data->l_mimetype = null;
+ $this->Data->update();
+ $cn->commit();
+ } catch (Exception $e) {
+ $cn->rollback;
+ throw $ex;
+
+ }
}
+ /**
+ * @brief delete a listing + lobs
+ * @throws type
+ */
function delete()
{
- $this->remove_modele();
- $this->Data->delete();
+ try {
+ $this->remove_modele();
+ $this->Data->delete();
+ } catch (Exception $e) {
+ $cn->rollback;
+ throw $ex;
+
+ }
}
}
Modified: trunk/rapport_avance/rapav_javascript.js
===================================================================
--- trunk/rapport_avance/rapav_javascript.js 2013-11-07 15:34:17 UTC (rev
572)
+++ trunk/rapport_avance/rapav_javascript.js 2013-11-07 15:40:33 UTC (rev
573)
@@ -481,7 +481,7 @@
}
}
/**
- * Check that the name is not empty before saving a new listing
+ * @brief Check that the name is not empty before saving a new listing
* @param {type} form_id
* @returns {Boolean}
*/
@@ -494,7 +494,15 @@
}
return true;
}
-
+/**
+ * @brief Remove a document from listing
+ * @param {type} json
+ * - gDossier is the dossier id
+ * - ac is the AC CODE
+ * - pc is the plugin CODE
+ * - cin not used
+ * - cout span id where is the name of file
+ */
function listing_remove_modele(json)
{
console.log(json)
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r573 - in trunk/rapport_avance: . include,
phpcompta-dev <=