当前位置: 首页>>代码示例>>PHP>>正文


PHP ExtensionManager::isLoaded方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManager::isLoaded方法的具体用法?PHP ExtensionManager::isLoaded怎么用?PHP ExtensionManager::isLoaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Extension\ExtensionManager的用法示例。


在下文中一共展示了ExtensionManager::isLoaded方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getSystemLanguages

 /**
  * 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;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:40,代码来源:TranslationConfigurationProvider.php

示例2: init

 /**
  * 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'));
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:36,代码来源:BrowseTreeView.php

示例3: init

 /**
  * 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';
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:18,代码来源:PageTreeView.php

示例4: headerNoCache

 /**
  * 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;
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:17,代码来源:TypoScriptFrontendHook.php

示例5: render

 /**
  * 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;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:23,代码来源:WorkspaceTitleViewHelper.php

示例6: performUpdate

 /**
  * 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;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:T3skinUpdate.php

示例7: performUpdate

 /**
  * 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;
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:StaticTemplatesUpdate.php

示例8: render

 /**
  * 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();
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:26,代码来源:RemoveExtensionViewHelper.php

示例9: main

 /**
  * 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);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:47,代码来源:NoDocumentsOpenController.php

示例10: checkIfNoConflictingExtensionIsInstalled

 /**
  * 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);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:27,代码来源:StatusReportConflictsCheckHook.php

示例11: generateUpdateDatabaseForm

 /**
  * Generate the contents for the form for 'Database Analyzer'
  * when the 'COMPARE' still contains errors
  *
  * @param string $type get_form if the form needs to be generated
  * @param array $arr_update The tables/fields which needs an update
  * @param array $arr_remove The tables/fields which needs to be removed
  * @param string $action_type The action type
  * @return string HTML for the form
  * @todo Define visibility
  */
 public function generateUpdateDatabaseForm($type, $arr_update, $arr_remove, $action_type)
 {
     $content = '';
     switch ($type) {
         case 'get_form':
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_update['clear_table'], 'Clear tables (use with care!)', FALSE, TRUE);
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_update['add'], 'Add fields');
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_update['change'], 'Changing fields', \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal') ? 0 : 1, 0, $arr_update['change_currentValue']);
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_remove['change'], 'Remove unused fields (rename with prefix)', $this->setAllCheckBoxesByDefault, 1);
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_remove['drop'], 'Drop fields (really!)', $this->setAllCheckBoxesByDefault);
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_update['create_table'], 'Add tables');
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_remove['change_table'], 'Removing tables (rename with prefix)', $this->setAllCheckBoxesByDefault, 1, $arr_remove['tables_count'], 1);
             $content .= $this->generateUpdateDatabaseForm_checkboxes($arr_remove['drop_table'], 'Drop tables (really!)', $this->setAllCheckBoxesByDefault, 0, $arr_remove['tables_count'], 1);
             $content = $this->getUpdateDbFormWrap($action_type, $content);
             break;
         default:
             break;
     }
     return $content;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:31,代码来源:Installer.php

示例12: getUserInput

    /**
     * This method requests input from the user about the upgrade process, if needed
     *
     * @param string $inputPrefix
     * @return void
     */
    public function getUserInput($inputPrefix)
    {
        $content = '';
        if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('version') && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
            // We need feedback only if versioning is not activated at all
            // In such a case we want to leave the user with the choice of not activating the stuff at all
            $content = '
				<fieldset>
					<ol>
			';
            $content .= '
				<li class="labelAfter">
					<input type="checkbox" id="versioning" name="' . $inputPrefix . '[versioning]" value="1" checked="checked" />
					<label for="versioning">Activate workspaces?</label>
				</li>
			';
            $content .= '
					</ol>
				</fieldset>
			';
        } else {
            // No feedback needed, just include the update flag as a hidden field
            $content = '<input type="hidden" id="versioning" name="' . $inputPrefix . '[versioning]" value="1" />';
        }
        return $content;
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:32,代码来源:MigrateWorkspacesUpdate.php

