aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-03 11:08:39 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-03 11:08:39 +0100
commit9fcadc2d7c5a81547011d18d8e5e3d6b0475d50e (patch)
treeee85e1d40b69e7d1ce6b14cc999a37df5bfe0c04 /include
parent9ef6c57ca59aa318a3564f6b48c6442870650d3e (diff)
downloadvolse-hubzilla-9fcadc2d7c5a81547011d18d8e5e3d6b0475d50e.tar.gz
volse-hubzilla-9fcadc2d7c5a81547011d18d8e5e3d6b0475d50e.tar.bz2
volse-hubzilla-9fcadc2d7c5a81547011d18d8e5e3d6b0475d50e.zip
prevent incompatible export files (osada/zap) from being imported (manual patch from dev)
Diffstat (limited to 'include')
-rw-r--r--include/text.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index d99e8fd60..29daa74e8 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3217,6 +3217,28 @@ function array2XML($obj, $array) {
}
}
+function array_path_exists($str,$arr) {
+
+ $ptr = $arr;
+ $search = explode('/', $str);
+
+ if($search) {
+ foreach($search as $s) {
+ if(array_key_exists($s,$ptr)) {
+ $ptr = $ptr[$s];
+ }
+ else {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ return false;
+
+}
+
+
/**
* @brief Inserts an array into $table.
*
@@ -3480,3 +3502,4 @@ function print_val($v) {
return $v;
}
+