Bug #20008 » 0010426.patch
t3lib/class.t3lib_befunc.php Mon Feb 16 07:59:25 2009 | ||
---|---|---|
* Call ALL methods without making an object!
|
||
* Eg. to get a page-record 51 do this: 't3lib_BEfunc::getRecord('pages',51)'
|
||
*
|
||
* $Id: class.t3lib_befunc.php 4303 2008-10-10 07:41:02Z dmitry $
|
||
* $Id: class.t3lib_befunc.php 3805 2008-06-11 07:37:48Z stucki $
|
||
* Usage counts are based on search 22/2 2003 through whole backend source of typo3/
|
||
* Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj
|
||
* XHTML compliant
|
||
... | ... | |
if ($altUrl) {
|
||
$url = $altUrl;
|
||
} else {
|
||
|
||
if ($GLOBALS['BE_USER']->workspace!=0) {
|
||
$url = t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir.'mod/user/ws/wsol_preview.php?id='.$id.$addGetVars.$anchor;
|
||
} else {
|
||
if ($rootLine) {
|
||
$parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
|
||
if (t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path'])) {
|
||
$preUrl_temp = t3lib_BEfunc::firstDomainRecord($rootLine);
|
||
}
|
||
// check where to render the page
|
||
$viewScript=($GLOBALS['BE_USER']->workspace!=0)?'/'.TYPO3_mainDir.'mod/user/ws/wsol_preview.php?id=':'/index.php?id=';
|
||
// check alternate Domains
|
||
if ($rootLine) {
|
||
$parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
|
||
if (t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path'])) {
|
||
$preUrl_temp = t3lib_BEfunc::firstDomainRecord($rootLine);
|
||
}
|
||
$preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..';
|
||
$url = $preUrl.'/index.php?id='.$id.$addGetVars.$anchor;
|
||
}
|
||
$preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..';
|
||
$url = $preUrl.$viewScript.$id.$addGetVars.$anchor;
|
||
}
|
||
|
||
return "previewWin=window.open('".$url."','newTYPO3frontendWindow');".
|