Changeset 5304 in subversion


Ignore:
Timestamp:
Oct 3, 2011 1:55:29 PM (20 months ago)
Author:
alec
Message:
  • Fix namespace handling in special folders settings (#1488112)
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r5299 r5304  
    22=========================== 
    33 
     4- Fix namespace handling in special folders settings (#1488112) 
    45- Disable time limit for CLI scripts (#1488109) 
    56- Fix misleading display when chaning editor type (#1488104) 
  • trunk/roundcubemail/program/include/rcmail.php

    r5285 r5304  
    731731      $this->session->set_keep_alive($keep_alive); 
    732732    } 
    733      
     733 
    734734    $this->session->set_secret($this->config->get('des_key') . $_SERVER['HTTP_USER_AGENT']); 
    735735    $this->session->set_ip_check($this->config->get('ip_check')); 
     
    841841      return false; 
    842842 
    843     $this->set_imap_prop(); 
    844  
    845843    // user already registered -> update user's record 
    846844    if (is_object($user)) { 
    847       // fix some old settings according to namespace prefix 
    848       $this->fix_namespace_settings($user); 
    849  
    850       // create default folders on first login 
    851       if (!$user->data['last_login'] && $config['create_default_folders']) 
    852         $this->imap->create_default_folders(); 
    853845      // update last login timestamp 
    854846      $user->touch(); 
     
    858850      if ($created = rcube_user::create($username, $host)) { 
    859851        $user = $created; 
    860  
    861         // fix default settings according to namespace prefix 
    862         $this->fix_namespace_settings($user); 
    863  
    864         // create default folders on first login 
    865         if ($config['create_default_folders']) 
    866           $this->imap->create_default_folders(); 
    867852      } 
    868853      else { 
     
    884869    // login succeeded 
    885870    if (is_object($user) && $user->ID) { 
     871      // Configure environment 
    886872      $this->set_user($user); 
     873      $this->set_imap_prop(); 
    887874      $this->session_configure(); 
     875 
     876      // fix some old settings according to namespace prefix 
     877      $this->fix_namespace_settings($user); 
     878 
     879      // create default folders on first login 
     880      if ($config['create_default_folders'] && (!empty($created) || empty($user->data['last_login']))) { 
     881        $this->imap->create_default_folders(); 
     882      } 
    888883 
    889884      // set session vars 
     
    895890      $_SESSION['password']  = $this->encrypt($pass); 
    896891      $_SESSION['login_time'] = mktime(); 
    897        
     892 
    898893      if (isset($_REQUEST['_timezone']) && $_REQUEST['_timezone'] != '_default_') 
    899894        $_SESSION['timezone'] = floatval($_REQUEST['_timezone']); 
     
    15681563    // use strtr behaviour of going through source string once 
    15691564    $cmd = strtr($cmd, $replacements); 
    1570      
     1565 
    15711566    return (string)shell_exec($cmd); 
    15721567  } 
     
    16041599    } 
    16051600  } 
    1606    
     1601 
    16071602  /** 
    16081603   * Returns current action filename 
     
    16341629      return; 
    16351630 
    1636     $prefs = $user->get_prefs(); 
    1637     if (empty($prefs) || $prefs['namespace_fixed']) 
     1631    $prefs = $this->config->all(); 
     1632    if (!empty($prefs['namespace_fixed'])) 
    16381633      return; 
    16391634 
Note: See TracChangeset for help on using the changeset viewer.