summaryrefslogtreecommitdiff
path: root/app/Controllers/configureController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/configureController.php')
-rwxr-xr-xapp/Controllers/configureController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index a839f0005..b02ad02e4 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -293,15 +293,24 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
* configuration values then sends a notification to the user.
*
* The options available on the page are:
+ * - instance name (default: FreshRSS)
+ * - auto update URL (default: false)
+ * - force emails validation (default: false)
* - user limit (default: 1)
* - user category limit (default: 16384)
* - user feed limit (default: 16384)
* - user login duration for form auth (default: 2592000)
+ *
+ * The `force-email-validation` is ignored with PHP < 5.5
*/
public function systemAction() {
if (!FreshRSS_Auth::hasAccess('admin')) {
Minz_Error::error(403);
}
+
+ $can_enable_email_validation = version_compare(PHP_VERSION, '5.5') >= 0;
+ $this->view->can_enable_email_validation = $can_enable_email_validation;
+
if (Minz_Request::isPost()) {
$limits = FreshRSS_Context::$system_conf->limits;
$limits['max_registrations'] = Minz_Request::param('max-registrations', 1);
@@ -311,6 +320,9 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$system_conf->limits = $limits;
FreshRSS_Context::$system_conf->title = Minz_Request::param('instance-name', 'FreshRSS');
FreshRSS_Context::$system_conf->auto_update_url = Minz_Request::param('auto-update-url', false);
+ if ($can_enable_email_validation) {
+ FreshRSS_Context::$system_conf->force_email_validation = Minz_Request::param('force-email-validation', false);
+ }
FreshRSS_Context::$system_conf->save();
invalidateHttpCache();