bug_11672.diff

Administrator Admin, 2010-06-09 16:47

Download (2.75 KB)

View differences:

typo3_src.new/typo3/sysext/version/cm1/index.php 2010-05-11 12:58:00.000000000 +0200
720 720
				$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
721 721
			}
722 722
			$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
723
			
724
			
725
			/**
726
			  * generates a preview link for each language available on the page
727
			  * [PATCH begin] Constantin Lebrecht <constantin.lebrecht@dkd.de>
728
			  */
729
		
730
			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_language_uid', 
731
														  'pages_language_overlay', 
732
														  'pid='.$this->id.' AND hidden=0 AND deleted=0');
733
			while( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res) ) {
734
				
735
				// add the language id as param to the generated preview link
736
				if (t3lib_div::_POST('_previewLink_wholeWorkspace'))	{
737
					$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?'.'ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours,$GLOBALS['BE_USER']->workspace).'&id='.intval($this->id);
738
				} else {
739
					$params = 'id='.$this->id.'&L='.$row['sys_language_uid'].'&ADMCMD_previewWS='.$GLOBALS['BE_USER']->workspace;
740
					$previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?'.'ADMCMD_prev='.t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'],60*60*$ttlHours);
741
				}
742
 				
743
 				// fetch the name of the language
744
 				$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title', 
745
 															   'sys_language', 
746
 						    								   'uid='.$row['sys_language_uid']);
747
 				$language = $GLOBALS['TYPO3_DB']->sql_fetch_row($res2);
748
 				$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl').' ('.$language[0].')', sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1); 			
749
 			}
750
 			/**
751
 			  * [PATCH end]
752
 			  */
753
			
754
			
723 755
		}
724 756

  
725 757
			// Output overview content: