Changeset 288
- Timestamp:
- 04/20/08 00:50:20 (9 months ago)
- Files:
-
- trunk/Framework/Module/Accounts/Limits.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Framework/Module/Accounts/Limits.php
r287 r288 125 125 } 126 126 // To MB 127 if ($this->userInfo['quota'] > 0) { 128 $defaults['quota'] = ($this->userInfo['quota'] / 1024) / 1024; 129 } 127 $quota = (int)$this->userInfo['quota']; 128 if ($quota > 0) { 129 $quota = ((int)$quota / 1024) / 1024; 130 } 131 $defaults['quota'] = $quota; 130 132 131 133 $url = './?module=Accounts&class=Limits&event=modifyLimitsNow&'; … … 174 176 $form->registerRule('zero', 'regex', '/^(0|[1-9][0-9]+)$/'); 175 177 $form->addRule('quota', 176 _('Error: only integers of 0 and greater a llowed here'),178 _('Error: only integers of 0 and greater are allowed for quotas'), 177 179 'zero', null, 'client'); 180 $form->addRule('quota', 181 _('Error: only integers of 0 and greater are allowed for quotas'), 182 'numeric', null, 'client'); 178 183 $form->applyFilter('__ALL__', 'trim'); 179 184 … … 204 209 $limits['quota'] = ($limits['quota'] * 1024) * 1024; 205 210 } 206 // Convert 0 to NO _QUOTA207 $userInfo['quota'] = $limits['quota'] > 0 ? $limits['quota'] : 'NO _QUOTA';211 // Convert 0 to NOQUOTA 212 $userInfo['quota'] = $limits['quota'] > 0 ? $limits['quota'] : 'NOQUOTA'; 208 213 unset($limits['quota']); 209 214 // Set disable flags to zero if not set
