diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php
index bc5fd183b..f635e1a14 100644
--- a/e107_handlers/e107_class.php
+++ b/e107_handlers/e107_class.php
@@ -2675,9 +2675,10 @@ class e107
$e_ROOT = realpath(dirname(__FILE__)."/../");
+
if ((substr($e_ROOT,-1) != '/') && (substr($e_ROOT,-1) != '\\') )
{
- $e_ROOT .= (strpos($e_ROOT,':\\')!==false) ? '\\' : '/'; // Should be functioning correctly on both windows and Linux now.
+ $e_ROOT .= DIRECTORY_SEPARATOR; // Should function correctly on both windows and Linux now.
}
define('e_ROOT',$e_ROOT);
diff --git a/e107_handlers/secure_img_handler.php b/e107_handlers/secure_img_handler.php
index 0f3f911bd..95c966d1e 100644
--- a/e107_handlers/secure_img_handler.php
+++ b/e107_handlers/secure_img_handler.php
@@ -54,7 +54,8 @@ class secure_image
$this->THIS_DIR = $imgp;
$this->BASE_DIR = realpath($imgp.'..'.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
$this->HANDLERS_DIRECTORY = $HANDLERS_DIRECTORY;
- $this->IMAGES_DIRECTORY = str_replace('/', DIRECTORY_SEPARATOR, $IMAGES_DIRECTORY);
+ // $this->IMAGES_DIRECTORY = str_replace('/', DIRECTORY_SEPARATOR, $IMAGES_DIRECTORY);
+ $this->IMAGES_DIRECTORY = $IMAGES_DIRECTORY;
$this->MYSQL_INFO = array('db' => $mySQLdefaultdb, 'server' => $mySQLserver, 'user' => $mySQLuser, 'password' => $mySQLpassword, 'prefix' => $mySQLprefix);
}
@@ -136,7 +137,7 @@ class secure_image
}
$code = $this->create_code();
- return "
";
+ return "
";
}
diff --git a/e107_handlers/secure_img_render.php b/e107_images/secimg.php
similarity index 65%
rename from e107_handlers/secure_img_render.php
rename to e107_images/secimg.php
index 9618213ca..afb36fc65 100644
--- a/e107_handlers/secure_img_render.php
+++ b/e107_images/secimg.php
@@ -6,9 +6,6 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
- *
- * $URL$
- * $Id$
*/
/* Example Custom secure_image_custom.php file:
@@ -27,7 +24,19 @@
// error_reporting(E_ALL);
define('e107_INIT', true);
-require_once(realpath(dirname(__FILE__)."/secure_img_handler.php"));
+define('e_BASE',realpath("..".DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR);
+@include(e_BASE.'e107_config.php');
+if(!isset($mySQLserver))
+{
+ if(defined('e_DEBUG'))
+ {
+ echo "FAILED TO LOAD ".e_BASE."e107_config.php in secimg.php";
+ }
+ exit;
+}
+
+
+require_once(realpath(e_BASE.$HANDLERS_DIRECTORY.DIRECTORY_SEPARATOR."secure_img_handler.php"));
$sim = new secure_image();