getID(); } if (! isset($group_id) || ! isset($project)) { exit_no_group(); } else if (!($project->usesPlugin("wiki"))) { // We should test whether the wiki plugin is disabled globally // in the Forge or by the current project. // exit_disabled('home'); exit_project_disabled('home'); } else { global $robots; $robots = "noindex,nofollow"; $group_name = $project->getUnixName(); $group_public_name = $project->getPublicName(); $is_external = method_exists($project, 'getIsExternal') && $project->getIsExternal(); $wc = new WikiConfig($group_id); define('VIRTUAL_PATH', '/wiki/g/'.$group_name); define('PAGE_PREFIX', '_g'.$group_id.'_'); // We have to use a smaller value than Phpwiki due to page prefix define('MAX_PAGENAME_LENGTH', 92); define('THEME', 'fusionforge'); // For FusionForge, we create some specific pages, located in the theme // except for given project if ($group_name == forge_get_config('wiki_help_project', 'wiki')) { define('WIKI_PGSRC', 'pgsrc'); } else { define('WIKI_PGSRC', 'themes/fusionforge/pgsrc'); } define('FUSIONFORGE', true); define('PATH_INFO_PREFIX', '/'.$group_name . '/'); define('USE_PATH_INFO', true); define('WIKI_NAME', $group_name); define('DISABLE_MARKUP_WIKIWORD', $wc->getWikiConfig('DISABLE_MARKUP_WIKIWORD')); define('NUM_SPAM_LINKS', 20 * ($wc->getWikiConfig('NUM_SPAM_LINKS'))); define('ENABLE_RATEIT', $wc->getWikiConfig('ENABLE_RATEIT')); define('UPLOAD_FILE_PATH', forge_get_config('groupdir_prefix').'/'.WIKI_NAME.'/www/uploads/'); // define('UPLOAD_DATA_PATH', SERVER_URL . '/www/'.WIKI_NAME.'/uploads/'); if ($project->isPublic()) { define('UPLOAD_DATA_PATH', '/www/'.WIKI_NAME.'/uploads/'); } else { define('UPLOAD_DATA_PATH', '/wiki/view.php/'.WIKI_NAME.'/uploads/'); } // Do not use a directory per user but only one (per project) define('UPLOAD_USERDIR', false); // Use black list of extensions instead of white list define('DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS', true); // Get the maximum upload filesize from PHP config define('MAX_UPLOAD_SIZE', octets(ini_get('upload_max_filesize'))); // Disable access log (already in Apache & FusionForge). define('ACCESS_LOG_SQL', 0); define('DEBUG', (forge_get_config('installation_environment') != 'production')); // Postgresql define('DATABASE_TYPE', 'SQL'); // Dummy value (to avoid warning in SystemInfo plugin) define('DATABASE_DSN', 'pgsql://localhost/user_phpwiki'); // Disable VACUUM (they are performed every night) define('DATABASE_OPTIMISE_FREQUENCY', 0); // TBD: the name should be taken from FusionForge // define('ADMIN_USER', 'ACOS Forge Administrator'); define('ADMIN_USER', 'The PhpWiki programming team'); // Dummy value define('ADMIN_PASSWD', 'xxx'); // Allow ".svg" and ".swf" as extensions define('INLINE_IMAGES', 'png|jpg|jpeg|gif|svg|swf'); // Allow
and in wiki code define('ENABLE_MARKUP_DIVSPAN', true); // Disable ENABLE_ACDROPDOWN, it creates a