mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
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:
@@ -164,7 +164,7 @@ class Translator extends Util\Singleton
|
|||||||
*/
|
*/
|
||||||
public static function translate($string, $parameters = [], $domain = null, $locale = null)
|
public static function translate($string, $parameters = [], $domain = null, $locale = null)
|
||||||
{
|
{
|
||||||
$translator = self::getInstance();
|
$translator = self::getInstance()->getTranslator();
|
||||||
if (!empty($translator)) {
|
if (!empty($translator)) {
|
||||||
return $translator->trans($string, $parameters, $domain, $locale);
|
return $translator->trans($string, $parameters, $domain, $locale);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -7,7 +7,7 @@ namespace Util;
|
|||||||
*/
|
*/
|
||||||
abstract class Singleton
|
abstract class Singleton
|
||||||
{
|
{
|
||||||
/** @var \Util\Singleton Oggetto istanziato */
|
/** @var \Util\Singleton Oggetti istanziati */
|
||||||
protected static $instance = [];
|
protected static $instance = [];
|
||||||
|
|
||||||
protected function __construct()
|
protected function __construct()
|
||||||
@@ -23,7 +23,7 @@ abstract class Singleton
|
|||||||
{
|
{
|
||||||
$class = get_called_class(); // late-static-bound class name
|
$class = get_called_class(); // late-static-bound class name
|
||||||
|
|
||||||
if (self::$instance[$class] === null) {
|
if (!isset(self::$instance[$class])) {
|
||||||
self::$instance[$class] = new static();
|
self::$instance[$class] = new static();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -453,6 +453,7 @@ function start_datatables() {
|
|||||||
ordering: true,
|
ordering: true,
|
||||||
searching: true,
|
searching: true,
|
||||||
paging: false,
|
paging: false,
|
||||||
|
order: [],
|
||||||
lengthChange: false,
|
lengthChange: false,
|
||||||
scrollY: "50vh",
|
scrollY: "50vh",
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user