Permalink
Browse files

Define a more realistic public base directory path for scenarios when…

… osCommerce/OM is initially moved outside the public html directory before setup is performed
  • Loading branch information...
1 parent b01de56 commit 5333e5b2ee2728c5fcc795542fe5eb40c53f0f7e @haraldpdl haraldpdl committed Aug 6, 2011
View
@@ -13,6 +13,8 @@
error_reporting(E_ALL | E_STRICT);
+ define('OSCOM_PUBLIC_BASE_DIRECTORY', __DIR__ . '/');
+
require('osCommerce/OM/Core/Autoloader.php');
$OSCOM_Autoloader = new Autoloader('osCommerce\OM');
$OSCOM_Autoloader->register();
@@ -18,6 +18,7 @@
class OSCOM {
const TIMESTAMP_START = OSCOM_TIMESTAMP_START;
const BASE_DIRECTORY = OSCOM_BASE_DIRECTORY;
+ const PUBLIC_BASE_DIRECTORY = OSCOM_PUBLIC_BASE_DIRECTORY;
protected static $_version;
protected static $_request_type;
@@ -56,7 +56,7 @@
$http_cookie_domain = $http_url['host'];
}
- $dir_fs_document_root = realpath(OSCOM::BASE_DIRECTORY . '../../') . '/';
+ $dir_fs_document_root = OSCOM::PUBLIC_BASE_DIRECTORY;
$DL_Cache = new DirectoryListing(OSCOM::BASE_DIRECTORY . 'Work/Cache');
$DL_Cache->setIncludeDirectories(false);

0 comments on commit 5333e5b

Please sign in to comment.