blog->settings->addNamespace('licenseBootstrap'); $s = $core->blog->settings->licenseBootstrap; # Modules if (!isset($core->themes)) { $core->themes = new dcThemes($core); $core->themes->loadModules($core->blog->themes_path,null); } $themes = $core->themes; $plugins = $core->plugins; # Rights $is_editable = !empty($type) && !empty($_POST['modules']) && is_array($_POST['modules']); # Actions try { # Add license to modules if ($action == 'addlicense' && $is_editable) { $modules = array_keys($_POST['modules']); foreach ($modules as $id) { if (!${$type}->moduleExists($id)) { throw new Exception('No such module'); } $module = ${$type}->getModules($id); $module['id'] = $id; $module['type'] = $type == 'themes' ? 'theme' : 'plugin'; licenseBootstrap::addLicense($core, $module); } dcPage::addSuccessNotice( __('License successfully added.') ); http::redirect(empty($_POST['redir']) ? $p_url : $_POST['redir'] ); } } catch(Exception $e) { $core->error->add($e->getMessage()); } # Display echo '
'.__('Configuration').' - licenseBootstrap - '.$core->plugins->moduleInfo('licenseBootstrap', 'version').'
';