From e5c077243c4c01c597c241de7e31df4ae53aedab Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 1 Sep 2016 20:35:52 -0700 Subject: check that the advanced_theming feature is enabled before the pdledit module can be accessed. --- Zotlabs/Module/Pdledit.php | 8 ++++++++ Zotlabs/Module/Settings.php | 2 ++ 2 files changed, 10 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php index 5cb00f165..618444480 100644 --- a/Zotlabs/Module/Pdledit.php +++ b/Zotlabs/Module/Pdledit.php @@ -9,6 +9,9 @@ class Pdledit extends \Zotlabs\Web\Controller { return; if(! $_REQUEST['module']) return; + if(! feature_enabled(local_channel(),'advanced_theming')) + return; + if(! trim($_REQUEST['content'])) { del_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl'); goaway(z_root() . '/pdledit/' . $_REQUEST['module']); @@ -26,6 +29,11 @@ class Pdledit extends \Zotlabs\Web\Controller { notice( t('Permission denied.') . EOL); return; } + + if(! feature_enabled(local_channel(),'advanced_theming')) { + notice( t('Feature disabled.') . EOL); + return; + } if(argc() > 1) $module = 'mod_' . argv(1) . '.pdl'; diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index 7612b4892..43b35df23 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -191,6 +191,8 @@ class Settings extends \Zotlabs\Web\Controller { check_form_security_token_redirectOnErr('/settings/features', 'settings_features'); // Build list of features and check which are set + // We will not create any settings for features that are above our techlevel + $features = get_features(); $all_features = array(); foreach($features as $k => $v) { -- cgit v1.2.3