| @@ 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 |
|
| @@ 42-51 (lines=10) @@ | ||
| 39 | $site_image = false; |
|
| 40 | $cache_key = 'seo:site_image'; |
|
| 41 | $site_image = $oCacheHandler->get($cache_key); |
|
| 42 | if(!$site_image) { |
|
| 43 | $path = _XE_PATH_ . 'files/attach/site_image/'; |
|
| 44 | list($width, $height) = @getimagesize($path . $config->site_image); |
|
| 45 | $site_image_dimension = array( |
|
| 46 | 'width' => $width, |
|
| 47 | 'height' => $height |
|
| 48 | ); |
|
| 49 | $cache_key = 'seo:site_image'; |
|
| 50 | $oCacheHandler->put($cache_key, $site_image_dimension); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||