summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-23 13:03:39 +0400
committerAndrew Dolgov <[email protected]>2012-08-23 13:03:39 +0400
commite3449aa1aa388cfa45d92210c06b74fc7b7397e7 (patch)
tree0a5bd2529087cc4cbe604e2dd25a3b2897c2d1c2 /include
parent9aceda3afc70eba20fa236c46c050b1e63ca07ca (diff)
add experimental self-updating script
Diffstat (limited to 'include')
-rw-r--r--include/functions.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php
index 957146f1f..69b481ac4 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -5506,4 +5506,18 @@
return null;
}
+
+ function tmpdirname($path, $prefix) {
+ // Use PHP's tmpfile function to create a temporary
+ // directory name. Delete the file and keep the name.
+ $tempname = tempnam($path,$prefix);
+ if (!$tempname)
+ return false;
+
+ if (!unlink($tempname))
+ return false;
+
+ return $tempname;
+ }
+
?>