From 6d83882a5d355b0c3b6a09a4e8047ff039e5505f Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 8 Jul 2014 09:00:41 +0200 Subject: [PATCH 01/59] FIX : Bad rank when a bill was made by multiple orders --- htdocs/commande/orderstoinvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 5ea4e5b72cb..7411d3a9368 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -285,7 +285,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) 'HT', 0, $product_type, - $lines[$i]->rang, + $ii, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, From 0598bb611429f53d8cf2d05ab312f2b61f05f73b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:21:32 +0200 Subject: [PATCH 02/59] Fix: travis file for 3.5 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96395a4b32f..26e09482f80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,10 +88,6 @@ script: - date - php upgrade.php 3.4.0 3.5.0 > upgrade.log - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - - php upgrade.php 3.5.0 3.6.0 >> upgrade.log - - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log - - php upgrade.php 3.6.0 3.7.0 >> upgrade.log - - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log # - cat upgrade.log # - cat upgrade2.log - cd ../.. From 3f23b116c6a5f58d4fad3b9b1f0acb8408066382 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:44:54 +0200 Subject: [PATCH 03/59] =?UTF-8?q?[=20bug=20#1522=20]=20Liste=20des=20propo?= =?UTF-8?q?sitions=20commerciales=20non=20filt=C3=A9e=20depuis=20un=20proj?= =?UTF-8?q?et?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.formprojet.class.php | 7 ++++--- htdocs/projet/element.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index b3228278261..7b8eefdbbae 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -164,9 +164,10 @@ class FormProjets * Build Select List of element associable to a project * * @param string $table_element Table of the element to update + * @param int $socid socid to filter * @return string The HTML select list of element */ - function select_element($table_element) + function select_element($table_element,$socid=0) { global $conf; @@ -193,8 +194,8 @@ class FormProjets $sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " WHERE ".$projectkey." is null"; - if (!empty($this->societe->id)) { - $sql.= " AND fk_soc=".$this->societe->id; + if (!empty($socid)) { + $sql.= " AND fk_soc=".$socid; } $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC"; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 88330819349..4075113d625 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -216,7 +216,7 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); - $selectList=$formproject->select_element($tablename); + $selectList=$formproject->select_element($tablename,$project->societe->id); if ($selectList<0) { setEventMessage($formproject->error,'errors'); } From 7d77772820307ada5407807da695f63514b00b71 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:45:59 +0200 Subject: [PATCH 04/59] changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index cfe4950e2f1..502cbc40536 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,7 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From ff5ea31452e1796ba2022cf73915e42f417d2139 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 12:40:30 +0200 Subject: [PATCH 05/59] Fix: Date error --- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 9bcb450bb44..fb1deb610c5 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -331,7 +331,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index bf844b8c766..f5532934b35 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -567,7 +567,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 68c6c505b65..da1aa858535 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -336,7 +336,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 3da1b2003ec..9ae11b015f8 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -347,7 +347,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 From b9df48d48c72558aff58d826158e42fc6cb774c3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 15:53:31 +0200 Subject: [PATCH 06/59] Fix http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50854-multi-societe-options-cookies --- htdocs/core/class/cookie.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index a45aaeb2423..39d27d9a332 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -91,7 +91,9 @@ class DolCookie $num = (count($this->cookiearray) - 2); for ($f = 0; $f <= $num; $f++) { - $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + if (!empty($this->myKey)) { + $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + } } return(base64_decode($this->myValue)); From 78ce6c0b1cf25fe75f8920e951dbe56d79960eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 19:57:51 +0200 Subject: [PATCH 07/59] Added labels on form elements for company creation --- htdocs/core/class/html.formcompany.class.php | 2 +- htdocs/societe/soc.php | 137 +++++++++++-------- 2 files changed, 82 insertions(+), 57 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 7728080c01b..6f868dd81c8 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -453,7 +453,7 @@ class FormCompany if ($resql) { $out.= '
'; - $out.= ''; if ($country_codeid) $out.= ''; $num = $this->db->num_rows($resql); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index a0eec6ffbc8..1308ba24f52 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -772,11 +772,15 @@ else print '
'; print $langs->trans("ThirdPartyType").':     '; print '
'; - print ' '.$langs->trans("Company/Fundation"); + print ''; + print ''; print '     '; - print ' '.$langs->trans("Individual"); + print ''; + print ' '; + print $langs->trans("Individual"); print ' ('.$langs->trans("ToCreateContactWithSameName").')'; print '
'; print "
\n"; @@ -800,7 +804,10 @@ else // Name, firstname if ($object->particulier || $private) { - print ''.$langs->trans('LastName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''.$langs->trans('Prefix').''; @@ -809,8 +816,11 @@ else } else { - print ''.$langs->trans('ThirdPartyName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1 { print ''.$langs->trans('Prefix').''; } @@ -819,9 +829,10 @@ else // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''.$langs->trans('FirstName').''; + print ''; + print ''; print ' '; - print ''.$langs->trans("UserTitle").''; + print ''; print $formcompany->select_civility($object->civility_id).''; print ' '; } @@ -835,11 +846,11 @@ else print ''; print ''; - print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; print ''; $s=$modCodeClient->getToolTip($langs,$object,0); print $form->textwithpicto('',$s,1); @@ -853,11 +864,11 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -883,40 +895,44 @@ else print ''; // Zip / Town - print ''; // Country - print ''; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Email web - print ''; + print ''; + print ''; print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -948,9 +964,9 @@ else print ''; - print ''; + print ''; print ''; // Legal Form - print ''; + print ''; print ''; // Capital - print ''; + print ''; // Local Taxes @@ -1037,7 +1054,7 @@ else */ if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1047,7 +1064,7 @@ else { // Assign a Name print ''; - print ''; + print ''; print ''; @@ -1063,7 +1080,7 @@ else // Ajout du logo print ''; - print ''; + print ''; print ''; @@ -1257,12 +1274,13 @@ else print '
'; $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); print $form->textwithpicto('',$s,1); @@ -873,7 +884,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; - print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); + print '
'; + print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; - if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'state_id'); + print '
'; + if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code); else print $countrynotdefined; print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print ''.$langs->trans('VATIntra').''; - $s = ''; + $s = ''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -988,7 +1004,7 @@ else print '
'.$langs->trans('JuridicalStatus').'
'; if ($object->country_id) { @@ -1001,7 +1017,8 @@ else print '
'.$langs->trans('Capital').' '; + print '
'; print ''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language(($object->default_lang?$object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1); print '
'.$langs->trans("AllocateCommercial").''; $form->select_users((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default print '
'.$langs->trans("Logo").''; print ''; print '
'; // Name - print ''; + print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; } @@ -1283,18 +1301,18 @@ else if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print ''; print ''; print ''; - print '
'.$langs->trans('ThirdPartyName').'
'.$langs->trans("Prefix").''; + print '
'; // It does not change the prefix mode using the auto numbering prefix if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { @@ -1271,7 +1289,7 @@ else } else { - print ''; + print ''; } print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '"; + print ""; print '\n"; $var=!$var; - print ""; + print ""; print '\n"; @@ -589,20 +589,20 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; + print ""; print '
'; if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; } else if ($object->codeclient_modifiable()) { - print ''; + print ''; } else { @@ -1315,18 +1333,18 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -1359,14 +1378,14 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -1374,24 +1393,29 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // EMail / Web - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -1424,9 +1448,9 @@ else print ''; // VAT Code - print ''; + print ''; print ''; - print ''; // Capital - print ''; + print ''; + print ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1539,7 +1564,7 @@ else // Logo print ''; - print ''; + print ''; print ''; print "
'; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; } else if ($object->codefournisseur_modifiable()) { - print ''; + print ''; } else { @@ -1344,7 +1362,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; + print '
'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,$object->country_code); print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'.$langs->trans('VATIntra').''; - $s =''; + $s =''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -1513,17 +1537,18 @@ else if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('JuridicalStatus').''; + print '
'; print $formcompany->select_juridicalstatus($object->forme_juridique_code,$object->country_code); print '
'.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language($object->default_lang,'default_lang',0,0,1); print '
'.$langs->trans("Logo").''; if ($object->logo) print $form->showphoto('societe',$object,50); $caneditfield=1; From 8a3fbf953316eb0604d74074bd21a41c6c322427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 20:04:18 +0200 Subject: [PATCH 08/59] Mutualized common code --- htdocs/societe/soc.php | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 1308ba24f52..aad647ec649 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -802,30 +802,23 @@ else print ''; // Name, firstname + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - print ''; } else { - print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1 - { - print ''; - } - print ''; } + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + { + print ''; + } + print ''; + // If javascript on, we show option individual if ($conf->use_javascript_ajax) { From 1ab938895b3b52cbbb4f4dfe0a9f488cf7d57b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 20:05:45 +0200 Subject: [PATCH 09/59] Added autofocus to name on company creation --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index aad647ec649..f5c1237ef05 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -812,7 +812,7 @@ else print ''; } print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; From c1bfe0f6c5f3bf2a9f24ce245ddc5f27d121e768 Mon Sep 17 00:00:00 2001 From: juanjo Date: Fri, 11 Jul 2014 22:00:41 +0200 Subject: [PATCH 10/59] Update ChangeLog: Remove add_photo_web() --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ccf88d47270..b7fff144efe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -108,6 +108,7 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f So check that return value is 0 to keep default standard behaviour after hook or 1 to disable default standard behaviour. - Properties "civilite_id" were renamed into "civility_id". +- Remove add_photo_web() that is ot used anymore by core code. From f1853c435b99da33b54794dc293449acefff94ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 12 Jul 2014 12:04:39 +0200 Subject: [PATCH 11/59] More labels and autofocus for thirdparty and contact forms --- htdocs/contact/fiche.php | 114 +++++++++++-------- htdocs/core/class/html.formcompany.class.php | 4 +- htdocs/societe/soc.php | 77 +++++++------ 3 files changed, 112 insertions(+), 83 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 0d8a26cf81f..4f793fe8538 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -439,42 +439,45 @@ else print '
'; if ($object->particulier || $private) { - print '
'; print ''; - print ''.$langs->trans('Prefix').'
'; print ''; - print ''.$langs->trans('Prefix').'
'.$langs->trans('Prefix').'
'.$langs->trans('Prefix').'
'; // Name - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { if ($socid > 0) { - print ''; + print ''; print ''; - print ''; + print ''; print ''; } else { - print ''; } } // Civility - print ''; - print ''; + print ''; + print ''; $colspan=3; if ($conf->use_javascript_ajax && $socid > 0) $colspan=2; // Address if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; + print ''; + print ''; if ($conf->use_javascript_ajax && $socid > 0) { @@ -490,13 +493,13 @@ else // Zip / Town if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; // Country - print ''; @@ -504,7 +507,7 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -539,16 +548,18 @@ else print ''; // Instant message and no email - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; @@ -570,7 +581,7 @@ else print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $objsoc->getNomUrl(1); print '
'.$langs->trans("Company").''; + print '
'; print $form->select_company($socid,'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(GETPOST("civility_id",'alpha')?GETPOST("civility_id",'alpha'):$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((GETPOST("zipcode")?GETPOST("zipcode"):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((GETPOST("town")?GETPOST("town"):$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country((GETPOST("country_id",'alpha')?GETPOST("country_id",'alpha'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; if ($object->country_id) { print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_id'); @@ -518,19 +521,25 @@ else // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("Email").'email).'">
email).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'
'.$langs->trans("IM").'jabberid).'">
jabberid).'">
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0); print '
'; // Date To Birth - print ''; - print ''; + print ''; } else { - print ''; + print ''; } print ''; @@ -664,13 +675,15 @@ else print ''; // Lastname - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; + print ''; print ''; @@ -678,15 +691,16 @@ else } // Civility - print ''; - print ''; + print ''; + print ''; // Address - print ''; + print ''; + print ''; $rowspan=3; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; @@ -696,13 +710,13 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -710,20 +724,25 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Phone - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); @@ -737,10 +756,12 @@ else print ''; // Jabberid - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -751,23 +772,24 @@ else // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; // Note Public - print ''; // Note Private - print ''; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6f868dd81c8..183f713aa96 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -374,7 +374,7 @@ class FormCompany $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $out.= ''; $num = $this->db->num_rows($resql); $i = 0; @@ -772,7 +772,7 @@ class FormCompany $maxlength=$formlength; if (empty($formlength)) { $formlength=24; $maxlength=128; } - $out = ''; + $out = ''; return $out; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f5c1237ef05..7ca032cf422 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -805,14 +805,14 @@ else print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; @@ -831,7 +831,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; @@ -883,7 +884,8 @@ else } // Address - print ''; @@ -912,7 +914,8 @@ else // Email web print ''; print ''; - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) @@ -934,16 +937,17 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { + $key='idprof'.$i; + if (($j % 2) == 0) print ''; $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; if(empty($conf->global->$idprof_mandatory)) - print ''; if (($j % 2) == 1) print ''; $j++; @@ -953,7 +957,7 @@ else if ($j % 2 == 1) print ''; // Assujeti TVA - print ''; + print ''; print ''; @@ -987,11 +991,11 @@ else print ''; // Type - Size - print ''; - print ''; @@ -1268,7 +1272,7 @@ else // Name print ''; - print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -1288,7 +1292,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; // Address - print ''; @@ -1417,16 +1423,17 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; + $key='idprof'.$i; - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - if(empty($conf->global->$idprof_mandatory)) - print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if(empty($conf->global->$idprof_mandatory)) + print ''; if (($j % 2) == 1) print ''; $j++; @@ -1436,7 +1443,7 @@ else if ($j % 2 == 1) print ''; // VAT payers - print ''; @@ -1474,7 +1481,7 @@ else //TODO: Place into a function to control showing by country or study better option if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { - print ''; - print ''; From 94bcb0dc40bcbf8ec2be111be4b586bec24b2be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 12 Jul 2014 14:45:09 +0200 Subject: [PATCH 12/59] Labels and autofocus for company card forms --- htdocs/admin/company.php | 146 +++++++++---------- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formcompany.class.php | 4 +- htdocs/core/class/html.formother.class.php | 2 +- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f136c1200cf..c69f269f301 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -300,74 +300,74 @@ if ($action == 'edit' || $action == 'updateedit') print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; // Country $var=!$var; - print ''."\n"; $var=!$var; - print ''."\n"; $var=!$var; - print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; // Web $var=!$var; - print ''; + print ''; print ''."\n"; // Barcode if (! empty($conf->barcode->enabled)) { $var=!$var; - print ''; + print ''; print ''; } // Logo $var=!$var; - print ''; + print ''; // Capital $var=!$var; - print ''; + print ''; // Forme juridique $var=!$var; - print ''; print '
'.$langs->trans("DateToBirth").''; + print '
'; $form=new Form($db); if ($object->birthday) { @@ -582,14 +593,14 @@ else } print ''.$langs->trans("Alert").': '; + print ': '; if ($object->birthday_alert) { - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(isset($_POST["civility_id"])?$_POST["civility_id"]:$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'state_id'); print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("EMail").'email).'">
email).'">
'.$langs->trans("Jabberid").'jabberid).'">
jabberid).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,$object->priv,0); print '
'.$langs->trans("NotePublic").''; + print '
'; $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'.$langs->trans("NotePrivate").''; + print '
'; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'; if ($object->particulier || $private) { - print ''; + print ''; } else { - print ''; + print ''; } print ''.$langs->trans('Prefix').'
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''; @@ -870,7 +871,7 @@ else } // Status - print '
'.$langs->trans('Status').''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); print '
'.$langs->trans('Address').'
'.$langs->trans('Web').'
'.$idprof.''; + print ''; else - print ''.$idprof.''; + print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print '
'.$langs->trans("ThirdPartyType").''."\n"; + print '
'."\n"; print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''; @@ -1361,12 +1366,13 @@ else } // Status - print '
'.$langs->trans("Status").''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status); print '
'.$langs->trans('Address').'
'.$idprof.''; - else - print ''.$idprof.''; + if (($j % 2) == 0) print '
'; + else + print ''; + + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').''; + print '
'; print $form->selectyesno('assujtva_value',$object->tva_assuj,1); print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1483,7 +1490,7 @@ else print ''; } - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print ''; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if (! isOnlyOneLocalTax(2)) { @@ -1496,7 +1503,7 @@ else } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1509,7 +1516,7 @@ else } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if(! isOnlyOneLocalTax(2)) { @@ -1521,11 +1528,11 @@ else } // Type - Size - print '
'.$langs->trans("ThirdPartyType").''; + print '
'; print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - print '
'; + print '
'.$langs->trans("CompanyAddress").''; - print '
'; + print '
'.$langs->trans("CompanyZip").''; - print '
'; + print '
'.$langs->trans("CompanyTown").''; - print '
'; + print '
'.$langs->trans("Country").''; + print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation print $form->select_country($mysoc->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans("State").''; + print '
'; $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id'); print '
'.$langs->trans("CompanyCurrency").''; + print '
'; print $form->selectCurrency($conf->currency,"currency"); print '
'.$langs->trans("Phone").''; - print '
'; + print '
'.$langs->trans("Fax").''; - print '
'; + print '
'.$langs->trans("EMail").''; - print '
'; + print '
'.$langs->trans("Web").''; - print '
'; + print '
'.$langs->trans("Gencod").''; - print '
'; + print '
'.$langs->trans("Logo").' (png,jpg)'; + print ''; print ''; + print ''; print ''; print '
'; - print ''; + print ''; print ''; if (! empty($mysoc->logo_mini)) { @@ -387,8 +387,8 @@ if ($action == 'edit' || $action == 'updateedit') // Note $var=!$var; - print '
'.$langs->trans("Note").''; - print '
'; + print '
'; @@ -404,17 +404,17 @@ if ($action == 'edit' || $action == 'updateedit') // Managing Director(s) $var=!$var; - print '
'.$langs->trans("ManagingDirectors").''; - print '
'; + print '
'.$langs->trans("Capital").''; - print '
'; + print '
'.$langs->trans("JuridicalStatus").''; + print '
'; if ($mysoc->country_code) { print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$mysoc->country_code); @@ -429,10 +429,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId1",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -445,10 +445,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId2",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -461,10 +461,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId3",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -477,10 +477,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId4",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -493,10 +493,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId5",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -509,10 +509,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId6",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -523,8 +523,8 @@ if ($action == 'edit' || $action == 'updateedit') // TVA Intra $var=!$var; - print '
'.$langs->trans("VATIntra").''; - print ''; + print '
'; + print ''; print '
'; @@ -539,7 +539,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print '
'.$langs->trans("FiscalMonthStart").''; + print '
'; print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',1) . '
"; @@ -555,19 +555,19 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print "
'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if(! isOnlyOneLocalTax(1)) { - print ''; - print ''; @@ -610,10 +610,10 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->trans("LTRate").': '; + print '
: '; $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); } print '
'.$langs->trans("CalcLocaltax").': '; + print '
'.$langs->trans("CalcLocaltax").': '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print '
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -633,19 +633,19 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); - print ''; } - print ''; @@ -653,10 +653,10 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '\n"; $var=!$var; - print ""; + print ""; print '\n"; @@ -994,10 +994,10 @@ else $var=true; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LTRate").': '; + print '
: '; if(! isOnlyOneLocalTax(2)) { $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); print '
'.$langs->trans("CalcLocaltax").': '; + print '
: '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print '
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; @@ -959,19 +959,19 @@ else $var=true; $var=!$var; - print "
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) @@ -1022,10 +1022,10 @@ else print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -1045,10 +1045,10 @@ else $var=true; $var=!$var; - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) @@ -1074,10 +1074,10 @@ else print "\n"; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d1b338176a4..8dfe80368e9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3306,7 +3306,7 @@ class Form if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite - $out.= ''; foreach ($langs->cache_currencies as $code_iso => $currency) { if ($selected && $selected == $code_iso) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 183f713aa96..fd7db5fa94f 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -782,7 +782,7 @@ class FormCompany * * @param int $local LocalTax * @param int $selected Preselected value - * @param varchar $htmlname HTML select name + * @param string $htmlname HTML select name * @return void */ function select_localtax($local, $selected, $htmlname) @@ -798,7 +798,7 @@ class FormCompany if (count($valors) > 1) { //montar select - print ''; while ($i <= (count($valors))-1) { if ($selected == $valors[$i]) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index f51cf060af8..ab924d482a7 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -760,7 +760,7 @@ class FormOther $montharray = monthArray($langs); // Get array - $select_month = ''; if ($useempty) { $select_month .= ''; From 0c8765bfe3f58fac55f3a5a73b9f8b6fcdf91c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 14:56:22 +0200 Subject: [PATCH 13/59] Updated vagrant box --- dev/vagrant/README.md | 21 +- dev/vagrant/dolibarrdev/Vagrantfile | 25 +- dev/vagrant/dolibarrdev/puphpet/config.yaml | 20 +- .../dolibarrdev/puphpet/files/dot/.gitignore | 5 +- .../puphpet/files/startup-always/empty | 0 .../puphpet/files/startup-once/empty | 0 .../dolibarrdev/puphpet/puppet/manifest.pp | 45 ++-- .../puppet/parser/functions/hash_key_true.rb | 42 ++++ .../puppet/modules/puphpet/manifests/hhvm.pp | 26 +- .../modules/puphpet/manifests/python/pip.pp | 22 ++ .../puppet/modules/supervisord/.fixtures.yml | 8 +- .../puppet/modules/supervisord/.travis.yml | 23 +- .../puppet/modules/supervisord/Changelog | 63 +++++ .../puppet/modules/supervisord/Gemfile | 28 ++- .../puppet/modules/supervisord/Modulefile | 2 +- .../puppet/modules/supervisord/README.md | 54 ++++- .../puppet/modules/supervisord/Rakefile | 25 +- .../lib/puppet/parser/functions/array2csv.rb | 2 - .../lib/puppet/parser/functions/hash2csv.rb | 2 - .../modules/supervisord/manifests/config.pp | 26 +- .../supervisord/manifests/eventlistener.pp | 70 +++++- .../supervisord/manifests/fcgi_program.pp | 69 +++++- .../modules/supervisord/manifests/group.pp | 14 +- .../modules/supervisord/manifests/init.pp | 74 +++++- .../modules/supervisord/manifests/install.pp | 6 +- .../modules/supervisord/manifests/params.pp | 22 +- .../modules/supervisord/manifests/pip.pp | 8 +- .../modules/supervisord/manifests/program.pp | 68 +++++- .../modules/supervisord/manifests/reload.pp | 21 ++ .../modules/supervisord/manifests/service.pp | 6 +- .../supervisord/manifests/supervisorctl.pp | 29 +++ .../acceptance/nodesets/centos-65-i386.yml | 10 + .../acceptance/nodesets/centos-65-x64.yml | 10 + .../acceptance/nodesets/debian-73-i386.yml | 10 + .../acceptance/nodesets/debian-73-x64.yml | 10 + .../spec/acceptance/nodesets/default.yml | 10 + .../spec/acceptance/supervisord_spec.rb | 114 +++++++++ .../spec/classes/supervisord_spec.rb | 227 +++++++++++++++++- .../spec/defines/eventlistener_spec.rb | 85 ++++++- .../spec/defines/fcgi_program_spec.rb | 94 ++++++-- .../supervisord/spec/defines/program_spec.rb | 90 ++++++- .../supervisord/spec/defines/supervisorctl.rb | 13 + .../modules/supervisord/spec/spec_helper.rb | 1 + .../spec/spec_helper_acceptance.rb | 24 ++ .../supervisord/spec/spec_helper_system.rb | 25 -- .../supervisord/spec/system/basic_spec.rb | 120 --------- .../templates/conf/eventlistener.erb | 8 +- .../templates/conf/fcgi_program.erb | 8 +- .../supervisord/templates/conf/program.erb | 8 +- .../{debian_extra.erb => Debian/defaults.erb} | 0 .../init/{debian_init.erb => Debian/init.erb} | 6 +- .../{redhat_extra.erb => RedHat/defaults.erb} | 2 +- .../init/{redhat_init.erb => RedHat/init.erb} | 5 +- .../templates/supervisord_main.erb | 10 +- .../templates/supervisord_unix.erb | 4 +- .../modules/supervisord/tests/program.pp | 34 ++- .../puphpet/shell/execute-files.sh | 31 ++- .../dolibarrdev/puphpet/shell/ssh-keygen.sh | 81 +++++-- 58 files changed, 1491 insertions(+), 375 deletions(-) create mode 100644 dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty create mode 100644 dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb delete mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb delete mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{debian_extra.erb => Debian/defaults.erb} (100%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{debian_init.erb => Debian/init.erb} (96%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{redhat_extra.erb => RedHat/defaults.erb} (81%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{redhat_init.erb => RedHat/init.erb} (94%) diff --git a/dev/vagrant/README.md b/dev/vagrant/README.md index 8056643520e..dc0bc4234e2 100644 --- a/dev/vagrant/README.md +++ b/dev/vagrant/README.md @@ -23,7 +23,7 @@ Usage `cd` into the vagrant box directory and simply type `vagrant up`. -That's all you need to do. It will build a brand new VirtalBox machine for you with everything you need to develop on Dolibarr. +That's all you need to do. It will build a brand new VirtualBox machine for you with everything you need to develop on Dolibarr. ### Name resolution For easy access to the VM you need to setup name resolution to the machines IP. @@ -45,9 +45,16 @@ Somewhat bleeding edge vagrant box for develop branch related work. - IP: 192.168.42.101 - Vhost: dev.dolibarr.org -- OS: Debian Wheezy 7.5 +- OS: Debian Wheezy 7.5 x64 - Webserver: Apache 2.2.22 -- PHP: mod_php 5.5.13-1~dotdeb.1 +- PHP: mod_php 5.5.14-1~dotdeb.1 + Installed modules: + - cli + - curl + - gd + - imagick + - intl + - mcrypt - Database: MySQL 5.5 - Root user: root - Root password: root @@ -55,7 +62,13 @@ Somewhat bleeding edge vagrant box for develop branch related work. - Database user: user - Database password: user - Initial data: dev/initdata/mysqldump_dolibarr-3.5.0.sql +- Database: PostgreSQL 9.3 +- Adminer: lightweight database management. Access through http://192.168.42.101/adminer - Debugger: XDebug -- Profiler: Xhprof +- Profiler: Xhprof. Access through http://192.168.42.101/xhprof/xhprof_html You can access MailCatcher to read all outgoing emails at http://192.168.42.101:1080 + +To access the machine you must use the following private keys: +- User root: located at puphpet/files/dot/ssh/root_rsa +- User vagrant: located at puphpet/files/dot/ssh/id_rsa diff --git a/dev/vagrant/dolibarrdev/Vagrantfile b/dev/vagrant/dolibarrdev/Vagrantfile index f73476207d0..89c2c75a5b7 100644 --- a/dev/vagrant/dolibarrdev/Vagrantfile +++ b/dev/vagrant/dolibarrdev/Vagrantfile @@ -25,11 +25,19 @@ Vagrant.configure("2") do |config| data['vm']['synced_folder'].each do |i, folder| if folder['source'] != '' && folder['target'] != '' - nfs = (folder['nfs'] == "true") ? "nfs" : nil - if nfs == "nfs" - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs + if folder['sync_type'] == 'nfs' + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "nfs" + elsif folder['sync_type'] == 'smb' + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "smb" + elsif folder['sync_type'] == 'rsync' + rsync_args = !folder['rsync']['args'].nil? ? folder['rsync']['args'] : ["--verbose", "--archive", "--delete", "-z"] + rsync_auto = !folder['rsync']['auto'].nil? ? folder['rsync']['auto'] : true + rsync_exclude = !folder['rsync']['exclude'].nil? ? folder['rsync']['exclude'] : [".vagrant/"] + + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", + rsync__args: rsync_args, rsync__exclude: rsync_exclude, rsync__auto: rsync_auto, type: "rsync" else - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs, + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"] end end @@ -128,7 +136,14 @@ Vagrant.configure("2") do |config| end end - config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh" + config.vm.provision :shell do |s| + s.path = "puphpet/shell/execute-files.sh" + s.args = ["exec-once", "exec-always"] + end + config.vm.provision :shell, run: "always" do |s| + s.path = "puphpet/shell/execute-files.sh" + s.args = ["startup-once", "startup-always"] + end config.vm.provision :shell, :path => "puphpet/shell/important-notices.sh" if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa") diff --git a/dev/vagrant/dolibarrdev/puphpet/config.yaml b/dev/vagrant/dolibarrdev/puphpet/config.yaml index 5cfb2601f21..96c01695cec 100644 --- a/dev/vagrant/dolibarrdev/puphpet/config.yaml +++ b/dev/vagrant/dolibarrdev/puphpet/config.yaml @@ -29,10 +29,12 @@ vagrantfile-local: - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml' - '--parser future' synced_folder: - PL1BkioqqvGY: + jopH6005bn96: source: ../../../ target: /var/www - nfs: 'false' + sync_type: default + rsync: + auto: 'false' usable_port_range: 2200..2250 ssh: host: null @@ -71,7 +73,7 @@ apache: settings: user: www-data group: www-data - default_vhost: false + default_vhost: true manage_user: false manage_group: false sendfile: 0 @@ -79,7 +81,7 @@ apache: - php - rewrite vhosts: - CGyWQB0fx4x0: + b2tOrs1TMtoF: servername: dev.dolibarr.org docroot: /var/www/htdocs port: '80' @@ -97,7 +99,7 @@ apache: nginx: install: 0 vhosts: - jeF1sybIJ3V2: + 0dU5luf5AnIe: server_name: awesome.dev server_aliases: - www.awesome.dev @@ -152,7 +154,7 @@ mysql: root_password: root adminer: 0 databases: - 2OfuuapoIqsl: + V6H3W2FVB7Yq: grant: - ALTER - CREATE @@ -168,14 +170,14 @@ mysql: password: user sql_file: /var/www/dev/initdata/mysqldump_dolibarr_3.5.0.sql postgresql: - install: 0 + install: '1' settings: - root_password: '123' + root_password: root user_group: postgres encoding: UTF8 version: '9.3' databases: { } - adminer: 0 + adminer: '1' mariadb: install: 0 root_password: '123' diff --git a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore index dcf60545594..e9b023ea6a6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore +++ b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore @@ -1,4 +1 @@ -ssh/id_rsa -ssh/id_rsa.pub -ssh/insecure_private_key -ssh/id_rsa.ppk \ No newline at end of file +ssh/* \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty b/dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty b/dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp index 57f759e5531..6f560f8735f 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp @@ -279,8 +279,14 @@ if hash_key_equals($mailcatcher_values, 'install', 1) { } if ! defined(Class['supervisord']) { + class{ 'puphpet::python::pip': } + class { 'supervisord': - install_pip => true, + install_pip => false, + require => [ + Class['my_fw::post'], + Class['Puphpet::Python::Pip'], + ], } } @@ -467,15 +473,16 @@ if hash_key_equals($apache_values, 'install', 1) { $apache_vhosts = merge($apache_values['vhosts'], { 'default_vhost_80' => { 'servername' => 'default', - 'serveraliases' => ['*'], 'docroot' => '/var/www/default', 'port' => 80, + 'default_vhost' => true, }, 'default_vhost_443' => { 'servername' => 'default', - 'serveraliases' => ['*'], 'docroot' => '/var/www/default', 'port' => 443, + 'default_vhost' => true, + 'ssl' => 1, }, }) } else { @@ -515,11 +522,11 @@ if hash_key_equals($apache_values, 'install', 1) { create_resources(apache::vhost, { "${key}" => merge($vhost, { 'custom_fragment' => template('puphpet/apache/custom_fragment.erb'), - 'ssl' => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false }, - 'ssl_cert' => 'ssl_cert' in $vhost and $vhost['ssl_cert'] ? { undef => undef, '' => undef, default => $vhost['ssl_cert'] }, - 'ssl_key' => 'ssl_key' in $vhost and $vhost['ssl_key'] ? { undef => undef, '' => undef, default => $vhost['ssl_key'] }, - 'ssl_chain' => 'ssl_chain' in $vhost and $vhost['ssl_chain'] ? { undef => undef, '' => undef, default => $vhost['ssl_chain'] }, - 'ssl_certs_dir' => 'ssl_certs_dir' in $vhost and $vhost['ssl_certs_dir'] ? { undef => undef, '' => undef, default => $vhost['ssl_certs_dir'] } + 'ssl' => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false }, + 'ssl_cert' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_cert'], default => undef }, + 'ssl_key' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_key'], default => undef }, + 'ssl_chain' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_chain'], default => undef }, + 'ssl_certs_dir' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_certs_dir'], default => undef } }) }) @@ -662,10 +669,6 @@ if hash_key_equals($nginx_values, 'install', 1) { } } elsif hash_key_equals($hhvm_values, 'install', 1) { $fastcgi_pass = '127.0.0.1:9000' - - set_php5_fpm_sock_group_and_user { 'hhvm': - require => Package['nginx'], - } } else { $fastcgi_pass = '' } @@ -1096,7 +1099,7 @@ if hash_key_equals($xhprof_values, 'install', 1) } if hash_key_equals($apache_values, 'install', 1) { - $xhprof_webroot_location = $puphpet::params::apache_webroot_location + $xhprof_webroot_location = '/var/www/default' $xhprof_webserver_service = 'httpd' } elsif hash_key_equals($nginx_values, 'install', 1) { $xhprof_webroot_location = $puphpet::params::nginx_webroot_location @@ -1216,11 +1219,11 @@ if hash_key_equals($mysql_values, 'install', 1) { if hash_key_equals($mysql_values, 'adminer', 1) and $mysql_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mysql_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $mysql_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mysql_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1329,11 +1332,11 @@ if hash_key_equals($postgresql_values, 'install', 1) { if hash_key_equals($postgresql_values, 'adminer', 1) and $postgresql_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $postgresql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $postgresql_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $postgresql_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $postgresql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $postgresql_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1364,7 +1367,7 @@ define postgresql_db ( $table = "${name}.*" exec{ "${name}-import": - command => "psql ${name} < ${sql_file}", + command => "sudo -u postgres psql ${name} < ${sql_file}", logoutput => true, refreshonly => $refresh, require => Postgresql::Server::Db[$name], @@ -1491,11 +1494,11 @@ if hash_key_equals($mariadb_values, 'install', 1) { if hash_key_equals($mariadb_values, 'adminer', 1) and $mariadb_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $mariadb_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mariadb_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $mariadb_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $mariadb_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mariadb_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1662,7 +1665,7 @@ if $beanstalkd_values == undef { } if hash_key_equals($apache_values, 'install', 1) { - $beanstalk_console_webroot_location = "${puphpet::params::apache_webroot_location}/beanstalk_console" + $beanstalk_console_webroot_location = '/var/www/default/beanstalk_console' } elsif hash_key_equals($nginx_values, 'install', 1) { $beanstalk_console_webroot_location = "${puphpet::params::nginx_webroot_location}/beanstalk_console" } else { diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb new file mode 100644 index 00000000000..fd495f8f143 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb @@ -0,0 +1,42 @@ +# +# hash_key_true.rb +# + +module Puppet::Parser::Functions + + newfunction(:hash_key_true, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + + Returns true if the key within hash is truthy + ENDHEREDOC + + unless args.length == 2 + raise Puppet::ParseError, ("hash_key_true(): wrong number of arguments (#{args.length}; must be 2)") + end + + arr = args[0] + key = args[1] + + unless arr.is_a?(Hash) + return false + end + + unless arr.has_key?(key) + return false + end + + if arr[key].nil? + return false + end + + if arr[key].empty? + return false + end + + if arr[key] == 'false' + return false + end + + return true + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp index 90083232cdc..3b27ab90af6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp @@ -69,17 +69,39 @@ class puphpet::hhvm( } } 'centos': { + $jemalloc_url = 'http://files.puphpet.com/centos6/jemalloc-3.6.0-1.el6.x86_64.rpm' + $jemalloc_download_location = '/.puphpet-stuff/jemalloc-3.6.0-1.el6.x86_64.rpm' + + $require = defined(Class['my_fw::post']) ? { + true => Class['my_fw::post'], + default => [], + } + + exec { "download jemalloc to ${download_location}": + creates => $download_location, + command => "wget --quiet --tries=5 --connect-timeout=10 -O '${jemalloc_download_location}' '${jemalloc_url}'", + timeout => 30, + path => '/usr/bin', + require => $require + } + + package { 'jemalloc': + ensure => latest, + provider => yum, + source => $download_location, + require => Exec["download jemalloc to ${download_location}"], + } + yum::managed_yumrepo { 'hop5': descr => 'hop5 repository', baseurl => 'http://www.hop5.in/yum/el6/', gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5', enabled => 1, gpgcheck => 0, - priority => 1 + priority => 1, } } } - if $real_webserver == 'apache2' { if ! defined(Class['apache::mod::mime']) { class { 'apache::mod::mime': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp new file mode 100644 index 00000000000..14b13fe08c6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp @@ -0,0 +1,22 @@ +class puphpet::python::pip { + + Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } + + if ! defined(Package['python-setuptools']) { + package { 'python-setuptools': } + } + + exec { 'easy_install pip': + unless => 'which pip', + require => Package['python-setuptools'], + } + + if $::osfamily == 'RedHat' { + exec { 'rhel pip_provider_name_fix': + command => 'alternatives --install /usr/bin/pip-python pip-python /usr/bin/pip 1', + subscribe => Exec['easy_install pip'], + unless => 'which pip-python', + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml index 15f96922e01..3f18ef2fca2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml @@ -1,6 +1,10 @@ fixtures: repositories: - stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib" - concat: "git://github.com/puppetlabs/puppetlabs-concat" + 'stdlib': + repo: 'git://github.com/puppetlabs/puppetlabs-stdlib' + ref: '4.1.0' + 'concat': + repo: 'git://github.com/puppetlabs/puppetlabs-concat' + ref: '1.0.1' symlinks: supervisord: "#{source_dir}" \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml index 6e544518c19..bc96a165e59 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml @@ -1,21 +1,28 @@ language: ruby bundler_args: --without development -script: "bundle exec rake spec lint" +script: "bundle exec rake test" rvm: - 1.8.7 - 1.9.3 - 2.0.0 env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.3.0" - - PUPPET_GEM_VERSION="~> 3.4.0" + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.1.0" + - PUPPET_VERSION="~> 3.2.0" + - PUPPET_VERSION="~> 3.3.0" + - PUPPET_VERSION="~> 3.4.0" + - PUPPET_VERSION="~> 3.5.0" + - PUPPET_VERSION="~> 3.6.0" matrix: exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" + env: PUPPET_VERSION="~> 2.7.0" + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_VERSION="~> 3.2.0" notifications: email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog index ab4faa445ff..b1e3228ff02 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog @@ -1,3 +1,66 @@ +2014-06-20 - v0.4.0 + +Fixes: + +- Removed root as group and replaced with uid 0 to enhance system +compatibility + +Enhancements: + +- Made package provider a user definable param see supervisord::package_provider and README for details of how to change this. +- All define types can now be automatically pulled in from hiera see example https://github.com/ajcrowe/puppet-supervisord#configure-a-program +- You can now override the default include path of $config_include/*.conf with your own array using $config_dirs. Bear in mind this would need to include whatever you set $config_include to be, with *.conf on the end. + +Many thanks for the PRs from @jasperla, @mvantellingen for the bug report on the service name and @hasc for the enhancement ideas. + +2014-06-06 - v0.3.3 + +Fixes: + +- Fixed typo in stopwaitsec param, should have been stopwaitsecs, thanks to @rchrd2 + +2014-05-03 - v0.3.2 + +Changes: + +- Added supervisord::executable_ctl variable for supervisorctl binary path, thanks to @bpgoldsb + +2014-04-22 - v0.3.1 + +Fixes: + +- Fixed typo in unix_socket_group param, thanks to @dig412 + +2014-03-11 - v0.3.0 + +Fixes: + +- Fixed typo in fcgi config +- Fixed typo in supervisord config with minfds and minprocs, thanks to @peefourtee +- Typo in README fixed thanks to @hopkinsth +- Removed refreshonly from pip_install exec resource +- Number of syntax fixes thanks to `puppet lint` + +Important Changes: + +- Lots of input validation has been added **PLEASE** check your config works before upgrading! +- Changed init_extras naming to defaults and cleaned things up. +- Starting and stopping apps is now done with supervisorctl commands to avoid service restarts + +Other Changes: + +- CSV functions now order things consistently +- Included description for classes and functions +- Expanded spec testing built with Travis CI +- Added beaker acceptance tests +- Added greater validation of various parameters +- Added coverage reporting for resources + +To-Do: + +- Add support for additional OS families such as Solaris. + + 2013-10-31 - v0.2.3 Fixes: diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile index 8612255f5b8..ba9a19d533a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile @@ -1,14 +1,26 @@ source 'https://rubygems.org' -group :development, :test do +group :test do gem 'rake' - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-system-puppet', '~> 2.0' - gem 'puppet-lint', '~> 0.3.2' + gem 'puppet-lint' + gem 'puppet-syntax' + gem 'puppetlabs_spec_helper' + gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git' , :ref => 'c44381a240ec420d4ffda7bffc55ee4d9c08d682' + gem 'rspec', '2.14.1' end -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false +group :development do + gem 'travis' + gem 'travis-lint' + gem 'beaker' + gem 'beaker-rspec' + gem 'pry' + gem 'guard-rake' +end + + +if puppetversion = ENV['PUPPET_VERSION'] + gem 'puppet', puppetversion +else + gem 'puppet', '~> 3.4.0' end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile index 4a0552115da..0c99b04baf2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile @@ -1,5 +1,5 @@ name 'ajcrowe-supervisord' -version '0.2.3' +version '0.4.0' source 'git@github.com/ajcrowe/puppet-supervisord.git' author 'Alex Crowe' license 'Apache License, Version 2.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md index a8419a09082..b454cd9307a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md @@ -4,7 +4,7 @@ Puppet module to manage the [supervisord](http://supervisord.org/) process control system. -Functions available to configure +Functions available to configure * [programs](http://supervisord.org/configuration.html#program-x-section-settings) * [groups](http://supervisord.org/configuration.html#group-x-section-settings) @@ -31,10 +31,16 @@ class supervisord { } ``` -This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. +This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. You can pass a specific url with `$setuptools_url = 'url'` +### Install without pip + +If you want to use your system package manager you can specify that with `supervisord::package_provider`. + +You'll also likely need to adjust the `supervisord::service_name` to match that installed by the system package. If you're using Debian or Redhat OS families you'll also want to disable the init scripts with `supervisord::install_init = false`. + Note: Only Debian and RedHat families have an init script currently. ### Configure a program @@ -61,23 +67,61 @@ supervisord::program { 'myprogram': } ``` +Or you can fully define your programs in hiera: + +```yaml +supervisord::programs: + 'myprogram': + command: 'command --args' + autostart: yes + autorestart: 'true' + environment: + HOME: '/home/myuser' + PATH: '/bin:/sbin:/usr/bin:/usr/sbin' + SECRET: 'mysecret' +``` + ### Configure a group ```ruby supervisord::group { 'mygroup': priority => 100, - program => ['program1', 'program2', 'program3'] + programs => ['program1', 'program2', 'program3'] } ``` +### Configure an eventlistener + +```ruby +supervisord::eventlistener { 'mylistener': + command => 'command --args', + events => ['PROCESS_STATE', 'PROCESS_STATE_START'] + priority => '100', + env_var => 'my_common_envs' +} +``` + +### Run supervisorctl Commands + +Should you need to run a sequence of command with `supervisorctl` you can use the define type `supervisord::supervisorctl` + +```ruby +supervisord::supervisorctl { 'restart_myapp': + command => 'restart', + process => 'myapp' +} +``` + +You can also issue a command without specifying a process. + ### Development If you have suggestions or improvements please file an issue or pull request, i'll try and sort them as quickly as possble. -If you submit a pull please try and include tests for the new functionality. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). +If you submit a pull please try and include tests for the new functionality/fix. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). ### Credits * Debian init script sourced from the system package. -* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts +* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile index e00f7d11877..cd592af48f4 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile @@ -1,7 +1,28 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' -require 'rspec-system/rake_task' +require 'puppet-syntax/tasks/puppet-syntax' PuppetLint.configuration.send('disable_80chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_quoted_booleans') +PuppetLint.configuration.send('disable_autoloader_layout') + +exclude_paths = [ + "pkg/**/*", + "vendor/**/*", + "spec/**/*", +] +PuppetLint.configuration.ignore_paths = exclude_paths +PuppetSyntax.exclude_paths = exclude_paths + +desc "Acceptance Tests" +RSpec::Core::RakeTask.new(:acceptance) do |t| + t.pattern = 'spec/acceptance' +end + +desc "Test Suite" +task :test => [ + :lint, + :syntax, + :spec +] \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb index cfa52b2bbf2..6d34d5d5474 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb @@ -1,14 +1,12 @@ # # Converts the array to a csv string # -# # $array = [ 'string1', 'string2', 'string3' ] # # becomes: # # $string = "string1,string2,string3" # - module Puppet::Parser::Functions newfunction(:array2csv, :type => :rvalue, :doc => <<-'EOS' Returns a sorted csv formatted string from an array in the form diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb index 6098b67367d..5371328f2ff 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb @@ -1,7 +1,6 @@ # # Converts the hash to a csv string # -# # $hash = { # HOME => '/home/user', # ENV1 => 'env1', @@ -12,7 +11,6 @@ # # $string = "HOME='/home/user',ENV1='env1',SECRET='secret'" # - module Puppet::Parser::Functions newfunction(:hash2csv, :type => :rvalue, :doc => <<-'EOS' Returns a csv formatted string from an hash in the form diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp index cc8b1ee49d0..93713729e8b 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp @@ -1,6 +1,16 @@ +# Class: supervisord::config +# +# Configuration class for supervisor init and conf directories +# class supervisord::config inherits supervisord { - file { [ "${supervisord::config_include}", "${supervisord::log_path}"]: + file { $supervisord::config_include: + ensure => directory, + owner => 'root', + mode => '0755' + } + + file { $supervisord::log_path: ensure => directory, owner => 'root', mode => '0755' @@ -15,30 +25,26 @@ class supervisord::config inherits supervisord { } if $supervisord::install_init { - - $osname = downcase($::osfamily) - file { '/etc/init.d/supervisord': ensure => present, owner => 'root', mode => '0755', - content => template("supervisord/init/${osname}_init.erb") + content => template("supervisord/init/${::osfamily}/init.erb") } - if $supervisord::init_extras { - file { $supervisord::init_extras: + if $supervisord::init_defaults { + file { $supervisord::init_defaults: ensure => present, owner => 'root', mode => '0755', - content => template("supervisord/init/${osname}_extra.erb") + content => template("supervisord/init/${::osfamily}/defaults.erb") } } - } concat { $supervisord::config_file: owner => 'root', - group => 'root', + group => '0', mode => '0755' } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp index 41b7cf6c730..fd52d6e4da4 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp @@ -1,8 +1,16 @@ +# Define: supervisord::eventlistener +# +# This define creates an eventlistener configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#eventlistener-x-section-settings +# define supervisord::eventlistener( $command, $ensure = present, + $ensure_process = 'running', + $buffer_size = 10, $events = undef, - $buffer_size = undef, $result_handler = undef, $env_var = undef, $process_name = undef, @@ -15,16 +23,16 @@ define supervisord::eventlistener( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/eventlistener_${name}.log", + $stdout_logfile = "eventlistener_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/eventlistener_${name}.error", + $stderr_logfile = "eventlistener_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_events_enabled = undef, @@ -36,11 +44,45 @@ define supervisord::eventlistener( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + validate_re($buffer_size, '^\d+') + if $events { validate_array($events) } + if $result_handler { validate_string($result_handler) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -55,6 +97,22 @@ define supervisord::eventlistener( owner => 'root', mode => '0755', content => template('supervisord/conf/eventlistener.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp index 923b1798bff..633b024917e 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp @@ -1,7 +1,15 @@ +# Define: supervisord::fcgi_program +# +# This define creates an eventlistener configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#fcgi-program-x-section-settings +# define supervisord::fcgi_program( $command, $socket, $ensure = present, + $ensure_process = 'running', $socket_owner = undef, $socket_mode = undef, $env_var = undef, @@ -15,17 +23,17 @@ define supervisord::fcgi_program( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/fcgi-program_${name}.log", + $stdout_logfile = "fcgi-program_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_capture_maxbytes = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/fcgi-program_${name}.error", + $stderr_logfile = "fcgi-program_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_capture_maxbytes = undef, @@ -38,11 +46,46 @@ define supervisord::fcgi_program( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + validate_re($socket, ['^tcp:\/\/.*:\d+$', '^unix:\/\/\/']) + if $process_name { validate_string($process_name) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -53,6 +96,22 @@ define supervisord::fcgi_program( owner => 'root', mode => '0755', content => template('supervisord/conf/fcgi_program.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp index 0f6b1ca2adc..45cb29cf290 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp @@ -1,3 +1,10 @@ +# Define: supervisord::group +# +# This define creates an group configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#group-x-section-settings +# define supervisord::group ( $programs, $ensure = present, @@ -6,6 +13,10 @@ define supervisord::group ( include supervisord + # parameter validation + validate_array($programs) + if $priority { validate_re($priority, '^\d+', "invalid priority value of: ${priority}") } + $progstring = array2csv($programs) $conf = "${supervisord::config_include}/group_${name}.conf" @@ -13,6 +24,7 @@ define supervisord::group ( ensure => $ensure, owner => 'root', mode => '0755', - content => template('supervisord/conf/group.erb') + content => template('supervisord/conf/group.erb'), + notify => Class['supervisord::reload'] } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp index 801c46b3b36..1d2d55148d9 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp @@ -1,12 +1,18 @@ -# This class installs supervisord and configured it to run on boot +# Class: supervisord +# +# This class installs supervisord via pip +# class supervisord( $package_ensure = $supervisord::params::package_ensure, + $package_provider = $supervisord::params::package_provider, $service_ensure = $supervisord::params::service_ensure, + $service_name = $supervisord::params::service_name, $install_init = $supervisord::params::install_init, $install_pip = false, - $init_extras = $supervisord::params::init_extras, + $init_defaults = $supervisord::params::init_defaults, $setuptools_url = $supervisord::params::setuptools_url, $executable = $supervisord::params::executable, + $executable_ctl = $supervisord::params::executable_ctl, $log_path = $supervisord::params::log_path, $log_file = $supervisord::params::log_file, @@ -19,20 +25,20 @@ class supervisord( $nodaemon = $supervisord::params::nodaemon, $minfds = $supervisord::params::minfds, $minprocs = $supervisord::params::minprocs, - $config_path = $supervisord::params::config_path, $config_include = $supervisord::params::config_include, $config_file = $supervisord::params::config_file, + $config_dirs = undef, $umask = $supervisord::params::umask, $unix_socket = $supervisord::params::unix_socket, $unix_socket_file = $supervisord::params::unix_socket_file, $unix_socket_mode = $supervisord::params::unix_socket_mode, $unix_socket_owner = $supervisord::params::unix_socket_owner, - $unix_scoket_group = $supervisord::params::unix_socket_group, + $unix_socket_group = $supervisord::params::unix_socket_group, $inet_server = $supervisord::params::inet_server, - $inet_server_hostname = $supervisord::params::inet_hostname, - $inet_server_port = $supervisord::params::inet_port, + $inet_server_hostname = $supervisord::params::inet_server_hostname, + $inet_server_port = $supervisord::params::inet_server_port, $unix_auth = false, $unix_username = undef, @@ -47,26 +53,76 @@ class supervisord( $childlogdir = undef, $environment = undef, $env_var = undef, + $directory = undef, $strip_ansi = false, - $nocleanup = false + $nocleanup = false, + + $eventlisteners = {}, + $fcgi_programs = {}, + $groups = {}, + $programs = {} ) inherits supervisord::params { + validate_bool($install_pip) + validate_bool($install_init) + validate_bool($nodaemon) + validate_bool($unix_auth) + validate_bool($inet_auth) + validate_bool($strip_ansi) + validate_bool($nocleanup) + + validate_hash($eventlisteners) + validate_hash($fcgi_programs) + validate_hash($groups) + validate_hash($programs) + + validate_absolute_path($config_include) + validate_absolute_path($log_path) + validate_absolute_path($run_path) + if $childlogdir { validate_absolute_path($childlogdir) } + if $directory { validate_absolute_path($directory) } + + $log_levels = ['^critical$', '^error$', '^warn$', '^info$', '^debug$', '^trace$', '^blather$'] + validate_re($log_level, $log_levels, "invalid log_level: ${log_level}") + validate_re($umask, '^0[0-7][0-7]$', "invalid umask: ${umask}.") + validate_re($unix_socket_mode, '^[0-7][0-7][0-7][0-7]$', "invalid unix_socket_mode: ${unix_socket_mode}") + + if ! is_integer($logfile_backups) { fail("invalid logfile_backups: ${logfile_backups}.")} + if ! is_integer($minfds) { fail("invalid minfds: ${minfds}.")} + if ! is_integer($minprocs) { fail("invalid minprocs: ${minprocs}.")} + if ! is_integer($inet_server_port) { fail("invalid inet_server_port: ${inet_server_port}.")} + if $env_var { + validate_hash($env_var) $env_hash = hiera($env_var) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } + if $config_dirs { + validate_array($config_dirs) + $config_include_string = join($config_dirs, " ") + } + else { + $config_include_string = "${config_include}/*.conf" + } + + create_resources('supervisord::eventlistener', $eventlisteners) + create_resources('supervisord::fcgi_program', $fcgi_programs) + create_resources('supervisord::group', $groups) + create_resources('supervisord::program', $programs) + if $install_pip { include supervisord::pip Class['supervisord::pip'] -> Class['supervisord::install'] } - include supervisord::install, supervisord::config, supervisord::service + include supervisord::install, supervisord::config, supervisord::service, supervisord::reload Class['supervisord::install'] -> Class['supervisord::config'] ~> Class['supervisord::service'] - + Class['supervisord::reload'] -> Supervisord::Supervisorctl <| |> } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp index 1d36ec68334..31a63f3b59e 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp @@ -1,6 +1,10 @@ +# Class supervisord::install +# +# Installs supervisor package (defaults to using pip) +# class supervisord::install inherits supervisord { package { 'supervisor': ensure => $supervisord::package_ensure, - provider => 'pip' + provider => $supervisord::package_provider } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp index 87d17d16179..f9d82e5804b 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp @@ -1,13 +1,21 @@ +# Class: supervisord::params +# +# Default parameters for supervisord +# class supervisord::params { + # default supervisord params $package_ensure = 'installed' + $package_provider = 'pip' $service_ensure = 'running' + $service_name = 'supervisord' $package_name = 'supervisor' - $executable = '/usr/local/bin/supervisord' + $executable = 'supervisord' + $executable_ctl = 'supervisorctl' $run_path = '/var/run' - $pid_file = "${run_path}/supervisord.pid" + $pid_file = 'supervisord.pid' $log_path = '/var/log/supervisor' - $log_file = "${log_path}/supervisord.log" + $log_file = 'supervisord.log' $logfile_maxbytes = '50MB' $logfile_backups = '10' $log_level = 'info' @@ -20,7 +28,7 @@ class supervisord::params { $setuptools_url = 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py' $unix_socket = true - $unix_socket_file = "${run_path}/supervisor.sock" + $unix_socket_file = 'supervisor.sock' $unix_socket_mode = '0700' $unix_socket_owner = 'nobody' @@ -31,17 +39,17 @@ class supervisord::params { case $::osfamily { 'RedHat': { - $init_extras = '/etc/sysconfig/supervisord' + $init_defaults = '/etc/sysconfig/supervisord' $unix_socket_group = 'nobody' $install_init = true } 'Debian': { - $init_extras = '/etc/default/supervisor' + $init_defaults = '/etc/default/supervisor' $unix_socket_group = 'nogroup' $install_init = true } default: { - $init_extras = false + $init_defaults = false $unix_socket_group = 'nogroup' $install_init = false } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp index c05f2d7f64b..71dd3653da3 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp @@ -1,8 +1,10 @@ +# Class: supervisord::pip +# +# Optional class to install setuptool and pip +# class supervisord::pip inherits supervisord { - Exec { - path => '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' - } + Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } exec { 'install_setuptools': command => "curl ${supervisord::setuptools_url} | python", diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp index 8a00d41c77c..617a68ab208 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp @@ -1,6 +1,14 @@ +# Define: supervisord::program +# +# This define creates an program configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#program-x-section-settings +# define supervisord::program( $command, $ensure = present, + $ensure_process = 'running', $env_var = undef, $process_name = undef, $numprocs = undef, @@ -12,17 +20,17 @@ define supervisord::program( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/program_${name}.log", + $stdout_logfile = "program_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_capture_maxbytes = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/program_${name}.error", + $stderr_logfile = "program_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_capture_maxbytes = undef, @@ -35,11 +43,45 @@ define supervisord::program( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + if $process_name { validate_string($process_name) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -50,6 +92,22 @@ define supervisord::program( owner => 'root', mode => '0755', content => template('supervisord/conf/program.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp new file mode 100644 index 00000000000..e5a4637e430 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp @@ -0,0 +1,21 @@ +# Class: supervisord::reload +# +# Class to reread and update supervisord with supervisorctl +# +class supervisord::reload { + + Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } + + $supervisorctl = $::supervisord::executable_ctl + + exec { 'supervisorctl_reread': + command => "${supervisorctl} reread", + refreshonly => true, + returns => [0, 2], + } + exec { 'supervisorctl_update': + command => "${supervisorctl} update", + refreshonly => true, + returns => [0, 2], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp index 6e17976165d..f02a0d0a081 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp @@ -1,5 +1,9 @@ +# Class: supervisord::service +# +# Class for the supervisord service +# class supervisord::service inherits supervisord { - service { 'supervisord': + service { $supervisord::service_name: ensure => $supervisord::service_ensure, enable => true, hasrestart => true, diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp new file mode 100644 index 00000000000..ec4dbed9337 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp @@ -0,0 +1,29 @@ +# Define: supervisord:supervisorctl +# +# This define executes command with the supervisorctl tool +# +define supervisord::supervisorctl( + $command, + $process = undef, + $refreshonly = false +) { + + Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } + + validate_string($command) + validate_string($process) + + $supervisorctl = $::supervisord::executable_ctl + + if $process { + $cmd = join([$supervisorctl, $command, $process], ' ') + } + else { + $cmd = join([$supervisorctl, $command]) + } + + exec { "supervisorctl_command_${name}": + command => $cmd, + refreshonly => $refreshonly + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml new file mode 100644 index 00000000000..f8d4013a31b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-i386: + roles: + - master + platform: el-6-i386 + box : centos-65-i386-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-i386-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml new file mode 100644 index 00000000000..7535c104afb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml new file mode 100644 index 00000000000..d1233aa83d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-i386: + roles: + - master + platform: debian-7-i386 + box : debian-73-i386-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 00000000000..5b87870a909 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..5b87870a909 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb new file mode 100644 index 00000000000..47d052a4eec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb @@ -0,0 +1,114 @@ +require 'spec_helper_acceptance' + +describe 'supervisord install' do + + context 'default parameters with pip and init install' do + it 'should work with no errors' do + pp = <<-EOS + class { 'supervisord': install_pip => true, install_init => true} + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + describe service('supervisord') do + it { should be_enabled } + it { should be_running } + it 'should restart successfully' do + cmd="service supervisord restart" + expect(shell(cmd).exit_code).to_not eq(1) + end + end + end +end + +describe 'supervisord::program' do + context 'create a program config' do + it 'should install a program file' do + + pp = <<-EOS + include supervisord + supervisord::program { 'test': + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep command=echo /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd='grep priority=100 /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd='grep "environment=" /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + end + end +end + +describe 'supervisord::fcgi-program' do + context 'create fcgi-program config' do + it 'should install a fcgi-program file' do + + pp = <<-EOS + include supervisord + supervisord::fcgi_program { 'test': + socket => 'tcp://localhost:1000', + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd="grep command=echo /etc/supervisor.d/fcgi-program_test.conf" + expect(shell(cmd).exit_code).to eq(0) + cmd="grep priority=100 /etc/supervisor.d/fcgi-program_test.conf" + expect(shell(cmd).exit_code).to eq(0) + cmd='grep "environment=" /etc/supervisor.d/fcgi-program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + end + end +end + +describe 'supervisord::group' do + context 'create group config' do + it 'should install a group config' do + + pp = <<-EOS + include supervisord + supervisord::group { 'test': + programs => ['test'], + priority => '100', + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep "programs=test" /etc/supervisor.d/group_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd="grep priority=100 /etc/supervisor.d/group_test.conf" + expect(shell(cmd).exit_code).to eq(0) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb index 238876c7dcd..b845920f6fe 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb @@ -3,14 +3,26 @@ require 'spec_helper' describe 'supervisord' do concatdir = '/var/lib/puppet/concat' - configfile = '/etc/supervisord.conf' let(:facts) {{ :concat_basedir => concatdir }} it { should contain_class('supervisord') } it { should contain_class('supervisord::install') } it { should contain_class('supervisord::config') } it { should contain_class('supervisord::service') } - it { should contain_concat__fragment('supervisord_main').with_content(/logfile/) } + it { should contain_class('supervisord::params') } + it { should contain_class('supervisord::reload') } + it { should contain_package('supervisor') } + + describe '#service_name' do + context 'default' do + it { should contain_service('supervisord') } + end + + context 'specified' do + let(:params) {{ :service_name => 'myservicename' }} + it { should contain_service('myservicename') } + end + end describe '#install_pip' do context 'default' do @@ -18,8 +30,16 @@ describe 'supervisord' do end context 'true' do - let (:params) {{ :install_pip => true }} + let(:params) {{ :install_pip => true }} it { should contain_class('supervisord::pip') } + it { should contain_exec('install_setuptools') } + it { should contain_exec('install_pip') } + end + + context 'true and RedHat' do + let(:params) {{ :install_pip => true }} + let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} + it { should contain_exec('pip_provider_name_fix') } end end @@ -28,11 +48,6 @@ describe 'supervisord' do it { should contain_class('supervisord').without_env_hash } it { should contain_class('supervisord').without_env_string } end - #context 'is specified' do - # let(:params) {{ :env_var => 'foovars' }} - # let(:hiera_data) {{ :foovars => { 'key1' => 'value1', 'key2' => 'value2' } }} - # it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } - #end end describe '#environment' do @@ -41,7 +56,8 @@ describe 'supervisord' do end context 'is specified' do let(:params) {{ :environment => { 'key1' => 'value1', 'key2' => 'value2' } }} - it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } + it { should contain_concat__fragment('supervisord_main')\ + .with_content(/environment=key1='value1',key2='value2'/) } end end @@ -54,17 +70,20 @@ describe 'supervisord' do it { should_not contain_file('/etc/init.d/supervisord') } end - describe 'on supported OS' + describe 'on supported OS' do context 'with Debian' do let(:facts) {{ :osfamily => 'Debian', :concat_basedir => concatdir }} it { should contain_file('/etc/init.d/supervisord') } + it { should contain_file('/etc/default/supervisor') } end context 'with RedHat' do let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} it { should contain_file('/etc/init.d/supervisord') } + it { should contain_file('/etc/sysconfig/supervisord') } end end + end describe '#unix_socket' do context 'default' do @@ -89,10 +108,192 @@ describe 'supervisord' do describe '#run_path' do context 'default' do it { should_not contain_file('/var/run') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/pidfile=\/var\/run\/supervisord.pid$/) } end - context 'custom setting' do - let(:params) {{ :run_path => '/var/run/supervisord'}} - it { should contain_file('/var/run/supervisord') } + context 'is specified' do + let(:params) {{ :run_path => '/opt/supervisord/run' }} + it { should contain_file('/opt/supervisord/run') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/pidfile=\/opt\/supervisord\/run\/supervisord.pid$/) } + end + end + + describe '#log_path' do + context 'default' do + it { should contain_file('/var/log/supervisor') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/logfile=\/var\/log\/supervisor\/supervisord.log$/) } + end + context 'is specified' do + let(:params) {{ :log_path => '/opt/supervisord/logs' }} + it { should contain_file('/opt/supervisord/logs')} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/logfile=\/opt\/supervisord\/logs\/supervisord.log$/) } + end + end + + describe '#config_include' do + context 'default' do + it { should contain_file('/etc/supervisor.d') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/etc\/supervisor.d\/\*.conf$/) } + end + context 'is specified' do + let(:params) {{ :config_include => '/opt/supervisord/conf.d' }} + it { should contain_file('/opt/supervisord/conf.d') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/opt\/supervisord\/conf.d\/\*.conf$/) } + end + end + + describe '#config_dirs' do + context 'is specified' do + let(:params) {{ :config_dirs => ['/etc/supervisor.d/*.conf', '/opt/supervisor.d/*', '/usr/share/supervisor.d/*.config'] }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/etc\/supervisor.d\/\*.conf \/opt\/supervisor.d\/\* \/usr\/share\/supervisor.d\/\*.config$/) } + end + end + + describe '#config_file' do + context 'default' do + it { should contain_file('/etc/supervisord.conf') } + end + context 'is specified' do + let(:params) {{ :config_file => '/opt/supervisord/supervisor.conf' }} + it { should contain_file('/opt/supervisord/supervisor.conf') } + end + end + + describe '#nodaemon' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nodaemon=false$/) } + end + context 'true' do + let(:params) {{ :nodaemon => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nodaemon=true$/) } + end + context 'invalid' do + let(:params) {{ :nodaemon => 'invalid' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#minfds' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minfds=1024$/) } + end + context 'specified' do + let(:params) {{ :minfds => 2048 }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minfds=2048$/) } + end + context 'invalid' do + let(:params) {{ :minfds => 'string' }} + it { expect { raise_error(Puppet::Error, /invalid minfds/) }} + end + end + + describe '#minprocs' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minprocs=200$/) } + end + context 'specified' do + let(:params) {{ :minprocs => 300 }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minprocs=300$/) } + end + context 'invalid' do + let(:params) {{ :minfds => 'string' }} + it { expect { raise_error(Puppet::Error, /invalid minprocs/) }} + end + end + + describe '#strip_ansi' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/strip_ansi$/) } + end + context 'true' do + let(:params) {{ :strip_ansi => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/strip_ansi=true$/) } + end + context 'invalid' do + let(:params) {{ :strip_ansi => 'string' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#user' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/user$/) } + end + context 'specified' do + let(:params) {{ :user => 'myuser' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/user=myuser$/) } + end + end + + describe '#identifier' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/identifier$/) } + end + context 'specified' do + let(:params) {{ :identifier => 'myidentifier' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/identifier=myidentifier$/) } + end + end + + describe '#directory' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/directory$/) } + end + context 'specified' do + let(:params) {{ :directory => '/opt/supervisord' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/directory=\/opt\/supervisord$/) } + end + end + + describe '#nocleanup' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/nocleanup$/) } + end + context 'true' do + let(:params) {{ :nocleanup => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nocleanup=true$/) } + end + context 'invalid' do + let(:params) {{ :nocleanup => 'string' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#childlogdir' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/childlogdir$/) } + end + context 'specified' do + let(:params) {{ :childlogdir => '/opt/supervisord/logdir' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/childlogdir=\/opt\/supervisord\/logdir$/) } + end + context 'invalid' do + let(:params) {{ :childlogdir => 'not_a_path' }} + it { expect { raise_error(Puppet::Error, /is not an absolute path/) }} end end end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb index 6e04f44f97b..1083b8a3230 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb @@ -2,14 +2,85 @@ require 'spec_helper' describe 'supervisord::eventlistener', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :stdout_logfile => '/var/log/supervisor/eventlistener_foo.log', - :stderr_logfile => '/var/log/supervisor/eventlistener_foo.error', - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :process_name => '%(process_num)s', + :events => ['PROCESS_STATE', 'PROCESS_STATE_STARTING'], + :buffer_size => 10, + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'eventlistener_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_events_enabled => true, + :stderr_logfile => 'eventlistener_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__eventlistener('foo') } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__eventlistener('foo') } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/\[eventlistener:foo\]/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/events=PROCESS_STATE,PROCESS_STATE_STARTING/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/buffer_size=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/eventlistener_foo.log/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/eventlistener_foo.error/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb index 7fd8ab07b86..e01311be70d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb @@ -2,21 +2,87 @@ require 'spec_helper' describe 'supervisord::fcgi_program', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :socket => 'tcp://localhost:1000', - :stdout_logfile => '/var/log/supervisor/fcgi-program_foo.log', - :stderr_logfile => '/var/log/supervisor/fcgi-program_foo.error', - :user => 'baz' - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :socket => 'tcp://localhost:1000', + :process_name => '%(process_num)s', + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'fcgi-program_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_capture_maxbytes => '0', + :stdout_events_enabled => true, + :stderr_logfile => 'fcgi-program_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_capture_maxbytes => '0', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__fcgi_program('foo') } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__fcgi_program('foo') } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb index 077828bdfcf..e32c24ab2d5 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb @@ -2,19 +2,85 @@ require 'spec_helper' describe 'supervisord::program', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :stdout_logfile => '/var/log/supervisor/program_foo.log', - :stderr_logfile => '/var/log/supervisor/program_foo.error', - :user => 'baz' - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :process_name => '%(process_num)s', + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'program_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_capture_maxbytes => '0', + :stdout_events_enabled => true, + :stderr_logfile => 'program_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_capture_maxbytes => '0', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__program('foo') } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__program('foo') } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb new file mode 100644 index 00000000000..33cfd75efe9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe 'supervisord::supervisorctl', :type => :define do + let(:title) {'command_foo'} + let(:default_params) {{ + :command => 'command', + :process => 'foo' + }} + let(:params) { default_params } + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__supervisorctl('command_foo') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb index 644f7c33ac0..745ad4a5493 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb @@ -7,3 +7,4 @@ RSpec.configure do |c| c.manifest_dir = File.join(fixture_path, 'manifests') end +at_exit { RSpec::Puppet::Coverage.report! } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..dcae2850d27 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb @@ -0,0 +1,24 @@ +require 'beaker-rspec' + +hosts.each do |host| + # Install Puppet + install_puppet +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module + puppet_module_install(:source => proj_root, :module_name => 'supervisord') + hosts.each do |host| + on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } + end + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb deleted file mode 100644 index a790d7d526c..00000000000 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' - -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour - c.tty = true - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - puppet_master_install - - # Replace mymodule with your module name - puppet_module_install(:source => proj_root, :module_name => 'supervisord') - shell('puppet module install puppetlabs/stdlib') - shell('puppet module install puppetlabs/concat') - - end -end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb deleted file mode 100644 index 62cf7dd8c2e..00000000000 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'spec_helper_system' - -describe 'basic install' do - - it 'class should work with no errors' do - pp = <<-EOS - class { 'supervisord': install_pip => true, install_init => true} - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("pgrep supervisord") do |r| - r.exit_code.should be_zero - end - - end -end - -describe 'add a program config' do - - it 'supervisord::program should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::program { 'test': - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("grep command=echo /etc/supervisor.d/program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/program_test.conf") do |r| - r.exit_code.should be_zero - end - shell('grep "environment=" /etc/supervisor.d/program_test.conf') do |r| - r.exit_code.should be_zero - end - end -end - -describe 'add a fcgi-program config' do - - it 'supervisord::fcgi_program should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::fcgi_program { 'test': - socket => 'tcp://localhost:1000', - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep command=echo /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell('grep "environment=" /etc/supervisor.d/fcgi-program_test.conf') do |r| - r.exit_code.should be_zero - end - end -end - -describe 'add a group config' do - - it 'supervisord::group should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::group { 'test': - programs => ['program1', 'program2'], - priority => '100', - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell('grep "programs=program1,program2" /etc/supervisor.d/group_test.conf') do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - end -end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb index 4ee2b893419..9875c8ef5b2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb @@ -39,8 +39,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -54,7 +54,7 @@ user=<%= @user %> <% if @redirect_stderr -%> redirect_stderr=<%= @redirect_stderr %> <% end -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> <% end -%> @@ -64,7 +64,7 @@ stdout_logfile_backups=<%= @stdout_logfile_backups %> <% if @stdout_events_enabled -%> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> <% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb index a1478bce536..98a7fb1cb32 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb @@ -37,8 +37,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -53,7 +53,7 @@ user=<%= @user %> redirect_stderr=<%= @redirect_stderr %> <% end -%> <% if @stdout_logfile -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% end -%> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> @@ -68,7 +68,7 @@ stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> <% if @stderr_logfile -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% end -%> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb index ca96d34d6ad..78002c87ca6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb @@ -30,8 +30,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -46,7 +46,7 @@ user=<%= @user %> redirect_stderr=<%= @redirect_stderr %> <% end -%> <% if @stdout_logfile -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% end -%> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> @@ -61,7 +61,7 @@ stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> <% if @stderr_logfile -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% end -%> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb similarity index 100% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb similarity index 96% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb index b94f9337f59..bff9857257a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb @@ -19,15 +19,15 @@ DESC=supervisor test -x $DAEMON || exit 0 LOGDIR=<%= @log_path %> -PIDFILE=<%= @pid_file %> +PIDFILE=<%= @run_path %>/<%= @pid_file %> DODTIME=5 # Time to wait for the server to die, in seconds # If this value is set too low you might not # let some servers to die gracefully and # 'restart' will not work # Include supervisor defaults if available -if [ -f /etc/default/supervisor ] ; then - . /etc/default/supervisor +if [ -f <%= @init_defaults %> ] ; then + . <%= @init_defaults %> fi set -e diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb similarity index 81% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb index b892c2d6203..0d7862d0233 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb @@ -5,4 +5,4 @@ set -a # should probably put both of these options as runtime arguments OPTIONS="-c <%= @config_file %>" -PIDFILE=<%= @pid_file %> +PIDFILE=<%= @run_path %><%= @pid_file %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb similarity index 94% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb index 1dc2da2aff1..dabb2784510 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb @@ -13,18 +13,19 @@ # xmlrpc interface as well as a few other nifty features. # processname: supervisord # config: <%= @config_file %> -# pidfile: <%= @pid_file %> +# pidfile: <%= @run_path %>/<%= @pid_file %> # # source function library . /etc/rc.d/init.d/functions # source system settings -[ -e <%= @init_extras %> ] && . <%= @init_extras %> +[ -e <%= @init_defaults %> ] && . <%= @init_defaults %> RETVAL=0 DAEMON=/usr/bin/supervisord DESC=supervisord +PIDFILE=<%= @run_path %>/<%= @pid_file %> running_pid() { diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb index 1baf5607a2f..8ab8fee51df 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb @@ -1,9 +1,9 @@ [supervisord] -logfile=<%= @log_file %> -pidfile=<%= @pid_file %> +logfile=<%= @log_path %>/<%= @log_file %> +pidfile=<%= @run_path %>/<%= @pid_file %> nodaemon=<%= @nodaemon %> minfds=<%= @minfds %> -minfds=<%= @minprocs %> +minprocs=<%= @minprocs %> umask=<%= @umask %> <% if @strip_ansi -%> strip_ansi=<%= @strip_ansi %> @@ -12,7 +12,7 @@ strip_ansi=<%= @strip_ansi %> user=<%= @user %> <% end -%> <% if @identifier -%> -indentifier=<%= @identifier %> +identifier=<%= @identifier %> <% end -%> <% if @directory -%> directory=<%= @directory %> @@ -31,4 +31,4 @@ environment=<%= @env_string %> supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [include] -files=<%= @config_include %>/*.conf +files=<%= @config_include_string %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb index 414e75198ba..39e85199916 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb @@ -1,5 +1,5 @@ [unix_http_server] -file=<%= @unix_socket_file %> +file=<%= @run_path %>/<%= @unix_socket_file %> chmod=<%= @unix_socket_mode %> chown=<%= @unix_socket_owner %>:<%= @unix_socket_group %> <% if @unix_auth -%> @@ -8,7 +8,7 @@ password=<%= @unix_socket_password %> <% end -%> [supervisorctl] -serverurl=unix://<%= @unix_socket_file %> +serverurl=unix://<%= @run_path %>/<%= @unix_socket_file %> <% if @unix_auth -%> username=<%= @unix_username %> password=<%= @unix_password %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp index 6c789c96dc1..0d45ebe1b3d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp @@ -1,9 +1,35 @@ supervisord::program { 'myprogram': - command => 'command --args', - priority => '100', - environment => { + command => 'command --args', + process_name => '%(process_num)s', + numprocs => '1', + numprocs_start => '0', + priority => '999', + autostart => true, + autorestart => 'unexpected', + startsecs => '1', + startretries => '3', + exitcodes => '0,2', + stopsignal => 'TERM', + stopwaitsecs => '10', + stopasgroup => false, + killasgroup => false, + redirect_stderr => false, + stdout_logfile => 'program_foo.log', + stdout_logfile_maxbytes => '50MB', + stdout_logfile_backups => '10', + stdout_capture_maxbytes => '0', + stdout_events_enabled => false, + stderr_logfile => 'program_foo.error', + stderr_logfile_maxbytes => '50MB', + stderr_logfile_backups => '10', + stderr_capture_maxbytes => '0', + stderr_events_enabled => false, + environment => { 'HOME' => '/home/myuser', 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', 'SECRET' => 'mysecret' - } + }, + directory => undef, + umask => '022', + serverurl => 'AUTO' } \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh index 06713c2ee99..c6c08a7b04c 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh @@ -4,17 +4,26 @@ export DEBIAN_FRONTEND=noninteractive VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') -shopt -s nullglob -files=("${VAGRANT_CORE_FOLDER}"/files/exec-once/*) +EXEC_ONCE_DIR="$1" +EXEC_ALWAYS_DIR="$2" -if [[ ! -f '/.puphpet-stuff/exec-once-ran' && (${#files[@]} -gt 0) ]]; then - echo 'Running files in files/exec-once' - find "${VAGRANT_CORE_FOLDER}/files/exec-once" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; - echo 'Finished running files in files/exec-once' - echo 'To run again, delete file /.puphpet-stuff/exec-once-ran' - touch /.puphpet-stuff/exec-once-ran +shopt -s nullglob +files=("${VAGRANT_CORE_FOLDER}"/files/"${EXEC_ONCE_DIR}"/*) + +if [[ (${#files[@]} -gt 0) ]]; then + echo "Running files in files/${EXEC_ONCE_DIR}" + + if [ ! -d "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" ]; then + mkdir "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" + echo "Created directory /.puphpet-stuff/${EXEC_ONCE_DIR}-ran" + fi + + find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ONCE_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec cp -n '{}' "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" \; + find "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" -maxdepth 1 -type f -exec chmod +x '{}' \; -exec {} \; -exec sh -c '>{}' \; + echo "Finished running files in files/${EXEC_ONCE_DIR}" + echo "To run again, delete file(s) you want rerun in /.puphpet-stuff/${EXEC_ONCE_DIR}-ran or the whole folder to rerun all" fi -echo 'Running files in files/exec-always' -find "${VAGRANT_CORE_FOLDER}/files/exec-always" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; -echo 'Finished running files in files/exec-always' +echo "Running files in files/${EXEC_ALWAYS_DIR}" +find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ALWAYS_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; +echo "Finished running files in files/${EXEC_ALWAYS_DIR}" diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh index 6bb7614f9c6..ef00495b2b6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh @@ -5,37 +5,76 @@ VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) VAGRANT_SSH_USERNAME=$(echo "$1") -if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" ]]; then - ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -P "" +function create_key() +{ + BASE_KEY_NAME=$(echo "$1") - if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" ]]; then - if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - apt-get install -y putty-tools >/dev/null - elif [ "${OS}" == 'centos' ]; then - yum -y install putty >/dev/null + if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" ]]; then + ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -P "" + + if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" ]]; then + if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then + apt-get install -y putty-tools >/dev/null + elif [ "${OS}" == 'centos' ]; then + yum -y install putty >/dev/null + fi + + puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" fi - puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" + echo "Your private key for SSH-based authentication has been saved to 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'!" + else + echo "Pre-existing private key found at 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'" fi +} - echo 'Your private key for SSH-based authentication have been saved to "puphpet/files/dot/ssh/"!' -else - echo 'Using pre-existing private key at "puphpet/files/dot/ssh/id_rsa"' +create_key 'root_id_rsa' +create_key 'id_rsa' + +PUBLIC_SSH_KEY=$(cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub") + +echo 'Adding generated key to /root/.ssh/id_rsa' +echo 'Adding generated key to /root/.ssh/id_rsa.pub' +echo 'Adding generated key to /root/.ssh/authorized_keys' + +mkdir -p /root/.ssh + +cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" '/root/.ssh/' +cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" '/root/.ssh/' + +if [[ ! -f '/root/.ssh/authorized_keys' ]] || ! grep -q "${PUBLIC_SSH_KEY}" '/root/.ssh/authorized_keys'; then + cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> '/root/.ssh/authorized_keys' fi -echo 'Adding generated key to /root/.ssh/authorized_keys' -mkdir -p /root/.ssh -cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > '/root/.ssh/authorized_keys' +chown -R root '/root/.ssh' +chgrp -R root '/root/.ssh' +chmod 700 '/root/.ssh' +chmod 644 '/root/.ssh/id_rsa.pub' +chmod 600 '/root/.ssh/id_rsa' chmod 600 '/root/.ssh/authorized_keys' if [ "${VAGRANT_SSH_USERNAME}" != 'root' ]; then VAGRANT_SSH_FOLDER="/home/${VAGRANT_SSH_USERNAME}/.ssh"; - echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/authorized_keys" - cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > "${VAGRANT_SSH_FOLDER}/authorized_keys" - chown "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}/authorized_keys" - chgrp "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}/authorized_keys" - chmod 600 "${VAGRANT_SSH_FOLDER}/authorized_keys" -fi + mkdir -p "${VAGRANT_SSH_FOLDER}" -passwd -d vagrant >/dev/null + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa" + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa.pub" + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/authorized_keys" + + cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" "${VAGRANT_SSH_FOLDER}/id_rsa" + cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" "${VAGRANT_SSH_FOLDER}/id_rsa.pub" + + if [[ ! -f "${VAGRANT_SSH_FOLDER}/authorized_keys" ]] || ! grep -q "${PUBLIC_SSH_KEY}" "${VAGRANT_SSH_FOLDER}/authorized_keys"; then + cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> "${VAGRANT_SSH_FOLDER}/authorized_keys" + fi + + chown -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" + chgrp -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" + chmod 700 "${VAGRANT_SSH_FOLDER}" + chmod 644 "${VAGRANT_SSH_FOLDER}/id_rsa.pub" + chmod 600 "${VAGRANT_SSH_FOLDER}/id_rsa" + chmod 600 "${VAGRANT_SSH_FOLDER}/authorized_keys" + + passwd -d "${VAGRANT_SSH_USERNAME}" >/dev/null +fi From 43f6d3deafe8a185b1e696acbdd4777d5571dd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 15:51:39 +0200 Subject: [PATCH 14/59] Moved dolibarr source to another folder of /var/www so that external libraries get separated from dolibarr core --- dev/vagrant/dolibarrdev/puphpet/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/vagrant/dolibarrdev/puphpet/config.yaml b/dev/vagrant/dolibarrdev/puphpet/config.yaml index 96c01695cec..c9c8440c87d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/config.yaml +++ b/dev/vagrant/dolibarrdev/puphpet/config.yaml @@ -31,7 +31,7 @@ vagrantfile-local: synced_folder: jopH6005bn96: source: ../../../ - target: /var/www + target: /var/www/dolibarr sync_type: default rsync: auto: 'false' @@ -83,7 +83,7 @@ apache: vhosts: b2tOrs1TMtoF: servername: dev.dolibarr.org - docroot: /var/www/htdocs + docroot: /var/www/dolibarr/htdocs port: '80' setenv: - 'APP_ENV dev' @@ -168,7 +168,7 @@ mysql: host: localhost user: user password: user - sql_file: /var/www/dev/initdata/mysqldump_dolibarr_3.5.0.sql + sql_file: /var/www/dolibarr/dev/initdata/mysqldump_dolibarr_3.5.0.sql postgresql: install: '1' settings: From d289306fa4cea7a0fd8d09b33e9b422671c00dc6 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 12 Jul 2014 16:22:49 +0200 Subject: [PATCH 15/59] Security fix --- htdocs/product/stock/fiche.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 4a365e3e50b..8b7aa43b431 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -39,6 +39,7 @@ $action=GETPOST('action'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$id = GETPOST("id",'int'); if (! $sortfield) $sortfield="p.ref"; if (! $sortorder) $sortorder="DESC"; @@ -109,7 +110,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) { $object = new Entrepot($db); - if ($object->fetch($_POST["id"])) + if ($object->fetch($id)) { $object->libelle = $_POST["libelle"]; $object->description = $_POST["desc"]; @@ -120,23 +121,20 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->town = $_POST["town"]; $object->country_id = $_POST["country_id"]; - if ( $object->update($_POST["id"], $user) > 0) + if ( $object->update($id, $user) > 0) { $action = ''; - $_GET["id"] = $_POST["id"]; //$mesg = '
Fiche mise a jour
'; } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } @@ -144,7 +142,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($_POST["cancel"] == $langs->trans("Cancel")) { $action = ''; - $_GET["id"] = $_POST["id"]; } @@ -219,12 +216,13 @@ if ($action == 'create') } else { - if ($_GET["id"]) + $id=GETPOST("id",'int'); + if ($id) { dol_htmloutput_mesg($mesg); $object = new Entrepot($db); - $result = $object->fetch($_GET["id"]); + $result = $object->fetch($id); if ($result < 0) { dol_print_error($db); @@ -368,13 +366,13 @@ else print ''; print ""; - print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); if ($user->rights->stock->mouvement->creer) print ''; if ($user->rights->stock->creer) print ''; print ""; From ec661d0c6ca9af7fb3f3ef29e4d17379f0644890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 23:18:57 +0200 Subject: [PATCH 16/59] Removed index.php and replaced them with blank index.html as it is more appropriate --- htdocs/accountancy/class/index.html | 0 htdocs/accountancy/index.html | 0 htdocs/accountancy/index.php | 1 - htdocs/adherents/canvas/default/index.php | 1 - htdocs/adherents/canvas/default/tpl/index.html | 0 htdocs/adherents/canvas/default/tpl/index.php | 1 - htdocs/adherents/canvas/index.html | 0 htdocs/adherents/canvas/index.php | 1 - htdocs/adherents/cartes/index.html | 0 htdocs/adherents/cartes/index.php | 1 - htdocs/adherents/class/index.html | 0 htdocs/asterisk/index.html | 0 htdocs/asterisk/index.php | 1 - htdocs/barcode/index.html | 0 htdocs/bookmarks/admin/index.html | 0 htdocs/bookmarks/class/index.html | 0 htdocs/bookmarks/index.html | 0 htdocs/bookmarks/index.php | 1 - htdocs/boutique/admin/index.html | 0 htdocs/boutique/client/class/index.html | 0 htdocs/boutique/commande/class/index.html | 0 htdocs/boutique/critiques/class/index.html | 0 htdocs/boutique/promotion/class/index.html | 0 htdocs/cashdesk/admin/index.html | 0 htdocs/cashdesk/class/index.html | 0 htdocs/cashdesk/class/index.php | 1 - htdocs/cashdesk/css/index.html | 0 htdocs/cashdesk/img/index.html | 0 htdocs/cashdesk/img/index.php | 1 - htdocs/cashdesk/include/index.html | 0 htdocs/cashdesk/include/index.php | 1 - htdocs/cashdesk/javascript/index.html | 0 htdocs/cashdesk/javascript/index.php | 1 - htdocs/cashdesk/tpl/index.html | 0 htdocs/cashdesk/tpl/index.php | 1 - htdocs/categories/admin/index.html | 0 htdocs/categories/class/index.html | 0 htdocs/comm/action/class/index.html | 0 htdocs/comm/admin/index.html | 0 htdocs/comm/mailing/class/index.html | 0 htdocs/comm/propal/class/index.html | 0 htdocs/comm/propal/tpl/index.html | 0 htdocs/comm/prospect/class/index.html | 0 htdocs/commande/class/index.html | 0 htdocs/commande/tpl/index.html | 0 htdocs/compta/bank/class/index.html | 0 htdocs/compta/deplacement/class/index.html | 0 htdocs/compta/dons/class/index.html | 0 htdocs/compta/facture/admin/index.html | 0 htdocs/compta/facture/class/index.html | 0 htdocs/compta/facture/index.html | 0 htdocs/compta/facture/index.php | 1 - htdocs/compta/facture/tpl/index.html | 0 htdocs/compta/journal/index.html | 0 htdocs/compta/localtax/class/index.html | 0 htdocs/compta/paiement/cheque/class/index.html | 0 htdocs/compta/paiement/class/index.html | 0 htdocs/compta/payment_sc/index.html | 0 htdocs/compta/prelevement/class/index.html | 0 htdocs/compta/salaries/class/index.html | 0 htdocs/compta/sociales/class/index.html | 0 htdocs/compta/tva/class/index.html | 0 htdocs/conf/index.html | 0 htdocs/contact/canvas/default/index.html | 0 htdocs/contact/canvas/default/index.php | 1 - htdocs/contact/canvas/default/tpl/index.html | 0 htdocs/contact/canvas/default/tpl/index.php | 1 - htdocs/contact/canvas/index.html | 0 htdocs/contact/canvas/index.php | 1 - htdocs/contact/class/index.html | 0 htdocs/contact/index.html | 0 htdocs/contact/index.php | 1 - htdocs/contrat/admin/index.html | 0 htdocs/contrat/class/index.html | 0 htdocs/contrat/tpl/index.html | 0 htdocs/core/ajax/index.html | 0 htdocs/core/ajax/index.php | 1 - htdocs/core/boxes/index.html | 0 htdocs/core/boxes/index.php | 1 - htdocs/core/class/index.html | 0 htdocs/core/class/index.php | 1 - htdocs/core/db/index.html | 0 htdocs/core/db/index.php | 1 - .../filemanagerdol/browser/default/images/icons/32/index.html | 0 .../core/filemanagerdol/browser/default/images/icons/index.html | 0 htdocs/core/filemanagerdol/browser/default/images/index.html | 0 htdocs/core/filemanagerdol/browser/default/index.html | 0 htdocs/core/filemanagerdol/browser/default/js/index.html | 0 htdocs/core/filemanagerdol/browser/index.html | 0 htdocs/core/filemanagerdol/connectors/index.html | 0 htdocs/core/filemanagerdol/connectors/php/index.html | 0 htdocs/core/filemanagerdol/index.html | 0 htdocs/core/filemanagerdol/index.php | 1 - htdocs/core/index.html | 0 htdocs/core/index.php | 1 - htdocs/core/js/index.html | 0 htdocs/core/js/index.php | 1 - htdocs/core/lib/index.html | 0 htdocs/core/lib/index.php | 1 - htdocs/core/login/index.html | 0 htdocs/core/login/index.php | 1 - htdocs/core/menus/index.html | 0 htdocs/core/menus/index.php | 1 - htdocs/core/menus/standard/index.html | 0 htdocs/core/menus/standard/index.php | 1 - htdocs/core/modules/action/index.html | 0 htdocs/core/modules/barcode/doc/index.html | 0 htdocs/core/modules/barcode/index.html | 0 htdocs/core/modules/cheque/index.html | 0 htdocs/core/modules/cheque/pdf/index.html | 0 htdocs/core/modules/commande/doc/index.html | 0 htdocs/core/modules/commande/index.html | 0 htdocs/core/modules/contract/doc/index.html | 0 htdocs/core/modules/contract/index.html | 0 htdocs/core/modules/dons/index.html | 0 htdocs/core/modules/expedition/doc/index.html | 0 htdocs/core/modules/expedition/index.html | 0 htdocs/core/modules/export/index.html | 0 htdocs/core/modules/facture/doc/index.html | 0 htdocs/core/modules/facture/index.html | 0 htdocs/core/modules/fichinter/doc/index.html | 0 htdocs/core/modules/fichinter/index.html | 0 htdocs/core/modules/import/index.html | 0 htdocs/core/modules/index.html | 0 htdocs/core/modules/index.php | 1 - htdocs/core/modules/livraison/index.html | 0 htdocs/core/modules/livraison/pdf/index.html | 0 htdocs/core/modules/mailings/index.html | 0 htdocs/core/modules/member/doc/index.html | 0 htdocs/core/modules/member/index.html | 0 htdocs/core/modules/printsheet/doc/index.html | 0 htdocs/core/modules/printsheet/index.html | 0 htdocs/core/modules/product/index.html | 0 htdocs/core/modules/project/index.html | 0 htdocs/core/modules/project/pdf/index.html | 0 htdocs/core/modules/project/task/index.html | 0 htdocs/core/modules/project/task/pdf/index.html | 0 htdocs/core/modules/propale/doc/index.html | 0 htdocs/core/modules/propale/index.html | 0 htdocs/core/modules/rapport/index.html | 0 htdocs/core/modules/security/generate/index.html | 0 htdocs/core/modules/security/index.html | 0 htdocs/core/modules/societe/doc/index.html | 0 htdocs/core/modules/societe/index.html | 0 htdocs/core/modules/supplier_invoice/index.html | 0 htdocs/core/modules/supplier_invoice/pdf/index.html | 0 htdocs/core/modules/supplier_order/index.html | 0 htdocs/core/modules/supplier_order/pdf/index.html | 0 htdocs/core/modules/syslog/index.html | 0 htdocs/core/tpl/ajax/index.html | 0 htdocs/core/tpl/index.html | 0 htdocs/core/tpl/index.php | 1 - htdocs/core/triggers/index.html | 0 htdocs/core/triggers/index.php | 1 - htdocs/cron/admin/index.html | 0 htdocs/cron/class/index.html | 0 htdocs/cron/index.html | 0 htdocs/ecm/ajax/index.html | 0 htdocs/ecm/class/index.html | 0 htdocs/ecm/tpl/index.html | 0 htdocs/expedition/class/index.html | 0 htdocs/expedition/tpl/index.html | 0 htdocs/exports/class/index.html | 0 htdocs/externalsite/admin/index.html | 0 htdocs/externalsite/index.html | 0 htdocs/externalsite/index.php | 1 - htdocs/fichinter/admin/index.html | 0 htdocs/fichinter/class/index.html | 0 htdocs/fichinter/index.html | 0 htdocs/fichinter/index.php | 1 - htdocs/fichinter/tpl/index.html | 0 htdocs/fourn/ajax/index.html | 0 htdocs/fourn/class/index.html | 0 htdocs/fourn/commande/tpl/index.html | 0 htdocs/fourn/facture/index.html | 0 htdocs/fourn/facture/index.php | 1 - htdocs/fourn/facture/tpl/index.html | 0 htdocs/fourn/paiement/index.html | 0 htdocs/fourn/paiement/index.php | 1 - htdocs/ftp/admin/index.html | 0 htdocs/holiday/admin/index.html | 0 htdocs/holiday/class/index.html | 0 htdocs/holiday/img/index.html | 0 htdocs/imports/class/index.html | 0 htdocs/includes/adodbtime/index.html | 0 htdocs/includes/adodbtime/index.php | 1 - htdocs/includes/index.html | 0 htdocs/includes/index.php | 1 - htdocs/install/doctemplates/index.html | 0 htdocs/install/doctemplates/invoices/index.html | 0 htdocs/install/doctemplates/orders/index.html | 0 htdocs/install/doctemplates/projects/index.html | 0 htdocs/install/doctemplates/proposals/index.html | 0 htdocs/install/doctemplates/shipment/index.html | 0 htdocs/install/doctemplates/tasks/index.html | 0 htdocs/install/doctemplates/thirdparties/index.html | 0 htdocs/install/lib/index.html | 0 htdocs/install/mssql/functions/index.html | 0 htdocs/install/mssql/index.html | 0 htdocs/install/mysql/data/index.html | 0 htdocs/install/mysql/functions/index.html | 0 htdocs/install/mysql/index.html | 0 htdocs/install/mysql/migration/index.html | 0 htdocs/install/mysql/tables/index.html | 0 htdocs/install/pgsql/functions/index.html | 0 htdocs/install/pgsql/index.html | 0 htdocs/livraison/class/index.html | 0 htdocs/livraison/index.html | 0 htdocs/livraison/index.php | 1 - htdocs/mailmanspip/class/index.html | 0 htdocs/mailmanspip/index.html | 0 htdocs/margin/admin/index.html | 0 htdocs/margin/lib/index.html | 0 htdocs/margin/tabs/index.html | 0 htdocs/opensurvey/class/index.html | 0 htdocs/opensurvey/css/index.html | 0 htdocs/opensurvey/img/index.html | 0 htdocs/opensurvey/public/index.html | 0 htdocs/paybox/admin/index.html | 0 htdocs/paybox/img/index.html | 0 htdocs/paybox/index.html | 0 htdocs/paybox/index.php | 1 - htdocs/paybox/lib/index.html | 0 htdocs/paypal/admin/index.html | 0 htdocs/paypal/img/index.html | 0 htdocs/paypal/index.html | 0 htdocs/paypal/index.php | 1 - htdocs/paypal/lib/index.html | 0 htdocs/printipp/admin/index.html | 0 htdocs/printipp/lib/index.html | 0 htdocs/product/admin/index.html | 0 htdocs/product/ajax/index.html | 0 htdocs/product/canvas/index.html | 0 htdocs/product/canvas/index.php | 1 - htdocs/product/canvas/product/index.html | 0 htdocs/product/canvas/product/index.php | 1 - htdocs/product/canvas/product/tpl/index.html | 0 htdocs/product/canvas/product/tpl/index.php | 1 - htdocs/product/canvas/service/index.html | 0 htdocs/product/canvas/service/index.php | 1 - htdocs/product/canvas/service/tpl/index.html | 0 htdocs/product/canvas/service/tpl/index.php | 1 - htdocs/product/class/index.html | 0 htdocs/product/composition/index.html | 0 htdocs/product/composition/index.php | 1 - htdocs/product/stats/index.html | 0 htdocs/product/stats/index.php | 1 - htdocs/product/stock/class/index.html | 0 htdocs/product/stock/img/index.html | 0 htdocs/product/stock/lib/index.html | 0 htdocs/projet/admin/index.html | 0 htdocs/projet/class/index.html | 0 htdocs/public/cron/index.html | 0 htdocs/public/emailing/index.html | 0 htdocs/resource/class/index.html | 0 htdocs/resource/img/index.html | 0 htdocs/resource/index.html | 0 htdocs/societe/ajax/index.html | 0 htdocs/societe/canvas/company/index.html | 0 htdocs/societe/canvas/company/index.php | 1 - htdocs/societe/canvas/company/tpl/index.html | 0 htdocs/societe/canvas/company/tpl/index.php | 1 - htdocs/societe/canvas/index.html | 0 htdocs/societe/canvas/individual/index.html | 0 htdocs/societe/canvas/individual/index.php | 1 - htdocs/societe/canvas/individual/tpl/index.html | 0 htdocs/societe/canvas/individual/tpl/index.php | 1 - htdocs/societe/checkvat/index.html | 0 htdocs/societe/checkvat/index.php | 1 - htdocs/societe/class/index.html | 0 htdocs/societe/tpl/index.html | 0 htdocs/theme/amarok/ckeditor/index.html | 0 htdocs/theme/amarok/img/index.html | 0 htdocs/theme/amarok/index.html | 0 htdocs/theme/amarok/index.php | 1 - htdocs/theme/amarok/tpl/index.html | 0 htdocs/theme/amarok/tpl/index.php | 1 - htdocs/theme/auguria/ckeditor/index.html | 0 htdocs/theme/auguria/img/index.html | 0 htdocs/theme/auguria/img/menus/index.html | 0 htdocs/theme/auguria/index.html | 0 htdocs/theme/auguria/index.php | 1 - htdocs/theme/auguria/tpl/index.html | 0 htdocs/theme/auguria/tpl/index.php | 1 - htdocs/theme/bureau2crea/ckeditor/index.html | 0 htdocs/theme/bureau2crea/img/bouton/index.html | 0 htdocs/theme/bureau2crea/img/index.html | 0 htdocs/theme/bureau2crea/img/menus/index.html | 0 htdocs/theme/bureau2crea/index.html | 0 htdocs/theme/bureau2crea/index.php | 1 - htdocs/theme/bureau2crea/tpl/index.html | 0 htdocs/theme/bureau2crea/tpl/index.php | 1 - htdocs/theme/cameleo/ckeditor/index.html | 0 htdocs/theme/cameleo/img/bouton/index.html | 0 htdocs/theme/cameleo/img/index.html | 0 htdocs/theme/cameleo/img/menus/index.html | 0 htdocs/theme/cameleo/index.html | 0 htdocs/theme/cameleo/index.php | 1 - htdocs/theme/cameleo/tpl/index.html | 0 htdocs/theme/cameleo/tpl/index.php | 1 - htdocs/theme/common/devices/index.html | 0 htdocs/theme/common/emotes/index.html | 0 htdocs/theme/common/flags/index.html | 0 htdocs/theme/common/index.html | 0 htdocs/theme/common/mime/index.html | 0 htdocs/theme/common/treemenu/index.html | 0 htdocs/theme/common/weather/index.html | 0 htdocs/theme/eldy/ckeditor/index.html | 0 htdocs/theme/eldy/img/index.html | 0 htdocs/theme/eldy/img/menus/index.html | 0 htdocs/theme/eldy/index.html | 0 htdocs/theme/eldy/index.php | 1 - htdocs/theme/eldy/tpl/index.html | 0 htdocs/theme/eldy/tpl/index.php | 1 - htdocs/theme/index.html | 0 htdocs/theme/index.php | 1 - htdocs/user/admin/index.html | 0 htdocs/user/class/index.html | 0 htdocs/webservices/admin/index.html | 0 319 files changed, 63 deletions(-) create mode 100644 htdocs/accountancy/class/index.html create mode 100644 htdocs/accountancy/index.html delete mode 100644 htdocs/accountancy/index.php delete mode 100644 htdocs/adherents/canvas/default/index.php create mode 100644 htdocs/adherents/canvas/default/tpl/index.html delete mode 100644 htdocs/adherents/canvas/default/tpl/index.php create mode 100644 htdocs/adherents/canvas/index.html delete mode 100644 htdocs/adherents/canvas/index.php create mode 100644 htdocs/adherents/cartes/index.html delete mode 100644 htdocs/adherents/cartes/index.php create mode 100644 htdocs/adherents/class/index.html create mode 100644 htdocs/asterisk/index.html delete mode 100644 htdocs/asterisk/index.php create mode 100644 htdocs/barcode/index.html create mode 100644 htdocs/bookmarks/admin/index.html create mode 100644 htdocs/bookmarks/class/index.html create mode 100644 htdocs/bookmarks/index.html delete mode 100644 htdocs/bookmarks/index.php create mode 100644 htdocs/boutique/admin/index.html create mode 100644 htdocs/boutique/client/class/index.html create mode 100644 htdocs/boutique/commande/class/index.html create mode 100644 htdocs/boutique/critiques/class/index.html create mode 100644 htdocs/boutique/promotion/class/index.html create mode 100644 htdocs/cashdesk/admin/index.html create mode 100644 htdocs/cashdesk/class/index.html delete mode 100644 htdocs/cashdesk/class/index.php create mode 100644 htdocs/cashdesk/css/index.html create mode 100644 htdocs/cashdesk/img/index.html delete mode 100644 htdocs/cashdesk/img/index.php create mode 100644 htdocs/cashdesk/include/index.html delete mode 100644 htdocs/cashdesk/include/index.php create mode 100644 htdocs/cashdesk/javascript/index.html delete mode 100644 htdocs/cashdesk/javascript/index.php create mode 100644 htdocs/cashdesk/tpl/index.html delete mode 100644 htdocs/cashdesk/tpl/index.php create mode 100644 htdocs/categories/admin/index.html create mode 100644 htdocs/categories/class/index.html create mode 100644 htdocs/comm/action/class/index.html create mode 100644 htdocs/comm/admin/index.html create mode 100644 htdocs/comm/mailing/class/index.html create mode 100644 htdocs/comm/propal/class/index.html create mode 100644 htdocs/comm/propal/tpl/index.html create mode 100644 htdocs/comm/prospect/class/index.html create mode 100644 htdocs/commande/class/index.html create mode 100644 htdocs/commande/tpl/index.html create mode 100644 htdocs/compta/bank/class/index.html create mode 100644 htdocs/compta/deplacement/class/index.html create mode 100644 htdocs/compta/dons/class/index.html create mode 100644 htdocs/compta/facture/admin/index.html create mode 100644 htdocs/compta/facture/class/index.html create mode 100644 htdocs/compta/facture/index.html delete mode 100644 htdocs/compta/facture/index.php create mode 100644 htdocs/compta/facture/tpl/index.html create mode 100644 htdocs/compta/journal/index.html create mode 100644 htdocs/compta/localtax/class/index.html create mode 100644 htdocs/compta/paiement/cheque/class/index.html create mode 100644 htdocs/compta/paiement/class/index.html create mode 100644 htdocs/compta/payment_sc/index.html create mode 100644 htdocs/compta/prelevement/class/index.html create mode 100644 htdocs/compta/salaries/class/index.html create mode 100644 htdocs/compta/sociales/class/index.html create mode 100644 htdocs/compta/tva/class/index.html create mode 100644 htdocs/conf/index.html create mode 100644 htdocs/contact/canvas/default/index.html delete mode 100644 htdocs/contact/canvas/default/index.php create mode 100644 htdocs/contact/canvas/default/tpl/index.html delete mode 100644 htdocs/contact/canvas/default/tpl/index.php create mode 100644 htdocs/contact/canvas/index.html delete mode 100644 htdocs/contact/canvas/index.php create mode 100644 htdocs/contact/class/index.html create mode 100644 htdocs/contact/index.html delete mode 100644 htdocs/contact/index.php create mode 100644 htdocs/contrat/admin/index.html create mode 100644 htdocs/contrat/class/index.html create mode 100644 htdocs/contrat/tpl/index.html create mode 100644 htdocs/core/ajax/index.html delete mode 100644 htdocs/core/ajax/index.php create mode 100644 htdocs/core/boxes/index.html delete mode 100644 htdocs/core/boxes/index.php create mode 100644 htdocs/core/class/index.html delete mode 100644 htdocs/core/class/index.php create mode 100644 htdocs/core/db/index.html delete mode 100644 htdocs/core/db/index.php create mode 100644 htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/images/icons/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/images/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/js/index.html create mode 100644 htdocs/core/filemanagerdol/browser/index.html create mode 100644 htdocs/core/filemanagerdol/connectors/index.html create mode 100644 htdocs/core/filemanagerdol/connectors/php/index.html create mode 100644 htdocs/core/filemanagerdol/index.html delete mode 100644 htdocs/core/filemanagerdol/index.php create mode 100644 htdocs/core/index.html delete mode 100644 htdocs/core/index.php create mode 100644 htdocs/core/js/index.html delete mode 100644 htdocs/core/js/index.php create mode 100644 htdocs/core/lib/index.html delete mode 100644 htdocs/core/lib/index.php create mode 100644 htdocs/core/login/index.html delete mode 100644 htdocs/core/login/index.php create mode 100644 htdocs/core/menus/index.html delete mode 100644 htdocs/core/menus/index.php create mode 100644 htdocs/core/menus/standard/index.html delete mode 100644 htdocs/core/menus/standard/index.php create mode 100644 htdocs/core/modules/action/index.html create mode 100644 htdocs/core/modules/barcode/doc/index.html create mode 100644 htdocs/core/modules/barcode/index.html create mode 100644 htdocs/core/modules/cheque/index.html create mode 100644 htdocs/core/modules/cheque/pdf/index.html create mode 100644 htdocs/core/modules/commande/doc/index.html create mode 100644 htdocs/core/modules/commande/index.html create mode 100644 htdocs/core/modules/contract/doc/index.html create mode 100644 htdocs/core/modules/contract/index.html create mode 100644 htdocs/core/modules/dons/index.html create mode 100644 htdocs/core/modules/expedition/doc/index.html create mode 100644 htdocs/core/modules/expedition/index.html create mode 100644 htdocs/core/modules/export/index.html create mode 100644 htdocs/core/modules/facture/doc/index.html create mode 100644 htdocs/core/modules/facture/index.html create mode 100644 htdocs/core/modules/fichinter/doc/index.html create mode 100644 htdocs/core/modules/fichinter/index.html create mode 100644 htdocs/core/modules/import/index.html create mode 100644 htdocs/core/modules/index.html delete mode 100644 htdocs/core/modules/index.php create mode 100644 htdocs/core/modules/livraison/index.html create mode 100644 htdocs/core/modules/livraison/pdf/index.html create mode 100644 htdocs/core/modules/mailings/index.html create mode 100644 htdocs/core/modules/member/doc/index.html create mode 100644 htdocs/core/modules/member/index.html create mode 100644 htdocs/core/modules/printsheet/doc/index.html create mode 100644 htdocs/core/modules/printsheet/index.html create mode 100644 htdocs/core/modules/product/index.html create mode 100644 htdocs/core/modules/project/index.html create mode 100644 htdocs/core/modules/project/pdf/index.html create mode 100644 htdocs/core/modules/project/task/index.html create mode 100644 htdocs/core/modules/project/task/pdf/index.html create mode 100644 htdocs/core/modules/propale/doc/index.html create mode 100644 htdocs/core/modules/propale/index.html create mode 100644 htdocs/core/modules/rapport/index.html create mode 100644 htdocs/core/modules/security/generate/index.html create mode 100644 htdocs/core/modules/security/index.html create mode 100644 htdocs/core/modules/societe/doc/index.html create mode 100644 htdocs/core/modules/societe/index.html create mode 100644 htdocs/core/modules/supplier_invoice/index.html create mode 100644 htdocs/core/modules/supplier_invoice/pdf/index.html create mode 100644 htdocs/core/modules/supplier_order/index.html create mode 100644 htdocs/core/modules/supplier_order/pdf/index.html create mode 100644 htdocs/core/modules/syslog/index.html create mode 100644 htdocs/core/tpl/ajax/index.html create mode 100644 htdocs/core/tpl/index.html delete mode 100644 htdocs/core/tpl/index.php create mode 100644 htdocs/core/triggers/index.html delete mode 100644 htdocs/core/triggers/index.php create mode 100644 htdocs/cron/admin/index.html create mode 100644 htdocs/cron/class/index.html create mode 100644 htdocs/cron/index.html create mode 100644 htdocs/ecm/ajax/index.html create mode 100644 htdocs/ecm/class/index.html create mode 100644 htdocs/ecm/tpl/index.html create mode 100644 htdocs/expedition/class/index.html create mode 100644 htdocs/expedition/tpl/index.html create mode 100644 htdocs/exports/class/index.html create mode 100644 htdocs/externalsite/admin/index.html create mode 100644 htdocs/externalsite/index.html delete mode 100644 htdocs/externalsite/index.php create mode 100644 htdocs/fichinter/admin/index.html create mode 100644 htdocs/fichinter/class/index.html create mode 100644 htdocs/fichinter/index.html delete mode 100644 htdocs/fichinter/index.php create mode 100644 htdocs/fichinter/tpl/index.html create mode 100644 htdocs/fourn/ajax/index.html create mode 100644 htdocs/fourn/class/index.html create mode 100644 htdocs/fourn/commande/tpl/index.html create mode 100644 htdocs/fourn/facture/index.html delete mode 100644 htdocs/fourn/facture/index.php create mode 100644 htdocs/fourn/facture/tpl/index.html create mode 100644 htdocs/fourn/paiement/index.html delete mode 100644 htdocs/fourn/paiement/index.php create mode 100644 htdocs/ftp/admin/index.html create mode 100644 htdocs/holiday/admin/index.html create mode 100644 htdocs/holiday/class/index.html create mode 100644 htdocs/holiday/img/index.html create mode 100644 htdocs/imports/class/index.html create mode 100644 htdocs/includes/adodbtime/index.html delete mode 100644 htdocs/includes/adodbtime/index.php create mode 100644 htdocs/includes/index.html delete mode 100644 htdocs/includes/index.php create mode 100644 htdocs/install/doctemplates/index.html create mode 100644 htdocs/install/doctemplates/invoices/index.html create mode 100644 htdocs/install/doctemplates/orders/index.html create mode 100644 htdocs/install/doctemplates/projects/index.html create mode 100644 htdocs/install/doctemplates/proposals/index.html create mode 100644 htdocs/install/doctemplates/shipment/index.html create mode 100644 htdocs/install/doctemplates/tasks/index.html create mode 100644 htdocs/install/doctemplates/thirdparties/index.html create mode 100644 htdocs/install/lib/index.html create mode 100644 htdocs/install/mssql/functions/index.html create mode 100644 htdocs/install/mssql/index.html create mode 100644 htdocs/install/mysql/data/index.html create mode 100644 htdocs/install/mysql/functions/index.html create mode 100644 htdocs/install/mysql/index.html create mode 100644 htdocs/install/mysql/migration/index.html create mode 100644 htdocs/install/mysql/tables/index.html create mode 100644 htdocs/install/pgsql/functions/index.html create mode 100644 htdocs/install/pgsql/index.html create mode 100644 htdocs/livraison/class/index.html create mode 100644 htdocs/livraison/index.html delete mode 100644 htdocs/livraison/index.php create mode 100644 htdocs/mailmanspip/class/index.html create mode 100644 htdocs/mailmanspip/index.html create mode 100644 htdocs/margin/admin/index.html create mode 100644 htdocs/margin/lib/index.html create mode 100644 htdocs/margin/tabs/index.html create mode 100644 htdocs/opensurvey/class/index.html create mode 100644 htdocs/opensurvey/css/index.html create mode 100644 htdocs/opensurvey/img/index.html create mode 100644 htdocs/opensurvey/public/index.html create mode 100644 htdocs/paybox/admin/index.html create mode 100644 htdocs/paybox/img/index.html create mode 100644 htdocs/paybox/index.html delete mode 100644 htdocs/paybox/index.php create mode 100644 htdocs/paybox/lib/index.html create mode 100644 htdocs/paypal/admin/index.html create mode 100644 htdocs/paypal/img/index.html create mode 100644 htdocs/paypal/index.html delete mode 100644 htdocs/paypal/index.php create mode 100644 htdocs/paypal/lib/index.html create mode 100644 htdocs/printipp/admin/index.html create mode 100644 htdocs/printipp/lib/index.html create mode 100644 htdocs/product/admin/index.html create mode 100644 htdocs/product/ajax/index.html create mode 100644 htdocs/product/canvas/index.html delete mode 100644 htdocs/product/canvas/index.php create mode 100644 htdocs/product/canvas/product/index.html delete mode 100644 htdocs/product/canvas/product/index.php create mode 100644 htdocs/product/canvas/product/tpl/index.html delete mode 100644 htdocs/product/canvas/product/tpl/index.php create mode 100644 htdocs/product/canvas/service/index.html delete mode 100644 htdocs/product/canvas/service/index.php create mode 100644 htdocs/product/canvas/service/tpl/index.html delete mode 100644 htdocs/product/canvas/service/tpl/index.php create mode 100644 htdocs/product/class/index.html create mode 100644 htdocs/product/composition/index.html delete mode 100644 htdocs/product/composition/index.php create mode 100644 htdocs/product/stats/index.html delete mode 100644 htdocs/product/stats/index.php create mode 100644 htdocs/product/stock/class/index.html create mode 100644 htdocs/product/stock/img/index.html create mode 100644 htdocs/product/stock/lib/index.html create mode 100644 htdocs/projet/admin/index.html create mode 100644 htdocs/projet/class/index.html create mode 100644 htdocs/public/cron/index.html create mode 100644 htdocs/public/emailing/index.html create mode 100644 htdocs/resource/class/index.html create mode 100644 htdocs/resource/img/index.html create mode 100644 htdocs/resource/index.html create mode 100644 htdocs/societe/ajax/index.html create mode 100644 htdocs/societe/canvas/company/index.html delete mode 100644 htdocs/societe/canvas/company/index.php create mode 100644 htdocs/societe/canvas/company/tpl/index.html delete mode 100644 htdocs/societe/canvas/company/tpl/index.php create mode 100644 htdocs/societe/canvas/index.html create mode 100644 htdocs/societe/canvas/individual/index.html delete mode 100644 htdocs/societe/canvas/individual/index.php create mode 100644 htdocs/societe/canvas/individual/tpl/index.html delete mode 100644 htdocs/societe/canvas/individual/tpl/index.php create mode 100644 htdocs/societe/checkvat/index.html delete mode 100644 htdocs/societe/checkvat/index.php create mode 100644 htdocs/societe/class/index.html create mode 100644 htdocs/societe/tpl/index.html create mode 100644 htdocs/theme/amarok/ckeditor/index.html create mode 100644 htdocs/theme/amarok/img/index.html create mode 100644 htdocs/theme/amarok/index.html delete mode 100644 htdocs/theme/amarok/index.php create mode 100644 htdocs/theme/amarok/tpl/index.html delete mode 100644 htdocs/theme/amarok/tpl/index.php create mode 100644 htdocs/theme/auguria/ckeditor/index.html create mode 100644 htdocs/theme/auguria/img/index.html create mode 100644 htdocs/theme/auguria/img/menus/index.html create mode 100644 htdocs/theme/auguria/index.html delete mode 100644 htdocs/theme/auguria/index.php create mode 100644 htdocs/theme/auguria/tpl/index.html delete mode 100644 htdocs/theme/auguria/tpl/index.php create mode 100644 htdocs/theme/bureau2crea/ckeditor/index.html create mode 100644 htdocs/theme/bureau2crea/img/bouton/index.html create mode 100644 htdocs/theme/bureau2crea/img/index.html create mode 100644 htdocs/theme/bureau2crea/img/menus/index.html create mode 100644 htdocs/theme/bureau2crea/index.html delete mode 100644 htdocs/theme/bureau2crea/index.php create mode 100644 htdocs/theme/bureau2crea/tpl/index.html delete mode 100644 htdocs/theme/bureau2crea/tpl/index.php create mode 100644 htdocs/theme/cameleo/ckeditor/index.html create mode 100644 htdocs/theme/cameleo/img/bouton/index.html create mode 100644 htdocs/theme/cameleo/img/index.html create mode 100644 htdocs/theme/cameleo/img/menus/index.html create mode 100644 htdocs/theme/cameleo/index.html delete mode 100644 htdocs/theme/cameleo/index.php create mode 100644 htdocs/theme/cameleo/tpl/index.html delete mode 100644 htdocs/theme/cameleo/tpl/index.php create mode 100644 htdocs/theme/common/devices/index.html create mode 100644 htdocs/theme/common/emotes/index.html create mode 100644 htdocs/theme/common/flags/index.html create mode 100644 htdocs/theme/common/index.html create mode 100644 htdocs/theme/common/mime/index.html create mode 100644 htdocs/theme/common/treemenu/index.html create mode 100644 htdocs/theme/common/weather/index.html create mode 100644 htdocs/theme/eldy/ckeditor/index.html create mode 100644 htdocs/theme/eldy/img/index.html create mode 100644 htdocs/theme/eldy/img/menus/index.html create mode 100644 htdocs/theme/eldy/index.html delete mode 100644 htdocs/theme/eldy/index.php create mode 100644 htdocs/theme/eldy/tpl/index.html delete mode 100644 htdocs/theme/eldy/tpl/index.php create mode 100644 htdocs/theme/index.html delete mode 100644 htdocs/theme/index.php create mode 100644 htdocs/user/admin/index.html create mode 100644 htdocs/user/class/index.html create mode 100644 htdocs/webservices/admin/index.html diff --git a/htdocs/accountancy/class/index.html b/htdocs/accountancy/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/accountancy/index.html b/htdocs/accountancy/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/accountancy/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/default/index.php b/htdocs/adherents/canvas/default/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/default/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/default/tpl/index.html b/htdocs/adherents/canvas/default/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/canvas/default/tpl/index.php b/htdocs/adherents/canvas/default/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/default/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/index.html b/htdocs/adherents/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/canvas/index.php b/htdocs/adherents/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/cartes/index.html b/htdocs/adherents/cartes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/cartes/index.php b/htdocs/adherents/cartes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/cartes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/class/index.html b/htdocs/adherents/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/asterisk/index.html b/htdocs/asterisk/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/asterisk/index.php b/htdocs/asterisk/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/asterisk/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/barcode/index.html b/htdocs/barcode/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/admin/index.html b/htdocs/bookmarks/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/class/index.html b/htdocs/bookmarks/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/index.html b/htdocs/bookmarks/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/index.php b/htdocs/bookmarks/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/bookmarks/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/boutique/admin/index.html b/htdocs/boutique/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/client/class/index.html b/htdocs/boutique/client/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/commande/class/index.html b/htdocs/boutique/commande/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/critiques/class/index.html b/htdocs/boutique/critiques/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/promotion/class/index.html b/htdocs/boutique/promotion/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/admin/index.html b/htdocs/cashdesk/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/class/index.html b/htdocs/cashdesk/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/class/index.php b/htdocs/cashdesk/class/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/class/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/css/index.html b/htdocs/cashdesk/css/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/img/index.html b/htdocs/cashdesk/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/img/index.php b/htdocs/cashdesk/img/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/img/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/include/index.html b/htdocs/cashdesk/include/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/include/index.php b/htdocs/cashdesk/include/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/include/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/javascript/index.html b/htdocs/cashdesk/javascript/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/javascript/index.php b/htdocs/cashdesk/javascript/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/javascript/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/tpl/index.html b/htdocs/cashdesk/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/tpl/index.php b/htdocs/cashdesk/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/categories/admin/index.html b/htdocs/categories/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/categories/class/index.html b/htdocs/categories/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/action/class/index.html b/htdocs/comm/action/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/admin/index.html b/htdocs/comm/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/mailing/class/index.html b/htdocs/comm/mailing/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/propal/class/index.html b/htdocs/comm/propal/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/propal/tpl/index.html b/htdocs/comm/propal/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/prospect/class/index.html b/htdocs/comm/prospect/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/commande/class/index.html b/htdocs/commande/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/commande/tpl/index.html b/htdocs/commande/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/bank/class/index.html b/htdocs/compta/bank/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/deplacement/class/index.html b/htdocs/compta/deplacement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/dons/class/index.html b/htdocs/compta/dons/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/admin/index.html b/htdocs/compta/facture/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/class/index.html b/htdocs/compta/facture/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/index.html b/htdocs/compta/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/compta/facture/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/compta/facture/tpl/index.html b/htdocs/compta/facture/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/journal/index.html b/htdocs/compta/journal/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/localtax/class/index.html b/htdocs/compta/localtax/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/paiement/cheque/class/index.html b/htdocs/compta/paiement/cheque/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/paiement/class/index.html b/htdocs/compta/paiement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/payment_sc/index.html b/htdocs/compta/payment_sc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/prelevement/class/index.html b/htdocs/compta/prelevement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/salaries/class/index.html b/htdocs/compta/salaries/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/sociales/class/index.html b/htdocs/compta/sociales/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/tva/class/index.html b/htdocs/compta/tva/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/conf/index.html b/htdocs/conf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/index.html b/htdocs/contact/canvas/default/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/index.php b/htdocs/contact/canvas/default/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/default/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/canvas/default/tpl/index.html b/htdocs/contact/canvas/default/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/tpl/index.php b/htdocs/contact/canvas/default/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/default/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/canvas/index.html b/htdocs/contact/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/index.php b/htdocs/contact/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/class/index.html b/htdocs/contact/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/index.html b/htdocs/contact/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contrat/admin/index.html b/htdocs/contrat/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contrat/tpl/index.html b/htdocs/contrat/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/ajax/index.html b/htdocs/core/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/ajax/index.php b/htdocs/core/ajax/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/ajax/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/boxes/index.html b/htdocs/core/boxes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/boxes/index.php b/htdocs/core/boxes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/boxes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/class/index.html b/htdocs/core/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/class/index.php b/htdocs/core/class/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/class/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/db/index.html b/htdocs/core/db/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/db/index.php b/htdocs/core/db/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/db/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html b/htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/index.html b/htdocs/core/filemanagerdol/browser/default/images/icons/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/images/index.html b/htdocs/core/filemanagerdol/browser/default/images/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/index.html b/htdocs/core/filemanagerdol/browser/default/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/js/index.html b/htdocs/core/filemanagerdol/browser/default/js/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/index.html b/htdocs/core/filemanagerdol/browser/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/connectors/index.html b/htdocs/core/filemanagerdol/connectors/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/connectors/php/index.html b/htdocs/core/filemanagerdol/connectors/php/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/index.html b/htdocs/core/filemanagerdol/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/index.php b/htdocs/core/filemanagerdol/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/filemanagerdol/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/index.html b/htdocs/core/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/index.php b/htdocs/core/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/js/index.html b/htdocs/core/js/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/js/index.php b/htdocs/core/js/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/js/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/lib/index.html b/htdocs/core/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/lib/index.php b/htdocs/core/lib/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/lib/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/login/index.html b/htdocs/core/login/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/login/index.php b/htdocs/core/login/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/login/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/index.html b/htdocs/core/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/menus/index.php b/htdocs/core/menus/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/standard/index.html b/htdocs/core/menus/standard/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/menus/standard/index.php b/htdocs/core/menus/standard/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/standard/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/modules/action/index.html b/htdocs/core/modules/action/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/barcode/doc/index.html b/htdocs/core/modules/barcode/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/barcode/index.html b/htdocs/core/modules/barcode/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/cheque/index.html b/htdocs/core/modules/cheque/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/cheque/pdf/index.html b/htdocs/core/modules/cheque/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/commande/doc/index.html b/htdocs/core/modules/commande/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/commande/index.html b/htdocs/core/modules/commande/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/contract/doc/index.html b/htdocs/core/modules/contract/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/contract/index.html b/htdocs/core/modules/contract/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/dons/index.html b/htdocs/core/modules/dons/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/expedition/doc/index.html b/htdocs/core/modules/expedition/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/expedition/index.html b/htdocs/core/modules/expedition/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/export/index.html b/htdocs/core/modules/export/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/facture/doc/index.html b/htdocs/core/modules/facture/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/facture/index.html b/htdocs/core/modules/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/fichinter/doc/index.html b/htdocs/core/modules/fichinter/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/fichinter/index.html b/htdocs/core/modules/fichinter/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/import/index.html b/htdocs/core/modules/import/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/index.html b/htdocs/core/modules/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/index.php b/htdocs/core/modules/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/modules/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/modules/livraison/index.html b/htdocs/core/modules/livraison/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/livraison/pdf/index.html b/htdocs/core/modules/livraison/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/mailings/index.html b/htdocs/core/modules/mailings/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/member/doc/index.html b/htdocs/core/modules/member/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/member/index.html b/htdocs/core/modules/member/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/printsheet/doc/index.html b/htdocs/core/modules/printsheet/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/printsheet/index.html b/htdocs/core/modules/printsheet/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/product/index.html b/htdocs/core/modules/product/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/index.html b/htdocs/core/modules/project/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/pdf/index.html b/htdocs/core/modules/project/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/task/index.html b/htdocs/core/modules/project/task/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/task/pdf/index.html b/htdocs/core/modules/project/task/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/propale/doc/index.html b/htdocs/core/modules/propale/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/propale/index.html b/htdocs/core/modules/propale/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/rapport/index.html b/htdocs/core/modules/rapport/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/security/generate/index.html b/htdocs/core/modules/security/generate/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/security/index.html b/htdocs/core/modules/security/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/societe/doc/index.html b/htdocs/core/modules/societe/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/societe/index.html b/htdocs/core/modules/societe/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_invoice/index.html b/htdocs/core/modules/supplier_invoice/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_invoice/pdf/index.html b/htdocs/core/modules/supplier_invoice/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_order/index.html b/htdocs/core/modules/supplier_order/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_order/pdf/index.html b/htdocs/core/modules/supplier_order/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/syslog/index.html b/htdocs/core/modules/syslog/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/ajax/index.html b/htdocs/core/tpl/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/index.html b/htdocs/core/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/index.php b/htdocs/core/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/triggers/index.html b/htdocs/core/triggers/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/triggers/index.php b/htdocs/core/triggers/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/triggers/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cron/admin/index.html b/htdocs/cron/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cron/class/index.html b/htdocs/cron/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cron/index.html b/htdocs/cron/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/ajax/index.html b/htdocs/ecm/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/class/index.html b/htdocs/ecm/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/tpl/index.html b/htdocs/ecm/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/expedition/class/index.html b/htdocs/expedition/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/expedition/tpl/index.html b/htdocs/expedition/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/exports/class/index.html b/htdocs/exports/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/admin/index.html b/htdocs/externalsite/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/index.html b/htdocs/externalsite/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/index.php b/htdocs/externalsite/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/externalsite/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fichinter/admin/index.html b/htdocs/fichinter/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/class/index.html b/htdocs/fichinter/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/index.html b/htdocs/fichinter/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fichinter/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fichinter/tpl/index.html b/htdocs/fichinter/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/ajax/index.html b/htdocs/fourn/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/class/index.html b/htdocs/fourn/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/commande/tpl/index.html b/htdocs/fourn/commande/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/facture/index.html b/htdocs/fourn/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fourn/facture/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fourn/facture/tpl/index.html b/htdocs/fourn/facture/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/paiement/index.html b/htdocs/fourn/paiement/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/paiement/index.php b/htdocs/fourn/paiement/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fourn/paiement/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/ftp/admin/index.html b/htdocs/ftp/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/admin/index.html b/htdocs/holiday/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/class/index.html b/htdocs/holiday/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/img/index.html b/htdocs/holiday/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/imports/class/index.html b/htdocs/imports/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/adodbtime/index.html b/htdocs/includes/adodbtime/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/adodbtime/index.php b/htdocs/includes/adodbtime/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/includes/adodbtime/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/includes/index.html b/htdocs/includes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/index.php b/htdocs/includes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/includes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/install/doctemplates/index.html b/htdocs/install/doctemplates/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/invoices/index.html b/htdocs/install/doctemplates/invoices/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/orders/index.html b/htdocs/install/doctemplates/orders/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/projects/index.html b/htdocs/install/doctemplates/projects/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/proposals/index.html b/htdocs/install/doctemplates/proposals/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/shipment/index.html b/htdocs/install/doctemplates/shipment/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/tasks/index.html b/htdocs/install/doctemplates/tasks/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/thirdparties/index.html b/htdocs/install/doctemplates/thirdparties/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/lib/index.html b/htdocs/install/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mssql/functions/index.html b/htdocs/install/mssql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mssql/index.html b/htdocs/install/mssql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/data/index.html b/htdocs/install/mysql/data/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/functions/index.html b/htdocs/install/mysql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/index.html b/htdocs/install/mysql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/migration/index.html b/htdocs/install/mysql/migration/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/tables/index.html b/htdocs/install/mysql/tables/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/pgsql/functions/index.html b/htdocs/install/pgsql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/pgsql/index.html b/htdocs/install/pgsql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/class/index.html b/htdocs/livraison/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/index.html b/htdocs/livraison/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/index.php b/htdocs/livraison/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/livraison/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/mailmanspip/class/index.html b/htdocs/mailmanspip/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/mailmanspip/index.html b/htdocs/mailmanspip/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/admin/index.html b/htdocs/margin/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/lib/index.html b/htdocs/margin/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/tabs/index.html b/htdocs/margin/tabs/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/class/index.html b/htdocs/opensurvey/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/css/index.html b/htdocs/opensurvey/css/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/img/index.html b/htdocs/opensurvey/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/public/index.html b/htdocs/opensurvey/public/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/admin/index.html b/htdocs/paybox/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/img/index.html b/htdocs/paybox/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/index.html b/htdocs/paybox/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/index.php b/htdocs/paybox/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/paybox/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/paybox/lib/index.html b/htdocs/paybox/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/admin/index.html b/htdocs/paypal/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/img/index.html b/htdocs/paypal/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/index.html b/htdocs/paypal/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/index.php b/htdocs/paypal/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/paypal/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/paypal/lib/index.html b/htdocs/paypal/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/printipp/admin/index.html b/htdocs/printipp/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/printipp/lib/index.html b/htdocs/printipp/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/admin/index.html b/htdocs/product/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/ajax/index.html b/htdocs/product/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/index.html b/htdocs/product/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/index.php b/htdocs/product/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/product/index.html b/htdocs/product/canvas/product/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/product/index.php b/htdocs/product/canvas/product/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/product/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/product/tpl/index.html b/htdocs/product/canvas/product/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/product/tpl/index.php b/htdocs/product/canvas/product/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/product/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/service/index.html b/htdocs/product/canvas/service/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/service/index.php b/htdocs/product/canvas/service/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/service/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/service/tpl/index.html b/htdocs/product/canvas/service/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/service/tpl/index.php b/htdocs/product/canvas/service/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/service/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/class/index.html b/htdocs/product/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/composition/index.html b/htdocs/product/composition/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/composition/index.php b/htdocs/product/composition/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/composition/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/stats/index.html b/htdocs/product/stats/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/stats/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/stock/class/index.html b/htdocs/product/stock/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stock/img/index.html b/htdocs/product/stock/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stock/lib/index.html b/htdocs/product/stock/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/projet/admin/index.html b/htdocs/projet/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/projet/class/index.html b/htdocs/projet/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/public/cron/index.html b/htdocs/public/cron/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/public/emailing/index.html b/htdocs/public/emailing/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/class/index.html b/htdocs/resource/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/img/index.html b/htdocs/resource/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/index.html b/htdocs/resource/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/ajax/index.html b/htdocs/societe/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/index.html b/htdocs/societe/canvas/company/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/index.php b/htdocs/societe/canvas/company/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/company/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/company/tpl/index.html b/htdocs/societe/canvas/company/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/tpl/index.php b/htdocs/societe/canvas/company/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/company/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/index.html b/htdocs/societe/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/index.html b/htdocs/societe/canvas/individual/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/index.php b/htdocs/societe/canvas/individual/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/individual/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/individual/tpl/index.html b/htdocs/societe/canvas/individual/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/tpl/index.php b/htdocs/societe/canvas/individual/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/individual/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/checkvat/index.html b/htdocs/societe/checkvat/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/checkvat/index.php b/htdocs/societe/checkvat/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/checkvat/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/class/index.html b/htdocs/societe/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/tpl/index.html b/htdocs/societe/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/ckeditor/index.html b/htdocs/theme/amarok/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/img/index.html b/htdocs/theme/amarok/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/index.html b/htdocs/theme/amarok/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/index.php b/htdocs/theme/amarok/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/amarok/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/amarok/tpl/index.html b/htdocs/theme/amarok/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/tpl/index.php b/htdocs/theme/amarok/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/amarok/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/auguria/ckeditor/index.html b/htdocs/theme/auguria/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/img/index.html b/htdocs/theme/auguria/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/img/menus/index.html b/htdocs/theme/auguria/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/index.html b/htdocs/theme/auguria/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/index.php b/htdocs/theme/auguria/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/auguria/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/auguria/tpl/index.html b/htdocs/theme/auguria/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/tpl/index.php b/htdocs/theme/auguria/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/auguria/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/bureau2crea/ckeditor/index.html b/htdocs/theme/bureau2crea/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/bouton/index.html b/htdocs/theme/bureau2crea/img/bouton/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/index.html b/htdocs/theme/bureau2crea/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/menus/index.html b/htdocs/theme/bureau2crea/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/index.html b/htdocs/theme/bureau2crea/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/index.php b/htdocs/theme/bureau2crea/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/bureau2crea/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/bureau2crea/tpl/index.html b/htdocs/theme/bureau2crea/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/tpl/index.php b/htdocs/theme/bureau2crea/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/bureau2crea/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/cameleo/ckeditor/index.html b/htdocs/theme/cameleo/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/bouton/index.html b/htdocs/theme/cameleo/img/bouton/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/index.html b/htdocs/theme/cameleo/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/menus/index.html b/htdocs/theme/cameleo/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/index.html b/htdocs/theme/cameleo/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/index.php b/htdocs/theme/cameleo/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/cameleo/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/cameleo/tpl/index.html b/htdocs/theme/cameleo/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/tpl/index.php b/htdocs/theme/cameleo/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/cameleo/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/common/devices/index.html b/htdocs/theme/common/devices/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/emotes/index.html b/htdocs/theme/common/emotes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/flags/index.html b/htdocs/theme/common/flags/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/index.html b/htdocs/theme/common/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/mime/index.html b/htdocs/theme/common/mime/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/treemenu/index.html b/htdocs/theme/common/treemenu/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/weather/index.html b/htdocs/theme/common/weather/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/ckeditor/index.html b/htdocs/theme/eldy/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/img/index.html b/htdocs/theme/eldy/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/img/menus/index.html b/htdocs/theme/eldy/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/index.html b/htdocs/theme/eldy/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/index.php b/htdocs/theme/eldy/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/eldy/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/eldy/tpl/index.html b/htdocs/theme/eldy/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/tpl/index.php b/htdocs/theme/eldy/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/eldy/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/index.html b/htdocs/theme/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/index.php b/htdocs/theme/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/user/admin/index.html b/htdocs/user/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/user/class/index.html b/htdocs/user/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/webservices/admin/index.html b/htdocs/webservices/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d From 2dd3bacd4f31dfba28f37ef7b3626148e3e8c623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 23:30:01 +0200 Subject: [PATCH 17/59] Removed no longer needed files --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d0f4a919cde..9b639ce64a6 100755 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,4 @@ doxygen_warnings.log *.iml Thumbs.db # Vagrant generated files -.vagrant -/index.html -/phpmyadmin -/xhprof +.vagrant \ No newline at end of file From 4bc8e026b69b58becd91bc924d1cf4a0755824c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 13 Jul 2014 19:51:44 +0200 Subject: [PATCH 18/59] [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly --- ChangeLog | 1 + htdocs/core/class/html.formfile.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 502cbc40536..d9c0706eb54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ce484e5d43..d2cba220bcf 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -800,9 +801,10 @@ class FormFile // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); + print ''; From b0ae2fe2aaf069a4a9893d09ae3d588742862318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 14 Jul 2014 01:32:57 +0200 Subject: [PATCH 19/59] Fixed a bug introduced in commit 0916d2cf3b --- htdocs/projet/element.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4075113d625..edc633a7fc8 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -217,12 +217,10 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); $selectList=$formproject->select_element($tablename,$project->societe->id); - if ($selectList<0) { + + if (!$selectList || ($selectList<0)) { setEventMessage($formproject->error,'errors'); - } - - if ($selectList) - { + } else { print '
'; print ''; print ''; From 8eced58ba0eeb8c7ab48a3deb0f480d4dd20d8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garc=C3=ADa?= Date: Mon, 14 Jul 2014 19:16:28 +0200 Subject: [PATCH 20/59] Removed @ operator from dol_include_once Adding @ operator to include_once makes include errors untraceable, it shouldn't be there. Errors must be thrown so that we notice them. It is PHP configuration's choice to decide wether to log them or print them. --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b1f11590bdc..78326ee3bb7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -243,9 +243,9 @@ function dol_include_once($relpath, $classname='') global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] if (! empty($classname) && ! class_exists($classname)) { - return @include dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include dol_buildpath($relpath); } else { - return @include_once dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include_once dol_buildpath($relpath); } } From 3930c8829ef5a8cb6e305ca2d828e4f4a019525c Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 21/59] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 753e1a0892b..ab80004b0c7 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From 3816e0fe1485bdbe73cdf29b340a5c40ebf0e749 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:39:08 +0200 Subject: [PATCH 22/59] Fix: Import ProfId1 to siren and ProfId2 to siret --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 502cbc40536..666a9ffd68a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From f8b5bac05c4e632e7e37be2e75c551cd93155c8b Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 23/59] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 5284f5ef55b..4367aae3789 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From 3a8835892e9bf212d7bacbe939f47e26842b0019 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:42:54 +0200 Subject: [PATCH 24/59] Fix: Import ProfId1 to siren and ProfId2 to siret Conflicts: ChangeLog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index b7fff144efe..9631016c06d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -154,6 +154,8 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From 769c9a9b66f6643716b96888ef625a9f16ee039e Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 15 Jul 2014 11:22:16 +0200 Subject: [PATCH 25/59] FIX stock inconsistency when activating batch management on product which already have stock --- htdocs/langs/en_US/productbatch.lang | 1 + htdocs/langs/fr_FR/productbatch.lang | 4 ++- htdocs/product/class/product.class.php | 34 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 8b93ba92fb8..07fb45985d5 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -16,3 +16,4 @@ printEatby= Eat-by: %s printSellby= Sell-by: %s printQty= Qty: %d AddDispatchBatchLine=Add a line for Shelf Life dispatching +BatchDefaultNumber= Undefined \ No newline at end of file diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 488e1f2fbb9..68e76dca46b 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -14,4 +14,6 @@ DetailBatchFormat= C:%s UO: %s LOT: %s (Qté : %d) printBatch= Lot: %s printEatby= DLC: %s printSellby= DLUO: %s -printQty= Qté: %d \ No newline at end of file +printQty= Qté: %d +AddDispatchBatchLine=Ajouter une ligne de dispatch +BatchDefaultNumber= Indéfini \ No newline at end of file diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 32d96ec60fc..cc824bce3c6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -589,6 +589,39 @@ class Product extends CommonObject if ($result >= 0) { + if (empty($this->oldcopy)) + { + $org=new self($db); + $org->fetch($this->id); + $this->oldcopy=$org; + } + // test if batch management is activated on existing product + if ($this->hasbatch() && !$this->oldcopy->hasbatch()) + { + $this->load_stock(); + foreach ($this->stock_warehouse as $idW => $ObjW) + { + $qty_batch = 0; + foreach ($ObjW->detail_batch as $detail) + { + $qty_batch += $detail->qty; + } + // Quantities in batch details are not same same as stock quantity + // So we add a default batch record + if ($ObjW->real <> $qty_batch) + { + $ObjBatch = new Productbatch($this->db); + $ObjBatch->batch = $langs->trans('BatchDefaultNumber'); + $ObjBatch->qty = $ObjW->real - $qty_batch; + $ObjBatch->fk_product_stock = $ObjW->id; + if ($ObjBatch->create($user,1) < 0) + { + $error++; + $this->errors=$ObjBatch->errors; + } + } + } + } // For automatic creation if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); @@ -2918,6 +2951,7 @@ class Product extends CommonObject $this->stock_warehouse[$row->fk_entrepot] = new stdClass(); $this->stock_warehouse[$row->fk_entrepot]->real = $row->reel; $this->stock_warehouse[$row->fk_entrepot]->pmp = $row->pmp; + $this->stock_warehouse[$row->fk_entrepot]->id = $row->rowid; if ($this->hasbatch()) $this->stock_warehouse[$row->fk_entrepot]->detail_batch=Productbatch::findAll($this->db,$row->rowid,1); $this->stock_reel+=$row->reel; $i++; From ad4512cb24de7df7625f43896225c8aa8f63b0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 15 Jul 2014 17:18:41 +0200 Subject: [PATCH 26/59] Avoiding include in case of unexisting file --- htdocs/core/lib/functions.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 78326ee3bb7..eb2cc15de15 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -236,11 +236,15 @@ function dol_getprefix() * * @param string $relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...) * @param string $classname Class name - * @return int false if include fails. + * @return bool */ function dol_include_once($relpath, $classname='') { - global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] + + if (!file_exists($relpath)) { + dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_ERR); + return false; + } if (! empty($classname) && ! class_exists($classname)) { return include dol_buildpath($relpath); From f38ab469289f4b58255f23c020f54a591c65bf6a Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 15 Jul 2014 19:02:43 +0200 Subject: [PATCH 27/59] correction typo --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index cc824bce3c6..7a77f308509 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -591,7 +591,7 @@ class Product extends CommonObject { if (empty($this->oldcopy)) { - $org=new self($db); + $org=new self($this->db); $org->fetch($this->id); $this->oldcopy=$org; } From 0cb11a537d35a336956e94536f6d011f70512014 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jul 2014 23:27:11 +0200 Subject: [PATCH 28/59] Fix: IP address of user was lost into paypal confirm email --- htdocs/paybox/lib/paybox.lib.php | 23 ----------------------- htdocs/paypal/lib/paypal.lib.php | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index f56367c9a36..09bacc3764f 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -183,27 +183,6 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) // Formulaire pour module Paybox print ''."\n"; - // For Paybox V1 (IBS_xxx) - /* - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - */ - // For Paybox V2 (PBX_xxx) print ''."\n"; print ''."\n"; @@ -228,8 +207,6 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) print ''."\n"; - // Formulaire pour module Paybox v2 (PBX_xxx) - print "\n"; print ''."\n"; } - - if ($mesg) print $mesg; - /* * Barre d'action */ @@ -1438,8 +1431,6 @@ if ($step == 5 && $datatoimport) } print ''; } - - if ($mesg) print $mesg; } @@ -1679,8 +1670,6 @@ if ($step == 6 && $datatoimport) print $langs->trans("FileWasImported",$importid).'
'; print $langs->trans("YouCanUseImportIdToFindRecord",$importid).'
'; print ''; - - if ($mesg) print $mesg; } diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 7eefafb9c8c..30e02591190 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -67,7 +67,7 @@ if ($action == 'setvalue' && $user->admin) if (! $error) { $db->commit(); - $mesg='
'.$langs->trans("SetupSaved").'
'; + setEventMessage($langs->trans("SetupSaved")); } else { @@ -227,8 +227,6 @@ if (! empty($conf->adherent->enabled)) print "
"; print info_admin($langs->trans("YouCanAddTagOnUrl")); -dol_htmloutput_mesg($mesg); - $db->close(); dol_fiche_end(); llxFooter(); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 527615cc7c4..037bb2b1f8b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -43,7 +43,7 @@ $rowid=GETPOST('rowid','int'); $action=GETPOST('action', 'alpha'); $socid=GETPOST('socid', 'int'); $backtopage=GETPOST('backtopage','alpha'); -$error=0; $mesg = ''; +$error=0; // If socid provided by ajax company selector if (! empty($_REQUEST['search_fourn_id'])) @@ -92,7 +92,7 @@ if ($action == 'remove_pf') { $result=$product->remove_product_fournisseur_price($rowid); $action = ''; - $mesg = '
'.$langs->trans("PriceRemoved").'.
'; + setEventMessage($langs->trans("PriceRemoved")); } } } @@ -112,27 +112,27 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($tva_tx == '') { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors'); } if (empty($quantity)) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors'); } if (empty($ref_fourn)) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors'); } if ($id_fourn <= 0) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors'); } if ($_POST["price"] < 0 || $_POST["price"] == '') { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors'); } $product = new ProductFournisseur($db); @@ -140,7 +140,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($result <= 0) { $error++; - $mesg=$product->error; + setEventMessage($product->error, 'errors'); } if (! $error) @@ -157,12 +157,12 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) $product->fetch($product->product_id_already_linked); $productLink = $product->getNomUrl(1,'supplier'); - $mesg='
'.$langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink).'
'; + setEventMessage($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink), 'errors'); } else if ($ret < 0) { $error++; - $mesg='
'.$product->error.'
'; + setEventMessage($product->error, 'errors'); } } @@ -177,7 +177,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($ret < 0) { $error++; - $mesg='
'.$product->error.'
'; + setEventMessage($product->error, 'errors'); } } @@ -264,10 +264,6 @@ if ($id || $ref) print "\n"; - - dol_htmloutput_mesg($mesg); - - // Form to add or update a price if (($action == 'add_price' || $action == 'updateprice' ) && ($user->rights->produit->creer || $user->rights->service->creer)) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index f5db524ed27..9c0597ec0f6 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -94,15 +94,16 @@ if ($action == 'update_price' && ! $_POST ["cancel"] && ($user->rights->produit- if ($object->updatePrice($newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr, $newpsq) > 0) { $action = ''; - $mesg = '
' . $langs->trans("RecordSaved") . '
'; + setEventMessage($langs->trans("RecordSaved")); } else { $action = 'edit_price'; - $mesg = '
' . $object->error . '
'; + setEventMessage($object->error, 'errors'); } } else if ($action == 'delete' && $user->rights->produit->supprimer) { $result = $object->log_price_delete($user, $_GET ["lineid"]); - if ($result < 0) - $mesg = '
' . $object->error . '
'; + if ($result < 0) { + setEventMessage($object->error, 'errors'); + } } /** @@ -136,11 +137,11 @@ if ($action == 'update_price_by_qty') { // Ajout / Mise à jour d'un prix par qu if (empty($quantity)) { $error ++; - $mesg = '
' . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")) . '
'; + setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), 'errors'); } if (empty($newprice)) { $error ++; - $mesg = '
' . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")) . '
'; + setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), 'errors'); } if (! $error) { // Calcul du prix HT et du prix unitaire @@ -547,10 +548,6 @@ print "
  
'; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.$fileinfo['extension']; // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print '
\n"; print "\n"; -if (! empty($mesg)) { - dol_htmloutput_mesg($mesg); -} - /* ************************************************************************** */ /* */ /* Barre d'action */ diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 874b082ceae..86e930d8cf1 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -43,8 +43,6 @@ $id = GETPOST("id",'int'); if (! $sortfield) $sortfield="p.ref"; if (! $sortorder) $sortorder="DESC"; -$mesg = ''; - // Security check $result=restrictedArea($user,'stock'); @@ -80,10 +78,10 @@ if ($action == 'add' && $user->rights->stock->creer) } $action = 'create'; - $mesg='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } else { - $mesg='
'.$langs->trans("ErrorWarehouseRefRequired").'
'; + setEventMessage($langs->trans("ErrorWarehouseRefRequired"), 'errors'); $action="create"; // Force retour sur page creation } } @@ -101,7 +99,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right } else { - $mesg='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); $action=''; } } @@ -124,18 +122,17 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) if ( $object->update($id, $user) > 0) { $action = ''; - //$mesg = '
Fiche mise a jour
'; } else { $action = 'edit'; - $mesg = '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } else { $action = 'edit'; - $mesg = '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } @@ -167,8 +164,6 @@ if ($action == 'create') print ''; print ''."\n"; - dol_htmloutput_mesg($mesg); - print ''; // Ref @@ -219,8 +214,6 @@ else $id=GETPOST("id",'int'); if ($id) { - dol_htmloutput_mesg($mesg); - $object = new Entrepot($db); $result = $object->fetch($id); if ($result < 0) @@ -496,7 +489,7 @@ else */ if (($action == 'edit' || $action == 're-edit') && 1) { - print_fiche_titre($langs->trans("WarehouseEdit"), $mesg); + $langs->trans("WarehouseEdit"); print ''; print ''; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 3a5827904f2..5251f6bc750 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -45,7 +45,6 @@ $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); $subaction = GETPOST('subaction','alpha'); $group = GETPOST("group","int",3); -$message=''; // Define value to know what current user can do on users $canadduser=(! empty($user->admin) || $user->rights->user->user->creer); @@ -110,6 +109,8 @@ if ($action == 'confirm_disable' && $confirm == "yes" && $candisableuser) } if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) { + $error = 0; + if ($id <> $user->id) { $object->fetch($id); @@ -119,11 +120,12 @@ if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) $nb = $object->getNbOfUsers("active"); if ($nb >= $conf->file->main_limit_users) { - $message='
'.$langs->trans("YourQuotaOfUsersIsReached").'
'; + $error++; + setEventMessage($langs->trans("YourQuotaOfUsersIsReached"), 'errors'); } } - if (! $message) + if (! $error) { $object->setstatus(1); header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); @@ -142,7 +144,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) if ($result < 0) { $langs->load("errors"); - $message='
'.$langs->trans("ErrorUserCannotBeDelete").'
'; + setEventMessage($langs->trans("ErrorUserCannotBeDelete"), 'errors'); } else { @@ -155,14 +157,18 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) // Action ajout user if ($action == 'add' && $canadduser) { + $error = 0; + if (! $_POST["lastname"]) { - $message='
'.$langs->trans("NameNotDefined").'
'; + $error++; + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="create"; // Go back to create page } if (! $_POST["login"]) { - $message='
'.$langs->trans("LoginNotDefined").'
'; + $error++; + setEventMessage($langs->trans("LoginNotDefined"), 'errors'); $action="create"; // Go back to create page } @@ -171,13 +177,13 @@ if ($action == 'add' && $canadduser) $nb = $object->getNbOfUsers("active"); if ($nb >= $conf->file->main_limit_users) { - $message='
'.$langs->trans("YourQuotaOfUsersIsReached").'
'; + $error++; + setEventMessage($langs->trans("YourQuotaOfUsersIsReached"), 'errors'); $action="create"; // Go back to create page } } - if (! $message) - { + if (!$error) { $object->lastname = GETPOST("lastname",'alpha'); $object->firstname = GETPOST("firstname",'alpha'); $object->login = GETPOST("login",'alpha'); @@ -266,7 +272,7 @@ if (($action == 'addgroup' || $action == 'removegroup') && $caneditfield) } else { - $message.=$object->error; + setEventMessage($object->error, 'errors'); } } } @@ -281,13 +287,13 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $_POST["lastname"]) { - $message='
'.$langs->trans("NameNotDefined").'
'; + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="edit"; // Go back to create page $error++; } if (! $_POST["login"]) { - $message='
'.$langs->trans("LoginNotDefined").'
'; + setEventMessage($langs->trans("LoginNotDefined"), 'errors'); $action="edit"; // Go back to create page $error++; } @@ -304,7 +310,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $result=$tmpuser->fetch(0, GETPOST("login")); if ($result > 0) { - $message='
'.$langs->trans("ErrorLoginAlreadyExists").'
'; + setEventMessage($langs->trans("ErrorLoginAlreadyExists"), 'errors'); $action="edit"; // Go back to create page $error++; } @@ -367,11 +373,11 @@ if ($action == 'update' && ! $_POST["cancel"]) if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - $message.='
'.$langs->trans("ErrorLoginAlreadyExists",$object->login).'
'; + setEventMessage($langs->trans("ErrorLoginAlreadyExists",$object->login), 'errors'); } else { - $message.='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } @@ -395,12 +401,12 @@ if ($action == 'update' && ! $_POST["cancel"]) $sql.= " SET fk_socpeople=NULL, fk_societe=NULL"; $sql.= " WHERE rowid=".$object->id; } + dol_syslog("fiche::update", LOG_DEBUG); $resql=$db->query($sql); - dol_syslog("fiche::update", LOG_DEBUG); if (! $resql) { $error++; - $message.='
'.$db->lasterror().'
'; + setEventMessage($db->lasterror(), 'errors'); } } @@ -427,7 +433,7 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $result > 0) { - $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; + setEventMessage($langs->trans("ErrorFailedToSaveFile"), 'errors'); } else { @@ -445,7 +451,7 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $error && ! count($object->errors)) { - $message.='
'.$langs->trans("UserModified").'
'; + setEventMessage($langs->trans("UserModified")); $db->commit(); $login=$_SESSION["dol_login"]; @@ -469,7 +475,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $ret=$object->setPassword($user,$_POST["password"]); if ($ret < 0) { - $message.='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } } @@ -484,7 +490,7 @@ if ((($action == 'confirm_password' && $confirm == 'yes') if ($newpassword < 0) { // Echec - $message = '
'.$langs->trans("ErrorFailedToSetNewPassword").'
'; + setEventMessage($langs->trans("ErrorFailedToSetNewPassword"), 'errors'); } else { @@ -493,18 +499,16 @@ if ((($action == 'confirm_password' && $confirm == 'yes') { if ($object->send_password($user,$newpassword) > 0) { - $message = '
'.$langs->trans("PasswordChangedAndSentTo",$object->email).'
'; - //$message.=$newpassword; + setEventMessage($langs->trans("PasswordChangedAndSentTo",$object->email)); } else { - $message = '
'.$langs->trans("PasswordChangedTo",$newpassword).'
'; - $message.= '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } else { - $message = '
'.$langs->trans("PasswordChangedTo",$newpassword).'
'; + setEventMessage($langs->trans("PasswordChangedTo",$newpassword), 'errors'); } } } @@ -562,7 +566,7 @@ if ($action == 'adduserldap') } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } } @@ -590,8 +594,6 @@ if (($action == 'create') || ($action == 'adduserldap')) print "
"; print "
"; - dol_htmloutput_mesg($message); - if (! empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr')) { /* @@ -648,12 +650,12 @@ if (($action == 'create') || ($action == 'adduserldap')) } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } // Si la liste des users est rempli, on affiche la liste deroulante @@ -977,7 +979,7 @@ else $entries = $ldap->fetch($object->login,$userSearchFilter); if (! $entries) { - $message .= $ldap->error; + setEventMessage($ldap->error, 'errors'); } $passDoNotExpire = 0; @@ -1056,8 +1058,6 @@ else print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); } - dol_htmloutput_mesg($message); - /* * Fiche en mode visu */ diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 625195bfa68..f97ef35ae6e 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -48,7 +48,6 @@ $id=GETPOST('id', 'int'); $action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); $userid=GETPOST('user', 'int'); -$message=''; // Security check $result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', 'user'); @@ -76,7 +75,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -87,14 +86,10 @@ if ($action == 'add') { if ($caneditperms) { - if (! $_POST["nom"]) - { - $message='
'.$langs->trans("NameNotDefined").'
'; + if (! $_POST["nom"]) { + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="create"; // Go back to create page - } - - if (! $message) - { + } else { $object->nom = trim($_POST["nom"]); $object->note = trim($_POST["note"]); @@ -117,7 +112,7 @@ if ($action == 'add') $db->rollback(); $langs->load("errors"); - $message='
'.$langs->trans("ErrorGroupAlreadyExists",$object->nom).'
'; + setEventMessage($langs->trans("ErrorGroupAlreadyExists",$object->nom), 'errors'); $action="create"; // Go back to create page } } @@ -125,7 +120,7 @@ if ($action == 'add') else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -151,14 +146,14 @@ if ($action == 'adduser' || $action =='removeuser') } else { - $message.=$edituser->error; + setEventMessage($edituser->error, 'errors'); } } } else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -183,19 +178,19 @@ if ($action == 'update') if ($ret >= 0 && ! count($object->errors)) { - $message.='
'.$langs->trans("GroupModified").'
'; + setEventMessage($langs->trans("GroupModified")); $db->commit(); } else { - $message.='
'.$object->error.'
'; + setEventMessage($object->error); $db->rollback(); } } else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden')); } } @@ -214,8 +209,6 @@ if ($action == 'create') { print_fiche_titre($langs->trans("NewGroup")); - if ($message) { print $message."
"; } - print dol_set_focus('#nom'); print ''; @@ -340,9 +333,6 @@ else print "\n"; print "
\n"; - - dol_htmloutput_mesg($message); - /* * Liste des utilisateurs dans le groupe */ diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index cde5e764af5..c3e147620c2 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -56,8 +56,6 @@ $fgroup->getrights(); if ($action == 'dolibarr2ldap') { - $message=""; - $db->begin(); $ldap=new Ldap(); @@ -71,12 +69,12 @@ if ($action == 'dolibarr2ldap') if ($result >= 0) { - $message.='
'.$langs->trans("GroupSynchronized").'
'; + setEventMessage($langs->trans("GroupSynchronized")); $db->commit(); } else { - $message.='
'.$ldap->error.'
'; + setEventMessage($ldap->error); $db->rollback(); } } @@ -135,10 +133,6 @@ print "
\n"; print ''; - -dol_htmloutput_mesg($message); - - /* * Barre d'actions */ diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index ebf776e64aa..87a0dec31e2 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -52,8 +52,6 @@ $fuser->getrights(); if ($_GET["action"] == 'dolibarr2ldap') { - $message=""; - $db->begin(); $ldap=new Ldap(); @@ -67,12 +65,12 @@ if ($_GET["action"] == 'dolibarr2ldap') if ($result >= 0) { - $message.='
'.$langs->trans("UserSynchronized").'
'; + setEventMessage($langs->trans("UserSynchronized")); $db->commit(); } else { - $message.='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); $db->rollback(); } } @@ -152,10 +150,6 @@ print '
'; print ''; - -dol_htmloutput_mesg($message); - - /* * Barre d'actions */ From ac824728bc8e172d062c7afacb838e190a4a4d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Jul 2014 01:09:43 +0200 Subject: [PATCH 55/59] Migrated old error notifications to the """new""" system --- htdocs/adherents/card_subscriptions.php | 4 +- htdocs/adherents/fiche.php | 95 +++++++++++++------------ htdocs/adherents/fiche_subscription.php | 2 - htdocs/adherents/type.php | 2 - htdocs/admin/fiscalyear_card.php | 16 ++--- htdocs/admin/ldap_users.php | 2 +- htdocs/admin/limits.php | 8 +-- htdocs/admin/mails.php | 10 ++- htdocs/admin/menus/index.php | 2 +- htdocs/admin/system/index.php | 9 ++- htdocs/admin/tools/update.php | 6 +- htdocs/bookmarks/fiche.php | 26 ++++--- htdocs/bookmarks/liste.php | 4 +- htdocs/categories/traduction.php | 8 +-- htdocs/categories/viewcat.php | 5 +- htdocs/comm/action/fiche.php | 17 ++--- htdocs/comm/remx.php | 16 ++--- htdocs/commande/contact.php | 5 +- htdocs/commande/fiche.php | 50 ++++++------- htdocs/commande/orderstoinvoice.php | 22 +++--- htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/bankid_fr.php | 4 +- htdocs/compta/bank/fiche.php | 6 +- htdocs/compta/bank/graph.php | 5 +- htdocs/compta/bank/ligne.php | 10 ++- htdocs/compta/bank/rappro.php | 6 +- htdocs/compta/bank/treso.php | 8 --- htdocs/compta/facture.php | 50 +++++++------ 28 files changed, 178 insertions(+), 222 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index e436fd5f694..fa7d59f040e 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -129,7 +129,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id) { $error++; - $mesg='
'.$langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly").'
'; + setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors'); } } @@ -165,7 +165,7 @@ if ($action == 'setsocid') $thirdparty=new Societe($db); $thirdparty->fetch(GETPOST('socid','int')); $error++; - $mesg='
'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'
'; + setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors'); } } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index e57e2b9eb1c..49eabe52d43 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -81,8 +81,6 @@ if (! empty($canvas)) // Security check $result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas); -$errmsg=''; $errmsgs=array(); - if ($rowid > 0) { // Load member @@ -128,7 +126,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights if ($userid != $user->id && $userid != $object->user_id) { $error++; - $mesg='
'.$langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly").'
'; + setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors'); } } @@ -164,7 +162,7 @@ if ($action == 'setsocid') $thirdparty=new Societe($db); $thirdparty->fetch($socid); $error++; - $errmsg='
'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'
'; + setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors'); } } @@ -190,12 +188,12 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user if ($result < 0) { $langs->load("errors"); - $errmsg=$langs->trans($nuser->error); + setEventMessage($langs->trans($nuser->error), 'errors'); } } else { - $errmsg=$object->error; + setEventMessage($object->error, 'errors'); } } @@ -211,13 +209,13 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights if ($result < 0) { $langs->load("errors"); - $errmsg=$langs->trans($company->error); - $errmsgs=$company->errors; + setEventMessage($langs->trans($company->error), 'errors'); + setEventMessage($company->errors, 'errors'); } } else { - $errmsg=$object->error; + setEventMessage($object->error, 'errors'); } } @@ -231,7 +229,7 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes') $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); $langs->load("mails"); - $mesg=$langs->trans("MailSuccessfulySent", $from, $object->email); + setEventMessage($langs->trans("MailSuccessfulySent", $from, $object->email)); } } @@ -252,12 +250,12 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors'); } if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors'); } // Create new object @@ -343,7 +341,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $newfile=$dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1,0,$_FILES['photo']['error']) > 0) { - $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; + setEventMessage($langs->trans("ErrorFailedToSaveFile"), 'errors'); } else { @@ -359,7 +357,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) } else { - $errmsgs[] = "ErrorBadImageFormat"; + setEventMessage("ErrorBadImageFormat", 'errors'); } } else @@ -387,8 +385,11 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) } else { - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action=''; } } @@ -472,14 +473,14 @@ if ($action == 'add' && $user->rights->adherent->creer) // Check parameters if (empty($morphy) || $morphy == "-1") { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Nature"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Nature")), 'errors'); } // Test si le login existe deja if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->trans("Login"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Login")), 'errors'); } else { $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'"; @@ -490,32 +491,32 @@ if ($action == 'add' && $user->rights->adherent->creer) if ($num) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorLoginAlreadyExists",$login)."
\n"; + setEventMessage($langs->trans("ErrorLoginAlreadyExists",$login), 'errors'); } } if (empty($pass)) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Password"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Password")), 'errors'); } } if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors'); } if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors'); } if (! ($typeid > 0)) { // Keep () before ! $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); } if ($conf->global->ADHERENT_MAIL_REQUIRED && ! isValidEMail($email)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorBadEMail",$email)."
\n"; + setEventMessage($langs->trans("ErrorBadEMail",$email), 'errors'); } $public=0; if (isset($public)) $public=1; @@ -536,8 +537,11 @@ if ($action == 'add' && $user->rights->adherent->creer) { $db->rollback(); - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action = 'create'; } @@ -589,15 +593,18 @@ if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == if ($result < 0) { $error++; - $errmsg.=$object->error; + setEventMessage($object->error, 'errors'); } } } else { $error++; - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } } if (! $error) @@ -613,6 +620,8 @@ if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == if ($user->rights->adherent->supprimer && $action == 'confirm_resign') { + $error = 0; + if ($confirm == 'yes') { $adht = new AdherentType($db); @@ -628,17 +637,23 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_resign') } if ($result < 0) { - $errmsg.=$object->error; + $error++; + setEventMessage($object->error, 'errors'); } } else { - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + $error++; + + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action=''; } } - if (! empty($backtopage) && ! $errmsg) + if (! empty($backtopage) && ! $error) { header("Location: ".$backtopage); exit; @@ -652,7 +667,7 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $conf { if (!$mailmanspip->del_to_spip($object)) { - $errmsg.= $langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error."
\n"; + setEventMessage($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, 'errors'); } } } @@ -663,7 +678,7 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm { if (!$mailmanspip->add_to_spip($object)) { - $errmsg.= $langs->trans('AddIntoSpipError').': '.$mailmanspip->error."
\n"; + setEventMessage($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, 'errors'); } } } @@ -725,9 +740,6 @@ else print_fiche_titre($langs->trans("NewMember")); - dol_htmloutput_mesg($errmsg,$errmsgs,'error'); - dol_htmloutput_mesg($mesg,$mesgs); - if ($conf->use_javascript_ajax) { print "\n".'