示例#1
0
 /**
  * lädt die HybridAuth Klassen
  *
  * @return void
  */
 private static function loadHybridAuth()
 {
     if (!class_exists('Hybrid_Auth')) {
         require_once t3lib_extMgm::extPath('t3socials', '/lib/hybridauth/Hybrid/Auth.php');
         require_once t3lib_extMgm::extPath('t3socials', '/lib/hybridauth/Hybrid/Endpoint.php');
     }
 }
 /**
  * Constructor
  *
  * @param tslib_cObj $contentObject The current cObject. If NULL a new instance will be created
  */
 public function __construct(tslib_cObj $contentObject = NULL)
 {
     if (!t3lib_extMgm::isLoaded('extbase')) {
         return 'In the current version you still need to have Extbase installed in order to use the Fluid Standalone view!';
     }
     $this->initializeAutoloader();
     $this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
     $configurationManager = $this->objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
     if ($contentObject === NULL) {
         $contentObject = t3lib_div::makeInstance('tslib_cObj');
     }
     $configurationManager->setContentObject($contentObject);
     $this->templateParser = $this->objectManager->get('Tx_Fluid_Core_Parser_TemplateParser');
     $this->setRenderingContext($this->objectManager->create('Tx_Fluid_Core_Rendering_RenderingContext'));
     $request = $this->objectManager->create('Tx_Extbase_MVC_Web_Request');
     $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
     $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
     $uriBuilder = $this->objectManager->create('Tx_Extbase_MVC_Web_Routing_UriBuilder');
     $uriBuilder->setRequest($request);
     $controllerContext = $this->objectManager->create('Tx_Extbase_MVC_Controller_ControllerContext');
     $controllerContext->setRequest($request);
     $controllerContext->setUriBuilder($uriBuilder);
     $flashMessageContainer = $this->objectManager->get('Tx_Extbase_MVC_Controller_FlashMessages');
     // singleton
     $controllerContext->setFlashMessageContainer($flashMessageContainer);
     $this->setControllerContext($controllerContext);
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_tx_rggooglemap_pi1'] = array('icon' => t3lib_extMgm::extRelPath('rggooglemap') . 'pi1/ce_wiz.png', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=rggooglemap_pi1');
     return $wizardItems;
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_caretaker_pi_singleview'] = array('icon' => t3lib_extMgm::extRelPath('caretaker') . 'pi_singleview/ce_wiz.gif', 'title' => $LANG->getLLL('pi_singleview_title', $LL), 'description' => $LANG->getLLL('pi_singleview_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=caretaker_pi_singleview');
     return $wizardItems;
 }
示例#5
0
 /**
  * Initializes the Module
  *
  * @return	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = t3lib_div::makeInstance('template');
     $this->doc->setModuleTemplate(t3lib_extMgm::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = t3lib_extMgm::extRelPath('recycler');
     $this->pageRecord = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
     $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
     //don't access in workspace
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $this->isAccessibleForCurrentUser = false;
     }
     //read configuration
     $modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
     if ($this->isCurrentUserAdmin()) {
         $this->allowDelete = true;
     } else {
         $this->allowDelete = $modTS['properties']['allowDelete'] == '1';
     }
     if (isset($modTS['properties']['recordsPageLimit']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
         $this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
     }
 }
 /**
  * Sets the storage security level
  *
  * @return	void
  */
 protected function setStorageSecurityLevel()
 {
     $this->storageSecurityLevel = 'normal';
     if (t3lib_extMgm::isLoaded('saltedpasswords') && tx_saltedpasswords_div::isUsageEnabled('FE')) {
         $this->storageSecurityLevel = 'salted';
     }
 }
 /**
  * Main function, returning the HTML content of the module
  *
  * @return	string		HTML
  */
 function main()
 {
     $content = '';
     $content .= '<br />Update the Static Info Tables with new language labels.';
     $content .= '<br />';
     if (t3lib_div::_GP('import')) {
         $destEncoding = t3lib_div::_GP('dest_encoding');
         $extPath = t3lib_extMgm::extPath('static_info_tables_it');
         $fileContent = explode("\n", t3lib_div::getUrl($extPath . 'ext_tables_static_update.sql'));
         foreach ($fileContent as $line) {
             if ($line = trim($line) and preg_match('#^UPDATE#i', $line)) {
                 $query = $this->getUpdateEncoded($line, $destEncoding);
                 $res = $GLOBALS['TYPO3_DB']->admin_query($query);
             }
         }
         $content .= '<br />';
         $content .= '<p>Encoding: ' . htmlspecialchars($destEncoding) . '</p>';
         $content .= '<p>Done.</p>';
     } elseif (t3lib_extMgm::isLoaded('static_info_tables_it')) {
         $content .= '</form>';
         $content .= '<form action="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" method="post">';
         $content .= '<br />Destination character encoding:';
         $content .= '<br />' . tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', 'utf-8');
         $content .= '<br />(The character encoding must match the encoding of the existing tables data. By default this is UTF-8.)';
         $content .= '<br /><br />';
         $content .= '<input type="submit" name="import" value="Import" />';
         $content .= '</form>';
     } else {
         $content .= '<br /><strong>The extension needs to be installed first!</strong>';
     }
     return $content;
 }
    public function veranstaltungBuchen(&$piBase, $pid, $eventId, $eventDateId)
    {
        $GLOBALS['TSFE']->additionalHeaderData['hetools'] .= '
				<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::siteRelPath('fe_management') . 'res/femanagement.css"/>
				<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::siteRelPath('he_tools') . 'res/technolino.css"/>
				';
        /** @var  $terminModel tx_femanagement_model_events */
        $terminModel = t3lib_div::makeInstance('tx_femanagement_model_events', $piBase, $pid);
        $eventData = $terminModel->getEventData($eventId);
        $out = '<h1>' . $eventData['title'] . '</h1>' . '<h2>Thema: ' . $eventData['subtitle'] . '</h2>';
        $out .= '<form class="technolino" method="POST" action="">';
        $out .= $this->getInputField('organization', 'Name Ihrer Einrichtung');
        $out .= $this->getInputField('first_name', 'Vorname');
        $out .= $this->getInputField('last_name', 'Nachname');
        $out .= $this->getInputField('street', 'Straße/Hausnummer');
        $out .= $this->getInputField('zip', 'Plz');
        $out .= $this->getInputField('city', 'Ort');
        $out .= $this->getInputField('email', 'E-Mail-Adresse');
        $out .= $this->getInputField('phone', 'Tel.');
        $out .= $this->getTextareaField('remarks', 'Bemerkungen', false);
        $out .= '<div id="buttons" class="field">
        <input type="submit" name="anmelden" value="Verbindlich anmelden" />
         </div>';
        $out .= '</form>';
        return $out;
    }
 /**
  * Returns array of system languages
  * @param	integer		page id (only used to get TSconfig configuration setting flag and label for default language)
  * @param	string		Backpath for flags
  * @return	array
  */
 function getSystemLanguages($page_id = 0, $backPath = '')
 {
     global $TCA, $LANG;
     // Icons and language titles:
     t3lib_div::loadTCA('sys_language');
     $flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
     $flagIconPath = $backPath . '../' . substr($flagAbsPath, strlen(PATH_site));
     $modSharedTSconfig = t3lib_BEfunc::getModTSconfig($page_id, 'mod.SHARED');
     $languageIconTitles = array();
     // Set default:
     $languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $LANG->getLL('defaultLanguage') . ')' : $LANG->getLL('defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath . $modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath . $modSharedTSconfig['properties']['defaultLanguageFlag'] : null);
     // Set "All" language:
     $languageIconTitles[-1] = array('uid' => -1, 'title' => $LANG->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => $flagIconPath . 'multi-language.gif');
     // Find all system languages:
     $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', '');
     foreach ($sys_languages as $row) {
         $languageIconTitles[$row['uid']] = $row;
         if ($row['static_lang_isocode'] && t3lib_extMgm::isLoaded('static_info_tables')) {
             $staticLangRow = t3lib_BEfunc::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
             if ($staticLangRow['lg_iso_2']) {
                 $languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
             }
         }
         if (strlen($row['flag'])) {
             $languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath . $row['flag']) ? $flagIconPath . $row['flag'] : '';
         }
     }
     return $languageIconTitles;
 }
	/**
	 * Main function, returning the HTML content of the module
	 *
	 * @return	string		HTML
	 */
	function main()	{

		require_once(t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey).'class.tx_staticinfotables_encoding.php');

		$tableArray = array ('static_countries', 'static_country_zones', 'static_languages', 'static_currencies');

		$content = '';
		$content.= '<br />Convert character encoding of the static info tables.';
		$content.= '<br />The default encoding is UTF-8.';
		$destEncoding = htmlspecialchars(t3lib_div::_GP('dest_encoding'));

		if(t3lib_div::_GP('convert') AND ($destEncoding != '')) {
			foreach ($tableArray as $table) {
				$content .= '<p>'.htmlspecialchars($table.' > '.$destEncoding).'</p>';
				tx_staticinfotables_encoding::convertEncodingTable($table, 'utf-8', $destEncoding);
			}
			$content .= '<p>You must enter the charset \''.$destEncoding.'\' now manually in the EM for static_info_tables!</p>';
			$content .= '<p>Done</p>';
		} else {
			$content .= '<form name="static_info_tables_form" action="'.htmlspecialchars(t3lib_div::linkThisScript()).'" method="post">';
			$linkScript = t3lib_div::slashJS(t3lib_div::linkThisScript());
			$content .= '<br /><br />';
			$content .= 'This conversion works only once. When you converted the tables and you want to do it again to another encoding you have to reinstall the tables with the Extension Manager or select \'UPDATE!\'.';
			$content .= '<br /><br />';
			$content .= 'Destination character encoding:';
			$content .= '<br />'.tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', '', $TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset']);
			$content .= '<br /><br />';
			$content .= '<input type="submit" name="convert" value="Convert"  onclick="this.form.action=\''.$linkScript.'\';submit();" />';
			$content .= '</form>';
		}

		return $content;

	}
 /**
  * Evaluates the captcha word
  */
 public function evalValues($theTable, $dataArray, $origArray, $markContentArray, $cmdKey, $requiredArray, $theField, $cmdParts, $bInternal, &$test, $dataObject)
 {
     $errorField = '';
     // Must be set to FALSE if it is not a test
     $test = FALSE;
     if (trim($cmdParts[0]) == 'freecap' && t3lib_extMgm::isLoaded('sr_freecap') && isset($dataArray[$theField])) {
         $freeCap = t3lib_div::getUserObj('&tx_srfreecap_pi2');
         if (isset($GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['sr_freecap_EidDispatcher'])) {
             $sessionNameSpace = 'tx_srfreecap';
         } else {
             // Old version of sr_freecap
             $sessionNameSpace = 'tx_' . $freeCap->extKey;
         }
         // Save the sr_freecap word_hash
         // sr_freecap will invalidate the word_hash after calling checkWord
         $sessionData = $GLOBALS['TSFE']->fe_user->getKey('ses', $sessionNameSpace);
         if (!$freeCap->checkWord($dataArray[$theField])) {
             $errorField = $theField;
         } else {
             // Restore sr_freecap word_hash
             $GLOBALS['TSFE']->fe_user->setKey('ses', $sessionNameSpace, $sessionData);
             $GLOBALS['TSFE']->storeSessionData();
         }
     }
     return $errorField;
 }
 /**
  * Constructor
  */
 function tx_kickstarter_wizard()
 {
     $this->modData = t3lib_div::_POST($this->varPrefix);
     $version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
     if ($version < 4006000) {
         $LOCAL_LANG = t3lib_div::readLLXMLfile(t3lib_extMgm::extPath('setup') . '/mod/locallang.xml', 'default');
         // Getting the available languages
         $theLanguages = t3lib_div::trimExplode('|', TYPO3_languages);
     } else {
         /** @var $xliffParser t3lib_l10n_parser_Xliff */
         $xliffParser = t3lib_div::makeInstance('t3lib_l10n_parser_Xliff');
         $LOCAL_LANG = $xliffParser->getParsedData(t3lib_extMgm::extPath('setup') . '/mod/locallang.xlf', 'default');
         /** @var $locales t3lib_l10n_Locales */
         $locales = t3lib_div::makeInstance('t3lib_l10n_Locales');
         // Getting the available languages
         $theLanguages = $locales->getLocales();
     }
     foreach ($theLanguages as $val) {
         if ($val !== 'default') {
             if ($version < 4006000) {
                 $localLabel = htmlspecialchars($LOCAL_LANG['default']['lang_' . $val]);
             } else {
                 $localLabel = htmlspecialchars($LOCAL_LANG['default']['lang_' . $val][0]['target']);
             }
             $this->languages[$val] = $localLabel;
         }
     }
     asort($this->languages);
     // init reserved words
     $resWords = t3lib_div::makeInstance('tx_kickstarter_reservedWords');
     $this->reservedWords = $resWords->getReservedWords();
 }
 /**
  * Renders entry for one page of the current document.
  *
  * @access	protected
  *
  * @param	integer		$number: The page to render
  * @param	string		$template: Parsed template subpart
  *
  * @return	string		The rendered entry ready for output
  */
 protected function getEntry($number, $template)
 {
     // Set current page if applicable.
     if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) {
         $markerArray['###STATE###'] = 'cur';
     } else {
         $markerArray['###STATE###'] = 'no';
     }
     // Set page number.
     $markerArray['###NUMBER###'] = $number;
     // Set pagination.
     $markerArray['###PAGINATION###'] = $this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['label'];
     // Get thumbnail or placeholder.
     if (!empty($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']])) {
         $thumbnailFile = $this->doc->getFileLocation($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']]);
     } elseif (!empty($this->conf['placeholder'])) {
         $thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
     } else {
         $thumbnailFile = t3lib_extMgm::siteRelPath($this->extKey) . 'plugins/pagegrid/placeholder.jpg';
     }
     $thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
     // Get new plugin variables for typolink.
     $piVars = $this->piVars;
     // Unset no longer needed plugin variables.
     // unset($piVars['pagegrid']) is for DFG Viewer compatibility!
     unset($piVars['pointer'], $piVars['DATA'], $piVars['pagegrid']);
     $piVars['page'] = $number;
     $linkConf = array('useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => t3lib_div::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), 'title' => $markerArray['###PAGINATION###']);
     $markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf);
     return $this->cObj->substituteMarkerArray($template, $markerArray);
 }
 public function getMapCore($backpath = '')
 {
     $path = ($backpath ? $backpath : $GLOBALS['TSFE']->absRefPrefix) . t3lib_extMgm::siteRelPath('ods_osm') . 'res/';
     $path = $this->config['local_js'] ? $path . 'OpenLayers3/' : 'http://ol3js.org/en/master/';
     $GLOBALS['TSFE']->getPageRenderer()->addCssFile($path . 'css/ol.css');
     $this->scripts = array($path . 'build/ol.js');
 }
 /**
  * @return void
  */
 public function execute()
 {
     $contexts = array('BE', 'FE');
     if ($this->getExtensionKey()) {
         $extensionList = array($this->getExtensionKey());
     } else {
         $extensionList = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered();
     }
     foreach ($contexts as $context) {
         if (is_array($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) && count($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) > 0) {
             foreach ($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS'] as $targetClass => $implementationClass) {
                 if (is_file($implementationClass)) {
                     $path = str_replace(PATH_typo3conf . 'ext/', '', $implementationClass);
                     $extKey = current(explode('/', $path));
                 } else {
                     $extKey = t3lib_extMgm::getExtensionKeyByPrefix(strtolower($implementationClass));
                 }
                 if (!in_array($extKey, $extensionList)) {
                     continue;
                 }
                 $this->issues[] = $this->createIssue($context, $targetClass, $implementationClass, $extKey);
             }
         }
     }
 }
 /**
  * Main function
  *
  * @param clickMenu reference parent object
  * @param array menutitems for manipultation
  * @param string table name
  * @param int uid
  * @return array manipulated menuitems
  */
 function main(clickMenu $backRef, array $menuItems, $table, $uid)
 {
     if ($table != 'tx_crawler_configuration') {
         // early return without doing anything
         return $menuItems;
     }
     $localItems = array();
     $row = t3lib_BEfunc::getRecord($table, $uid, 'pid, name, processing_instruction_filter', '', true);
     if (!empty($row)) {
         if (version_compare(TYPO3_version, '4.5.0', '>=')) {
             $url = t3lib_extMgm::extRelPath('info') . 'mod1/index.php';
         } else {
             $url = $backRef->backPath . 'mod/web/info/index.php';
         }
         $url .= '?id=' . intval($row['pid']);
         $url .= '&SET[function]=tx_crawler_modfunc1';
         $url .= '&SET[crawlaction]=start';
         $url .= '&configurationSelection[]=' . $row['name'];
         foreach (t3lib_div::trimExplode(',', $row['processing_instruction_filter']) as $processing_instruction) {
             $url .= '&procInstructions[]=' . $processing_instruction;
         }
         // $onClick = $backRef->urlRefForCM($url);
         $onClick = "top.nextLoadModuleUrl='" . $url . "';top.goToModule('web_info',1);";
         $localItems[] = $backRef->linkItem('Crawl', $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('crawler') . 'icon_tx_crawler_configuration.gif" border="0" align="top" alt="" />'), $onClick, 0);
     }
     return array_merge($menuItems, $localItems);
 }
 /**
  * Return dam record
  *
  * @param integer $uid uid of media element.
  * @param string $as name of element which is used for the dam record
  * @return string
  * @throws Tx_Fluid_Core_ViewHelper_Exception
  */
 public function render($uid, $as)
 {
     if (!t3lib_extMgm::isLoaded('dam')) {
         throw new Tx_Fluid_Core_ViewHelper_Exception('DamViewHelper needs a loaded DAM extension', 1318786684);
     }
     if ($GLOBALS['TSFE']->sys_language_content > 0) {
         $media = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'tx_news_domain_model_media', 'deleted=0 AND uid =' . $uid);
         $media = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tx_news_domain_model_media', $media, $GLOBALS['TSFE']->sys_language_content);
         if ($media['_LOCALIZED_UID'] > 0) {
             // Does this localized media has dam record?
             $where = 'uid_foreign =' . (int) $media['_LOCALIZED_UID'] . ' AND tablenames =\'tx_news_domain_model_media\' AND ident = \'tx_news_media\'';
             $damRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid_local', 'tx_dam_mm_ref', $where);
             if (is_array($damRec) && $damRec['uid_local']) {
                 $uid = $media['_LOCALIZED_UID'];
             }
         }
     }
     $res = tx_dam_db::referencesQuery('tx_dam', '', 'tx_news_domain_model_media', (int) $uid, $mmIdent = '', $mmTable = 'tx_dam_mm_ref', $fields = 'tx_dam.*');
     $record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
     $GLOBALS['TYPO3_DB']->sql_free_result($res);
     $this->templateVariableContainer->add($as, $record);
     $output = $this->renderChildren();
     $this->templateVariableContainer->remove($as);
     return $output;
 }
