public function index(CSRFSynchronizerToken $csrf, Response $response)
 {
     $title = $GLOBALS['Language']->getText('plugin_tracker_config', 'title');
     $params = array('title' => $title);
     $renderer = TemplateRendererFactory::build()->getRenderer(TRACKER_TEMPLATE_DIR);
     $response->header($params);
     $renderer->renderToPage(self::$TEMPLATE, new TrackerPluginConfigPresenter($csrf, $title, $this->localincfinder->getLocalIncPath(), $this->config));
     $response->footer($params);
 }
Example #2
0
 public function index()
 {
     $title = $GLOBALS['Language']->getText('admin_main', 'configure_access_controls');
     $params = array('title' => $title);
     $renderer = TemplateRendererFactory::build()->getRenderer($this->getTemplateDir());
     $this->response->includeFooterJavascriptFile('/scripts/tuleap/admin-access-mode.js');
     $this->response->header($params);
     $renderer->renderToPage(self::TEMPLATE, new ForgeAccess_AdminPresenter($this->csrf, $title, $this->localincfinder->getLocalIncPath(), ForgeConfig::get(ForgeAccess::CONFIG), count($this->user_dao->searchByStatus(PFUser::STATUS_RESTRICTED)), ForgeConfig::get(User_ForgeUGroup::CONFIG_AUTHENTICATED_LABEL), ForgeConfig::get(User_ForgeUGroup::CONFIG_REGISTERED_LABEL), ForgeConfig::get(ForgeAccess::PROJECT_ADMIN_CAN_CHOOSE_VISIBILITY), ForgeConfig::get(ForgeAccess::REVERSE_PROXY_REGEXP)));
     $this->response->footer($params);
 }
Example #3
0
//
//
//various server utilities.
require_once 'server.php';
if (version_compare(phpversion(), '5.1.6', '<')) {
    die('Tuleap must be run on a PHP 5.1.6 (or greater) engine');
}
require_once 'common/autoload_libs.php';
require_once 'common/autoload.php';
if (server_is_php_version_equal_or_greater_than_53() == true) {
    if (!ini_get('date.timezone')) {
        date_default_timezone_set('Europe/Paris');
    }
}
// Defines all of the settings first (hosts, databases, etc.)
$locar_inc_finder = new Config_LocalIncFinder();
$local_inc = $locar_inc_finder->getLocalIncPath();
require $local_inc;
require $GLOBALS['db_config_file'];
ForgeConfig::loadFromFile($GLOBALS['codendi_dir'] . '/src/etc/local.inc.dist');
//load the default settings
ForgeConfig::loadFromFile($local_inc);
ForgeConfig::loadFromFile($GLOBALS['db_config_file']);
if (isset($GLOBALS['DEBUG_MODE'])) {
    ForgeConfig::loadFromFile($GLOBALS['codendi_dir'] . '/src/etc/development.inc.dist');
    ForgeConfig::loadFromFile(dirname($local_inc) . '/development.inc');
}
ForgeConfig::loadFromDatabase();
// Fix path if needed
if (isset($GLOBALS['htmlpurifier_dir'])) {
    ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $GLOBALS['htmlpurifier_dir']);