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


PHP t3lib_extMgm::isLocalconfWritable方法代码示例

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


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

示例1: showExtDetails

    /**
     * Display extensions details.
     *
     * @param	string		Extension key
     * @return	void		Writes content to $this->content
     */
    function showExtDetails($extKey)
    {
        global $TYPO3_LOADED_EXT;
        list($list, ) = $this->extensionList->getInstalledExtensions();
        $absPath = tx_em_Tools::getExtPath($extKey, $list[$extKey]['type']);
        // Check updateModule:
        if (isset($list[$extKey]) && @is_file($absPath . 'class.ext_update.php')) {
            require_once $absPath . 'class.ext_update.php';
            $updateObj = new ext_update();
            if (!$updateObj->access()) {
                unset($this->MOD_MENU['singleDetails']['updateModule']);
            }
        } else {
            unset($this->MOD_MENU['singleDetails']['updateModule']);
        }
        if ($this->CMD['doDelete']) {
            $this->MOD_MENU['singleDetails'] = array();
        }
        // Function menu here:
        if (!$this->CMD['standAlone'] && !t3lib_div::_GP('standAlone')) {
            $content = $GLOBALS['LANG']->getLL('ext_details_ext') . '&nbsp;<strong>' . $this->extensionTitleIconHeader($extKey, $list[$extKey]) . '</strong> (' . htmlspecialchars($extKey) . ')';
            $this->content .= $this->doc->section('', $content);
        }
        // Show extension details:
        if ($list[$extKey]) {
            // Checking if a command for install/uninstall is executed:
            if (($this->CMD['remove'] || $this->CMD['load']) && !in_array($extKey, $this->requiredExt)) {
                // Install / Uninstall extension here:
                if (t3lib_extMgm::isLocalconfWritable()) {
                    // Check dependencies:
                    $depStatus = $this->install->checkDependencies($extKey, $list[$extKey]['EM_CONF'], $list);
                    if (!$this->CMD['remove'] && !$depStatus['returnCode']) {
                        $this->content .= $depStatus['html'];
                        $newExtList = -1;
                    } elseif ($this->CMD['remove']) {
                        $newExtList = $this->extensionList->removeExtFromList($extKey, $list);
                    } else {
                        $newExtList = $this->extensionList->addExtToList($extKey, $list);
                    }
                    // Successful installation:
                    if ($newExtList != -1) {
                        $updates = '';
                        if ($this->CMD['load']) {
                            if ($_SERVER['REQUEST_METHOD'] == 'POST') {
                                $script = t3lib_div::linkThisScript(array('CMD[showExt]' => $extKey, 'CMD[load]' => 1, 'CMD[clrCmd]' => $this->CMD['clrCmd'], 'SET[singleDetails]' => 'info'));
                            } else {
                                $script = '';
                            }
                            $standaloneUpdates = '';
                            if ($this->CMD['standAlone']) {
                                $standaloneUpdates .= '<input type="hidden" name="standAlone" value="1" />';
                            }
                            if ($this->CMD['silendMode']) {
                                $standaloneUpdates .= '<input type="hidden" name="silendMode" value="1" />';
                            }
                            $depsolver = t3lib_div::_POST('depsolver');
                            if (is_array($depsolver['ignore'])) {
                                foreach ($depsolver['ignore'] as $depK => $depV) {
                                    $dependencyUpdates .= '<input type="hidden" name="depsolver[ignore][' . $depK . ']" value="1" />';
                                }
                            }
                            $updatesForm = $this->install->updatesForm($extKey, $list[$extKey], 1, $script, $dependencyUpdates . $standaloneUpdates . '<input type="hidden" name="_do_install" value="1" /><input type="hidden" name="_clrCmd" value="' . $this->CMD['clrCmd'] . '" />', TRUE);
                            if ($updatesForm) {
                                $updates = $GLOBALS['LANG']->getLL('ext_details_new_tables_fields') . '<br />' . $GLOBALS['LANG']->getLL('ext_details_new_tables_fields_select') . $updatesForm;
                                $labelDBUpdate = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $GLOBALS['LANG']->getLL('ext_details_db_needs_update'), 'toUpper');
                                $this->content .= $this->doc->section(sprintf($GLOBALS['LANG']->getLL('ext_details_installing') . ' ', $this->extensionTitleIconHeader($extKey, $list[$extKey])) . ' ' . $labelDBUpdate, $updates, 1, 1, 1, 1);
                            }
                        } elseif ($this->CMD['remove']) {
                            $updates .= $this->install->checkClearCache($list[$extKey]);
                            if ($updates) {
                                $updates = '
								<form action="' . $this->script . '" method="post">' . $updates . '
								<br /><input type="submit" name="write" value="' . $GLOBALS['LANG']->getLL('ext_details_remove_ext') . '" />
								<input type="hidden" name="_do_install" value="1" />
								<input type="hidden" name="_clrCmd" value="' . $this->CMD['clrCmd'] . '" />
								<input type="hidden" name="CMD[showExt]" value="' . $this->CMD['showExt'] . '" />
								<input type="hidden" name="CMD[remove]" value="' . $this->CMD['remove'] . '" />
								<input type="hidden" name="standAlone" value="' . $this->CMD['standAlone'] . '" />
								<input type="hidden" name="silentMode" value="' . $this->CMD['silentMode'] . '" />
								' . ($this->noDocHeader ? '<input type="hidden" name="nodoc" value="1" />' : '') . '
								</form>';
                                $labelDBUpdate = $GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $GLOBALS['LANG']->getLL('ext_details_db_needs_update'), 'toUpper');
                                $this->content .= $this->doc->section(sprintf($GLOBALS['LANG']->getLL('ext_details_removing') . ' ', $this->extensionTitleIconHeader($extKey, $list[$extKey])) . ' ' . $labelDBUpdate, $updates, 1, 1, 1, 1);
                            }
                        }
                        if (!$updates || t3lib_div::_GP('_do_install') || $this->noDocHeader && $this->CMD['remove']) {
                            $this->install->writeNewExtensionList($newExtList);
                            $action = $this->CMD['load'] ? 'installed' : 'removed';
                            $GLOBALS['BE_USER']->writelog(5, 1, 0, 0, 'Extension list has been changed, extension %s has been %s', array($extKey, $action));
                            if (!t3lib_div::_GP('silentMode') && !$this->CMD['standAlone']) {
                                $messageLabel = 'ext_details_ext_' . $action . '_with_key';
                                $flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', sprintf($GLOBALS['LANG']->getLL($messageLabel), $extKey), '', t3lib_FlashMessage::OK, TRUE);
                                t3lib_FlashMessageQueue::addMessage($flashMessage);
                            }
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php


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