示例#18
0
 /**
  * @param array $fieldList
  * @param array $r
  * @param tx_ttnews $tt_news_original
  * @return array
  */
 public function indexSingleNewsRecord(array $fieldList, array $r, tx_ttnews $tt_news_original)
 {
     $tt_news = clone $tt_news_original;
     // Add ###NEWS_CONTENT### to the list of markers that need to be rendered
     $tt_news->renderMarkers = array('###NEWS_CONTENT###');
     // Load tt_news in single-view
     $tt_news->config['code'] = 'SINGLE';
     // Disable caching, as this is not a normal page-rendering process
     $tt_news->allowCaching = false;
     // Disable custom image-marker rendering, used f.e. by perfectlightbox ...
     unset($tt_news->conf['imageMarkerFunc']);
     // Disable all extensions for image-generation. This prevents any image-generation and works around a bug with FAL :)
     $imageExtensions = $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'];
     $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] = "";
     $k = false;
     // The extension newsreadedcount is known to use an instance of fe_user and it would count the news-read value up every time the article is indexed ...
     if (t3lib_extMgm::isLoaded('newsreadedcount') && false !== ($k = array_search('EXT:newsreadedcount/pi1/class.tx_newsreadedcount_pi1.php:tx_newsreadedcount_pi1', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook']))) {
         unset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook'][$k]);
     }
     // Render markers for single-view
     $markerArray = $tt_news->getItemMarkerArray($r, $tt_news->conf['displaySingle.']);
     // Add the settings back, so we don't leave a gap here.
     if (t3lib_extMgm::isLoaded('newsreadedcount') && $k !== false) {
         $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['extraItemMarkerHook'][$k] = 'EXT:newsreadedcount/pi1/class.tx_newsreadedcount_pi1.php:tx_newsreadedcount_pi1';
     }
     // Restore value for allowed image file-extensions
     $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] = $imageExtensions;
     // Replace the row's body-text by it's rendered value
     $r['bodytext'] = $markerArray['###NEWS_CONTENT###'];
     return $r;
 }
 /**
  * Lädt ein COnfigurations Objekt nach mit der TS aus der Extension
  * Dabei wird alles geholt was in "plugin.tx_$extKey", "lib.$extKey." und
  * "lib.links." liegt
  *
  * @param string $extKey Extension, deren TS Config geladen werden soll
  * @param string $extKeyTS Extension, deren Konfig innerhalb der
  *     TS Config geladen werden soll.
  *     Es kann also zb. das TS von mklib geladen werden aber darin die konfig für
  *     das plugin von mkxyz
  * @param string $sStaticPath pfad zum TS
  * @param array $aConfig zusätzliche Konfig, die die default  überschreibt
  * @param boolean $resolveReferences sollen referenzen die in lib.
  *     und plugin.tx_$extKeyTS stehen aufgelöst werden?
  * @param boolean $forceTsfePreparation
  * @return tx_rnbase_configurations
  */
 public static function loadConfig4BE($extKey, $extKeyTs = null, $sStaticPath = '', $aConfig = array(), $resolveReferences = false, $forceTsfePreparation = false)
 {
     $extKeyTs = is_null($extKeyTs) ? $extKey : $extKeyTs;
     if (!$sStaticPath) {
         $sStaticPath = '/static/ts/setup.txt';
     }
     if (file_exists(t3lib_div::getFileAbsFileName('EXT:' . $extKey . $sStaticPath))) {
         t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . $sStaticPath . '">');
     }
     tx_rnbase::load('tx_rnbase_configurations');
     tx_rnbase::load('tx_rnbase_util_Misc');
     $tsfePreparationOptions = array();
     if ($forceTsfePreparation) {
         $tsfePreparationOptions['force'] = true;
     }
     // Ist bei Aufruf aus BE notwendig! (@TODO: sicher???)
     tx_rnbase_util_Misc::prepareTSFE($tsfePreparationOptions);
     $GLOBALS['TSFE']->config = array();
     $cObj = t3lib_div::makeInstance('tslib_cObj');
     $pageTsConfig = self::getPagesTSconfig(0);
     $tempConfig = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
     $tempConfig['lib.'][$extKeyTs . '.'] = $pageTsConfig['lib.'][$extKeyTs . '.'];
     $tempConfig['lib.']['links.'] = $pageTsConfig['lib.']['links.'];
     if ($resolveReferences) {
         $GLOBALS['TSFE']->tmpl->setup['lib.'][$extKeyTs . '.'] = $tempConfig['lib.'][$extKeyTs . '.'];
         $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . $extKeyTs . '.'] = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
     }
     $pageTsConfig = $tempConfig;
     $qualifier = $pageTsConfig['qualifier'] ? $pageTsConfig['qualifier'] : $extKeyTs;
     // möglichkeit die default konfig zu überschreiben
     $pageTsConfig = t3lib_div::array_merge_recursive_overrule($pageTsConfig, $aConfig);
     $configurations = new tx_rnbase_configurations();
     $configurations->init($pageTsConfig, $cObj, $extKeyTs, $qualifier);
     return $configurations;
 }
 /**
  * Initialize handler
  *
  * @param	array		Configuration from DBAL
  * @param	object		Parent object
  * @return	boolean		True on success.
  */
 function init($config, $pObj)
 {
     $this->config = $config['config'];
     if (t3lib_extMgm::isLoaded('libunzipped')) {
         // Include Unzip library:
         require_once t3lib_extMgm::extPath('libunzipped') . 'class.tx_libunzipped.php';
         // Find database file:
         $sxc_file = t3lib_div::getFileAbsFileName($this->config['sxc_file']);
         if (@is_file($sxc_file)) {
             // Initialize Unzip object:
             $this->unzip = t3lib_div::makeInstance('tx_libunzipped');
             $this->spreadSheetFiles = $this->unzip->init($sxc_file);
             if (is_array($this->spreadSheetFiles)) {
                 return TRUE;
             } else {
                 $this->errorStatus = 'Spreadsheet could not be unzipped...?';
             }
         } else {
             $this->errorStatus = 'The Spreadsheet file "' . $sxc_file . '" was not found!';
         }
     } else {
         $this->errorStatus = 'This data handler needs the extension "tx_libunzipped" to be installed!';
     }
     return FALSE;
 }
 function initialize_editor($pageId, $template_uid = 0)
 {
     // Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
     global $tmpl, $tplRow, $theConstants;
     $tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");
     // Defined global here!
     $tmpl->tt_track = 0;
     // Do not log time-performance information
     $tmpl->init();
     $tmpl->ext_localGfxPrefix = t3lib_extMgm::extPath("tstemplate_ceditor");
     $tmpl->ext_localWebGfxPrefix = $GLOBALS["BACK_PATH"] . t3lib_extMgm::extRelPath("tstemplate_ceditor");
     $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
     // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
     if (is_array($tplRow)) {
         // IF there was a template...
         // Gets the rootLine
         $sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
         $rootLine = $sys_page->getRootLine($pageId);
         $tmpl->runThroughTemplates($rootLine, $template_uid);
         // This generates the constants/config + hierarchy info for the template.
         $theConstants = $tmpl->generateConfig_constants();
         // The editable constants are returned in an array.
         $tmpl->ext_categorizeEditableConstants($theConstants);
         // The returned constants are sorted in categories, that goes into the $tmpl->categories array
         $tmpl->ext_regObjectPositions($tplRow["constants"]);
         // This array will contain key=[expanded constantname], value=linenumber in template. (after edit_divider, if any)
         return 1;
     }
 }
 /**
  * Hooks to the felogin extension to provide additional code for FE login
  *
  * @return	array	0 => onSubmit function, 1 => extra fields and required files
  */
 public function loginFormHook()
 {
     $result = array(0 => '', 1 => '');
     if ($GLOBALS['TYPO3_CONF_VARS']['FE']['loginSecurityLevel'] == 'rsa') {
         $backend = tx_rsaauth_backendfactory::getBackend();
         if ($backend) {
             $result[0] = 'tx_rsaauth_feencrypt(this);';
             $javascriptPath = t3lib_extMgm::siteRelPath('rsaauth') . 'resources/';
             $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js', 'rsaauth_min.js');
             foreach ($files as $file) {
                 $result[1] .= '<script type="text/javascript" src="' . t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
             }
             // Generate a new key pair
             $keyPair = $backend->createNewKeyPair();
             // Save private key
             $storage = tx_rsaauth_storagefactory::getStorage();
             /* @var $storage tx_rsaauth_abstract_storage */
             $storage->put($keyPair->getPrivateKey());
             // Add RSA hidden fields
             $result[1] .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
             $result[1] .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
         }
     }
     return $result;
 }
 /**
  * Synchronizes backend users.
  *
  * @param array $users
  */
 protected function synchronizeUsers(array $users)
 {
     /** @var $instance tx_saltedpasswords_salts */
     $instance = null;
     if (t3lib_extMgm::isLoaded('saltedpasswords')) {
         $instance = tx_saltedpasswords_salts_factory::getSaltingInstance(null, 'BE');
     }
     $authorizedKeys = array_flip(array('username', 'admin', 'disable', 'realName', 'email', 'TSconfig', 'starttime', 'endtime', 'lang', 'tx_openid_openid', 'deleted'));
     foreach ($users as $user) {
         $user = array_intersect_key($user, $authorizedKeys);
         if (empty($this->config['synchronizeDeletedAccounts']) || !$this->config['synchronizeDeletedAccounts']) {
             if (isset($user['deleted']) && $user['deleted']) {
                 // We do not authorize deleted user accounts to be synchronized
                 // on this website
                 continue;
             }
         } else {
             $user['deleted'] = $user['deleted'] ? 1 : 0;
         }
         // Generate a random password
         $password = t3lib_div::generateRandomBytes(16);
         $user['password'] = $instance ? $instance->getHashedPassword($password) : md5($password);
         $localUser = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('uid', 'be_users', 'username='******'username'], 'be_users'));
         if ($localUser) {
             // Update existing user
             $this->getDatabaseConnection()->exec_UPDATEquery('be_users', 'uid=' . $localUser['uid'], $user);
         } else {
             // Create new user
             $this->getDatabaseConnection()->exec_INSERTquery('be_users', $user);
         }
     }
 }
 /**
  * Processing the wizard items array
  *
  * @param	array		$wizardItems: The wizard items
  * @return	Modified array with wizard items
  */
 function proc($wizardItems)
 {
     global $LANG;
     $LL = $this->includeLocalLang();
     $wizardItems['plugins_user_fdfactdbcc_pi1'] = array('icon' => t3lib_extMgm::extRelPath('user_fdf_actdb_cc') . 'pi1/ce_wiz.gif', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=user_fdf_actdb_cc_pi1');
     return $wizardItems;
 }
 /**
  * Adds onchange listener on the drop down menu "predefined".
  * If the event is fired and old value was ".default", then empty some fields.
  *
  * @param array $config
  * @return string the javascript
  * @author Fabien Udriot
  */
 function addFields_predefinedJS($config)
 {
     $newRecord = 'true';
     if ($config['row']['pi_flexform'] != '') {
         $flexData = t3lib_div::xml2array($config['row']['pi_flexform']);
         if (isset($flexData['data']['sDEF']['lDEF']['predefined'])) {
             $newRecord = 'false';
         }
     }
     $uid = key($GLOBALS['SOBE']->editconf['tt_content']);
     if ($uid < 0 || empty($uid) || !strstr($uid, 'NEW')) {
         $uid = $GLOBALS['SOBE']->elementsData[0]['uid'];
     }
     //print_r($GLOBALS['SOBE']->elementsData[0]);
     $js = "<script>\n";
     $js .= "/*<![CDATA[*/\n";
     $divId = $GLOBALS['SOBE']->tceforms->dynNestedStack[0][1];
     if (!$divId) {
         //$divId = 'DTM-' . $uid;
         $divId = "DIV.c-tablayer";
     } else {
         $divId .= "-DIV";
     }
     $js .= "var uid = '" . $uid . "'\n";
     $js .= "var flexformBoxId = '" . $divId . "'\n";
     //$js .= "var flexformBoxId = 'DIV.c-tablayer'\n";
     $js .= "var newRecord = " . $newRecord . "\n";
     $js .= file_get_contents(t3lib_extMgm::extPath('formhandler') . 'Resources/JS/addFields_predefinedJS.js');
     $js .= "/*]]>*/\n";
     $js .= "</script>\n";
     return $js;
 }
 private function fetchPhpHooks()
 {
     $hooksFileBasepath = t3lib_extMgm::extPath('t3tt') . 'Resources/Private/PHP/Transition/';
     // TODO: make this configurable
     $hooksFile = $hooksFileBasepath . $this->_transformationRequest->getPhpHooksFile();
     $this->_phpHookAggregation = (array) (include_once $hooksFile);
 }
 /**
  * Processing of clickmenu items
  *
  * @param	object		Reference to parent
  * @param	array		Menu items array to modify
  * @param	string		Table name
  * @param	integer		Uid of the record
  * @return	array		Menu item array, returned after modification
  * @todo	Skinning for icons...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA;
     $localItems = array();
     if ($backRef->cmLevel && t3lib_div::_GP('subname') == 'moreoptions' || $table === 'pages' && $uid == 0) {
         // Show import/export on second level menu OR root level.
         $LL = $this->includeLL();
         $modUrl = $backRef->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php';
         $url = $modUrl . '?tx_impexp[action]=export&id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']);
         if ($table == 'pages') {
             $url .= '&tx_impexp[pagetree][id]=' . $uid;
             $url .= '&tx_impexp[pagetree][levels]=0';
             $url .= '&tx_impexp[pagetree][tables][]=_ALL';
         } else {
             $url .= '&tx_impexp[record][]=' . rawurlencode($table . ':' . $uid);
             $url .= '&tx_impexp[external_ref][tables][]=_ALL';
         }
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
         if ($table == 'pages') {
             $url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
             $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
         }
     }
     return array_merge($menuItems, $localItems);
 }
 /**
  * Main function
  *
  * @param   [type]    $$backRef: ...
  * @param   [type]    $menuItems: ...
  * @param   [type]    $table: ...
  * @param   [type]    $uid: ...
  * @return  [type]    ...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA, $LANG;
     $localItems = array();
     if (!$backRef->cmLevel) {
         // Returns directly, because the clicked item was not from the pages table
         if ($table == "tx_l10nmgr_cfg") {
             // Adds the regular item:
             $LL = $this->includeLL();
             // Repeat this (below) for as many items you want to add!
             // Remember to add entries in the localconf.php file for additional titles.
             $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm1/index.php?id=" . $uid;
             $localItems[] = $backRef->linkItem($GLOBALS["LANG"]->getLLL("cm1_title", $LL), $backRef->excludeIcon('<img src="' . t3lib_extMgm::extRelPath("l10nmgr") . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" />'), $backRef->urlRefForCM($url), 1);
         }
         $localItems["moreoptions_tx_l10nmgr_cm3"] = $backRef->linkItem('L10Nmgr tools', '', "top.loadTopMenu('" . t3lib_div::linkThisScript() . "&cmLevel=1&subname=moreoptions_tx_l10nmgrXX_cm3');return false;", 0, 1);
         // Simply merges the two arrays together and returns ...
         $menuItems = array_merge($menuItems, $localItems);
     } elseif (t3lib_div::_GET('subname') == 'moreoptions_tx_l10nmgrXX_cm3') {
         $url = t3lib_extMgm::extRelPath("l10nmgr") . "cm3/index.php?id=" . $uid . '&table=' . $table;
         $localItems[] = $backRef->linkItem('Create priority', '', $backRef->urlRefForCM($url . '&cmd=createPriority'), 1);
         $localItems[] = $backRef->linkItem('Manage priorities', '', $backRef->urlRefForCM($url . '&cmd=managePriorities'), 1);
         $localItems[] = $backRef->linkItem('Update Index', '', $backRef->urlRefForCM($url . '&cmd=updateIndex'), 1);
         $localItems[] = $backRef->linkItem('Flush Translations', '', $backRef->urlRefForCM($url . '&cmd=flushTranslations'), 1);
         $menuItems = array_merge($menuItems, $localItems);
     }
     return $menuItems;
 }
 public function __construct(Tx_Formhandler_Component_Manager $componentManager, Tx_Formhandler_Configuration $configuration)
 {
     parent::__construct($componentManager, $configuration);
     require_once t3lib_extMgm::extPath('formhandler') . 'Resources/PHP/class.formhandler_htmlmail.php';
     $this->emailObj = t3lib_div::makeInstance('formhandler_htmlmail');
     $this->emailObj->start();
 }
    /**
     * [Describe function...]
     *
     * @return	[type]		...
     */
    function displayMessage(&$params, &$tsObj)
    {
        $out = '';
        if ($this->compatibility()->int_from_ver(TYPO3_version) < 4003000) {
            // 4.3.0 comes with flashmessages styles. For older versions we include the needed styles here
            $cssPath = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('tt_news');
            $out .= '<link rel="stylesheet" type="text/css" href="' . $cssPath . 'compat/flashmessages.css" media="screen" />';
        }
        if ($this->compatibility()->int_from_ver(TYPO3_version) < 4005000) {
            $link = 'index.php?&amp;id=0&amp;CMD[showExt]=tt_news&amp;SET[singleDetails]=updateModule';
        } else {
            $link = 'mod.php?&amp;id=0&amp;M=tools_em&amp;CMD[showExt]=tt_news&amp;SET[singleDetails]=updateModule';
        }
        $out .= '
		<div style="position:absolute;top:10px;right:10px; width:300px;">
			<div class="typo3-message message-information">
   				<div class="message-header">' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsgHeader') . '</div>
  				<div class="message-body">
  					' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsg') . '<br />
  					<a style="text-decoration:underline;" href="' . $link . '">
  					' . $GLOBALS['LANG']->sL('LLL:EXT:tt_news/locallang.xml:extmng.updatermsgLink') . '</a>
  				</div>
  			</div>
  		</div>
  		';
        return $out;
    }