7247_v2.diff

Administrator Admin, 2008-01-23 20:08

Download (6.63 KB)

View differences:

t3lib/class.t3lib_befunc.php (working copy)
3769 3769

  
3770 3770
				// Check if the Install Tool Password is still default: joh316
3771 3771
			if ($GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword']==md5('joh316'))	{
3772
				$warnings[] = 'The password of your Install Tool is still using the default value "joh316"';
3772
				$url = 'install/index.php?redirect_url=index.php'.urlencode('?TYPO3_INSTALL[type]=about');
3773
				$warnings["install_password"] = sprintf(
3774
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_password'),
3775
					'<a href="'.$url.'">',
3776
					'</a>');
3773 3777
			}
3774 3778

  
3775 3779
				// Check if there is still a default user 'admin' with password 'password' (MD5sum = 5f4dcc3b5aa765d61d8327deb882cf99)
3776 3780
			$where_clause = 'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('admin','be_users').' AND password='.$GLOBALS['TYPO3_DB']->fullQuoteStr('5f4dcc3b5aa765d61d8327deb882cf99','be_users').t3lib_BEfunc::deleteClause('be_users');
3777
			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('username, password', 'be_users', $where_clause);
3778
			if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))	{
3779
				$warnings[] = 'The backend user "admin" with password "password" is still existing';
3781
			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password', 'be_users', $where_clause);
3782
			if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))	{
3783
				$url = "alt_doc.php?returnUrl=index.php&edit[be_users][".$row['uid']."]=edit";
3784
				$warnings["backend_admin"] = sprintf(
3785
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_admin'),
3786
					'<a href="'.$url.'">',
3787
					'</a>');
3788
				
3780 3789
			}
3781 3790

  
3782 3791
				// Check if the Install Tool is enabled
3783 3792
			$enableInstallToolFile = PATH_site.'typo3conf/ENABLE_INSTALL_TOOL';
3784 3793
			if (@is_file($enableInstallToolFile))	{
3785
				$warnings[] = 'The Install Tool is enabled. Make sure to delete the file "'.$enableInstallToolFile.'" when you have finished setting up TYPO3';
3794
				$warnings["install_enabled"] = sprintf(
3795
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_enabled'),
3796
					$enableInstallToolFile);
3786 3797
			}
3787 3798

  
3788 3799
				// Check if the encryption key is empty
3789 3800
			if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] == '')	{
3790 3801
				$url = 'install/index.php?redirect_url=index.php'.urlencode('?TYPO3_INSTALL[type]=config#set_encryptionKey');
3791
				$warnings[] = 'The encryption key is not set! Set it in <a href="'.$url.'">$TYPO3_CONF_VARS[SYS][encryptionKey]</a>';
3802
				$warnings["install_encryption"] = sprintf(
3803
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_encryption'),
3804
					'<a href="'.$url.'">',
3805
					'</a>');
3792 3806
			}
3793 3807

  
3794 3808
				// Check if there are still updates to perform
3795 3809
			if (!t3lib_div::compat_version(TYPO3_branch))	{
3796 3810
				$url = 'install/index.php?redirect_url=index.php'.urlencode('?TYPO3_INSTALL[type]=update');
3797
				$warnings[] = 'This installation is not configured for the TYPO3 version it is running. You probably did so by intention, in this case you can safely ignore this message. If unsure, visit the <a href="'.$url.'" target="_blank">Update Wizard</a> in the Install Tool to see which changes would be affected.';
3811
				$warnings["install_update"] = sprintf(
3812
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.install_update'),
3813
					'<a href="'.$url.'">',
3814
					'</a>');
3798 3815
			}
3799 3816

  
3800 3817
				// Check if sys_refindex is empty
3801 3818
			list($count) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('count(*) as rcount','sys_refindex','1=1');
3802 3819
			if (!$count['rcount'])	{
3803
				$warnings[] = 'The Reference Index table is empty which is likely to be the case because you just upgraded your TYPO3 source. Please go to Tools>DB Check and update the reference index.';
3820
				$url = 'sysext/lowlevel/dbint/index.php?&id=0&SET[function]=refindex';
3821
				$warnings["backend_reference"] = sprintf(
3822
					$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference'),
3823
					'<a href="'.$url.'">',
3824
					'</a>');
3804 3825
			}
3805

  
3826
			
3827
			// Hook for additional warnings
3828
			if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'])) {
3829
				foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'] as $classRef) {
3830
					$hookObj = &t3lib_div::getUserObj($classRef);
3831
					if (method_exists($hookObj, 'displayWarningMessages_postProcess')) {
3832
						$hookObj->displayWarningMessages_postProcess($warnings);
3833
					}
3834
				}
3835
			}
3836
			
3806 3837
			if (count($warnings))	{
3807 3838
				$style = ' style="margin-bottom:10px;"';
3808 3839
				$content = '<table border="0" cellpadding="0" cellspacing="0" class="warningbox"><tr><td>'.
3809 3840
					$GLOBALS['TBE_TEMPLATE']->icons(3).'Important notice!<br /><ul><li'.$style.'>'.
3810 3841
					implode('</li><li'.$style.'>', $warnings).'</li></ul>'.
3811
					'It is highly recommended that you change this immediately.'.
3812 3842
					'</td></tr></table>';
3813 3843

  
3814 3844
				unset($warnings);
typo3/sysext/lang/locallang_core.xml (working copy)
186 186
			<label index="cm.copyFolder_into">Copy folder into</label>
187 187
			<label index="cm.moveFolder_into">Move folder into</label>
188 188
			<label index="cm.createNewRelation">Create new relation</label>
189
			<label index="warning.install_password">The Install Tool is still using the default password &quot;joh316&quot;. Update this within the %sAbout section%s of the Install Tool.</label>
190
			<label index="warning.backend_admin">The default backend user "admin" with password &quot;password&quot; is still present. %sEdit this account%s, either deleting it completely or changing the username and password.</label>
191
			<label index="warning.install_enabled">The Install Tool is enabled. Delete the file &quot;%s&quot; when you have finished setting up TYPO3.</label>
192
			<label index="warning.install_encryption">The encryption key is not set. Set it in the %sBasic Configuration section%s of the Install Tool.</label>
193
			<label index="warning.install_update">This installation is not configured for the TYPO3 version it is running. If you did so intentionally, this message can be safely ignored. If you are unsure, visit the %sUpdate Wizard%s section of the Install Tool to see how TYPO3 would change.</label>
194
			<label index="warning.backend_reference">The Reference Index table is empty which is likely the result of a recent TYPO3 upgrade. Please go to %sTools&gt;DB Check%s and update the reference index.</label>
189 195
		</languageKey>
190 196
	</data>
191 197
</T3locallang>