示例13: checkMod

 /**
  * Here we check for the module.
  * Return values:
  * 'notFound':	If the module was not found in the path (no "conf.php" file)
  * FALSE:		If no access to the module (access check failed)
  * array():	Configuration array, in case a valid module where access IS granted exists.
  *
  * @param string $name Module name
  * @param string $fullpath Absolute path to module
  * @return mixed See description of function
  * @todo Define visibility
  */
 public function checkMod($name, $fullpath)
 {
     if ($name == 'user_ws' && !\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('version')) {
         return FALSE;
     }
     // Check for own way of configuring module
     if (is_array($GLOBALS['TBE_MODULES']['_configuration'][$name]['configureModuleFunction'])) {
         $obj = $GLOBALS['TBE_MODULES']['_configuration'][$name]['configureModuleFunction'];
         if (is_callable($obj)) {
             $MCONF = call_user_func($obj, $name, $fullpath);
             if ($this->checkModAccess($name, $MCONF) !== TRUE) {
                 return FALSE;
             }
             return $MCONF;
         }
     }
     // Check if this is a submodule
     if (strpos($name, '_') !== FALSE) {
         list($mainModule, ) = explode('_', $name, 2);
     }
     $modconf = array();
     // Because 'path/../path' does not work
     $path = preg_replace('/\\/[^\\/.]+\\/\\.\\.\\//', '/', $fullpath);
     if (@is_dir($path) && file_exists($path . '/conf.php')) {
         $MCONF = array();
         $MLANG = array();
         // The conf-file is included. This must be valid PHP.
         include $path . '/conf.php';
         if (!$MCONF['shy'] && $this->checkModAccess($name, $MCONF) && $this->checkModWorkspace($name, $MCONF)) {
             $modconf['name'] = $name;
             // Language processing. This will add module labels and image reference to the internal ->moduleLabels array of the LANG object.
             if (is_object($GLOBALS['LANG'])) {
                 // $MLANG['default']['tabs_images']['tab'] is for modules the reference to the module icon.
                 // Here the path is transformed to an absolute reference.
                 if ($MLANG['default']['tabs_images']['tab']) {
                     // Initializing search for alternative icon:
                     // Alternative icon key (might have an alternative set in $TBE_STYLES['skinImg']
                     $altIconKey = 'MOD:' . $name . '/' . $MLANG['default']['tabs_images']['tab'];
                     $altIconAbsPath = is_array($GLOBALS['TBE_STYLES']['skinImg'][$altIconKey]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['skinImg'][$altIconKey][0]) : '';
                     // Setting icon, either default or alternative:
                     if ($altIconAbsPath && @is_file($altIconAbsPath)) {
                         $MLANG['default']['tabs_images']['tab'] = $this->getRelativePath(PATH_typo3, $altIconAbsPath);
                     } else {
                         // Setting default icon:
                         $MLANG['default']['tabs_images']['tab'] = $this->getRelativePath(PATH_typo3, $fullpath . '/' . $MLANG['default']['tabs_images']['tab']);
                     }
                     // Finally, setting the icon with correct path:
                     if (substr($MLANG['default']['tabs_images']['tab'], 0, 3) == '../') {
                         $MLANG['default']['tabs_images']['tab'] = PATH_site . substr($MLANG['default']['tabs_images']['tab'], 3);
                     } else {
                         $MLANG['default']['tabs_images']['tab'] = PATH_typo3 . $MLANG['default']['tabs_images']['tab'];
                     }
                 }
                 // If LOCAL_LANG references are used for labels of the module:
                 if ($MLANG['default']['ll_ref']) {
                     // Now the 'default' key is loaded with the CURRENT language - not the english translation...
                     $MLANG['default']['labels']['tablabel'] = $GLOBALS['LANG']->sL($MLANG['default']['ll_ref'] . ':mlang_labels_tablabel');
                     $MLANG['default']['labels']['tabdescr'] = $GLOBALS['LANG']->sL($MLANG['default']['ll_ref'] . ':mlang_labels_tabdescr');
                     $MLANG['default']['tabs']['tab'] = $GLOBALS['LANG']->sL($MLANG['default']['ll_ref'] . ':mlang_tabs_tab');
                     $GLOBALS['LANG']->addModuleLabels($MLANG['default'], $name . '_');
                 } else {
                     // ... otherwise use the old way:
                     $GLOBALS['LANG']->addModuleLabels($MLANG['default'], $name . '_');
                     $GLOBALS['LANG']->addModuleLabels($MLANG[$GLOBALS['LANG']->lang], $name . '_');
                 }
             }
             // Default script setup
             if ($MCONF['script'] === '_DISPATCH') {
                 if ($MCONF['extbase']) {
                     $modconf['script'] = 'mod.php?M=Tx_' . rawurlencode($name);
                 } else {
                     $modconf['script'] = 'mod.php?M=' . rawurlencode($name);
                 }
             } elseif ($MCONF['script'] && file_exists($path . '/' . $MCONF['script'])) {
                 $modconf['script'] = $this->getRelativePath(PATH_typo3, $fullpath . '/' . $MCONF['script']);
             } else {
                 $modconf['script'] = 'dummy.php';
             }
             // Default tab setting
             if ($MCONF['defaultMod']) {
                 $modconf['defaultMod'] = $MCONF['defaultMod'];
             }
             // Navigation Frame Script (GET params could be added)
             if ($MCONF['navFrameScript']) {
                 $navFrameScript = explode('?', $MCONF['navFrameScript']);
                 $navFrameScript = $navFrameScript[0];
                 if (file_exists($path . '/' . $navFrameScript)) {
                     $modconf['navFrameScript'] = $this->getRelativePath(PATH_typo3, $fullpath . '/' . $MCONF['navFrameScript']);
//.........这里部分代码省略.........
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:101,代码来源:ModuleLoader.php

示例14: getSaltedPasswordsStatus

 /**
  * Checks whether the Install Tool password is set to its default value.
  *
  * @return \TYPO3\CMS\Reports\Status An tx_reports_reports_status_Status object representing the security of the saltedpassswords extension
  */
 protected function getSaltedPasswordsStatus()
 {
     $value = $GLOBALS['LANG']->getLL('status_ok');
     $message = '';
     $severity = \TYPO3\CMS\Reports\Status::OK;
     if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('saltedpasswords')) {
         $value = $GLOBALS['LANG']->getLL('status_insecure');
         $severity = \TYPO3\CMS\Reports\Status::ERROR;
         $message .= $GLOBALS['LANG']->getLL('status_saltedPasswords_notInstalled');
     } else {
         /** @var \TYPO3\CMS\Saltedpasswords\Utility\ExtensionManagerConfigurationUtility $configCheck */
         $configCheck = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Saltedpasswords\\Utility\\ExtensionManagerConfigurationUtility');
         $message = '<p>' . $GLOBALS['LANG']->getLL('status_saltedPasswords_infoText') . '</p>';
         $messageDetail = '';
         $flashMessage = $configCheck->checkConfigurationBackend(array(), new \TYPO3\CMS\Core\TypoScript\ConfigurationForm());
         if (strpos($flashMessage, 'message-error') !== FALSE) {
             $value = $GLOBALS['LANG']->getLL('status_insecure');
             $severity = \TYPO3\CMS\Reports\Status::ERROR;
             $messageDetail .= $flashMessage;
         }
         if (strpos($flashMessage, 'message-warning') !== FALSE) {
             $severity = \TYPO3\CMS\Reports\Status::WARNING;
             $messageDetail .= $flashMessage;
         }
         if (strpos($flashMessage, 'message-information') !== FALSE) {
             $messageDetail .= $flashMessage;
         }
         $unsecureUserCount = \TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::getNumberOfBackendUsersWithInsecurePassword();
         if ($unsecureUserCount > 0) {
             $value = $GLOBALS['LANG']->getLL('status_insecure');
             $severity = \TYPO3\CMS\Reports\Status::ERROR;
             $messageDetail .= '<div class="typo3-message message-warning">' . $GLOBALS['LANG']->getLL('status_saltedPasswords_notAllPasswordsHashed') . '</div>';
         }
         $message .= $messageDetail;
         if (empty($messageDetail)) {
             $message = '';
         }
     }
     return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $GLOBALS['LANG']->getLL('status_saltedPasswords'), $value, $message, $severity);
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:45,代码来源:SecurityStatus.php

示例15: selectNonEmptyRecordsWithFkeys

 /**
  * This selects non-empty-records from the tables/fields in the fkey_array generated by getGroupFields()
  *
  * @param array $fkey_arrays Array with tables/fields generated by getGroupFields()
  * @return void
  * @see getGroupFields()
  * @todo Define visibility
  */
 public function selectNonEmptyRecordsWithFkeys($fkey_arrays)
 {
     if (is_array($fkey_arrays)) {
         foreach ($fkey_arrays as $table => $field_list) {
             if ($GLOBALS['TCA'][$table] && trim($field_list)) {
                 \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                 $fieldArr = explode(',', $field_list);
                 if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('dbal')) {
                     $fields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);
                     $field = array_shift($fieldArr);
                     $cl_fl = $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'I' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'N' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'R' ? $field . '<>0' : $field . '<>\'\'';
                     foreach ($fieldArr as $field) {
                         $cl_fl .= $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'I' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'N' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'], $table) == 'R' ? ' OR ' . $field . '<>0' : ' OR ' . $field . '<>\'\'';
                     }
                     unset($fields);
                 } else {
                     $cl_fl = implode('<>\'\' OR ', $fieldArr) . '<>\'\'';
                 }
                 $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $field_list, $table, $cl_fl);
                 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
                     foreach ($fieldArr as $field) {
                         if (trim($row[$field])) {
                             $fieldConf = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                             if ($fieldConf['type'] == 'group') {
                                 if ($fieldConf['internal_type'] == 'file') {
                                     // Files...
                                     if ($fieldConf['MM']) {
                                         $tempArr = array();
                                         /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                                         $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                         $dbAnalysis->start('', 'files', $fieldConf['MM'], $row['uid']);
                                         foreach ($dbAnalysis->itemArray as $somekey => $someval) {
                                             if ($someval['id']) {
                                                 $tempArr[] = $someval['id'];
                                             }
                                         }
                                     } else {
                                         $tempArr = explode(',', trim($row[$field]));
                                     }
                                     foreach ($tempArr as $file) {
                                         $file = trim($file);
                                         if ($file) {
                                             $this->checkFileRefs[$fieldConf['uploadfolder']][$file] += 1;
                                         }
                                     }
                                 }
                                 if ($fieldConf['internal_type'] == 'db') {
                                     /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                                     $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                     $dbAnalysis->start($row[$field], $fieldConf['allowed'], $fieldConf['MM'], $row['uid'], $table, $fieldConf);
                                     foreach ($dbAnalysis->itemArray as $tempArr) {
                                         $this->checkGroupDBRefs[$tempArr['table']][$tempArr['id']] += 1;
                                     }
                                 }
                             }
                             if ($fieldConf['type'] == 'select' && $fieldConf['foreign_table']) {
                                 /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                                 $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                 $dbAnalysis->start($row[$field], $fieldConf['foreign_table'], $fieldConf['MM'], $row['uid'], $table, $fieldConf);
                                 foreach ($dbAnalysis->itemArray as $tempArr) {
                                     if ($tempArr['id'] > 0) {
                                         $this->checkGroupDBRefs[$fieldConf['foreign_table']][$tempArr['id']] += 1;
                                     }
                                 }
                             }
                         }
                     }
                 }
                 $GLOBALS['TYPO3_DB']->sql_free_result($mres);
             }
         }
     }
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:81,代码来源:DatabaseIntegrityCheck.php


注:本文中的TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。