Beispiel #1
0
 /**
  * CP themeing is no longer supported, so remove the cp_theme config items
  */
 private function _remove_cp_theme_config()
 {
     $msm_config = new MSM_Config();
     $msm_config->remove_config_item(array('cp_theme'));
     ee()->smartforge->drop_column('members', 'cp_theme');
 }
Beispiel #2
0
 /**
  * Update security hashes table and set new config item.
  *
  */
 private function _convert_xid_to_csrf()
 {
     // Store old setting
     $secure_forms = ee()->config->item('secure_forms');
     // Remove config item from config file
     ee()->config->_update_config(array(), array('secure_forms' => ''));
     // Remove config item from db
     $msm_config = new MSM_Config();
     $msm_config->remove_config_item('secure_forms');
     // If it was no, we need to set it as disabled
     if ($secure_forms == 'n') {
         ee()->config->_update_config(array('disable_csrf_protection' => 'y'));
     }
     // We changed how we access the table, so we'll re-key it to efficiently
     // select on the session id, which is the only column we use now.
     ee()->db->truncate('security_hashes');
     ee()->smartforge->drop_column('security_hashes', 'used');
     ee()->smartforge->drop_key('security_hashes', 'hash');
     ee()->smartforge->add_key('security_hashes', 'session_id');
 }