protected function checkVersion() { $version = new Elite_Vafinstall_Migrate(); if ($version->needsUpgrade()) { echo 'Please run the upgrade-vaf.php script as per the documentation. Your database is out of date.'; exit; } }
function editAction() { $version = new Elite_Vafinstall_Migrate(); if ($version->needsUpgrade()) { echo 'Please run the upgrade-vaf.php script as per the documentation. Your database is out of date.'; exit; } return parent::editAction(); }
function indexAction() { $version = new Elite_Vafinstall_Migrate(); if ($version->needsUpgrade()) { echo 'Please run the upgrade-vaf.php script as per the documentation. Your database is out of date.'; exit; } $this->loadLayout(); $this->_setActiveMenu('vaf'); $this->block = $this->getLayout()->createBlock('core/template', 'vaf'); $this->doIndexAction(); $this->_addContent($this->block); $this->renderLayout(); }
function indexAction() { $version = new Elite_Vafinstall_Migrate(); if ($version->needsUpgrade()) { echo 'Please run the upgrade-vaf.php script as per the documentation. Your database is out of date.'; exit; } $this->setLevels(); $this->setSortingLevels(); $this->loadLayout(); $this->_setActiveMenu('vaf'); $block = $this->getLayout()->createBlock('adminhtml/vaf_schema', 'vaf'); $block->setTemplate('vaf/schema.phtml'); $this->_addContent($block); $this->renderLayout(); }
function splitAction() { $version = new Elite_Vafinstall_Migrate(); if ($version->needsUpgrade()) { echo 'Please run the upgrade-vaf.php script as per the documentation. Your database is out of date.'; exit; } $this->loadLayout(); $this->_setActiveMenu('vaf'); $this->block = $this->getLayout()->createBlock('adminhtml/vaf_definitions', 'vaf'); $this->block->setTemplate('vf/vaf/split.phtml'); if (isset($_POST['submit'])) { $titles = explode(',', $_POST['new_titles']); $vehicle = $this->vehicleFinder()->findOneByLevelIds($this->requestLevels(), VF_Vehicle_Finder::INCLUDE_PARTIALS); $split = new Elite_Vaf_Model_Split($vehicle, $_POST['entity'], $titles); $split->execute(); header('location:' . $this->getListUrl2($_REQUEST['entity'])); exit; } $params = $this->requestLevels(); $params[$this->getRequest()->getParam('entity')] = $this->getRequest()->getParam('id'); $this->block->vehicle = $this->vehicleFinder()->findOneByLevelIds($params, VF_Vehicle_Finder::INCLUDE_PARTIALS); if (!$this->block->vehicle) { header('location:' . $this->getListUrl2($_REQUEST['entity'])); } $this->_addContent($this->block); $this->renderLayout(); }