예제 #1
0
 public function routeStartup(Zend_Controller_Request_Abstract $request)
 {
     $conf = Pimcore_Config::getSystemConfig();
     if (!$conf->outputfilters) {
         return $this->disable();
     }
     if (!$conf->outputfilters->imagedatauri) {
         return $this->disable();
     }
     //detect browser
     $browser = new Pimcore_Browser();
     $browserVersion = (int) $browser->getVersion();
     if ($browser->getBrowser() == "Firefox" && $browserVersion >= 3) {
         $this->supported = true;
     } else {
         if ($browser->getBrowser() == "Internet Explorer" && $browserVersion >= 8) {
             $this->supported = true;
         } else {
             if ($browser->getBrowser() == "Chrome" && $browserVersion >= 5) {
                 $this->supported = true;
             } else {
                 if ($browser->getBrowser() == "Safari" && $browserVersion >= 4) {
                     $this->supported = true;
                 } else {
                     return $this->disable();
                 }
             }
         }
     }
     // set cache key suffix for outputcache
     if ($this->supported) {
         $this->enabled = true;
         if (!($tags = $request->getParam("pimcore_cache_tag_suffix"))) {
             $tags = array();
         }
         $tags[] = "datauri";
         $request->setParam("pimcore_cache_tag_suffix", $tags);
     }
 }
예제 #2
0
                }
            }
        }
    }
} catch (Exception $e) {
}
?>

</head>
<body>

<?php 
//detect browser
$supported = false;
$browser = new Pimcore_Browser();
$browserVersion = (int) $browser->getVersion();
$platform = $browser->getPlatform();
if ($browser->getBrowser() == Pimcore_Browser::BROWSER_FIREFOX && $browserVersion >= 3) {
    $supported = true;
}
if ($browser->getBrowser() == Pimcore_Browser::BROWSER_IE && $browserVersion >= 8) {
    $supported = true;
}
if ($browser->getBrowser() == Pimcore_Browser::BROWSER_CHROME && $browserVersion >= 5) {
    $supported = true;
}
if ($browser->getBrowser() == Pimcore_Browser::BROWSER_SAFARI && $browserVersion >= 4 && $platform == Pimcore_Browser::PLATFORM_WINDOWS) {
    $supported = true;
}
$config = Pimcore_Config::getSystemConfig();
?>