aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/wallabag_compatibility_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/wallabag_compatibility_test.php')
-rw-r--r--install/wallabag_compatibility_test.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/install/wallabag_compatibility_test.php b/install/wallabag_compatibility_test.php
index 8a0656cf..1093b2a3 100644
--- a/install/wallabag_compatibility_test.php
+++ b/install/wallabag_compatibility_test.php
@@ -52,4 +52,36 @@ function isPassing() {
52 return !in_array(false, $status); 52 return !in_array(false, $status);
53} 53}
54 54
55/* Function taken from at http://php.net/manual/en/function.rmdir.php#110489
56 * Idea : nbari at dalmp dot com
57 * Rights unknown
58 * Here in case of .gitignore files
59 */
60
61function delTree($dir) {
62 $files = array_diff(scandir($dir), array('.','..'));
63 foreach ($files as $file) {
64 (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
65 }
66 return rmdir($dir);
67 }
68
69function generate_salt() {
70 mt_srand(microtime(true)*100000 + memory_get_usage(true));
71 return md5(uniqid(mt_rand(), true));
72}
73
74function executeQuery($handle, $sql, $params) {
75 try
76 {
77 $query = $handle->prepare($sql);
78 $query->execute($params);
79 return $query->fetchAll();
80 }
81 catch (Exception $e)
82 {
83 return FALSE;
84 }
85}
86
55?> \ No newline at end of file 87?> \ No newline at end of file