From 5fd6357da0785a57c5d3827fa8d00507fee57a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 3 Apr 2009 12:20:03 +0000 Subject: [PATCH] Static method detectCorePath() must be added to ApplicationEntryPoint --- inc/config.php | 152 ++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/inc/config.php b/inc/config.php index 7cfb67b1..c9506f6f 100644 --- a/inc/config.php +++ b/inc/config.php @@ -25,222 +25,222 @@ */ // Load the class from inc/config direktory -require(dirname(__FILE__) . '/classes/interfaces/class_FrameworkInterface.php'); -require(dirname(__FILE__) . '/classes/interfaces/registry/class_Registerable.php'); -require(dirname(__FILE__) . '/config/class_FrameworkConfiguration.php'); +require(ApplicationEntryPoint::detectCorePath() . '/inc/classes/interfaces/class_FrameworkInterface.php'); +require(ApplicationEntryPoint::detectCorePath() . '/inc/classes/interfaces/registry/class_Registerable.php'); +require(ApplicationEntryPoint::detectCorePath() . '/inc/config/class_FrameworkConfiguration.php'); // Get a new configuration instance $cfg = FrameworkConfiguration::getInstance(); // CFG: SERVER-PATH -$cfg->setConfigEntry('base_path', (dirname(dirname(__FILE__)) . '/')); +$cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/')); // CFG: BASE-URL $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl()); // CFG: DATABASE-TYPE -$cfg->setConfigEntry('db_type', "local"); +$cfg->setConfigEntry('db_type', 'local'); // CFG: LOCAL-DB-PATH -$cfg->setConfigEntry('local_db_path', $cfg->readConfig('base_path') . "db/"); +$cfg->setConfigEntry('local_db_path', $cfg->readConfig('base_path') . 'db/'); // CFG: TIME-ZONE -$cfg->setDefaultTimezone("Europe/Berlin"); +$cfg->setDefaultTimezone('Europe/Berlin'); // CFG: MAGIC-QUOTES-RUNTIME $cfg->setMagicQuotesRuntime(false); // CFG: CLASS-PREFIX -$cfg->setConfigEntry('class_prefix', "class_"); +$cfg->setConfigEntry('class_prefix', 'class_'); // CFG: CLASS-SUFFIX -$cfg->setConfigEntry('class_suffix', ".php"); +$cfg->setConfigEntry('class_suffix', '.php'); // CFG: RAW-TEMPLATE-EXTENSION -$cfg->setConfigEntry('raw_template_extension', ".tpl"); +$cfg->setConfigEntry('raw_template_extension', '.tpl'); // CFG: CODE-TEMPLATE-EXTENSION -$cfg->setConfigEntry('code_template_extension', ".ctp"); +$cfg->setConfigEntry('code_template_extension', '.ctp'); // CFG: SELECTOR-PATH -$cfg->setConfigEntry('selector_path', "selector"); +$cfg->setConfigEntry('selector_path', 'selector'); // CFG: APPLICATION-HELPER -$cfg->setConfigEntry('app_helper_class', "ApplicationHelper"); +$cfg->setConfigEntry('app_helper_class', 'ApplicationHelper'); // CFG: LAUNCH-METHOD -$cfg->setConfigEntry('entry_method', "entryPoint"); +$cfg->setConfigEntry('entry_method', 'entryPoint'); // CFG: TEMPLATE-BASE-PATH -$cfg->setConfigEntry('tpl_base_path', "templates/"); +$cfg->setConfigEntry('tpl_base_path', 'templates/'); // CFG: LANGUAGE-BASE-PATH -$cfg->setConfigEntry('lang_base_path', "inc/language/"); +$cfg->setConfigEntry('lang_base_path', 'inc/language/'); // CFG: COMPRESSOR-BASE-PATH -$cfg->setConfigEntry('compressor_base_path', "inc/classes/main/compressor/"); +$cfg->setConfigEntry('compressor_base_path', 'inc/classes/main/compressor/'); // CFG: APPLICATION-BASE-PATH -$cfg->setConfigEntry('application_base_path', "application/"); +$cfg->setConfigEntry('application_base_path', 'application/'); // CFG: APPLICATION-PATH $cfg->setConfigEntry('application_path', $cfg->readConfig('base_path') . $cfg->readConfig('application_base_path')); // CFG: COMPILE-OUTPUT-PATH -$cfg->setConfigEntry('compile_output_path', "templates/_compiled/"); +$cfg->setConfigEntry('compile_output_path', 'templates/_compiled/'); // CFG: TEMPLATE-ENGINE -$cfg->setConfigEntry('template_class', "WebTemplateEngine"); +$cfg->setConfigEntry('template_class', 'WebTemplateEngine'); // CFG: DEBUG-ENGINE -$cfg->setConfigEntry('debug_class', "DebugWebOutput"); +$cfg->setConfigEntry('debug_class', 'DebugWebOutput'); // CFG: DEFAULT-LANGUAGE -$cfg->setConfigEntry('default_lang', "de"); // A two-char language string: de for german, en for english and so on +$cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on // CFG: WEB-TEMPLATE-TYPE -$cfg->setConfigEntry('web_template_type', "html"); +$cfg->setConfigEntry('web_template_type', 'html'); // CFG: EMAIL-TEMPLATE-TYPE -$cfg->setConfigEntry('email_template_type', "emails"); +$cfg->setConfigEntry('email_template_type', 'emails'); // CFG: CODE-TEMPLATE-TYPE -$cfg->setConfigEntry('code_template_type', "code"); +$cfg->setConfigEntry('code_template_type', 'code'); // CFG: WEB-ENGINE -$cfg->setConfigEntry('output_class', "WebOutput"); +$cfg->setConfigEntry('output_class', 'WebOutput'); // CFG: SELECTOR-TEMPLATE-PREFIX -$cfg->setConfigEntry('tpl_selector_prefix', "selector"); +$cfg->setConfigEntry('tpl_selector_prefix', 'selector'); // CFG: WEB-CONTENT-TYPE -$cfg->setConfigEntry('web_content_type', "text/html"); +$cfg->setConfigEntry('web_content_type', 'text/html'); // CFG: VALID-TEMPLATE-VARIABLE -$cfg->setConfigEntry('tpl_valid_var', "content"); +$cfg->setConfigEntry('tpl_valid_var', 'content'); // CFG: META-AUTHOR -$cfg->setConfigEntry('meta_author', "Your-name-here"); +$cfg->setConfigEntry('meta_author', 'Your-name-here'); // CFG: META-PUBLISHER -$cfg->setConfigEntry('meta_publisher', "Your-name-here"); +$cfg->setConfigEntry('meta_publisher', 'Your-name-here'); // CFG: META-KEYWORDS -$cfg->setConfigEntry('meta_keywords', "test,test,test"); +$cfg->setConfigEntry('meta_keywords', 'test,test,test'); // CFG: META-DESCRIPTION -$cfg->setConfigEntry('meta_description', "A description for your website"); +$cfg->setConfigEntry('meta_description', 'A description for your website'); // CFG: SELECTOR-MAIN-TEMPLATE -$cfg->setConfigEntry('selector_main_tpl', "selector_main"); +$cfg->setConfigEntry('selector_main_tpl', 'selector_main'); // CFG: SELECTOR-APPS-TEMPLATE -$cfg->setConfigEntry('selector_apps_tpl', "selector_apps"); +$cfg->setConfigEntry('selector_apps_tpl', 'selector_apps'); // CFG: SELECTOR-NAME -$cfg->setConfigEntry('selector_name', "selector"); +$cfg->setConfigEntry('selector_name', 'selector'); // CFG: DEFAULT-APPLICATION -$cfg->setConfigEntry('default_application', "selector"); +$cfg->setConfigEntry('default_application', 'selector'); // CFG: VERBOSE-LEVEL $cfg->setConfigEntry('verbose_level', 0); // CFG: CACHE-TYPE -$cfg->setConfigEntry('cache_class', "MemoryCache"); +$cfg->setConfigEntry('cache_class', 'MemoryCache'); // CFG: SEARCH-CRITERIA -$cfg->setConfigEntry('search_criteria_class', "SearchCriteria"); +$cfg->setConfigEntry('search_criteria_class', 'SearchCriteria'); // CFG: DATASET-CRITERIA -$cfg->setConfigEntry('dataset_criteria_class', "DataSetCriteria"); +$cfg->setConfigEntry('dataset_criteria_class', 'DataSetCriteria'); // CFG: UPDATE-CRITERIA -$cfg->setConfigEntry('update_criteria_class', "UpdateCriteria"); +$cfg->setConfigEntry('update_criteria_class', 'UpdateCriteria'); // CFG: FILE-IO-HANDLER -$cfg->setConfigEntry('file_io_class', "FileIoHandler"); +$cfg->setConfigEntry('file_io_class', 'FileIoHandler'); // CFG: FILTER-CHAIN -$cfg->setConfigEntry('filter_chain_class', "FilterChain"); +$cfg->setConfigEntry('filter_chain_class', 'FilterChain'); // CFG: FILE-INPUT-STREAM -$cfg->setConfigEntry('file_input_class', "FileIoStream"); +$cfg->setConfigEntry('file_input_class', 'FileIoStream'); // CFG: FILE-OUTPUT-STREAM -$cfg->setConfigEntry('file_output_class', "FileIoStream"); +$cfg->setConfigEntry('file_output_class', 'FileIoStream'); // CFG: EMAIL-VALIDATOR-FILTER -$cfg->setConfigEntry('email_validator_filter', "EmailValidatorFilter"); +$cfg->setConfigEntry('email_validator_filter', 'EmailValidatorFilter'); // CFG: USERNAME-VALIDATOR-FILTER -$cfg->setConfigEntry('username_validator_filter', "UserNameValidatorFilter"); +$cfg->setConfigEntry('username_validator_filter', 'UserNameValidatorFilter'); // CFG: USERNAME-IS-GUEST-FILTER -$cfg->setConfigEntry('username_is_guest_filter', "UserNameIsGuestFilter"); +$cfg->setConfigEntry('username_is_guest_filter', 'UserNameIsGuestFilter'); // CFG: PASSWORD-VALIDATOR-FILTER -$cfg->setConfigEntry('password_validator_filter', "PasswordValidatorFilter"); +$cfg->setConfigEntry('password_validator_filter', 'PasswordValidatorFilter'); // CFG: RULES-ACCEPTED-FILTER -$cfg->setConfigEntry('rules_accepted_filter', "RulesAcceptedFilter"); +$cfg->setConfigEntry('rules_accepted_filter', 'RulesAcceptedFilter'); // CFG: USERNAME-VERIFIER-FILTER -$cfg->setConfigEntry('username_verifier_filter', "UserNameVerifierFilter"); +$cfg->setConfigEntry('username_verifier_filter', 'UserNameVerifierFilter'); // CFG: USER-GUEST-VERIFIER-FILTER -$cfg->setConfigEntry('user_guest_verifier_filter', "UserGuestVerifierFilter"); +$cfg->setConfigEntry('user_guest_verifier_filter', 'UserGuestVerifierFilter'); // CFG: EMAIL-VERIFIER-FILTER -$cfg->setConfigEntry('email_verifier_filter', "EmailVerifierFilter"); +$cfg->setConfigEntry('email_verifier_filter', 'EmailVerifierFilter'); // CFG: PASSWORD-VERIFIER-FILTER -$cfg->setConfigEntry('password_verifier_filter', "PasswordVerifierFilter"); +$cfg->setConfigEntry('password_verifier_filter', 'PasswordVerifierFilter'); // CFG: PASSWD-GUEST-VERIFIER-FILTER -$cfg->setConfigEntry('passwd_guest_verifier_filter', "PasswordGuestVerifierFilter"); +$cfg->setConfigEntry('passwd_guest_verifier_filter', 'PasswordGuestVerifierFilter'); // CFG: EMAIL-CHANGE-FILTER -$cfg->setConfigEntry('email_change_filter', "EmailChangeFilter"); +$cfg->setConfigEntry('email_change_filter', 'EmailChangeFilter'); // CFG: PASSWORD-CHANGE-FILTER -$cfg->setConfigEntry('password_change_filter', "PasswordChangeFilter"); +$cfg->setConfigEntry('password_change_filter', 'PasswordChangeFilter'); // CFG: ACCOUNT-PASSWORD-FILTER -$cfg->setConfigEntry('account_password_filter', "AccountPasswordVerifierFilter"); +$cfg->setConfigEntry('account_password_filter', 'AccountPasswordVerifierFilter'); // CFG: USER-STATUS-FILTER -$cfg->setConfigEntry('user_status_filter', "UserStatusVerifierFilter"); +$cfg->setConfigEntry('user_status_filter', 'UserStatusVerifierFilter'); // CFG: USER-UNCONFIRMED-FILTER -$cfg->setConfigEntry('user_unconfirmed_filter', "UserUnconfirmedVerifierFilter"); +$cfg->setConfigEntry('user_unconfirmed_filter', 'UserUnconfirmedVerifierFilter'); // CFG: CRYPTO-CLASS -$cfg->setConfigEntry('crypto_class', "CryptoHelper"); +$cfg->setConfigEntry('crypto_class', 'CryptoHelper'); // CFG: RNG-CLASS -$cfg->setConfigEntry('rng_class', "RandomNumberGenerator"); +$cfg->setConfigEntry('rng_class', 'RandomNumberGenerator'); // CFG: USER-DB-WRAPPER-CLASS -$cfg->setConfigEntry('user_db_wrapper_class', "UserDatabaseWrapper"); +$cfg->setConfigEntry('user_db_wrapper_class', 'UserDatabaseWrapper'); // CFG: NEWS-DB-WRAPPER-CLASS -$cfg->setConfigEntry('news_db_wrapper_class', "NewsDatabaseWrapper"); +$cfg->setConfigEntry('news_db_wrapper_class', 'NewsDatabaseWrapper'); // CFG: WEB-CMD-RESOLVER-CLASS -$cfg->setConfigEntry('web_cmd_resolver_class', "WebCommandResolver"); +$cfg->setConfigEntry('web_cmd_resolver_class', 'WebCommandResolver'); // CFG: IMAGE-CMD-RESOLVER-CLASS -$cfg->setConfigEntry('image_cmd_resolver_class', "ImageCommandResolver"); +$cfg->setConfigEntry('image_cmd_resolver_class', 'ImageCommandResolver'); // CFG: MAILER-CLASS -$cfg->setConfigEntry('mailer_class', "DebugMailer"); +$cfg->setConfigEntry('mailer_class', 'DebugMailer'); // CFG: MATH-PRIME $cfg->setConfigEntry('math_prime', 591623); // CFG: DATE-KEY -$cfg->setConfigEntry('date_key', date("d-m-Y (l-F-T)", time())); +$cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time())); // CFG: SALT-LENGTH $cfg->setConfigEntry('salt_length', 10); @@ -252,22 +252,22 @@ $cfg->setConfigEntry('rnd_str_length', 128); $cfg->setConfigEntry('hash_mask', "%1s:%2s:%3s"); // 1=salt, 2=extra salt, 3=plain password // CFG: IS-SINGLE-SERVER -$cfg->setConfigEntry('is_single_server', "Y"); +$cfg->setConfigEntry('is_single_server', 'Y'); // CFG: POST-REGISTRATION-ACTION -$cfg->setConfigEntry('post_registration_class', "LoginAfterRegistrationAction"); +$cfg->setConfigEntry('post_registration_class', 'LoginAfterRegistrationAction'); // CFG: USER-CLASS -$cfg->setConfigEntry('user_class', "Member"); +$cfg->setConfigEntry('user_class', 'Member'); // CFG: GUEST-CLASS -$cfg->setConfigEntry('guest_class', "Guest"); +$cfg->setConfigEntry('guest_class', 'Guest'); // CFG: COOKIE-EXPIRE $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours! // CFG: COOKIE-PATH -$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . "/"); +$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/'); // CFG: COOKIE-DOMAIN $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same... @@ -276,16 +276,16 @@ $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the sa $cfg->setConfigEntry('cookie_ssl', (isset($_SERVER['HTTPS']))); // CFG: CRYPT-FIXED-SALT -$cfg->setConfigEntry('crypt_fixed_salt', "N"); +$cfg->setConfigEntry('crypt_fixed_salt', 'N'); // CFG: DB-UPDATE-PRIMARY-FORCED -$cfg->setConfigEntry('db_update_primary_forced', "Y"); +$cfg->setConfigEntry('db_update_primary_forced', 'Y'); // CFG: GERMAN-DATE-TIME $cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s"); // CFG: PRODUCT-INSTALL-MODE -$cfg->setConfigEntry('product_install_mode', "debug"); +$cfg->setConfigEntry('product_install_mode', 'debug'); // [EOF] ?> -- 2.39.5