New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update seatadmin.php #375

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@HtHNightwolf
Contributor

HtHNightwolf commented Oct 18, 2018

@mbraun81

+1

@andygrunwald

This comment has been minimized.

Collaborator

andygrunwald commented Oct 19, 2018

Sadly, this will not fix the root cause of the HTML_NEWLINE constant.
The constant HTML_NEWLINE is used in many more places. See a code search here: https://github.com/lansuite/lansuite/search?q=HTML_NEWLINE&unscoped_q=HTML_NEWLINE

The constant HTML_NEWLINE is defined here: https://github.com/lansuite/lansuite/blob/master/inc/base/define.php
As you can see, it already has the value <br/> (like you used).

So the root cause seems to be a wrong handling of the constant in PHP-Strings. PHP is not able to replace constants in simple strings. The string has to "opened up".
So the solution to the first sentence would be instead of the original line

array_push($questionarray, t('Sitzplatz für %1 reservierenHTML_NEWLINE(Ein evtl. zuvor für diesen Benutzer reservierter Platz wird freigegeben)', $new_user['username']));

we would need to use

array_push($questionarray, t('Sitzplatz für %1 reservieren' . HTML_NEWLINE . '(Ein evtl. zuvor für diesen Benutzer reservierter Platz wird freigegeben)', $new_user['username']));

Have a detailed look at ' . and . ' around the HTML_NEWLINE constant.
To fix this for the codebase, this needs to be done for the whole codebase.

Let me check if I will have time for this today. If you are faster and motivated to do it, just write here that you are working on this (to avoid double work).

@andygrunwald

This comment has been minimized.

Collaborator

andygrunwald commented Oct 19, 2018

I've got some time for #378.
Please check it out there.

@M4LuZ M4LuZ closed this in db4b61f Oct 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment