From: Alan Knowles Date: Wed, 2 Dec 2020 06:22:57 +0000 (+0800) Subject: Fix #6494 - translations code for reports X-Git-Url: http://git.roojs.org/?p=Pman.Base;a=commitdiff_plain;h=8056a0c61adbee8988c696bcbef031023dc389b1 Fix #6494 - translations code for reports --- diff --git a/Pman.php b/Pman.php index 84d0a4f..de79ee8 100644 --- a/Pman.php +++ b/Pman.php @@ -864,11 +864,22 @@ class Pman extends HTML_FlexyFramework_Page ksort($arfiles); // just sort by name so it's consistant for serialize.. + // The original idea of this was to serve the files direct from a publicly available 'cache' directory. + // but that doesnt really make sense - as we can just serve it from the session directory where we stick + // cached data anyway. + + /* $compile = empty($ff->Pman['public_cache_dir']) ? 0 : 1; $basedir = $compile ? $ff->Pman['public_cache_dir'] : false; $baseurl = $compile ? $ff->Pman['public_cache_url'] : false; - + */ + $compile = 1; + $basedir = session_save_path(). '/translate-cache/'; + if (!file_exists($basedir)) { + mkdir($basedir,0755); + } + $baseurl = $this->baseURL . '/Admin/Translations'; if (PHP_VERSION_ID < 70000 ) { $lsort = create_function('$a,$b','return strlen($a) > strlen($b) ? 1 : -1;');