Changeset 3170


Ignore:
Timestamp:
08/17/10 16:44:05 (14 years ago)
Author:
amuller
Message:

Ticket #1165 - Avisando o usuário e não deslogando-o

Location:
branches/2.2/phpgwapi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/phpgwapi/inc/class.common.inc.php

    r3052 r3170  
    316316 
    317317                                        if(function_exists("lang")) 
    318                                                 echo '<center><b>'.lang("ExpressoLivre is unavailable at this moment. Code %1<br>Please, try later.","002").'</b></center>'; 
     318                                                echo '<div style="border: 2px dashed red; top: 0px; left: 0px; position: absolute; background-color: #EEE; width: 260px;">'. 
     319                                                        '<center><img src="../admin/templates/default/images/navbar.png"><br>'. 
     320                                                        lang("Catalog is out of service, you will not able to do some operations").'</center></div>'; 
    319321                                        else 
    320322                                                printf("Error: Can't bind to LDAP server (invalid credentials): %s",$dn); 
     
    331333                                } 
    332334                                if(function_exists("lang")) 
    333                                         echo '<center><b>'.lang("ExpressoLivre is unavailable at this moment. Code %1<br>Please, try later.","002").'</b></center>'; 
     335                                                echo '<div style="border: 2px dashed red; top: 0px; left: 0px; position: absolute; background-color: #EEE; width: 260px;">'. 
     336                                                        '<center><img src="../admin/templates/default/images/navbar.png"><br>'. 
     337                                                        lang("Catalog is out of service, you will not able to do some operations").'</center></div>'; 
    334338                                else 
    335339                                        printf("Error: Can't bind to LDAP server (anonymous bind): %s",$dn); 
  • branches/2.2/phpgwapi/inc/class.sessions.inc.php

    r3018 r3170  
    291291 
    292292                        $this->update_dla(); 
    293                         $this->account_id = $GLOBALS['phpgw']->accounts->name2id($this->account_lid); 
     293                        if (isset($_SESSION['phpgw_session']['account_id'])) 
     294                                $this->account_id =  $_SESSION['phpgw_session']['account_id']; 
     295                        else 
     296                                $this->account_id = $GLOBALS['phpgw']->accounts->name2id($this->account_lid); 
    294297                        if (!$this->account_id) 
    295298                        { 
    296299                                return False; 
    297300                        } 
    298  
    299301                        $GLOBALS['phpgw_info']['user']['account_id'] = $this->account_id; 
     302                        $_SESSION['phpgw_session']['account_id'] = $this->account_id; 
    300303 
    301304                        /* init the crypto object before appsession call below */ 
     
    305308 
    306309                        $this->read_repositories(@$GLOBALS['phpgw_info']['server']['cache_phpgw_info']); 
    307                          
     310                        if (strlen($this->user['expires']) == 0) 
     311                                $this->user['expires'] = $_SESSION['phpgw_session']['expires_account']; 
    308312                        if ($this->user['expires'] != -1 && $this->user['expires'] < time()) 
    309313                        { 
     
    320324                                return False; 
    321325                        } 
     326                        $_SESSION['phpgw_session']['expires_account'] = $this->user['expires']; 
     327 
    322328 
    323329                        $GLOBALS['phpgw_info']['user']  = $this->user; 
Note: See TracChangeset for help on using the changeset viewer.