/**
  * 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 (trim($GLOBALS['TYPO3_CONF_VARS']['FE']['loginSecurityLevel']) === 'rsa') {
         $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
         if ($backend) {
             $result[0] = 'tx_rsaauth_feencrypt(this);';
             $javascriptPath = \TYPO3\CMS\Core\Extension\ExtensionManager::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="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
             }
             // Generate a new key pair
             $keyPair = $backend->createNewKeyPair();
             // Save private key
             $storage = \TYPO3\CMS\Rsaauth\Storage\StorageFactory::getStorage();
             /** @var $storage \TYPO3\CMS\Rsaauth\Storage\AbstractStorage */
             $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;
 }
 /**
  * Initialize editor
  *
  * @param integer $pageId
  * @param integer $template_uid
  * @return integer
  * @todo Define visibility
  */
 public 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 = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
     // Defined global here!
     $tmpl->tt_track = 0;
     // Do not log time-performance information
     $tmpl->init();
     $tmpl->ext_localGfxPrefix = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('tstemplate_ceditor');
     $tmpl->ext_localWebGfxPrefix = $GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('tstemplate_ceditor');
     // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
     $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
     // IF there was a template...
     if (is_array($tplRow)) {
         // Gets the rootLine
         $sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
         $rootLine = $sys_page->getRootLine($pageId);
         // This generates the constants/config + hierarchy info for the template.
         $tmpl->runThroughTemplates($rootLine, $template_uid);
         // The editable constants are returned in an array.
         $theConstants = $tmpl->generateConfig_constants();
         // The returned constants are sorted in categories, that goes into the $tmpl->categories array
         $tmpl->ext_categorizeEditableConstants($theConstants);
         // This array will contain key=[expanded constantname], value=linenumber in template. (after edit_divider, if any)
         $tmpl->ext_regObjectPositions($tplRow['constants']);
         return 1;
     }
 }
 /**
  * Returns array of system languages
  *
  * Since TYPO3 4.5 the flagIcon is not returned as a filename in "gfx/flags/*" anymore,
  * but as a string <flags-xx>. The calling party should call
  * t3lib_iconWorks::getSpriteIcon(<flags-xx>) to get an HTML which will represent
  * the flag of this language.
  *
  * @param integer $page_id Page id (only used to get TSconfig configuration setting flag and label for default language)
  * @param string $backPath Backpath for flags
  * @return array Array with languages (title, uid, flagIcon)
  * @todo Define visibility
  */
 public function getSystemLanguages($page_id = 0, $backPath = '')
 {
     $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($page_id, 'mod.SHARED');
     $languageIconTitles = array();
     // fallback "old iconstyles"
     if (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {
         $modSharedTSconfig['properties']['defaultLanguageFlag'] = str_replace('.gif', '', $modSharedTSconfig['properties']['defaultLanguageFlag']);
     }
     $languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage') . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? 'flags-' . $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty');
     // Set "All" language:
     $languageIconTitles[-1] = array('uid' => -1, 'title' => $GLOBALS['LANG']->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => 'flags-multiple');
     // 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'] && \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('static_info_tables')) {
             $staticLangRow = \TYPO3\CMS\Backend\Utility\BackendUtility::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'] = \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconName('sys_language', $row);
         }
     }
     return $languageIconTitles;
 }
 /**
  * Provides form code and javascript for the user setup.
  *
  * @param array $parameters Parameters to the script
  * @param \TYPO3\CMS\Backend\Controller\LoginController $userSetupObject Calling object: user setup module
  * @return string The code for the user setup
  */
 public function getLoginScripts(array $parameters, \TYPO3\CMS\Setup\Controller\SetupModuleController $userSetupObject)
 {
     $content = '';
     if ($this->isRsaAvailable()) {
         // If we can get the backend, we can proceed
         $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
         $javascriptPath = \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('rsaauth') . 'resources/';
         $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js', 'rsaauth_min.js');
         $content = '';
         foreach ($files as $file) {
             $content .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
         }
         // Generate a new key pair
         $keyPair = $backend->createNewKeyPair();
         // Save private key
         $storage = \TYPO3\CMS\Rsaauth\Storage\StorageFactory::getStorage();
         /** @var $storage \TYPO3\CMS\Rsaauth\Storage\AbstractStorage */
         $storage->put($keyPair->getPrivateKey());
         // Add form tag
         $form = '<form action="' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded" onsubmit="tx_rsaauth_encryptUserSetup();">';
         // Add RSA hidden fields
         $form .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
         $form .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
         $userSetupObject->doc->form = $form;
     }
     return $content;
 }
 /**
  * Initializes the Module
  *
  * @return 	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('recycler');
     $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::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']);
     }
 }
 /**
  * Initialize, setting what is necessary for browsing pages.
  * Using the current user.
  *
  * @param string $clause Additional clause for selecting pages.
  * @param string $orderByFields record ORDER BY field
  * @return void
  * @todo Define visibility
  */
 public function init($clause = '', $orderByFields = '')
 {
     // This will hide records from display - it has nothing todo with user rights!!
     $clauseExcludePidList = '';
     if ($pidList = $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) {
         if ($pidList = $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) {
             $clauseExcludePidList = ' AND pages.uid NOT IN (' . $pidList . ')';
         }
     }
     // This is very important for making trees of pages: Filtering out deleted pages, pages with no access to and sorting them correctly:
     parent::init(' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1) . ' ' . $clause . $clauseExcludePidList, 'sorting');
     $this->table = 'pages';
     $this->setTreeName('browsePages');
     $this->domIdPrefix = 'pages';
     $this->iconName = '';
     $this->title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
     $this->MOUNTS = $GLOBALS['WEBMOUNTS'];
     if ($pidList) {
         // Remove mountpoint if explicitly set in options.hideRecords.pages (see above)
         $hideList = explode(',', $pidList);
         $this->MOUNTS = array_diff($this->MOUNTS, $hideList);
     }
     $this->fieldArray = array_merge($this->fieldArray, array('doktype', 'php_tree_stop', 't3ver_id', 't3ver_state', 't3ver_wsid', 't3ver_state', 't3ver_move_id'));
     if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms')) {
         $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'is_siteroot', 'nav_hide'));
     }
 }
 /**
  * Init function
  * REMEMBER to feed a $clause which will filter out non-readable pages!
  *
  * @param string $clause Part of where query which will filter out non-readable pages.
  * @param string $orderByFields Record ORDER BY field
  * @return void
  * @todo Define visibility
  */
 public function init($clause = '', $orderByFields = '')
 {
     parent::init(' AND deleted=0 ' . $clause, 'sorting');
     if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms')) {
         $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'nav_hide'));
     }
     $this->table = 'pages';
     $this->treeName = 'pages';
 }
 /**
  * Frontend hook: If the page is not being re-generated this is our chance to force it to be (because re-generation of the page is required in order to have the indexer called!)
  *
  * @param 	array		Parameters from frontend
  * @param 	object		TSFE object (reference under PHP5)
  * @return 	void
  */
 public function headerNoCache(array &$params, $ref)
 {
     // Requirements are that the crawler is loaded, a crawler session is running and re-indexing requested as processing instruction:
     if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('crawler') && $params['pObj']->applicationData['tx_crawler']['running'] && in_array('tx_indexedsearch_reindex', $params['pObj']->applicationData['tx_crawler']['parameters']['procInstructions'])) {
         // Setting simple log entry:
         $params['pObj']->applicationData['tx_crawler']['log'][] = 'RE_CACHE (indexed), old status: ' . $params['disableAcquireCacheData'];
         // Disables a look-up for cached page data - thus resulting in re-generation of the page even if cached.
         $params['disableAcquireCacheData'] = TRUE;
     }
 }
 /**
  * Provides form code for the superchallenged authentication.
  *
  * @param array $params Parameters to the script
  * @param \TYPO3\CMS\Backend\Controller\LoginController $pObj Calling object
  * @return string The code for the login form
  */
 public function getLoginScripts(array $params, \TYPO3\CMS\Backend\Controller\LoginController &$pObj)
 {
     $content = '';
     if ($pObj->loginSecurityLevel == 'rsa') {
         $javascriptPath = \TYPO3\CMS\Core\Extension\ExtensionManager::siteRelPath('rsaauth') . 'resources/';
         $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js', 'rsaauth_min.js');
         $content = '';
         foreach ($files as $file) {
             $content .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
         }
     }
     return $content;
 }
 /**
  * Renders the icon
  *
  * @param string $icon Icon to be used
  * @param string $title Optional title
  * @return strin Content rendered image
  */
 public function render($icon, $title = '')
 {
     if (!empty($icon)) {
         $absIconPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($icon);
         if (file_exists($absIconPath)) {
             $icon = $GLOBALS['BACK_PATH'] . '../' . str_replace(PATH_site, '', $absIconPath);
         }
     } else {
         $icon = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('reports') . 'Resources/Public/moduleicon.gif';
     }
     $content = '<img' . \t3lib_iconworks::skinImg($GLOBALS['BACK_PATH'], $icon, 'width="16" height="16"') . ' title="' . htmlspecialchars($title) . '" alt="' . htmlspecialchars($title) . '" />';
     return $content;
 }
    /**
     * Main Task center module
     *
     * @return string HTML content.
     * @todo Define visibility
     */
    public function main()
    {
        if ($id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('display')) {
            return $this->urlInIframe($this->backPath . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('impexp') . 'app/index.php?tx_impexp[action]=export&preset[load]=1&preset[select]=' . $id, 1);
        } else {
            // Thumbnail folder and files:
            $tempDir = $this->userTempFolder();
            if ($tempDir) {
                $thumbnails = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($tempDir, 'png,gif,jpg', 1);
            }
            $clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
            $usernames = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
            // Create preset links:
            $presets = $this->getPresets();
            $opt = array();
            $opt[] = '
			<tr class="bgColor5 tableheader">
				<td>Icon:</td>
				<td>Preset Title:</td>
				<td>Public</td>
				<td>Owner:</td>
				<td>Page:</td>
				<td>Path:</td>
				<td>Meta data:</td>
			</tr>';
            if (is_array($presets)) {
                foreach ($presets as $presetCfg) {
                    $configuration = unserialize($presetCfg['preset_data']);
                    $thumbnailFile = $thumbnails[$configuration['meta']['thumbnail']];
                    $title = strlen($presetCfg['title']) ? $presetCfg['title'] : '[' . $presetCfg['uid'] . ']';
                    $opt[] = '
					<tr class="bgColor4">
						<td>' . ($thumbnailFile ? '<img src="' . $this->backPath . '../' . substr($tempDir, strlen(PATH_site)) . basename($thumbnailFile) . '" hspace="2" width="70" style="border: solid black 1px;" alt="" /><br />' : '&nbsp;') . '</td>
						<td nowrap="nowrap"><a href="index.php?SET[function]=tx_impexp&display=' . $presetCfg['uid'] . '">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($title, 30)) . '</a>&nbsp;</td>
						<td>' . ($presetCfg['public'] ? 'Yes' : '&nbsp;') . '</td>
						<td>' . ($presetCfg['user_uid'] === $GLOBALS['BE_USER']->user['uid'] ? 'Own' : '[' . $usernames[$presetCfg['user_uid']]['username'] . ']') . '</td>
						<td>' . ($configuration['pagetree']['id'] ? $configuration['pagetree']['id'] : '&nbsp;') . '</td>
						<td>' . htmlspecialchars($configuration['pagetree']['id'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($configuration['pagetree']['id'], $clause, 20) : '[Single Records]') . '</td>
						<td>
							<strong>' . htmlspecialchars($configuration['meta']['title']) . '</strong><br />' . htmlspecialchars($configuration['meta']['description']) . ($configuration['meta']['notes'] ? '<br /><br /><strong>Notes:</strong> <em>' . htmlspecialchars($configuration['meta']['notes']) . '</em>' : '') . '
						</td>
					</tr>';
                }
                $content = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding">' . implode('', $opt) . '</table>';
            }
        }
        // Output:
        $theOutput .= $this->pObj->doc->spacer(5);
        $theOutput .= $this->pObj->doc->section('Export presets', $content, 0, 1);
        return $theOutput;
    }
 /**
  * Shows warning message about ENABLE_INSTALL_TOOL file and a button to create this file
  *
  * @return void
  */
 protected function showInstallToolEnableRequest()
 {
     // Create instance of object for output of data
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('install') . 'mod/mod_template.html');
     $this->doc->form = '<form method="post" id="t3-install-form-unlock" action="">';
     $this->doc->addStyleSheet('install', 'stylesheets/install/install.css');
     $this->doc->addStyleSheet('mod-install', \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('install') . 'mod/mod_styles.css');
     $markers = $buttons = array();
     $markers['CONTENT'] = $this->renderMessage();
     $content = $this->doc->moduleBody('', $buttons, $markers);
     $this->doc->postCode = '<input type="hidden" name="enableInstallTool" value="1" />' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('installToolEnableToken');
     echo $this->doc->render('', $content);
 }
 /**
  * Render sys_notes by pid
  *
  * @param string $pidList comma separated list of page ids
  * @return string
  */
 public function renderByPid($pidList)
 {
     /** @var $repository \TYPO3\CMS\SysNote\Domain\Repository\SysNoteRepository */
     $repository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\SysNote\\Domain\\Repository\\SysNoteRepository');
     $notes = $repository->findAllByPidList($pidList);
     $out = '';
     if ($this->notesAvailable($notes)) {
         /** @var $fluidView \TYPO3\CMS\Fluid\View\StandaloneView */
         $fluidView = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
         $templatePathAndFilename = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('sys_note', 'Resources/Private/Template/List.html');
         $fluidView->setTemplatePathAndFilename($templatePathAndFilename);
         $fluidView->assign('notes', $notes);
         $out = $fluidView->render();
     }
     return $out;
 }
 /**
  * Resolve workspace title from UID.
  *
  * @param integer $uid UID of the workspace
  * @return string username or UID
  */
 public function render($uid)
 {
     if ($uid === 0) {
         return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('live', $this->controllerContext->getRequest()->getControllerExtensionName());
     }
     if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
         return '';
     }
     /** @var $workspace \TYPO3\CMS\Belog\Domain\Model\Workspace */
     $workspace = $this->workspaceRepository->findByUid($uid);
     if ($workspace !== NULL) {
         $title = $workspace->getTitle();
     } else {
         $title = '';
     }
     return $title;
 }
 /**
  * performs the action of the UpdateManager
  *
  * @param 	array		&$dbQueries: queries done in this update
  * @param 	mixed		&$customMessages: custom messages
  * @return 	bool		whether everything went smoothly or not
  */
 public function performUpdate(array &$dbQueries, &$customMessages)
 {
     if ($this->versionNumber >= 4004000 && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('statictemplates')) {
         // check wether the table can be truncated or if sysext with tca has to be installed
         if ($this->checkForUpdate($customMessages[])) {
             try {
                 \TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('statictemplates');
                 $customMessages[] = 'System Extension "statictemplates" was successfully loaded, static templates are now supported.';
                 $result = TRUE;
             } catch (\RuntimeException $e) {
                 $result = FALSE;
             }
             return $result;
         }
         return TRUE;
     }
 }
Exemple #16
0
 /**
  * performs the action of the UpdateManager
  *
  * @param 	array		&$dbQueries: queries done in this update
  * @param 	mixed		&$customMessages: custom messages
  * @return 	bool		whether everything went smoothly or not
  */
 public function performUpdate(array &$dbQueries, &$customMessages)
 {
     $result = FALSE;
     if ($this->versionNumber >= 4004000 && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('t3skin')) {
         // check wether the table can be truncated or if sysext with tca has to be installed
         if ($this->checkForUpdate($customMessages)) {
             try {
                 \TYPO3\CMS\Core\Extension\ExtensionManager::loadExtension('t3skin');
                 $customMessages = 'The system extension "t3skin" was successfully loaded.';
                 $result = TRUE;
             } catch (\RuntimeException $e) {
                 $result = FALSE;
             }
         }
     }
     return $result;
 }
 /**
  * General processor for AJAX requests.
  * (called by typo3/ajax.php)
  *
  * @param array $params Additional parameters (not used here)
  * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj The TYPO3AJAX object of this request
  * @return void
  * @author Oliver Hader <*****@*****.**>
  */
 public function processAjaxRequest($params, \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj)
 {
     $this->ajaxObj = $ajaxObj;
     // Load the TSref XML information:
     $this->loadFile(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('t3editor') . 'res/tsref/tsref.xml');
     $ajaxIdParts = explode('::', $ajaxObj->getAjaxID(), 2);
     $ajaxMethod = $ajaxIdParts[1];
     $response = array();
     // Process the AJAX requests:
     if ($ajaxMethod == 'getTypes') {
         $ajaxObj->setContent($this->getTypes());
         $ajaxObj->setContentFormat('jsonbody');
     } elseif ($ajaxMethod == 'getDescription') {
         $ajaxObj->addContent('', $this->getDescription(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('typeId'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('parameterName')));
         $ajaxObj->setContentFormat('plain');
     }
 }
    /**
     * Initialization
     *
     * @return 	void
     * @todo Define visibility
     */
    public function init()
    {
        $this->MCONF = $GLOBALS['MCONF'];
        $this->menuConfig();
        $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->form = '<form action="" method="post">';
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('indexed_search') . '/mod/mod_template.html');
        // JavaScript
        $this->doc->JScodeArray['indexed_search'] = '
			script_ended = 0;
			function jumpToUrl(URL) {
				window.location.href = URL;
			}';
        $this->doc->tableLayout = array('defRow' => array('0' => array('<td valign="top" nowrap>', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width=10 height=1></td><td valign="top" nowrap>', '</td>')));
        $indexer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
        $indexer->initializeExternalParsers();
    }
 /**
  * Renders an install link
  *
  * @param string $extension
  * @return string the rendered a tag
  */
 public function render($extension)
 {
     if (!in_array($extension['type'], \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::returnAllowedInstallTypes())) {
         return '';
     }
     $uriBuilder = $this->controllerContext->getUriBuilder();
     $action = 'removeExtension';
     $uriBuilder->reset();
     $uriBuilder->setFormat('json');
     $uri = $uriBuilder->uriFor($action, array('extension' => $extension['key']), 'Action');
     $this->tag->addAttribute('href', $uri);
     $cssClass = 'removeExtension';
     if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded($extension['key'])) {
         $cssClass .= ' isLoadedWarning';
     }
     $this->tag->addAttribute('class', $cssClass);
     $label = 'Remove';
     $this->tag->setContent($label);
     return $this->tag->render();
 }
 /**
  * Rendering the content.
  *
  * @return void
  * @todo Define visibility
  */
 public function main()
 {
     $msg = array();
     // Add a message, telling that no documents were open...
     $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg', 1) . '</p><br />';
     // If another page module was specified, replace the default Page module with the new one
     $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
     $pageModule = \TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
     // Perform some access checks:
     $a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
     $a_wp = \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms') && $GLOBALS['BE_USER']->check('modules', $pageModule);
     // Finding module images: PAGE
     $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_layout_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_layout = is_array($imgInfo) ? '<img src="../' . substr($imgFile, strlen(PATH_site)) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // Finding module images: LIST
     $imgFile = $GLOBALS['LANG']->moduleLabels['tabs_images']['web_list_tab'];
     $imgInfo = @getimagesize($imgFile);
     $img_web_list = is_array($imgInfo) ? '<img src="../' . substr($imgFile, strlen(PATH_site)) . '" ' . $imgInfo[3] . ' alt="" />' : '';
     // If either the Web>List OR Web>Page module are active, show the little message with links to those modules:
     if ($a_wl || $a_wp) {
         $msg_2 = array();
         // Web>Page:
         if ($a_wp) {
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'' . $pageModule . '\'); return false;">' . $GLOBALS['LANG']->getLL('noDocuments_pagemodule', 1) . $img_web_layout . '</a></strong>';
             if ($a_wl) {
                 $msg_2[] = $GLOBALS['LANG']->getLL('noDocuments_OR');
             }
         }
         // Web>List
         if ($a_wl) {
             $msg_2[] = '<strong><a href="#" onclick="top.goToModule(\'web_list\'); return false;">' . $GLOBALS['LANG']->getLL('noDocuments_listmodule', 1) . $img_web_list . '</a></strong>';
         }
         $msg[] = '<p>' . sprintf($GLOBALS['LANG']->getLL('noDocuments_msg2', 1), implode(' ', $msg_2)) . '</p><br />';
     }
     // Display the list of the most recently edited documents:
     $modObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Opendocs\\Controller\\OpendocsController');
     $msg[] = '<p>' . $GLOBALS['LANG']->getLL('noDocuments_msg3', TRUE) . '</p><br />' . $modObj->renderMenu();
     // Adding the content:
     $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('noDocuments'), implode(' ', $msg), 0, 1);
 }
 /**
  * Check whether any conflicting extension has been installed
  *
  * @return 	tx_reports_reports_status_Status
  */
 protected function checkIfNoConflictingExtensionIsInstalled()
 {
     $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:title');
     $conflictingExtensions = array();
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['conflicts'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['conflicts'] as $extensionKey => $version) {
             if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded($extensionKey)) {
                 $conflictingExtensions[] = $extensionKey;
             }
         }
     }
     if (count($conflictingExtensions)) {
         $value = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:keys') . ' ' . implode(', ', $conflictingExtensions);
         $message = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:uninstall');
         $status = \TYPO3\CMS\Reports\Status::ERROR;
     } else {
         $value = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/statusreport/locallang.xml:none');
         $message = '';
         $status = \TYPO3\CMS\Reports\Status::OK;
     }
     return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $title, $value, $message, $status);
 }
<?php

/*
 * @deprecated since 6.0, the classname tx_scheduler_Module and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('scheduler') . 'Classes/Controller/SchedulerModuleController.php';
<?php

/*
 * @deprecated since 6.0, the classname tx_lowlevel_missing_files and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/integrity/Classes/MissingFilesCommand.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('integrity') . 'Classes/MissingFilesCommand.php';
Exemple #24
0
<?php

/*
 * @deprecated since 6.0, the classname tx_form_View_Wizard_Load and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/form/Classes/View/Wizard/LoadWizardView.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('form') . 'Classes/View/Wizard/LoadWizardView.php';
<?php

/*
 * @deprecated since 6.0, the classname t3lib_utility_Dependency_Element and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/version/Classes/Dependency/ElementEntity.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Dependency/ElementEntity.php';
<?php

/*
 * @deprecated since 6.0, the classname tx_rtehtmlarea_textstyle and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/rtehtmlarea/Classes/Extension/TextStyle.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('rtehtmlarea') . 'Classes/Extension/TextStyle.php';
<?php

/*
 * @deprecated since 6.0, the classname tx_scheduler_CachingFrameworkGarbageCollection_AdditionalFieldProvider and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/scheduler/Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('scheduler') . 'Classes/Task/CachingFrameworkGarbageCollectionAdditionalFieldProvider.php';
<?php

/*
 * @deprecated since 6.0, the classname tx_scheduler_CronCmd_Normalize and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('scheduler') . 'Classes/CronCommand/NormalizeCommand.php';
<?php

/*
 * @deprecated since 6.0, the classname tslib_ExtDirectEid and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/frontend/Classes/Controller/ExtDirectEidController.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('frontend') . 'Classes/Controller/ExtDirectEidController.php';
Exemple #30
0
<?php

/*
 * @deprecated since 6.0, the classname tx_form_System_Validate_Inarray and this file is obsolete
 * and will be removed by 7.0. The class was renamed and is now located at:
 * typo3/sysext/form/Classes/Validation/InArrayValidator.php
 */
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('form') . 'Classes/Validation/InArrayValidator.php';