+ function setting($section, $key) {
+ $result = common_config($section, $key);
+ if ($key == 'file_quota') {
+ // hack: adjust for the live upload limit
+ if (common_config($section, 'uploads')) {
+ $max = ImageFile::maxFileSizeInt();
+ } else {
+ $max = 0;
+ }
+ return min($result, $max);
+ }
+ return $result;
+ }
+