[Web-cyradm] Patch against SVN latest

lst_hoe01 at kwsoft.de lst_hoe01 at kwsoft.de
Fri Aug 4 09:48:14 CEST 2006


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




More information about the Web-cyradm mailing list