diff --git a/build/debian/README.howto b/build/debian/README.howto index 92397130a3a..1889c7b633e 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -239,7 +239,7 @@ http://packages.qa.debian.org/t/tcpdf.html ##### Create/Maintain dolibarr package -To update dolibarr debian package when upstream version has changed +To update dolibarr debian package when upstream (official version of external project) has changed: * You can git clone debian git repo > git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian] @@ -284,10 +284,10 @@ Then check/modify also the user/date signature: - Name and email must match value into debian/control file (Entry added here is used by next step). -To update dolibarr debian package when only files into debian has changed +To update dolibarr debian package when only files into debian has changed, or if you include manually backport: * Change files and commit. -* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2) +* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...) Once files has been prepared, it's time to test: diff --git a/dev/initdata/generate-facture.php b/dev/initdata/generate-invoice.php similarity index 95% rename from dev/initdata/generate-facture.php rename to dev/initdata/generate-invoice.php index 97f00f7d6d6..321cc6af06a 100755 --- a/dev/initdata/generate-facture.php +++ b/dev/initdata/generate-invoice.php @@ -19,8 +19,8 @@ */ /** - * \file dev/intdata/generate-facture.php - * \brief Script de generation de donnees aleatoires pour les factures + * \file dev/intdata/generate-invoice.php + * \brief Script example to inject random customer invoices (for load tests) */ // Test si mode batch diff --git a/dev/initdata/generate-commande.php b/dev/initdata/generate-order.php similarity index 97% rename from dev/initdata/generate-commande.php rename to dev/initdata/generate-order.php index 785c0544876..6ba813c5135 100755 --- a/dev/initdata/generate-commande.php +++ b/dev/initdata/generate-order.php @@ -20,8 +20,8 @@ */ /** - * \file dev/initdata/generate-commande.php - * \brief Script de generation de donnees aleatoires pour les commandes + * \file dev/initdata/generate-order.php + * \brief Script example to inject random orders (for load tests) */ // Test si mode batch diff --git a/dev/initdata/generate-produit.php b/dev/initdata/generate-product.php similarity index 96% rename from dev/initdata/generate-produit.php rename to dev/initdata/generate-product.php index 6e7ea6dd05f..38c0e755db3 100755 --- a/dev/initdata/generate-produit.php +++ b/dev/initdata/generate-product.php @@ -20,8 +20,8 @@ */ /** - * \file dev/initdata/generate-produit.php - * \brief Script de generation de donnees aleatoires pour les produits + * \file dev/initdata/generate-product.php + * \brief Script example to inject random products (for load tests) */ // Test si mode batch diff --git a/dev/initdata/generate-propale.php b/dev/initdata/generate-proposal.php similarity index 96% rename from dev/initdata/generate-propale.php rename to dev/initdata/generate-proposal.php index b7b76ec2c02..8e17e673b86 100755 --- a/dev/initdata/generate-propale.php +++ b/dev/initdata/generate-proposal.php @@ -20,8 +20,8 @@ */ /** - * \file dev/initdata/generate-propale.php - * \brief Script de generation de donnees aleatoires pour les propales + * \file dev/initdata/generate-proposal.php + * \brief Script example to inject random proposals (for load tests) */ // Test si mode batch diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-thirdparty.php similarity index 97% rename from dev/initdata/generate-societe.php rename to dev/initdata/generate-thirdparty.php index 72e4d9b1e84..9d928db6ac0 100755 --- a/dev/initdata/generate-societe.php +++ b/dev/initdata/generate-thirdparty.php @@ -20,8 +20,8 @@ */ /** - * \file dev/initdata/generate-societe.php - * \brief Script de generation de donnees aleatoires pour les societes + * \file dev/initdata/generate-thirdparty.php + * \brief Script example to inject random thirdparties (for load tests) */ // Test si mode batch diff --git a/dev/initdata/sftpget_and_loaddump.php b/dev/initdata/sftpget_and_loaddump.php index c91ddcc3e17..72a33cf197c 100755 --- a/dev/initdata/sftpget_and_loaddump.php +++ b/dev/initdata/sftpget_and_loaddump.php @@ -15,6 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * or see http://www.gnu.org/ + * + * Get a distant dump file and load it into a mysql database */ $sapi_type = php_sapi_name(); @@ -32,9 +34,10 @@ $error=0; $sourceserver=isset($argv[1])?$argv[1]:''; // user@server:/src/file $password=isset($argv[2])?$argv[2]:''; -$database=isset($argv[3])?$argv[3]:''; -$loginbase=isset($argv[4])?$argv[4]:''; -$passwordbase=isset($argv[5])?$argv[5]:''; +$dataserver=isset($argv[3])?$argv[3]:''; +$database=isset($argv[4])?$argv[4]:''; +$loginbase=isset($argv[5])?$argv[5]:''; +$passwordbase=isset($argv[6])?$argv[6]:''; // Include Dolibarr environment $res=0; @@ -64,7 +67,7 @@ if (preg_match('/^(.*)@(.*):(.*)$/',$sourceserver,$reg)) } if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) { - print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh database loginbase passbase\n"; + print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n"; print "Return code: 0 if success, <>0 if error\n"; print "Warning, this script may take a long time.\n"; exit(-1); @@ -108,14 +111,14 @@ if ($connection) print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n"; ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile); - $fullcommand="cat ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; if (preg_match('/\.bz2$/',$targetfile)) { - $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } if (preg_match('/\.gz$/',$targetfile)) { - $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } print "Load dump with ".$fullcommand."\n"; $output=array(); diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index 6025f6a1f4e..803a6c8b8f5 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -619,17 +619,28 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print ''.\$obj->field1.'';",'/').'/', $varprop, $targetcontent); $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print ''.\$obj->field2.'';",'/').'/', '', $targetcontent); - // LIST_OF_TD_LABEL_FIELDS_CREATE and EDIT - List of td for card view + // LIST_OF_TD_LABEL_FIELDS_CREATE - List of td for card view $varprop="\n"; $cleanparam=''; foreach($property as $key => $prop) { if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) { - $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'';\n"; + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'';\n"; } } $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_CREATE/', $varprop, $targetcontent); + + // LIST_OF_TD_LABEL_FIELDS_EDIT - List of td for card view + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'".$prop['field'].".'\">';\n"; + } + } $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent); // LIST_OF_TD_LABEL_FIELDS_VIEW - List of td for card view diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index 22958c9c833..a85969c53ad 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -281,12 +281,17 @@ if (($id || $ref) && $action == 'edit') // Part to show record -if ($id && (empty($action) || $action == 'view')) +if ($id && (empty($action) || $action == 'view' || $action == 'delete')) { print load_fiche_titre($langs->trans("MyModule")); dol_fiche_head(); + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + print $formconfirm; + } + print ''."\n"; // print ''; // LIST_OF_TD_LABEL_FIELDS_VIEW @@ -310,14 +315,7 @@ if ($id && (empty($action) || $action == 'view')) if ($user->rights->mymodule->delete) { - if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) // We can't use preloaded confirm form with jmobile - { - print '
'.$langs->trans('Delete').'
'."\n"; - } - else - { - print '
'.$langs->trans('Delete').'
'."\n"; - } + print '
'.$langs->trans('Delete').'
'."\n"; } } print ''."\n"; diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 8a00cffb811..e474e1dbfda 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -65,6 +65,7 @@ ALTER TABLE llx_paiement ADD COLUMN ref varchar(30) NOT NULL DEFAULT '' AFTER ro ALTER TABLE llx_socpeople ADD COLUMN photo varchar(255) AFTER skype; +ALTER TABLE llx_user_param MODIFY COLUMN param varchar(255) NOT NULL DEFAULT ''; ALTER TABLE llx_user_param MODIFY COLUMN value text NOT NULL DEFAULT ''; ALTER TABLE llx_expedition ADD COLUMN import_key varchar(14); diff --git a/htdocs/install/mysql/tables/llx_user_param.sql b/htdocs/install/mysql/tables/llx_user_param.sql index 7194d73b4c4..67bce42645a 100644 --- a/htdocs/install/mysql/tables/llx_user_param.sql +++ b/htdocs/install/mysql/tables/llx_user_param.sql @@ -22,7 +22,7 @@ create table llx_user_param ( fk_user integer NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id - param varchar(64) NOT NULL, + param varchar(255) NOT NULL, value text NOT NULL )ENGINE=innodb; @@ -32,4 +32,4 @@ create table llx_user_param -- 1 : first company param -- 2 : second company param -- 3 : etc... --- \ No newline at end of file +--
'.$langs->trans("Label").'