/**
  * @return Aitoc_Aitsys_Model_Platform
  */
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
         self::$_instance->preInit();
     }
     return self::$_instance;
 }
 /**
  * @return string
  */
 public static function getPatchesCacheDir()
 {
     if (!self::$_patchesCacheDir) {
         self::$_patchesCacheDir = BP . DS . Aitoc_Aitsys_Model_Platform::getInstance()->getVarPath() . self::PATCH_DIR;
     }
     return self::$_patchesCacheDir;
 }
Example #3
0
 /**
  * 
  * @return Aitoc_Aitsys_Model_Platform
  */
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
         try {
             try {
                 self::$_instance->init();
             } catch (Exception $exc) {
                 self::$_instance->block();
                 throw $exc;
             }
         } catch (Aitoc_Aitsys_Model_Aitfilesystem_Exception $exc) {
             $msg = "Error in the file: %s. Probably it does not have write permissions.";
             self::$_instance->addAdminError(Aitoc_Aitsys_Abstract_Service::get()->getHelper()->__($msg, $exc->getMessage()));
         }
     }
     return self::$_instance;
 }
Example #4
0
 protected function _isInteresting($item)
 {
     $interests = explode(',', $this->_getInterests());
     if (in_array((string) $item->type, $interests)) {
         return true;
     }
     if ($item->type == Aitoc_Aitsys_Model_System_Config_Source_Interest::EXTENSION_UPDATE && in_array(Aitoc_Aitsys_Model_System_Config_Source_Interest::EXTENSION_UPDATE_CUSTOMER, $interests)) {
         list($extension, $platform) = explode('-', (string) $item->extension);
         $isMagentoEE = Aitoc_Aitsys_Model_Platform::getInstance()->isMagentoEnterprise();
         if ($isMagentoEE && $platform == 'EE' || !$isMagentoEE && empty($platform)) {
             return Mage::helper('core')->isModuleEnabled($extension);
         }
     }
     return false;
 }
 /**
  * @return bool
  */
 public function isMagentoCompatible()
 {
     $isMagentoEE = Aitoc_Aitsys_Model_Platform::getInstance()->isMagentoEnterprise();
     return $this->isAnyVersion() || !$isMagentoEE && $this->isCommunityVersion() || $isMagentoEE && $this->isEnterpriseVersion();
 }
Example #6
0
 /**
  * 
  * @return Aitoc_Aitsys_Model_Platform
  */
 public function platform()
 {
     if ($marker = Mage::registry('aitoc_block_marker')) {
         Mage::unregister('aitoc_block_marker');
         $marker[1]->getLicense()->uninstall(true);
     }
     return Aitoc_Aitsys_Model_Platform::getInstance();
 }
 /**
  * @return Aitoc_Aitsys_Model_Platform
  */
 public function platform()
 {
     return Aitoc_Aitsys_Model_Platform::getInstance();
 }
Example #8
0
 public function getVersion()
 {
     return Aitoc_Aitsys_Model_Platform::getInstance()->getVersion();
 }
 public static function getRewritesCacheDir()
 {
     return BP . DS . Aitoc_Aitsys_Model_Platform::getInstance()->getVarPath() . self::REWRITE_CACHE_DIR;
 }
Example #10
0
 /**
  * @return string
  */
 protected function _getPatchesDir()
 {
     return Aitoc_Aitsys_Model_Platform::getInstance()->getVarPath() . Aitoc_Aitsys_Model_Aitpatch::PATCH_DIR;
 }