示例#1
0
        $iaOutput->errorList = $errorList;
        $iaOutput->template = $template;
        $iaOutput->templates = $templates;
        break;
    case 'download':
        if (class_exists('iaCore')) {
            iaCore::instance()->iaView->set('nodebug', true);
        }
        header('Content-Type: text/x-delimtext; name="config.inc.php"');
        header('Content-disposition: attachment; filename="config.inc.php"');
        echo get_magic_quotes_gpc() ? stripslashes($_POST['config_content']) : $_POST['config_content'];
        exit;
    case 'plugins':
        if (iaHelper::isAjaxRequest()) {
            if (isset($_POST['plugin']) && $_POST['plugin']) {
                echo iaHelper::installRemotePlugin($_POST['plugin']) ? 'installed successfully' : 'installation is not performed';
                exit;
            }
        } else {
            if ($plugins = iaHelper::getRemotePluginsList(IA_VERSION)) {
                $iaOutput->plugins = $plugins;
            } else {
                $message = 'Could not get the list of plugins.';
            }
        }
        break;
    default:
        return;
}
$iaOutput->error = $error;
$iaOutput->message = $message;
示例#2
0
 protected function _processExtras(array $entries)
 {
     foreach ($entries as $entry) {
         $friendlyName = ucfirst($entry['name']);
         if ($entry['type'] == self::EXTRA_TYPE_PLUGIN) {
             iaHelper::installRemotePlugin($entry['name']) ? $this->_logInfo('Installation of :name is successfully completed.', self::LOG_SUCCESS, array('name' => $friendlyName)) : $this->_logInfo('Unable to install :name due to errors.', self::LOG_ERROR, array('name' => $friendlyName));
         } else {
             $this->_logInfo('Installation of ":name" requested. Ignored since installation of this type is not currently implemented.', self::LOG_ALERT, array('name' => $friendlyName));
         }
     }
 }