0) { // url like 'user/2' arrives -> internal url_alias links to correct username // use this and prepend 'users/' $alias = drupal_get_path_alias($path); $tmp = explode('/', $alias); $result = 'users/'. $tmp[1]; } else { // check if 'user/register', 'user/password' or 'user/login' comes in and just return it if (preg_match('|^register|', $matches[1]) || preg_match('|^password|', $matches[1]) || preg_match('|^login|', $matches[1])) { $result = $result; } else { // otherwise return correct url 'users/username' $result = 'users/'. $matches[1]; } } } } /** * Utility function for computing a project's (absolute) link. * This function checks if Origo is used with "projects-in-subdomains" (=obsolete format), * or with "projects-in-subdirectories", and returns the project's address accordingly. * * @param $project_name String The project to link to. * @return String The weblink to the project. */ function get_origo_project_link($project_name = NULL) { $base = base_path(); if ($project_name == NULL) { // use the current project $project_name = variable_get('origo_project_name', ''); } if(!strcmp($base, '/')) { // The base path is '/', therefore we work with (obsolete) subdomains return 'http://'. strtolower($project_name) .'.'. variable_get('origo_web_domain', ''); } else { // The base path is something like '/projects/origo', thus we work with proper subdirectory - projects return 'http://'. variable_get('origo_web_domain', '') .'/projects/'. strtolower($project_name); } } ini_set('arg_separator.output', '&'); ini_set('magic_quotes_runtime', 0); ini_set('magic_quotes_sybase', 0); ini_set('session.cache_expire', 200000); ini_set('session.cache_limiter', 'none'); ini_set('session.cookie_lifetime', 2000000); ini_set('session.gc_maxlifetime', 200000); ini_set('session.save_handler', 'user'); ini_set('session.use_only_cookies', 1); ini_set('session.use_trans_sid', 0); ini_set('url_rewriter.tags', ''); // general setup $conf['session_inc'] = './sites/all/modules/origo_auth/origo-session.inc'; $conf['origo_api_path'] = '/api/xmlrpc'; $conf['origo_api_path_internal']= '/internal_api/xmlrpc'; $conf['origo_cookie_lifetime'] = 3600; $conf['origo_feed_cache_dir'] = '/var/cache/origo-web/feed/'; $conf['origo_feed_cache_ttl'] = 300; $conf['origo_feed_type'] = 'RSS2.0'; $conf['origo_feed_title'] = 'Workitems'; $conf['origo_feed_description'] = 'Your latest workitems'; $conf['origo_release_platforms'] = array( 'all', 'source', 'windows-x86', 'windows-x86-64', 'windows-ia64', 'linux-x86', 'linux-x86-64', 'linux-ia64', 'linux-alpha', 'linux-arm', 'linux-hppa', 'linux-m68k', 'linux-mips', 'linux-mipsel', 'linux-ppc', 'linux-ppc64', 'linux-s390', 'linux-sparc', 'macosx-ppc', 'macosx-x86', 'macosx-x86-64', 'macosx-ub', 'bsd-x86', 'bsd-x86-64', 'solaris-sparc', 'solaris-sparc-64', 'solaris-x86', 'solaris-x86-64', 'windowsce-arm', 'palmos-arm', 'symbianos-arm', 'irix-mips', 'irix-mips-64', 'other'); $conf['origo_project_creation_timeout'] = 30; $conf['origo_statistics_rrd_path'] = '/var/lib/origo-rrd/'; $conf['origo_statistics_rrdtool'] = '/usr/bin/nice /usr/bin/rrdtool'; $conf['origo_statistics_templates'] = array( 'issue', 'workitem', 'issue_commit', 'web_download_bytes', 'web_svn_bytes', 'web_page_bytes', 'web_download_hits', 'web_svn_hits', 'web_page_hits'); # load server specific settings if present @include 'settings_server.inc';