many updates

This commit is contained in:
Paul Spenke
2023-07-10 21:27:43 +08:00
parent 249f6b06b5
commit cd9dc85420
29 changed files with 3164 additions and 962 deletions
@@ -42,7 +42,7 @@ class BaseRepository
$this->db = $phpb_db;
// apply the configured prefix to the table set in the superclass and remove non-alphanumeric characters
$this->table = phpb_config('storage.database.prefix') . $this->removeNonAlphaNumeric($this->table);
$this->table = $_ENV['DATABASE_PREFIX'] . $this->removeNonAlphaNumeric($this->table);
}
/**
@@ -48,9 +48,11 @@ class MenuRepository extends BaseRepository implements MenuRepositoryContract
$langMenuPage = [
'id' => $id,
'title' => phpb_trans('languages.'.$pageTranslation->locale),
'lang' => $pageTranslation->locale,
'route' => $pageTranslation->route
'locale' => $pageTranslation->locale,
'route' => $pageTranslation->route,
'selected' => false,
];
if (phpb_current_language() === $pageTranslation->locale) $langMenuPage['selected'] = true;
$menu[] = $langMenuPage;
}
return $menu;