}
if (x($_GET,"a") && $_GET['a']=="t"){
+ check_form_security_token_redirectOnErr('/admin/plugins', 'admin_themes', 't');
+
// Toggle plugin status
$idx = array_search($plugin, $a->plugins);
if ($idx !== false){
'$admin_form' => $admin_form,
'$function' => 'plugins',
'$screenshot' => '',
- '$readme' => $readme
+ '$readme' => $readme,
+
+ '$form_security_token' => get_form_security_token("admin_themes"),
));
}
'$submit' => t('Submit'),
'$baseurl' => $a->get_baseurl(true),
'$function' => 'plugins',
- '$plugins' => $plugins
+ '$plugins' => $plugins,
+ '$form_security_token' => get_form_security_token("admin_themes"),
));
}
}
if (x($_GET,"a") && $_GET['a']=="t"){
+ check_form_security_token_redirectOnErr('/admin/themes', 'admin_themes', 't');
// Toggle theme status
'$str_author' => t('Author: '),
'$str_maintainer' => t('Maintainer: '),
'$screenshot' => $screenshot,
- '$readme' => $readme
+ '$readme' => $readme,
+
+ '$form_security_token' => get_form_security_token("admin_themes"),
));
}
'$function' => 'themes',
'$plugins' => $xthemes,
'$experimental' => t('[Experimental]'),
- '$unsupported' => t('[Unsupported]')
+ '$unsupported' => t('[Unsupported]'),
+ '$form_security_token' => get_form_security_token("admin_themes"),
));
}
<ul id='pluginslist'>
{{ for $plugins as $p }}
<li class='plugin $p.1'>
- <a class='toggleplugin' href='$baseurl/admin/$function/$p.0?a=t' title="{{if $p.1==on }}Disable{{ else }}Enable{{ endif }}" ><span class='icon $p.1'></span></a>
+ <a class='toggleplugin' href='$baseurl/admin/$function/$p.0?a=t&t=$form_security_token' title="{{if $p.1==on }}Disable{{ else }}Enable{{ endif }}" ><span class='icon $p.1'></span></a>
<a href='$baseurl/admin/$function/$p.0'><span class='name'>$p.2.name</span></a> - <span class="version">$p.2.version</span>
{{ if $p.2.experimental }} $experimental {{ endif }}{{ if $p.2.unsupported }} $unsupported {{ endif }}