public function addLink($label, $url = '', $title = '', $prepare = false, $urlParams = array(), $position = null, $liParams = null, $aParams = null, $beforeText = '', $afterText = '') { if (Extendware::helper('ewpagecache')) { if (strpos($url, 'wishlist') !== false) { $beforeText = Mage::helper('ewpagecache')->getBeginMarker('toplink_wishlist') . $beforeText; $afterText = $afterText . Mage::helper('ewpagecache')->getEndMarker('toplink_wishlist'); } elseif (strpos($url, 'checkout/cart') !== false) { $beforeText = Mage::helper('ewpagecache')->getBeginMarker('toplink_cart') . $beforeText; $afterText = $afterText . Mage::helper('ewpagecache')->getEndMarker('toplink_cart'); } elseif (strpos($url, 'account/login') !== false or strpos($url, 'account/logout') !== false) { $beforeText = Mage::helper('ewpagecache')->getBeginMarker('toplink_login') . $beforeText; $afterText = $afterText . Mage::helper('ewpagecache')->getEndMarker('toplink_login'); } } return parent::addLink($label, $url, $title, $prepare, $urlParams, $position, $liParams, $aParams, $beforeText, $afterText); }
<?php $paths = array( dirname(dirname(dirname(dirname(__FILE__)))) . '/app/Mage.php', '../../../app/Mage.php', '../../app/Mage.php', '../app/Mage.php', 'app/Mage.php', ); foreach ($paths as $path) { if (file_exists($path)) { require $path; break; } } Mage::app('admin')->setUseSessionInUrl(false); error_reporting(E_ALL | E_STRICT); if (file_exists(BP.DS.'maintenance.flag')) exit; if (class_exists('Extendware') === false) exit; if (Extendware::helper('ewpagecache') === false) exit; Extendware_EWPageCache_Model_Observer_Cronjob::cleanExpiredCacheItems();
<?php $paths = array( dirname(dirname(dirname(dirname(__FILE__)))) . '/app/Mage.php', '../../../app/Mage.php', '../../app/Mage.php', '../app/Mage.php', 'app/Mage.php', ); foreach ($paths as $path) { if (file_exists($path)) { require $path; break; } } Mage::app('admin')->setUseSessionInUrl(false); error_reporting(E_ALL | E_STRICT); if (file_exists(BP.DS.'maintenance.flag')) exit; if (class_exists('Extendware') === false) exit; if (Extendware::helper('ewimageopt') === false) exit; Extendware_EWImageOpt_Model_Observer::optimizeImages();
$paths = array( dirname(dirname(dirname(dirname(__FILE__)))) . '/app/Mage.php', '../../../app/Mage.php', '../../app/Mage.php', '../app/Mage.php', 'app/Mage.php', ); foreach ($paths as $path) { if (file_exists($path)) { require $path; break; } } Mage::app('admin')->setUseSessionInUrl(false); error_reporting(E_ALL | E_STRICT); if (file_exists(BP.DS.'maintenance.flag')) exit; if (class_exists('Extendware') === false) exit; if (Extendware::helper('ewcrawler') === false) exit; if (!isset($argv) or !is_array($argv)) $argv = array(); try { $crawler = Mage::getModel('ewcrawler/crawler'); if ($crawler) { $options = array('verbose' => in_array('-v', $argv), 'manual_only' => true); $crawler->crawl($options); } } catch (Exception $e) { Mage::logException($e); }
<?php Mage::helper('ewcore/cache')->clean(); $installer = $this; $installer->startSetup(); try { Mage::helper('ewpagecache/config')->reload()->saveConfigToFallbackStorage(); } catch (Exception $e) { Mage::logException($e); } $installer->endSetup(); try { $incompatModules = array('BalkeTechnologies_StoreMaintenance'); foreach ($incompatModules as $module) { $model = Mage::getSingleton('ewcore/module'); if (!$model) { continue; } $module = $model->load($module); if ($module->isActive() === false) { continue; } Mage::getModel('compiler/process')->registerIncludePath(false); $configTools = Extendware::helper('ewcore/config_tools'); if ($configTools) { $configTools->disableModule($module); } } } catch (Exception $e) { }
function __ewDisableModule($module) { if (class_exists('Mage', false) === false) { return; } try { if (Mage::helper('ewcore/config')->isViolationDisablingEnabled() === true) { Mage::getModel('compiler/process')->registerIncludePath(false); $configTools = Extendware::helper('ewcore/config_tools'); if ($configTools) { $configTools->disableModule($module); } } } catch (Exception $e) { Mage::logException($e); } }
<?php $paths = array( dirname(dirname(dirname(dirname(__FILE__)))) . '/app/Mage.php', '../../../app/Mage.php', '../../app/Mage.php', '../app/Mage.php', 'app/Mage.php', ); foreach ($paths as $path) { if (file_exists($path)) { require $path; break; } } Mage::app('admin')->setUseSessionInUrl(false); error_reporting(E_ALL | E_STRICT); if (file_exists(BP.DS.'maintenance.flag')) exit; if (class_exists('Extendware') === false) exit; if (Extendware::helper('ewminify') === false) exit; Extendware_EWMinify_Model_Observer::optimizeImages();