[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 79/323: before deleting a card , check if it
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 79/323: before deleting a card , check if it is not used as an attribute in another card |
Date: |
Wed, 14 Mar 2018 17:38:27 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c157929c84c4eb9b2c87bcdd8215187593c4d63d
Author: Dany De Bontridder <address@hidden>
Date: Wed Jan 24 19:06:55 2018 +0100
before deleting a card , check if it is not used as an attribute in
another card
---
include/class/fiche.class.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 86c5253..ecc0b57 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -1984,6 +1984,16 @@ class Fiche
[$this->id]);
if ( $count > 0 ) return TRUE;
+ $count=$this->cn->get_value("select count(*)
+ select count(*)
+ from attr_def
+ join fiche_detail using (ad_id)
+ where ad_type='card'
+ and ad_value=$1"
+ ,[$qcode]);
+
+ if ( $count > 0 ) return TRUE;
+
return FALSE;
}
/*\brief remove a card without verification */
- [Noalyss-commit] [noalyss] 80/323: before deleting a card , check if it is not used as an attribute in another card, (continued)
- [Noalyss-commit] [noalyss] 80/323: before deleting a card , check if it is not used as an attribute in another card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 78/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 70/323: Task #0001530: Réécriture PRINTJRN : export CSV : Purchase List (L), Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 73/323: Missing import of icon_action, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 75/323: Merge branch 'rewrite-printjrn', Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 76/323: Small bug in save_card, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 71/323: task #1531: Historique poste et fiche d'après exercice opération, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 83/323: Esthétique Recherche action, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 68/323: Task #0001530: Réécriture PRINTJRN Add Financial Ledger Adapt test file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 61/323: Fix some issues with PRINTJRN, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 79/323: before deleting a card , check if it is not used as an attribute in another card,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 04/323: Improve Doxygen documentation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 60/323: remove deprecated theme, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 56/323: Task #0001527: Effacement du champ code fiche : bouton, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 43/323: Rewriting Change class Own by Noalyss_Parameter_Folder, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 84/323: Doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 81/323: task #1531: Historique poste et fiche d'après exercice opération Fait aussi pour le bouton historique, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 85/323: cosmetique, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 82/323: Esthétique Recherche action, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 88/323: comment, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 93/323: Predefined operation fix cosmetic, Dany De Bontridder, 2018/03/14