Topic: LuxCal 5.2.1 - MySQL and SQLite - released 30 May 2022

Highlights

This new LuxCal version 5.2.1 is a special bug-fix release and includes no functional changes. In this version technical issues have been addresses and improved and quite a number of  bugs have been fixed.

As usual, this new release has been tested with the help of John from Denmark. Thank you John!

Hereafter you will find a full summary of all changes since LuxCal version 5.2.0.

Technical issues
• The styles defining the position and height of the calendar's top bar, navigation bar and calendar content are now all calculated. In previous calendar versions the navigation bar position was depending on the previous HTML element, which meant that in case of a PHP message the navigation bar shifted down so that the side menu could not be selected anymore.
• When using PHP 8, sometimes email reminder messages are not HTML formatted. This is due to a PHP change to process (explode) the mail headers. In PHP 7 and before the separator could be either \n or \r\n, in PHP 8 only \r\n will work. Now we made the separator a parameter at the top of the messaging.php file, which will be applied wherever email headers are defined in the code.
• The code for the horizontal scrolling in the matrix views and the gantt view has been re-designed and simplified. In matrix view, the left column rows now always stay aligned with the calendar
    rows, also with many events per day, which causes the height of a day cell to increase.
• In the database table definitions all fields which can be NULL are now set to NOT NULL. This change is needed to avoid conflicts with PHP 8 functions which don't accept the value NULL as parameter anymore.
• The PHP manual warns that some databases, including MySQL, can issue an implicit COMMIT when a CREATE TABLE query is issued within a transaction, which possibly causes the following SQL error: "SQL transaction error: There is no active transaction - Query: commit transaction", when upgrading a calendar. Therefore for the upgrade process the 'START TRANSACTION' and 'COMMIT' statements have been removed.
• When upgrading the calendar and post-processing the Settings table, integer values in the queries are now specified as strings, matching
    the type of the rows in the settings table, which are specified as VARCHAR in the database.
• Because in the stylesheet HTML paragraphs have text-align set to "justify", accidentally also long event titles had their text justified. This has now been rectified.
• The re-direct (header location) to the index.php file, when the cron job is aborted, has been removed because it was not useful.
• For day-marker events, which always apply to full days, the "no time" field is now always set. This avoids the text "all day" to show.
• When uploading thumbnail images, now spaces and quotes are converted to underscores. Before only spaces were converted and a quote in a thumbnail file name caused an SQL error when checking if the thumbnail is in use.
• To prevent existing tables to be initialized with default data when the install script is run more than once, the functions initializing the database tables now only initialize tables that are new (empty). Except the users Public Access and Administrator in the users table, which are always initialized with the latest administrator credentials.
• A relative path to the unifont directory has been defined at the top of the tfpdf.php file so that the calendar is folder-independent and can be moved to any folder without the need to delete the files in the fonts/unifont folder, which are automatically generated (when not present) by the tfddf.php script.
• General cascading style sheet script update.

Bug fixes
• When displaying the user profile, the field name 'number' (now msingID) was used in the SQL query to retrieve the user data from the database and caused an SQL error.
• It was possible on the User Groups page, when editing a group for a user with post rights, to leave all check boxes in the categories "Add" column unchecked. This resulted in a number of PHP warning messages when a user in this group tried to add an event. This has been solved by a validation check for the Add/Edit User Group form, ensuring that at least one "Add" column check box is checked for users with post rights.
• On the Search page, when using an apostrophe in the search text, this resulted in an SQL error. Solved by applying the 'htmlspecialchars' function to the search text before using it in an SQL query.
• On the Settings page, in the section Navigation Bar, it was not possible to have both values 1 and 11 in the same "View buttons on navigation bar" list. Solved.
• The time picker did not automatically close after selecting a time. Solved.
• Multi-day events with "no time" selected were causing a PHP error in both Week and Day view.
•  In past calendar versions, in certain cases, the styles database table could contain each style name twice, which caused an SQL error when upgrading a calendar, because in newer calendar versions the name field is indexed and must be unique.
• On the Edit User Group page, when editing a user group a View check-box for a specific event category is unchecked while the corresponding Add check-box is checked, the Add check-box remained wrongly checked.
• The UI-text "log_answer" => "Tu respuesta", was missing in the Spanish language file.
• The UI-text "sch_calendar" => "Přejít do kalendáře", was 
    missing in the Czech language file.