@@ 29-37 (lines=9) @@ | ||
26 | $config->site_image = $filename; |
|
27 | ||
28 | $oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE); |
|
29 | if($oCacheHandler->isSupport()) { |
|
30 | list($width, $height) = @getimagesize($path . $filename); |
|
31 | $site_image_dimension = array( |
|
32 | 'width' => $width, |
|
33 | 'height' => $height |
|
34 | ); |
|
35 | $cache_key = 'seo:site_image'; |
|
36 | $oCacheHandler->put($cache_key, $site_image_dimension); |
|
37 | } |
|
38 | } |
|
39 | } elseif ($vars->setting_section == 'analytics') { |
|
40 | // analytics |
@@ 41-50 (lines=10) @@ | ||
38 | $site_image = false; |
|
39 | $cache_key = 'seo:site_image'; |
|
40 | $site_image = $oCacheHandler->get($cache_key); |
|
41 | if(!$site_image) { |
|
42 | $path = _XE_PATH_ . 'files/attach/site_image/'; |
|
43 | list($width, $height) = @getimagesize($path . $config->site_image); |
|
44 | $site_image_dimension = array( |
|
45 | 'width' => $width, |
|
46 | 'height' => $height |
|
47 | ); |
|
48 | $cache_key = 'seo:site_image'; |
|
49 | $oCacheHandler->put($cache_key, $site_image_dimension); |
|
50 | } |
|
51 | } |
|
52 | } |
|
53 |