4 * Copyright (C) 2008 Alcatel-Lucent
6 * This file is part of PhpWiki.
8 * PhpWiki is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * PhpWiki is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with PhpWiki; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * Standard Alcatel-Lucent disclaimer for contributing to open source
26 * "The Configuration File ("Contribution") has not been tested and/or
27 * validated for release as or in products, combinations with products or
28 * other commercial use. Any use of the Contribution is entirely made at
29 * the user's own responsibility and the user can not rely on any features,
30 * functionalities or performances Alcatel-Lucent has attributed to the
33 * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
34 * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
36 * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
37 * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
38 * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
39 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40 * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
41 * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
45 define('GFORGE', true);
46 define('USE_BYTEA', true);
48 define('PATH_INFO_PREFIX', '/'.$group_name . '/');
49 define('USE_PATH_INFO', true);
51 define('WIKI_NAME', $group_name);
53 define('UPLOAD_FILE_PATH', '/opt/groups/'.WIKI_NAME.'/www/uploads/');
54 define('UPLOAD_DATA_PATH', '/www/'.WIKI_NAME.'/uploads/');
56 // Do not use a directory per user but only one (per project)
57 define('UPLOAD_USERDIR', false);
59 // GForge is UTF-8, so use the same.
60 define('CHARSET', 'UTF-8');
62 // Disable access log (already in apache & gforge).
63 define('ACCESS_LOG_SQL', 0);
65 // define('DEBUG', true);
66 // define('_DEBUG_LOGIN', true);
68 // Disable VACUUM (they are performed every night)
69 define('DATABASE_OPTIMISE_FREQUENCY', 0);
71 // It is not used by it is required by libs.
72 define('ADMIN_USER', 'Project Administrators');
73 define('ADMIN_PASSWD', 'xxx');
75 // Allow ".jpeg" as extension
76 define('INLINE_IMAGES', 'png|jpg|jpeg|gif');
78 // Allow template with MediaWiki syntax
79 define('ENABLE_MARKUP_TEMPLATE', true);
81 // Allow tables with MediaWiki syntax
82 define('ENABLE_MARKUP_MEDIAWIKI_TABLE', true);
84 // Allow parsing of headers for CreateToc
85 define('TOC_FULL_SYNTAX', true);
87 // Allow <div> and <span> in wiki code
88 define('ENABLE_MARKUP_DIVSPAN', true);
90 // Disable ENABLE_ACDROPDOWN, it creates a <style> in the <body> (illegal)
91 define('ENABLE_ACDROPDOWN', false);
93 define('TOOLBAR_PAGELINK_PULLDOWN', false);
94 define('TOOLBAR_TEMPLATE_PULLDOWN', false);
95 define('TOOLBAR_IMAGE_PULLDOWN', true);
98 define('ENABLE_WYSIWYG', false);
100 // Which backend? Might need to be seperately installed. See lib/WysiwygEdit/
101 // Recommended is only Wikiwyg.
103 // Wikiwyg http://openjsan.org/doc/i/in/ingy/Wikiwyg/
104 // tinymce http://tinymce.moxiecode.com/
105 // FCKeditor http://fckeditor.net/
106 // spaw http://sourceforge.net/projects/spaw
109 define('WYSIWYG_BACKEND', 'tinymce');
111 // Store all WYSIWYG pages as HTML? Will loose most link and plugin options.
112 // Not recommended, but presented here to test several WYSIWYG backends.
113 define('WYSIWYG_DEFAULT_PAGETYPE_HTML', false);
115 // Disable public pages
116 define('ENABLE_PAGE_PUBLIC', false);
118 // Let all revisions be stored. Default since 1.3.11
119 define('MAJOR_MIN_KEEP', 2147483647);
120 define('MINOR_MIN_KEEP', 2147483647);
121 define('MAJOR_MAX_AGE', 2147483647);
122 define('MAJOR_KEEP', 2147483647);
123 define('MINOR_MAX_AGE', 2147483647);
124 define('MINOR_KEEP', 2147483647);
125 define('AUTHOR_MAX_AGE', 2147483647);
126 define('AUTHOR_KEEP', 2147483647);
127 define('AUTHOR_MIN_AGE', 2147483647);
128 define('AUTHOR_MAX_KEEP', 2147483647);
131 // Define access rights for the wiki.
134 // Allow anonymous user to view the pages.
135 define('ALLOW_ANON_USER', true);
137 // Do not allow anon users to edit pages
138 define('ALLOW_ANON_EDIT', false);
140 // Do not allow fake user
141 define('ALLOW_BOGO_LOGIN', false);
142 define('ALLOW_USER_PASSWORDS', true);
144 // A dedicated auth has been created to get auth from GForge
145 $USER_AUTH_ORDER = array("GForge");
146 define('USER_AUTH_ORDER', 'GForge');
147 define('USER_AUTH_POLICY', 'strict');
149 define('EXTERNAL_LINK_TARGET', '_top');
151 // Override the default configuration for CONSTANTS before index.php
152 $LANG='en'; $LC_ALL='en_US';
154 // For Gforge, we create some specific pages, located in the theme
155 define('WIKI_PGSRC', 'themes/gforge/pgsrc/');
157 // We use a local interwiki map file
158 define('INTERWIKI_MAP_FILE', 'themes/gforge/interwiki.map');
160 define('DEFAULT_WIKI_PAGES', "");
162 define('ERROR_REPORTING', E_ERROR);
164 define('DBAUTH_AUTH_CHECK', "SELECT IF(passwd='\$password',1,0) as ok FROM plugin_wiki_pref WHERE userid='\$userid'");
165 define('DBAUTH_AUTH_USER_EXISTS', "SELECT userid FROM plugin_wiki_pref WHERE userid='\$userid'");
166 define('DBAUTH_AUTH_CREATE', "INSERT INTO plugin_wiki_pref (passwd,userid) VALUES ('\$password','\$userid')");
167 define('DBAUTH_PREF_SELECT', "SELECT prefs FROM plugin_wiki_pref WHERE userid='\$userid'");
168 define('DBAUTH_PREF_UPDATE', "UPDATE plugin_wiki_pref SET prefs='\$pref_blob' WHERE userid='\$userid'");
169 define('DBAUTH_PREF_INSERT', "INSERT INTO plugin_wiki_pref (prefs,userid) VALUES ('\$pref_blob','\$userid')");
170 define('DBAUTH_IS_MEMBER', "SELECT userid FROM plugin_wiki_pref WHERE userid='\$userid' AND groupname='\$groupname'");
171 define('DBAUTH_GROUP_MEMBERS', "SELECT userid FROM plugin_wiki_pref WHERE groupname='\$groupname'");
172 define('DBAUTH_USER_GROUPS', "SELECT groupname FROM plugin_wiki_pref WHERE userid='\$userid'");
174 define('USE_DB_SESSION', true);
176 if (isset($sys_use_selenium) && $sys_use_selenium) {
177 // Temporary disabled for selenium based tests.
178 define('ENABLE_EDIT_TOOLBAR', false);
181 // If the user is logged in, let the Wiki know
182 if (session_loggedin()){
183 // let php do it's session stuff too!
184 //ini_set('session.save_handler', 'files');
186 $user = session_get_user();
188 if ($user && is_object($user) && !$user->isError() && $user->isActive()) {
189 $user_name = $user->getRealName();
190 $_SESSION['user_id'] = $user_name;
191 $_SERVER['PHP_AUTH_USER'] = $user_name;
192 $HTTP_SERVER_VARS['PHP_AUTH_USER'] = $user_name;
195 // clear out the globals, just in case...
198 // Load the default configuration.
199 include dirname(__FILE__).'/index.php';
201 // Override the default configuration for VARIABLES after index.php:
202 // E.g. Use another DB:
203 $DBParams['dbtype'] = 'SQL';
204 $DBParams['dsn'] = 'pgsql://' . forge_get_config('database_user') . ':' .
205 forge_get_config('database_password') . '@' . forge_get_config('database_host') .'/' . forge_get_config('database_name');
207 $DBParams['prefix'] = "plugin_wiki_";
210 include dirname(__FILE__).'/lib/main.php';