From 5c7653670d3cfd755e3f5a620f89473fedf90a03 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Tue, 16 Oct 2012 09:30:58 +0000 Subject: [PATCH] =?UTF-8?q?Newone.php=20applique=20les=20quotas=20de=20man?= =?UTF-8?q?i=C3=A8re=20standart.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bureau/class/m_quota.php | 2 +- install/newone.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bureau/class/m_quota.php b/bureau/class/m_quota.php index 53f2da2a..2d63a396 100644 --- a/bureau/class/m_quota.php +++ b/bureau/class/m_quota.php @@ -95,7 +95,7 @@ class m_quota { global $db,$err; $err->log("quota","apply_greater_quota"); $q="insert into quotas select m.uid as uid, d.quota as name, d.value as total from membres m, defquotas d left join quotas q on q.name=d.quota where m.type=d.type ON DUPLICATE KEY UPDATE total = greatest(d.value, quotas.total);"; - $db->query($q); + if (!$db->query($q)) return false; return true; } diff --git a/install/newone.php b/install/newone.php index e3b4411a..f72192e2 100644 --- a/install/newone.php +++ b/install/newone.php @@ -53,11 +53,9 @@ if(!$db->query("update membres set su=1 where login='admin';")) exit(1); // On lui attribue des quotas par defaut -// 10 domains, 10 stats, 10 bases mysql, 20 ftp et 100 emails -if(!($db->query("update quotas,membres set quotas.total=10 where (quotas.name='stats' or quotas.name='sta2' or quotas.name='mysql' or quotas.name='dom') and quotas.uid=membres.uid and membres.login='admin' ;") - && $db->query("update quotas,membres set quotas.total=20 where quotas.name='ftp' and quotas.uid=membres.uid and membres.login='admin' ;") - && $db->query("update quotas,membres set quotas.total=100 where quotas.name='mail' and quotas.uid=membres.uid and membres.login='admin' ;"))) +if(!$quota->synchronise_user_profile()) { exit(1); +} exit(0); ?>