X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/cd86d83c4781a5c3024f794390fc1127dbffc501..9a51f6fc76ce0b60829cc31ccab9643c73b26440:/lib/functions.php
diff --git a/lib/functions.php b/lib/functions.php
index 546decc..e72359e 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -788,6 +788,95 @@ function jirafeau_admin_clean_async()
}
return $count;
}
+
+/**
+ * Better strval function for debug purposes
+ */
+function jirafeau_strval($value)
+{
+ if (gettype($value) == "boolean") {
+ return $value ? 'true' : 'false';
+ }
+ return strval($value);
+}
+
+/**
+ * Show file/folder permissions
+ */
+function jirafeau_fileperms($path)
+{
+ $out = substr(sprintf("%o", @fileperms($path)), -4) . ", ";
+ $out .= "read " . (is_readable($path) ? "OK" : "KO") . ", ";
+ $out .= "write " . (is_writable($path) ? "OK" : "KO");
+ return $out;
+}
+
+/**
+ * Show some useful informations for bug reporting.
+ */
+function jirafeau_admin_bug_report($cfg)
+{
+ $out = "
";
+ return $out;
+}
+
/**
* Read async transfert informations
* @return array containing informations.