diff --git a/dev/skeletons/README b/dev/skeletons/README index 32924a36ac640feee0791a85fac3c4ce7420ff08..02a760a53dcd5b4b7e5d8a66d554463287474dcc 100644 --- a/dev/skeletons/README +++ b/dev/skeletons/README @@ -9,7 +9,7 @@ skeleton_*.php to build its generated code. modMyModule.class.php: -Is a sample of module descriptor you can use if you want to build a new module/plugin for +Is a sample of module descriptor that you can use if you want to build a new module/plugin for Dolibarr. @@ -20,11 +20,7 @@ skeleton_page.php: Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI. skeleton_class.class.php: -Is a sample you can use as an example if you need to build a class file to access a new table -required by a Dolibarr development. -However it is better to run the script build_class_from_table.php that accept a table name as a -parameter and will used table description in database and the skeleton_class.class.php file to -generate full code for your class file. -After running this script, the class to access your table (insert a record, update, delete and select) -is directly finished and can be used by your business code. No more coding for accesser on table -is needed with this script as the file is completely generated once. +Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development. +However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file. +After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code. +No more coding is needed to get access to table with this script because the file is completely generated once. diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index f5de8e82f8c6e58ff79d4bce2d4173e496a0d2b2..7dd68e91f7ffeb72b363ac1cdbe746be73a56cd3 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -61,7 +61,7 @@ class Skeleton_Class // extends CommonObject /** * Create object into database * - * @param User $user User that create + * @param User $user User that creates * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, Id of created object if OK */ @@ -102,7 +102,7 @@ class Skeleton_Class // extends CommonObject if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you - // want this action call a trigger. + // want this action calls a trigger. //// Call triggers //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); @@ -133,7 +133,7 @@ class Skeleton_Class // extends CommonObject /** - * Load object in memory from database + * Load object in memory from the database * * @param int $id Id object * @return int <0 if KO, >0 if OK @@ -178,7 +178,7 @@ class Skeleton_Class // extends CommonObject /** * Update object into database * - * @param User $user User that modify + * @param User $user User that modifies * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ @@ -193,7 +193,7 @@ class Skeleton_Class // extends CommonObject //... // Check parameters - // Put here code to add control on parameters values + // Put here code to add a control on parameters values // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."mytable SET"; @@ -213,7 +213,7 @@ class Skeleton_Class // extends CommonObject if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you - // want this action call a trigger. + // want this action calls a trigger. //// Call triggers //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); @@ -246,7 +246,7 @@ class Skeleton_Class // extends CommonObject /** * Delete object in database * - * @param User $user User that delete + * @param User $user User that deletes * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ @@ -262,7 +262,7 @@ class Skeleton_Class // extends CommonObject if (! $notrigger) { // Uncomment this and change MYOBJECT to your own tag if you - // want this action call a trigger. + // want this action calls a trigger. //// Call triggers //include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 9e1d0fd129235f10309baccebafb2c33a24e6be6..521ebf5d26867ebba7aba7b620ba44c91060187e 100755 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -48,7 +48,7 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) if (! $error && ! empty($authentication['entity']) && ! is_numeric($authentication['entity'])) { $error++; - $errorcode='BAD_PARAMETERS'; $errorlabel="Parameter entity must be empty (or filled with numeric id of instance if multicompany module is used)."; + $errorcode='BAD_PARAMETERS'; $errorlabel="The entity parameter must be empty (or filled with numeric id of instance if multicompany module is used)."; } if (! $error) @@ -57,7 +57,7 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) if ($result < 0) { $error++; - $errorcode='ERROR_FETCH_USER'; $errorlabel='A technical error occurs during fetch of user'; + $errorcode='ERROR_FETCH_USER'; $errorlabel='A technical error occurred during fetch of user'; } else if ($result == 0) { diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index b7340ef3e2bc9b223565b8f56fc201df962bac3d..9feedb5777f63b766ae9f013883738e1a9e9118a 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -517,7 +517,7 @@ div.login a:hover { text-decoration:underline; } -img.login, img.printer, img.entity { +img.login, img.printer, img.entity, img.model { padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; margin: 0px 0px 0px 8px; text-decoration: none; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index d8ab2f33920013e2c34c326871fac4dd4d99c797..d8c6eef04429319243c89cf8b7a647360b9c9600 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -576,7 +576,7 @@ div.login a:hover { text-decoration:underline; } -img.login, img.printer, img.entity { +img.login, img.printer, img.entity, img.model { padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; margin: 0px 0px 0px 8px; text-decoration: none; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 78121b403c03a591a33ee4ae5612ed2274ef3c31..b6715014ac92b613a811e617aebc52f0c972c6a7 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -590,7 +590,7 @@ div.login a:hover { text-decoration:underline; } -img.login, img.printer, img.entity { +img.login, img.printer, img.entity, img.model { padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; margin: 0px 0px 0px 8px; text-decoration: none; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index b8470e3c0909622dc330936340151e06fb78ad9d..4b88d9310242177db0aa4e54fa0949ed12b80eff 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -758,7 +758,7 @@ div.login a:hover { text-decoration:underline; } -img.login, img.printer, img.entity { +img.login, img.printer, img.entity, img.model { padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px; margin: 0px 0px 0px 8px; text-decoration: none;