Changeset 13444 for trunk/include
- Timestamp:
- Feb 29, 2012, 10:21:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/derivative.inc.php
r13252 r13444 100 100 101 101 private $params; 102 private $rel_path, $rel_url ;102 private $rel_path, $rel_url, $is_cached; 103 103 104 104 function __construct($type, $src_image) … … 114 114 } 115 115 116 self::build($src_image, $this->params, $this->rel_path, $this->rel_url );116 self::build($src_image, $this->params, $this->rel_path, $this->rel_url, $this->is_cached); 117 117 } 118 118 … … 154 154 } 155 155 156 private static function build($src, &$params, &$rel_path, &$rel_url )156 private static function build($src, &$params, &$rel_path, &$rel_url, &$is_cached=null) 157 157 { 158 158 if ( $src->has_size() && $params->is_identity( $src->get_size() ) ) … … 161 161 $params = null; 162 162 $rel_path = $rel_url = $src->rel_path; 163 $is_cached = true; 163 164 return; 164 165 } … … 192 193 if ($mtime===false or $mtime < $params->last_mod_time) 193 194 { 195 $is_cached = false; 194 196 $url_style = 2; 195 197 } 196 198 else 197 199 { 200 $is_cached = true; 198 201 $url_style = 1; 199 202 } … … 304 307 } 305 308 } 309 310 function is_cached() 311 { 312 return $this->is_cached; 313 } 306 314 } 307 315
Note: See TracChangeset
for help on using the changeset viewer.