2005-08-18 12:23:59
Bug fix for email footers v15
ATutor version: 1.5
E-mail footers use a php variable defined in '/include/lib/constants.inc.php' called $_base_href to implement the URL of the server/application.
The problem I ran in to was that this pointed to http://localhost/ . If you ran into this same problem, here is the solution I devised.
I first made sure that my Apache server had the right name. One defines that in the httpd.conf file. I then wrote a new variable container that I inserted just after the '$_base_href' one, as follows:
/* added by Jonathan Kaplan for email footers */
$safe_url_parts = explode('/', $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']);
$_base_server = array_slice($safe_url_parts, 0, count($safe_url_parts) - $dir_deep-1);
$_base_server = $server_protocol . implode('/', $_base_server).'/';
Finally I replaced (in the following files) '$_base_href' by '$_base_server':
'/include/classes/phpmailer/atutormailer.class.php'
'/inbox/send_message.php'
Please comment if you have come across the same problem or have found better workarounds. If the problem is to be considered as some sort of a bug, well then I'm sure those that are working on version 1.52 will take this into account :) .