Project

General

Profile

Bug #21419 » bug12426-v2.diff

Administrator Admin, 2009-11-01 23:20

View differences:

typo3/sysext/reports/reports/status/class.tx_reports_reports_status_configurationstatus.php (working copy)
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Reference Index', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_referenceIndex'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Memcached Configuration', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_memcachedConfiguration'), $value, $message, $severity
);
}
typo3/sysext/reports/reports/status/class.tx_reports_reports_status_securitystatus.php (working copy)
$GLOBALS['TYPO3_DB']->sql_free_result($res);
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Admin User Account', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_adminUserAccount'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Encryption Key', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_encryptionKey'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'File Deny Pattern', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_fileDenyPattern'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'.htaccess Upload Protection', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_htaccessUploadProtection'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Install Tool Password', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_installToolPassword'), $value, $message, $severity
);
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Install Tool', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_installTool'), $value, $message, $severity
);
}
typo3/sysext/reports/reports/status/class.tx_reports_reports_status_systemstatus.php (working copy)
$severity = tx_reports_reports_status_Status::OK;
if (version_compare(phpversion(), TYPO3_REQUIREMENTS_MINIMUM_PHP) < 0) {
$message = 'Your PHP installation is too old.';
$message = $GLOBALS['LANG']->getLL('status_phpTooOld');
$severity = tx_reports_reports_status_Status::ERROR;
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'PHP',
$GLOBALS['LANG']->getLL('status_phpVersion'),
phpversion(),
$message,
$severity
......
$severity = tx_reports_reports_status_Status::OK;
if ($memoryLimit && t3lib_div::getBytesFromSizeMeasurement($memoryLimit) < t3lib_div::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT)) {
$message = 'Depending on your configuration, TYPO3 can run with a ' . $memoryLimit . ' PHP memory limit. However, a ' . TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT . ' PHP memory limit or above is recommended, especially if your site uses additional extensions.';
$message = sprintf($GLOBALS['LANG']->getLL('status_phpMemoryRecommendation'), $memoryLimit, TYPO3_REQUIREMENTS_RECOMMENDED_PHP_MEMORY_LIMIT);
$severity = tx_reports_reports_status_Status::WARNING;
}
if ($memoryLimit && t3lib_div::getBytesFromSizeMeasurement($memoryLimit) < t3lib_div::getBytesFromSizeMeasurement(TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT)) {
$message = 'Depending on your configuration, TYPO3 can run with a ' . $memoryLimit . ' PHP memory limit. However, a ' . TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT . ' PHP memory limit or above is required, especially if your site uses additional extensions.';
$message = sprintf($GLOBALS['LANG']->getLL('status_phpMemoryRequirement'), $memoryLimit, TYPO3_REQUIREMENTS_MINIMUM_PHP_MEMORY_LIMIT);
$severity = tx_reports_reports_status_Status::ERROR;
}
if ($severity > tx_reports_reports_status_Status::OK) {
if ($php_ini_path = get_cfg_var('cfg_file_path')) {
$message .= ' Increase the memory limit by editing the memory_limit parameter in the file ' . $php_ini_path . ' and then restart your web server (or contact your system administrator or hosting provider for assistance).';
$message .= ' ' . sprintf($GLOBALS['LANG']->getLL('status_phpMemoryEditLimit'), $php_ini_path);
} else {
$message .= ' Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.';
$message .= ' ' . $GLOBALS['LANG']->getLL('status_phpMemoryContactAdmin');
}
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'PHP Memory Limit', $memoryLimit, $message, $severity
$GLOBALS['LANG']->getLL('status_phpMemory'), $memoryLimit, $message, $severity
);
}
......
// can't reliably check for 'on', therefore checking for the oposite 'off', '', or 0
if (!empty($registerGlobals) && strtolower($registerGlobals) != 'off') {
$message = '<em>register_globals</em> is enabled. TYPO3 requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="http://php.net/configuration.changes">how to change configuration settings</a>.';
$registerGlobalsHighlight = '<em>register_globals</em>';
$phpManualLink .= '<a href="http://php.net/configuration.changes">' . $GLOBALS['LANG']->getLL('status_phpRegisterGlobalsHowToChange') . '</a>';
$message = sprintf($GLOBALS['LANG']->getLL('status_phpRegisterGlobalsEnabled'), $registerGlobalsHighlight);
$message .= ' ' . sprintf($GLOBALS['LANG']->getLL('status_phpRegisterGlobalsSecurity'), $registerGlobalsHighlight);
$message .= ' ' . sprintf($GLOBALS['LANG']->getLL('status_phpRegisterGlobalsPHPManual'), $phpManualLink);
$severity = tx_reports_reports_status_Status::ERROR;
$value = $GLOBALS['LANG']->getLL('status_enabled')
. ' (\'' . $registerGlobals . '\')';
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'PHP Register Globals', $value, $message, $severity
$GLOBALS['LANG']->getLL('status_phpRegisterGlobals'), $value, $message, $severity
);
}
......
*/
protected function getWebserverStatus() {
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Web Server',
$GLOBALS['LANG']->getLL('status_webServer'),
$_SERVER['SERVER_SOFTWARE']
);
}
typo3/sysext/reports/reports/class.tx_reports_reports_status.php (working copy)
*/
protected function sortStatusProviders(array $statusCollection) {
$systemStatus = array(
'TYPO3 System' => $statusCollection['Installation'],
'System' => $statusCollection['System'],
'Security' => $statusCollection['security'],
'Configuration' => $statusCollection['configuration'],
$GLOBALS['LANG']->getLL('status_typo3_system') => $statusCollection['Installation'],
$GLOBALS['LANG']->getLL('status_system') => $statusCollection['System'],
$GLOBALS['LANG']->getLL('status_security') => $statusCollection['security'],
$GLOBALS['LANG']->getLL('status_configuration') => $statusCollection['configuration'],
);
unset(
$statusCollection['Installation'],
typo3/sysext/reports/reports/locallang.xml (working copy)
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for module 'tools_txreportsM1'</description>
<description>Language labels for the status reports</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="status_report_title">Status Report</label>
<label index="status_report_description">Get a status report about your site's operation and any detected problems.</label>
<label index="status_report_explanation">Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on TYPO3's support mailinglists and project issue trackers.</label>
<label index="status_typo3_system">TYPO3 System</label>
<label index="status_security">Security</label>
<label index="status_configuration">Configuration</label>
<label index="status_ok">OK</label>
<label index="status_insecure">Insecure</label>
<label index="status_disabled">Disabled</label>
......
<label index="status_connectionFailed">Connection Failed</label>
<label index="status_updateComplete">Update Complete</label>
<label index="status_updateIncomplete">Update Incomplete</label>
<label index="status__install">Installation</label>
<label index="status_system">System</label>
<label index="status_referenceIndex">Reference Index</label>
<label index="status_memcachedConfiguration">Memcached Configuration</label>
<label index="status_adminUserAccount">Admin User Account</label>
<label index="status_encryptionKey">Encryption Key</label>
<label index="status_fileDenyPattern">File Deny Pattern</label>
<label index="status_htaccessUploadProtection">.htaccess Upload Protection</label>
<label index="status_installToolPassword">Install Tool Password</label>
<label index="status_installTool">Install Tool</label>
<label index="status_phpVersion">PHP Version</label>
<label index="status_phpTooOld">Your PHP installation is too old.</label>
<label index="status_phpMemory">PHP Memory Limit</label>
<label index="status_phpMemoryRecommendation">Depending on your configuration, TYPO3 can run with a %1$s PHP memory limit. However, a %2$s PHP memory limit or above is recommended, especially if your site uses additional extensions.</label>
<label index="status_phpMemoryRequirement">Depending on your configuration, TYPO3 can run with a %1$s PHP memory limit. However, a %2$s PHP memory limit or above is required especially if your site uses additional extensions.</label>
<label index="status_phpMemoryEditLimit">Increase the memory limit by editing the memory_limit parameter in the file %s and then restart your web server (or contact your system administrator or hosting provider for assistance).</label>
<label index="status_phpMemoryContactAdmin">Depending on your configuration, TYPO3 can run with a %1$s PHP memory limit. However, a %2$s PHP memory limit or above is required especially if your site uses additional extensions.</label>
<label index="status_phpRegisterGlobals">PHP Register Globals</label>
<label index="status_phpRegisterGlobalsEnabled">%s is enabled. TYPO3 requires this configuration directive to be disabled.</label>
<label index="status_phpRegisterGlobalsSecurity">Your site may not be secure when %s is enabled.</label>
<label index="status_phpRegisterGlobalsHowToChange">how to change configuration settings</label>
<label index="status_phpRegisterGlobalsPHPManual">The PHP manual has instructions for %s.</label>
<label index="status_webServer">Web Server</label>
</languageKey>
</data>
</T3locallang>
typo3/sysext/install/report/class.tx_install_report_installstatus.php (working copy)
* @return unknown_type
*/
protected function getFileSystemStatus() {
$value = 'Writable';
$value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_writable');
$message = '';
$severity = tx_reports_reports_status_Status::OK;
......
if (!@is_dir(PATH_site . $relPath)) {
if ($requirementLevel > 0) {
// directory is required
$value = 'Required Directory Missing';
$message .= $relPath . ' does not exist and could not be created.<br />';
$value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_missingDirectory');
$message .= sprintf($GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_directoryDoesNotExistCouldNotCreate'), $relPath) . '<br />';
$severity = tx_reports_reports_status_Status::ERROR;
} else {
$message .= sprintf($GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_directoryDoesNotExist'), $relPath);
if ($requirementLevel == 0) {
$message .= $relPath . ' does not exist but should be writable if it does exist.<br />';
} else {
$message .= $relPath . ' does not exist.<br />';
$message .= ' ' . $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_directoryShouldAlsoBeWritable');
}
$message .= '<br />';
if ($severity < tx_reports_reports_status_Status::WARNING) {
$value = 'Directory not existing';
$value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_nonExistingDirectory');
$severity = tx_reports_reports_status_Status::WARNING;
}
}
......
if (!is_writable(PATH_site . $relPath)) {
switch ($requirementLevel) {
case 0:
$message .= PATH_site . $relPath . ' should be writable.<br />';
$message .= sprintf($GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_directoryShouldBeWritable'), PATH_site . $relPath) . '<br />';
if ($severity < tx_reports_reports_status_Status::WARNING) {
$value = 'Directory should be writable';
$value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_recommendedWritableDirectory');
$severity = tx_reports_reports_status_Status::WARNING;
}
break;
case 2:
$value = 'Directory not writable';
$message .= PATH_site . $relPath . ' must be writable.<br />';
$value = $GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_requiredWritableDirectory');
$message .= sprintf($GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_directoryMustBeWritable'), PATH_site . $relPath) . '<br />';
$severity = tx_reports_reports_status_Status::ERROR;
break;
}
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'File System',
$GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_fileSystem'),
$value,
$message,
$severity
......
}
return t3lib_div::makeInstance('tx_reports_reports_status_Status',
'Remaining Updates', $value, $message, $severity
$GLOBALS['LANG']->sL('LLL:EXT:install/report/locallang.xml:status_remainingUpdates'), $value, $message, $severity
);
}
typo3/sysext/install/report/locallang.xml (revision 0)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for the Install Tool status reports</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="status_fileSystem">File System</label>
<label index="status_writable">Writable</label>
<label index="status_missingDirectory">Required Directory Missing</label>
<label index="status_nonExistingDirectory">Directory not existing</label>
<label index="status_recommendedWritableDirectory">Directory should be writable</label>
<label index="status_requiredWritableDirectory">Directory not writable</label>
<label index="status_directoryDoesNotExist">%s does not exist.</label>
<label index="status_directoryDoesNotExistCouldNotCreate">%s does not exist and could not be created.</label>
<label index="status_directoryShouldAlsoBeWritable">Also note that it should be writable, if it did exist.</label>
<label index="status_directoryShouldBeWritable">%s should be writable.</label>
<label index="status_directoryMustBeWritable">%s must be writable.</label>
<label index="status_remainingUpdates">Remaining Updates</label>
</languageKey>
</data>
</T3locallang>
(1-1/2)