projects
/
friendica.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18078ce
)
Prevent side effect with cascade => false in dba::delete
author
Hypolite Petovan
<mrpetovan@gmail.com>
Sun, 22 Apr 2018 08:46:46 +0000
(
04:46
-0400)
committer
Hypolite Petovan
<mrpetovan@gmail.com>
Sun, 22 Apr 2018 08:46:46 +0000
(
04:46
-0400)
include/dba.php
patch
|
blob
|
history
diff --git
a/include/dba.php
b/include/dba.php
index 3209021cf2a1f1819408bfe0365b3cd04e4bef5f..b41a7aab76bfd00a265196ff88916b4bb095b8dd 100644
(file)
--- a/
include/dba.php
+++ b/
include/dba.php
@@
-894,7
+894,7
@@
class dba {
}
// Is there a relation entry for the table?
- if (isset(self::$relation[$table])) {
+ if (
$cascade &&
isset(self::$relation[$table])) {
// We only allow a simple "one field" relation.
$field = array_keys(self::$relation[$table])[0];
$rel_def = array_values(self::$relation[$table])[0];