Recoding & optimizations 2018
ATTENTION: These changes (from svn version 534) are not compatible with older versions!
Update code to the most recent Dojo Toolkit release
1.13.0
.
Update font-awesome
Update font-awesome to version 4.7.0 with local installation.
(
In this manner is resolved a security browser limitation. )
New .mql file extension
Old file with
.sql
extension are renamed with
.mql
extension.
To upgrade old installation you can use this shell code to rename files:
find /opt/APPLICATION_DIR/htdocs/data -type f -name '*.sql' \
| (while read F; do mv "$F" "${F%%.sql}.mql"; done)
With caution you can use this shell code to replace
.sql
with
.mql
:
sed -i~ 's/\.sql/\.mql/' /opt/APPLICATION_DIR/htdocs/data/* /opt/APPLICATION_DIR/htdocs/data/*/*
default schema dir
The old version mapped the public schema tables from the
.../data/
directory to the schema
public
.
Instead the new versione use
.../data/public
dir.
Consequently the names of the ODT type reports without the schema in the name will have to be renamed by adding the 'public' schema in the front (eg. from 'gruppi' to 'public.gruppi').
Deprecated "F" parameter on HTTP call, substituted with "method" param.
In the first version to call the metods declared in lib/dbms_library was used
F
parameter.
In new version the parameter is replaced with ==param==
To upgrade old applications you must check if
F
parameter was used in the user code!
To manage differentes recordset some year ago was implemented the parameter
name_prefix
(default name was
Default
), used to define alternatives methods like:
- Default_FIELDS
- Default_FIELDS_SELECT
- Default_SELECT_FIELDS
... applied on standard methods FIELDS, FIELDS_DESCR, FIELDS_SELECT, INPUT_SELECT, SELECT, ORDER, WHERE, SELECT_FIELDS, NUMREC, RECORDS, FIND_RECORDS, JOIN_TABLES and DISTINCT.
A best method is to use derived component inherited fron the original, eg.
<%doc>
File /opt/masonsql/htdocs/data/public/sel_autorizzazioni.mql
</%doc>
<%flags>
inherit => 'autorizzazioni.mql'
</%flags>
<%method FIELDS>nome</%method>
<%method SELECT_FIELDS>nome</%method>
<%method FIELDS_DESCR>Nome</%method>to fill in the selection lists
To upgrade old applications you must find all "name_prefix" (with related methods like Default_FIELDS_SELECT, ...) to be replaced with a derived
.mql
component, using
inherit
.
Check in the user code the use of deprecated
@fields_list
array,
father_name_prefix
&
Name_prefix
javascript parametes and
parameter_set_default
function.
Deprecated suffix TABLENAME
The
${field}_TABLENAME
method is replaced with
${field}_FROM
.
The parameters
select_tablename
&
tablename
used in the widgets select.comp, htmlselect.comp, divselect.comp and GenericSelect_FIELD method are replaced with
select_from
&
from
.
The
FieldFilter_tablename
function name is replaced with
FieldFilter_from
.
With caution you can use this shell code to replace
tablename
with
from
:
sed -i~ 's/tablename/from/' /opt/APPLICATION_DIR/htdocs/data/* /opt/APPLICATION_DIR/htdocs/data/*/*
sed -i~ 's/TABLENAME/FROM/' /opt/APPLICATION_DIR/htdocs/data/* /opt/APPLICATION_DIR/htdocs/data/*/*
Using inherited component is not necessary to use different method (FIELDS_SELECT and/or INPUT_SELECT) to create the recordset to fill in the selection list.
To upgrade old applications you must replace
.mql
component (with FIELDS_SELECT method) with the derived component with different method SELECT_FIELDS like deprecated FIELDS_SELECT and SELECT like deprecated INPUT_SELECT.
The widgets (select.comp, htmlselect.comp & divselect.comp) now can use the same recordset; the ambiguities of the old versions have been eliminated!