function clearCache() { global $tpl, $translang, $translate; unlinkFiles('cache2', 'php'); unlinkFiles('cache2/smarty/cache', 'tpl'); unlinkFiles('cache2/smarty/compiled', 'inc'); unlinkFiles('cache2/smarty/compiled', 'php'); }
function clearCache() { global $tpl, $translang, $translationHandler; unlinkFiles('cache2', 'php'); unlinkFiles('cache2/smarty/cache', 'tpl'); unlinkFiles('cache2/smarty/compiled', 'inc'); unlinkFiles('cache2/smarty/compiled', 'php'); unlinkFiles('cache2/captcha', 'jpg'); unlinkFiles('cache2/captcha', 'txt'); $translationHandler->createMessageFiles(); $tpl->redirect('translate.php?translang=' . $translang); }