check that the advanced_theming feature is enabled before the pdledit module can be accessed.
This commit is contained in:
parent
af87038150
commit
e5c077243c
@ -9,6 +9,9 @@ class Pdledit extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
if(! $_REQUEST['module'])
|
if(! $_REQUEST['module'])
|
||||||
return;
|
return;
|
||||||
|
if(! feature_enabled(local_channel(),'advanced_theming'))
|
||||||
|
return;
|
||||||
|
|
||||||
if(! trim($_REQUEST['content'])) {
|
if(! trim($_REQUEST['content'])) {
|
||||||
del_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl');
|
del_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl');
|
||||||
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
|
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
|
||||||
@ -27,6 +30,11 @@ class Pdledit extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! feature_enabled(local_channel(),'advanced_theming')) {
|
||||||
|
notice( t('Feature disabled.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(argc() > 1)
|
if(argc() > 1)
|
||||||
$module = 'mod_' . argv(1) . '.pdl';
|
$module = 'mod_' . argv(1) . '.pdl';
|
||||||
else {
|
else {
|
||||||
|
@ -191,6 +191,8 @@ class Settings extends \Zotlabs\Web\Controller {
|
|||||||
check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
|
check_form_security_token_redirectOnErr('/settings/features', 'settings_features');
|
||||||
|
|
||||||
// Build list of features and check which are set
|
// 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();
|
$features = get_features();
|
||||||
$all_features = array();
|
$all_features = array();
|
||||||
foreach($features as $k => $v) {
|
foreach($features as $k => $v) {
|
||||||
|
Reference in New Issue
Block a user