diff options
| author | 2015-09-12 18:15:46 +0200 | |
|---|---|---|
| committer | 2015-09-12 18:15:46 +0200 | |
| commit | 133e369afff02e5984fe4ce5109e33fd2fbccfc7 (patch) | |
| tree | 445feb4bf7631f7f10d1d715dab297afca3cc65c /app/Controllers/configureController.php | |
| parent | f148e3938cc8daaaef1c71853594fbe142a1329e (diff) | |
| parent | 0204e8ff08ba9ae103c46d08484cf30aedfb9148 (diff) | |
Version 1.1.3-beta1.1.3-beta
Diffstat (limited to 'app/Controllers/configureController.php')
| -rwxr-xr-x | app/Controllers/configureController.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 248a3edcc..0dc7ceab2 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -293,4 +293,38 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Request::good(_t('feedback.conf.query_created', $query['name']), array('c' => 'configure', 'a' => 'queries')); } + + /** + * This action handles the system configuration page. + * + * It displays the system configuration page. + * If this action is reach through a POST request, it stores all new + * configuration values then sends a notification to the user. + * + * The options available on the page are: + * - user limit (default: 1) + * - user category limit (default: 16384) + * - user feed limit (default: 16384) + */ + public function systemAction() { + if (!FreshRSS_Auth::hasAccess('admin')) { + Minz_Error::error(403); + } + if (Minz_Request::isPost()) { + $limits = FreshRSS_Context::$system_conf->limits; + $limits['max_registrations'] = Minz_Request::param('max-registrations', 1); + $limits['max_feeds'] = Minz_Request::param('max-feeds', 16384); + $limits['max_categories'] = Minz_Request::param('max-categories', 16384); + FreshRSS_Context::$system_conf->limits = $limits; + FreshRSS_Context::$system_conf->title = Minz_Request::param('instance-name', 'FreshRSS'); + FreshRSS_Context::$system_conf->save(); + + invalidateHttpCache(); + + Minz_Session::_param('notification', array( + 'type' => 'good', + 'content' => _t('feedback.conf.updated') + )); + } + } } |
