From af03ba554f841ee6ca2387b0a7e22d7186a0433d Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Wed, 15 Jan 2014 14:17:29 +0000 Subject: [PATCH] Use config URL instead of THISPAGE THISPAGE is unreliable for CLI cron calls. It was historically used so the admin could figure out which file/page generated the error. But with backtrace support we no longer need it. --- include/class.osticket.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/class.osticket.php b/include/class.osticket.php index 41fe2f20d..dce94a8fe 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -224,12 +224,11 @@ class osTicket { function alertAdmin($subject, $message, $log=false) { //Set admin's email address - if(!($to=$this->getConfig()->getAdminEmail())) - $to=ADMIN_EMAIL; - + if (!($to = $this->getConfig()->getAdminEmail())) + $to = ADMIN_EMAIL; //append URL to the message - $message.="\n\n".THISPAGE; + $message.="\n\n".$this->getConfig()->getBaseUrl(); //Try getting the alert email. $email=null; -- GitLab