History of the ZnetDK 4 Mobile versions
z4mglobal variable which is a shorten alias of the
afterhideJS events triggered before and after closing a modal dialog.
onEditcallback functions specified when calling the
znetdkMobile.list.setModal()method, can return
falseto prevent the modal dialog from being opened. So, the modal dialog is opened by the callback function at the appropriate time.
\Convert::toUTF8()method accepts now an optional second parameter named
$fromEncodingto specify the character encoding of the string passed as first parameter. The default value for
LC_LOCALE_ALLconstant for the English, French and Spanish languages in order to increase the chance to target a locale installed on the webserver.
znetdkMobile.form.getInputValue()method now returns an
arraycontaining the multiple selected values of the checkboxes having the same name in a form (i.e the HTML attribute
nameis defined with the same string value for several checkbox elements).
znetdkMobile.action.removeCustomButton()method to remove a custom action button and unregister it from the views.
afterpageloadedevents triggered by the Data List
<ul>element each time a new page of rows is loaded.
\ProfileManager::getProfiles()method now returns the profile's description through the 'description' array key.
\UserSession::hasFullMenuAccess()method to know if logged in user has a full menu access without requesting the database.
\UserSession::getUserEmail()method to get logged in user email without requesting the database.
\UserSession::getUserName()method to get logged in user name without requesting the database.
\UserSession::hasUserProfile()methods to get access to the authenticated user's profiles without requesting the database.
\Convert::toDecimalForDB()method accepts mixed type (
string) for the
$numberparameter. In previous version, an empty string was returned if the specified number was not a string.
nullvalue as argument.
\ProfileManager::storeProfile()method did not return the user profile's internal database identifier once stored.
\Convert::toLocaleDate()method returned a long date instead of a short date with the
intlextension loaded and the
LC_LOCALE_DATE_FORMATconstant set to
\api\Locale::getCurrencySymbol()method returned an incorrect character when the currency symbol was not encoded in UTF-8. Now, if the currency symbol is not encoded in UTF-8, it is decoded from the Windows-1252 character set.
\api\Locale::getThousandsSeparator()method returned a space character which does not match the ASCII space character (value 20 in Hexadecimal).
\Request::getAcceptLanguage()could return a
NULLvalue while the
HTTP_ACCEPT_LANGUAGEserver variable was properly defined.
\Convert::valuesToAnsi()method uses now the Windows-1252 encoding instead of the ISO-8859-1 encoding, in particular to correctly convert the euro character.
\Convert::toUTF8()methods are no longer based on the
utf8_encode()PHP functions for they are deprecated in PHP 8.2.
intlextensions), then an exception is thrown..
\Validator::__construct()method when the
VAL-003exception was thrown because string variable interpolation is deprecated in this version.
\Convert::toDecimalForDB()method while the language of the application was configured with the comma character as thousands separator.
ui-corner-allCSS classes were removed from the
mobilepage layout as they were not used.
znetdkMobile.modal.open()method when the
aftershowevent was triggered.
\General::decrypt(), an exception is now thrown if the
opensslextension is not installed.
\DAO::setDateColumns()to set up the SQL table columns to format according to locale settings when retrieving data rows via
\Response::setCustomContent()method to return custom content (HTML, XML, text, ...) from a controller action in response of an http request.
CFG_ACTIONS_ALLOWED_FOR_WEBSERVICE_USERSparameter. In previous version, only controller's actions named 'download' could be called with the http GET method. This possibility can be particularly useful when a controller action is to be executed from a webcron service.
\UserSession::getCustomValue()methods. When this parameter is set to TRUE (FALSE by default), the custom value is sanitized before being stored in user session or returned from user session.
\General::isPictureTooBig()private method is converted to a public method to check if a photo is too big to be reduced in regards of the available memory in the PHP process. Initially only called by the
\General::reducePictureSize()method to avoid memory allocation error,
\General::isPictureTooBig(), now can be called with a custom $tweakFactor value (set by defaut to 1.65 in previous version of ZnetDK, this value has been increased to 2) before reducing a photo.
\General::reducePictureSize()method no longer returns FALSE on error. Instead, a
ZDKExceptionis thrown ('GEN-003' to 'GEN-006').
CFG_IS_IN_MAINTENANCEparameter to close access to the application. A message is then displayed to inform users that the application is temporarily in maintenance. The
LC_MSG_ERR_MAINTENANCEconstant can be overloaded in the 'locale.php' script of the application to customize the message.
LC_LOCALE_DATE_FORMATmust now conform to that used by the DateTime::format() PHP method. The previous supported format was the one used by the
strftime()PHP function which is deprecated in PHP version 8.1.
CFG_REQUEST_VARIABLE_FILTERING_LEVELparameter. In addition, the
\Request::setVariableFilteringLevel()method accepts the value 'NONE' as parameter to disable value filtering for a specific Http request only.
\Request::setTrimedCharacters()method now returns a boolean value. If the '$trimedCharacters' parameter is not NULL or is not a string then a FALSE value is returned.
controller\Users::notify()method removed as it was not useful.
znetdkMobile.list.loadedCallbackproperty to define a custom function to call after list's rows are fully loaded. This function has two parameters which contain the number of rows loaded and the data page number loaded.
znetdkMobile.list.afterInsertRowCallbackproperty to define a custom function to call after a row has been inserted in a list. This function has one parameter which contains the new inserted list item as a jQuery element. This callback function can be useful for example to set draggable the list item once added to the list.
topspacechangeevent triggered when the space between the top of the view container and the top of the page change, for example when the secondary menu is shown on multiple lines, when a message is displayed through the
znetdkMobile.messages.add()method, or when the "Install the App?" message is cleared.
MainController::getControllerName()method now is able to find a specific controller method amoung multiple modules overloading the same controller.
PDO::ATTR_STRINGIFY_FETCHESoption is now forced to true.
znetdkMobile.form.getInputValue()method returned false and the error message "The input type='undefined' is not supported!" was displayed in the browser's console when an input field was declared in a form without specifying the type attribute. Now, if the type attribute is not specified for an input field, it is considered to be of type "text".
beforeshow) and after (
aftershow) displaying a modal dialog. If the
beforeshowevent handler returns
false, the modal dialog is not displayed.
setCustomValiditymethod) when an input field value is incorrect.
CFG_MOBILE_INSTALL_MESSAGE_DISPLAY_AUTOparameter to enable or disable automatic display of a message to install the application (Add 2 Home Screen). Set to TRUE by default, this value can be changed to
config.phpscript of the application. This message can also be displayed on demand by calling the
znetdkMobile.install.isAppInstalled()methods respectively to know if the application is installable and if it is already installed.
onViewLoadedoptional parameters added to the
znetdkMobile.modal.make()method in order to load in Ajax the modal dialog from the specified ZnetDK view before instantiating it. If the modal dialog already exists in the DOM, it is not loaded again when the method is called next times.
znetdkMobile.serviceWorker.isRegisteredproperty that is set to true once the service worker registration has succeeded.
znetdkMobile.browser.doPhoneCall()method to dial the specified phone number on cell phone.
znetdkMobile.browser.sendSMS()method to open the screen for sending an SMS and pre-fill phone number and message from the specified values passed in parameters.
LC_MSG_ERR_PASSWORD_BADLENGTHPHP constants for customization purpose).
$includeArchivedparameter (set to
TRUEby default) added to the
\UserManager::getUsersHavingProfile()method. When set to
FALSE, archived users are excluded from the returned users.
znetdkMobile.list.beforeInsertRowCallbackproperty to define a custom function to call each time a row is inserted in a list. This function has one parameter which contains the data to display for the row. This data can be modified within the function before displaying the row. This callback function can be useful to format data before row insertion.
znetdkMobile.autocompleteinput field when the previously entered keyword does not match any suggestions.
znetdkMobile.autocompleteinput field can be cached in memory to reduce network traffic. To enable caching, set
znetdkMobile.autocomplete.maxNumberOfCachedItemsto a value greater than zero (set to zero by default). To clear the cache once a suggestion is selected, change the value
'page'is set by default, meaning that cache is kept until user leaves the application).
DAO::store()method with an empty row id value (i.e. '') and the
FALSE(default case), then the SQL statement generated is no longer an
znetdkMobile.messages.add()method were not hidden after the user logged out.
$loginNameis renamed to
\UserManager::getUserProfiles()method because the expected parameter value was the user internal identifier.
znetdkMobile.autocomplete.make()method did not returned a string value.
znetdkMobile.log.e$()function that is not defined when a JS error is detected after a view loading through the
znetdkMobile.ajax.loadView()method (issue in minification of
cache=trueGET parameter is added to the download url.
\General::reducePictureSize()method that resizes a JPEG or PNG picture by specifying a maximum width and height.
CFG_APPLICATION_VERSIONparameter to specify the current application's version (integer value, 1 by default). When this version is set into the
config.phpof the application, the client-side application is automatically reloaded on user's session expiration if the application version on the server-side is higher than the one currently loaded in the user's web browser.
\Convert::binaryToBase64Url()ZnetDK method to convert a binary file content to base64 URL.
\Convert::base64UrlToBinary()ZnetDK method to convert a base64 URL to binary file content.
\Request::setTrimedCharacters()to specify the characters to trim when retrieving the sanitized value of a request parameter. By default, the trimed characters are " \n\r\t\v\x00". This method can be useful to preserve the newline characters of the beginning and the end of a text.
CFG_REQUEST_VARIABLE_FILTERING_LEVELparameter to specify the filtering level applied by default when reading HTTP request variables by calling the
\Request()getter method (i.e
'HIGH'is set by default (PHP
filter_var()function is applied with
FILTER_FLAG_NO_ENCODE_QUOTESoption). Other allowed value is
strip_tags()function is applied and the string '<=' is preserved if exists in the text to filter).
\Request::setVariableFilteringLevel()to change the default value set through the
CFG_REQUEST_VARIABLE_FILTERING_LEVELparameter. Allowed parameters are
znetdkMobile.setInputValue()method now allows to check multiple checkboxes having the same name (generally ended with double brackets, for example
"mycheckboxes"). The values of the checkboxes to check are passed in parameter of the method as an array.
znetdkMobile.getInputValue()method now allows to retrieve as a JS array, the selected values for a
SELECTHTML element set with the
znetdkMobile.getInputValue()method when the input name passed in parameter contains "bracket" symbols.
'z4musers.php') was not properly paginated (same users were displayed several times).
\General::callRemoteAction()method usefull to invoke a controller action exposed as web service by a remote ZnetDK application.
CFG_SQL_TRACE_ENABLEDparameter which traces in the system log all SQL statements executed through the ZnetDK
\UserSession::getUserId()method that returns the user ID of the connected user.
zdk_user_pwd_resetsSQL table for tracing reset password requests. The database schema can be upgraded for applications deployed in a previous version of ZnetDK by executing the following DDL statement:
CREATE TABLE `zdk_user_pwd_resets` (
`email` VARCHAR(100) NOT NULL COMMENT 'Email address',
`request_date_time` DATETIME NOT NULL COMMENT 'Request date time',
`reset_key` VARCHAR(100) NOT NULL COMMENT 'Reset key',
UNIQUE `email` (`email`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci
COMMENT = 'Password reset';
CFG_FORGOT_PASSWORD_ENABLEDparameter to display a link labeled 'Forgot password?' on the login form. When clicked, the ZnetDK modal dialog corresponding to the view
forgotpassword.phpis shown to request a new password from a user email address. This view can be customized by copying it to the
view/folder of the application or a module.
controller\ForgotPasswordclass in charge of displaying the
forgotpassword.phpview when the 'Forgot password?' link is clicked. In addition, the controller processes the requests for getting a new password and for resetting the user's password.
CFG_FORGOT_PASSWORD_REQUEST_TRACE_ENABLEDparameter to trace the
\Response::setFileToDownload()method was not properly displayed by the web browser when it contained accents.
znetdkMobile.setInputValue()method was called for a checkbox element with a non-empty value different than the one set for the checkbox element, it was not unchecked.
profile.php) was displayed in PHP 7.4.
znetdkMobile.messages.ask()method could be executed twice wrongly.
z4musers.phpview were not displayed in bold.
znetdkMobile.header.events.handleHideHeaderOnScroll()method, no extra space
#zdk-anchor-adjustCSS style (bug finally not fixed in version 2.4).
\DAO::remove()method now returns the number of rows removed.
ALTER TABLE zdk_users
ADD user_phone VARCHAR(50) NULL COMMENT 'Phone number' AFTER user_email,
ADD notes VARCHAR(100) NULL COMMENT 'Notes' AFTER user_phone;
znetdkMobile.navigation.clearRowCountFromHorizontalMenuItem()method to clear the counter displayed on the right of the menu item (see
\DAO::doesTableExist()method to check if the table specified as property of the DAO exists or not.
znetdkMobile.header.events.handleHideHeaderOnScroll()method, no extra space is longer added to the page's anchors through the inline
\DAO::remove()with a row ID passed as a parameter while the 'zdk_profile_rows' ZnetDK security SQL table is missing.
znetdkMobile.form.setInputValue()when the value specified for a radio button contained a space character.
znetdkMobile.form.getInputValue()called for a checkbox input wrongly returned the element's value while the checkbox was not checked. Now, an empty string is returned if the checkbox is not checked.
mobile.phppage layout, the title attribute is added to the
#zdk-side-nav-buttonanchor for a better accessibility.
CFG_CHECK_PWD_VALIDITYparameter in order to check the strength of a new password is changed to impose the user to input a minimum of 8 characters with at least 1 uppercase letter, 1 lowercase letter and 1 number.
znetdkMobile.modal.getInnerForm()method to select a specific form in case more than one form exists in the modal dialog.
znetdkMobile.messages.showSnackbar()method to force display of a snackbar message into a specific container (for example a modal dialog).
znetdkMobile.autocomplete.make()method to customize the display of the suggestions.
znetdkMobile.form.setDataModifiedState()method to indicate whether form data are modified or not by a user input. This method is called by the znetdkMobile.form.reset() and
znetdkMobile.form.isModified()method to know if form data have been modified or not by a user input.
znetdkMobile.modal.close()method to check whether the inner form data have been modified or not by a user input. If so, a confirmation is aked to user before closing the modal dialog.
znetdkMobile.messages.ask()method, then the
LC_MSG_ASK_CANCEL_CHANGESphp constant message is displayed as default question.
znetdkMobile.list.setCustomSortCriteria()method with a property named '_default' as sort definition for the sortCriteria parameter, then no sort is applied when this sort field is choosen from the search modal dialog, including if reverse sort has been selected.
znetdkMobile.list) is now suffixed with the view ID. So the sort criteria are no longer applied when a data list, with the same element ID, exists in different "reloaded on display" views (with the 'zdk-viewreload' CSS class).
znetdkMobile.list.setModal()now accepts to be set to false in order to hide the 'Add' action button.
CFG_PAGE_LAYOUTset to 'custom' or 'mobile'), the HTML title attribute is added to the menu item anchor of the navigation menu and is set to menu item label.
znetdkMobile.modal.getInnerForm()method, if more than one form exist in the modal, the first one is now returned instead of a boolean false value.
znetdkMobile.list.searchedKeywordAsJsonproperty. When set to true, extra 'keyword_json' POST parameter is sent to the PHP controller's action on search by keyword, for loading a ZnetDK Mobile Data List (see 'data-zdk-load' HTML5 property). This 'keyword_json' parameter contains each searched keywords in JSON format including the extra properties of the selected keyword suggestions (see 'data-zdk-autocomplete' HTML5 property).
znetdkMobile.form.getInputValue()method passing as parameter an input name matching a <textarea> HTML element.
znetdkMobile.list.refresh()method could be called multiple times on view display when the view was set to be reloaded on each of its displays ('zdk-viewreload' CSS class applied to a HTML element of the view).
znetdkMobile.navigation.addRowCountToHorizontalMenuItem()method call, the horizontal menu items could be displayed on an extra line and so they could hide the view content.
znetdkMobile.listelement, the space was not totally released at the top of the list.
\Response::setFileToDownload()method, the response header Content-Type was not set properly for downloaded pictures when its file extension was in upper case and when the '$downloadedFilename' parameter was not specified.
CFG_AUTOEXEC_LOG_ENABLEDparameter is set to TRUE. Now, the command line executed as background process, the console output and the result code are also traced.
setFocusOnFirstInput()methods now set focus to html textarea and select elements in addition to input elements.
\Request::getUploadedFileInfos(). The error message were as below: count(): Parameter must be an array or an object that implements Countable - ..\engine\core\request.php(351).
CFG_AUTO_MINIFICATION_METHODparameter was set into the 'config.php' of the application, the error message Access to undeclared static property... in ..\dependencies.php on line 164 was displayed on main page loading.
\UserSession::setCustomValue()method, was missing next when retrieving the float number value calling the
znetdkMobile.form.getInputValue()method with a radio button input name as parameter while no radio button was selected. Now, the null value is returned instead and no error message is longer triggered.
CFG_PAGE_LAYOUTparamater is set to 'mobile' into the 'config.php' script of the application. For full documentation, go to the mobile.znetdf.fr website.
\Profilecontroller class to get detailed informations of a user profile through an AJAX call.
\Userscontroller class to get detailed informations of a user through an AJAX call.
\SimpleDAOZnetDK class for selecting and updating a table content in database without the need of declaring a custom DAO class. This new DAO object is perfect for executing simple operations on one SQL table.
CFG_APP_JSparameters set into the 'config.php' application script. These libraries can be CDN libraries hosted out of the machine hosting the ZnetDK application. To set multiple libraries, declare them using a PHP serialized array.
\Securitycontroller class to check through an AJAX call if the user's session has not expired. This controller action can be called for example, before downloading a document for which authentication is required.
\DAO::storemethod with boolean type values set to false for storage in a MySQL table column with an integer datatype.
\MenuManager::addMenuItem()method (case of the
CFG_VIEW_PAGE_RELOADparameter set to TRUE into the 'config.php' of the application).