TYPO3 CMS  TYPO3_6-2
AbstractCoreUpdate.php
Go to the documentation of this file.
1 <?php
3 
21 abstract class AbstractCoreUpdate extends AbstractAjaxAction {
22 
27  protected $view = NULL;
28 
33  protected $coreUpdateService;
34 
39  protected $statusUtility;
40 
46 
53  protected function initializeHandle() {
54  if (!$this->coreUpdateService->isCoreUpdateEnabled()) {
55  throw new \TYPO3\CMS\Install\Controller\Exception(
56  'Core Update disabled in this environment',
57  1381609294
58  );
59  }
61  }
62 
70  protected function getVersionToHandle() {
72  if (!isset($getVars['type'])) {
73  throw new \TYPO3\CMS\Install\Controller\Exception(
74  'Type must be set to either "regular" or "development"',
75  1380975303
76  );
77  }
78  $type = $getVars['type'];
79  if ($type === 'development') {
80  $versionToHandle = $this->coreVersionService->getYoungestPatchDevelopmentRelease();
81  } else {
82  $versionToHandle = $this->coreVersionService->getYoungestPatchRelease();
83  }
84  return $versionToHandle;
85  }
86 }