Language\Encoding::__mbMimeEncode -> Convert\MimeEncode::__mbMimeEncode
Langauge\Encoding::checkConvertEncoding -> Check\Encoding::checkConvertEncoding
Langauge\Encoding::setErrorChar -> Check\Encoding::setErrorChar
Langauge\Encoding::getErrorChar -> Encoding::getErrorChar
Langauge\Encoding::convertEncoding -> Convert\Encoding::convertEncoding
Also fixed encoding check that not only a code point but a string can
also be used as a parameter.
Update phpunit tests and split them out for each class
Normal test page is still combined for all classes but updated to
correctly use each class
Fix missing replace char settings for conversion check call.
The php replace char method was never called. Also add standard type
settings next to char settings.
Return (get) call can either class set or current set in php
Fix mime encode with trailing space problem if length is on split
length. Mime encode uses \r\n for all line breaks now, can be controlled
via parameter
next to the current lang/encoding add locale that is a combination of
both.
Also add a locale folder constant
the default LANG variables (DEFAULT_LANG, SITE_LANG) change from en_utf8
to en_US
new DEFAULT_LOCALE with en_US.UTF-8
Add locale global variable in the format
<lang>_<country>.<encoding>@<suffix>
Default set to en_US.UTF-8
Also remove nested if callse and do early abort/method return for
flatten code:
loginUser
logoutUser
setAcl
printLogin
passwordChange
There was a bug in ther SQL interface class where the folder was just
called "Interface" which is not an allowed Namespace name. Renamed to
SqlInterface
Moved the detect lang/etc function used in Form/Generate,
Template/SmartyExtend and Admin/Backend to Language/GetSettings.
Fixed some test class calls
DB\IO dbReturn also sets internal num_rows, num_fields, field_names so
the normal dbGet* calls can be used after dbReturn call
JAVASCRIPT/STYLESHEET in config.master is now override able from .env
file. Others will follow
ACL\Login and Admin\Backend do not extend DB\IO anymore which was a hold
over from old extend Class\Basic usage.
The old DB_CONFIG parameter has been replaced with DB\IO Object.
Also Admin\Backend has a language class overide loder like ACL\Login
dbVersion only returns nn.n version without any additional info
added new dbVersionNumeric that follows the nnNNnn type of format, eg
90605 or 130006
Added new dbVersionInfo where all the pg_version returned array elements
can be checked. Has a strip override for 'server' version to no strip
additional info
dbVersionInfoParameters returns an array of all possible parameters that
can be called.
Not that if the whole info block is needed pg_version($db->dbGetDbh) is
recommended for now.
Also dbCompareVersion does not call the dbVersion but calls the
functions __dbVersion
There is only open for complex query write calls which are not much
used.
all data dumps from current data in cursor
all the deprecated methods, which we won't test anymore
Async query calls have some additional error checks.
Same for prepared calls (eg missing statement name is now error)
Prepared call also inits cursor to avoid unset array key errors
schema/encoding settings checks more strict with proper error returns.
schema checks in database if schema exists.
encoding just throws error if encoding setting failes. future plan is to
check if given encoding is actually valid
Note that the (string) for pg_escape_string and pg_escape_literal are
forced for phpstan because it thinks this might return false even
thought both function only return string ever
Output\Form\Generate and ACL\Login have DB\IO method call name changes
for pos/num rows methods. Use proper methods and not use the cursor full
return check method
DB\IO:
Switched to new conenction busy check with sockt and timeout loop. So
short blocked and psql error blocked ones are not blocking other calls.
Moved the dbReturn cache read to a separte private method and cleaned up
code for more clear view
Moved all query hash creations to method to simple change hash creatio
if needed. This method can be used for external correct query hash
creation if needed.
Variable name and code block clean up in dbReturn
No data return (dbReturn or dbFetchArray) will change returned data row.
Return as is.
Moved methods around in code to group them together for next stage in
sub class creation (planned)
Renamed dbCursorPos to dbGetCursorPos
and dbCursorNumRows to dbGetCursorNumRows
Work on phpunit tests for DB\IO
uniq id short and long without parametersare pure uid creations so they
have moved over and have been deprecated in the Hash class.
Update Logging class for this.
Update Form\Generate for cursor ext access
DB/SQL/Pgsql:
add __dbConnectionBusySocketWait for testing with loop type and socket
check wait loop for async queries. (TODO)
add parameter query method to supplement current normal query only
function
DB/IO:
Make all class variables private and add needed methods to read them.
Also add method for reset query in case for new calls.
db error/warnings are written to proper history file with timestamp,
source, etc.
Update source (where called) to show the whole method stack.
Move connection OK to method to easy switch to different connection open
for queries check type.
Never use method variable query, instead only use method parameter and
error out on not set.
All core calls reset errors and set error hash id for history.
Bug fix for insert data return array and reset said array every time a
query execution is started and not only if we have some return data to
avoid having wrong (previous query) data for a new query.
Add more error info to all erros where a separate db logging call was
done.:
ACL/Login:
Do not access DB IO cursor variable directly but use method to read
data. Fixes change for hash type
DateTime::dateStringFormat
Add new flag after show microtime to add microtime with . as a float
type instead of string with ms
Uids creation with alder32 and ripedm160 for 8 and 40 char long uids
Support class with new method getCallerMethodList to return an array of
all methods and not only one point reference
Also various clean ups for DB::IO
- fix PGSQL array to PHP
- add bool/literal escape to SQL
- fix literal escape to call correct php array
- move functions to correct place
Add a new long hash type and uniq id long hash.
Also set the default hash (short) and hash long to a public constant
Switch all DB IO from md5 to long hash type so we can easy update
hashing of queries
Move autolaoder loading from config.master.php to config.php and before
we read config.master.php
The read env function has moved into a class and is launched after the
auto loader has been loaded
DB IO class update with better error reporting with last error set and
error history of all errors in order.
TODO: per query or per action error grouping
Move methods around so they are grouped more logically. This is for a
future split out for function groups into sub classes to the main DB IO
class (private classes).
Also add a global variable $DB_CONFIG because setting this as constant
prevents us from override the debug config.
But for this add a third parameter to set debug flag override
Move all session_id and check calls function calls that we have to Session class
In Login class use new false return for session set check
Be sure all session set variables are unset, do extra unset call and
destroy call on close session
Login class does not set GLOBALS anymore (DEBUG_ALL, DB_DEBUG)
Update Logging to check for DEBUG_ALL from SESSION and set DEBUG_ALL on
and PRINT_ALL on.
All logging setting vars are primary via options and only if not set
there fallback to SESSION/GLOBALS and then defaults
DB:IO code for debug flag check has been updated for primary check in
config, then session/globals
Debug update for logging tester for first step to remove Basic class
call.
NOTE: after basic php unit tests are written the clean up for no longer
using Basic class has to start.
Switch to logging class for logging only needs
Various fixes in the logging class for more clear internal flags setting
and clearn up of complex type checks and debug validation checks.
Add basic debugger logging class phpunit checker (based on debug/print
and only very basic for echo)
Other minor fixes and updates (phpunit with inital dead code check)