Changeset 678:d07dada561e2 for inc/public/lib.tpl.context.php
- Timestamp:
- 08/11/11 19:35:09 (14 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/lib.tpl.context.php
r478 r678 342 342 public static function EntryFirstImageHelper($size,$with_category,$class="") 343 343 { 344 if (!preg_match('/^sq|t|s|m|o$/',$size)) { 344 global $core, $_ctx; 345 346 if (!$core->media) $core->media = new dcMedia($core); 347 $sizes = implode('|',array_keys($core->media->thumb_sizes)).'|o'; 348 if (!preg_match('/^'.$sizes.'$/',$size)) { 345 349 $size = 's'; 346 350 } 347 348 global $core, $_ctx;349 351 350 352 $p_url = $core->blog->settings->system->public_url; … … 400 402 private static function ContentFirstImageLookup($root,$img,$size) 401 403 { 404 global $core; 405 402 406 # Get base name and extension 403 407 $info = path::info($img); 404 408 $base = $info['base']; 405 409 406 if (preg_match('/^\.(.+)_(sq|t|s|m)$/',$base,$m)) { 410 if (!$core->media) $core->media = new dcMedia($core); 411 $sizes = implode('|',array_keys($core->media->thumb_sizes)); 412 if (preg_match('/^\.(.+)_('.$sizes.')$/',$base,$m)) { 407 413 $base = $m[1]; 408 414 }
Note: See TracChangeset
for help on using the changeset viewer.