function finish($error = null) { global $migrational, $blogid, $database; ?> <script type="text/javascript"> //<![CDATA[ <?php if ($error) { ?> //pi.style.backgroundColor = "red"; alert("<?php echo $error; ?> "); <?php } else { ?> alert("<?php echo $migrational ? _t('성공적으로 이주되었습니다.') : _t('성공적으로 복원되었습니다.'); ?> "); <?php } ?> window.parent.document.getElementById("progressDialog").style.display = "none"; window.parent.document.getElementById("progressDialogTitle").innerHTML = ""; window.parent.document.getElementById("progressText").innerHTML = ""; window.parent.document.getElementById("progressTextSub").innerHTML = ""; //]]> </script> <?php $activeEditors = POD::queryColumn("SELECT DISTINCT contenteditor FROM {$database}Entries WHERE blogid = {$blogid}"); $activeFormatters = POD::queryColumn("SELECT DISTINCT contentformatter FROM {$database}Entries WHERE blogid = {$blogid}"); if (!empty($activeEditors)) { foreach ($activeEditors as $editor) { activatePlugin($editor); } } if (!empty($activeFormatters)) { foreach ($activeFormatters as $formatter) { activatePlugin($formatter); } } echo _t('완료.'); ?> </body> </html> <?php exit; }
<?php /// Copyright (c) 2004-2012, Needlworks / Tatter Network Foundation /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) $IV = array('POST' => array('name' => array('directory', 'default' => null))); require ROOT . '/library/preprocessor.php'; requireStrictRoute(); if (!empty($_POST['name']) && activatePlugin($_POST['name'])) { Respond::ResultPage(0); } Respond::ResultPage(1);
if (empty($openid)) { Setting::setUserSetting("openid." . $i, $currentOpenID, true); break; } } } echo "<html><head><script type=\"text/javascript\">//<![CDATA[" . CRLF . "alert('" . _t('연결하였습니다.') . " : " . $currentOpenID . "'); document.location.href='" . $context->getProperty('uri.blog') . "/owner/setting/account'; //]]></script></head></html>"; } function deleteOpenID($openidForDel) { $context = Model_Context::getInstance(); for ($i = 0; $i < OPENID_REGISTERS; $i++) { $openid = Setting::getUserSetting("openid." . $i, null, true); if ($openid == $openidForDel) { Setting::removeUserSetting("openid." . $i, true); break; } } echo "<html><head><script type=\"text/javascript\">//<![CDATA[" . CRLF . "alert('" . _t('삭제되었습니다.') . "'); document.location.href='" . $context->getProperty('uri.blog') . "/owner/setting/account'; //]]></script></head></html>"; } switch ($_GET['mode']) { case 'del': deleteOpenID($_GET['openid_identifier']); break; case 'add': default: importlib('model.common.plugin'); activatePlugin('CL_OpenID'); addOpenID(); break; }
unset($currentTextcubeVersion, $disablePlugin, $plugin, $query, $requiredTattertoolsVersion, $requiredTextcubeVersion); } } foreach ($storageList as $s) { $p[$s] = ${$s}; } $pageCache->contents = serialize($p); $pageCache->update(); } if (!array_key_exists('ttml', $formatterMappings)) { // Any formatter is used, add the ttml formatter. activatePlugin('FM_TTML'); } if (count($editorMappings) == 1) { // Any editor is used, add the textcube editor. activatePlugin('ED_tinyMCE'); } // sort mapping by its name, with exception for default formatter and editor if (doesHaveOwnership()) { $_fMapping = $formatterMappings; $_eMapping = $editorMappings; function _cmpfuncByFormatterName($x, $y) { global $_fMapping; if ($x == 'html') { return -1; } if ($y == 'html') { return +1; } return strcmp($_fMapping[$x]['name'], $_fMapping[$y]['name']);
* it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Tuleap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Tuleap. If not, see <http://www.gnu.org/licenses/ */ require_once 'pre.php'; activatePlugin($argv[1]); function activatePlugin($name) { $plugin_factory = PluginFactory::instance(); $plugin = $plugin_factory->getPluginByName($name); if (! $plugin) { echo "Install plugin\n"; $plugin_manager = new PluginManager(); $plugin = $plugin_manager->installPlugin($name); } if (! $plugin_factory->isPluginAvailable($plugin)) { echo "Activate plugin\n"; $plugin_factory->availablePlugin($plugin); } }
function admin_dispatchAction($action) { if ($action == 'general') { showInterface('admin/general.php'); } elseif ($action == 'adminSave') { admin_saveSettings('admin/general.php'); } elseif ($action == 'vendor') { showInterface('admin/vendor.php'); } elseif ($action == 'vendorSave') { admin_saveSettings('admin/vendor.php'); } elseif ($action == 'phpinfo') { disableInDemoMode('', 'admin/general.php'); phpinfo(); print "<h2>get_loaded_extensions()</h2>\n" . implode("<br/>\n", get_loaded_extensions()) . "\n"; if (function_exists('apache_get_modules')) { print "<h2>apache_get_modules()</h2>\n" . implode("<br/>\n", apache_get_modules()) . "\n"; } print "<h2>get_defined_constants()</h2>\n<xmp>" . print_r(get_defined_constants(), true) . "</xmp>\n"; // $mbInfo = mb_get_info(); ksort($mbInfo); print "<h2>mb_get_info()</h2>\n<xmp>" . print_r($mbInfo, true) . "</xmp>\n"; exit; } elseif ($action == 'ulimit') { disableInDemoMode('', 'admin/general.php'); print "<h2>Soft Resource Limits (ulimit -a -S)</h2>\n"; list($maxCpuSeconds, $memoryLimitKbytes, $maxProcessLimit, $ulimitOutput) = getUlimitValues('soft'); showme($ulimitOutput); print "<h2>Hard Resource Limits (ulimit -a -H)</h2>\n"; list($maxCpuSeconds, $memoryLimitKbytes, $maxProcessLimit, $ulimitOutput) = getUlimitValues('soft'); showme($ulimitOutput); exit; } elseif ($action == 'updateDate') { getAjaxDate(); } elseif ($action == 'getUploadPathPreview') { getUploadPathPreview(@$_REQUEST['dirOrUrl'], @$_REQUEST['inputValue'], @$_REQUEST['isCustomField'], true); } elseif ($action == 'plugins') { // allow disabling plugins if (file_exists("{$GLOBALS['PROGRAM_DIR']}/plugins/_disable_all_plugins.txt")) { alert('Development Mode: Plugins are disabled. Remove or rename /plugins/_disable_all_plugins.txt to enable.<br/>'); } else { } showInterface('admin/plugins.php'); } elseif ($action == 'pluginHooks') { showInterface('admin/pluginHooks.php'); } elseif ($action == 'deactivatePlugin') { security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); disableInDemoMode('plugins', 'admin/plugins.php'); deactivatePlugin(@$_REQUEST['file']); redirectBrowserToURL('?menu=admin&action=plugins', true); exit; } elseif ($action == 'activatePlugin') { security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); disableInDemoMode('plugins', 'admin/plugins.php'); activatePlugin(@$_REQUEST['file']); redirectBrowserToURL('?menu=admin&action=plugins', true); exit; } elseif ($action == 'backup') { security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); disableInDemoMode('', 'admin/general.php'); $filename = backupDatabase(null, @$_REQUEST['backupTable']); notice(sprintf(t('Created backup file %1$s (%2$s seconds)'), $filename, showExecuteSeconds(true))); showInterface('admin/general.php'); exit; } elseif ($action == 'restore') { security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); disableInDemoMode('', 'admin/general.php'); $filename = @$_REQUEST['file']; restoreDatabase(DATA_DIR . '/backups/' . $filename); notice("Restored backup file /data/backups/{$filename}"); makeAllUploadRecordsRelative(); showInterface('admin/general.php'); exit; } elseif ($action == 'bgtasksLogsClear') { security_dieUnlessPostForm(); security_dieUnlessInternalReferer(); security_dieOnInvalidCsrfToken(); disableInDemoMode('', 'admin/general.php'); mysql_delete('_cron_log', null, 'true'); notice(t("Background Task logs have been cleared.")); showInterface('admin/general.php'); exit; } else { showInterface('admin/general.php'); } }