/**
  * Setting the language key that'll be used by the current page.
  * In this function it should be checked, 1) that this language exists, 2) that a page_overlay_record exists, .. and if not the default language, 0 (zero), should be set.
  *
  * @return	void
  * @access private
  */
 function settingLanguage()
 {
     // Get values from TypoScript:
     $lUid = intval($this->config['config']['sys_language_uid']);
     //works only with "ignore" setting
     //need to check access for current page and show error:
     if (!tx_languagevisibility_feservices::checkVisiblityForElement($this->page['uid'], 'pages', $lUid)) {
         $GLOBALS['TSFE']->pageNotFoundAndExit('Page is not visible in requested language [' . $lUid . '/' . $this->page['uid'] . ']');
     }
     //overlay of current page is handled in ux_t3lib_pageSelect::getPageOverlay
     parent::settingLanguage();
 }
 /**
  * Setting the language key that'll be used by the current page.
  * In this function it should be checked, 1) that this language exists, 2) that a page_overlay_record exists, .. and if not the default language, 0 (zero), should be set.
  *
  * @return	void
  * @access private
  */
 function settingLanguage()
 {
     if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'])) {
         $_params = array();
         foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess'] as $_funcRef) {
             t3lib_div::callUserFunction($_funcRef, $_params, $this);
         }
     }
     parent::settingLanguage();
     if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'])) {
         $_params = array();
         foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess'] as $_funcRef) {
             t3lib_div::callUserFunction($_funcRef, $_params, $this);
         }
     }
 }
Exemplo n.º 3
0
$id = intval($idParts[0]);
// Make new instance of TSFE
//$temp_TSFEclassName = t3lib_div::makeInstanceClassName('tslib_fe');
$TSFE = new tslib_fe($GLOBALS['TYPO3_CONF_VARS'], $id, t3lib_div::_GP('type'), t3lib_div::_GP('no_cache'), t3lib_div::_GP('cHash'), t3lib_div::_GP('jumpurl'), t3lib_div::_GP('MP'), t3lib_div::_GP('RDCT'));
// don't cache ajax responses
$TSFE->no_cache = true;
$TSFE->connectToDB();
$TSFE->initFEuser();
$TSFE->checkAlternativeIdMethods();
$TSFE->clear_preview();
$TSFE->determineId();
$TSFE->getCompressedTCarray();
$TSFE->initTemplate();
$TSFE->getConfigArray();
if ($L > 0) {
    $TSFE->settingLanguage();
    $TSFE->settingLocale();
}
// finding the script path from the variable
$ajaxID = (string) t3lib_div::_GP('ajaxID');
require_once t3lib_extMgm::extPath('tt_news') . 'pi/class.tx_ttnews.php';
require_once t3lib_extMgm::extPath('tt_news') . 'lib/class.tx_ttnews_helpers.php';
require_once t3lib_extMgm::extPath('tt_news') . 'lib/class.tx_ttnews_typo3ajax.php';
/**
 * TODO: 24.11.2009
 *
 *
 * use t3lib_div::makeInstance
 */
// instantiating the AJAX object
//$ajaxClassName = t3lib_div::makeInstanceClassName('tx_ttnews_typo3ajax');