Changeset 244

Show
Ignore:
Timestamp:
05/23/07 09:46:35
Author:
grahack
Message:

fixed the case where no user was in the admins or users list. Leads now to a CI error (please reinstall FreakAuth light), because we need at least a superadmin (that cannot be so easily deleted)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • FreakAuth/trunk/www/system/application/controllers/admin/admins.php

    r243 r244  
    132132                else  
    133133                { 
    134                         $msg= $this->lang->line('FAL_no_records'); 
    135                         flashMsg($msg); 
    136                          
    137                 } 
    138                          
    139                         //let's display the page 
    140                 $data['heading'] = 'VIEW admins'; 
    141                 $data['action'] = 'Manage admins'; 
    142                 $data['pagination_links'] = $this->pagination->create_links(); 
    143                 $data['controller'] = 'admins'; 
    144                 $data['page'] = $this->config->item('FAL_template_dir').'template_admin/users/list'; 
    145                                          
    146                 $this->load->vars($data); 
    147                  
    148                 $this->load->view($this->_container); 
    149                 //$this->output->enable_profiler(TRUE); 
     134                        // If we arrive here, it means that we have no admins in the db 
     135                        // hence no SUPERADMIN. But only superadmins are allowed to 
     136                        // use this controller. 
     137                        // The only way to arrive here is to log in as a superadmin, 
     138                        // then delete all superadmins and admins 'by hand' 
     139                        // (since FAL do not allow it), and try to display the admins list. 
     140                        show_error('No superadmin or admin in the database. Please reinstall FreakAuth light.'); 
     141                } 
     142                         
     143                //let's display the page 
     144                $data['heading'] = 'VIEW admins'; 
     145                $data['action'] = 'Manage admins'; 
     146                $data['pagination_links'] = $this->pagination->create_links(); 
     147                $data['controller'] = 'admins'; 
     148                $data['page'] = $this->config->item('FAL_template_dir').'template_admin/users/list'; 
     149                                                 
     150                $this->load->vars($data); 
     151                 
     152                $this->load->view($this->_container); 
     153                //$this->output->enable_profiler(TRUE); 
    150154    } 
    151155 
  • FreakAuth/trunk/www/system/application/controllers/admin/users.php

    r242 r244  
    131131                else  
    132132                { 
    133                         $msg= $this->lang->line('FAL_no_records'); 
    134                         flashMsg($msg); 
    135                          
     133                        // If we arrive here, it means that we have no users in the db 
     134                        // hence no ADMIN. But only admins are allowed to 
     135                        // use this controller. 
     136                        // The only way to arrive here is to log in as an admin, 
     137                        // then delete all users 'by hand' 
     138                        // (since FAL do not allow it), and try to display the users list. 
     139                        show_error('No user in the database. Please reinstall FreakAuth light.'); 
    136140                } 
    137141                         
  • FreakAuth/trunk/www/system/application/language/english/freakauth_lang.php

    r229 r244  
    151151$lang['FAL_user_deleted'] = ' user successfully deleted!'; 
    152152$lang['FAL_no_permissions'] = 'You don\'t have the credentials to access this area'; 
    153 $lang['FAL_no_records'] = 'No records in DB'; 
    154153?>