2 namespace TYPO3\CMS\Install\Report;
31 protected $reportList =
'FileSystem,RemainingUpdates,NewVersion';
41 $reportMethods = explode(
',', $this->reportList);
42 foreach ($reportMethods as $reportMethod) {
43 $reports[$reportMethod] = $this->{
'get' . $reportMethod .
'Status'}();
56 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_writable');
64 $checkWritable = array(
66 'typo3temp/pics/' => 2,
67 'typo3temp/temp/' => 2,
68 'typo3temp/llxml/' => 2,
71 'typo3temp/locks/' => 2,
73 'typo3conf/ext/' => 0,
74 'typo3conf/l10n/' => 0,
77 'uploads/media/' => 0,
78 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'] => -1,
79 $GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'] .
'_temp_/' => 0,
82 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXT'][
'allowGlobalInstall']) {
83 $checkWritable[TYPO3_mainDir .
'ext/'] = -1;
86 foreach ($checkWritable as $relPath => $requirementLevel) {
87 if (!@is_dir(PATH_site . $relPath)) {
91 if (!@is_dir(PATH_site . $relPath)) {
92 if ($requirementLevel > 0) {
94 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_missingDirectory');
95 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryDoesNotExistCouldNotCreate'), $relPath) .
'<br />';
98 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryDoesNotExist'), $relPath);
99 if ($requirementLevel == 0) {
100 $message .=
' ' . $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryShouldAlsoBeWritable');
102 $message .=
'<br />';
104 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_nonExistingDirectory');
109 if (!is_writable((PATH_site . $relPath))) {
110 switch ($requirementLevel) {
112 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryShouldBeWritable'), (PATH_site . $relPath)) .
'<br />';
114 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_recommendedWritableDirectory');
119 $value = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_requiredWritableDirectory');
120 $message .= sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_directoryMustBeWritable'), (PATH_site . $relPath)) .
'<br />';
128 return GeneralUtility::makeInstance(Status::class, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_fileSystem'), $value, $message, $severity);
139 $value = $languageService->getLL(
'status_updateComplete');
144 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'ext/install'][
'update'])) {
145 $versionAsInt = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
146 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'ext/install'][
'update'] as $identifier => $className) {
148 if ($updateObject->shouldRenderWizard()) {
150 $value = $languageService->getLL(
'status_updateIncomplete');
152 $url = BackendUtility::getModuleUrl(
'system_InstallInstall');
153 $message = sprintf($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:warning.install_update'),
'<a href="' . htmlspecialchars(
$url) .
'">',
'</a>');
159 return GeneralUtility::makeInstance(Status::class, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_remainingUpdates'), $value, $message, $severity);
168 protected function getNewVersionStatus()
174 $coreVersionService = $objectManager->get(\TYPO3\CMS\Install\Service\CoreVersionService::class);
177 if (!$coreVersionService->isInstalledVersionAReleasedVersion()) {
178 return GeneralUtility::makeInstance(Status::class,
'TYPO3', TYPO3_version, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_isDevelopmentVersion'),
Status::NOTICE);
183 $coreVersionService->updateVersionMatrix();
184 }
catch (Exception\RemoteFetchException $remoteFetchException) {
185 return GeneralUtility::makeInstance(Status::class,
'TYPO3', TYPO3_version, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_remoteFetchException'),
Status::NOTICE);
189 $isUpdateAvailable = $coreVersionService->isYoungerPatchReleaseAvailable();
190 $isMaintainedVersion = $coreVersionService->isVersionActivelyMaintained();
191 }
catch (Exception\CoreVersionServiceException $coreVersionServiceException) {
192 return GeneralUtility::makeInstance(Status::class,
'TYPO3', TYPO3_version, $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_patchLevelNotFoundInReleaseMatrix'),
Status::WARNING);
195 if (!$isUpdateAvailable && $isMaintainedVersion) {
199 }
elseif ($isUpdateAvailable) {
201 $newVersion = $coreVersionService->getYoungestPatchRelease();
202 if ($coreVersionService->isUpdateSecurityRelevant()) {
203 $message = sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_newVersionSecurityRelevant'), $newVersion);
206 $message = sprintf($languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_newVersion'), $newVersion);
211 $message = $languageService->sL(
'LLL:EXT:install/Resources/Private/Language/Report/locallang.xlf:status_versionOutdated');