No this will not work. You need to keep the paths relative. Do not use full URLs as then if you have a development/test server running, it will take you back to the production site.
If you look at index.php, there is an include("path.php"), which defines the static BASE. If you always inclide path.php from the cwd, your scripts will get BASE, and you can use that for the relative path.
On Tue, 2004-11-09 at 19:33 -0700, Tony Lambregts wrote:
apidb_fullurl() does not give the Full URL go figure..
Change log: fix up the notify for add and delete comment so it gives a proper back link
files changed: addcomment.php deletecomment.php include/incl.php
Index: addcomment.php
RCS file: /home/wine/appdb/addcomment.php,v retrieving revision 1.2 diff -u -r1.2 addcomment.php --- addcomment.php 9 Nov 2004 22:42:12 -0000 1.2 +++ addcomment.php 10 Nov 2004 02:15:50 -0000 @@ -49,7 +49,7 @@ if($email) { $fullAppName = "Application: ".lookupAppName($appId)." Version: ".lookupVersionName($appId, $versionId);
$ms .= apidb_fullurl("appview.php?appId=$appId&versionId=$versionId")."\n";
$ms .= APPDB_ROOT."appview.php?appId=$appId&versionId=$versionId"."\n"; $ms .= "\n"; $ms .= ($current->username ? $current->username : "Anonymous")." added comment to ".$fullAppName."\n"; $ms .= "\n";
Index: deletecomment.php
RCS file: /home/wine/appdb/deletecomment.php,v retrieving revision 1.3 diff -u -r1.3 deletecomment.php --- deletecomment.php 9 Nov 2004 22:42:12 -0000 1.3 +++ deletecomment.php 10 Nov 2004 02:15:50 -0000 @@ -65,7 +65,7 @@ if($email) { $fullAppName = "Application: ".lookupAppName($appId)." Version: ".lookupVersionName($appId, $versionId);
- $ms .= apidb_fullurl("appview.php?appId=$appId&versionId=$versionId")."\n";
- $ms .= APPDB_ROOT."appview.php?appId=$appId&versionId=$versionId"."\n"; $ms .= "\n"; $ms .= ($current->username ? $current->username : "Anonymous")." deleted comment from ".$fullAppName."\n"; $ms .= "\n";
Index: include/incl.php
RCS file: /home/wine/appdb/include/incl.php,v retrieving revision 1.3 diff -u -r1.3 incl.php --- include/incl.php 9 Nov 2004 22:42:13 -0000 1.3 +++ include/incl.php 10 Nov 2004 02:15:51 -0000 @@ -241,6 +241,7 @@ define("STANDARD_NOTIFY_FOOTER","------- You are receiving this mail because: -------\n". "You are an maintainer of this app or an appdb administrator\n". "to change your preverences go to: http://appdb.winehq.org/preferences.php%5Cn"); +define("APPDB_ROOT", "http://appdb.winehq.org/");
?>