Forums / Upgrading to 1.5.x / DIR_WS_INCLUDES is pointless

DIR_WS_INCLUDES is pointless

Started by texdc on 14 May 2012, 12:23 AM · Views: 1,409

Results 1 to 2 of 2
14 May 2012, 12:23 AM
#1
texdc avatar

texdc

Zen Follower

Join Date:
Dec 2003
Posts:
135
Plugin Contributions:
1

DIR_WS_INCLUDES is pointless

Below is a list of all the files in version 1.5 that use a hard-coded 'includes' directory instead of the configured DIR_WS_INCLUDES. Besides, that should be a file path, not a web path, as it's used for including/requiring application files. If the includes directory is moved for security and version clarity, look at all the files that would require modification.

application_top.php:64: if (file_exists('includes/local/configure.php')) {
application_top.php:68:   include('includes/local/configure.php');
application_top.php:94: if (file_exists('includes/configure.php')) {
application_top.php:98:   include('includes/configure.php');
application_top.php:141: require('includes/initsystem.php');
application_top.php:145: if (( (!file_exists('includes/configure.php') && !file_exists('includes/local/configure.php')) ) || (DB_TYPE == '') || (!file_exists('includes/classes/db/' .DB_TYPE . '/query_factory.php')) || !file_exists('includes/autoload_func.php')) {
application_top.php:145: if (( (!file_exists('includes/configure.php') && !file_exists('includes/local/configure.php')) ) || (DB_TYPE == '') || (!file_exists('includes/classes/db/' .DB_TYPE . '/query_factory.php')) || !file_exists('includes/autoload_func.php')) {
application_top.php:145: if (( (!file_exists('includes/configure.php') && !file_exists('includes/local/configure.php')) ) || (DB_TYPE == '') || (!file_exists('includes/classes/db/' .DB_TYPE . '/query_factory.php')) || !file_exists('includes/autoload_func.php')) {
application_top.php:145: if (( (!file_exists('includes/configure.php') && !file_exists('includes/local/configure.php')) ) || (DB_TYPE == '') || (!file_exists('includes/classes/db/' .DB_TYPE . '/query_factory.php')) || !file_exists('includes/autoload_func.php')) {
application_top.php:154: require('includes/autoload_func.php');
sessions.php:54:       if (!class_exists('queryFactory')) require('includes/classes/db/' .DB_TYPE . '/query_factory.php');
init_database.php:18: require('includes/classes/db/' .DB_TYPE . '/query_factory.php');
header_php.php:19: require_once('includes/classes/http_client.php');
header_php.php:33:   require_once('includes/classes/http_client.php'); // shipping in basket
paypal_functions.php:993:     $logfilename = 'includes/modules/payment/paypal/logs/ipn_' . $paypal_instance_id . '.log';
paypaldp.php:116:   var $_logDir = 'includes/modules/payment/paypal/logs/';
paypalwpp.php:89:   var $_logDir = 'includes/modules/payment/paypal/logs/';
shipping_estimator.php:45:   require_once('includes/classes/http_client.php'); // shipping in basket
tpl_zc_install_suggested_default.php:12: $relPath = (file_exists('includes/templates/template_default/images/logo.gif')) ? '' : '../';
14 May 2012, 5:01 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: DIR_WS_INCLUDES is pointless

Thank you for your feedback.

The architecture about which you are complaining was inherited.
Changes are already scheduled for a future version.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.