Changeset 2143
- Timestamp:
- 02/22/2008 01:23:19 PM (9 months ago)
- Location:
- trunk/system
- Files:
-
- 4 modified
-
core/Kohana.php (modified) (3 diffs)
-
libraries/Pagination.php (modified) (1 diff)
-
libraries/Session.php (modified) (1 diff)
-
libraries/Validation.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r2142 r2143 894 894 * @return boolean all tests 895 895 */ 896 public static function user_agent($key , $compare = NULL)896 public static function user_agent($key = 'agent', $compare = NULL) 897 897 { 898 898 static $info; … … 911 911 if (stripos(Kohana::$user_agent, $agent) !== FALSE) 912 912 { 913 if ($type === 'browser' AND preg_match('|'.preg_quote($agent).'[^0-9.]* ([0-9.]+)|i', Kohana::$user_agent, $match))913 if ($type === 'browser' AND preg_match('|'.preg_quote($agent).'[^0-9.]*+([0-9.]+)|i', Kohana::$user_agent, $match)) 914 914 { 915 915 // Set the browser version … … 991 991 992 992 // Return the key, if set 993 return isset($info[$key]) ? $info[$key] : NULL;993 return (isset($info[$key])) ? $info[$key] : NULL; 994 994 } 995 995 -
trunk/system/libraries/Pagination.php
r2139 r2143 96 96 $this->items_per_page = (int) max(1, $this->items_per_page); 97 97 $this->total_pages = (int) ceil($this->total_items / $this->items_per_page); 98 $this->current_page = (int) min(max(1, Kohana::$instance->uri->segment($this->uri_segment)), max(1, $this->total_pages));98 $this->current_page = (int) min(max(1, URI::instance()->segment($this->uri_segment)), max(1, $this->total_pages)); 99 99 $this->current_first_item = (int) min((($this->current_page - 1) * $this->items_per_page) + 1, $this->total_items); 100 100 $this->current_last_item = (int) min($this->current_first_item + $this->items_per_page - 1, $this->total_items); -
trunk/system/libraries/Session.php
r2138 r2143 55 55 self::$protect = array_combine(self::$protect, self::$protect); 56 56 57 if (self::$config['driver'] != 'native')57 if (self::$config['driver'] !== 'native') 58 58 { 59 59 // Set driver name -
trunk/system/libraries/Validation.php
r2088 r2143 546 546 foreach ($fields as $depends_on) 547 547 { 548 if ( ! isset($this[$depends_on]) OR $this[$depends_on] == NULL)548 if ( ! isset($this[$depends_on]) OR $this[$depends_on] == NULL) 549 549 return FALSE; 550 550 }
