clockwerk-www
/applyiar.php |
@@ -4,24 +4,6 @@ |
// Copyright (C) Wizardry and Steamworks 2014 - License: MIT // |
/////////////////////////////////////////////////////////////////////////// |
|
/////////////////////////////////////////////////////////////////////////// |
// Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 // |
/////////////////////////////////////////////////////////////////////////// |
function wasChown($path, $uid, $gid) { |
switch(filetype($path)) { |
case 'dir': |
if(($dir = opendir($path)) === false) break; |
while(false !== ($file = readdir($dir))) { |
if($file == '.' || $file == '..') continue; |
wasChown($path.'/'.$file, $uid, $gid); |
} |
case 'file': |
chown($path, $uid); |
chgrp($path, $gid); |
break; |
} |
} |
|
require_once 'lib/recaptchalib.php'; |
require_once 'lib/wasRemoteAdmin.php'; |
|
@@ -48,9 +30,9 @@ |
} |
} |
if (file_exists($file)) { |
wasChown($file, 'opensim', 'opensim'); |
chmod($file, 0644); |
$req->admin_console_command('load iar '.$file. ' '.$last.' / '.$file); |
wasChown($file, 'www-data', 'www-data'); |
chmod($file, 0600); |
header('Location: welcome.php'); |
exit; |
} |