TYPO3 CMS  TYPO3_6-2
Typo3Status.php
Go to the documentation of this file.
1 <?php
3 
23 
29  public function getStatus() {
30  $statuses = array(
31  'Typo3Version' => $this->getTypo3VersionStatus(),
32  'oldXclassStatus' => $this->getOldXclassUsageStatus(),
33  'registeredXclass' => $this->getRegisteredXclassStatus(),
34  );
35  return $statuses;
36  }
37 
43  protected function getTypo3VersionStatus() {
44  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', 'TYPO3', TYPO3_version, '', \TYPO3\CMS\Reports\Status::NOTICE);
45  }
46 
52  protected function getOldXclassUsageStatus() {
53  $message = '';
54  $value = $GLOBALS['LANG']->getLL('status_none');
56 
57  $xclasses = array_merge(
58  (array) $GLOBALS['TYPO3_CONF_VARS']['BE']['XCLASS'],
59  (array) $GLOBALS['TYPO3_CONF_VARS']['FE']['XCLASS']
60  );
61 
62  $numberOfXclasses = count($xclasses);
63  if ($numberOfXclasses > 0) {
64  $value = sprintf($GLOBALS['LANG']->getLL('status_oldXclassUsageFound'), $numberOfXclasses);
65  $message = $GLOBALS['LANG']->getLL('status_oldXclassUsageFound_message') . '<br />';
66  $message .= '<ol><li>' . implode('</li><li>', $xclasses) . '</li></ol>';
68  }
69 
70  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
71  'TYPO3\\CMS\\Reports\\Status',
72  $GLOBALS['LANG']->getLL('status_oldXclassUsage'),
73  $value,
74  $message,
75  $severity
76  );
77  }
78 
84  protected function getRegisteredXclassStatus() {
85  $message = '';
86  $value = $GLOBALS['LANG']->getLL('status_none');
88 
89  $xclassFoundArray = array();
90  if (array_key_exists('Objects', $GLOBALS['TYPO3_CONF_VARS']['SYS'])) {
91  foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'] as $originalClass => $override) {
92  if (array_key_exists('className', $override)) {
93  $xclassFoundArray[$originalClass] = $override['className'];
94  }
95  }
96  }
97  if (count($xclassFoundArray) > 0) {
98  $value = $GLOBALS['LANG']->getLL('status_xclassUsageFound');
99  $message = $GLOBALS['LANG']->getLL('status_xclassUsageFound_message') . '<br />';
100  $message .= '<ol>';
101  foreach ($xclassFoundArray as $originalClass => $xClassName) {
102  $messageDetail = sprintf(
103  $GLOBALS['LANG']->getLL('status_xclassUsageFound_message_detail'),
104  $originalClass,
105  $xClassName
106  );
107  $message .= '<li>' . $messageDetail . '</li>';
108  }
109  $message .= '</ol>';
111  }
112 
113  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
114  'TYPO3\\CMS\\Reports\\Status',
115  $GLOBALS['LANG']->getLL('status_xclassUsage'),
116  $value,
117  $message,
118  $severity
119  );
120  }
121 
122 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]