Commit 06649c58 authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

fix multidomain bug

parent 6644adf2
......@@ -20,8 +20,12 @@ if (isset($_GET['logout']) || !isset($_SESSION['user'])) {
}
if (isset($_POST['quota'])) {
$name = $_POST['quota'];
$db = new SQLite3($config['home'].$name.'.db');
if ($config['multidomain']) {
list($name, $domain, $tld) = explode('.', $_POST['quota'], 3);
$home = str_replace('%DOMAIN%', $domain, $config['home']).$name;
}
else { $home = $config['home'].$db->escapeString($_POST['quota']); }
$db = new SQLite3($home.'.db');
$quota = $db->escapeString($_POST['arg']) * 1024 * 1024;
$db->exec("update settings set value='$quota' where key='diskquota'");
$db->close();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment