etoa / etoa-gui

EtoA Game GUI
https://etoa.ch
GNU Affero General Public License v3.0
10 stars 7 forks source link

Weiter zum Urknall button works now #427

Closed river-etoa closed 2 years ago

river-etoa commented 2 years ago

Admin overview button had wrong URL.

DRAFT

The underlying problem is having a mix between path and query URLs for pages, eg /admin/overview/ and /admin/?page=overview.

In this merge request, the fix is to change the link url of the button from ?page=galaxy&sub=uni to ../?page=galaxy&sub=uni. The .. part strips the /overview/.

However, ideally changes to the ?page get query parameter should automatically change the URL path. Or, even better, everything is converted to path-style URLs or query-style URLs only.

glaubinix commented 2 years ago

Right, until everything in admin has been updated to the Symfony based routing mechanism. Easiest would probably be to add /admin/ to all those broken URLs instead of using ../ as this could easily break in case we move a route

river-etoa commented 2 years ago

Is it ok to assume that /admin/ is always on the root path? Current code seems to work without that assumption.

glaubinix commented 2 years ago

Current code assumes that for the admin tool we always call the PHP files in the htdocs admin folder which are served as /admin/ e.g. /admin/index.php?page=$page. It only works if all the admin PHP files are in the same folder. So I'd say safe to assume

river-etoa commented 2 years ago

moved general problem to #428