diff --git a/lib/classes/Translator.php b/lib/classes/Translator.php index 7ffc3bf77..50dd8e9d1 100644 --- a/lib/classes/Translator.php +++ b/lib/classes/Translator.php @@ -164,7 +164,7 @@ class Translator extends Util\Singleton */ public static function translate($string, $parameters = [], $domain = null, $locale = null) { - $translator = self::getInstance(); + $translator = self::getInstance()->getTranslator(); if (!empty($translator)) { return $translator->trans($string, $parameters, $domain, $locale); } else { diff --git a/lib/classes/Util/Singleton.php b/lib/classes/Util/Singleton.php index 184c0577a..38de2d669 100644 --- a/lib/classes/Util/Singleton.php +++ b/lib/classes/Util/Singleton.php @@ -7,7 +7,7 @@ namespace Util; */ abstract class Singleton { - /** @var \Util\Singleton Oggetto istanziato */ + /** @var \Util\Singleton Oggetti istanziati */ protected static $instance = []; protected function __construct() @@ -23,7 +23,7 @@ abstract class Singleton { $class = get_called_class(); // late-static-bound class name - if (self::$instance[$class] === null) { + if (!isset(self::$instance[$class])) { self::$instance[$class] = new static(); } diff --git a/lib/functions.js b/lib/functions.js index 2bfc460b0..47bd5a677 100644 --- a/lib/functions.js +++ b/lib/functions.js @@ -453,6 +453,7 @@ function start_datatables() { ordering: true, searching: true, paging: false, + order: [], lengthChange: false, scrollY: "50vh", });