Adding token in order to save settings see BT#8717

1.9.x
Julio Montoya 11 years ago
parent 54a93bead8
commit eefaab7bd5
  1. 14
      main/inc/lib/dashboard.lib.php

@ -13,17 +13,23 @@
* DashboardManager can be used to manage dashboard * DashboardManager can be used to manage dashboard
* @package chamilo.dashboard * @package chamilo.dashboard
*/ */
class DashboardManager { class DashboardManager
{
/** /**
* contructor * contructor
*/ */
private function __construct() {} public function __construct()
{
}
/** /**
* This function allows easy activating and inactivating of dashboard plugins * This function allows easy activating and inactivating of dashboard plugins
* @return void * @return void
*/ */
public static function handle_dashboard_plugins() { public static function handle_dashboard_plugins()
{
$token = Security::get_existing_token();
$tokenCondition = '&sec_token='.$token;
/* We scan the plugin directory. Each folder is a potential plugin. */ /* We scan the plugin directory. Each folder is a potential plugin. */
$dashboard_pluginpath = api_get_path(SYS_PLUGIN_PATH).'dashboard/'; $dashboard_pluginpath = api_get_path(SYS_PLUGIN_PATH).'dashboard/';
@ -31,7 +37,7 @@ class DashboardManager {
$table_cols = array('name', 'version', 'description'); $table_cols = array('name', 'version', 'description');
echo Display::page_subheader(get_lang('DashboardPlugins')); echo Display::page_subheader(get_lang('DashboardPlugins'));
echo '<form name="plugins" method="post" action="'.api_get_self().'?category='.Security::remove_XSS($_GET['category']).'">'; echo '<form name="plugins" method="post" action="'.api_get_self().'?category='.Security::remove_XSS($_GET['category']).$tokenCondition.'">';
echo '<table class="data_table">'; echo '<table class="data_table">';
echo '<tr>'; echo '<tr>';
echo '<th width="50px">'.get_lang('Enabled').'</th>'; echo '<th width="50px">'.get_lang('Enabled').'</th>';

Loading…
Cancel
Save