clockwerk-www

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 52  →  ?path2? @ 53
/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;
}
/applyoar.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;
}
}
 
// Hostname or IP of your OpenSim MySQL server.
$MYSQL_HOSTNAME='localhost';
// Username of the OpenSim MySQL user.
@@ -73,9 +55,9 @@
if ($result->RegionName == $region) {
if (file_exists($file)) {
$req->admin_console_command('change region '.$region);
wasChown($file, 'opensim', 'opensim');
chmod($file, 0644);
$req->admin_console_command('load oar '.$file);
wasChown($file, 'www-data', 'www-data');
chmod($file, 0600);
header('Location: welcome.php');
exit;
}