/**
  * Update all roles at one time
  *
  * @access	private
  */
 private function update()
 {
     if (VPost::update_roles(false)) {
         try {
             $setting =& Roles::load();
             $to_read['table'] = 'setting';
             $to_read['columns'] = array('SETTING_ID');
             $to_read['condition_columns'][':t'] = 'setting_type';
             $to_read['condition_select_types'][':t'] = '=';
             $to_read['condition_values'][':t'] = 'role';
             $to_read['value_types'][':t'] = 'str';
             $to_read['condition_types'][':n'] = 'AND';
             $to_read['condition_columns'][':n'] = 'setting_name';
             $to_read['condition_select_types'][':n'] = '=';
             $to_read['value_types'][':n'] = 'str';
             foreach ($setting->_roles as $role) {
                 if (!in_array($role, array('administrator', 'editor', 'author'))) {
                     $name = 'auth_' . $role;
                     $array = VPost::$name(array());
                     $auth = array('dashboard' => false, 'post' => false, 'media' => false, 'album_photo' => false, 'comments' => false, 'delete_content' => false, 'settings' => false);
                     foreach ($auth as $key => &$value) {
                         if (in_array($key, $array)) {
                             $value = true;
                         }
                     }
                     $to_read['condition_values'][':n'] = $role;
                     $role = $this->_db->read($to_read);
                     $role = new Setting($role[0]['SETTING_ID']);
                     $role->_data = json_encode($auth);
                     $role->update('_data', 'str');
                 }
             }
             $result = true;
         } catch (Exception $e) {
             $result = $e->getMessage();
         }
         $this->_action_msg = ActionMessages::updated($result);
     }
 }