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