<?php /// Copyright (c) 2004-2016, 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'; importlib('model.common.plugin'); requireStrictRoute(); if (empty($_POST['name'])) { Respond::ResultPage(1); } $pluginInfo = getPluginInformation(trim($_POST['name'])); $pluginScope = $pluginInfo['scope']; if (in_array('editor', $pluginScope) && $editorCount == 1) { Respond::ResultPage(2); } if (in_array('formatter', $pluginScope) && $formatterCount == 1) { Respond::ResultPage(2); } if (deactivatePlugin($_POST['name'])) { Respond::ResultPage(0); } Respond::ResultPage(1);
$search = null; } // get and set align type, scope type and status type. $selectedSort = Setting::getBlogSettingGlobal('pluginListSortType', 'ascend'); $selectedScopes = explode('|', Setting::getBlogSettingGlobal("pluginListScopeType_{$_POST['visibility']}", $memberScopes)); $selectedStatus = explode('|', Setting::getBlogSettingGlobal("pluginListStatusType_{$_POST['visibility']}", 'activated|deactivated')); // get the list type. $listType = Setting::getBlogSettingGlobal('pluginViewType', 'iconview'); // get all plugin list. $plugins = array(); $pluginAttrs = array(); $dir = dir(ROOT . '/plugins/'); while (false !== ($plugin = $dir->read())) { // 이게 php.net에서 권장하는 올바른 디렉토리 읽는 법. $plugin = trim($plugin); $pluginInfo = getPluginInformation($plugin); if (empty($pluginInfo)) { continue; } if ($pluginInfo['privilege'] == 'administrator' && !Acl::check('group.creators')) { continue; } if (!empty($search) && stristr($pluginInfo['title'], $search) === false && stristr($pluginInfo['description'], $search) === false && stristr($pluginInfo['author'], $search) === false) { continue; } // Search. $acceptedPathCount = 0; $tempXMLPathCount = 0; if (empty($pluginInfo['scope'])) { continue; }