From ec38c5c3fb277aa7a4e43a44e3a5376682925dfb Mon Sep 17 00:00:00 2001 From: torzak Date: Tue, 5 Nov 2013 12:36:06 +0100 Subject: [PATCH] Update Auth.php Fixed an issue when we try to install baikal on Synology NAS. touch() function is not supported on this hardaware. use file_put_contents () does not interfere with the logic of the code and provides better compatibility as touch() also has other problems on Windows OS http://synology.com http://blog.idleman.fr/installez-votre-synchronisateurs-de-contacts-chez-vous-avec-baikal/ Former-commit-id: 23646af674e27252f393ed2b45e5ae498edc33ce --- Core/Frameworks/BaikalAdmin/Core/Auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Frameworks/BaikalAdmin/Core/Auth.php b/Core/Frameworks/BaikalAdmin/Core/Auth.php index d291560..ed58a60 100755 --- a/Core/Frameworks/BaikalAdmin/Core/Auth.php +++ b/Core/Frameworks/BaikalAdmin/Core/Auth.php @@ -59,7 +59,7 @@ class Auth { if((time() - $iTime) < 3600) { # file has been created/updated less than an hour ago; update it's mtime if(is_writable($sEnableFile)) { - @touch($sEnableFile); + @file_put_contents($sEnableFile, ''); } $bLocked = FALSE; } else { @@ -125,4 +125,4 @@ class Auth { public static function lockInstall() { @unlink(PROJECT_PATH_SPECIFIC . "ENABLE_INSTALL"); } -} \ No newline at end of file +}