* Description: Choose which Additional Features are on by default for new users on the site.
* Version: 1.0
* Author: Michael Johnston
+ * Status: Unsupported
*/
function defaultfeatures_install() {
}
function defaultfeatures_plugin_admin_post (&$a) {
- check_form_security_token_redirectOnErr('/admin/plugins/defaultfeatures', 'admin_themes');
+ check_form_security_token_redirectOnErr('/admin/plugins/defaultfeatures', 'defaultfeaturessave');
foreach($_POST as $k => $v) {
if(strpos($k,'feature_') === 0) {
set_config('defaultfeatures',substr($k,8),((intval($v)) ? 1 : 0));
function defaultfeatures_plugin_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/defaultfeatures/" );
+ $token = get_form_security_token("defaultfeaturessave");
$arr = array();
$features = get_features();
foreach($features as $fname => $fdata) {
//logger("Features: " . print_r($arr,true));
$o = replace_macros($t, array(
- '$submit' => t('Submit'),
- '$features' => $arr
+ '$submit' => t('Save Settings'),
+ '$features' => $arr,
+ '$form_security_token' => $token
));
}