[Fusionforge-commits] r12318 - trunk/src/common/include

Christian Bayle cbayle at fusionforge.org
Sat Feb 19 14:36:53 CET 2011


Author: cbayle
Date: 2011-02-19 14:36:52 +0100 (Sat, 19 Feb 2011)
New Revision: 12318

Modified:
   trunk/src/common/include/config-vars.php
Log:
don't try to setup config param if there is no config file


Modified: trunk/src/common/include/config-vars.php
===================================================================
--- trunk/src/common/include/config-vars.php	2011-02-19 12:47:37 UTC (rev 12317)
+++ trunk/src/common/include/config-vars.php	2011-02-19 13:36:52 UTC (rev 12318)
@@ -22,130 +22,132 @@
  * USA
  */
 
-forge_define_config_item ('forge_name', 'core', $GLOBALS['sys_name']) ;
-forge_define_config_item ('force_login', 'core', $GLOBALS['sys_force_login']) ;
-forge_set_config_item_bool ('force_login', 'core') ;
-forge_define_config_item ('user_registration_restricted', 'core', $GLOBALS['sys_user_reg_restricted']) ;
-forge_set_config_item_bool ('user_registration_restricted', 'core') ;
-forge_define_config_item ('project_registration_restricted', 'core', $GLOBALS['sys_project_reg_restricted']) ;
-forge_set_config_item_bool ('project_registration_restricted', 'core') ;
-forge_define_config_item ('project_auto_approval', 'core', false) ;
-forge_set_config_item_bool ('project_auto_approval', 'core') ;
-forge_define_config_item ('project_auto_approval_user', 'core', 'admin') ;
-forge_define_config_item ('allow_project_without_template', 'core', true) ;
-forge_set_config_item_bool ('allow_project_without_template', 'core') ;
-forge_define_config_item ('web_host', 'core', $GLOBALS['sys_default_domain']) ;
-forge_define_config_item ('http_port', 'core', 80) ;
-forge_define_config_item ('https_port', 'core', 443) ;
-forge_define_config_item ('apache_user', 'core', $GLOBALS['sys_apache_user']) ;
-forge_define_config_item ('apache_group', 'core', $GLOBALS['sys_apache_group']) ;
-forge_define_config_item ('scm_tarballs_path', 'core', '$core/data_path/scmtarballs') ;
-forge_define_config_item ('scm_snapshots_path', 'core', '$core/data_path/scmsnapshots') ;
-forge_define_config_item ('plugins_path', 'core', '$core/source_path/plugins') ;
-forge_define_config_item ('themes_root', 'core', '$core/source_path/www/themes') ;
-forge_define_config_item ('default_theme', 'core', $GLOBALS['sys_theme']) ;
-forge_define_config_item ('default_language', 'core', $GLOBALS['sys_lang']) ;
-forge_define_config_item ('default_timezone', 'core', $GLOBALS['sys_default_timezone']) ;
-forge_define_config_item ('default_country_code', 'core', $GLOBALS['sys_default_country_code']) ;
-forge_define_config_item ('use_scm', 'core', $GLOBALS['sys_use_scm']) ;
-forge_set_config_item_bool ('use_scm', 'core') ;
-forge_define_config_item ('use_tracker', 'core', $GLOBALS['sys_use_tracker']) ;
-forge_set_config_item_bool ('use_tracker', 'core') ;
-forge_define_config_item ('use_forum', 'core', $GLOBALS['sys_use_forum']) ;
-forge_set_config_item_bool ('use_forum', 'core') ;
-forge_define_config_item ('use_pm', 'core', $GLOBALS['sys_use_pm']) ;
-forge_set_config_item_bool ('use_pm', 'core') ;
-forge_define_config_item ('use_docman', 'core', $GLOBALS['sys_use_docman']) ;
-forge_set_config_item_bool ('use_docman', 'core') ;
-forge_define_config_item ('use_diary', 'core', $GLOBALS['sys_use_diary']) ;
-forge_set_config_item_bool ('use_diary', 'core') ;
-forge_define_config_item ('use_news', 'core', $GLOBALS['sys_use_news']) ;
-forge_set_config_item_bool ('use_news', 'core') ;
-forge_define_config_item ('use_mail', 'core', $GLOBALS['sys_use_mail']) ;
-forge_set_config_item_bool ('use_mail', 'core') ;
-forge_define_config_item ('use_survey', 'core', $GLOBALS['sys_use_survey']) ;
-forge_set_config_item_bool ('use_survey', 'core') ;
-forge_define_config_item ('use_frs', 'core', $GLOBALS['sys_use_frs']) ;
-forge_set_config_item_bool ('use_frs', 'core') ;
-forge_define_config_item ('use_project_tags', 'core', $GLOBALS['sys_use_project_tags']) ;
-forge_set_config_item_bool ('use_project_tags', 'core') ;
-forge_define_config_item ('use_project_full_list', 'core', $GLOBALS['sys_use_project_full_list']) ;
-forge_set_config_item_bool ('use_project_full_list', 'core') ;
-forge_define_config_item ('use_fti', 'core', $GLOBALS['sys_use_fti']) ;
-forge_set_config_item_bool ('use_fti', 'core') ;
-forge_define_config_item ('use_ftp', 'core', $GLOBALS['sys_use_ftp']) ;
-forge_set_config_item_bool ('use_ftp', 'core') ;
-forge_define_config_item ('use_trove', 'core', $GLOBALS['sys_use_trove']) ;
-forge_set_config_item_bool ('use_trove', 'core') ;
-forge_define_config_item ('use_snippet', 'core', $GLOBALS['sys_use_snippet']) ;
-forge_set_config_item_bool ('use_snippet', 'core') ;
-forge_define_config_item ('use_ssl', 'core', $GLOBALS['sys_use_ssl']) ;
-forge_set_config_item_bool ('use_ssl', 'core') ;
-forge_define_config_item ('use_people', 'core', $GLOBALS['sys_use_people']) ;
-forge_set_config_item_bool ('use_people', 'core') ;
-forge_define_config_item ('use_shell', 'core', $GLOBALS['sys_use_shell']) ;
-forge_set_config_item_bool ('use_shell', 'core') ;
-forge_define_config_item ('use_ratings', 'core', $GLOBALS['sys_use_ratings']) ;
-forge_set_config_item_bool ('use_ratings', 'core') ;
-forge_define_config_item ('use_ftp_uploads', 'core', $GLOBALS['sys_use_ftpuploads']) ;
-forge_set_config_item_bool ('use_ftp_uploads', 'core') ;
-forge_define_config_item ('ftp_upload_dir', 'core', $GLOBALS['sys_ftp_upload_dir']) ;
-forge_define_config_item ('upload_dir', 'core', $GLOBALS['sys_upload_dir']) ;
-forge_define_config_item ('use_manual_uploads', 'core', isset ($GLOBALS['sys_use_manual_uploads']) ? $GLOBALS['sys_use_manual_uploads'] : false) ;
-forge_set_config_item_bool ('use_manual_uploads', 'core') ;
-forge_define_config_item ('use_gateways', 'core', $GLOBALS['sys_use_gateways']) ;
-forge_set_config_item_bool ('use_gateways', 'core') ;
-forge_define_config_item ('use_project_vhost', 'core', $GLOBALS['sys_use_project_vhost']) ;
-forge_set_config_item_bool ('use_project_vhost', 'core') ;
-forge_define_config_item ('use_project_database', 'core', $GLOBALS['sys_use_project_database']) ;
-forge_set_config_item_bool ('use_project_database', 'core') ;
-forge_define_config_item ('use_project_multimedia', 'core', $GLOBALS['sys_use_project_multimedia']) ;
-forge_set_config_item_bool ('use_project_multimedia', 'core') ;
-forge_define_config_item ('download_host', 'core', $GLOBALS['sys_download_host']) ;
-forge_define_config_item ('shell_host', 'core', $GLOBALS['sys_shell_host']) ;
-forge_define_config_item ('users_host', 'core', $GLOBALS['sys_users_host']) ;
-forge_define_config_item ('lists_host', 'core', $GLOBALS['sys_lists_host']) ;
-forge_define_config_item ('scm_host', 'core', $GLOBALS['sys_scm_host']) ;
-forge_define_config_item ('forum_return_domain', 'core', $GLOBALS['sys_forum_return_domain']) ;
-forge_define_config_item ('use_jabber', 'core', $GLOBALS['sys_use_jabber']) ;
-forge_set_config_item_bool ('use_jabber', 'core') ;
-forge_define_config_item ('jabber_host', 'core', $GLOBALS['sys_jabber_server']) ;
-forge_define_config_item ('jabber_port', 'core', $GLOBALS['sys_jabber_port']) ;
-forge_define_config_item ('jabber_user', 'core', $GLOBALS['sys_jabber_user']) ;
-forge_define_config_item ('jabber_password', 'core', isset($GLOBALS['sys_jabber_pass']) ? $GLOBALS['sys_jabber_pass'] : '') ;
-forge_define_config_item ('ldap_host', 'core', $GLOBALS['sys_ldap_host']) ;
-forge_define_config_item ('ldap_port', 'core', $GLOBALS['sys_ldap_port']) ;
-forge_define_config_item ('ldap_version', 'core', $GLOBALS['sys_ldap_version']) ;
-forge_define_config_item ('ldap_base_dn', 'core', $GLOBALS['sys_ldap_base_dn']) ;
-forge_define_config_item ('ldap_bind_dn', 'core', $GLOBALS['sys_ldap_bind_dn']) ;
-forge_define_config_item ('ldap_admin_dn', 'core', $GLOBALS['sys_ldap_admin_dn']) ;
-forge_define_config_item ('ldap_password', 'core', isset($GLOBALS['sys_ldap_passwd']) ? $GLOBALS['sys_ldap_passwd'] : '') ;
-forge_define_config_item ('news_group', 'core', $GLOBALS['sys_news_group']) ;
-forge_define_config_item ('stats_group', 'core', $GLOBALS['sys_stats_group']) ;
-forge_define_config_item ('peer_rating_group', 'core', $GLOBALS['sys_peer_rating_group']) ;
-forge_define_config_item ('template_group', 'core', $GLOBALS['sys_template_group']) ;
-forge_define_config_item ('sendmail_path', 'core', $GLOBALS['sys_sendmail_path']) ;
-forge_define_config_item ('mailman_path', 'core', $GLOBALS['sys_path_to_mailman']) ;
-forge_define_config_item ('jpgraph_path', 'core', $GLOBALS['sys_path_to_jpgraph']) ;
-forge_define_config_item ('account_manager_type', 'core', $GLOBALS['sys_account_manager_type']) ;
-forge_define_config_item ('unix_cipher', 'core', $GLOBALS['unix_cipher']) ;
-forge_define_config_item ('homedir_prefix', 'core', $GLOBALS['homedir_prefix']) ;
-forge_define_config_item ('groupdir_prefix', 'core', $GLOBALS['groupdir_prefix']) ;
-forge_define_config_item ('url_root', 'core', $GLOBALS['sys_urlroot']) ;
-forge_define_config_item ('url_prefix', 'core', $GLOBALS['sys_urlprefix']) ;
-forge_define_config_item ('images_url', 'core', $GLOBALS['sys_images_url']) ;
-forge_define_config_item ('images_secure_url', 'core', $GLOBALS['sys_images_secure_url']) ;
-forge_define_config_item ('admin_email', 'core', $GLOBALS['sys_admin_email']) ;
-forge_define_config_item ('session_key', 'core', $GLOBALS['sys_session_key']) ;
-forge_define_config_item ('session_expire', 'core', $GLOBALS['sys_session_expire']) ;
-forge_define_config_item ('show_source', 'core', $GLOBALS['sys_show_source']) ;
-forge_set_config_item_bool ('show_source', 'core') ;
-forge_define_config_item ('default_trove_cat', 'core', $GLOBALS['default_trove_cat']) ;
-forge_define_config_item ('user_registration_accept_conditions', 'core', $GLOBALS['sys_require_accept_conditions']);
-forge_set_config_item_bool ('user_registration_accept_conditions', 'core') ;
-forge_define_config_item ('use_private_project', 'core', $GLOBALS['sys_use_private_project']);
-forge_set_config_item_bool ('use_private_project', 'core') ;
-forge_define_config_item ('compression_method', 'core', 'gzip') ;
+if (file_exists($gfcgfile)) {
+	forge_define_config_item ('forge_name', 'core', $GLOBALS['sys_name']) ;
+	forge_define_config_item ('force_login', 'core', $GLOBALS['sys_force_login']) ;
+	forge_set_config_item_bool ('force_login', 'core') ;
+	forge_define_config_item ('user_registration_restricted', 'core', $GLOBALS['sys_user_reg_restricted']) ;
+	forge_set_config_item_bool ('user_registration_restricted', 'core') ;
+	forge_define_config_item ('project_registration_restricted', 'core', $GLOBALS['sys_project_reg_restricted']) ;
+	forge_set_config_item_bool ('project_registration_restricted', 'core') ;
+	forge_define_config_item ('project_auto_approval', 'core', false) ;
+	forge_set_config_item_bool ('project_auto_approval', 'core') ;
+	forge_define_config_item ('project_auto_approval_user', 'core', 'admin') ;
+	forge_define_config_item ('allow_project_without_template', 'core', true) ;
+	forge_set_config_item_bool ('allow_project_without_template', 'core') ;
+	forge_define_config_item ('web_host', 'core', $GLOBALS['sys_default_domain']) ;
+	forge_define_config_item ('http_port', 'core', 80) ;
+	forge_define_config_item ('https_port', 'core', 443) ;
+	forge_define_config_item ('apache_user', 'core', $GLOBALS['sys_apache_user']) ;
+	forge_define_config_item ('apache_group', 'core', $GLOBALS['sys_apache_group']) ;
+	forge_define_config_item ('scm_tarballs_path', 'core', '$core/data_path/scmtarballs') ;
+	forge_define_config_item ('scm_snapshots_path', 'core', '$core/data_path/scmsnapshots') ;
+	forge_define_config_item ('plugins_path', 'core', '$core/source_path/plugins') ;
+	forge_define_config_item ('themes_root', 'core', '$core/source_path/www/themes') ;
+	forge_define_config_item ('default_theme', 'core', $GLOBALS['sys_theme']) ;
+	forge_define_config_item ('default_language', 'core', $GLOBALS['sys_lang']) ;
+	forge_define_config_item ('default_timezone', 'core', $GLOBALS['sys_default_timezone']) ;
+	forge_define_config_item ('default_country_code', 'core', $GLOBALS['sys_default_country_code']) ;
+	forge_define_config_item ('use_scm', 'core', $GLOBALS['sys_use_scm']) ;
+	forge_set_config_item_bool ('use_scm', 'core') ;
+	forge_define_config_item ('use_tracker', 'core', $GLOBALS['sys_use_tracker']) ;
+	forge_set_config_item_bool ('use_tracker', 'core') ;
+	forge_define_config_item ('use_forum', 'core', $GLOBALS['sys_use_forum']) ;
+	forge_set_config_item_bool ('use_forum', 'core') ;
+	forge_define_config_item ('use_pm', 'core', $GLOBALS['sys_use_pm']) ;
+	forge_set_config_item_bool ('use_pm', 'core') ;
+	forge_define_config_item ('use_docman', 'core', $GLOBALS['sys_use_docman']) ;
+	forge_set_config_item_bool ('use_docman', 'core') ;
+	forge_define_config_item ('use_diary', 'core', $GLOBALS['sys_use_diary']) ;
+	forge_set_config_item_bool ('use_diary', 'core') ;
+	forge_define_config_item ('use_news', 'core', $GLOBALS['sys_use_news']) ;
+	forge_set_config_item_bool ('use_news', 'core') ;
+	forge_define_config_item ('use_mail', 'core', $GLOBALS['sys_use_mail']) ;
+	forge_set_config_item_bool ('use_mail', 'core') ;
+	forge_define_config_item ('use_survey', 'core', $GLOBALS['sys_use_survey']) ;
+	forge_set_config_item_bool ('use_survey', 'core') ;
+	forge_define_config_item ('use_frs', 'core', $GLOBALS['sys_use_frs']) ;
+	forge_set_config_item_bool ('use_frs', 'core') ;
+	forge_define_config_item ('use_project_tags', 'core', $GLOBALS['sys_use_project_tags']) ;
+	forge_set_config_item_bool ('use_project_tags', 'core') ;
+	forge_define_config_item ('use_project_full_list', 'core', $GLOBALS['sys_use_project_full_list']) ;
+	forge_set_config_item_bool ('use_project_full_list', 'core') ;
+	forge_define_config_item ('use_fti', 'core', $GLOBALS['sys_use_fti']) ;
+	forge_set_config_item_bool ('use_fti', 'core') ;
+	forge_define_config_item ('use_ftp', 'core', $GLOBALS['sys_use_ftp']) ;
+	forge_set_config_item_bool ('use_ftp', 'core') ;
+	forge_define_config_item ('use_trove', 'core', $GLOBALS['sys_use_trove']) ;
+	forge_set_config_item_bool ('use_trove', 'core') ;
+	forge_define_config_item ('use_snippet', 'core', $GLOBALS['sys_use_snippet']) ;
+	forge_set_config_item_bool ('use_snippet', 'core') ;
+	forge_define_config_item ('use_ssl', 'core', $GLOBALS['sys_use_ssl']) ;
+	forge_set_config_item_bool ('use_ssl', 'core') ;
+	forge_define_config_item ('use_people', 'core', $GLOBALS['sys_use_people']) ;
+	forge_set_config_item_bool ('use_people', 'core') ;
+	forge_define_config_item ('use_shell', 'core', $GLOBALS['sys_use_shell']) ;
+	forge_set_config_item_bool ('use_shell', 'core') ;
+	forge_define_config_item ('use_ratings', 'core', $GLOBALS['sys_use_ratings']) ;
+	forge_set_config_item_bool ('use_ratings', 'core') ;
+	forge_define_config_item ('use_ftp_uploads', 'core', $GLOBALS['sys_use_ftpuploads']) ;
+	forge_set_config_item_bool ('use_ftp_uploads', 'core') ;
+	forge_define_config_item ('ftp_upload_dir', 'core', $GLOBALS['sys_ftp_upload_dir']) ;
+	forge_define_config_item ('upload_dir', 'core', $GLOBALS['sys_upload_dir']) ;
+	forge_define_config_item ('use_manual_uploads', 'core', isset ($GLOBALS['sys_use_manual_uploads']) ? $GLOBALS['sys_use_manual_uploads'] : false) ;
+	forge_set_config_item_bool ('use_manual_uploads', 'core') ;
+	forge_define_config_item ('use_gateways', 'core', $GLOBALS['sys_use_gateways']) ;
+	forge_set_config_item_bool ('use_gateways', 'core') ;
+	forge_define_config_item ('use_project_vhost', 'core', $GLOBALS['sys_use_project_vhost']) ;
+	forge_set_config_item_bool ('use_project_vhost', 'core') ;
+	forge_define_config_item ('use_project_database', 'core', $GLOBALS['sys_use_project_database']) ;
+	forge_set_config_item_bool ('use_project_database', 'core') ;
+	forge_define_config_item ('use_project_multimedia', 'core', $GLOBALS['sys_use_project_multimedia']) ;
+	forge_set_config_item_bool ('use_project_multimedia', 'core') ;
+	forge_define_config_item ('download_host', 'core', $GLOBALS['sys_download_host']) ;
+	forge_define_config_item ('shell_host', 'core', $GLOBALS['sys_shell_host']) ;
+	forge_define_config_item ('users_host', 'core', $GLOBALS['sys_users_host']) ;
+	forge_define_config_item ('lists_host', 'core', $GLOBALS['sys_lists_host']) ;
+	forge_define_config_item ('scm_host', 'core', $GLOBALS['sys_scm_host']) ;
+	forge_define_config_item ('forum_return_domain', 'core', $GLOBALS['sys_forum_return_domain']) ;
+	forge_define_config_item ('use_jabber', 'core', $GLOBALS['sys_use_jabber']) ;
+	forge_set_config_item_bool ('use_jabber', 'core') ;
+	forge_define_config_item ('jabber_host', 'core', $GLOBALS['sys_jabber_server']) ;
+	forge_define_config_item ('jabber_port', 'core', $GLOBALS['sys_jabber_port']) ;
+	forge_define_config_item ('jabber_user', 'core', $GLOBALS['sys_jabber_user']) ;
+	forge_define_config_item ('jabber_password', 'core', isset($GLOBALS['sys_jabber_pass']) ? $GLOBALS['sys_jabber_pass'] : '') ;
+	forge_define_config_item ('ldap_host', 'core', $GLOBALS['sys_ldap_host']) ;
+	forge_define_config_item ('ldap_port', 'core', $GLOBALS['sys_ldap_port']) ;
+	forge_define_config_item ('ldap_version', 'core', $GLOBALS['sys_ldap_version']) ;
+	forge_define_config_item ('ldap_base_dn', 'core', $GLOBALS['sys_ldap_base_dn']) ;
+	forge_define_config_item ('ldap_bind_dn', 'core', $GLOBALS['sys_ldap_bind_dn']) ;
+	forge_define_config_item ('ldap_admin_dn', 'core', $GLOBALS['sys_ldap_admin_dn']) ;
+	forge_define_config_item ('ldap_password', 'core', isset($GLOBALS['sys_ldap_passwd']) ? $GLOBALS['sys_ldap_passwd'] : '') ;
+	forge_define_config_item ('news_group', 'core', $GLOBALS['sys_news_group']) ;
+	forge_define_config_item ('stats_group', 'core', $GLOBALS['sys_stats_group']) ;
+	forge_define_config_item ('peer_rating_group', 'core', $GLOBALS['sys_peer_rating_group']) ;
+	forge_define_config_item ('template_group', 'core', $GLOBALS['sys_template_group']) ;
+	forge_define_config_item ('sendmail_path', 'core', $GLOBALS['sys_sendmail_path']) ;
+	forge_define_config_item ('mailman_path', 'core', $GLOBALS['sys_path_to_mailman']) ;
+	forge_define_config_item ('jpgraph_path', 'core', $GLOBALS['sys_path_to_jpgraph']) ;
+	forge_define_config_item ('account_manager_type', 'core', $GLOBALS['sys_account_manager_type']) ;
+	forge_define_config_item ('unix_cipher', 'core', $GLOBALS['unix_cipher']) ;
+	forge_define_config_item ('homedir_prefix', 'core', $GLOBALS['homedir_prefix']) ;
+	forge_define_config_item ('groupdir_prefix', 'core', $GLOBALS['groupdir_prefix']) ;
+	forge_define_config_item ('url_root', 'core', $GLOBALS['sys_urlroot']) ;
+	forge_define_config_item ('url_prefix', 'core', $GLOBALS['sys_urlprefix']) ;
+	forge_define_config_item ('images_url', 'core', $GLOBALS['sys_images_url']) ;
+	forge_define_config_item ('images_secure_url', 'core', $GLOBALS['sys_images_secure_url']) ;
+	forge_define_config_item ('admin_email', 'core', $GLOBALS['sys_admin_email']) ;
+	forge_define_config_item ('session_key', 'core', $GLOBALS['sys_session_key']) ;
+	forge_define_config_item ('session_expire', 'core', $GLOBALS['sys_session_expire']) ;
+	forge_define_config_item ('show_source', 'core', $GLOBALS['sys_show_source']) ;
+	forge_set_config_item_bool ('show_source', 'core') ;
+	forge_define_config_item ('default_trove_cat', 'core', $GLOBALS['default_trove_cat']) ;
+	forge_define_config_item ('user_registration_accept_conditions', 'core', $GLOBALS['sys_require_accept_conditions']);
+	forge_set_config_item_bool ('user_registration_accept_conditions', 'core') ;
+	forge_define_config_item ('use_private_project', 'core', $GLOBALS['sys_use_private_project']);
+	forge_set_config_item_bool ('use_private_project', 'core') ;
+	forge_define_config_item ('compression_method', 'core', 'gzip') ;
+}
 
 // Arch plugin
 if (file_exists ($gfconfig.'plugins/scmarch/config.php')) {




More information about the Fusionforge-commits mailing list