[AppDB] fix situation when AppDB is not at DocumentRoot (patch 2 of 3)

Tony Lambregts tony.lambregts at gmail.com
Sat Jul 23 21:23:35 CDT 2005


These patch are to meant address situations like mine when the AppDB is located
a http://localhost/appdb instead of http://localhost/. These patches can be
applied independatly from my other patches.

Change Log: fix situation when AppDB is not at DocumentRoot.

Files Changed: include/image.php





-------------- next part --------------
Index: include/image.php
===================================================================
RCS file: /home/wine/appdb/include/image.php,v
retrieving revision 1.3
diff -u -r1.3 image.php
--- include/image.php	24 Feb 2005 04:48:42 -0000	1.3
+++ include/image.php	23 Jul 2005 22:29:45 -0000
@@ -2,6 +2,9 @@
 /*************************************/
 /* image and image_resource classes  */
 /*************************************/
+// Offset of AppDB directory from DocumentRoot in httpd.config
+if (!defined("APPDB_OFFSET"))
+    define("APPDB_OFFSET","");
 
 /**
  * Image class for handling screenshot and thumbnail image files.
@@ -21,8 +24,7 @@
      */
     function Image($sRelativePath)
     {
-        $this->file = $_SERVER['DOCUMENT_ROOT'].$sRelativePath;
-       
+        $this->file = $_SERVER['DOCUMENT_ROOT'].APPDB_OFFSET.$sRelativePath;
         $info = @getimagesize($this->file);       
         
         if( empty($info) )


More information about the wine-patches mailing list