Changeset 2030

Show
Ignore:
Timestamp:
02/11/2008 10:16:19 AM (9 months ago)
Author:
Geert
Message:

Merging r2028 and r2029 into releases/2.1.1

Location:
releases/2.1.1/system/libraries
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • releases/2.1.1/system/libraries/Pagination.php

    r1911 r2030  
    148148 
    149149        /** 
    150          * Gets the SQL offset of the first row to return. Deprecated. 
     150         * So that users can use $pagination->total_pages() or $pagination->total_pages. 
    151151         * 
    152          * @return  integer  sql offset 
     152         * @param   string  function name 
     153         * @return  string 
    153154         */ 
    154         public function sql_offset() 
     155        public function __call($func, $args = FALSE) 
    155156        { 
    156                 return $this->sql_offset; 
    157         } 
    158  
    159         /** 
    160          * Generates the complete SQL LIMIT clause. Deprecated. 
    161          * 
    162          * @return  string  sql limit clause 
    163          */ 
    164         public function sql_limit() 
    165         { 
    166                 return $this->sql_limit; 
     157                return $this->__get($func); 
    167158        } 
    168159 
  • releases/2.1.1/system/libraries/User_agent.php

    r1911 r2030  
    6060                if (empty(self::$languages) AND ! empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) 
    6161                { 
    62                         preg_match_all('/[-a-z]{2,}/i', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']), self::$languages); 
     62                        self::$languages = (preg_match_all('/[-a-z]{2,}/', strtolower(trim($_SERVER['HTTP_ACCEPT_LANGUAGE'])), $matches)) ? $matches[0] : array(); 
    6363                } 
    6464 
     
    6666                if (empty(self::$charsets) AND ! empty($_SERVER['HTTP_ACCEPT_CHARSET'])) 
    6767                { 
    68                         preg_match_all('/[-a-z0-9]{2,}/i', trim($_SERVER['HTTP_ACCEPT_CHARSET']), self::$charsets); 
     68                        self::$charsets = (preg_match_all('/[-a-z0-9]{2,}/', strtolower(trim($_SERVER['HTTP_ACCEPT_CHARSET'])), $matches)) ? $matches[0] : array(); 
    6969                } 
    7070