It's me again

The problem :
If you try to change the quota from a existing account you get a database error (at least with postgresql) from manageaccount.php and the quota will not be changed.

The following patch works for me ...

--- svn-latest/manageaccount.php        2006-08-03 11:00:04.000000000 +0200
+++ /srv/www/web-cyradm/manageaccount.php       2006-08-04 09:36:11.000000000 
+0200
@@ -269,7 +269,7 @@
                                }
                                $q = $cyr_conn->getquota("user" . $_sep . 
$_POST['username']);
                                if ($q['qmax']!=$_POST['quota']) {
- $query = "SELECT `prefix`,`domainquota` FROM `domain` WHERE `domain_name`='".$_POST['domain']."'"; + $query = "SELECT prefix,domainquota FROM domain WHERE domain_name='".$_POST['domain']."'";
                                $result = $handle->query($query);
                                if (DB::isError($result)) {
                                        die (_("Database error"));
@@ -283,7 +283,7 @@
if ($domain_quota!=0 && $q['qmax']<(int)$_POST['quota'] && $q['qmax']!="NOT-SET") {
                                        $used_domain_quota = 0;

- $query = "SELECT `username` FROM `accountuser` WHERE `prefix`='$prefix' ORDER BY `username`"; + $query = "SELECT username FROM accountuser WHERE prefix='$prefix' ORDER BY username";
                                        $result = $handle->query($query);
                                        if (DB::isError($result)) {
                                                die (_("Database error"));


Regards

Andreas


_______________________________________________
This mailing list is hosted and supported
by bit-heads GmbH | http://www.bit-heads.ch

_______________________________________________
Web-cyradm mailing list
[email protected]
http://www.web-cyradm.org/mailman/listinfo/web-cyradm

Reply via email to