pakfire: Refactor dblist seperating UI and logic

- Removed UI code from dblist function and refactor it making it return
  a hash representing the pak db for easier handling of this data.
- Moved core update check in dblist to new seperate dbcoreinfo function
  making it return a hash with current and possibly available core
  version info.
- Update existing calls to dblist
- Bring UI parts previously in dblist to pakfire program itself,
  pakfire.cgi and index.cgi with a few small enhancements:
  - Translations for 'Core-Update', 'Release', 'Update' and 'Version'
  - Add currently installed version numbers to installed paks list in
    pakfire.cgi
  - Add 'Installed: yes/no' to pakfire list output so people not using
    colors have this information too. (Partly fixes Bug #12868)
  - Add update available details to pakfire list output if package has
    updates available.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
This commit is contained in:
Robin Roevens
2022-07-28 13:21:27 +02:00
committed by Peter Müller
parent f201005f46
commit 0bd5b13195
8 changed files with 206 additions and 111 deletions

View File

@@ -577,6 +577,7 @@
'core notice 1' => '<strong>Let op:</strong> Er is een core-update van',
'core notice 2' => 'naar',
'core notice 3' => 'beschikbaar.',
'core update' => 'Core-Update',
'could not be opened' => 'kan niet worden geopend.',
'could not connect to' => 'Kan niet verbinden',
'could not connect to www ipcop org' => 'Kan niet verbinden met www.ipfire.org',
@@ -1690,6 +1691,7 @@
'ovpnsys log' => 'OVPN-Systeem-Log',
'package failed to install' => 'Pakket kon niet worden geïnstalleerd.',
'pagerefresh' => 'Pagina wordt ververst, wacht even a.u.b.',
'pak update' => 'Opwaardering',
'pakfire accept all' => 'Wilt u alle pakketten installeren?',
'pakfire ago' => 'geleden.',
'pakfire available addons' => 'Beschikbare extensies:',
@@ -1817,6 +1819,7 @@
'refresh index page while connected' => 'Ververs de index.cgi pagina terwijl verbonden',
'refresh update list' => 'Ververs update-lijst',
'registered user rules' => 'Talos VRT regels voor geregistreerde gebruikers',
'release' => 'Uitgave',
'released' => 'Released',
'reload' => 'herlaad',
'remark' => 'Opmerking',
@@ -2484,6 +2487,7 @@
'valid root certificate already exists' => 'Er bestaat al een geldig root certificaat.',
'valid till' => 'Geldig tot',
'vci number' => 'VCI nummer:',
'version' => 'Versie',
'view log' => 'bekijk log',
'virtual address' => 'Virtueel adres',
'virtual private networking' => 'Virtual Private Networking',