even more language migration/fixing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -39,7 +39,6 @@ use Froxlor\UI\Panel\UI;
|
||||
use Froxlor\UI\Request;
|
||||
use Froxlor\UI\Response;
|
||||
use Froxlor\Validate\Validate;
|
||||
use PDO;
|
||||
|
||||
class Ajax
|
||||
{
|
||||
|
||||
@@ -70,6 +70,13 @@ class Language
|
||||
}
|
||||
}
|
||||
|
||||
// shortcut for identifier with => [title, description]
|
||||
if (!isset(self::$lng[$identifier]) && isset(self::$lng[$identifier . '.title'])) {
|
||||
return [
|
||||
'title' => vsprintf(self::$lng[$identifier . '.title'] ?? $identifier, $arguments),
|
||||
'description' => vsprintf(self::$lng[$identifier . '.description'] ?? $identifier, $arguments),
|
||||
];
|
||||
}
|
||||
// search by identifier
|
||||
return vsprintf(self::$lng[$identifier] ?? $identifier, $arguments);
|
||||
}
|
||||
|
||||
@@ -84,20 +84,6 @@ class User
|
||||
return $returnval;
|
||||
}
|
||||
|
||||
public static function getLanguages()
|
||||
{
|
||||
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_LANGUAGE . "` ");
|
||||
$languages_array = [];
|
||||
|
||||
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if (!isset($languages_array[$row['language']]) && !in_array($row['language'], $languages_array)) {
|
||||
$languages_array[$row['language']] = html_entity_decode($row['language']);
|
||||
}
|
||||
}
|
||||
|
||||
return $languages_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function which updates all counters of used resources in panel_admins and panel_customers
|
||||
*
|
||||
|
||||
@@ -35,6 +35,7 @@ if (!file_exists('./userdata.inc.php')) {
|
||||
die();
|
||||
}
|
||||
require_once dirname(__DIR__) . '/lib/userdata.inc.php';
|
||||
require_once dirname(__DIR__) . '/lib/functions.php';
|
||||
require_once dirname(__DIR__) . '/lib/tables.inc.php';
|
||||
|
||||
// Return response
|
||||
|
||||
Reference in New Issue
Block a user