Jump to content
Sign in to follow this  
René H4

Change from viariable to fixed pathnames

Recommended Posts

Hi, I am debugging a fault in a script.

The script is written for the official version of OSc. I use Frozen, so I think these lines need to be changed?

    if(!file_exists(DIR_FS_CATALOG . DIR_WS_MODULES .'payment/'. $payment . '.php'))


  require_once(DIR_FS_CATALOG . DIR_WS_MODULES .'payment/'. $payment . '.php');

To what exactly? I can't figure out.

Share this post

Link to post
Share on other sites

I believe that it's

    if (!file_exists(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php'))


  require_once(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php');

Here's the commit.  It says that the following were removed

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

So anything with DIR_WS_MODULES should be replaced with 'includes/modules/' and then you can concatenate neighboring strings. 

DIR_FS_CATALOG and $payment should stay the same.  If you continue to have trouble, try replacing $payment with $GLOBALS['payment'] and output both (either to log or screen; preferably log if a live site). 

Always back up before making changes.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this