The down merge of outside class smarty vars is now an extra function
that can be called stand alone.
The smarty render function call is also a stand alone function that can
be called from outside
Move all smarty and path settings into the Smarty Extended class
the include files <admin|frontend>_set_paths.php and <admin|frontend>_smarty.php
are deprecated.
For special frontend smarty (which will be not used in future anyway) a
dedicated sub class to Smarty Extended with its own methods should be
created
- use config.other.php to include other none core settings
- fix tab intends for not used defines
- remove old ACL defines that are not needed
- move BASE_NAME out to new area
TODO: think about removing G_TITLE
TODO: think about BASE_NAME external setting
Login class checks if AJAX_PAGE is set to true and then does not print
the login html to the screen directly, but returns it in the _POST array
login_html, _POST action is set to login
It also resets _POST & _GET arrays before hand to avoid any misuese.
All _SESSION array access needs to be checked in any following class as
the _SESSION is unset in this moment
html element should be overwritten with this JS:
document.getElementsByTagName('html')[0].innerHTML =
data.content.login_html;
In master config if there is no site config for this page, bail out.
In the other config pages the strict declare header was missing.
Progress bar inits the progress array with all set to null to avoid
calls on not set index
Basic: recusrive array search has correct parameter declarations &
checks for null/empty/not string
IO: all unset are removed and null or init to array is used to reset
Update for other include pages with some missing default data
- The translation file reader did an isset on a set variable insetad of
checking if the variable is zero and so never started the translation
system
- The DB IO connection not set was wrongly set. If the connection failed
it is not TRUE and else FALSE. There is a new internal method
getConnectionStatus to query this status it returns TRUE/FALSE depending
if the connection failed
- Update the l10n test page with proper translation tests
- init OK
- show current lang/file
- translation test
- switch language test
DB\IO dbReturn method has a third parameter to set read only assoc and
not number data from the query
Install basic composer for trying out psalm
setting phpan/phpstan for basic static checking and do basic clean up on
all of the files
Because .inc style is deprecated and also dangerious as often not setup
correctly on the server all .inc files have been renamed to .php files.
All internall calls have been udpated.
language class needs to have l var set as public
db\io convert encoding function needs to work with false method
parameters as the return can be false and needs a clean pass through in
this case
The base class has now set/get class variable check handlers.
Default they are off and setting undefined variables in a class works as
before.
The flag can be set to throw an error on an unset var but let var still
be set or also surpress setting and unset var.
This can be controlled via setting for the last parameter in class init
or the global var $CLASS_VARIABLE_ERROR_MODE or in the config file the
constant CLASS_VARIABLE_ERROR_MODE (constant > global). Note that if a
global or constant is set the class constructor setting will be
overridden.
Backend/IO/Basic/Login classes are set to be type safe as much as possible if
called from a strict defined php script.
Added random key generator function to the basic class and removed the
random key definitons from the Backend class.
- randomKeyGen
- initRandomKeyLength
Updated the basic bytes to string and string to bytes functions.
Added hrRunningTime method to use the hrtime for precise running time
calculations. Default returns running time in ms. Can be set via
parameter to ns (lowest), ys, ms, s.
The old runningTime method is still there, but it is recommended to use the
hrRunningTime method instead
Removed Error Handling method in Basic, as there is no need for it
there. The is a master one in lib Folder Error.Handling.inc if needed.
Currently Generate/ArrayIO are not 100% type safe [because they are only
used in the edit_base anyway]
- reference save was not 100% correct with isset/empty checks
- more missing fixes in admin_*inc files for non edit_* pages
- non edit page menu build fix
- fix non set smart core vars
- add update SQL for fixing missing cuid in edit_* tables
- ALL classes are E_NOTICE safe as far as possible.
There might be some minor things left over which will be cleaned up in
further testing
- Added declare(strict_types=1); on all pages for trying to make all
calls strict
- Added page_content sub content to edit_page, with this some inner page
content with ACL can be set, eg for use with Ajax/JS calls with backend.
Also alias can be set so the control ajax pages can back reference to
the master page content setting. Currently only one back reference is
allowed
- Note that the PAGES array has no numeric indexes, but uses the cuid as
index
* ACR list has new list at level 10 for listing but not reading/opening
* JS update for the html options create
if select multi allow selected as array for highlight
* Basic Class
- array merge recursive implementation
proper implementation that proper merges nested arrays. With key is
always string override
- array flat per key
For multi arrays flatten down a key -> value entry to set the value to
the level up in the leaf
eg:
foo -> bar -> KEY: value
and you go by KEY as search it will change to
foo -> bar: value