Diff of /adminer/include/functions.inc.php [64297a] .. [f29a7c] Maximize Restore

  Switch to side-by-side view

--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -912,9 +912,10 @@
 }
 
 /** Read password from file adminer.key in temporary directory or create one
+* @param bool
 * @return string or false if the file can not be created
 */
-function password_file() {
+function password_file($create) {
 	$dir = ini_get("upload_tmp_dir"); // session_save_path() may contain other storage path
 	if (!$dir) {
 		if (function_exists('sys_get_temp_dir')) {
@@ -930,7 +931,7 @@
 	}
 	$filename = "$dir/adminer.key";
 	$return = @file_get_contents($filename); // @ - can not exist
-	if ($return) {
+	if ($return || !$create) {
 		return $return;
 	}
 	$fp = @fopen($filename, "w"); // @ - can have insufficient rights //! is not atomic