File: gforge.php

package info (click to toggle)
phpwiki 1.3.12p3-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 16,956 kB
  • ctags: 21,608
  • sloc: php: 82,335; xml: 3,840; sh: 1,522; sql: 1,198; perl: 625; makefile: 562; awk: 28
file content (51 lines) | stat: -rwxr-xr-x 1,597 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
require_once('pre.php');
if (!$group_id || !$project) {
	exit_error("Invalid Project","Invalid Project");
} else {

	define('VIRTUAL_PATH', $_SERVER['SCRIPT_NAME'] . '/' . $project->getUnixName());
	define('PATH_INFO_PREFIX', '/' . $project->getUnixName() . '/');

	define('WIKI_NAME', $project->getUnixName());
	//define('ALLOW_HTTP_AUTH_LOGIN', 1);
	//define('ADMIN_USER', '');
	//define('ADMIN_PASSWD', '');
        define('AUTH_SESS_USER', 'user_id');
        define('AUTH_SESS_LEVEL', 2);
        $USER_AUTH_ORDER = "Session : PersonalPage";
        $USER_AUTH_POLICY = "stacked";
	
	// Override the default configuration for CONSTANTS before index.php
	//$LANG='de'; $LC_ALL='de_DE';
	define('THEME', 'gforge');
	//define('WIKI_NAME', "WikiDemo:$LANG:" . THEME);

	// Load the default configuration.
	include "index.php";

	error_log ("PATH_INFO_PREFIX " . PATH_INFO_PREFIX);

	// Override the default configuration for VARIABLES after index.php:
	// E.g. Use another DB:
	$DBParams['dbtype'] = 'SQL';
	$DBParams['dsn']    = 'pgsql://' . $sys_dbuser . ':' . 
                              $sys_dbpasswd . '@' . $sys_dbhost .'/' . $sys_dbname
. '_wiki';
	$DBParams['prefix'] = $project->getUnixName() ."_";

	// If the user is logged in, let the Wiki know
	if (session_loggedin()){
            // let php do it's session stuff too!
            //ini_set('session.save_handler', 'files');
            session_start();
            $_SESSION['user_id'] = user_getname();

	} else {
            // clear out the globals, just in case... 

	}
	// Start the wiki
	include "lib/main.php";
}
?>