mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-23 03:34:41 -04:00
Add a system configuration page
It allows to modify system configuration from the interface. At the moment, only limits are modifiable. The user limit was removed from the user page and added here along with categories and feeds limits.
This commit is contained in:
1 parent
a63dadd91b
commit
269c6b88c4
18 files changed
+124
-76
No files matched your search
@@ -272,28 +272,4 @@ class FreshRSS_user_Controller extends Minz_ActionController {
|
||||
|
||||
Minz_Request::forward($redirect_url, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* This action updates the max number of registrations.
|
||||
*
|
||||
* Request parameter is:
|
||||
* - max-registrations (int >= 0)
|
||||
*/
|
||||
public function setRegistrationAction() {
|
||||
if (Minz_Request::isPost() && FreshRSS_Auth::hasAccess('admin')) {
|
||||
$limits = FreshRSS_Context::$system_conf->limits;
|
||||
$limits['max_registrations'] = Minz_Request::param('max-registrations', 1);
|
||||
FreshRSS_Context::$system_conf->limits = $limits;
|
||||
FreshRSS_Context::$system_conf->save();
|
||||
|
||||
invalidateHttpCache();
|
||||
|
||||
Minz_Session::_param('notification', array(
|
||||
'type' => 'good',
|
||||
'content' => _t('feedback.user.set_registration')
|
||||
));
|
||||
}
|
||||
|
||||
Minz_Request::forward(array('c' => 'user', 'a' => 'manage'), true);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user