From bce8296e052a80a3f17d78d286420dcf8845f43a Mon Sep 17 00:00:00 2001
From: JediKev <kevin@enhancesoft.com>
Date: Wed, 23 Oct 2019 09:16:26 -0500
Subject: [PATCH] i18n: KnowledgeBase JS

In 5120, the reporting party also mentioned that they receive an error of
`script '/xxx/osTicket/kb/ajax.php' not found or unable to stat`.  This is
due to the AJAX call being inside the KB directory, and `/kb/ajax.php` truly
does not exist. This adds `ROOT_PATH` to the beginning of the AJAX call so
that no matter where it is, it will point to the correct location.
---
 include/client/footer.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/client/footer.inc.php b/include/client/footer.inc.php
index 85d778bb7..840c3301a 100644
--- a/include/client/footer.inc.php
+++ b/include/client/footer.inc.php
@@ -12,7 +12,7 @@
 </div>
 <?php
 if (($lang = Internationalization::getCurrentLanguage()) && $lang != 'en_US') { ?>
-    <script type="text/javascript" src="ajax.php/i18n/<?php
+    <script type="text/javascript" src="<?php echo ROOT_PATH; ?>ajax.php/i18n/<?php
         echo $lang; ?>/js"></script>
 <?php } ?>
 <script type="text/javascript">
-- 
GitLab