Bugfix
Fix di un bug relativo alla classe Translator e all'ordinamento di default delle tabelle con Datatables primitivo (Log, ...).
This commit is contained in:
parent
346ac55cba
commit
f17a64a1bd
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -453,6 +453,7 @@ function start_datatables() {
|
|||
ordering: true,
|
||||
searching: true,
|
||||
paging: false,
|
||||
order: [],
|
||||
lengthChange: false,
|
||||
scrollY: "50vh",
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue