Browse Source

Merge remote-tracking branch 'origin/3.6' into 3.7

Conflicts:
	ChangeLog
	htdocs/comm/fiche.php
	htdocs/core/lib/functions2.lib.php
	htdocs/fourn/fiche.php
	htdocs/langs/fr_FR/compta.lang
	htdocs/projet/element.php
	htdocs/projet/tasks/contact.php
	htdocs/projet/tasks/time.php
Laurent Destailleur 10 years ago
parent
commit
657fc1b91c
100 changed files with 1983 additions and 8708 deletions
  1. 1 4
      .gitignore
  2. 31 1
      .scrutinizer.yml
  3. 13 6
      .travis.yml
  4. 24 13
      .tx/config
  5. 31 31
      COPYRIGHT
  6. 177 2
      ChangeLog
  7. 1 1
      build.xml
  8. 20 11
      build/debian/README.howto
  9. 2 9
      build/debian/changelog
  10. 2 3
      build/debian/get-orig-source.sh
  11. 2 2
      build/exe/doliwamp/doliwamp.iss
  12. 7 3
      build/launchpad/README
  13. 732 728
      build/makepack-dolibarr.pl
  14. 0 300
      build/makepack-dolibarrlang.pl
  15. 10 4
      build/obs/README
  16. 0 1
      build/rpm/conf.php
  17. 3 1
      build/rpm/dolibarr_fedora.spec
  18. 3 1
      build/rpm/dolibarr_generic.spec
  19. 3 1
      build/rpm/dolibarr_mandriva.spec
  20. 3 1
      build/rpm/dolibarr_opensuse.spec
  21. 3 1
      composer.json
  22. 51 4
      dev/codesniffer/ruleset.xml
  23. 0 26
      dev/dbmodel/emulate_oscommerce/llx_osc_categories.sql
  24. 0 20
      dev/dbmodel/emulate_oscommerce/llx_osc_customer.key.sql
  25. 0 25
      dev/dbmodel/emulate_oscommerce/llx_osc_customer.sql
  26. 0 25
      dev/dbmodel/emulate_oscommerce/llx_osc_order.sql
  27. 0 27
      dev/dbmodel/emulate_oscommerce/llx_osc_product.sql
  28. 0 21
      dev/detectduplicatelangkey.sh
  29. 26 0
      dev/detectnotabfiles.sh
  30. 2 0
      dev/dolibarr_changes.txt
  31. 38 0
      dev/fixduplicatelangkey.sh
  32. 0 26
      dev/fixnotabfiles.sh
  33. 2 0
      dev/fixperms.sh
  34. 1 1
      dev/initdata/generate-facture.php
  35. 2 1
      dev/initdata/generate-propale.php
  36. 1 1
      dev/initdata/mysqldump_dolibarr_3.6.0.sql
  37. 147 0
      dev/initdata/mysqldump_dolibarr_3.7.0.sql
  38. 3 1
      dev/initdata/savedemo.sh
  39. 138 0
      dev/initdata/sftpget_and_loaddump.php
  40. 233 0
      dev/optimize_images.sh
  41. 3 3
      dev/skeletons/build_class_from_table.php
  42. 1 1
      dev/skeletons/modMyModule.class.php
  43. 28 32
      dev/skeletons/skeleton_class.class.php
  44. 213 28
      dev/skeletons/skeleton_page.php
  45. 2 2
      dev/skeletons/skeleton_script.php
  46. 2 3
      dev/skeletons/skeleton_webservice_server.php
  47. 22 10
      dev/translation/strip_language_file.php
  48. 0 61
      dev/vagrant/README.md
  49. 0 170
      dev/vagrant/dolibarrdev/Vagrantfile
  50. 0 10
      dev/vagrant/dolibarrdev/puphpet/.gitattributes
  51. 0 211
      dev/vagrant/dolibarrdev/puphpet/config.yaml
  52. 0 52
      dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_aliases
  53. 0 491
      dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_git
  54. 0 4
      dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore
  55. 0 414
      dev/vagrant/dolibarrdev/puphpet/files/dot/.vimrc
  56. 0 27
      dev/vagrant/dolibarrdev/puphpet/files/dot/ssh/insecure_private_key
  57. 0 25
      dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile
  58. 0 7
      dev/vagrant/dolibarrdev/puphpet/puppet/hiera.yaml
  59. 0 1745
      dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp
  60. 0 6
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.fixtures.yml
  61. 0 31
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.nodeset.yml
  62. 0 5
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.puppet-lint.rc
  63. 0 32
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.travis.yml
  64. 0 246
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CHANGELOG.md
  65. 0 234
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CONTRIBUTING.md
  66. 0 26
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Gemfile
  67. 0 15
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/LICENSE
  68. 0 12
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Modulefile
  69. 0 1958
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.md
  70. 0 278
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.passenger.md
  71. 0 10
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Rakefile
  72. 0 24
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/files/httpd
  73. 0 34
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
  74. 0 35
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
  75. 0 116
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
  76. 0 12
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
  77. 0 60
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
  78. 0 30
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
  79. 0 83
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancer.pp
  80. 0 53
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancermember.pp
  81. 0 10
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
  82. 0 15
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
  83. 0 158
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods.pp
  84. 0 8
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
  85. 0 11
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/dev.pp
  86. 0 340
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/init.pp
  87. 0 10
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/listen.pp
  88. 0 130
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod.pp
  89. 0 3
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/actions.pp
  90. 0 19
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/alias.pp
  91. 0 3
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
  92. 0 5
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
  93. 0 19
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
  94. 0 12
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
  95. 0 3
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cache.pp
  96. 0 4
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
  97. 0 23
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
  98. 0 3
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav.pp
  99. 0 20
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
  100. 0 14
      dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp

+ 1 - 4
.gitignore

@@ -17,7 +17,4 @@ doxygen_warnings.log
 *.iml
 Thumbs.db
 # Vagrant generated files
-.vagrant
-/index.html
-/phpmyadmin
-/xhprof
+.vagrant

+ 31 - 1
.scrutinizer.yml

@@ -180,8 +180,38 @@ tools:
                 - 'htdocs/includes/*'
             paths: {  }
 
+    php_changetracking:
+        enabled: false
+        bug_patterns:
+            - '\bfix(?:es|ed)?\b'
+        feature_patterns:
+            - '\badd(?:s|ed)?\b'
+            - '\bimplement(?:s|ed)?\b'
+        filter:
+            excluded_paths:
+                - 'build/*'
+                - 'dev/*'
+                - 'doc/*'
+                - 'test/*'
+                - 'htdocs/includes/*'
+            paths: {  }
+            
     # Coding-Style / Bug Detection
-    js_hint: false
+    js_hint:
+        enabled: false
+        use_native_config: true
+        extensions:
+            - js
+        filter:
+            excluded_paths:
+                - 'build/*'
+                - 'dev/*'
+                - 'doc/*'
+                - 'test/*'
+                - 'htdocs/includes/*'
+            paths: {  }
+        config: {  }
+        path_configs: {  }
 
 
 before_commands: {  }

+ 13 - 6
.travis.yml

@@ -36,6 +36,7 @@ before_script:
  - echo Install phpcs then show installed rules
  - pyrus install pear/PHP_CodeSniffer
  - phpenv rehash
+ - phpcs --version
  - phpcs -i
  - echo Create dir $(pwd)/htdocs/documents
  - sudo mkdir -p $(pwd)/htdocs/documents/admin/temp;
@@ -53,12 +54,14 @@ before_script:
  - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
  - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
  - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+ - echo Mysql version
+ - mysql --version
  - echo Init database
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE myapp_test;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS myapp_test;'; fi"
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS myapp_test;'; fi"
- - sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.4.0.sql; fi"
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.5.0.sql; fi"
  - echo Create config file htdocs/conf/conf.php
  - echo '<?php ' > htdocs/conf/conf.php
  - sh -c "if [ '$DB' = 'pgsql' ]; then echo '$'dolibarr_main_db_type=\'pgsql\'';' >> htdocs/conf/conf.php; fi"
@@ -87,18 +90,22 @@ before_script:
 
 script: 
  - cd htdocs/install
- - php upgrade.php 3.4.0 3.5.0 > upgrade.log
- - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log
+ - 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
-# - cat upgrade.log
+ - php upgrade.php 3.6.0 3.7.0 >> upgrade.log
+# - cat upgrade360370.log
+ - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log
 # - cat upgrade2.log
  - cd ../..
  - date
+ - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
+ - date
 # - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1
- - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1
+ - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/htdocs/conf/conf.php,/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1
  - date
- - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
 
 after_script:
 # - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log

+ 24 - 13
.tx/config

@@ -2,6 +2,12 @@
 host = https://www.transifex.com
 lang_map = uz: uz_UZ
 
+[dolibarr.accountancy]
+file_filter = htdocs/langs/<lang>/accountancy.lang
+source_file = htdocs/langs/en_US/accountancy.lang
+source_lang = en_US
+type = MOZILLAPROPERTIES
+
 [dolibarr.admin]
 file_filter = htdocs/langs/<lang>/admin.lang
 source_file = htdocs/langs/en_US/admin.lang
@@ -212,12 +218,6 @@ source_file = htdocs/langs/en_US/orders.lang
 source_lang = en_US
 type = MOZILLAPROPERTIES
 
-[dolibarr.oscommerce]
-file_filter = htdocs/langs/<lang>/oscommerce.lang
-source_file = htdocs/langs/en_US/oscommerce.lang
-source_lang = en_US
-type = MOZILLAPROPERTIES
-
 [dolibarr.other]
 file_filter = htdocs/langs/<lang>/other.lang
 source_file = htdocs/langs/en_US/other.lang
@@ -236,6 +236,18 @@ source_file = htdocs/langs/en_US/paypal.lang
 source_lang = en_US
 type = MOZILLAPROPERTIES
 
+[dolibarr.printipp]
+file_filter = htdocs/langs/<lang>/printipp.lang
+source_file = htdocs/langs/en_US/printipp.lang
+source_lang = en_US
+type = MOZILLAPROPERTIES
+
+[dolibarr.productbatch]
+file_filter = htdocs/langs/<lang>/productbatch.lang
+source_file = htdocs/langs/en_US/productbatch.lang
+source_lang = en_US
+type = MOZILLAPROPERTIES
+
 [dolibarr.products]
 file_filter = htdocs/langs/<lang>/products.lang
 source_file = htdocs/langs/en_US/products.lang
@@ -254,6 +266,12 @@ source_file = htdocs/langs/en_US/propal.lang
 source_lang = en_US
 type = MOZILLAPROPERTIES
 
+[dolibarr.resource]
+file_filter = htdocs/langs/<lang>/resource.lang
+source_file = htdocs/langs/en_US/resource.lang
+source_lang = en_US
+type = MOZILLAPROPERTIES
+
 [dolibarr.salaries]
 file_filter = htdocs/langs/<lang>/salaries.lang
 source_file = htdocs/langs/en_US/salaries.lang
@@ -266,12 +284,6 @@ source_file = htdocs/langs/en_US/sendings.lang
 source_lang = en_US
 type = MOZILLAPROPERTIES
 
-[dolibarr.shop]
-file_filter = htdocs/langs/<lang>/shop.lang
-source_file = htdocs/langs/en_US/shop.lang
-source_lang = en_US
-type = MOZILLAPROPERTIES
-
 [dolibarr.sms]
 file_filter = htdocs/langs/<lang>/sms.lang
 source_file = htdocs/langs/en_US/sms.lang
@@ -313,4 +325,3 @@ file_filter = htdocs/langs/<lang>/workflow.lang
 source_file = htdocs/langs/en_US/workflow.lang
 source_lang = en_US
 type = MOZILLAPROPERTIES
-

+ 31 - 31
COPYRIGHT

@@ -9,41 +9,41 @@ More information: http://www.gnu.org/licenses/gpl-3.0.txt
 
 Dolibarr uses some external libraries released under different licenses. This is compatibility summary:
 
-Component             Version       License                     GPL Compatible  Usage
+Component              Version       License                     GPL Compatible  Usage
 -------------------------------------------------------------------------------------
 PHP libraries:
-AdoDb-Date            0.32          Modified BSD License        Yes             Date convertion (not into rpm package)
-CKEditor              4.3.3         LGPL-2.1+                   Yes             Editor WYSIWYG
-FPDI                  1.4.2         Apache Software License 2.0 Yes             PDF templates management
-FPDF_TPL              1.2           Apache Software License 2.0 Yes             PDF templates management
-GeoIP                 1.4           LGPL-2.1+                   Yes             Sample code to make geoip convert (not into deb package)
-NuSoap                0.9.5         LGPL 2.1+                   Yes             Library to develop SOAP Web services (not into rpm and deb package)
-odtPHP                1.0.1         GPL-2+  b                   Yes             Library to build/edit ODT files
-PHPExcel              1.7.6         LGPL-2.1+                   Yes             Read/Write XLS files, read ODS files
-PHPPrintIPP           1.3           GPL-2+                      Yes             Library to send print IPP requests
-TCPDF                 6.0.093       LGPL-3+                     Yes             PDF generation
+AdoDb-Date             0.32          Modified BSD License        Yes             Date convertion (not into rpm package)
+CKEditor               4.3.3         LGPL-2.1+                   Yes             Editor WYSIWYG
+FPDI                   1.4.2         Apache Software License 2.0 Yes             PDF templates management
+FPDF_TPL               1.2           Apache Software License 2.0 Yes             PDF templates management
+GeoIP                  1.4           LGPL-2.1+                   Yes             Sample code to make geoip convert (not into deb package)
+NuSoap                 0.9.5         LGPL 2.1+                   Yes             Library to develop SOAP Web services (not into rpm and deb package)
+odtPHP                 1.0.1         GPL-2+  b                   Yes             Library to build/edit ODT files
+PHPExcel               1.7.8         LGPL-2.1+                   Yes             Read/Write XLS files, read ODS files
+PHPPrintIPP            1.3           GPL-2+                      Yes             Library to send print IPP requests
+TCPDF                  6.0.093       LGPL-3+                     Yes             PDF generation
 
 JS libraries:
-jQuery                1.8.2         MIT License                 Yes             JS library
-jQuery UI             1.9.1         GPL and MIT License         Yes             JS library plugin UI
-jQuery UI Multiselect ?             GPL and MIT License         Yes             JS library plugin for sexier multiselect
-jQuery blockUI        2.43          GPL and MIT License         Yes             JS library plugin blockUI (to use ajax popups)
-jQuery Colorpicker    1.1           MIT License                 Yes             JS library for color picker for a defined list of colors
-jQuery DataTables     1.9.4         BSD                         Yes             JS library for tables output
-jQuery FileUpload     5.0.3         GPL and MIT License         Yes             JS library to upload files
-jQuery Flot           0.7           MIT License                 Yes             JS library to build graph
-jQuery JCrop          0.9.8         GPL and MIT License         Yes             JS library plugin Crop (to crop images)
-jQuery Jeditable      1.7.1         GPL and MIT License         Yes             JS library plugin jeditable (to edit in place)
-jQuery jNotify        1.1.00        Apache Software License 2.0 Yes             JS library plugin jNotify (to use ajax popups)
-jQuery jPicker        1.1.6         GPL and MIT License         Yes             JS library for color picker with not defined list of colors
-jQuery jqueryFileTree 1.0.1         GPL and MIT License         Yes             JS library for color picker with not defined list of colors
-jQuery jquerytreeview 1.4.1         MIT License                 Yes             JS library for color picker with not defined list of colors
-jQuery Layout         1.3.0rc30.74  GPL and MIT License         Yes             JS library plugin Layout (RC-29.15)
-jQuery Mobile         1.3.0         GPL and MIT License         Yes             JS library for smartphone (not used)
-jQuery TableDnD       0.6           GPL and MIT License         Yes             JS library plugin TableDnD (to reorder table rows)
-jQuery Timepicker     1.1.0         GPL and MIT License         Yes             JS library Timepicker addon for Datepicker
-jQuery Tiptip         1.3           GPL and MIT License         Yes             JS library for tooltips
-jsGantt               1.2           BSD License                 Yes             JS library (to build Gantt reports)
+jQuery                 1.8.2         MIT License                 Yes             JS library
+jQuery UI              1.9.1         GPL and MIT License         Yes             JS library plugin UI
+jQuery select2         3.5.2         GPL and Apache License      Yes             JS library plugin for sexier multiselect
+jQuery blockUI         2.43          GPL and MIT License         Yes             JS library plugin blockUI (to use ajax popups)
+jQuery Colorpicker     1.1           MIT License                 Yes             JS library for color picker for a defined list of colors
+jQuery DataTables      1.9.4         BSD                         Yes             JS library for tables output
+jQuery FileUpload      5.0.3         GPL and MIT License         Yes             JS library to upload files
+jQuery Flot            0.7           MIT License                 Yes             JS library to build graph
+jQuery JCrop           0.9.8         GPL and MIT License         Yes             JS library plugin Crop (to crop images)
+jQuery Jeditable       1.7.1         GPL and MIT License         Yes             JS library plugin jeditable (to edit in place)
+jQuery jNotify         1.1.00        Apache Software License 2.0 Yes             JS library plugin jNotify (to use ajax popups)
+jQuery jPicker         1.1.6         GPL and MIT License         Yes             JS library for color picker with not defined list of colors
+jQuery jqueryFileTree  1.0.1         GPL and MIT License         Yes             JS library for color picker with not defined list of colors
+jQuery jquerytreeview  1.4.1         MIT License                 Yes             JS library for color picker with not defined list of colors
+jQuery Layout          1.3.0rc30.74  GPL and MIT License         Yes             JS library plugin Layout (RC-29.15)
+jQuery Mobile          1.3.0         GPL and MIT License         Yes             JS library for smartphone (not used)
+jQuery TableDnD        0.6           GPL and MIT License         Yes             JS library plugin TableDnD (to reorder table rows)
+jQuery Timepicker      1.1.0         GPL and MIT License         Yes             JS library Timepicker addon for Datepicker
+jQuery Tiptip          1.3           GPL and MIT License         Yes             JS library for tooltips
+jsGantt                1.2           BSD License                 Yes             JS library (to build Gantt reports)
 
 For licenses compatibility informations:
 http://www.fsf.org/licensing/licenses/index_html

+ 177 - 2
ChangeLog

@@ -2,6 +2,175 @@
 English Dolibarr ChangeLog
 --------------------------------------------------------------
 
+
+***** ChangeLog for 3.7 compared to 3.6.* *****
+For users:
+- New: Match other auth system: Login can be done entering login or user 
+       email (this open the road for SSO).
+- New: Agenda export by project #1967.
+- New: Increase length of thirdparty to 128 chars.
+- New: "Is Order shippable" icon #1975.
+- New: statistics on supplier orders and invoices on home page.
+- New: Add permissions to read all trips and expenses.
+- New: Can filter on date into tab "Referring object" of a project.
+- New: Module notification has been enhanced:
+       EMail use now language of target contact.
+       Can also define a fixed email for notifications.
+- New: Feature to link manually an order to an invoice does not disappear once
+       link has been done.
+- New: Can set a color on user card (visible into agenda view).
+- New: extrafields for projects and tasks are exported to ODT documents.
+- New: Add number of active notification into tab title (like we do for notes and documents)
+- New: Can add product into category from category card.
+- New: PDF event report show project and status of event.
+- New: Can filter on status on interventions.
+- New: Add help info of field type into dictionary of payment types.
+- New: Add proposals into referer page of thirdparty.
+- New: On contact list can set filter on both active and not active (no more exclusive select). 
+- New: Intervention documents are now available in ECM module.
+- New: Can attach supplier order to a customer order.
+- New: Supervisor is now visible into user list. 
+- New: Add user of creation and validation on invoice export.
+- New: Add info page about browser.
+- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
+       on uploaded file names. 
+- New: No more dependency between contract and service module.
+- New: [ task #867 ] Remove ESAEB external module code from core.
+- New: Can create proposal from an intervention.
+- New: An event can be assigned to several users.
+- New: Can filter events on a group of users.
+- New: Can filter events of a thirdparty.
+- New: Onto event summary of elements, end date and status are visible.
+- New: Split Agenda view (month, week, day) into different tabs.
+- New: Add a view "per user" of agenda events (with different colors according to type of event).
+- New: Each user can include its own external ics calendar into dolibarr agenda view.
+- New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to
+       create an automatic event into agenda.
+- New: Add new type of event (when type of events are used, not by default).
+- New: Can disable predefined type of events.
+- New: Form to add a photo is immediatly available on photo page if
+       permissions are ok (save one click per photo to add).
+- New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos
+       shown on main product card.
+- New: Add country into table of thirdparties type. This will allow to provide
+       a list of thirdparty types specific to a country (like argentina that
+       need type A or B).
+- New: Can force a specific bank account onto an invoice/order.
+- New: Home page of project area shows list of draft project (like other main page).
+- New: Can search on project ref or string from project main page (like other main page).
+- New: First change to match accessibility rules: http://www.w3.org/TR/WCAG10-HTML-TECHS/
+       Differentiate text and img.
+       Use label into quick search form.
+       Use accesskey on form search.
+- New: Intervention documents are now available in ECM module.
+- New: Add attachments on user card + in ECM module.
+- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.    
+- New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
+- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
+- New: Enable supplier price log table.
+- New: [ task #1204 ] add a supplier reference to contract.
+- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
+- New: Optimize size of image static resources.
+- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
+- New: Content of predefined email come firstly from table llx_c_email_template, then translation key. 
+- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture 
+       onto PDF like MAIN_GENERATE_PROPOSALS_WITH_PICTURE dir for proposals.
+- New: Add more search field in list of cheque deposits.
+- New: Add feature to order to invoice on supplier part.
+- New : Use of MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR to use disk cache for big excel export.
+- New: Direct invoice creation from predefined invoice.
+- New: Add dunning into accountancy report.
+- New: Add favorite button into country dictionary to put value on top select list
+- Upgrade phpexcel lib to 1.7.8
+- New : Use of MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR to use disk cache for big excel export.
+- New : Option on extrafields to have them always editable regardless of the document status.
+- New : New module PrintIPP to print without opening document is available as stable.
+- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
+- Fix: [ bug #1470, #1472, #1473] User trigger problem
+- Fix: [ bug #1489, #1491 ] Intervention trigger problem
+- Fix: [ bug #1492, #1493 ] Member trigger problem
+- Fix: [ bug #1474, #1475 ] Contract trigger problem
+- Fix: [ bug #1496 ] ACTION_DELETE trigger does not show trigger error
+- Fix: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action
+- Fix: [ bug #1502 ] DON_CREATE trigger does not intercept trigger action
+- Fix: [ bug #1505, #1504] Project trigger problem
+- Fix: [ bug #1463, #1464 ] Proposal triggers problem
+- Fix: [ bug #1498, #1499 ] Shipment/Delivery triggers problem
+- Fix: [ bug #1465, #1466 ] Product triggers problem
+- Fix: [ bug #1508 ] STOCK_MOVEMENT does not show trigger error message
+- Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
+- Fix: [ bug #1506, #1507 ] ECM trigger error problem
+- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
+- Fix: [ bug #1533 ] Links triggers do not show trigger error message
+- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
+- Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown
+- Fix: datepicker first day of week can be monday by setting into display setup
+- Fix: [ bug #575 ] GED doesn't works if there is "/" in a mask
+
+For users, new experimental module (need to set feature level of instance to experimental to see them):
+- New: Module Accounting Expert to manage accountancy
+		Special Thanks to developpers :
+			Olivier Geffroy
+			Alexandre Spangaro
+			Ari Elbaz
+			Florian Henry
+			Juanjo Menent
+		And to the contributors :
+			Jeff Info				2000 euros
+			Nord Anim		 		 120 euros
+			Hydroflex		 		 120 euros
+			Asysteo			 		 120 euros
+			Fournisseur médical		 120 euros
+- Removed: unmaintained OScommerce module
+
+For translators:
+- Update language files.
+- New: When a translation is not available we always jump to en_US and only en_US.
+
+For developers:
+- New: Add a css style "cursorpointer".
+- New: Select list of users can return user into hierarchy.
+- New: getBrowserInfo can return type of layout of browser (classic/phone/tablet)
+- New: Add hook "searchAgendaFrom" and "beforePDFCreation".
+- New: Add trigger DON_UPDATE, DON_DELETE
+- New: Add country iso code on 3 chars into table of countries.
+- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger.
+- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
+- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
+- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
+- New: Added hook "formConfirm" and "doActions" for supplier invoice card.
+- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card.
+- New: renamed table llx_c_pays to llx_c_country & libelle field to label.
+- New: Added hook "formConfirm" and "doActions" for fichinter card
+- New: Can search list of thirdparties from web service on part of name.
+- New: Function getCurrencyAmount is marked as deprecated. Use function price to output a price
+       including currency symbol.
+- Qual: Renamed table llx_c_civilite into llx_c_civility,
+		field civilite into label in the same table,
+		and field civilite into civility in other table.
+- Qual: Renamed all files & links "liste.php" into "list.php".
+- Qual: Renamed all files & links "fiche.php" into "card.php".
+- Qual: Replace all constants COMPTA_* by ACCOUNTING_*.
+- Qual: Replace all constants ACCOUNTINGEX_* by ACCOUNTING_* to simplify migration of the module
+- Fix: [ bug #1724 ] Can't add a submenu to projects
+
+WARNING: Following changes may create regression for some external modules, but was necessary to make
+Dolibarr better:
+
+- If you can't see trips and expenses records, check that you have the new permission "read all
+  trips and expenses".
+- Deprecated module "oscommerce" were removed.
+- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
+- Some field into database were renamed from "libelle" to "label".
+- Table llx_c_pays were renamed into llx_c_country.  
+- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after 
+  creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
+- A lot of pages called fiche.php were renamed into card.php
+- A lot of pages called liste.php were renamed into list.php
+- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the
+  warehouse module and your Point Of Sale module if you use one.
+
+
 ***** ChangeLog for 3.6.2 compared to 3.6.1 *****
 - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
 - Fix: bug 1588 : relative discount.
@@ -16,6 +185,7 @@ English Dolibarr ChangeLog
 - Fix: Show sender Country on PDF docs when sender Country <> receiver Country
 - Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
 - Fix: [ bug #1749 ] Undefined $mailchimp
+- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
 - Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify
 - Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
 - Fix: [ bug #1731 ] Can't use quick navigation on project tasks secondary tabs
@@ -110,6 +280,9 @@ For users:
 - Fix: Add actions events not implemented.
 - Fix: Price min of composition is not supplier price min by quantity.
 - Fix: [ bug #1356 ] Bank accountancy number is limited to 8 numbers.
+- Fix: [ bug #1439 ] impossible to remove a a translation (multilanguage-feature) 
+- New: If multilangue is enabled, mail (from propal, invoice, etc...) message is pre-defaulted in Customer language
+- Fix: [ bug #1459 ] _ADD_CONTACT and _DEL_CONTACT triggers do not intercept insertion when reported an error
 - Fix: [ bug #1478 ] BILL_PAYED trigger action does not intercept failure under some circumstances
 - Fix: [ bug #1479 ] Several customer invoice triggers do not intercept trigger action
 - Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages
@@ -137,6 +310,8 @@ For developers:
 - New: A module can disable a standard ECM view.
 - New: Add multilang support into product webservice.
 - New: Add hooks on project card page.
+- New: Add call_trigger method on CommonObject class. So new trigger call within object is just : 
+$result = $this->call_trigger($trigger_name, $user) 
 
 WARNING: Following change may create regression for some external modules, but was necessary to make
 Dolibarr better:
@@ -144,11 +319,11 @@ Dolibarr better:
 - The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been
 removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. 
 - Remove the javascript function ac_delay() that is not used anymore by core code.
-- Properties "dictionnaries" into module descriptor files has been renamed into "dictionaries".
+- Properties "dictionnaries" into module descriptor files have been renamed into "dictionaries".
 - Method form->select_currency() has been removed. Use instead print form->selectCurrency().
 - Method form->select_methodes_commande() has been renamed into english name selectInputMethod().
 - The following hooks are now 'addreplace' hooks: "formCreateThirdpartyOptions" 
-  So check that return value is 0 to keep default standard behaviour after hook or 1 to disable
+  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.

+ 1 - 1
build.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="dolibarr" default="hudson" basedir=".">
-
+fdfds
 <!-- Exclude/ignore paths -->
  <property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
  <property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />

+ 20 - 11
build/debian/README.howto

@@ -153,6 +153,9 @@ from origin/upstream and origin/pristine.
 
 * Into root dir, launch:
 > debian/get-orig-source.sh
+If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
+
+* Some files are removed from archive by the get-orig-source.sh 
 
 * Staying into git root directory, run
 > git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz
@@ -160,9 +163,9 @@ from origin/upstream and origin/pristine.
 Note: If there was errors solved manually, you may need to make a git commit
 
 * Add an entry into debian/changelog
-> dch -v x.y.z-dsfg-1 "My comment" will add entry.
-For example: dch -v x.y.z-dsfg-1 "New upstream release." for a new version
-Then modify changelog to replace "unstable" with "UNRELEASED".
+> dch -v x.y.z+dfsg-1 "My comment" will add entry.
+For example: dch -v x.y.z+dfsg-1 "New upstream release." for a new version
+Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
 
 Warning: Date must have format reported by "date -R"
 Warning: Name and email must match value into debian/control file (Entry added here is used by next step).
@@ -228,23 +231,29 @@ from origin/upstream and origin/pristine.
 
 * If new upstream is available onto sourceforge, launch:
 > debian/get-orig-source.sh
+If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
 
-* Edit tgz file to remove ckeditor and phpexcel and rename file into 
-dolibarr-x.y.z+dsfgw.tgz
-(x.y.z = version, w start from 1 and is increased for each new import)
+* Edit tgz file to remove 
+- htdocs/includes/ckeditor
+- htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf
+- htdocs/includes/phpexcel
+- htdocs/includes/tcpdf
+And rename file into 
+dolibarr-x.y.z+dfsgw.tgz
+(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
 
 * Staying into git root directory, run
-> git-import-orig -vv ../dolibarr-x.y.z+dsfgw.tgz
+> git-import-orig -vv ../dolibarr-x.y.z+dfsgw.tgz
 and enter version when requested with format
-x.y.z+dsfgw
+x.y.z+dfsgw
 (x.y.z = version, w start from 1 and is increased for each new import)
 
 Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
 
 * Add an entry into debian/changelog
-> dch -v x.y.z-w "My comment" will add entry.
-For example: dch -v x.y.z-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
-Then modify changelog to replace "unstable" with "UNRELEASED".
+> dch -v x.y.z+dfsg-w "My comment" will add entry.
+For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
+Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
 Then check/modify also the user/date signature:
 - Date must have format reported by "date -R"
 - Name and email must match value into debian/control file (Entry added here is used by next step).

+ 2 - 9
build/debian/changelog

@@ -1,13 +1,6 @@
-dolibarr (3.6.1-3) unstable; urgency=low
+dolibarr (3.7.0-3) UNRELEASED; urgency=low
 
   [ Laurent Destailleur (eldy) ]
   * New upstream release.
     
- -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Tue, 23 Sep 2014 12:00:00 +0100      
-
-dolibarr (3.6.0-3) unstable; urgency=low
-
-  [ Laurent Destailleur (eldy) ]
-  * New upstream release.
-    
- -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Tue, 15 July 2014 12:00:00 +0100      
+ -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Tue, 21 Oct 2014 12:00:00 +0100

+ 2 - 3
build/debian/get-orig-source.sh

@@ -1,10 +1,9 @@
 #!/bin/sh
-# Scan for new official sources and download file
-# run with debian/get-orig-source.sh [x.y.z]
 
 tmpdir=$(mktemp -d)
-echo "tmpdir = $tmpdir"
 
+
+# Download source file
 if [ -n "$1" ]; then
     uscan_opts="--download-version=$1"
 fi

+ 2 - 2
build/exe/doliwamp/doliwamp.iss

@@ -17,9 +17,9 @@
 ; ----- Change this -----
 AppName=DoliWamp
 ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
-AppVerName=DoliWamp-3.6.1
+AppVerName=DoliWamp-3.7.0-beta
 ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
-OutputBaseFilename=DoliWamp-3.6.1
+OutputBaseFilename=DoliWamp-3.7.0-beta
 ; ----- End of change
 ;OutputManifestFile=build\doliwampbuild.log
 ; Define full path from which all relative path are defined

+ 7 - 3
build/launchpad/README

@@ -61,13 +61,17 @@ If you want to build/test package locally:
 
 - List of series are visible here: https://launchpad.net/dolibarr/+series
 
-# To update Dolibarr into launchpad (when repository for sources already exists)
+# To update Dolibarr into launchpad (when remote repository for sources already exists)
 #----------------------------------
+	# create local repository
 	cd bzr
-	bzr branch lp:~yourlogin/dolibarr/[dev|beta|stable]
+	bzr branch lp:~yourlogin/dolibarr/[develop|beta|stable] dolibarr-[dev|beta|stable]
     cd dolibarr-[dev|beta|stable]
+    # Update
+    bzr update
+	-- Update files here. Remove all and overwrite --
     bzr status
-	-- Update files here --
+	bzr add *
     bzr commit -m "Description of change"
     bzr push
 

File diff suppressed because it is too large
+ 732 - 728
build/makepack-dolibarr.pl


+ 0 - 300
build/makepack-dolibarrlang.pl

@@ -1,300 +0,0 @@
-#!/usr/bin/perl
-#----------------------------------------------------------------------------
-# \file         build/makepack-dolibarrlang.pl
-# \brief        Package builder (tgz, zip, rpm, deb, exe)
-# \author       (c)2005 Laurent Destailleur  <eldy@users.sourceforge.net>
-#----------------------------------------------------------------------------
-
-use Cwd;
-
-$PROJECT = "dolibarr";
-
-@LISTETARGET       = ("TGZ");    # Possible packages
-%REQUIREMENTTARGET = (           # Tool requirement for each package
-	"TGZ" => "tar",
-	"ZIP" => "7z",
-	"EXE" => "makensis.exe"
-);
-%ALTERNATEPATH = (
-	"7z"           => "7-ZIP",
-	"makensis.exe" => "NSIS"
-);
-
-use vars qw/ $REVISION $VERSION /;
-$REVISION = '1.10';
-$VERSION  = "1.0 (build $REVISION)";
-
-#------------------------------------------------------------------------------
-# MAIN
-#------------------------------------------------------------------------------
-( $DIR  = $0 ) =~ s/([^\/\\]+)$//;
-( $PROG = $1 ) =~ s/\.([^\.]*)$//;
-$Extension = $1;
-$DIR ||= '.';
-$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
-
-# Detect OS type
-# --------------
-if ( "$^O" =~ /linux/i || ( -d "/etc" && -d "/var" && "$^O" !~ /cygwin/i ) ) {
-	$OS = 'linux';
-	$CR = '';
-}
-elsif ( -d "/etc" && -d "/Users" ) { $OS = 'macosx'; $CR = ''; }
-elsif ( "$^O" =~ /cygwin/i || "$^O" =~ /win32/i ) {
-	$OS = 'windows';
-	$CR = "\r";
-}
-if ( !$OS ) {
-	print "$PROG.$Extension was not able to detect your OS.\n";
-	print "Can't continue.\n";
-	print "$PROG.$Extension aborted.\n";
-	sleep 2;
-	exit 1;
-}
-
-# Define buildroot
-# ----------------
-if ( $OS =~ /linux/ ) {
-	$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "/tmp";
-}
-if ( $OS =~ /macos/ ) {
-	$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "/tmp";
-}
-if ( $OS =~ /windows/ ) {
-	$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "c:/temp";
-	$PROGPATH = $ENV{"ProgramFiles"};
-}
-if ( !$TEMP || !-d $TEMP ) {
-	print "Error: A temporary directory can not be find.\n";
-	print "Check that TEMP or TMP environment variable is set correctly.\n";
-	print "makepack-dolibarrlang.pl aborted.\n";
-	sleep 2;
-	exit 2;
-}
-$BUILDROOT = "$TEMP/dolibarr-buildroot";
-
-my $copyalreadydone = 0;
-my $batch           = 0;
-
-print "Makepack langs version $VERSION\n";
-print "Enter language code to package (en_US, fr_FR, ...) : ";
-$PROJECT = <STDIN>;
-chomp($PROJECT);
-
-# Ask and set version $MAJOR and $MINOR
-print "Enter value for version: ";
-$PROJVERSION = <STDIN>;
-chomp($PROJVERSION);
-( $MAJOR, $MINOR ) = split( /\./, $PROJVERSION, 2 );
-if ( $MINOR eq '' ) {
-	print "Enter value for minor version: ";
-	$MINOR = <STDIN>;
-	chomp($MINOR);
-}
-
-$FILENAME    = "$PROJECT";
-$FILENAMETGZ = "lang_$PROJECT-$MAJOR.$MINOR";
-if ( -d "/usr/src/redhat" ) {
-
-	# redhat
-	$RPMDIR = "/usr/src/redhat";
-}
-if ( -d "/usr/src/RPM" ) {
-
-	# mandrake
-	$RPMDIR = "/usr/src/RPM";
-}
-
-$SOURCE = "$DIR/../../dolibarr";
-$DESTI  = "$SOURCE/build";
-
-# Choose package targets
-#-----------------------
-$target = "ZIP";    # Les langs sont au format zip
-if ($target) {
-	$CHOOSEDTARGET{ uc($target) } = 1;
-}
-else {
-	my $found = 0;
-	my $NUM_SCRIPT;
-	while ( !$found ) {
-		my $cpt = 0;
-		printf( " %d - %3s    (%s)\n",
-			$cpt, "All", "Need " . join( ",", values %REQUIREMENTTARGET ) );
-		foreach my $target (@LISTETARGET) {
-			$cpt++;
-			printf( " %d - %3s    (%s)\n",
-				$cpt, $target, "Need " . $REQUIREMENTTARGET{$target} );
-		}
-
-		# Are asked to select the file to move
-		print "Choose one package number or several separated with space: ";
-		$NUM_SCRIPT = <STDIN>;
-		chomp($NUM_SCRIPT);
-		if ( $NUM_SCRIPT =~ s/-//g ) {
-
-			# Do not do copy
-			$copyalreadydone = 1;
-		}
-		if ( $NUM_SCRIPT !~ /^[0-$cpt\s]+$/ ) {
-			print "This is not a valid package number list.\n";
-			$found = 0;
-		}
-		else {
-			$found = 1;
-		}
-	}
-	print "\n";
-	if ($NUM_SCRIPT) {
-		foreach my $num ( split( /\s+/, $NUM_SCRIPT ) ) {
-			$CHOOSEDTARGET{ $LISTETARGET[ $num - 1 ] } = 1;
-		}
-	}
-	else {
-		foreach my $key (@LISTETARGET) {
-			$CHOOSEDTARGET{$key} = 1;
-		}
-	}
-}
-
-# Test if requirement is ok
-#--------------------------
-foreach my $target ( keys %CHOOSEDTARGET ) {
-	foreach my $req ( split( /[,\s]/, $REQUIREMENTTARGET{$target} ) ) {
-
-		# Test
-		print "Test requirement for target $target: Search '$req'... ";
-		$ret         = `"$req" 2>&1`;
-		$coderetour  = $?;
-		$coderetour2 = $coderetour >> 8;
-		if (
-			$coderetour != 0
-			&& (   ( $coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i )
-				|| ( $coderetour2 == 127 && $OS !~ /windows/ ) )
-			&& $PROGPATH
-		  )
-		{
-
-			# Not found error, we try in PROGPATH
-			$ret         = `"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
-			$coderetour  = $?;
-			$coderetour2 = $coderetour >> 8;
-			$REQUIREMENTTARGET{$target} = "$PROGPATH/$ALTERNATEPATH{$req}/$req";
-		}
-
-		if (
-			$coderetour != 0
-			&& (   ( $coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i )
-				|| ( $coderetour2 == 127 && $OS !~ /windows/ ) )
-		  )
-		{
-
-			# Not found error
-			print
-"Not found\nCan't build target $target. Requirement '$req' not found in PATH\n";
-			$CHOOSEDTARGET{$target} = -1;
-			last;
-		}
-		else {
-
-			# Pas erreur ou erreur autre que programme absent
-			print " Found " . $REQUIREMENTTARGET{$target} . "\n";
-		}
-	}
-}
-
-print "\n";
-
-# Check if there is at least on target to build
-#----------------------------------------------
-$nboftargetok = 0;
-foreach my $target ( keys %CHOOSEDTARGET ) {
-	if ( $CHOOSEDTARGET{$target} < 0 ) { next; }
-	$nboftargetok++;
-}
-
-if ($nboftargetok) {
-
-	# Update buildroot
-	#-----------------
-	if ( !$copyalreadydone ) {
-		print "Delete directory $BUILDROOT\n";
-		$ret = `rm -fr "$BUILDROOT"`;
-		mkdir "$BUILDROOT";
-		mkdir "$BUILDROOT/htdocs";
-		mkdir "$BUILDROOT/htdocs/langs";
-		mkdir "$BUILDROOT/htdocs/langs/$PROJECT";
-
-		print "Copy $SOURCE into $BUILDROOT\n";
-		mkdir "$BUILDROOT";
-		$ret =
-		  `cp -pr "$SOURCE/htdocs/langs/$PROJECT" "$BUILDROOT/htdocs/langs"`;
-	}
-	print "Clean $BUILDROOT\n";
-	$ret =
-`rm -fr $BUILDROOT/htdocs/langs/$PROJECT/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/*/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/Thumbs.db`;
-	$ret =
-`rm -fr $BUILDROOT/htdocs/langs/$PROJECT/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/*/*/CVS*`;
-
-	# Build package for each target
-	#------------------------------
-	foreach my $target ( keys %CHOOSEDTARGET ) 
-	{
-		if ( $CHOOSEDTARGET{$target} < 0 ) { next; }
-
-		print "\nBuild package for target $target\n";
-
-		if ( $target eq 'TGZ' ) 
-		{
-			unlink $FILENAMETGZ . tgz;
-
-			#    		unlink $BUILDROOT/$FILENAMETGZ.tgz;
-			print "Compress $BUILDROOT/htdocs into $FILENAMETGZ.tgz...\n";
-			$cmd =
-"tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar.exclude\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" htdocs";
-			$ret = `$cmd`;
-
-#        	$cmd="tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar.exclude\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" htdocs\n";
-#        	$ret=`$cmd`;
-			if ( $OS =~ /windows/i ) {
-				print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n";
-				$ret = `mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
-
-   #        		$ret=`mv "$BUILDROOT/$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
-			}
-			next;
-		}
-
-		if ( $target eq 'ZIP' ) 
-		{
-			unlink $FILENAMEZIP . zip;
-			print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n";
-			chdir("$BUILDROOT");
-
-#print "cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*\n";
-#$ret=`cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
-			$ret =
-			  `7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
-			print "Move $FILENAMEZIP.zip to $DESTI\n";
-			rename( "$BUILDROOT/$FILENAMEZIP.zip", "$DESTI/$FILENAMEZIP.zip" );
-			next;
-		}
-	}
-}
-
-print "\n----- Summary -----\n";
-foreach my $target ( keys %CHOOSEDTARGET ) {
-	if ( $CHOOSEDTARGET{$target} < 0 ) {
-		print "Package $target not built (bad requirement).\n";
-	}
-	else {
-		print "Package $target built succeessfully in $DESTI\n";
-	}
-}
-
-if ( !$btach ) {
-	print "\nPress key to finish...";
-	my $WAITKEY = <STDIN>;
-}
-
-0;

+ 10 - 4
build/obs/README

@@ -29,12 +29,18 @@ To submit a snapshot for building, we should have a service file with content
 </services>
 
 How to have such a service file created automatically ?
-Click on "Add file", then select mode "Upload From: Remote URL"
-Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-3.src.rpm
 
-Then add into advanded - attributes
+Go into project you want to update. It mught be:
+- openSUSE Build Service > Projects > Application:ERP:Dolibarr > dolibarr
+- or your private project
+
+Once logged, click on "Add file" in section "Source Files", then select mode "Upload From: Remote URL"
+Keep empty for "Filename", choose "Remote URL" and enter into last field, URL that should looks like this:
+http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.3.src.rpm
+
+Then add into Advanded - Attributes
 OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
-OBS:QualityCategory Testing
+OBS:QualityCategory Stable|Testing|Development|Private
 
 
 # Move project into official directory

+ 0 - 1
build/rpm/conf.php

@@ -5,4 +5,3 @@
 //
 // This file will be filled by installer
 //
-?>

+ 3 - 1
build/rpm/dolibarr_fedora.spec

@@ -162,7 +162,6 @@ done >>%{name}.lang
 %_datadir/dolibarr/htdocs/asterisk
 %_datadir/dolibarr/htdocs/barcode
 %_datadir/dolibarr/htdocs/bookmarks
-%_datadir/dolibarr/htdocs/boutique
 %_datadir/dolibarr/htdocs/cashdesk
 %_datadir/dolibarr/htdocs/categories
 %_datadir/dolibarr/htdocs/comm
@@ -333,6 +332,9 @@ 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
+* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
+- Upstream release
+
 * Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
 - Upstream release
 

+ 3 - 1
build/rpm/dolibarr_generic.spec

@@ -242,7 +242,6 @@ done >>%{name}.lang
 %_datadir/dolibarr/htdocs/asterisk
 %_datadir/dolibarr/htdocs/barcode
 %_datadir/dolibarr/htdocs/bookmarks
-%_datadir/dolibarr/htdocs/boutique
 %_datadir/dolibarr/htdocs/cashdesk
 %_datadir/dolibarr/htdocs/categories
 %_datadir/dolibarr/htdocs/comm
@@ -569,6 +568,9 @@ 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
+* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
+- Upstream release
+
 * Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
 - Upstream release
 

+ 3 - 1
build/rpm/dolibarr_mandriva.spec

@@ -159,7 +159,6 @@ done >>%{name}.lang
 %_datadir/dolibarr/htdocs/asterisk
 %_datadir/dolibarr/htdocs/barcode
 %_datadir/dolibarr/htdocs/bookmarks
-%_datadir/dolibarr/htdocs/boutique
 %_datadir/dolibarr/htdocs/cashdesk
 %_datadir/dolibarr/htdocs/categories
 %_datadir/dolibarr/htdocs/comm
@@ -338,6 +337,9 @@ 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
+* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
+- Upstream release
+
 * Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
 - Upstream release
 

+ 3 - 1
build/rpm/dolibarr_opensuse.spec

@@ -170,7 +170,6 @@ done >>%{name}.lang
 %_datadir/dolibarr/htdocs/asterisk
 %_datadir/dolibarr/htdocs/barcode
 %_datadir/dolibarr/htdocs/bookmarks
-%_datadir/dolibarr/htdocs/boutique
 %_datadir/dolibarr/htdocs/cashdesk
 %_datadir/dolibarr/htdocs/categories
 %_datadir/dolibarr/htdocs/comm
@@ -349,6 +348,9 @@ 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
+* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
+- Upstream release
+
 * Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
 - Upstream release
 

+ 3 - 1
composer.json

@@ -24,6 +24,8 @@
         "ext-mcrypt": "*",
         "ext-openssl": "*",
         "ext-mbstring": "*",
-        "ext-soap": "*"
+        "ext-soap": "*",
+        "ext-zip": "*",
+        "ext-xml": "*"
     }
 }

+ 51 - 4
dev/codesniffer/ruleset.xml

@@ -12,10 +12,16 @@
 
 		<!-- List of all tests -->
 
+	
+	<!-- Rules from Internal Standard -->
+	
 	<rule ref="Internal.NoCodeFound">
 		<severity>0</severity>
 	</rule>
 
+	
+	<!-- Rules from Generic Standard -->
+		
 	<rule ref="Generic.CodeAnalysis.EmptyStatement" />
 
 	<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
@@ -41,9 +47,6 @@
 		<severity>0</severity>
 	</rule>
 
-    <!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
-    <!-- <rule ref="Zend.Files.ClosingTag"/> -->
-
     <!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
 
     <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
@@ -170,6 +173,10 @@
 	<!-- Disabled as this does not support tab -->
 	<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
 
+
+
+	<!-- Rules from PEAR Standard -->
+
 	<rule ref="PEAR.Classes.ClassDeclaration" />
 
     <!-- Check for duplicate class names -->
@@ -247,6 +254,40 @@
     <rule ref="PEAR.Commenting.FunctionComment.Missing">
         <severity>0</severity>
     </rule>
+    <rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
+        <severity>0</severity>
+    </rule>
+    <!-- TODO Remove this and fix reported errors -->
+    <rule ref="PEAR.Commenting.ClassComment.Missing">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
+        <severity>0</severity>
+    </rule>
+    <rule ref="PEAR.Commenting.FunctionComment.Missing">
+        <severity>0</severity>
+    </rule>
         
     <!-- 
     <rule ref="PEAR.Commenting.FileComment" />
@@ -353,13 +394,13 @@
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCaptial">
         <severity>0</severity>
 	</rule>
+
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
         <severity>0</severity>
 	</rule>
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
         <severity>0</severity>
 	</rule>
-
 	<rule ref="PEAR.NamingConventions.ValidVariableName" />
 
 	<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
@@ -377,4 +418,10 @@
     <!-- Already found as a Generic rule -->
 	<!-- <rule ref="PEAR.WhiteSpace.ScopeIndent" /> -->
 
+
+	<!-- Rules from Zend Standard-->
+
+    <!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
+    <rule ref="Zend.Files.ClosingTag"/>
+
 </ruleset>

+ 0 - 26
dev/dbmodel/emulate_oscommerce/llx_osc_categories.sql

@@ -1,26 +0,0 @@
--- ===================================================================
--- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-CREATE TABLE llx_osc_categories (
-  rowid integer unsigned NOT NULL auto_increment,
-  dolicatid integer NOT NULL default '0',
-  osccatid integer NOT NULL default '0',
-  PRIMARY KEY  (rowid),
-  UNIQUE KEY dolicatid (dolicatid),
-  UNIQUE KEY osccatid (osccatid)
-) ENGINE=InnoDB;

+ 0 - 20
dev/dbmodel/emulate_oscommerce/llx_osc_customer.key.sql

@@ -1,20 +0,0 @@
--- ===================================================================
--- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-
-ALTER TABLE llx_osc_customer ADD CONSTRAINT fk_osc_customer_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);

+ 0 - 25
dev/dbmodel/emulate_oscommerce/llx_osc_customer.sql

@@ -1,25 +0,0 @@
--- ===================================================================
--- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-CREATE TABLE llx_osc_customer (
-  rowid integer NOT NULL default '0',
-  datem datetime default NULL,
-  fk_soc integer NOT NULL default '0',
-  PRIMARY KEY  (rowid),
-  UNIQUE KEY fk_soc (fk_soc)
-) ENGINE=InnoDB;

+ 0 - 25
dev/dbmodel/emulate_oscommerce/llx_osc_order.sql

@@ -1,25 +0,0 @@
--- ===================================================================
--- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-CREATE TABLE llx_osc_order (
-  rowid integer NOT NULL default '0',
-  datem datetime default NULL,
-  fk_commande integer NOT NULL default '0',
-  PRIMARY KEY  (rowid),
-  UNIQUE KEY fk_commande (fk_commande)
-) ENGINE=InnoDB;

+ 0 - 27
dev/dbmodel/emulate_oscommerce/llx_osc_product.sql

@@ -1,27 +0,0 @@
--- ===================================================================
--- Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-CREATE TABLE llx_osc_product (
-  rowid integer NOT NULL default '0',
-  datem datetime default NULL,
-  fk_product integer NOT NULL default '0',
-  PRIMARY KEY  (rowid),
-  UNIQUE KEY fk_product (fk_product)
-) ENGINE=InnoDB;
-
-

+ 0 - 21
dev/detectduplicatelangkey.sh

@@ -1,21 +0,0 @@
-#!/bin/sh
-# Helps find duplicate translation keys in language files
-#
-# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
-
-for file in `find . -type f`
-do
-    dupes=$(
-    sed "s/^\s*//" "$file" | # Remove any leading whitespace
-    sed "s/\s*\=/=/" | # Remove any whitespace before =
-    grep -Po "(^.*?)=" | # Non greedeely match everything before =
-    sed "s/\=//" | # Remove trailing = so we get the key
-    sort | uniq -d # Find duplicates
-    )
-
-    if [ -n "$dupes" ]
-    then
-        echo "Duplicates found in $file"
-        echo "$dupes"
-    fi
-done

+ 26 - 0
dev/detectnotabfiles.sh

@@ -0,0 +1,26 @@
+#!/bin/sh
+#------------------------------------------------------
+# Detect files that does not contains any tab inside
+#
+# Laurent Destailleur - eldy@users.sourceforge.net
+#------------------------------------------------------
+# Usage: fixnotabfiles.sh [list|fix]
+#------------------------------------------------------
+
+# Syntax
+if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
+then
+	echo "Usage: fixnotabfiles.sh [list|fix]"
+fi
+
+# To detec
+if [ "x$1" = "xlist" ]
+then
+	find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
+fi
+
+# To convert
+if [ "x$1" = "xfix" ]
+then
+	echo Feature not implemented. Please fix files manually.
+fi

+ 2 - 0
dev/dolibarr_changes.txt

@@ -44,6 +44,8 @@ In htdocs/includes/tcpdf/tcpdf.php
 -       protected $default_monospaced_font = 'courier';
 +       protected $default_monospaced_font = 'freemono';
 
+* Renamed getmypid into dol_getmypid().
+
 
 JSGANTT:
 --------

+ 38 - 0
dev/fixduplicatelangkey.sh

@@ -0,0 +1,38 @@
+#!/bin/sh
+# Helps find duplicate translation keys in language files
+#
+# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
+
+
+# Syntax
+if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
+then
+	echo "Usage: detectduplicatelangkey.sh (list|fix)"
+fi
+
+
+if [ "x$1" = "xlist" ]
+then
+	for file in `find htdocs/langs/en_US -name *.lang -type f`
+	do
+	    dupes=$(
+	    sed "s/^\s*//" "$file" | # Remove any leading whitespace
+	    sed "s/\s*\=/=/" | # Remove any whitespace before =
+	    grep -Po "(^.*?)=" | # Non greedeely match everything before =
+	    sed "s/\=//" | # Remove trailing = so we get the key
+	    sort | uniq -d # Find duplicates
+	    )
+	
+	    if [ -n "$dupes" ]
+	    then
+	        echo "Duplicates found in $file"
+	        echo "$dupes"
+	    fi
+	done
+fi
+
+# To convert
+if [ "x$1" = "xfix" ]
+then
+	echo Feature not implemented. Please fix files manually.
+fi

+ 0 - 26
dev/fixnotabfiles.sh

@@ -1,26 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------
-# Script to find files that are not Unix encoded
-#
-# Laurent Destailleur - eldy@users.sourceforge.net
-#------------------------------------------------------
-# Usage: fixnotabfiles.sh [list|fix]
-#------------------------------------------------------
-
-# Syntax
-if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
-then
-	echo "Usage: fixnotabfiles.sh [list|fix]"
-fi
-
-# To detec
-if [ "x$1" = "xlist" ]
-then
-	find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
-fi
-
-# To convert
-if [ "x$1" = "xfix" ]
-then
-	echo Feature not implemented. Please fix files manually.
-fi

+ 2 - 0
dev/fixperms.sh

@@ -25,4 +25,6 @@ then
 	find ./htdocs -type f -iname "*.php" -exec chmod a-x {} \; 
 	chmod a+x ./scripts/*/*.php
 	chmod a+x ./scripts/*/*.sh
+	chmod g-w ./scripts/*/*.php
+	chmod g-w ./scripts/*/*.sh
 fi

+ 1 - 1
dev/initdata/generate-facture.php

@@ -94,7 +94,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
 
 	print "Invoice ".$i." for socid ".$socid;
 
-	$facture = new Facture($db, $socids[$socid]);
+	$facture = new Facture($db);
 	$facture->date = time();
 	$facture->cond_reglement_id = 3;
 	$facture->mode_reglement_id = 3;

+ 2 - 1
dev/initdata/generate-propale.php

@@ -122,7 +122,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
 	$soc = new Societe($db);
 
 
-	$propal = new Propal($db, $socids[$socid]);
+	$propal = new Propal($db);
 
 	$obj = $conf->global->PROPALE_ADDON;
 	$modPropale = new $obj;
@@ -130,6 +130,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
 
 	$propal->ref = $numpr;
 	$propal->contactid = $contids[$socids[$socid]][0];
+	$propal->socid = $socids[$socid];
 	$propal->datep = time();
 	$propal->cond_reglement_id = 3;
 	$propal->mode_reglement_id = 3;

+ 1 - 1
dev/initdata/mysqldump_dolibarr_3.6.0.sql

@@ -4867,7 +4867,7 @@ CREATE TABLE `llx_opensurvey_sondage` (
   `mailsonde` tinyint(4) NOT NULL DEFAULT '0',
   `survey_link_visible` int(11) DEFAULT '1',
   `origin` varchar(64) DEFAULT NULL,
-  `tms` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   PRIMARY KEY (`id_sondage`),
   KEY `idx_id_sondage_admin` (`id_sondage_admin`),
   KEY `idx_date_fin` (`date_fin`)

File diff suppressed because it is too large
+ 147 - 0
dev/initdata/mysqldump_dolibarr_3.7.0.sql


+ 3 - 1
dev/initdata/savedemo.sh

@@ -193,13 +193,15 @@ export list="
 	--ignore-table=$base.llx_cabinetmed_societe
 	--ignore-table=$base.llx_fournisseur_ca
 	--ignore-table=$base.llx_google_maps
+	--ignore-table=$base.llx_notes
 	--ignore-table=$base.llx_pos_paiement_ticket
 	--ignore-table=$base.llx_pos_places
 	--ignore-table=$base.llx_pos_ticket
 	--ignore-table=$base.llx_publi_c_contact_list 
 	--ignore-table=$base.llx_publi_c_dnd_list
 	--ignore-table=$base.llx_publi_c_method_list
-	--ignore-table=$base.llx_ultimatepdf 
+	--ignore-table=$base.llx_ultimatepdf
+	--ignore-table=$base.llx_ventilation_achat
 	" 
 echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
 mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile

+ 138 - 0
dev/initdata/sftpget_and_loaddump.php

@@ -0,0 +1,138 @@
+#!/usr/bin/php
+<?php
+/* Copyright (C) 2012 Laurent Destailleur	<eldy@users.sourceforge.net>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * or see http://www.gnu.org/
+ */
+
+$sapi_type = php_sapi_name();
+$script_file = basename(__FILE__);
+$path=dirname(__FILE__).'/';
+
+// Test if batch mode
+if (substr($sapi_type, 0, 3) == 'cgi') {
+	echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
+	exit;
+}
+
+// Global variables
+$error=0;
+
+$sourceserver=isset($argv[1])?$argv[1]:'';		// user@server:/src/file
+$password=isset($argv[2])?$argv[2]:'';
+$database=isset($argv[3])?$argv[3]:'';
+$loginbase=isset($argv[4])?$argv[4]:'';
+$passwordbase=isset($argv[5])?$argv[5]:'';
+
+// Include Dolibarr environment
+$res=0;
+if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
+if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
+if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
+if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
+if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
+if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
+if (! $res) die ("Failed to include master.inc.php file\n");
+include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
+
+
+/*
+ *	Main
+ */
+
+$login='';
+$server='';
+if (preg_match('/^(.*)@(.*):(.*)$/',$sourceserver,$reg))
+{
+	$login=$reg[1];
+	$server=$reg[2];
+	$sourcefile=$reg[3];
+	$targetfile=basename($sourcefile);
+}
+if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase))
+{
+	print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh database loginbase passbase\n";
+	print "Return code: 0 if success, <>0 if error\n";
+	print "Warning, this script may take a long time.\n";
+	exit(-1);
+}
+
+
+$targetdir='/tmp';
+print "Get dump file from server ".$server.", path ".$sourcefile.", connect with login ".$login." loaded into localhost\n";
+
+$sftpconnectstring=$sourceserver;
+print 'SFTP connect string : '.$sftpconnectstring."\n";
+//print 'SFTP password '.$password."\n";
+
+
+// SFTP connect
+if (! function_exists("ssh2_connect")) {
+	dol_print_error('','ssh2_connect function does not exists'); exit(1);
+}
+
+$connection = ssh2_connect($server, 22);
+if ($connection)
+{
+	if (! @ssh2_auth_password($connection, $login, $password))
+	{
+		dol_syslog("Could not authenticate with username ".$login." . and password ".$password,LOG_ERR);
+		exit(-5);
+	}
+	else
+	{
+		//$stream = ssh2_exec($connection, '/usr/bin/php -i');
+		/*
+		print "Generate dump ".$filesys1.'.bz2'."\n";
+			$stream = ssh2_exec($connection, "mysqldump -u debian-sys-maint -p4k9Blxl2snq4FHXY -h 127.0.0.1 --single-transaction -K --tables -c -e --hex-blob --default-character-set=utf8 saasplex | bzip2 -1 > ".$filesys1.'.bz2');
+			stream_set_blocking($stream, true);
+			// The command may not finish properly if the stream is not read to end
+			$output = stream_get_contents($stream);
+		*/
+
+		$sftp = ssh2_sftp($connection);
+
+		print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n";
+		ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile);
+
+		$fullcommand="cat ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database;
+		if (preg_match('/\.bz2$/',$targetfile))
+		{
+			$fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database;
+		}
+		if (preg_match('/\.gz$/',$targetfile))
+		{
+			$fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database;
+		}
+		print "Load dump with ".$fullcommand."\n";
+		$output=array();
+		$return_var=0;
+		print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n";
+		exec($fullcommand, $output, $return_var);
+		foreach($output as $line) print $line."\n";
+
+		//ssh2_sftp_unlink($sftp, $fileinstalllock);
+		//print $output;
+	}
+}
+else
+{
+	print 'Failed to connect to ssh2 to '.$server;
+	exit(-6);
+}
+
+
+exit(0);

+ 233 - 0
dev/optimize_images.sh

@@ -0,0 +1,233 @@
+#!/bin/bash
+# Borrowed from https://gist.github.com/lgiraudel/6065155
+# Inplace mode added by Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
+
+PROGNAME=${0##*/}
+INPUT=''
+QUIET='0'
+NOSTATS='0'
+INPLACE='0'
+max_input_size=0
+max_output_size=0
+
+
+usage()
+{
+  cat <<EO
+Usage: $PROGNAME [options]
+
+Script to optimize JPG and PNG images in a directory.
+
+Options:
+EO
+cat <<EO | column -s\& -t
+	-h, --help  	   & shows this help
+	-q, --quiet 	   & disables output
+	-i, --input [dir]  & specify input directory (current directory by default)
+	-o, --output [dir] & specify output directory ("output" by default)
+	-ns, --no-stats	& no stats at the end
+	-p, --inplace	  & optimizes files inplace
+EO
+}
+
+# $1: input image
+# $2: output image
+optimize_image()
+{
+	input_file_size=$(stat -c%s "$1")
+	max_input_size=$(expr $max_input_size + $input_file_size)
+
+	if [ "${1##*.}" = "png" ]; then
+		#optipng -o1 -clobber -quiet $1 -out $2.firstpass
+		optipng -o1 -quiet $1 -out $2.firstpass
+		pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null
+		rm -fr $2.firstpass
+	fi
+	if [ "${1##*.}" = "jpg" -o "${1##*.}" = "jpeg" ]; then
+		jpegtran -copy none -progressive $1 > $2
+	fi
+
+	output_file_size=$(stat -c%s "$2")
+	max_output_size=$(expr $max_output_size + $output_file_size)
+}
+
+get_max_file_length()
+{
+	local maxlength=0
+
+	IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
+
+	for CURRENT_IMAGE in $IMAGES; do
+		filename=$(basename "$CURRENT_IMAGE")
+		if [[ ${#filename} -gt $maxlength ]]; then
+			maxlength=${#filename}
+		fi
+	done
+
+	echo "$maxlength"
+}
+
+main()
+{
+	test=`type pngcrush >/dev/null 2>&1`
+	result=$?
+	if [ "x$result" == "x1" ]; then
+		echo "Tool pngcrush not found" && exit 
+	fi
+	
+	test=`type optipng >/dev/null 2>&1`
+	result=$?
+	if [ "x$result" == "x1" ]; then
+		echo "Tool optipng not found" && exit 
+	fi
+
+	test=`type jpegtran >/dev/null 2>&1`
+	result=$?
+	if [ "x$result" == "x1" ]; then
+		echo "Tool jpegtran not found" && exit 
+	fi
+
+
+	# If $INPUT is empty, then we use current directory
+	if [[ "$INPUT" == "" ]]; then
+		INPUT=$(pwd)
+	fi
+
+	# If $OUTPUT is empty, then we use the directory "output" in the current directory
+	if [[ "$OUTPUT" == "" ]]; then
+		OUTPUT=$(pwd)/output
+	fi
+	# If inplace, we use /tmp for output
+	if [[ "$INPLACE" == "1" ]]; then
+		OUTPUT='/tmp/optimize'
+	fi
+
+	echo "Mode is $INPLACE (1=Images are replaced, 0=New images are stored into $OUTPUT)"
+	
+	# We create the output directory
+	mkdir -p $OUTPUT
+
+	# To avoid some troubles with filename with spaces, we store the current IFS (Internal File Separator)...
+	SAVEIFS=$IFS
+	# ...and we set a new one
+	IFS=$(echo -en "\n\b")
+
+	max_filelength=`get_max_file_length`
+	pad=$(printf '%0.1s' "."{1..600})
+	sDone=' [ DONE ]'
+	linelength=$(expr $max_filelength + ${#sDone} + 5)
+
+	# Search of all jpg/jpeg/png in $INPUT
+	# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
+	echo "Scan $INPUT to find images"
+	IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
+
+	if [ "$QUIET" == "0" ]; then
+		echo --- Optimizing $INPUT ---
+		echo
+	fi
+	for CURRENT_IMAGE in $IMAGES; do
+		echo "Process $CURRENT_IMAGE"
+		filename=$(basename $CURRENT_IMAGE)
+		if [ "$QUIET" == "0" ]; then
+			printf '%s ' "$filename"
+			printf '%*.*s' 0 $((linelength - ${#filename} - ${#sDone} )) "$pad"
+		fi
+
+		optimize_image $CURRENT_IMAGE $OUTPUT/$filename
+
+		# Replace file
+		if [[ "$INPLACE" == "1" ]]; then
+			mv $OUTPUT/$filename $CURRENT_IMAGE
+		fi
+
+		if [ "$QUIET" == "0" ]; then
+			printf '%s\n' "$sDone"
+		fi
+	done
+
+	# Cleanup
+	if [[ "$INPLACE" == "1" ]]; then
+		rm -rf $OUTPUT
+	fi
+
+	# we restore the saved IFS
+	IFS=$SAVEIFS
+
+	if [ "$NOSTATS" == "0" -a "$QUIET" == "0" ]; then
+		echo
+		echo "Input: " $(human_readable_filesize $max_input_size)
+		echo "Output: " $(human_readable_filesize $max_output_size)
+		space_saved=$(expr $max_input_size - $max_output_size)
+		echo "Space save: " $(human_readable_filesize $space_saved)
+	fi
+}
+
+human_readable_filesize()
+{
+echo -n $1 | awk 'function human(x) {
+	 s=" b  Kb Mb Gb Tb"
+	 while (x>=1024 && length(s)>1)
+		   {x/=1024; s=substr(s,4)}
+	 s=substr(s,1,4)
+	 xf=(s==" b ")?"%5d   ":"%.2f"
+	 return sprintf( xf"%s", x, s)
+  }
+  {gsub(/^[0-9]+/, human($1)); print}'
+}
+
+SHORTOPTS="h,i:,o:,q,s,p"
+LONGOPTS="help,input:,output:,quiet,no-stats,inplace"
+ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
+
+# Syntax
+if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
+then
+	echo "Usage: optimize_images.sh (list|fix) -i dirtoscan"
+	exit
+fi
+
+eval set -- "$ARGS"
+while true; do
+	case $1 in
+		-h|--help)
+			usage
+			exit 0
+			;;
+		-i|--input)
+			shift
+			INPUT=$1
+			;;
+		-o|--output)
+			shift
+			OUTPUT=$1
+			;;
+		-q|--quiet)
+			QUIET='1'
+			;;
+		-s|--no-stats)
+			NOSTATS='1'
+			;;
+		-p|--inplace)
+			INPLACE='1'
+			;;
+		--)
+			shift
+			break
+			;;
+		*)
+			shift
+			break
+			;;
+	esac
+	shift
+done
+
+# To convert
+if [ "x$1" = "xlist" ]
+then
+	INPLACE=0
+fi
+
+main
+

+ 3 - 3
dev/skeletons/build_class_from_table.php

@@ -254,11 +254,11 @@ foreach($property as $key => $prop)
 		$varprop.="\t\t\$sql.= \" ";
 		if ($prop['istime'])
 		{
-			$varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':$this->db->idate(';
+			$varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
 			$varprop.="\$this->".$prop['field']."";
-			$varprop.='))."';
+			$varprop.=')."\'")."';
 			if ($i < count($property)) $varprop.=",";
-			$varprop.="\";";
+			$varprop.='";';
 		}
 		elseif ($prop['ischar'])
 		{

+ 1 - 1
dev/skeletons/modMyModule.class.php

@@ -173,7 +173,7 @@ class modMyModule extends DolibarrModules
 
 		// Add here list of permission defined by an id, a label, a boolean and two constant strings.
 		// Example:
-		// $this->rights[$r][0] = 2000; 				// Permission id (must not be already used)
+		// $this->rights[$r][0] = $this->numero + $r;	// Permission id (must not be already used)
 		// $this->rights[$r][1] = 'Permision label';	// Permission label
 		// $this->rights[$r][3] = 1; 					// Permission by default for new user (0/1)
 		// $this->rights[$r][4] = 'level1';				// In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)

+ 28 - 32
dev/skeletons/skeleton_class.class.php

@@ -1,5 +1,6 @@
 <?php
 /* Copyright (C) 2007-2012 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2014	   Juanjo Menent		<jmenent@2byte.es>
  * Copyright (C) ---Put here your own copyright and developer email---
  *
  * This program is free software; you can redistribute it and/or modify
@@ -79,7 +80,7 @@ class Skeleton_Class extends CommonObject
 		// Put here code to add control on parameters values
 
         // Insert request
-		$sql = "INSERT INTO ".MAIN_DB_PREFIX."mytable(";
+		$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
 		$sql.= " field1,";
 		$sql.= " field2";
 		//...
@@ -91,13 +92,13 @@ class Skeleton_Class extends CommonObject
 
 		$this->db->begin();
 
-	   	dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
+	   	dol_syslog(__METHOD__, LOG_DEBUG);
         $resql=$this->db->query($sql);
     	if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
 
 		if (! $error)
         {
-            $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."mytable");
+            $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
 
 			if (! $notrigger)
 			{
@@ -105,10 +106,8 @@ class Skeleton_Class extends CommonObject
 	            // want this action calls a trigger.
 
 	            //// Call triggers
-	            //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
-	            //$interface=new Interfaces($this->db);
-	            //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
-	            //if ($result < 0) { $error++; $this->errors=$interface->errors; }
+	            //$result=$this->call_trigger('MYOBJECT_CREATE',$user);
+	            //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
 	            //// End call triggers
 			}
         }
@@ -118,7 +117,7 @@ class Skeleton_Class extends CommonObject
 		{
 			foreach($this->errors as $errmsg)
 			{
-	            dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
+	            dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
 	            $this->error.=($this->error?', '.$errmsg:$errmsg);
 			}
 			$this->db->rollback();
@@ -135,10 +134,11 @@ class Skeleton_Class extends CommonObject
     /**
      *  Load object in memory from the database
      *
-     *  @param	int		$id    Id object
+     *  @param	int		$id    	Id object
+     *  @param	string	$ref	Ref
      *  @return int          	<0 if KO, >0 if OK
      */
-    function fetch($id)
+    function fetch($id,$ref='')
     {
     	global $langs;
         $sql = "SELECT";
@@ -146,10 +146,11 @@ class Skeleton_Class extends CommonObject
 		$sql.= " t.field1,";
 		$sql.= " t.field2";
 		//...
-        $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
-        $sql.= " WHERE t.rowid = ".$id;
+        $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t";
+        if ($ref) $sql.= " WHERE t.ref = '".$ref."'";
+        else $sql.= " WHERE t.rowid = ".$id;
 
-    	dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
+    	dol_syslog(get_class($this)."::fetch");
         $resql=$this->db->query($sql);
         if ($resql)
         {
@@ -169,7 +170,6 @@ class Skeleton_Class extends CommonObject
         else
         {
       	    $this->error="Error ".$this->db->lasterror();
-            dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
             return -1;
         }
     }
@@ -182,7 +182,7 @@ class Skeleton_Class extends CommonObject
      *  @param  int		$notrigger	 0=launch triggers after, 1=disable triggers
      *  @return int     		   	 <0 if KO, >0 if OK
      */
-    function update($user=0, $notrigger=0)
+    function update($user, $notrigger=0)
     {
     	global $conf, $langs;
 		$error=0;
@@ -196,7 +196,7 @@ class Skeleton_Class extends CommonObject
 		// Put here code to add a control on parameters values
 
         // Update request
-        $sql = "UPDATE ".MAIN_DB_PREFIX."mytable SET";
+        $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
         $sql.= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
         $sql.= " field2=".(isset($this->field2)?"'".$this->db->escape($this->field2)."'":"null")."";
 		//...
@@ -204,7 +204,7 @@ class Skeleton_Class extends CommonObject
 
 		$this->db->begin();
 
-		dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
+		dol_syslog(__METHOD__);
         $resql = $this->db->query($sql);
     	if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
 
@@ -216,12 +216,10 @@ class Skeleton_Class extends CommonObject
 	            // want this action calls a trigger.
 
 	            //// Call triggers
-	            //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
-	            //$interface=new Interfaces($this->db);
-	            //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
-	            //if ($result < 0) { $error++; $this->errors=$interface->errors; }
+	            //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
+	            //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
 	            //// End call triggers
-	    	}
+			 }
 		}
 
         // Commit or rollback
@@ -229,7 +227,7 @@ class Skeleton_Class extends CommonObject
 		{
 			foreach($this->errors as $errmsg)
 			{
-	            dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
+	            dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
 	            $this->error.=($this->error?', '.$errmsg:$errmsg);
 			}
 			$this->db->rollback();
@@ -264,21 +262,19 @@ class Skeleton_Class extends CommonObject
 				// Uncomment this and change MYOBJECT to your own tag if you
 		        // want this action calls a trigger.
 
-		        //// Call triggers
-		        //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
-		        //$interface=new Interfaces($this->db);
-		        //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
-		        //if ($result < 0) { $error++; $this->errors=$interface->errors; }
-		        //// End call triggers
+	            //// Call triggers
+	            //$result=$this->call_trigger('MYOBJECT_DELETE',$user);
+	            //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
+	            //// End call triggers
 			}
 		}
 
 		if (! $error)
 		{
-    		$sql = "DELETE FROM ".MAIN_DB_PREFIX."mytable";
+    		$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element;
     		$sql.= " WHERE rowid=".$this->id;
 
-    		dol_syslog(get_class($this)."::delete sql=".$sql);
+    		dol_syslog(__METHOD__);
     		$resql = $this->db->query($sql);
         	if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
 		}
@@ -288,7 +284,7 @@ class Skeleton_Class extends CommonObject
 		{
 			foreach($this->errors as $errmsg)
 			{
-	            dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
+	            dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
 	            $this->error.=($this->error?', '.$errmsg:$errmsg);
 			}
 			$this->db->rollback();

+ 213 - 28
dev/skeletons/skeleton_page.php

@@ -43,6 +43,7 @@ if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@includ
 if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php';   // Used on dev env only
 if (! $res) die("Include of main fails");
 // Change this following line to use the correct relative path from htdocs
+include_once(DOL_DOCUMENT_ROOT.'/core/class/formcompany.class.php');
 dol_include_once('/module/class/skeleton_class.class.php');
 
 // Load traductions files requiredby by page
@@ -52,6 +53,7 @@ $langs->load("other");
 // Get parameters
 $id			= GETPOST('id','int');
 $action		= GETPOST('action','alpha');
+$backtopage = GETPOST('backtopage');
 $myparam	= GETPOST('myparam','alpha');
 
 // Protection if external user
@@ -60,6 +62,16 @@ if ($user->societe_id > 0)
 	//accessforbidden();
 }
 
+if (empty($action) && empty($id) && empty($ref)) $action='create';
+
+// Load object if id or ref is provided as parameter
+$object=new Skeleton_Class($db);
+if (($id > 0 || ! empty($ref)) && $action != 'add')
+{
+	$result=$object->fetch($id,$ref);
+	if ($result < 0) dol_print_error($db);
+}
+
 
 
 /*******************************************************************
@@ -68,19 +80,104 @@ if ($user->societe_id > 0)
 * Put here all code to do according to value of "action" parameter
 ********************************************************************/
 
+// Action to add record
 if ($action == 'add')
 {
-	$object=new Skeleton_Class($db);
-	$object->prop1=$_POST["field1"];
-	$object->prop2=$_POST["field2"];
-	$result=$object->create($user);
+	if (GETPOST('cancel'))
+	{
+		$urltogo=$backtopage?$backtopage:dol_buildpath('/buildingmanagement/list.php',1);
+		header("Location: ".$urltogo);
+		exit;
+	}
+
+	$error=0;
+
+	/* object_prop_getpost_prop */
+	$object->prop1=GETPOST("field1");
+	$object->prop2=GETPOST("field2");
+
+	if (empty($object->ref))
+	{
+		$error++;
+		setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),'errors');
+	}
+
+	if (! $error)
+	{
+		$result=$object->create($user);
+		if ($result > 0)
+		{
+			// Creation OK
+			$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
+			header("Location: ".$urltogo);
+			exit;
+		}
+		{
+			// Creation KO
+			if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
+			else  setEventMessages($object->error, null, 'errors');
+			$action='create';
+		}
+	}
+	else
+	{
+		$action='create';
+	}
+}
+
+// Cancel
+if ($action == 'update' && GETPOST('cancel')) $action='view';
+
+// Action to update record
+if ($action == 'update' && ! GETPOST('cancel'))
+{
+	$error=0;
+
+	$object->prop1=GETPOST("field1");
+	$object->prop2=GETPOST("field2");
+
+	if (empty($object->ref))
+	{
+		$error++;
+		setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
+	}
+
+	if (! $error)
+	{
+		$result=$object->update($user);
+		if ($result > 0)
+		{
+			$action='view';
+		}
+		else
+		{
+			// Creation KO
+			if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
+			else setEventMessages($object->error, null, 'errors');
+			$action='edit';
+		}
+	}
+	else
+	{
+		$action='edit';
+	}
+}
+
+// Action to delete
+if ($action == 'confirm_delete')
+{
+	$result=$object->delete($user);
 	if ($result > 0)
 	{
-		// Creation OK
+		// Delete OK
+		setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
+		header("Location: ".dol_buildpath('/buildingmanagement/list.php',1));
+		exit;
 	}
+	else
 	{
-		// Creation KO
-		$mesg=$object->error;
+		if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors');
+		else setEventMessages($object->error,null,'errors');
 	}
 }
 
@@ -101,7 +198,7 @@ $form=new Form($db);
 
 // Put here content of your page
 
-// Example 1 : Adding jquery code
+// Example : Adding jquery code
 print '<script type="text/javascript" language="javascript">
 jQuery(document).ready(function() {
 	function init_myfunc()
@@ -117,13 +214,8 @@ jQuery(document).ready(function() {
 </script>';
 
 
-// Example 2 : Adding links to objects
-// The class must extends CommonObject class to have this method available
-//$somethingshown=$object->showLinkedObjectBlock();
-
-
-// Example 3 : List of data
-if ($action == 'list')
+// Part to show a list
+if ($action == 'list' || empty($id))
 {
     $sql = "SELECT";
     $sql.= " t.rowid,";
@@ -139,27 +231,24 @@ if ($action == 'list')
     print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
     print '</tr>';
 
-    dol_syslog($script_file." sql=".$sql, LOG_DEBUG);
+    dol_syslog($script_file, LOG_DEBUG);
     $resql=$db->query($sql);
     if ($resql)
     {
         $num = $db->num_rows($resql);
         $i = 0;
-        if ($num)
+        while ($i < $num)
         {
-            while ($i < $num)
+            $obj = $db->fetch_object($resql);
+            if ($obj)
             {
-                $obj = $db->fetch_object($resql);
-                if ($obj)
-                {
-                    // You can use here results
-                    print '<tr><td>';
-                    print $obj->field1;
-                    print $obj->field2;
-                    print '</td></tr>';
-                }
-                $i++;
+                // You can use here results
+                print '<tr><td>';
+                print $obj->field1;
+                print $obj->field2;
+                print '</td></tr>';
             }
+            $i++;
         }
     }
     else
@@ -173,6 +262,102 @@ if ($action == 'list')
 
 
 
+// Part to create
+if ($action == 'create')
+{
+	print_fiche_titre($langs->trans("NewResidence"));
+
+	dol_fiche_head();
+
+	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
+	print '<input type="hidden" name="action" value="add">';
+	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
+
+	print '<table class="border centpercent">'."\n";
+	print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>';
+	print '<input class="flat" type="text" size="36" name="label" value="'.$label.'">';
+	print '</td></tr>';
+
+	print '</table>'."\n";
+
+	print '<br>';
+
+	print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
+
+	print '</form>';
+
+	dol_fiche_end();
+}
+
+
+
+// Part to edit record
+if (($id || $ref) && $action == 'edit')
+{
+	dol_fiche_head();
+
+	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
+	print '<input type="hidden" name="action" value="add">';
+	print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
+	print '<input type="hidden" name="id" value="'.$object->id.'">';
+
+
+	print '<br>';
+
+	print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></center>';
+
+	print '</form>';
+
+	dol_fiche_end();
+}
+
+
+
+// Part to show record
+if ($id && (empty($action) || $action == 'view'))
+{
+	dol_fiche_head();
+
+
+
+	dol_fiche_end();
+
+
+	// Buttons
+	print '<div class="tabsAction">'."\n";
+	$parameters=array();
+	$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action);    // Note that $action and $object may have been modified by hook
+	if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+	if (empty($reshook))
+	{
+		if ($user->rights->mymodule->write)
+		{
+			print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n";
+		}
+
+		if ($user->rights->mymodule->delete)
+		{
+			if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))	// We can't use preloaded confirm form with jmobile
+			{
+				print '<div class="inline-block divButAction"><span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span></div>'."\n";
+			}
+			else
+			{
+				print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a></div>'."\n";
+			}
+		}
+	}
+	print '</div>'."\n";
+
+
+	// Example 2 : Adding links to objects
+	// The class must extends CommonObject class to have this method available
+	//$somethingshown=$object->showLinkedObjectBlock();
+
+}
+
+
 // End of page
 llxFooter();
 $db->close();

+ 2 - 2
dev/skeletons/skeleton_script.php

@@ -57,7 +57,7 @@ if (! $result > 0) { dol_print_error('',$user->error); exit; }
 $user->getrights();
 
 
-print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
+print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
 if (! isset($argv[1])) {	// Check parameters
     print "Usage: ".$script_file." param1 param2 ...\n";
 	exit(-1);
@@ -119,7 +119,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."skeleton";
 $sql.= " WHERE field3 = 'xxx'";
 $sql.= " ORDER BY field1 ASC";
 
-dol_syslog($script_file." sql=".$sql, LOG_DEBUG);
+dol_syslog($script_file, LOG_DEBUG);
 $resql=$db->query($sql);
 if ($resql)
 {

+ 2 - 3
dev/skeletons/skeleton_webservice_server.php

@@ -141,7 +141,7 @@ $server->register(
  * @param	array		$authentication		Array of authentication information
  * @param	int			$id					Id of object
  * @param	string		$ref				Ref of object
- * @param	ref_ext		$ref_ext			Ref external of object
+ * @param	string		$ref_ext			Ref external of object
  * @return	mixed
  */
 function getSkeleton($authentication,$id,$ref='',$ref_ext='')
@@ -269,5 +269,4 @@ function createSkeleton($authentication,$skeleton)
 }
 
 // Return the results.
-$server->service($HTTP_RAW_POST_DATA);
-
+$server->service(file_get_contents("php://input"));

+ 22 - 10
dev/translation/strip_language_file.php

@@ -1,9 +1,22 @@
 #!/usr/bin/php
 <?php
-/*
- * strip_language_file.php
+/* Copyright (C) 2014 by FromDual GmbH, licensed under GPL v2
+ * Copyright (C) 2014 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
- * (c) 2014 by FromDual GmbH, licensed under GPL v2
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * -----
  *
  * Compares a secondary language translation file with its primary
  * language file and strips redundant translations.
@@ -12,11 +25,10 @@
  *
  * Usage:
  * cd htdocs/langs
- * ../../dev/translation/strip_language_file.php <primary_lang_dir> <secondary_lang_dir> <languagefile.lang>
+ * ../../dev/translation/strip_language_file.php <primary_lang_dir> <secondary_lang_dir> [file.lang|all]
  *
- * Parameters:
- * 1 - Primary Language
- * 2 - Secondary Language
+ * To rename all .delta files, you can do
+ * for fic in `ls *.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
  *
  * Rules:
  * secondary string == primary string -> strip
@@ -24,9 +36,6 @@
  * secondary string not in primary -> strip and warning
  * secondary string has no value -> strip and warning
  * secondary string != primary string -> secondary.lang.delta
- *
- * To rename all .delta fils, you can do
- * for fic in `ls *.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
  */
 
 /**
@@ -260,6 +269,9 @@ foreach($filesToProcess as $fileToProcess)
 	}
 
 	print "Output can be found at $output.\n";
+
+	print "To rename all .delta files, you can do\n";
+	print 'for fic in `ls *.delta`; do f=`echo $fic | sed -e \'s/\.delta//\'`; echo $f; mv $f.delta $f; done'."\n";
 }
 
 

+ 0 - 61
dev/vagrant/README.md

@@ -1,61 +0,0 @@
-Vagrant development box for Dolibarr
-====================================
-
-Introduction
-------------
-
-[Vagrant](http://vagrantup.com) is a tool to make development easier using [VirtualBox](http://virtualbox.org) virtual machines.
-
-These machines have been created with [PuPHEt](http://puphpet.com) and combine the power of Vagrant with [Puppet](http://puppetlabs.com) to automate the development machine provisionning.
-
-What you need
--------------
-
-Latest versions of:
-
-- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
-- [Vagrant](http://downloads.vagrantup.com/)
-
-Usage
------
-
-### VM startup
-
-`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.
-
-### Name resolution
-For easy access to the VM you need to setup name resolution to the machines IP.
-
-Edit the [hosts](https://en.wikipedia.org/wiki/Hosts_(file)) file on the machine you run Vagrant on to map the virtual machine's IP to it's Vhost name.
-
-Example syntax:
-
-    192.168.42.101  dev.dolibarr.org
-
-Once this is done, you will be able to access your VM's service at <http://dev.dolibarr.org>
-
-Available boxes
----------------
-
-### dolibardev
-
-Somewhat bleeding edge vagrant box for develop branch related work.
-
-- IP: 192.168.42.101
-- Vhost: dev.dolibarr.org
-- OS: Debian Wheezy 7.5
-- Webserver: Apache 2.2.22
-- PHP: mod_php 5.5.13-1~dotdeb.1
-- Database: MySQL 5.5
-    - Root user: root
-    - Root password: root
-    - Database name: dolibarr
-    - Database user: user
-    - Database password: user
-    - Initial data: dev/initdata/mysqldump_dolibarr-3.5.0.sql
-- Debugger: XDebug
-- Profiler: Xhprof
-
-You can access MailCatcher to read all outgoing emails at http://192.168.42.101:1080

+ 0 - 170
dev/vagrant/dolibarrdev/Vagrantfile

@@ -1,170 +0,0 @@
-require 'yaml'
-
-dir = File.dirname(File.expand_path(__FILE__))
-
-configValues = YAML.load_file("#{dir}/puphpet/config.yaml")
-data = configValues['vagrantfile-local']
-
-Vagrant.configure("2") do |config|
-  config.vm.box = "#{data['vm']['box']}"
-  config.vm.box_url = "#{data['vm']['box_url']}"
-
-  if data['vm']['hostname'].to_s.strip.length != 0
-    config.vm.hostname = "#{data['vm']['hostname']}"
-  end
-
-  if data['vm']['network']['private_network'].to_s != ''
-    config.vm.network "private_network", ip: "#{data['vm']['network']['private_network']}"
-  end
-
-  data['vm']['network']['forwarded_port'].each do |i, port|
-    if port['guest'] != '' && port['host'] != ''
-      config.vm.network :forwarded_port, guest: port['guest'].to_i, host: port['host'].to_i
-    end
-  end
-
-  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
-      else
-        config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs,
-          group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"]
-      end
-    end
-  end
-
-  config.vm.usable_port_range = (10200..10500)
-
-  if data['vm']['chosen_provider'].empty? || data['vm']['chosen_provider'] == "virtualbox"
-    ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'
-
-    config.vm.provider :virtualbox do |virtualbox|
-      data['vm']['provider']['virtualbox']['modifyvm'].each do |key, value|
-        if key == "memory"
-          next
-        end
-
-        if key == "natdnshostresolver1"
-          value = value ? "on" : "off"
-        end
-
-        virtualbox.customize ["modifyvm", :id, "--#{key}", "#{value}"]
-      end
-
-      virtualbox.customize ["modifyvm", :id, "--memory", "#{data['vm']['memory']}"]
-
-      if data['vm']['hostname'].to_s.strip.length != 0
-        virtualbox.customize ["modifyvm", :id, "--name", config.vm.hostname]
-      end
-    end
-  end
-
-  if data['vm']['chosen_provider'] == "vmware_fusion" || data['vm']['chosen_provider'] == "vmware_workstation"
-    ENV['VAGRANT_DEFAULT_PROVIDER'] = (data['vm']['chosen_provider'] == "vmware_fusion") ? "vmware_fusion" : "vmware_workstation"
-
-    config.vm.provider "vmware_fusion" do |v|
-      data['vm']['provider']['vmware'].each do |key, value|
-        if key == "memsize"
-          next
-        end
-
-        v.vmx["#{key}"] = "#{value}"
-      end
-
-      v.vmx["memsize"] = "#{data['vm']['memory']}"
-
-      if data['vm']['hostname'].to_s.strip.length != 0
-        v.vmx["displayName"] = config.vm.hostname
-      end
-    end
-  end
-
-  if data['vm']['chosen_provider'] == "parallels"
-    ENV['VAGRANT_DEFAULT_PROVIDER'] = "parallels"
-
-    config.vm.provider "parallels" do |v|
-      data['vm']['provider']['parallels'].each do |key, value|
-        if key == "memsize"
-          next
-        end
-
-        v.customize ["set", :id, "--#{key}", "#{value}"]
-      end
-
-      v.memory = "#{data['vm']['memory']}"
-
-      if data['vm']['hostname'].to_s.strip.length != 0
-        v.name = config.vm.hostname
-      end
-    end
-  end
-
-  ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant"
-
-  config.vm.provision "shell" do |s|
-    s.path = "puphpet/shell/initial-setup.sh"
-    s.args = "/vagrant/puphpet"
-  end
-  config.vm.provision "shell" do |kg|
-    kg.path = "puphpet/shell/ssh-keygen.sh"
-    kg.args = "#{ssh_username}"
-  end
-  config.vm.provision :shell, :path => "puphpet/shell/update-puppet.sh"
-
-  config.vm.provision :puppet do |puppet|
-    puppet.facter = {
-      "ssh_username"     => "#{ssh_username}",
-      "provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'],
-      "vm_target_key"    => 'vagrantfile-local',
-    }
-    puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}"
-    puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}"
-    puppet.module_path = "#{data['vm']['provision']['puppet']['module_path']}"
-
-    if !data['vm']['provision']['puppet']['options'].empty?
-      puppet.options = data['vm']['provision']['puppet']['options']
-    end
-  end
-
-  config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh"
-  config.vm.provision :shell, :path => "puphpet/shell/important-notices.sh"
-
-  if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa")
-    config.ssh.private_key_path = [
-      "#{dir}/puphpet/files/dot/ssh/id_rsa",
-      "#{dir}/puphpet/files/dot/ssh/insecure_private_key"
-    ]
-  end
-
-  if !data['ssh']['host'].nil?
-    config.ssh.host = "#{data['ssh']['host']}"
-  end
-  if !data['ssh']['port'].nil?
-    config.ssh.port = "#{data['ssh']['port']}"
-  end
-  if !data['ssh']['username'].nil?
-    config.ssh.username = "#{data['ssh']['username']}"
-  end
-  if !data['ssh']['guest_port'].nil?
-    config.ssh.guest_port = data['ssh']['guest_port']
-  end
-  if !data['ssh']['shell'].nil?
-    config.ssh.shell = "#{data['ssh']['shell']}"
-  end
-  if !data['ssh']['keep_alive'].nil?
-    config.ssh.keep_alive = data['ssh']['keep_alive']
-  end
-  if !data['ssh']['forward_agent'].nil?
-    config.ssh.forward_agent = data['ssh']['forward_agent']
-  end
-  if !data['ssh']['forward_x11'].nil?
-    config.ssh.forward_x11 = data['ssh']['forward_x11']
-  end
-  if !data['vagrant']['host'].nil?
-    config.vagrant.host = data['vagrant']['host'].gsub(":", "").intern
-  end
-
-end
-

+ 0 - 10
dev/vagrant/dolibarrdev/puphpet/.gitattributes

@@ -1,10 +0,0 @@
-# Autodetect text files
-* text=auto
-
-# Force the following filetypes to have unix eols, so Windows does not break them
-*.pp text eol=lf
-*.sh text eol=lf
-*.yaml text eol=lf
-Puppetfile text eol=lf
-.bash_aliases text eol=lf
-.vimrc text eol=lf

+ 0 - 211
dev/vagrant/dolibarrdev/puphpet/config.yaml

@@ -1,211 +0,0 @@
----
-vagrantfile-local:
-    vm:
-        box: puphpet/debian75-x64
-        box_url: puphpet/debian75-x64
-        hostname: null
-        memory: '512'
-        chosen_provider: virtualbox
-        network:
-            private_network: 192.168.42.101
-            forwarded_port: {  }
-        provider:
-            virtualbox:
-                modifyvm:
-                    natdnshostresolver1: on
-                setextradata:
-                    VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1
-            vmware:
-                numvcpus: 1
-            parallels:
-                cpus: 1
-        provision:
-            puppet:
-                manifests_path: puphpet/puppet
-                manifest_file: manifest.pp
-                module_path: puphpet/puppet/modules
-                options:
-                    - '--verbose'
-                    - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
-                    - '--parser future'
-        synced_folder:
-            PL1BkioqqvGY:
-                source: ../../../
-                target: /var/www
-                nfs: 'false'
-        usable_port_range: 2200..2250
-    ssh:
-        host: null
-        port: null
-        private_key_path: null
-        username: vagrant
-        guest_port: null
-        keep_alive: true
-        forward_agent: false
-        forward_x11: false
-        shell: 'bash -l'
-    vagrant:
-        host: detect
-server:
-    packages:
-        - nano
-        - ack-grep
-    dot_files:
-        -
-            bash_aliases: null
-    _prevent_empty: ''
-mailcatcher:
-    install: '1'
-    settings:
-        smtp_ip: 0.0.0.0
-        smtp_port: 1025
-        http_ip: 0.0.0.0
-        http_port: '1080'
-        mailcatcher_path: /usr/local/bin
-        log_path: /var/log/mailcatcher/mailcatcher.log
-firewall:
-    install: '1'
-    rules: null
-apache:
-    install: '1'
-    settings:
-        user: www-data
-        group: www-data
-        default_vhost: false
-        manage_user: false
-        manage_group: false
-        sendfile: 0
-    modules:
-        - php
-        - rewrite
-    vhosts:
-        CGyWQB0fx4x0:
-            servername: dev.dolibarr.org
-            docroot: /var/www/htdocs
-            port: '80'
-            setenv:
-                - 'APP_ENV dev'
-            override:
-                - All
-            custom_fragment: ''
-            ssl_cert: ''
-            ssl_key: ''
-            ssl_chain: ''
-            ssl_certs_dir: ''
-    mod_pagespeed: 0
-    mod_spdy: 0
-nginx:
-    install: 0
-    vhosts:
-        jeF1sybIJ3V2:
-            server_name: awesome.dev
-            server_aliases:
-                - www.awesome.dev
-            www_root: /var/www/awesome.dev
-            listen_port: '80'
-            index_files:
-                - index.html
-                - index.htm
-                - index.php
-            envvars:
-                - 'APP_ENV dev'
-            ssl_cert: ''
-            ssl_key: ''
-php:
-    install: '1'
-    version: '55'
-    composer: '1'
-    composer_home: ''
-    modules:
-        php:
-            - cli
-            - curl
-            - gd
-            - imagick
-            - intl
-            - mcrypt
-        pear: {  }
-        pecl: {  }
-    ini:
-        display_errors: On
-        error_reporting: '-1'
-        session.save_path: /var/lib/php/session
-        sendmail_path: '"/usr/bin/env catchmail"'
-    timezone: UTC
-xdebug:
-    install: '1'
-    settings:
-        xdebug.default_enable: '1'
-        xdebug.remote_autostart: '0'
-        xdebug.remote_connect_back: '1'
-        xdebug.remote_enable: '1'
-        xdebug.remote_handler: dbgp
-        xdebug.remote_port: '9000'
-xhprof:
-    install: '1'
-drush:
-    install: 0
-    settings:
-        drush.tag_branch: 6.x
-mysql:
-    install: '1'
-    root_password: root
-    adminer: 0
-    databases:
-        2OfuuapoIqsl:
-            grant:
-                - ALTER
-                - CREATE
-                - DELETE
-                - DROP
-                - INDEX
-                - INSERT
-                - SELECT
-                - UPDATE
-            name: dolibarr
-            host: localhost
-            user: user
-            password: user
-            sql_file: /var/www/dev/initdata/mysqldump_dolibarr_3.5.0.sql
-postgresql:
-    install: 0
-    settings:
-        root_password: '123'
-        user_group: postgres
-        encoding: UTF8
-        version: '9.3'
-    databases: {  }
-    adminer: 0
-mariadb:
-    install: 0
-    root_password: '123'
-    adminer: 0
-    databases: {  }
-    version: '10.0'
-mongodb:
-    install: 0
-    settings:
-        auth: 1
-        port: '27017'
-    databases: {  }
-redis:
-    install: 0
-    settings:
-        conf_port: '6379'
-beanstalkd:
-    install: 0
-    settings:
-        listenaddress: 0.0.0.0
-        listenport: '13000'
-        maxjobsize: '65535'
-        maxconnections: '1024'
-        binlogdir: /var/lib/beanstalkd/binlog
-        binlogfsync: null
-        binlogsize: '10485760'
-    beanstalk_console: 0
-    binlogdir: /var/lib/beanstalkd/binlog
-rabbitmq:
-    install: 0
-    settings:
-        port: '5672'
-

+ 0 - 52
dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_aliases

@@ -1,52 +0,0 @@
-if [ -f /etc/bash_completion ]; then
-    source /etc/bash_completion
-fi
-
-__has_parent_dir () {
-    # Utility function so we can test for things like .git/.hg without firing up a
-    # separate process
-    test -d "$1" && return 0;
-
-    current="."
-    while [ ! "$current" -ef "$current/.." ]; do
-        if [ -d "$current/$1" ]; then
-            return 0;
-        fi
-        current="$current/..";
-    done
-
-    return 1;
-}
-
-__vcs_name() {
-    if [ -d .svn ]; then
-        echo "-[svn]";
-    elif __has_parent_dir ".git"; then
-        echo "-[$(__git_ps1 'git %s')]";
-    elif __has_parent_dir ".hg"; then
-        echo "-[hg $(hg branch)]"
-    fi
-}
-
-black=$(tput -Txterm setaf 0)
-red=$(tput -Txterm setaf 1)
-green=$(tput -Txterm setaf 2)
-yellow=$(tput -Txterm setaf 3)
-dk_blue=$(tput -Txterm setaf 4)
-pink=$(tput -Txterm setaf 5)
-lt_blue=$(tput -Txterm setaf 6)
-
-bold=$(tput -Txterm bold)
-reset=$(tput -Txterm sgr0)
-
-# Nicely formatted terminal prompt
-export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ '
-
-alias ls='ls -F --color=always'
-alias dir='dir -F --color=always'
-alias ll='ls -l'
-alias cp='cp -iv'
-alias rm='rm -i'
-alias mv='mv -iv'
-alias grep='grep --color=auto -in'
-alias ..='cd ..'

+ 0 - 491
dev/vagrant/dolibarrdev/puphpet/files/dot/.bash_git

@@ -1,491 +0,0 @@
-# bash/zsh git prompt support
-#
-# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
-# Distributed under the GNU General Public License, version 2.0.
-#
-# This script allows you to see repository status in your prompt.
-#
-# To enable:
-#
-#    1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
-#    2) Add the following line to your .bashrc/.zshrc:
-#        source ~/.git-prompt.sh
-#    3a) Change your PS1 to call __git_ps1 as
-#        command-substitution:
-#        Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
-#        ZSH:  setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
-#        the optional argument will be used as format string.
-#    3b) Alternatively, for a slightly faster prompt, __git_ps1 can
-#        be used for PROMPT_COMMAND in Bash or for precmd() in Zsh
-#        with two parameters, <pre> and <post>, which are strings
-#        you would put in $PS1 before and after the status string
-#        generated by the git-prompt machinery.  e.g.
-#        Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
-#          will show username, at-sign, host, colon, cwd, then
-#          various status string, followed by dollar and SP, as
-#          your prompt.
-#        ZSH:  precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
-#          will show username, pipe, then various status string,
-#          followed by colon, cwd, dollar and SP, as your prompt.
-#        Optionally, you can supply a third argument with a printf
-#        format string to finetune the output of the branch status
-#
-# The repository status will be displayed only if you are currently in a
-# git repository. The %s token is the placeholder for the shown status.
-#
-# The prompt status always includes the current branch name.
-#
-# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
-# unstaged (*) and staged (+) changes will be shown next to the branch
-# name.  You can configure this per-repository with the
-# bash.showDirtyState variable, which defaults to true once
-# GIT_PS1_SHOWDIRTYSTATE is enabled.
-#
-# You can also see if currently something is stashed, by setting
-# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
-# then a '$' will be shown next to the branch name.
-#
-# If you would like to see if there're untracked files, then you can set
-# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
-# files, then a '%' will be shown next to the branch name.  You can
-# configure this per-repository with the bash.showUntrackedFiles
-# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
-# enabled.
-#
-# If you would like to see the difference between HEAD and its upstream,
-# set GIT_PS1_SHOWUPSTREAM="auto".  A "<" indicates you are behind, ">"
-# indicates you are ahead, "<>" indicates you have diverged and "="
-# indicates that there is no difference. You can further control
-# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
-# of values:
-#
-#     verbose       show number of commits ahead/behind (+/-) upstream
-#     name          if verbose, then also show the upstream abbrev name
-#     legacy        don't use the '--count' option available in recent
-#                   versions of git-rev-list
-#     git           always compare HEAD to @{upstream}
-#     svn           always compare HEAD to your SVN upstream
-#
-# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
-# find one, or @{upstream} otherwise.  Once you have set
-# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
-# setting the bash.showUpstream config variable.
-#
-# If you would like to see more information about the identity of
-# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
-# to one of these values:
-#
-#     contains      relative to newer annotated tag (v1.6.3.2~35)
-#     branch        relative to newer tag or branch (master~4)
-#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
-#     default       exactly matching tag
-#
-# If you would like a colored hint about the current dirty state, set
-# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
-# the colored output of "git status -sb" and are available only when
-# using __git_ps1 for PROMPT_COMMAND or precmd.
-
-# check whether printf supports -v
-__git_printf_supports_v=
-printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
-
-# stores the divergence from upstream in $p
-# used by GIT_PS1_SHOWUPSTREAM
-__git_ps1_show_upstream ()
-{
-	local key value
-	local svn_remote svn_url_pattern count n
-	local upstream=git legacy="" verbose="" name=""
-
-	svn_remote=()
-	# get some config options from git-config
-	local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
-	while read -r key value; do
-		case "$key" in
-		bash.showupstream)
-			GIT_PS1_SHOWUPSTREAM="$value"
-			if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
-				p=""
-				return
-			fi
-			;;
-		svn-remote.*.url)
-			svn_remote[$((${#svn_remote[@]} + 1))]="$value"
-			svn_url_pattern="$svn_url_pattern\\|$value"
-			upstream=svn+git # default upstream is SVN if available, else git
-			;;
-		esac
-	done <<< "$output"
-
-	# parse configuration values
-	for option in ${GIT_PS1_SHOWUPSTREAM}; do
-		case "$option" in
-		git|svn) upstream="$option" ;;
-		verbose) verbose=1 ;;
-		legacy)  legacy=1  ;;
-		name)    name=1 ;;
-		esac
-	done
-
-	# Find our upstream
-	case "$upstream" in
-	git)    upstream="@{upstream}" ;;
-	svn*)
-		# get the upstream from the "git-svn-id: ..." in a commit message
-		# (git-svn uses essentially the same procedure internally)
-		local -a svn_upstream
-		svn_upstream=($(git log --first-parent -1 \
-					--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
-		if [[ 0 -ne ${#svn_upstream[@]} ]]; then
-			svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
-			svn_upstream=${svn_upstream%@*}
-			local n_stop="${#svn_remote[@]}"
-			for ((n=1; n <= n_stop; n++)); do
-				svn_upstream=${svn_upstream#${svn_remote[$n]}}
-			done
-
-			if [[ -z "$svn_upstream" ]]; then
-				# default branch name for checkouts with no layout:
-				upstream=${GIT_SVN_ID:-git-svn}
-			else
-				upstream=${svn_upstream#/}
-			fi
-		elif [[ "svn+git" = "$upstream" ]]; then
-			upstream="@{upstream}"
-		fi
-		;;
-	esac
-
-	# Find how many commits we are ahead/behind our upstream
-	if [[ -z "$legacy" ]]; then
-		count="$(git rev-list --count --left-right \
-				"$upstream"...HEAD 2>/dev/null)"
-	else
-		# produce equivalent output to --count for older versions of git
-		local commits
-		if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
-		then
-			local commit behind=0 ahead=0
-			for commit in $commits
-			do
-				case "$commit" in
-				"<"*) ((behind++)) ;;
-				*)    ((ahead++))  ;;
-				esac
-			done
-			count="$behind	$ahead"
-		else
-			count=""
-		fi
-	fi
-
-	# calculate the result
-	if [[ -z "$verbose" ]]; then
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p="=" ;;
-		"0	"*) # ahead of upstream
-			p=">" ;;
-		*"	0") # behind upstream
-			p="<" ;;
-		*)	    # diverged from upstream
-			p="<>" ;;
-		esac
-	else
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p=" u=" ;;
-		"0	"*) # ahead of upstream
-			p=" u+${count#0	}" ;;
-		*"	0") # behind upstream
-			p=" u-${count%	0}" ;;
-		*)	    # diverged from upstream
-			p=" u+${count#*	}-${count%	*}" ;;
-		esac
-		if [[ -n "$count" && -n "$name" ]]; then
-			__git_ps1_upstream_name=$(git rev-parse \
-				--abbrev-ref "$upstream" 2>/dev/null)
-			if [ $pcmode = yes ]; then
-				# see the comments around the
-				# __git_ps1_branch_name variable below
-				p="$p \${__git_ps1_upstream_name}"
-			else
-				p="$p ${__git_ps1_upstream_name}"
-				# not needed anymore; keep user's
-				# environment clean
-				unset __git_ps1_upstream_name
-			fi
-		fi
-	fi
-
-}
-
-# Helper function that is meant to be called from __git_ps1.  It
-# injects color codes into the appropriate gitstring variables used
-# to build a gitstring.
-__git_ps1_colorize_gitstring ()
-{
-	if [[ -n ${ZSH_VERSION-} ]]; then
-		local c_red='%F{red}'
-		local c_green='%F{green}'
-		local c_lblue='%F{blue}'
-		local c_clear='%f'
-	else
-		# Using \[ and \] around colors is necessary to prevent
-		# issues with command line editing/browsing/completion!
-		local c_red='\[\e[31m\]'
-		local c_green='\[\e[32m\]'
-		local c_lblue='\[\e[1;34m\]'
-		local c_clear='\[\e[0m\]'
-	fi
-	local bad_color=$c_red
-	local ok_color=$c_green
-	local flags_color="$c_lblue"
-
-	local branch_color=""
-	if [ $detached = no ]; then
-		branch_color="$ok_color"
-	else
-		branch_color="$bad_color"
-	fi
-	c="$branch_color$c"
-
-	z="$c_clear$z"
-	if [ "$w" = "*" ]; then
-		w="$bad_color$w"
-	fi
-	if [ -n "$i" ]; then
-		i="$ok_color$i"
-	fi
-	if [ -n "$s" ]; then
-		s="$flags_color$s"
-	fi
-	if [ -n "$u" ]; then
-		u="$bad_color$u"
-	fi
-	r="$c_clear$r"
-}
-
-__git_eread ()
-{
-	f="$1"
-	shift
-	test -r "$f" && read "$@" <"$f"
-}
-
-# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
-# when called from PS1 using command substitution
-# in this mode it prints text to add to bash PS1 prompt (includes branch name)
-#
-# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
-# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
-# when two arguments are given, the first is prepended and the second appended
-# to the state string when assigned to PS1.
-# The optional third parameter will be used as printf format string to further
-# customize the output of the git-status string.
-# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
-__git_ps1 ()
-{
-	local pcmode=no
-	local detached=no
-	local ps1pc_start='\u@\h:\w '
-	local ps1pc_end='\$ '
-	local printf_format=' (%s)'
-
-	case "$#" in
-		2|3)	pcmode=yes
-			ps1pc_start="$1"
-			ps1pc_end="$2"
-			printf_format="${3:-$printf_format}"
-		;;
-		0|1)	printf_format="${1:-$printf_format}"
-		;;
-		*)	return
-		;;
-	esac
-
-	local repo_info rev_parse_exit_code
-	repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
-		--is-bare-repository --is-inside-work-tree \
-		--short HEAD 2>/dev/null)"
-	rev_parse_exit_code="$?"
-
-	if [ -z "$repo_info" ]; then
-		if [ $pcmode = yes ]; then
-			#In PC mode PS1 always needs to be set
-			PS1="$ps1pc_start$ps1pc_end"
-		fi
-		return
-	fi
-
-	local short_sha
-	if [ "$rev_parse_exit_code" = "0" ]; then
-		short_sha="${repo_info##*$'\n'}"
-		repo_info="${repo_info%$'\n'*}"
-	fi
-	local inside_worktree="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local bare_repo="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local inside_gitdir="${repo_info##*$'\n'}"
-	local g="${repo_info%$'\n'*}"
-
-	local r=""
-	local b=""
-	local step=""
-	local total=""
-	if [ -d "$g/rebase-merge" ]; then
-		__git_eread "$g/rebase-merge/head-name" b
-		__git_eread "$g/rebase-merge/msgnum" step
-		__git_eread "$g/rebase-merge/end" total
-		if [ -f "$g/rebase-merge/interactive" ]; then
-			r="|REBASE-i"
-		else
-			r="|REBASE-m"
-		fi
-	else
-		if [ -d "$g/rebase-apply" ]; then
-			__git_eread "$g/rebase-apply/next" step
-			__git_eread "$g/rebase-apply/last" total
-			if [ -f "$g/rebase-apply/rebasing" ]; then
-				__git_eread "$g/rebase-apply/head-name" b
-				r="|REBASE"
-			elif [ -f "$g/rebase-apply/applying" ]; then
-				r="|AM"
-			else
-				r="|AM/REBASE"
-			fi
-		elif [ -f "$g/MERGE_HEAD" ]; then
-			r="|MERGING"
-		elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
-			r="|CHERRY-PICKING"
-		elif [ -f "$g/REVERT_HEAD" ]; then
-			r="|REVERTING"
-		elif [ -f "$g/BISECT_LOG" ]; then
-			r="|BISECTING"
-		fi
-
-		if [ -n "$b" ]; then
-			:
-		elif [ -h "$g/HEAD" ]; then
-			# symlink symbolic ref
-			b="$(git symbolic-ref HEAD 2>/dev/null)"
-		else
-			local head=""
-			if ! __git_eread "$g/HEAD" head; then
-				if [ $pcmode = yes ]; then
-					PS1="$ps1pc_start$ps1pc_end"
-				fi
-				return
-			fi
-			# is it a symbolic ref?
-			b="${head#ref: }"
-			if [ "$head" = "$b" ]; then
-				detached=yes
-				b="$(
-				case "${GIT_PS1_DESCRIBE_STYLE-}" in
-				(contains)
-					git describe --contains HEAD ;;
-				(branch)
-					git describe --contains --all HEAD ;;
-				(describe)
-					git describe HEAD ;;
-				(* | default)
-					git describe --tags --exact-match HEAD ;;
-				esac 2>/dev/null)" ||
-
-				b="$short_sha..."
-				b="($b)"
-			fi
-		fi
-	fi
-
-	if [ -n "$step" ] && [ -n "$total" ]; then
-		r="$r $step/$total"
-	fi
-
-	local w=""
-	local i=""
-	local s=""
-	local u=""
-	local c=""
-	local p=""
-
-	if [ "true" = "$inside_gitdir" ]; then
-		if [ "true" = "$bare_repo" ]; then
-			c="BARE:"
-		else
-			b="GIT_DIR!"
-		fi
-	elif [ "true" = "$inside_worktree" ]; then
-		if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
-		   [ "$(git config --bool bash.showDirtyState)" != "false" ]
-		then
-			git diff --no-ext-diff --quiet --exit-code || w="*"
-			if [ -n "$short_sha" ]; then
-				git diff-index --cached --quiet HEAD -- || i="+"
-			else
-				i="#"
-			fi
-		fi
-		if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
-		   [ -r "$g/refs/stash" ]; then
-			s="$"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
-		   [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
-		   git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
-		then
-			u="%${ZSH_VERSION+%}"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
-			__git_ps1_show_upstream
-		fi
-	fi
-
-	local z="${GIT_PS1_STATESEPARATOR-" "}"
-
-	# NO color option unless in PROMPT_COMMAND mode
-	if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
-		__git_ps1_colorize_gitstring
-	fi
-
-	b=${b##refs/heads/}
-	if [ $pcmode = yes ]; then
-		# In pcmode (and only pcmode) the contents of
-		# $gitstring are subject to expansion by the shell.
-		# Avoid putting the raw ref name in the prompt to
-		# protect the user from arbitrary code execution via
-		# specially crafted ref names (e.g., a ref named
-		# '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute
-		# 'sudo rm -rf /' when the prompt is drawn).  Instead,
-		# put the ref name in a new global variable (in the
-		# __git_ps1_* namespace to avoid colliding with the
-		# user's environment) and reference that variable from
-		# PS1.
-		__git_ps1_branch_name=$b
-		# note that the $ is escaped -- the variable will be
-		# expanded later (when it's time to draw the prompt)
-		b="\${__git_ps1_branch_name}"
-	fi
-
-	local f="$w$i$s$u"
-	local gitstring="$c$b${f:+$z$f}$r$p"
-
-	if [ $pcmode = yes ]; then
-		if [ "${__git_printf_supports_v-}" != yes ]; then
-			gitstring=$(printf -- "$printf_format" "$gitstring")
-		else
-			printf -v gitstring -- "$printf_format" "$gitstring"
-		fi
-		PS1="$ps1pc_start$gitstring$ps1pc_end"
-	else
-		printf -- "$printf_format" "$gitstring"
-	fi
-}

+ 0 - 4
dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore

@@ -1,4 +0,0 @@
-ssh/id_rsa
-ssh/id_rsa.pub
-ssh/insecure_private_key
-ssh/id_rsa.ppk

+ 0 - 414
dev/vagrant/dolibarrdev/puphpet/files/dot/.vimrc

@@ -1,414 +0,0 @@
-set rtp+=$GOROOT/misc/vim
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Maintainer:
-"       Amir Salihefendic
-"       http://amix.dk - amix@amix.dk
-"
-" Version:
-"       5.0 - 29/05/12 15:43:36
-"
-" Blog_post:
-"       http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
-"
-" Awesome_version:
-"       Get this config, nice color schemes and lots of plugins!
-"
-"       Install the awesome version from:
-"
-"           https://github.com/amix/vimrc
-"
-" Syntax_highlighted:
-"       http://amix.dk/vim/vimrc.html
-"
-" Raw_version:
-"       http://amix.dk/vim/vimrc.txt
-"
-" Sections:
-"    -> General
-"    -> VIM user interface
-"    -> Colors and Fonts
-"    -> Files and backups
-"    -> Text, tab and indent related
-"    -> Visual mode related
-"    -> Moving around, tabs and buffers
-"    -> Status line
-"    -> Editing mappings
-"    -> vimgrep searching and cope displaying
-"    -> Spell checking
-"    -> Misc
-"    -> Helper functions
-"
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => General
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Sets how many lines of history VIM has to remember
-set history=700
-
-" Enable filetype plugins
-filetype plugin on
-filetype indent on
-
-" Set to auto read when a file is changed from the outside
-set autoread
-
-" With a map leader it's possible to do extra key combinations
-" like <leader>w saves the current file
-let mapleader = ","
-let g:mapleader = ","
-
-" Fast saving
-nmap <leader>w :w!<cr>
-
-" :W sudo saves the file
-" (useful for handling the permission-denied error)
-command W w !sudo tee % > /dev/null
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => VIM user interface
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Set 7 lines to the cursor - when moving vertically using j/k
-set so=7
-
-" Turn on the WiLd menu
-set wildmenu
-
-" Ignore compiled files
-set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
-    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-else
-    set wildignore+=.git\*,.hg\*,.svn\*
-endif
-
-"Always show current position
-set ruler
-
-" Height of the command bar
-set cmdheight=2
-
-" A buffer becomes hidden when it is abandoned
-set hid
-
-" Configure backspace so it acts as it should act
-set backspace=eol,start,indent
-set whichwrap+=<,>,h,l
-
-" Ignore case when searching
-set ignorecase
-
-" When searching try to be smart about cases
-set smartcase
-
-" Highlight search results
-set hlsearch
-
-" Makes search act like search in modern browsers
-set incsearch
-
-" Don't redraw while executing macros (good performance config)
-set lazyredraw
-
-" For regular expressions turn magic on
-set magic
-
-" Show matching brackets when text indicator is over them
-set showmatch
-" How many tenths of a second to blink when matching brackets
-set mat=2
-
-" No annoying sound on errors
-set noerrorbells
-set novisualbell
-set t_vb=
-set tm=500
-
-" Add a bit extra margin to the left
-set foldcolumn=1
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Colors and Fonts
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Enable syntax highlighting
-syntax enable
-
-try
-    colorscheme desert
-catch
-endtry
-
-set background=dark
-
-" Set extra options when running in GUI mode
-if has("gui_running")
-    set guioptions-=T
-    set guioptions-=e
-    set t_Co=256
-    set guitablabel=%M\ %t
-endif
-
-" Set utf8 as standard encoding and en_US as the standard language
-set encoding=utf8
-
-" Use Unix as the standard file type
-set ffs=unix,dos,mac
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Files, backups and undo
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Turn backup off, since most stuff is in SVN, git et.c anyway...
-set nobackup
-set nowb
-set noswapfile
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Text, tab and indent related
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Use spaces instead of tabs
-set expandtab
-
-" Be smart when using tabs ;)
-set smarttab
-
-" 1 tab == 4 spaces
-set shiftwidth=4
-set tabstop=4
-
-" Linebreak on 500 characters
-set lbr
-set tw=500
-
-set ai "Auto indent
-set si "Smart indent
-set wrap "Wrap lines
-
-
-""""""""""""""""""""""""""""""
-" => Visual mode related
-""""""""""""""""""""""""""""""
-" Visual mode pressing * or # searches for the current selection
-" Super useful! From an idea by Michael Naumann
-vnoremap <silent> * :call VisualSelection('f', '')<CR>
-vnoremap <silent> # :call VisualSelection('b', '')<CR>
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Moving around, tabs, windows and buffers
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Treat long lines as break lines (useful when moving around in them)
-map j gj
-map k gk
-
-" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
-map <space> /
-map <c-space> ?
-
-" Disable highlight when <leader><cr> is pressed
-map <silent> <leader><cr> :noh<cr>
-
-" Smart way to move between windows
-map <C-j> <C-W>j
-map <C-k> <C-W>k
-map <C-h> <C-W>h
-map <C-l> <C-W>l
-
-" Close the current buffer
-map <leader>bd :Bclose<cr>
-
-" Close all the buffers
-map <leader>ba :1,1000 bd!<cr>
-
-" Useful mappings for managing tabs
-map <leader>tn :tabnew<cr>
-map <leader>to :tabonly<cr>
-map <leader>tc :tabclose<cr>
-map <leader>tm :tabmove
-map <leader>t<leader> :tabnext
-
-" Opens a new tab with the current buffer's path
-" Super useful when editing files in the same directory
-map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
-
-" Switch CWD to the directory of the open buffer
-map <leader>cd :cd %:p:h<cr>:pwd<cr>
-
-" Specify the behavior when switching between buffers
-try
-  set switchbuf=useopen,usetab,newtab
-  set stal=2
-catch
-endtry
-
-" Return to last edit position when opening files (You want this!)
-autocmd BufReadPost *
-     \ if line("'\"") > 0 && line("'\"") <= line("$") |
-     \   exe "normal! g`\"" |
-     \ endif
-" Remember info about open buffers on close
-set viminfo^=%
-
-
-""""""""""""""""""""""""""""""
-" => Status line
-""""""""""""""""""""""""""""""
-" Always show the status line
-set laststatus=2
-
-" Format the status line
-set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Editing mappings
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remap VIM 0 to first non-blank character
-map 0 ^
-
-" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
-nmap <M-j> mz:m+<cr>`z
-nmap <M-k> mz:m-2<cr>`z
-vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
-vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
-
-if has("mac") || has("macunix")
-  nmap <D-j> <M-j>
-  nmap <D-k> <M-k>
-  vmap <D-j> <M-j>
-  vmap <D-k> <M-k>
-endif
-
-" Delete trailing white space on save, useful for Python and CoffeeScript ;)
-func! DeleteTrailingWS()
-  exe "normal mz"
-  %s/\s\+$//ge
-  exe "normal `z"
-endfunc
-autocmd BufWrite *.py :call DeleteTrailingWS()
-autocmd BufWrite *.coffee :call DeleteTrailingWS()
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => vimgrep searching and cope displaying
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" When you press gv you vimgrep after the selected text
-vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
-
-" Open vimgrep and put the cursor in the right position
-map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
-
-" Vimgreps in the current file
-map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
-
-" When you press <leader>r you can search and replace the selected text
-vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
-
-" Do :help cope if you are unsure what cope is. It's super useful!
-"
-" When you search with vimgrep, display your results in cope by doing:
-"   <leader>cc
-"
-" To go to the next search result do:
-"   <leader>n
-"
-" To go to the previous search results do:
-"   <leader>p
-"
-map <leader>cc :botright cope<cr>
-map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
-map <leader>n :cn<cr>
-map <leader>p :cp<cr>
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Spell checking
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Pressing ,ss will toggle and untoggle spell checking
-map <leader>ss :setlocal spell!<cr>
-
-" Shortcuts using <leader>
-map <leader>sn ]s
-map <leader>sp [s
-map <leader>sa zg
-map <leader>s? z=
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Misc
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remove the Windows ^M - when the encodings gets messed up
-noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
-
-" Quickly open a buffer for scripbble
-map <leader>q :e ~/buffer<cr>
-
-" Toggle paste mode on and off
-map <leader>pp :setlocal paste!<cr>
-
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Helper functions
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-function! CmdLine(str)
-    exe "menu Foo.Bar :" . a:str
-    emenu Foo.Bar
-    unmenu Foo
-endfunction
-
-function! VisualSelection(direction, extra_filter) range
-    let l:saved_reg = @"
-    execute "normal! vgvy"
-
-    let l:pattern = escape(@", '\\/.*$^~[]')
-    let l:pattern = substitute(l:pattern, "\n$", "", "")
-
-    if a:direction == 'b'
-        execute "normal ?" . l:pattern . "^M"
-    elseif a:direction == 'gv'
-        call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
-    elseif a:direction == 'replace'
-        call CmdLine("%s" . '/'. l:pattern . '/')
-    elseif a:direction == 'f'
-        execute "normal /" . l:pattern . "^M"
-    endif
-
-    let @/ = l:pattern
-    let @" = l:saved_reg
-endfunction
-
-
-" Returns true if paste mode is enabled
-function! HasPaste()
-    if &paste
-        return 'PASTE MODE  '
-    en
-    return ''
-endfunction
-
-" Don't close window, when deleting a buffer
-command! Bclose call <SID>BufcloseCloseIt()
-function! <SID>BufcloseCloseIt()
-   let l:currentBufNum = bufnr("%")
-   let l:alternateBufNum = bufnr("#")
-
-   if buflisted(l:alternateBufNum)
-     buffer #
-   else
-     bnext
-   endif
-
-   if bufnr("%") == l:currentBufNum
-     new
-   endif
-
-   if buflisted(l:currentBufNum)
-     execute("bdelete! ".l:currentBufNum)
-   endif
-endfunction

+ 0 - 27
dev/vagrant/dolibarrdev/puphpet/files/dot/ssh/insecure_private_key

@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
-w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
-kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
-hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
-Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
-yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
-ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
-Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
-TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
-iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
-sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
-4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
-cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
-EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
-CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
-3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
-YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
-3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
-dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
-6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
-P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
-llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
-kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
-+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
-NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
------END RSA PRIVATE KEY-----

+ 0 - 25
dev/vagrant/dolibarrdev/puphpet/puppet/Puppetfile

@@ -1,25 +0,0 @@
-forge "http://forge.puppetlabs.com"
-mod 'stdlib', :git => 'https://github.com/puphpet/puppetlabs-stdlib.git'
-mod 'concat', :git => 'https://github.com/puphpet/puppetlabs-concat.git'
-mod 'apt', :git => 'https://github.com/puphpet/puppetlabs-apt.git'
-mod 'yum', :git => 'https://github.com/puphpet/puppet-yum.git'
-mod 'vcsrepo', :git => 'https://github.com/puphpet/puppetlabs-vcsrepo.git'
-mod 'ntp', :git => 'https://github.com/puphpet/puppetlabs-ntp.git'
-mod 'firewall', :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git'
-mod 'git', :git => 'https://github.com/puphpet/puppetlabs-git.git'
-mod 'mailcatcher', :git => 'https://github.com/puphpet/puppet-mailcatcher.git'
-mod 'supervisord', :git => 'https://github.com/puphpet/puppet-supervisord.git'
-mod 'apache', :git => 'https://github.com/puphpet/puppetlabs-apache.git'
-mod 'nginx', :git => 'https://github.com/puphpet/puppet-nginx.git'
-mod 'php', :git => 'https://github.com/puphpet/puppet-php.git'
-mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git'
-mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git'
-mod 'puppi', :git => 'https://github.com/puphpet/puppi.git'
-mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git'
-mod 'mysql', :git => 'https://github.com/puphpet/puppetlabs-mysql.git'
-mod 'postgresql', :git => 'https://github.com/puphpet/puppetlabs-postgresql.git'
-mod 'mongodb', :git => 'https://github.com/puphpet/puppetlabs-mongodb.git'
-mod 'redis', :git => 'https://github.com/puphpet/puppet-redis.git'
-mod 'beanstalkd', :git => 'https://github.com/puphpet/puppet-beanstalkd.git'
-mod 'rabbitmq', :git => 'https://github.com/puphpet/puppetlabs-rabbitmq.git'
-mod 'staging', :git => 'https://github.com/puphpet/puppet-staging.git'

+ 0 - 7
dev/vagrant/dolibarrdev/puphpet/puppet/hiera.yaml

@@ -1,7 +0,0 @@
----
-:backends: yaml
-:yaml:
-    :datadir: '/vagrant/puphpet'
-:hierarchy:
-    - config
-:logger: console

+ 0 - 1745
dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp

@@ -1,1745 +0,0 @@
-## Begin Server manifest
-
-if $server_values == undef {
-  $server_values = hiera('server', false)
-} if $vm_values == undef {
-  $vm_values = hiera($::vm_target_key, false)
-}
-# Ensure the time is accurate, reducing the possibilities of apt repositories
-# failing for invalid certificates
-class { 'ntp': }
-
-include 'puphpet'
-include 'puphpet::params'
-
-Exec { path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ] }
-group { 'puppet':   ensure => present }
-group { 'www-data': ensure => present }
-group { 'www-user': ensure => present }
-
-user { $::ssh_username:
-  shell   => '/bin/bash',
-  home    => "/home/${::ssh_username}",
-  ensure  => present,
-  groups  => ['www-data', 'www-user'],
-  require => [Group['www-data'], Group['www-user']]
-}
-
-user { ['apache', 'nginx', 'httpd', 'www-data']:
-  shell  => '/bin/bash',
-  ensure => present,
-  groups => 'www-data',
-  require => Group['www-data']
-}
-
-file { "/home/${::ssh_username}":
-  ensure => directory,
-  owner  => $::ssh_username,
-}
-
-# copy dot files to ssh user's home directory
-exec { 'dotfiles':
-  cwd     => "/home/${::ssh_username}",
-  command => "cp -r /vagrant/puphpet/files/dot/.[a-zA-Z0-9]* /home/${::ssh_username}/ \
-              && chown -R ${::ssh_username} /home/${::ssh_username}/.[a-zA-Z0-9]* \
-              && cp -r /vagrant/puphpet/files/dot/.[a-zA-Z0-9]* /root/",
-  onlyif  => 'test -d /vagrant/puphpet/files/dot',
-  returns => [0, 1],
-  require => User[$::ssh_username]
-}
-
-case $::osfamily {
-  # debian, ubuntu
-  'debian': {
-    class { 'apt': }
-
-    Class['::apt::update'] -> Package <|
-        title != 'python-software-properties'
-    and title != 'software-properties-common'
-    |>
-
-    if ! defined(Package['augeas-tools']) {
-      package { 'augeas-tools':
-        ensure => present,
-      }
-    }
-  }
-  # redhat, centos
-  'redhat': {
-    class { 'yum': extrarepo => ['epel'] }
-
-    class { 'yum::repo::rpmforge': }
-    class { 'yum::repo::repoforgeextras': }
-
-    Class['::yum'] -> Yum::Managed_yumrepo <| |> -> Package <| |>
-
-    if ! defined(Package['git']) {
-      package { 'git':
-        ensure  => latest,
-        require => Class['yum::repo::repoforgeextras']
-      }
-    }
-
-    file_line { 'link ~/.bash_git':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_git for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => '/root/.bashrc',
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_aliases':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_aliases for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => '/root/.bashrc',
-      require => Exec['dotfiles'],
-    }
-
-    ensure_packages( ['augeas'] )
-  }
-}
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-}
-
-case $::operatingsystem {
-  'debian': {
-    include apt::backports
-
-    add_dotdeb { 'packages.dotdeb.org': release => $lsbdistcodename }
-
-   if hash_key_equals($php_values, 'install', 1) {
-      # Debian Squeeze 6.0 can do PHP 5.3 (default) and 5.4
-      if $lsbdistcodename == 'squeeze' and $php_values['version'] == '54' {
-        add_dotdeb { 'packages.dotdeb.org-php54': release => 'squeeze-php54' }
-      }
-      # Debian Wheezy 7.0 can do PHP 5.4 (default) and 5.5
-      elsif $lsbdistcodename == 'wheezy' and $php_values['version'] == '55' {
-        add_dotdeb { 'packages.dotdeb.org-php55': release => 'wheezy-php55' }
-      }
-    }
-
-    $server_lsbdistcodename = downcase($lsbdistcodename)
-
-    apt::force { 'git':
-      release => "${server_lsbdistcodename}-backports",
-      timeout => 60
-    }
-  }
-  'ubuntu': {
-    apt::key { '4F4EA0AAE5267A6C':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-    apt::key { '4CBEDD5A':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-
-    if $lsbdistcodename in ['lucid', 'precise'] {
-      apt::ppa { 'ppa:pdoes/ppa': require => Apt::Key['4CBEDD5A'], options => '' }
-    } else {
-      apt::ppa { 'ppa:pdoes/ppa': require => Apt::Key['4CBEDD5A'] }
-    }
-
-    if hash_key_equals($php_values, 'install', 1) {
-      # Ubuntu Lucid 10.04, Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.3 (default <= 12.10) and 5.4 (default <= 13.04)
-      if $lsbdistcodename in ['lucid', 'precise', 'quantal', 'raring', 'trusty'] and $php_values['version'] == '54' {
-        if $lsbdistcodename == 'lucid' {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'], options => '' }
-        } else {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'] }
-        }
-      }
-      # Ubuntu 12.04/10, 13.04/10, 14.04 can do PHP 5.5
-      elsif $lsbdistcodename in ['precise', 'quantal', 'raring', 'saucy', 'trusty'] and $php_values['version'] == '55' {
-        apt::ppa { 'ppa:ondrej/php5': require => Apt::Key['4F4EA0AAE5267A6C'] }
-      }
-      elsif $lsbdistcodename in ['lucid'] and $php_values['version'] == '55' {
-        err('You have chosen to install PHP 5.5 on Ubuntu 10.04 Lucid. This will probably not work!')
-      }
-    }
-  }
-  'redhat', 'centos': {
-    if hash_key_equals($php_values, 'install', 1) {
-      if $php_values['version'] == '54' {
-        class { 'yum::repo::remi': }
-      }
-      # remi_php55 requires the remi repo as well
-      elsif $php_values['version'] == '55' {
-        class { 'yum::repo::remi': }
-        class { 'yum::repo::remi_php55': }
-      }
-    }
-  }
-}
-
-if is_array($server_values['packages']) and count($server_values['packages']) > 0 {
-  each( $server_values['packages'] ) |$package| {
-    if ! defined(Package[$package]) {
-      package { $package:
-        ensure => present,
-      }
-    }
-  }
-}
-
-define add_dotdeb ($release){
-   apt::source { $name:
-    location          => 'http://packages.dotdeb.org',
-    release           => $release,
-    repos             => 'all',
-    required_packages => 'debian-keyring debian-archive-keyring',
-    key               => '89DF5277',
-    key_server        => 'keys.gnupg.net',
-    include_src       => true
-  }
-}
-
-# Begin open ports for iptables
-if has_key($vm_values, 'vm')
-  and has_key($vm_values['vm'], 'network')
-  and has_key($vm_values['vm']['network'], 'forwarded_port')
-{
-  create_resources( iptables_port, $vm_values['vm']['network']['forwarded_port'] )
-}
-
-if has_key($vm_values, 'ssh') and has_key($vm_values['ssh'], 'port') {
-  $vm_values_ssh_port = $vm_values['ssh']['port'] ? {
-    ''      => 22,
-    undef   => 22,
-    0       => 22,
-    default => $vm_values['ssh']['port']
-  }
-
-  if ! defined(Firewall["100 tcp/${vm_values_ssh_port}"]) {
-    firewall { "100 tcp/${vm_values_ssh_port}":
-      port   => $vm_values_ssh_port,
-      proto  => tcp,
-      action => 'accept',
-      before => Class['my_fw::post']
-    }
-  }
-}
-
-define iptables_port (
-  $host,
-  $guest,
-) {
-  if ! defined(Firewall["100 tcp/${guest}"]) {
-    firewall { "100 tcp/${guest}":
-      port   => $guest,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-
-## Begin MailCatcher manifest
-
-if $mailcatcher_values == undef {
-  $mailcatcher_values = hiera('mailcatcher', false)
-}
-
-if hash_key_equals($mailcatcher_values, 'install', 1) {
-  if ! defined(Package['tilt']) {
-    package { 'tilt':
-      ensure   => '1.3',
-      provider => 'gem',
-      before   => Class['mailcatcher']
-    }
-  }
-
-  if $::operatingsystem == 'ubuntu' and $lsbdistcodename == 'trusty' {
-    package { 'rubygems':
-      ensure => absent,
-    }
-  }
-
-  create_resources('class', { 'mailcatcher' => $mailcatcher_values['settings'] })
-
-  if ! defined(Firewall["100 tcp/${mailcatcher_values['settings']['smtp_port']},${mailcatcher_values['settings']['http_port']}"]) {
-    firewall { "100 tcp/${mailcatcher_values['settings']['smtp_port']}, ${mailcatcher_values['settings']['http_port']}":
-      port   => [$mailcatcher_values['settings']['smtp_port'], $mailcatcher_values['settings']['http_port']],
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-
-  if ! defined(Class['supervisord']) {
-    class { 'supervisord':
-      install_pip => true,
-    }
-  }
-
-  $supervisord_mailcatcher_options = sort(join_keys_to_values({
-    ' --smtp-ip'   => $mailcatcher_values['settings']['smtp_ip'],
-    ' --smtp-port' => $mailcatcher_values['settings']['smtp_port'],
-    ' --http-ip'   => $mailcatcher_values['settings']['http_ip'],
-    ' --http-port' => $mailcatcher_values['settings']['http_port']
-  }, ' '))
-
-  $supervisord_mailcatcher_cmd = "mailcatcher ${supervisord_mailcatcher_options} -f  >> ${mailcatcher_values['settings']['log']}"
-
-  supervisord::program { 'mailcatcher':
-    command     => $supervisord_mailcatcher_cmd,
-    priority    => '100',
-    user        => 'mailcatcher',
-    autostart   => true,
-    autorestart => 'true',
-    environment => {
-      'PATH' => "/bin:/sbin:/usr/bin:/usr/sbin:${mailcatcher_values['settings']['path']}"
-    },
-    require => Package['mailcatcher']
-  }
-}
-
-## Begin Firewall manifest
-
-if $firewall_values == undef {
-  $firewall_values = hiera('firewall', false)
-}
-
-resources { 'firewall':
-  purge => true
-}
-
-Firewall {
-  before  => Class['my_fw::post'],
-  require => Class['my_fw::pre'],
-}
-
-class { ['my_fw::pre', 'my_fw::post']: }
-
-class { 'firewall': }
-
-class my_fw::pre {
-  Firewall {
-    require => undef,
-  }
-
-  # Default firewall rules
-  firewall { '000 accept all icmp':
-    proto  => 'icmp',
-    action => 'accept',
-  }->
-  firewall { '001 accept all to lo interface':
-    proto   => 'all',
-    iniface => 'lo',
-    action  => 'accept',
-  }->
-  firewall { '002 accept related established rules':
-    proto  => 'all',
-    state  => ['RELATED', 'ESTABLISHED'],
-    action => 'accept',
-  }
-}
-
-class my_fw::post {
-  firewall { '999 drop all':
-    proto   => 'all',
-    action  => 'drop',
-    before  => undef,
-  }
-}
-
-if is_hash($firewall_values['rules']) and count($firewall_values['rules']) > 0 {
-  each( $firewall_values['rules'] ) |$key, $rule| {
-    if ! defined(Firewall["${rule['priority']} ${rule['proto']}/${rule['port']}"]) {
-      firewall { "${rule['priority']} ${rule['proto']}/${rule['port']}":
-        port   => $rule['port'],
-        proto  => $rule['proto'],
-        action => $rule['action'],
-      }
-    }
-  }
-}
-
-## Begin Apache manifest
-
-if $yaml_values == undef {
-  $yaml_values = loadyaml('/vagrant/puphpet/config.yaml')
-} if $apache_values == undef {
-  $apache_values = $yaml_values['apache']
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  include puphpet::params
-  include apache::params
-
-  $webroot_location = $puphpet::params::apache_webroot_location
-
-  exec { "exec mkdir -p ${webroot_location}":
-    command => "mkdir -p ${webroot_location}",
-    creates => $webroot_location,
-  }
-
-  if (downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-    and ! defined(File[$webroot_location])
-  {
-    file { $webroot_location:
-      ensure  => directory,
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if !(downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-    and ! defined(File[$webroot_location])
-  {
-    file { $webroot_location:
-      ensure  => directory,
-      group   => 'www-data',
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if hash_key_equals($hhvm_values, 'install', 1) {
-    $mpm_module           = 'worker'
-    $disallowed_modules   = ['php']
-    $apache_conf_template = 'puphpet/apache/hhvm-httpd.conf.erb'
-    $apache_php_package   = 'hhvm'
-  } elsif hash_key_equals($php_values, 'install', 1) {
-    $mpm_module           = 'prefork'
-    $disallowed_modules   = []
-    $apache_conf_template = $apache::params::conf_template
-    $apache_php_package   = 'php'
-  } else {
-    $mpm_module           = 'prefork'
-    $disallowed_modules   = []
-    $apache_conf_template = $apache::params::conf_template
-    $apache_php_package   = ''
-  }
-
-  if $::operatingsystem == 'ubuntu'
-  and hash_key_equals($php_values, 'install', 1)
-  and hash_key_equals($php_values, 'version', 55)
-  {
-    $apache_version = '2.4'
-  } else {
-    $apache_version = $apache::version::default
-  }
-
-  $apache_settings = merge($apache_values['settings'], {
-    'default_vhost'  => false,
-    'mpm_module'     => $mpm_module,
-    'conf_template'  => $apache_conf_template,
-    'sendfile'       => $apache_values['settings']['sendfile'] ? { 1 => 'On', default => 'Off' },
-    'apache_version' => $apache_version
-  })
-
-  create_resources('class', { 'apache' => $apache_settings })
-
-  if hash_key_equals($apache_values, 'mod_pagespeed', 1) {
-    class { 'puphpet::apache::modpagespeed': }
-  }
-
-  if hash_key_equals($apache_values, 'mod_spdy', 1) {
-    class { 'puphpet::apache::modspdy':
-      php_package => $apache_php_package
-    }
-  }
-
-  if $apache_values['settings']['default_vhost'] == true {
-    $apache_vhosts = merge($apache_values['vhosts'], {
-      'default_vhost_80'  => {
-        'servername'    => 'default',
-        'serveraliases' => ['*'],
-        'docroot'       => '/var/www/default',
-        'port'          => 80,
-      },
-      'default_vhost_443' => {
-        'servername'    => 'default',
-        'serveraliases' => ['*'],
-        'docroot'       => '/var/www/default',
-        'port'          => 443,
-      },
-    })
-  } else {
-    $apache_vhosts = $apache_values['vhosts']
-  }
-
-  if count($apache_vhosts) > 0 {
-    each( $apache_vhosts ) |$key, $vhost| {
-      exec { "exec mkdir -p ${vhost['docroot']} @ key ${key}":
-        command => "mkdir -p ${vhost['docroot']}",
-        creates => $vhost['docroot'],
-      }
-
-      if (downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-        and ! defined(File[$vhost['docroot']])
-      {
-        file { $vhost['docroot']:
-          ensure  => directory,
-          mode    => 0765,
-          require => Exec["exec mkdir -p ${vhost['docroot']} @ key ${key}"]
-        }
-      }
-
-      if !(downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-        and ! defined(File[$vhost['docroot']])
-      {
-        file { $vhost['docroot']:
-          ensure  => directory,
-          group   => 'www-user',
-          mode    => 0765,
-          require => [
-            Exec["exec mkdir -p ${vhost['docroot']} @ key ${key}"],
-            Group['www-user']
-          ]
-        }
-      }
-
-      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'] }
-        })
-      })
-
-      if ! defined(Firewall["100 tcp/${vhost['port']}"]) {
-        firewall { "100 tcp/${vhost['port']}":
-          port   => $vhost['port'],
-          proto  => tcp,
-          action => 'accept',
-        }
-      }
-    }
-  }
-
-  if ! defined(Firewall['100 tcp/443']) {
-    firewall { '100 tcp/443':
-      port   => 443,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-
-  if count($apache_values['modules']) > 0 {
-    apache_mod { $apache_values['modules']: }
-  }
-}
-
-define apache_mod {
-  if ! defined(Class["apache::mod::${name}"]) and !($name in $disallowed_modules) {
-    class { "apache::mod::${name}": }
-  }
-}
-
-## Begin Nginx manifest
-
-if $nginx_values == undef {
-   $nginx_values = hiera('nginx', false)
-} if $php_values == undef {
-   $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($nginx_values, 'install', 1) {
-  include nginx::params
-  include puphpet::params
-
-  Class['puphpet::ssl_cert'] -> Nginx::Resource::Vhost <| |>
-
-  class { 'puphpet::ssl_cert': }
-
-  if $lsbdistcodename == 'lucid' and hash_key_equals($php_values, 'version', '53') {
-    apt::key { '67E15F46': key_server => 'hkp://keyserver.ubuntu.com:80' }
-    apt::ppa { 'ppa:l-mierzwa/lucid-php5':
-      options => '',
-      require => Apt::Key['67E15F46']
-    }
-  }
-
-  $webroot_location = $puphpet::params::nginx_webroot_location
-
-  exec { "exec mkdir -p ${webroot_location}":
-    command => "mkdir -p ${webroot_location}",
-    creates => $webroot_location,
-  }
-
-  if (downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-    and ! defined(File[$webroot_location])
-  {
-    file { $webroot_location:
-      ensure  => directory,
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if !(downcase($::provisioner_type) in ['virtualbox', 'vmware_fusion'])
-    and ! defined(File[$webroot_location])
-  {
-    file { $webroot_location:
-      ensure  => directory,
-      group   => 'www-data',
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if $::osfamily == 'redhat' {
-      file { '/usr/share/nginx':
-        ensure  => directory,
-        mode    => 0775,
-        owner   => 'www-data',
-        group   => 'www-data',
-        require => Group['www-data'],
-        before  => Package['nginx']
-      }
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-
-    if $php_values['version'] == undef {
-      $fastcgi_pass = null
-    } elsif $php_values['version'] == '53' {
-      $fastcgi_pass = '127.0.0.1:9000'
-    } else {
-      $fastcgi_pass = "unix:${php5_fpm_sock}"
-    }
-
-    if $::osfamily == 'redhat' and $fastcgi_pass == "unix:${php5_fpm_sock}" {
-      exec { "create ${php5_fpm_sock} file":
-        command => "touch ${php5_fpm_sock}",
-        onlyif  => ["test ! -f ${php5_fpm_sock}", "test ! -f ${php5_fpm_sock}="],
-        require => Package['nginx'],
-      }
-
-      exec { "listen = 127.0.0.1:9000 => listen = ${php5_fpm_sock}":
-        command => "perl -p -i -e 's#listen = 127.0.0.1:9000#listen = ${php5_fpm_sock}#gi' /etc/php-fpm.d/www.conf",
-        unless  => "grep -c 'listen = 127.0.0.1:9000' '${php5_fpm_sock}'",
-        notify  => [
-          Class['nginx::service'],
-          Service['php-fpm']
-        ],
-        require => Exec["create ${php5_fpm_sock} file"]
-      }
-
-      set_php5_fpm_sock_group_and_user { 'php_rhel':
-        require => Exec["create ${php5_fpm_sock} file"],
-      }
-    } else {
-      set_php5_fpm_sock_group_and_user { 'php':
-        require   => Package['nginx'],
-        subscribe => Service['php5-fpm'],
-      }
-    }
-  } 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        = ''
-  }
-
-  class { 'nginx': }
-
-  if count($nginx_values['vhosts']) > 0 {
-    each( $nginx_values['vhosts'] ) |$key, $vhost| {
-      exec { "exec mkdir -p ${vhost['www_root']} @ key ${key}":
-        command => "mkdir -p ${vhost['www_root']}",
-        creates => $vhost['www_root'],
-      }
-
-      if ! defined(File[$vhost['www_root']]) {
-        file { $vhost['www_root']:
-          ensure  => directory,
-          require => Exec["exec mkdir -p ${vhost['www_root']} @ key ${key}"]
-        }
-      }
-
-      if ! defined(Firewall["100 tcp/${vhost['listen_port']}"]) {
-        firewall { "100 tcp/${vhost['listen_port']}":
-          port   => $vhost['listen_port'],
-          proto  => tcp,
-          action => 'accept',
-        }
-      }
-    }
-
-    create_resources(nginx_vhost, $nginx_values['vhosts'])
-  }
-
-  if ! defined(Firewall['100 tcp/443']) {
-    firewall { '100 tcp/443':
-      port   => 443,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-
-define nginx_vhost (
-  $server_name,
-  $server_aliases = [],
-  $www_root,
-  $listen_port,
-  $index_files,
-  $envvars = [],
-  $ssl = false,
-  $ssl_cert = $puphpet::params::ssl_cert_location,
-  $ssl_key = $puphpet::params::ssl_key_location,
-  $ssl_port = '443',
-  $rewrite_to_https = false,
-  $spdy = $nginx::params::nx_spdy,
-){
-  $merged_server_name = concat([$server_name], $server_aliases)
-
-  if is_array($index_files) and count($index_files) > 0 {
-    $try_files = $index_files[count($index_files) - 1]
-  } else {
-    $try_files = 'index.php'
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $fastcgi_param_parts = [
-      'PATH_INFO $fastcgi_path_info',
-      'PATH_TRANSLATED $document_root$fastcgi_path_info',
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $fastcgi_param_parts = [
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
-  } else {
-    $fastcgi_param_parts = []
-  }
-
-  if $ssl == 0 or $ssl == false or $ssl == '' {
-    $ssl_set = false
-  } else {
-    $ssl_set = true
-  }
-
-  if $ssl_cert == 0 or $ssl_cert == false or $ssl_cert == '' {
-    $ssl_cert_set = $puphpet::params::ssl_cert_location
-  } else {
-    $ssl_cert_set = $ssl_cert
-  }
-
-  if $ssl_key == 0 or $ssl_key == false or $ssl_key == '' {
-    $ssl_key_set = $puphpet::params::ssl_key_location
-  } else {
-    $ssl_key_set = $ssl_key
-  }
-
-  if $ssl_port == 0 or $ssl_port == false or $ssl_port == '' {
-    $ssl_port_set = '443'
-  } else {
-    $ssl_port_set = $ssl_port
-  }
-
-  if $rewrite_to_https == 0 or $rewrite_to_https == false or $rewrite_to_https == '' {
-    $rewrite_to_https_set = false
-  } else {
-    $rewrite_to_https_set = true
-  }
-
-  if $spdy == off or $spdy == 0 or $spdy == false or $spdy == '' {
-    $spdy_set = off
-  } else {
-    $spdy_set = on
-  }
-
-  nginx::resource::vhost { $server_name:
-    server_name      => $merged_server_name,
-    www_root         => $www_root,
-    listen_port      => $listen_port,
-    index_files      => $index_files,
-    try_files        => ['$uri', '$uri/', "/${try_files}?\$args"],
-    ssl              => $ssl_set,
-    ssl_cert         => $ssl_cert_set,
-    ssl_key          => $ssl_key_set,
-    ssl_port         => $ssl_port_set,
-    rewrite_to_https => $rewrite_to_https_set,
-    spdy             => $spdy_set,
-    vhost_cfg_append => {
-       sendfile => 'off'
-    }
-  }
-
-  $fastcgi_param = concat($fastcgi_param_parts, $envvars)
-
-  nginx::resource::location { "${server_name}-php":
-    ensure              => present,
-    vhost               => $server_name,
-    location            => '~ \.php$',
-    proxy               => undef,
-    try_files           => ['$uri', '$uri/', "/${try_files}?\$args"],
-    ssl                 => $ssl_set,
-    www_root            => $www_root,
-    location_cfg_append => {
-      'fastcgi_split_path_info' => '^(.+\.php)(/.+)$',
-      'fastcgi_param'           => $fastcgi_param,
-      'fastcgi_pass'            => $fastcgi_pass,
-      'fastcgi_index'           => 'index.php',
-      'include'                 => 'fastcgi_params'
-    },
-    notify              => Class['nginx::service'],
-  }
-}
-
-define set_php5_fpm_sock_group_and_user (){
-  exec { 'set php5_fpm_sock group and user':
-    command => "chmod 660 ${php5_fpm_sock} && chown www-data ${php5_fpm_sock} && chgrp www-data ${php5_fpm_sock} && touch /.puphpet-stuff/php5_fpm_sock",
-    creates => '/.puphpet-stuff/php5_fpm_sock',
-  }
-}
-
-## Begin PHP manifest
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-} if $mailcatcher_values == undef {
-  $mailcatcher_values = hiera('mailcatcher', false)
-}
-
-if hash_key_equals($php_values, 'install', 1) {
-  Class['Php'] -> Class['Php::Devel'] -> Php::Module <| |> -> Php::Pear::Module <| |> -> Php::Pecl::Module <| |>
-
-  if $php_prefix == undef {
-    $php_prefix = $::operatingsystem ? {
-      /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'php5-',
-      default                                 => 'php-',
-    }
-  }
-
-  if $php_fpm_ini == undef {
-    $php_fpm_ini = $::operatingsystem ? {
-      /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => '/etc/php5/fpm/php.ini',
-      default                                 => '/etc/php.ini',
-    }
-  }
-
-  if hash_key_equals($apache_values, 'install', 1) {
-    include apache::params
-
-    if has_key($apache_values, 'mod_spdy') and $apache_values['mod_spdy'] == 1 {
-      $php_webserver_service_ini = 'cgi'
-    } else {
-      $php_webserver_service_ini = 'httpd'
-    }
-
-    $php_webserver_service = 'httpd'
-    $php_webserver_user    = $apache::params::user
-    $php_webserver_restart = true
-
-    class { 'php':
-      service => $php_webserver_service
-    }
-  } elsif hash_key_equals($nginx_values, 'install', 1) {
-    include nginx::params
-
-    $php_webserver_service     = "${php_prefix}fpm"
-    $php_webserver_service_ini = $php_webserver_service
-    $php_webserver_user        = $nginx::params::nx_daemon_user
-    $php_webserver_restart     = true
-
-    class { 'php':
-      package             => $php_webserver_service,
-      service             => $php_webserver_service,
-      service_autorestart => false,
-      config_file         => $php_fpm_ini,
-    }
-
-    service { $php_webserver_service:
-      ensure     => running,
-      enable     => true,
-      hasrestart => true,
-      hasstatus  => true,
-      require    => Package[$php_webserver_service]
-    }
-  } else {
-    $php_webserver_service     = undef
-    $php_webserver_service_ini = undef
-    $php_webserver_restart     = false
-
-    class { 'php':
-      package             => "${php_prefix}cli",
-      service             => $php_webserver_service,
-      service_autorestart => false,
-    }
-  }
-
-  class { 'php::devel': }
-
-  if count($php_values['modules']['php']) > 0 {
-    php_mod { $php_values['modules']['php']:; }
-  }
-  if count($php_values['modules']['pear']) > 0 {
-    php_pear_mod { $php_values['modules']['pear']:; }
-  }
-  if count($php_values['modules']['pecl']) > 0 {
-    php_pecl_mod { $php_values['modules']['pecl']:; }
-  }
-  if count($php_values['ini']) > 0 {
-    each( $php_values['ini'] ) |$key, $value| {
-      if is_array($value) {
-        each( $php_values['ini'][$key] ) |$innerkey, $innervalue| {
-          puphpet::ini { "${key}_${innerkey}":
-            entry       => "CUSTOM_${innerkey}/${key}",
-            value       => $innervalue,
-            php_version => $php_values['version'],
-            webserver   => $php_webserver_service_ini
-          }
-        }
-      } else {
-        puphpet::ini { $key:
-          entry       => "CUSTOM/${key}",
-          value       => $value,
-          php_version => $php_values['version'],
-          webserver   => $php_webserver_service_ini
-        }
-      }
-    }
-
-    if $php_values['ini']['session.save_path'] != undef {
-      $php_sess_save_path = $php_values['ini']['session.save_path']
-
-      exec {"mkdir -p ${php_sess_save_path}":
-        onlyif => "test ! -d ${php_sess_save_path}",
-        before => Class['php']
-      }
-      exec {"chmod 775 ${php_sess_save_path} && chown www-data ${php_sess_save_path} && chgrp www-data ${php_sess_save_path}":
-        require => Class['php']
-      }
-    }
-  }
-
-  puphpet::ini { $key:
-    entry       => 'CUSTOM/date.timezone',
-    value       => $php_values['timezone'],
-    php_version => $php_values['version'],
-    webserver   => $php_webserver_service_ini
-  }
-
-  if hash_key_equals($php_values, 'composer', 1) {
-    $php_composer_home = $php_values['composer_home'] ? {
-      false   => false,
-      undef   => false,
-      ''      => false,
-      default => $php_values['composer_home'],
-    }
-
-    if $php_composer_home {
-      file { $php_composer_home:
-        ensure  => directory,
-        owner   => 'www-data',
-        group   => 'www-data',
-        mode    => 0775,
-        require => [Group['www-data'], Group['www-user']]
-      }
-
-      file_line { "COMPOSER_HOME=${php_composer_home}":
-        path => '/etc/environment',
-        line => "COMPOSER_HOME=${php_composer_home}",
-      }
-    }
-
-    class { 'composer':
-      target_dir      => '/usr/local/bin',
-      composer_file   => 'composer',
-      download_method => 'curl',
-      logoutput       => false,
-      tmp_path        => '/tmp',
-      php_package     => "${php::params::module_prefix}cli",
-      curl_package    => 'curl',
-      suhosin_enabled => false,
-    }
-  }
-
-  # Usually this would go within the library that needs in (Mailcatcher)
-  # but the values required are sufficiently complex that it's easier to
-  # add here
-  if hash_key_equals($mailcatcher_values, 'install', 1)
-    and ! defined(Puphpet::Ini['sendmail_path'])
-  {
-    puphpet::ini { 'sendmail_path':
-      entry       => 'CUSTOM/sendmail_path',
-      value       => '/usr/bin/env catchmail',
-      php_version => $php_values['version'],
-      webserver   => $php_webserver_service_ini
-    }
-  }
-}
-
-define php_mod {
-  if ! defined(Puphpet::Php::Module[$name]) {
-    puphpet::php::module { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-define php_pear_mod {
-  if ! defined(Puphpet::Php::Pear[$name]) {
-    puphpet::php::pear { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-define php_pecl_mod {
-  if ! defined(Puphpet::Php::Extra_repos[$name]) {
-    puphpet::php::extra_repos { $name:
-      before => Puphpet::Php::Pecl[$name],
-    }
-  }
-
-  if ! defined(Puphpet::Php::Pecl[$name]) {
-    puphpet::php::pecl { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-
-## Begin Xdebug manifest
-
-if $xdebug_values == undef {
-  $xdebug_values = hiera('xdebug', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  $xdebug_webserver_service = 'httpd'
-} elsif hash_key_equals($nginx_values, 'install', 1) {
-  $xdebug_webserver_service = 'nginx'
-} else {
-  $xdebug_webserver_service = undef
-}
-
-if hash_key_equals($xdebug_values, 'install', 1)
-  and hash_key_equals($php_values, 'install', 1)
-{
-  class { 'puphpet::xdebug':
-    webserver => $xdebug_webserver_service
-  }
-
-  if is_hash($xdebug_values['settings']) and count($xdebug_values['settings']) > 0 {
-    each( $xdebug_values['settings'] ) |$key, $value| {
-      puphpet::ini { $key:
-        entry       => "XDEBUG/${key}",
-        value       => $value,
-        php_version => $php_values['version'],
-        webserver   => $xdebug_webserver_service
-      }
-    }
-  }
-}
-
-## Begin Xhprof manifest
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $xhprof_values == undef {
-  $xhprof_values = hiera('xhprof', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($xhprof_values, 'install', 1)
-  and hash_key_equals($php_values, 'install', 1)
-{
-  if $::operatingsystem == 'ubuntu' and $lsbdistcodename in ['lucid', 'maverick', 'natty', 'oneiric', 'precise'] {
-    apt::key { '8D0DC64F':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-
-    apt::ppa { 'ppa:brianmercer/php5-xhprof': require => Apt::Key['8D0DC64F'] }
-  }
-
-  if hash_key_equals($apache_values, 'install', 1) {
-    $xhprof_webroot_location = $puphpet::params::apache_webroot_location
-    $xhprof_webserver_service = 'httpd'
-  } elsif hash_key_equals($nginx_values, 'install', 1) {
-    $xhprof_webroot_location = $puphpet::params::nginx_webroot_location
-    $xhprof_webserver_service = 'nginx'
-  } else {
-    $xhprof_webroot_location = $xhprof_values['location']
-    $xhprof_webserver_service = undef
-  }
-
-  if ! defined(Package['graphviz']) {
-    package { 'graphviz':
-      ensure  => present,
-    }
-  }
-
-  class { 'puphpet::xhprof':
-    php_version       => $php_values['version'],
-    webroot_location  => $xhprof_webroot_location,
-    webserver_service => $xhprof_webserver_service
-  }
-}
-
-## Begin Drush manifest
-
-if $drush_values == undef {
-  $drush_values = hiera('drush', false)
-}
-
-if hash_key_equals($drush_values, 'install', 1) {
-  if ($drush_values['settings']['drush.tag_branch'] != undef) {
-    $drush_tag_branch = $drush_values['settings']['drush.tag_branch']
-  } else {
-    $drush_tag_branch = ''
-  }
-
-  include drush::git::drush
-}
-
-## Begin MySQL manifest
-
-if $mysql_values == undef {
-  $mysql_values = hiera('mysql', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-include 'mysql::params'
-
-if hash_key_equals($mysql_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $mysql_webserver_restart = true
-  } else {
-    $mysql_webserver_restart = false
-  }
-
-  if $::osfamily == 'redhat' {
-    exec { 'mysql-community-repo':
-      command => 'yum -y --nogpgcheck install "http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm" && touch /.puphpet-stuff/mysql-community-release',
-      creates => '/.puphpet-stuff/mysql-community-release'
-    }
-
-    $mysql_server_require             = Exec['mysql-community-repo']
-    $mysql_server_server_package_name = 'mysql-community-server'
-    $mysql_server_client_package_name = 'mysql-community-client'
-  } else {
-    $mysql_server_require             = []
-    $mysql_server_server_package_name = $mysql::params::server_package_name
-    $mysql_server_client_package_name = $mysql::params::client_package_name
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $mysql_php_installed = true
-    $mysql_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $mysql_php_installed = true
-    $mysql_php_package   = 'hhvm'
-  } else {
-    $mysql_php_installed = false
-  }
-
-  if $mysql_values['root_password'] {
-    class { 'mysql::server':
-      package_name  => $mysql_server_server_package_name,
-      root_password => $mysql_values['root_password'],
-      require       => $mysql_server_require
-    }
-
-    class { 'mysql::client':
-      package_name => $mysql_server_client_package_name,
-      require      => $mysql_server_require
-    }
-
-    if is_hash($mysql_values['databases']) and count($mysql_values['databases']) > 0 {
-      create_resources(mysql_db, $mysql_values['databases'])
-    }
-
-    if $mysql_php_installed and $mysql_php_package == 'php' {
-      if $::osfamily == 'redhat' and $php_values['version'] == '53' {
-        $mysql_php_module = 'mysql'
-      } elsif $lsbdistcodename == 'lucid' or $lsbdistcodename == 'squeeze' {
-        $mysql_php_module = 'mysql'
-      } else {
-        $mysql_php_module = 'mysqlnd'
-      }
-
-      if ! defined(Php::Module[$mysql_php_module]) {
-        php::module { $mysql_php_module:
-          service_autorestart => $mysql_webserver_restart,
-        }
-      }
-    }
-  }
-
-  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
-    } 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
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${mysql_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $mysql_php_package
-    }
-  }
-}
-
-define mysql_db (
-  $user,
-  $password,
-  $host,
-  $grant    = [],
-  $sql_file = false
-) {
-  if $name == '' or $password == '' or $host == '' {
-    fail( 'MySQL DB requires that name, password and host be set. Please check your settings!' )
-  }
-
-  mysql::db { $name:
-    user     => $user,
-    password => $password,
-    host     => $host,
-    grant    => $grant,
-    sql      => $sql_file,
-  }
-}
-
-# @todo update this
-define mysql_nginx_default_conf (
-  $webroot
-) {
-  if $php5_fpm_sock == undef {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-  }
-
-  if $fastcgi_pass == undef {
-    $fastcgi_pass = $php_values['version'] ? {
-      undef   => null,
-      '53'    => '127.0.0.1:9000',
-      default => "unix:${php5_fpm_sock}"
-    }
-  }
-
-  class { 'puphpet::nginx':
-    fastcgi_pass => $fastcgi_pass,
-    notify       => Class['nginx::service'],
-  }
-}
-
-## Begin PostgreSQL manifest
-
-if $postgresql_values == undef {
-  $postgresql_values = hiera('postgresql', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($postgresql_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $postgresql_webserver_restart = true
-  } else {
-    $postgresql_webserver_restart = false
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $postgresql_php_installed = true
-    $postgresql_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $postgresql_php_installed = true
-    $postgresql_php_package   = 'hhvm'
-  } else {
-    $postgresql_php_installed = false
-  }
-
-  if $postgresql_values['settings']['root_password'] {
-    group { $postgresql_values['settings']['user_group']:
-      ensure => present
-    }
-
-    class { 'postgresql::globals':
-      manage_package_repo => true,
-      encoding            => $postgresql_values['settings']['encoding'],
-      version             => $postgresql_values['settings']['version']
-    }->
-    class { 'postgresql::server':
-      postgres_password => $postgresql_values['settings']['root_password'],
-      version           => $postgresql_values['settings']['version'],
-      require           => Group[$postgresql_values['settings']['user_group']]
-    }
-
-    if is_hash($postgresql_values['databases']) and count($postgresql_values['databases']) > 0 {
-      create_resources(postgresql_db, $postgresql_values['databases'])
-    }
-
-    if $postgresql_php_installed and $postgresql_php_package == 'php' and ! defined(Php::Module['pgsql']) {
-      php::module { 'pgsql':
-        service_autorestart => $postgresql_webserver_restart,
-      }
-    }
-  }
-
-  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
-    } 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
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${postgresql_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $postgresql_php_package
-    }
-  }
-}
-
-define postgresql_db (
-  $user,
-  $password,
-  $grant,
-  $sql_file = false
-) {
-  if $name == '' or $user == '' or $password == '' or $grant == '' {
-    fail( 'PostgreSQL DB requires that name, user, password and grant be set. Please check your settings!' )
-  }
-
-  postgresql::server::db { $name:
-    user     => $user,
-    password => $password,
-    grant    => $grant
-  }
-
-  if $sql_file {
-    $table = "${name}.*"
-
-    exec{ "${name}-import":
-      command     => "psql ${name} < ${sql_file}",
-      logoutput   => true,
-      refreshonly => $refresh,
-      require     => Postgresql::Server::Db[$name],
-      onlyif      => "test -f ${sql_file}"
-    }
-  }
-}
-
-## Begin MariaDb manifest
-
-if $mariadb_values == undef {
-  $mariadb_values = hiera('mariadb', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($mariadb_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $mariadb_webserver_restart = true
-  } else {
-    $mariadb_webserver_restart = false
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $mariadb_php_installed = true
-    $mariadb_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $mariadb_php_installed = true
-    $mariadb_php_package   = 'hhvm'
-  } else {
-    $mariadb_php_installed = false
-  }
-
-  if has_key($mariadb_values, 'root_password') and $mariadb_values['root_password'] {
-    include 'mysql::params'
-
-    if (! defined(File[$mysql::params::datadir])) {
-      file { $mysql::params::datadir :
-        ensure => directory,
-        group  => $mysql::params::root_group,
-        before => Class['mysql::server']
-      }
-    }
-
-    if ! defined(Group['mysql']) {
-      group { 'mysql':
-        ensure => present
-      }
-    }
-
-    if ! defined(User['mysql']) {
-      user { 'mysql':
-        ensure => present,
-      }
-    }
-
-    if (! defined(File['/var/run/mysqld'])) {
-      file { '/var/run/mysqld' :
-        ensure  => directory,
-        group   => 'mysql',
-        owner   => 'mysql',
-        before  => Class['mysql::server'],
-        require => [User['mysql'], Group['mysql']],
-        notify  => Service['mysql'],
-      }
-    }
-
-    if ! defined(File[$mysql::params::socket]) {
-      file { $mysql::params::socket :
-        ensure  => file,
-        group   => $mysql::params::root_group,
-        before  => Class['mysql::server'],
-        require => File[$mysql::params::datadir]
-      }
-    }
-
-    if ! defined(Package['mysql-libs']) {
-      package { 'mysql-libs':
-        ensure => purged,
-        before => Class['mysql::server'],
-      }
-    }
-
-    class { 'puphpet::mariadb':
-      version => $mariadb_values['version']
-    }
-
-    class { 'mysql::server':
-      package_name  => $puphpet::params::mariadb_package_server_name,
-      root_password => $mariadb_values['root_password'],
-      service_name  => 'mysql',
-    }
-
-    class { 'mysql::client':
-      package_name => $puphpet::params::mariadb_package_client_name
-    }
-
-    if is_hash($mariadb_values['databases']) and count($mariadb_values['databases']) > 0 {
-      create_resources(mariadb_db, $mariadb_values['databases'])
-    }
-
-    if $mariadb_php_installed and $mariadb_php_package == 'php' {
-      if $::osfamily == 'redhat' and $php_values['version'] == '53' {
-        $mariadb_php_module = 'mysql'
-      } elsif $lsbdistcodename == 'lucid' or $lsbdistcodename == 'squeeze' {
-        $mariadb_php_module = 'mysql'
-      } else {
-        $mariadb_php_module = 'mysqlnd'
-      }
-
-      if ! defined(Php::Module[$mariadb_php_module]) {
-        php::module { $mariadb_php_module:
-          service_autorestart => $mariadb_webserver_restart,
-        }
-      }
-    }
-  }
-
-  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
-    } 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
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${mariadb_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $mariadb_php_package
-    }
-  }
-}
-
-define mariadb_db (
-  $user,
-  $password,
-  $host,
-  $grant    = [],
-  $sql_file = false
-) {
-  if $name == '' or $password == '' or $host == '' {
-    fail( 'MariaDB requires that name, password and host be set. Please check your settings!' )
-  }
-
-  mysql::db { $name:
-    user     => $user,
-    password => $password,
-    host     => $host,
-    grant    => $grant,
-    sql      => $sql_file,
-  }
-}
-
-# @todo update this!
-define mariadb_nginx_default_conf (
-  $webroot
-) {
-  if $php5_fpm_sock == undef {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-  }
-
-  if $fastcgi_pass == undef {
-    $fastcgi_pass = $php_values['version'] ? {
-      undef   => null,
-      '53'    => '127.0.0.1:9000',
-      default => "unix:${php5_fpm_sock}"
-    }
-  }
-
-  class { 'puphpet::nginx':
-    fastcgi_pass => $fastcgi_pass,
-    notify       => Class['nginx::service'],
-  }
-}
-
-## Begin MongoDb manifest
-
-if $mongodb_values == undef {
-  $mongodb_values = hiera('mongodb', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $mongodb_webserver_restart = true
-} else {
-  $mongodb_webserver_restart = false
-}
-
-if hash_key_equals($mongodb_values, 'install', 1) {
-  file { ['/data', '/data/db']:
-    ensure  => directory,
-    mode    => 0775,
-    before  => Class['Mongodb::Globals'],
-  }
-
-  Class['Mongodb::Globals'] -> Class['Mongodb::Server']
-
-  class { 'mongodb::globals':
-    manage_package_repo => true,
-  }
-
-  create_resources('class', { 'mongodb::server' => $mongodb_values['settings'] })
-
-  if $::osfamily == 'redhat' {
-    class { '::mongodb::client':
-      require => Class['::Mongodb::Server']
-    }
-  }
-
-  if is_hash($mongodb_values['databases']) and count($mongodb_values['databases']) > 0 {
-    create_resources(mongodb_db, $mongodb_values['databases'])
-  }
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Puphpet::Php::Pecl['mongo']) {
-    puphpet::php::pecl { 'mongo':
-      service_autorestart => $mongodb_webserver_restart,
-      require             => Class['mongodb::server']
-    }
-  }
-}
-
-define mongodb_db (
-  $user,
-  $password
-) {
-  if $name == '' or $password == '' {
-    fail( 'MongoDB requires that name and password be set. Please check your settings!' )
-  }
-
-  mongodb::db { $name:
-    user     => $user,
-    password => $password
-  }
-}
-
-# Begin redis
-
-if $redis_values == undef {
-  $redis_values = hiera('redis', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $redis_webserver_restart = true
-} else {
-  $redis_webserver_restart = false
-}
-
-if hash_key_equals($redis_values, 'install', 1) {
-  create_resources('class', { 'redis' => $redis_values['settings'] })
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Php::Pecl::Module['redis']) {
-    php::pecl::module { 'redis':
-      use_package         => false,
-      service_autorestart => $redis_webserver_restart,
-      require             => Class['redis']
-    }
-  }
-}
-
-# Begin beanstalkd
-
-if $beanstalkd_values == undef {
-  $beanstalkd_values = hiera('beanstalkd', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  $beanstalk_console_webroot_location = "${puphpet::params::apache_webroot_location}/beanstalk_console"
-} elsif hash_key_equals($nginx_values, 'install', 1) {
-  $beanstalk_console_webroot_location = "${puphpet::params::nginx_webroot_location}/beanstalk_console"
-} else {
-  $beanstalk_console_webroot_location = undef
-}
-
-if hash_key_equals($php_values, 'install', 1) or hash_key_equals($hhvm_values, 'install', 1) {
-  $beanstalkd_php_installed = true
-} else {
-  $beanstalkd_php_installed = false
-}
-
-if hash_key_equals($beanstalkd_values, 'install', 1) {
-  create_resources(beanstalkd::config, { 'beanstalkd' => $beanstalkd_values['settings'] })
-
-  if hash_key_equals($beanstalkd_values, 'beanstalk_console', 1)
-    and $beanstalk_console_webroot_location != undef
-    and $beanstalkd_php_installed
-  {
-    exec { 'delete-beanstalk_console-path-if-not-git-repo':
-      command => "rm -rf ${beanstalk_console_webroot_location}",
-      onlyif  => "test ! -d ${beanstalk_console_webroot_location}/.git"
-    }
-
-    vcsrepo { $beanstalk_console_webroot_location:
-      ensure   => present,
-      provider => git,
-      source   => 'https://github.com/ptrofimov/beanstalk_console.git',
-      require  => Exec['delete-beanstalk_console-path-if-not-git-repo']
-    }
-
-    file { "${beanstalk_console_webroot_location}/storage.json":
-      ensure  => present,
-      group   => 'www-data',
-      mode    => 0775,
-      require => Vcsrepo[$beanstalk_console_webroot_location]
-    }
-  }
-}
-
-# Begin rabbitmq
-
-if $rabbitmq_values == undef {
-  $rabbitmq_values = hiera('rabbitmq', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $rabbitmq_webserver_restart = true
-} else {
-  $rabbitmq_webserver_restart = false
-}
-
-if hash_key_equals($rabbitmq_values, 'install', 1) {
-  create_resources('class', { 'rabbitmq' => $rabbitmq_values['settings'] })
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Php::Pecl::Module['amqp']) {
-    php::pecl::module { 'amqp':
-      use_package         => false,
-      service_autorestart => $rabbitmq_webserver_restart,
-      require             => Class['rabbitmq']
-    }
-  }
-
-  if ! defined(Firewall['100 tcp/15672']) {
-    firewall { '100 tcp/15672':
-      port   => 15672,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-

+ 0 - 6
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.fixtures.yml

@@ -1,6 +0,0 @@
-fixtures:
-  repositories:
-    stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
-    concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
-  symlinks:
-    apache: "#{source_dir}"

+ 0 - 31
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.nodeset.yml

@@ -1,31 +0,0 @@
----
-default_set: 'centos-64-x64'
-sets:
-  'centos-59-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'centos-59-x64'
-  'centos-64-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'centos-64-x64'
-  'fedora-18-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'fedora-18-x64'
-  'debian-607-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'debian-607-x64'
-  'debian-70rc1-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'debian-70rc1-x64'
-  'ubuntu-server-10044-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'ubuntu-server-10044-x64'
-  'ubuntu-server-12042-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'ubuntu-server-12042-x64'

+ 0 - 5
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.puppet-lint.rc

@@ -1,5 +0,0 @@
---no-single_quote_string_with_variables-check
---no-80chars-check
---no-class_inherits_from_params_class-check
---no-class_parameter_defaults-check
---no-documentation-check

+ 0 - 32
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/.travis.yml

@@ -1,32 +0,0 @@
----
-branches:
-  only:
-  - master
-language: ruby
-bundler_args: --without development
-script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
-rvm:
-  - 1.8.7
-  - 1.9.3
-  - 2.0.0
-env:
-  matrix:
-    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - PUPPET_GEM_VERSION="~> 3.0"
-    - PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-matrix:
-  fast_finish: true
-  exclude:
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - rvm: 2.0.0
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - rvm: 2.0.0
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - rvm: 1.8.7
-      env: PUPPET_GEM_VERSION="~> 3.2.0"
-notifications:
-  email: false

+ 0 - 246
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CHANGELOG.md

@@ -1,246 +0,0 @@
-## 2014-03-04 Supported Release 1.0.1
-###Summary
-
-This is a supported release.  This release removes a testing symlink that can
-cause trouble on systems where /var is on a seperate filesystem from the
-modulepath.
-
-####Features
-####Bugfixes
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
- 
-## 2014-03-04 Supported Release 1.0.0
-###Summary
-
-This is a supported release. This release introduces Apache 2.4 support for
-Debian and RHEL based osfamilies.
-
-####Features
-
-- Add apache24 support
-- Add rewrite_base functionality to rewrites
-- Updated README documentation
-- Add WSGIApplicationGroup and WSGIImportScript directives
-
-####Bugfixes
-
-- Replace mutating hashes with merge() for Puppet 3.5
-- Fix WSGI import_script and mod_ssl issues on Lucid
-
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
-
----
-
-## 2014-01-31 Release 0.11.0
-### Summary:
-
-This release adds preliminary support for Windows compatibility and multiple rewrite support.
-
-#### Backwards-incompatible Changes:
-
-- The rewrite_rule parameter is deprecated in favor of the new rewrite parameter
-  and will be removed in a future release.
-
-#### Features:
-
-- add Match directive
-- quote paths for windows compatibility
-- add auth_group_file option to README.md
-- allow AuthGroupFile directive for vhosts
-- Support Header directives in vhost context
-- Don't purge mods-available dir when separate enable dir is used
-- Fix the servername used in log file name
-- Added support for mod_include
-- Remove index parameters.
-- Support environment variable control for CustomLog
-- added redirectmatch support
-- Setting up the ability to do multiple rewrites and conditions.
-- Convert spec tests to beaker.
-- Support php_admin_(flag|value)s
-
-#### Bugfixes:
-
-- directories are either a Hash or an Array of Hashes
-- Configure Passenger in separate .conf file on RH so PassengerRoot isn't lost
-- (docs) Update list of `apache::mod::[name]` classes
-- (docs) Fix apache::namevirtualhost example call style
-- Fix $ports_file reference in apache::listen.
-- Fix $ports_file reference in Namevirtualhost.
-
-
-## 2013-12-05 Release 0.10.0
-### Summary:
-
-This release adds FreeBSD osfamily support and various other improvements to some mods.
-
-#### Features:
-
-- Add suPHP_UserGroup directive to directory context
-- Add support for ScriptAliasMatch directives
-- Set SSLOptions StdEnvVars in server context
-- No implicit <Directory> entry for ScriptAlias path
-- Add support for overriding ErrorDocument
-- Add support for AliasMatch directives
-- Disable default "allow from all" in vhost-directories
-- Add WSGIPythonPath as an optional parameter to mod_wsgi. 
-- Add mod_rpaf support
-- Add directives: IndexOptions, IndexOrderDefault
-- Add ability to include additional external configurations in vhost
-- need to use the provider variable not the provider key value from the directory hash for matches
-- Support for FreeBSD and few other features
-- Add new params to apache::mod::mime class
-- Allow apache::mod to specify module id and path
-- added $server_root parameter
-- Add Allow and ExtendedStatus support to mod_status
-- Expand vhost/_directories.pp directive support
-- Add initial support for nss module (no directives in vhost template yet)
-- added peruser and event mpms
-- added $service_name parameter
-- add parameter for TraceEnable
-- Make LogLevel configurable for server and vhost
-- Add documentation about $ip
-- Add ability to pass ip (instead of wildcard) in default vhost files
-
-#### Bugfixes:
-
-- Don't listen on port or set NameVirtualHost for non-existent vhost
-- only apply Directory defaults when provider is a directory
-- Working mod_authnz_ldap support on Debian/Ubuntu
-
-## 2013-09-06 Release 0.9.0
-### Summary:
-This release adds more parameters to the base apache class and apache defined
-resource to make the module more flexible. It also adds or enhances SuPHP,
-WSGI, and Passenger mod support, and support for the ITK mpm module.
-
-#### Backwards-incompatible Changes:
-- Remove many default mods that are not normally needed.
-- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
-- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
-making explicit)
-- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
-defined resource.
-
-#### Features:
-- `apache` class
-  - Add `httpd_dir` parameter to change the location of the configuration
-  files.
-  - Add `logroot` parameter to change the logroot
-  - Add `ports_file` parameter to changes the `ports.conf` file location
-  - Add `keepalive` parameter to enable persistent connections
-  - Add `keepalive_timeout` parameter to change the timeout
-  - Update `default_mods` to be able to take an array of mods to enable.
-- `apache::vhost`
-  - Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
-  `wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
-  WSGI configuration.
-  - Add `access_log_syslog` parameter to enable syslogging.
-  - Add `error_log_syslog` parameter to enable syslogging of errors.
-  - Add `directories` hash parameter. Please see README for documentation.
-  - Add `sslproxyengine` parameter to enable SSLProxyEngine
-  - Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
-  configuring SuPHP.
-  - Add `custom_fragment` parameter to allow for arbitrary apache
-  configuration injection. (Feature pull requests are prefered over using
-  this, but it is available in a pinch.)
-- Add `apache::mod::suphp` class for configuring SuPHP.
-- Add `apache::mod::itk` class for configuring ITK mpm module.
-- Update `apache::mod::wsgi` class for global WSGI configuration with
-`wsgi_socket_prefix` and `wsgi_python_home` parameters.
-- Add README.passenger.md to document the `apache::mod::passenger` usage.
-Added `passenger_high_performance`, `passenger_pool_idle_time`,
-`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
-and `rails_autodetect` parameters.
-- Separate the httpd service resource into a new `apache::service` class for
-dependency chaining of `Class['apache'] -> <resource> ~>
-Class['apache::service']`
-- Added `apache::mod::proxy_balancer` class for `apache::balancer`
-
-#### Bugfixes:
-- Change dependency to puppetlabs-concat
-- Fix ruby 1.9 bug for `a2mod`
-- Change servername to be `$::hostname` if there is no `$::fqdn`
-- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
-- Make `php` the default php package for RedHat non-5.
-- Made `aliases` able to take a single alias hash instead of requiring an
-array.
-
-## 2013-07-26 Release 0.8.1
-#### Bugfixes:
-- Update `apache::mpm_module` detection for worker/prefork
-- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
-worker/prefork
-
-## 2013-07-16 Release 0.8.0
-#### Features:
-- Add `servername` parameter to `apache` class
-- Add `proxy_set` parameter to `apache::balancer` define
-
-#### Bugfixes:
-- Fix ordering for multiple `apache::balancer` clusters
-- Fix symlinking for sites-available on Debian-based OSs
-- Fix dependency ordering for recursive confdir management
-- Fix `apache::mod::*` to notify the service on config change
-- Documentation updates
-
-## 2013-07-09 Release 0.7.0
-#### Changes:
-- Essentially rewrite the module -- too many to list
-- `apache::vhost` has many abilities -- see README.md for details
-- `apache::mod::*` classes provide httpd mod-loading capabilities
-- `apache` base class is much more configurable
-
-#### Bugfixes:
-- Many. And many more to come
-
-## 2013-03-2 Release 0.6.0
-- update travis tests (add more supported versions)
-- add access log_parameter
-- make purging of vhost dir configurable
-
-## 2012-08-24 Release 0.4.0
-#### Changes:
-- `include apache` is now required when using `apache::mod::*`
-
-#### Bugfixes:
-- Fix syntax for validate_re
-- Fix formatting in vhost template
-- Fix spec tests such that they pass
-
-##2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4
-* e62e362 Fix broken tests for ssl, vhost, vhost::*
-* 42c6363 Changes to match style guide and pass puppet-lint without error
-* 42bc8ba changed name => path for file resources in order to name namevar by it's name
-* 72e13de One end too much
-* 0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
-* 273f94d fix tests
-* a35ede5 (#13860) Make a2enmod/a2dismo commands optional
-* 98d774e (#13860) Autorequire Package['httpd']
-* 05fcec5 (#13073) Add missing puppet spec tests
-* 541afda (#6899) Remove virtual a2mod definition
-* 976cb69 (#13072) Move mod python and wsgi package names to params
-* 323915a (#13060) Add .gitignore to repo
-* fdf40af (#13060) Remove pkg directory from source tree
-* fd90015 Add LICENSE file and update the ModuleFile
-* d3d0d23 Re-enable local php class
-* d7516c7 Make management of firewalls configurable for vhosts
-* 60f83ba Explicitly lookup scope of apache_name in templates.
-* f4d287f (#12581) Add explicit ordering for vdir directory
-* 88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
-* a776a8b (#11071) Fix to work with latest firewall module
-* 2b79e8b (#11070) Add support for Scientific Linux
-* 405b3e9 Fix for a2mod
-* 57b9048 Commit apache::vhost::redirect Manifest
-* 8862d01 Commit apache::vhost::proxy Manifest
-* d5c1fd0 Commit apache::mod::wsgi Manifest
-* a825ac7 Commit apache::mod::python Manifest
-* b77062f Commit Templates
-* 9a51b4a Vhost File Declarations
-* 6cf7312 Defaults for Parameters
-* 6a5b11a Ensure installed
-* f672e46 a2mod fix
-* 8a56ee9 add pthon support to apache

+ 0 - 234
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/CONTRIBUTING.md

@@ -1,234 +0,0 @@
-Checklist (and a short version for the impatient)
-=================================================
-
-  * Commits:
-
-    - Make commits of logical units.
-
-    - Check for unnecessary whitespace with "git diff --check" before
-      committing.
-
-    - Commit using Unix line endings (check the settings around "crlf" in
-      git-config(1)).
-
-    - Do not check in commented out code or unneeded files.
-
-    - The first line of the commit message should be a short
-      description (50 characters is the soft limit, excluding ticket
-      number(s)), and should skip the full stop.
-
-    - Associate the issue in the message. The first line should include
-      the issue number in the form "(#XXXX) Rest of message".
-
-    - The body should provide a meaningful commit message, which:
-
-      - uses the imperative, present tense: "change", not "changed" or
-        "changes".
-
-      - includes motivation for the change, and contrasts its
-        implementation with the previous behavior.
-
-    - Make sure that you have tests for the bug you are fixing, or
-      feature you are adding.
-
-    - Make sure the test suites passes after your commit:
-      `bundle exec rspec spec/acceptance` More information on [testing](#Testing) below
-
-    - When introducing a new feature, make sure it is properly
-      documented in the README.md
-
-  * Submission:
-
-    * Pre-requisites:
-
-      - Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
-
-      - Make sure you have a [GitHub account](https://github.com/join)
-
-      - [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) you are patching for.
-
-    * Preferred method:
-
-      - Fork the repository on GitHub.
-
-      - Push your changes to a topic branch in your fork of the
-        repository. (the format ticket/1234-short_description_of_change is
-        usually preferred for this project).
-
-      - Submit a pull request to the repository in the puppetlabs
-        organization.
-
-The long version
-================
-
-  1.  Make separate commits for logically separate changes.
-
-      Please break your commits down into logically consistent units
-      which include new or changed tests relevant to the rest of the
-      change.  The goal of doing this is to make the diff easier to
-      read for whoever is reviewing your code.  In general, the easier
-      your diff is to read, the more likely someone will be happy to
-      review it and get it into the code base.
-
-      If you are going to refactor a piece of code, please do so as a
-      separate commit from your feature or bug fix changes.
-
-      We also really appreciate changes that include tests to make
-      sure the bug is not re-introduced, and that the feature is not
-      accidentally broken.
-
-      Describe the technical detail of the change(s).  If your
-      description starts to get too long, that is a good sign that you
-      probably need to split up your commit into more finely grained
-      pieces.
-
-      Commits which plainly describe the things which help
-      reviewers check the patch and future developers understand the
-      code are much more likely to be merged in with a minimum of
-      bike-shedding or requested changes.  Ideally, the commit message
-      would include information, and be in a form suitable for
-      inclusion in the release notes for the version of Puppet that
-      includes them.
-
-      Please also check that you are not introducing any trailing
-      whitespace or other "whitespace errors".  You can do this by
-      running "git diff --check" on your changes before you commit.
-
-  2.  Sign the Contributor License Agreement
-
-      Before we can accept your changes, we do need a signed Puppet
-      Labs Contributor License Agreement (CLA).
-
-      You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
-
-      If you have any questions about the CLA, please feel free to
-      contact Puppet Labs via email at cla-submissions@puppetlabs.com.
-
-  3.  Sending your patches
-
-      To submit your changes via a GitHub pull request, we _highly_
-      recommend that you have them on a topic branch, instead of
-      directly on "master".
-      It makes things much easier to keep track of, especially if
-      you decide to work on another thing before your first change
-      is merged in.
-
-      GitHub has some pretty good
-      [general documentation](http://help.github.com/) on using
-      their site.  They also have documentation on
-      [creating pull requests](http://help.github.com/send-pull-requests/).
-
-      In general, after pushing your topic branch up to your
-      repository on GitHub, you can switch to the branch in the
-      GitHub UI and click "Pull Request" towards the top of the page
-      in order to open a pull request.
-
-
-  4.  Update the related GitHub issue.
-
-      If there is a GitHub issue associated with the change you
-      submitted, then you should update the ticket to include the
-      location of your branch, along with any other commentary you
-      may wish to make.
-
-Testing
-=======
-
-Getting Started
----------------
-
-Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
-package manager such as [bundler](http://bundler.io/) what Ruby packages,
-or Gems, are required to build, develop, and test this software.
-
-Please make sure you have [bundler installed](http://bundler.io/#getting-started)
-on your system, then use it to install all dependencies needed for this project,
-by running
-
-```shell
-% bundle install
-Fetching gem metadata from https://rubygems.org/........
-Fetching gem metadata from https://rubygems.org/..
-Using rake (10.1.0)
-Using builder (3.2.2)
--- 8><-- many more --><8 --
-Using rspec-system-puppet (2.2.0)
-Using serverspec (0.6.3)
-Using rspec-system-serverspec (1.0.0)
-Using bundler (1.3.5)
-Your bundle is complete!
-Use `bundle show [gemname]` to see where a bundled gem is installed.
-```
-
-NOTE some systems may require you to run this command with sudo.
-
-If you already have those gems installed, make sure they are up-to-date:
-
-```shell
-% bundle update
-```
-
-With all dependencies in place and up-to-date we can now run the tests:
-
-```shell
-% rake spec
-```
-
-This will execute all the [rspec tests](http://rspec-puppet.com/) tests
-under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
-and so on. rspec tests may have the same kind of dependencies as the
-module they are testing. While the module defines in its [Modulefile](./Modulefile),
-rspec tests define them in [.fixtures.yml](./fixtures.yml).
-
-Some puppet modules also come with [beaker](https://github.com/puppetlabs/beaker)
-tests. These tests spin up a virtual machine under
-[VirtualBox](https://www.virtualbox.org/)) with, controlling it with
-[Vagrant](http://www.vagrantup.com/) to actually simulate scripted test
-scenarios. In order to run these, you will need both of those tools
-installed on your system.
-
-You can run them by issuing the following command
-
-```shell
-% rake spec_clean
-% rspec spec/acceptance
-```
-
-This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
-install puppet, copy this module and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
-and then run all the tests under [spec/acceptance](./spec/acceptance).
-
-Writing Tests
--------------
-
-XXX getting started writing tests.
-
-If you have commit access to the repository
-===========================================
-
-Even if you have commit access to the repository, you will still need to
-go through the process above, and have someone else review and merge
-in your changes.  The rule is that all changes must be reviewed by a
-developer on the project (that did not write the code) to ensure that
-all changes go through a code review process.
-
-Having someone other than the author of the topic branch recorded as
-performing the merge is the record that they performed the code
-review.
-
-
-Additional Resources
-====================
-
-* [Getting additional help](http://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
-
-* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
-
-* [Patchwork](https://patchwork.puppetlabs.com)
-
-* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
-
-* [General GitHub documentation](http://help.github.com/)
-
-* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
-

+ 0 - 26
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Gemfile

@@ -1,26 +0,0 @@
-source ENV['GEM_SOURCE'] || "https://rubygems.org"
-
-group :development, :test do
-  gem 'rake', '10.1.1',          :require => false
-  gem 'rspec-puppet', '>=1.0.0', :require => false
-  gem 'puppetlabs_spec_helper',  :require => false
-  gem 'serverspec',              :require => false
-  gem 'puppet-lint',             :require => false
-  gem 'beaker',                  :require => false
-  gem 'beaker-rspec',            :require => false
-  gem 'rspec', '~> 2.11',        :require => false
-end  
-
-if facterversion = ENV['FACTER_GEM_VERSION']
-  gem 'facter', facterversion, :require => false
-else
-  gem 'facter', :require => false
-end
-
-if puppetversion = ENV['PUPPET_GEM_VERSION']
-  gem 'puppet', puppetversion, :require => false
-else
-  gem 'puppet', :require => false
-end
-
-# vim:ft=ruby

+ 0 - 15
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/LICENSE

@@ -1,15 +0,0 @@
-Copyright (C) 2012 Puppet Labs Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 12
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Modulefile

@@ -1,12 +0,0 @@
-name 'puppetlabs-apache'
-version '1.0.1'
-source 'git://github.com/puppetlabs/puppetlabs-apache.git'
-author 'puppetlabs'
-license 'Apache 2.0'
-summary 'Puppet module for Apache'
-description 'Module for Apache configuration'
-project_page 'https://github.com/puppetlabs/puppetlabs-apache'
-
-## Add dependencies, if any:
-dependency 'puppetlabs/stdlib', '>= 2.4.0'
-dependency 'puppetlabs/concat', '>= 1.0.0'

+ 0 - 1958
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.md

@@ -1,1958 +0,0 @@
-#apache
-
-[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apache)
-
-####Table of Contents
-
-1. [Overview - What is the apache module?](#overview)
-2. [Module Description - What does the module do?](#module-description)
-3. [Setup - The basics of getting started with apache](#setup)
-    * [Beginning with apache - Installation](#beginning-with-apache)
-    * [Configure a virtual host - Basic options for getting started](#configure-a-virtual-host)
-4. [Usage - The classes and defined types available for configuration](#usage)
-    * [Classes and Defined Types](#classes-and-defined-types)
-        * [Class: apache](#class-apache)
-        * [Class: apache::default_mods](#class-apachedefault_mods)
-        * [Defined Type: apache::mod](#defined-type-apachemod)
-        * [Classes: apache::mod::*](#classes-apachemodname)
-        * [Class: apache::mod::pagespeed](#class-apachemodpagespeed)
-        * [Class: apache::mod::php](#class-apachemodphp)
-        * [Class: apache::mod::ssl](#class-apachemodssl)
-        * [Class: apache::mod::wsgi](#class-apachemodwsgi)
-        * [Class: apache::mod::fcgid](#class-apachemodfcgid)
-        * [Defined Type: apache::vhost](#defined-type-apachevhost)
-        * [Parameter: `directories` for apache::vhost](#parameter-directories-for-apachevhost)
-        * [SSL parameters for apache::vhost](#ssl-parameters-for-apachevhost)
-    * [Virtual Host Examples - Demonstrations of some configuration options](#virtual-host-examples)
-    * [Load Balancing](#load-balancing)
-        * [Defined Type: apache::balancer](#defined-type-apachebalancer)
-        * [Defined Type: apache::balancermember](#defined-type-apachebalancermember)
-        * [Examples - Load balancing with exported and non-exported resources](#examples)
-5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
-    * [Classes](#classes)
-        * [Public Classes](#public-classes)
-        * [Private Classes](#private-classes)
-    * [Defined Types](#defined-types)
-        * [Public Defined Types](#public-defined-types)
-        * [Private Defined Types](#private-defined-types)
-    * [Templates](#templates)
-6. [Limitations - OS compatibility, etc.](#limitations)
-7. [Development - Guide for contributing to the module](#development)
-    * [Contributing to the apache module](#contributing)
-    * [Running tests - A quick guide](#running-tests)
-
-##Overview
-
-The apache module allows you to set up virtual hosts and manage web services with minimal effort.
-
-##Module Description
-
-Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.
-
-##Setup
-
-**What apache affects:**
-
-* configuration files and directories (created and written to)
-    * **WARNING**: Configurations that are *not* managed by Puppet will be purged.
-* package/service/configuration files for Apache
-* Apache modules
-* virtual hosts
-* listened-to ports
-* `/etc/make.conf` on FreeBSD 
-
-###Beginning with Apache
-
-To install Apache with the default parameters
-
-```puppet
-    class { 'apache':  }
-```
-
-The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, and RedHat systems have another, as do FreeBSD systems). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters
-
-```puppet
-    class { 'apache':
-      default_mods        => false,
-      default_confd_files => false,
-    }
-```
-
-###Configure a virtual host
-
-Declaring the `apache` class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving `$apache::docroot`.
-
-```puppet
-    class { 'apache': }
-```
-
-To configure a very basic, name-based virtual host
-
-```puppet
-    apache::vhost { 'first.example.com':
-      port    => '80',
-      docroot => '/var/www/first',
-    }
-```
-
-*Note:* The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.
-
-A slightly more complicated example, changes the docroot owner/group from the default 'root'
-
-```puppet
-    apache::vhost { 'second.example.com':
-      port          => '80',
-      docroot       => '/var/www/second',
-      docroot_owner => 'third',
-      docroot_group => 'third',
-    }
-```
-
-To set up a virtual host with SSL and default SSL certificates
-
-```puppet
-    apache::vhost { 'ssl.example.com':
-      port    => '443',
-      docroot => '/var/www/ssl',
-      ssl     => true,
-    }
-```
-
-To set up a virtual host with SSL and specific SSL certificates
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port     => '443',
-      docroot  => '/var/www/fourth',
-      ssl      => true,
-      ssl_cert => '/etc/ssl/fourth.example.com.cert',
-      ssl_key  => '/etc/ssl/fourth.example.com.key',
-    }
-```
-
-Virtual hosts listen on '*' by default. To listen on a specific IP address
-
-```puppet
-    apache::vhost { 'subdomain.example.com':
-      ip      => '127.0.0.1',
-      port    => '80',
-      docroot => '/var/www/subdomain',
-    }
-```
-
-To set up a virtual host with a wildcard alias for the subdomain mapped to a same-named directory, for example: `http://example.com.loc` to `/var/www/example.com`
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot' => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_application_group      => '%{GLOBAL}',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options => { 
-        processes    => '2', 
-        threads      => '15', 
-        display-name => '%{GROUP}',
-       },
-      wsgi_import_script          => '/var/www/demo.wsgi',
-      wsgi_import_script_options  =>
-        { process-group => 'wsgi', application-group => '%{GLOBAL}' },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-Starting in Apache 2.2.16, HTTPD supports [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource), a simple replacement for common RewriteRules.
-
-```puppet
-    apache::vhost { 'wordpress.example.com':
-      port                => '80',
-      docroot             => '/var/www/wordpress',
-      fallbackresource    => '/index.php',
-    }
-```
-
-Please note that the 'disabled' argument to FallbackResource is only supported since Apache 2.2.24.
-
-See a list of all [virtual host parameters](#defined-type-apachevhost). See an extensive list of [virtual host examples](#virtual-host-examples).
-
-##Usage
-
-###Classes and Defined Types
-
-This module modifies Apache configuration files and directories, and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-Puppet configuration files can cause unexpected failures.
-
-It is possible to temporarily disable full Puppet management by setting the [`purge_configs`](#purge_configs) parameter within the base `apache` class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations. See the [`purge_configs` parameter](#purge_configs) for more information.
-
-####Class: `apache`
-
-The apache module's primary class, `apache`, guides the basic setup of Apache on your system.
-
-You may establish a default vhost in this class, the `vhost` class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the `vhost` type.
-
-**Parameters within `apache`:**
-
-#####`apache_version`
-
-Configures the behavior of the module templates, package names, and default mods by setting the Apache version. Default is determined by the class `apache::version` using the OS family and release. It should not be configured manually without special reason.
-
-#####`confd_dir`
-
-Changes the location of the configuration directory your custom configuration files are placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`conf_template`
-
-Overrides the template used for the main apache configuration file. Defaults to 'apache/httpd.conf.erb'.
-
-*Note:* Using this parameter is potentially risky, as the module has been built for a minimal configuration file with the configuration primarily coming from conf.d/ entries.
-
-#####`default_confd_files`
-
-Generates default set of include-able Apache configuration files under  `${apache::confd_dir}` directory. These configuration files correspond to what is usually installed with the Apache package on a given platform.
-
-#####`default_mods`
-
-Sets up Apache with default settings based on your OS. Valid values are 'true', 'false', or an array of mod names. 
-
-Defaults to 'true', which will include the default [HTTPD mods](https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/default_mods.pp).
-
-If false, it will only include the mods required to make HTTPD work, and any other mods can be declared on their own.
-
-If an array, the apache module will include the array of mods listed.
-
-#####`default_ssl_ca`
-
-The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_cert`
-
-The default SSL certification, which is automatically set based on your operating system  ('/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_chain`
-
-The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl`
-
-The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl_path`
-
-The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_key`
-
-The default SSL key, which is automatically set based on your operating system ('/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_vhost`
-
-Sets up a default SSL virtual host. Defaults to 'false'. If set to 'true', will set up the following vhost:
-
-```puppet
-    apache::vhost { 'default-ssl':
-      port            => 443,
-      ssl             => true,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => "ssl_${access_log_file}",
-      }
-```
-
-SSL vhosts only respond to HTTPS queries.
-
-#####`default_vhost`
-
-Sets up a default virtual host. Defaults to 'true', set to 'false' to set up [customized virtual hosts](#configure-a-virtual-host).
-
-#####`error_documents`
-
-Enables custom error documents. Defaults to 'false'.
-
-#####`httpd_dir`
-
-Changes the base location of the configuration directories used for the apache service. This is useful for specially repackaged HTTPD builds, but may have unintended consequences when used in combination with the default distribution packages. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`keepalive`
-
-Enables persistent connections.
-
-#####`keepalive_timeout`
-
-Sets the amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.
-
-#####`max_keepalive_requests`
-
-Sets the limit of the number of requests allowed per connection when KeepAlive is on. Defaults to '100'.
-
-#####`loadfile_name`
-
-Sets the file name for the module loadfile. Should be in the format *.load.  This can be used to set the module load order.
-
-#####`log_level`
-
-Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info', or 'debug'.
-
-#####`log_formats`
-
-Define additional [LogFormats](https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat). This is done in a Hash:
-
-```puppet
-  $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' }
-```
-
-#####`logroot`
-
-Changes the directory where Apache log files for the virtual host are placed. Defaults to '/var/log/httpd' on RedHat, '/var/log/apache2' on Debian, and '/var/log/apache22' on FreeBSD.
-
-#####`manage_group`
-
-Setting this to 'false' will stop the group resource from being created. This is for when you have a group, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established group would result in a duplicate resource error.
-
-#####`manage_user`
-
-Setting this to 'false' will stop the user resource from being created. This is for instances when you have a user, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established user would result in a duplicate resource error.
-
-#####`mod_dir`
-
-Changes the location of the configuration directory your Apache modules configuration files are placed in. Defaults to '/etc/httpd/conf.d' for RedHat, '/etc/apache2/mods-available' for Debian, and '/usr/local/etc/apache22/Modules' for FreeBSD.
-
-#####`mpm_module`
-
-Determines which MPM is loaded and configured for the HTTPD process. Valid values are 'event', 'itk', 'peruser', 'prefork', 'worker', or 'false'. Defaults to 'prefork' on RedHat and FreeBSD, and 'worker' on Debian. Must be set to 'false' to explicitly declare the following classes with custom parameters:
-
-* `apache::mod::event`
-* `apache::mod::itk`
-* `apache::mod::peruser`
-* `apache::mod::prefork`
-* `apache::mod::worker` 
-
-*Note:* Switching between different MPMs on FreeBSD is possible but quite difficult. Before changing `$mpm_module` you must uninstall all packages that depend on your currently-installed Apache. 
-
-#####`package_ensure`
-
-Allows control over the package ensure attribute. Can be 'present','absent', or a version string.
-
-#####`ports_file`
-
-Changes the name of the file containing Apache ports configuration. Default is `${conf_dir}/ports.conf`.
-
-#####`purge_configs`
-
-Removes all other Apache configs and vhosts, defaults to 'true'. Setting this to 'false' is a stopgap measure to allow the apache module to coexist with existing or otherwise-managed configuration. It is recommended that you move your configuration entirely to resources within this module.
-
-#####`sendfile`
-
-Makes Apache use the Linux kernel sendfile to serve static files. Defaults to 'On'.
-
-#####`serveradmin`
-
-Sets the server administrator. Defaults to 'root@localhost'.
-
-#####`servername`
-
-Sets the server name. Defaults to `fqdn` provided by Facter.
-
-#####`server_root`
-
-Sets the root directory in which the server resides. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local' on FreeBSD.
-
-#####`server_signature`
-
-Configures a trailing footer line under server-generated documents. More information about [ServerSignature](http://httpd.apache.org/docs/current/mod/core.html#serversignature). Defaults to 'On'.
-
-#####`server_tokens`
-
-Controls how much information Apache sends to the browser about itself and the operating system. More information about [ServerTokens](http://httpd.apache.org/docs/current/mod/core.html#servertokens). Defaults to 'OS'.
-
-#####`service_enable`
-
-Determines whether the HTTPD service is enabled when the machine is booted. Defaults to 'true'.
-
-#####`service_ensure`
-
-Determines whether the service should be running. Valid values are true, false, 'running' or 'stopped' when Puppet should manage the service. Any other value will set ensure to false for the Apache service, which is useful when you want to let the service be managed by some other application like Pacemaker. Defaults to 'running'.
-
-#####`service_name`
-
-Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.
-
-#####`trace_enable`
-
-Controls how TRACE requests per RFC 2616 are handled. More information about [TraceEnable](http://httpd.apache.org/docs/current/mod/core.html#traceenable). Defaults to 'On'.
-
-#####`vhost_dir`
-
-Changes the location of the configuration directory your virtual host configuration files are placed in. Defaults to 'etc/httpd/conf.d' on RedHat, '/etc/apache2/sites-available' on Debian, and '/usr/local/etc/apache22/Vhosts' on FreeBSD.
-
-####Class: `apache::default_mods`
-
-Installs default Apache modules based on what OS you are running.
-
-```puppet
-    class { 'apache::default_mods': }
-```
-
-####Defined Type: `apache::mod`
-
-Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class. The `apache::mod` defined type will also install the required packages to enable the module, if any.
-
-```puppet
-    apache::mod { 'rewrite': }
-    apache::mod { 'ldap': }
-```
-
-####Classes: `apache::mod::[name]`
-
-There are many `apache::mod::[name]` classes within this module that can be declared using `include`:
-
-* `actions`
-* `alias`
-* `auth_basic`
-* `auth_kerb`
-* `authnz_ldap`*
-* `autoindex`
-* `cache`
-* `cgi`
-* `cgid`
-* `dav`
-* `dav_fs`
-* `dav_svn`*
-* `deflate`
-* `dev`
-* `dir`*
-* `disk_cache`
-* `event`
-* `expires`
-* `fastcgi`
-* `fcgid`
-* `headers`
-* `include`
-* `info`
-* `itk`
-* `ldap`
-* `mime`
-* `mime_magic`*
-* `negotiation`
-* `nss`*
-* `pagespeed` (see [`apache::mod::pagespeed`](#class-apachemodpagespeed) below)
-* `passenger`*
-* `perl`
-* `peruser`
-* `php` (requires [`mpm_module`](#mpm_module) set to `prefork`)
-* `prefork`*
-* `proxy`*
-* `proxy_ajp`
-* `proxy_balancer`
-* `proxy_html`
-* `proxy_http`
-* `python`
-* `reqtimeout`
-* `rewrite`
-* `rpaf`*
-* `setenvif`
-* `speling`
-* `ssl`* (see [`apache::mod::ssl`](#class-apachemodssl) below)
-* `status`*
-* `suphp`
-* `userdir`*
-* `vhost_alias`
-* `worker`*
-* `wsgi` (see [`apache::mod::wsgi`](#class-apachemodwsgi) below)
-* `xsendfile`
-
-Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.
-
-The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install and the module will not work without the template. Any module without a template will install the package but drop no files.
-
-####Class: `apache::mod::pagespeed`
-
-Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth.
-
-This module does *not* manage the software repositories needed to automatically install the
-mod-pagespeed-stable package. The module does however require that the package be installed,
-or be installable using the system's default package provider.  You should ensure that this
-pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.
-
-These are the defaults:
-
-```puppet
-    class { 'apache::mod::pagespeed':
-      inherit_vhost_config          => 'on',
-      filter_xhtml                  => false,
-      cache_path                    => '/var/cache/mod_pagespeed/',
-      log_dir                       => '/var/log/pagespeed',
-      memache_servers               => [],
-      rewrite_level                 => 'CoreFilters',
-      disable_filters               => [],
-      enable_filters                => [],
-      forbid_filters                => [],
-      rewrite_deadline_per_flush_ms => 10,
-      additional_domains            => undef,
-      file_cache_size_kb            => 102400,
-      file_cache_clean_interval_ms  => 3600000,
-      lru_cache_per_process         => 1024,
-      lru_cache_byte_limit          => 16384,
-      css_flatten_max_bytes         => 2048,
-      css_inline_max_bytes          => 2048,
-      css_image_inline_max_bytes    => 2048,
-      image_inline_max_bytes        => 2048,
-      js_inline_max_bytes           => 2048,
-      css_outline_min_bytes         => 3000,
-      js_outline_min_bytes          => 3000,
-      inode_limit                   => 500000,
-      image_max_rewrites_at_once    => 8,
-      num_rewrite_threads           => 4,
-      num_expensive_rewrite_threads => 4,
-      collect_statistics            => 'on',
-      statistics_logging            => 'on',
-      allow_view_stats              => [],
-      allow_pagespeed_console       => [],
-      allow_pagespeed_message       => [],
-      message_buffer_size           => 100000,
-      additional_configuration      => { }
-    }
-```
-
-Full documentation for mod_pagespeed is available from [Google](http://modpagespeed.com).
-
-####Class: `apache::mod::php`
-
-Installs and configures mod_php. The defaults are OS-dependant.
-
-Overriding the package name:
-```
-  class {'::apache::mod::php':
-    package_name => "php54-php",
-    path         => "${::apache::params::lib_path}/libphp54-php5.so",
-  }
-```
-
-Overriding the default configuartion:
-```puppet
-  class {'::apache::mod::php':
-    source => 'puppet:///modules/apache/my_php.conf',
-  }
-```
-
-or 
-```puppet
-  class {'::apache::mod::php':
-    template => 'apache/php.conf.erb',
-  }
-```
-
-or
-
-```puppet
-  class {'::apache::mod::php':
-    content => '
-AddHandler php5-script .php
-AddType text/html .php',
-  }
-```
-####Class: `apache::mod::ssl`
-
-Installs Apache SSL capabilities and uses the ssl.conf.erb template. These are the defaults:
-
-```puppet
-    class { 'apache::mod::ssl':
-      ssl_compression => false,
-      ssl_options     => [ 'StdEnvVars' ],
-  }
-```
-
-To *use* SSL with a virtual host, you must either set the`default_ssl_vhost` parameter in `::apache` to 'true' or set the `ssl` parameter in `apache::vhost` to 'true'.
-
-####Class: `apache::mod::wsgi`
-
-Enables Python support in the WSGI module. To use, simply `include 'apache::mod::wsgi'`. 
-
-For customized parameters, which tell Apache how Python is currently configured on the operating system,
-
-```puppet
-    class { 'apache::mod::wsgi':
-      wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI",
-      wsgi_python_home   => '/path/to/venv',
-      wsgi_python_path   => '/path/to/venv/site-packages',
-    }
-```
-
-More information about [WSGI](http://modwsgi.readthedocs.org/en/latest/).
-
-####Class: `apache::mod::fcgid`
-
-Installs and configures mod_fcgid.
-
-The class makes no effort to list all available options, but rather uses an options hash to allow for ultimate flexibility:
-
-```puppet
-    class { 'apache::mod::fcgid':
-      options => {
-        'FcgidIPCDir'  => '/var/run/fcgidsock',
-        'SharememPath' => '/var/run/fcgid_shm',
-        'AddHandler'   => 'fcgid-script .fcgi',
-      },
-    }
-```
-
-For a full list op options, see the [official mod_fcgid documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html).
-
-It is also possible to set the FcgidWrapper per directory per vhost. You must ensure the fcgid module is loaded because there is no auto loading.
-
-```puppet
-    include apache::mod::fcgid
-    apache::vhost { 'example.org':
-      docroot     => '/var/www/html',
-      directories => {
-        path        => '/var/www/html',
-        fcgiwrapper => {
-          command => '/usr/local/bin/fcgiwrapper',
-        }
-      },
-    }
-```
-
-See [FcgidWrapper documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidwrapper) for more information.
-
-####Defined Type: `apache::vhost`
-
-The Apache module allows a lot of flexibility in the setup and configuration of virtual hosts. This flexibility is due, in part, to `vhost`'s being a defined resource type, which allows it to be evaluated multiple times with different parameters.
-
-The `vhost` defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base `::apache` class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).
-
-If you have a series of specific configurations and do not want a base `::apache` class default vhost, make sure to set the base class `default_vhost` to 'false'.
-
-```puppet
-    class { 'apache':
-      default_vhost => false,
-    }
-```
-
-**Parameters within `apache::vhost`:**
-
-#####`access_log`
-
-Specifies whether `*_access.log` directives (`*_file`,`*_pipe`, or `*_syslog`) should be configured. Setting the value to 'false' will choose none. Defaults to 'true'. 
-
-#####`access_log_file`
-
-Sets the `*_access.log` filename that is placed in `$logroot`. Given a vhost, example.com, it defaults to 'example.com_ssl.log' for SSL vhosts and 'example.com_access.log' for non-SSL vhosts.
-
-#####`access_log_pipe`
-
-Specifies a pipe to send access log messages to. Defaults to 'undef'.
-
-#####`access_log_syslog`
-
-Sends all access log messages to syslog. Defaults to 'undef'.
-
-#####`access_log_format`
-
-Specifies the use of either a LogFormat nickname or a custom format string for the access log. Defaults to 'combined'. See [these examples](http://httpd.apache.org/docs/current/mod/mod_log_config.html).
-
-#####`access_log_env_var`
-
-Specifies that only requests with particular environment variables be logged. Defaults to 'undef'.
-
-#####`add_listen`
-
-Determines whether the vhost creates a Listen statement. The default value is 'true'.
-
-Setting `add_listen` to 'false' stops the vhost from creating a Listen statement, and this is important when you combine vhosts that are not passed an `ip` parameter with vhosts that *are* passed the `ip` parameter.
-
-#####`additional_includes`
-
-Specifies paths to additional static, vhost-specific Apache configuration files. Useful for implementing a unique, custom configuration not supported by this module. Can be an array. Defaults to '[]'.
-
-#####`aliases`
-
-Passes a list of hashes to the vhost to create Alias or AliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-aliases => [
-  { aliasmatch => '^/image/(.*)\.jpg$', 
-    path       => '/files/jpg.images/$1.jpg',
-  }
-  { alias      => '/image',
-    path       => '/ftp/pub/image', 
-  },
-],
-```
-
-For `alias` and `aliasmatch` to work, each will need a corresponding context, such as '< Directory /path/to/directory>' or '<Location /path/to/directory>'. The Alias and AliasMatch directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias` or `aliasmatch` parameters should come before the more general ones to avoid shadowing.
-
-*Note:* If `apache::mod::passenger` is loaded and `PassengerHighPerformance => true` is set, then Alias may have issues honoring the `PassengerEnabled => off` statement. See [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
-
-#####`block`
-
-Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories.
-
-#####`custom_fragment`
-
-Passes a string of custom configuration directives to be placed at the end of the vhost configuration. Defaults to 'undef'.
-
-#####`default_vhost`
-
-Sets a given `apache::vhost` as the default to serve requests that do not match any other `apache::vhost` definitions. The default value is 'false'.
-
-#####`directories`
-
-See the [`directories` section](#parameter-directories-for-apachevhost).
-
-#####`directoryindex`
-
-Sets the list of resources to look for when a client requests an index of the directory by specifying a '/' at the end of the directory name. [DirectoryIndex](http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex) has more information. Defaults to 'undef'.
-
-#####`docroot`
-
-Provides the [DocumentRoot](http://httpd.apache.org/docs/current/mod/core.html#documentroot) directive, which identifies the directory Apache serves files from. Required. 
-
-#####`docroot_group`
-
-Sets group access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_owner`
-
-Sets individual user access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_mode`
-
-Sets access permissions of the docroot directory. Defaults to 'undef'.
-
-#####`error_log`
-
-Specifies whether `*_error.log` directives should be configured. Defaults to 'true'.
-
-#####`error_log_file`
-
-Points to the `*_error.log` file. Given a vhost, example.com, it defaults to 'example.com_ssl_error.log' for SSL vhosts and 'example.com_access_error.log' for non-SSL vhosts.
-
-#####`error_log_pipe`
-
-Specifies a pipe to send error log messages to. Defaults to 'undef'.
-
-#####`error_log_syslog`
-
-Sends all error log messages to syslog. Defaults to 'undef'.
-
-#####`error_documents`
-
-A list of hashes which can be used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for this vhost. Defaults to '[]'. Example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      error_documents => [
-        { 'error_code' => '503', 'document' => '/service-unavail' },
-        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },
-      ],
-    }
-```
-
-#####`ensure`
-
-Specifies if the vhost file is present or absent. Defaults to 'present'.
-
-#####`fallbackresource`
-
-Sets the [FallbackResource](http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource) directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid values must either begin with a / or be 'disabled'. Defaults to 'undef'.
-
-#####`headers`
-
-Adds lines to replace, merge, or remove response headers. See [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) for more information. Can be an array. Defaults to 'undef'.
-
-#####`ip`
-
-Sets the IP address the vhost listens on. Defaults to listen on all IPs.
-
-#####`ip_based`
-
-Enables an [IP-based](http://httpd.apache.org/docs/current/vhosts/ip-based.html) vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.
-
-#####`itk`
-
-Configures [ITK](http://mpm-itk.sesse.net/) in a hash. Keys may be:
-
-* user + group
-* `assignuseridexpr`
-* `assigngroupidexpr`
-* `maxclientvhost`
-* `nice`
-* `limituidrange` (Linux 3.5.0 or newer)
-* `limitgidrange` (Linux 3.5.0 or newer)
-
-Usage will typically look like:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot => '/path/to/directory',
-      itk     => {
-        user  => 'someuser',
-        group => 'somegroup',
-      },
-    }
-```
-
-#####`logroot`
-
-Specifies the location of the virtual host's logfiles. Defaults to '/var/log/<apache log location>/'.
-
-#####`log_level`
-
-Specifies the verbosity of the error log. Defaults to 'warn' for the global server configuration and can be overridden on a per-vhost basis. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info' or 'debug'.
-
-#####`no_proxy_uris`
-
-Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with [`proxy_dest`](#proxy_dest).
-
-#####`proxy_preserve_host`
-
-Sets the [ProxyPreserveHost Directive](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost).  true Enables the Host: line from an incoming request to be proxied to the host instead of hostname .  false sets this option to off (default).
-
-#####`options`
-
-Sets the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the specified virtual host. Defaults to '['Indexes','FollowSymLinks','MultiViews']', as demonstrated below:
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      options => ['Indexes','FollowSymLinks','MultiViews'],
-    }
-```
-
-*Note:* If you use [`directories`](#parameter-directories-for-apachevhost), 'Options', 'Override', and 'DirectoryIndex' are ignored because they are parameters within `directories`.
-
-#####`override`
-
-Sets the overrides for the specified virtual host. Accepts an array of [AllowOverride](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) arguments. Defaults to '[none]'.
-
-#####`php_admin_flags & values`
-
-Allows per-vhost setting [`php_admin_value`s or `php_admin_flag`s](http://php.net/manual/en/configuration.changes.php). These flags or values cannot be overwritten by a user or an application. Defaults to '[]'.
-
-#####`port`
-
-Sets the port the host is configured on. The module's defaults ensure the host listens on port 80 for non-SSL vhosts and port 443 for SSL vhosts. The host will only listen on the port set in this parameter. 
-
-#####`priority`
-
-Sets the relative load-order for Apache HTTPD VirtualHost configuration files. Defaults to '25'.
-
-If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.
-
-*Note:* You should not need to use this parameter. However, if you do use it, be aware that the `default_vhost` parameter for `apache::vhost` passes a priority of '15'.
-
-#####`proxy_dest`
-
-Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-#####`proxy_pass`
-
-Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-```puppet
-apache::vhost { 'site.name.fdqn':
-  … 
-  proxy_pass => [
-    { 'path' => '/a', 'url' => 'http://backend-a/' },
-    { 'path' => '/b', 'url' => 'http://backend-b/' },
-    { 'path' => '/c', 'url' => 'http://backend-a/c' },
-  ],
-}
-```
-
-#####`rack_base_uris`
-
-Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for [Phusion Passenger](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri) in the _rack.erb template. Defaults to 'undef'.
-
-#####`redirect_dest`
-
-Specifies the address to redirect to. Defaults to 'undef'.
-
-#####`redirect_source`
-
-Specifies the source URIs that will redirect to the destination specified in `redirect_dest`. If more than one item for redirect is supplied, the source and destination must be the same length and the items will be order-dependent. 
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_source => ['/images','/downloads'],
-      redirect_dest   => ['http://img.example.com/','http://downloads.example.com/'],
-    }
-```
-
-#####`redirect_status`
-
-Specifies the status to append to the redirect. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_status => ['temp','permanent'],
-    }
-```
-
-#####`redirectmatch_regexp` & `redirectmatch_status`
-
-Determines which server status should be raised for a given regular expression. Entered as an array. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirectmatch_status => ['404','404'],
-      redirectmatch_regexp => ['\.git(/.*|$)/','\.svn(/.*|$)'],
-    }
-```
-
-#####`request_headers`
-
-Modifies collected [request headers](http://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader) in various ways, including adding additional request headers, removing request headers, etc. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      request_headers => [
-        'append MirrorID "mirror 12"',
-        'unset MirrorID',
-      ],
-    }
-```
-
-#####`rewrites`
-
-Creates URL rewrite rules. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', or 'rewrite_rule'. Defaults to 'undef'. 
-
-For example, you can specify that anyone trying to access index.html will be served welcome.html
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ]
-    }
-```
-
-The parameter allows rewrite conditions that, when true, will execute the associated rule. For instance, if you wanted to rewrite URLs only if the visitor is using IE
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'redirect IE',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-You can also apply multiple conditions. For instance, rewrite index.html to welcome.html only when the browser is Lynx or Mozilla (version 1 or 2)
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-Multiple rewrites and conditions are also possible
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-        {
-          comment      => 'Internet Explorer',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ /index.IE.html [L]'],
-        },
-        {
-          rewrite_base => /apps/,
-          rewrite_rule => ['^index\.cgi$ index.php', '^index\.html$ index.php', '^index\.asp$ index.html'],
-        },
-     ], 
-    }
-```
-
-Refer to the [`mod_rewrite` documentation](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) for more details on what is possible with rewrite rules and conditions.
-
-#####`scriptalias`
-
-Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for example: '/usr/scripts'. Defaults to 'undef'.
-
-#####`scriptaliases`
-
-Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-    scriptaliases => [
-      {
-        alias => '/myscript',
-        path  => '/usr/share/myscript',
-      },
-      {
-        aliasmatch => '^/foo(.*)',
-        path       => '/usr/share/fooscripts$1',
-      },
-      {
-        aliasmatch => '^/bar/(.*)',
-        path       => '/usr/share/bar/wrapper.sh/$1',
-      },
-      {
-        alias => '/neatscript',
-        path  => '/usr/share/neatscript',
-      },
-    ]
-```
-
-The ScriptAlias and ScriptAliasMatch directives are created in the order specified. As with [Alias and AliasMatch](#aliases) directives, more specific aliases should come before more general ones to avoid shadowing.
-
-#####`serveradmin`
-
-Specifies the email address Apache will display when it renders one of its error pages. Defaults to 'undef'.
-
-#####`serveraliases`
-
-Sets the [ServerAliases](http://httpd.apache.org/docs/current/mod/core.html#serveralias) of the site. Defaults to '[]'.
-
-#####`servername`
-
-Sets the servername corresponding to the hostname you connect to the virtual host at. Defaults to the title of the resource.
-
-#####`setenv`
-
-Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.
-
-#####`setenvif`
-
-Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.
-
-#####`suphp_addhandler`, `suphp_configpath`, & `suphp_engine`
-
-Set up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG). 
-
-`suphp_addhandler` defaults to 'php5-script' on RedHat and FreeBSD, and 'x-httpd-php' on Debian.
-
-`suphp_configpath` defaults to 'undef' on RedHat and FreeBSD, and '/etc/php5/apache2' on Debian.
-
-`suphp_engine` allows values 'on' or 'off'. Defaults to 'off'
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-#####`vhost_name`
-
-Enables name-based virtual hosting. If no IP is passed to the virtual host but the vhost is assigned a port, then the vhost name will be 'vhost_name:port'. If the virtual host has no assigned IP or port, the vhost name will be set to the title of the resource. Defaults to '*'.
-
-#####`virtual_docroot` 
-
-Sets up a virtual host with a wildcard alias subdomain mapped to a directory with the same name. For example, 'http://example.com' would map to '/var/www/example.com'. Defaults to 'false'. 
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot' => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, `wsgi_script_aliases`, & `wsgi_pass_authorization`
-
-Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).
-
-`wsgi_daemon_process` sets the name of the WSGI daemon. It is a hash, accepting [these keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html), and it defaults to 'undef'.
-
-`wsgi_daemon_process_options` is optional and defaults to 'undef'.
-
-`wsgi_process_group` sets the group ID the virtual host will run under. Defaults to 'undef'.
-
-`wsgi_script_aliases` requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.
-
-`wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).  Defaults to 'undef' where apache will set the defaults setting to 'Off'.
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options =>
-        { processes    => '2', 
-          threads      => '15', 
-          display-name => '%{GROUP}',
-         },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-####Parameter `directories` for `apache::vhost`
-
-The `directories` parameter within the `apache::vhost` class passes an array of hashes to the vhost to create [Directory](http://httpd.apache.org/docs/current/mod/core.html#directory), [File](http://httpd.apache.org/docs/current/mod/core.html#files), and [Location](http://httpd.apache.org/docs/current/mod/core.html#location) directive blocks. These blocks take the form, '< Directory /path/to/directory>...< /Directory>'.
-
-Each hash passed to `directories` must contain `path` as one of the keys.  You may also pass in `provider` which, if missing, defaults to 'directory'. (A full list of acceptable keys is below.) General usage will look something like
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path => '/path/to/directory', <key> => <value> },
-        { path => '/path/to/another/directory', <key> => <value> },
-      ],
-    }
-```
-
-*Note:* At least one directory should match the `docroot` parameter. Once you start declaring directories, `apache::vhost` assumes that all required Directory blocks will be declared. If not defined, a single default Directory block will be created that matches the `docroot` parameter.
-
-The `provider` key can be set to 'directory', 'files', or 'location'. If the path starts with a [~](https://httpd.apache.org/docs/current/mod/core.html#files), HTTPD will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch.
-
-```puppet
-    apache::vhost { 'files.example.net':
-      docroot     => '/var/www/files',
-      directories => [
-        { 'path'     => '/var/www/files', 
-          'provider' => 'files', 
-          'deny'     => 'from all' 
-         },
-      ],
-    }
-```
-
-Available handlers, represented as keys, should be placed within the  `directory`,`'files`, or `location` hashes.  This looks like
-
-```puppet
-  apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ { path => '/path/to/directory', handler => value } ],
-}
-```
-
-Any handlers you do not set in these hashes will be considered 'undefined' within Puppet and will not be added to the virtual host, resulting in the module using their default values. Currently this is the list of supported handlers:
-
-######`addhandlers`
-
-Sets [AddHandler](http://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler) directives, which map filename extensions to the specified handler. Accepts a list of hashes, with `extensions` serving to list the extensions being managed by the handler, and takes the form: `{ handler => 'handler-name', extensions => ['extension']}`. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path        => '/path/to/directory',
-          addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}],
-        }, 
-      ],
-    }
-```
-
-######`allow`
-
-Sets an [Allow](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow) directive, which groups authorizations based on hostnames or IPs. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          allow => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`allow_override`
-
-Sets the types of directives allowed in [.htaccess](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) files. Accepts an array.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot      => '/path/to/directory',
-      directories  => [ 
-        { path           => '/path/to/directory', 
-          allow_override => ['AuthConfig', 'Indexes'], 
-        }, 
-      ],
-    }
-```
-
-######`auth_basic_authoritative`
-
-Sets the value for [AuthBasicAuthoritative](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative), which determines whether authorization and authentication are passed to lower level Apache modules.
-
-######`auth_basic_fake`
-
-Sets the value for [AuthBasicFake](http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake), which statically configures authorization credentials for a given directive block.
-
-######`auth_basic_provider`
-
-Sets the value for [AuthBasicProvider] (http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_algorithm`
-
-Sets the value for [AuthDigestAlgorithm](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm), which selects the algorithm used to calculate the challenge and response hashes.
-
-######`auth_digest_domain`
-
-Sets the value for [AuthDigestDomain](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain), which allows you to specify one or more URIs in the same protection space for digest authentication.
-
-######`auth_digest_nonce_lifetime`
-
-Sets the value for [AuthDigestNonceLifetime](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime), which controls how long the server nonce is valid.
-
-######`auth_digest_provider`
-
-Sets the value for [AuthDigestProvider](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_qop`
-
-Sets the value for [AuthDigestQop](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop), which determines the quality-of-protection to use in digest authentication.
-
-######`auth_digest_shmem_size`
-
-Sets the value for [AuthAuthDigestShmemSize](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize), which defines the amount of shared memory allocated to the server for keeping track of clients.
-
-######`auth_group_file`
-
-Sets the value for [AuthGroupFile](https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile), which sets the name of the text file containing the list of user groups for authorization.
-
-######`auth_name`
-
-Sets the value for [AuthName](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname), which sets the name of the authorization realm.
-
-######`auth_require`
-
-Sets the entity name you're requiring to allow access. Read more about [Require](http://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives).
-
-######`auth_type`
-
-Sets the value for [AuthType](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype), which guides the type of user authentication.
-
-######`auth_user_file`
-
-Sets the value for [AuthUserFile](http://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile), which sets the name of the text file containing the users/passwords for authentication.
-
-######`custom_fragment`
-
-Pass a string of custom configuration directives to be placed at the end of the directory configuration.
-
-```puppet
-  apache::vhost { 'monitor':
-    … 
-    custom_fragment => '
-  <Location /balancer-manager>
-    SetHandler balancer-manager
-    Order allow,deny
-    Allow from all
-  </Location>
-  <Location /server-status>
-    SetHandler server-status
-    Order allow,deny
-    Allow from all
-  </Location>
-  ProxyStatus On',
-}
-```
-
-######`deny`
-
-Sets a [Deny](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny) directive, specifying which hosts are denied access to the server. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path => '/path/to/directory', 
-          deny => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`error_documents`
-
-An array of hashes used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for the directory. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      directories => [ 
-        { path            => '/srv/www',
-          error_documents => [
-            { 'error_code' => '503', 
-              'document'   => '/service-unavail',
-            },
-          ],
-        },
-      ],
-    }
-```
-
-######`headers`
-
-Adds lines for [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) directives.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => {
-        path    => '/path/to/directory',
-        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',
-      },
-    }
-```
-
-######`index_options`
-
-Allows configuration settings for [directory indexing](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions).
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path          => '/path/to/directory', 
-          options       => ['Indexes','FollowSymLinks','MultiViews'], 
-          index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'],
-        },
-      ],
-    }
-```
-
-######`index_order_default`
-
-Sets the [default ordering](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault) of the directory index.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path                => '/path/to/directory', 
-          order               => 'Allow,Deny', 
-          index_order_default => ['Descending', 'Date'],
-        }, 
-      ],
-    }
-```
-
-######`options`
-
-Lists the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the given Directory block.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path    => '/path/to/directory', 
-          options => ['Indexes','FollowSymLinks','MultiViews'], 
-        },
-      ],
-    }
-```
-
-######`order`
-
-Sets the order of processing Allow and Deny statements as per [Apache core documentation](httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          order => 'Allow,Deny', 
-        },
-      ],
-    }
-```
-
-######`sethandler`
-
-Sets a `SetHandler` directive as per the [Apache Core documentation](http://httpd.apache.org/docs/2.2/mod/core.html#sethandler). An example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path       => '/path/to/directory', 
-          sethandler => 'None', 
-        }
-      ],
-    }
-```
-
-######`passenger_enabled`
-
-Sets the value for the [PassengerEnabled](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled) directory to 'on' or 'off'. Requires `apache::mod::passenger` to be included.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path              => '/path/to/directory', 
-          passenger_enabled => 'on',
-        }, 
-      ],
-    }
-```
-
-*Note:* Be aware that there is an [issue](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) using the PassengerEnabled directive with the PassengerHighPerformance directive.
-
-######`php_admin_value` and `php_admin_flag`
-
-`php_admin_value` sets the value of the directory, and `php_admin_flag` uses a boolean to configure the directory. Further information can be found [here](http://php.net/manual/en/configuration.changes.php).
-
-######`ssl_options`
-
-String or list of [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions), which configure SSL engine run-time options. This handler takes precedence over SSLOptions set in the parent block of the vhost.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path        => '/path/to/directory', 
-          ssl_options => '+ExportCertData', 
-        },
-        { path        => '/path/to/different/dir', 
-          ssl_options => [ '-StdEnvVars', '+ExportCertData'],
-        },
-      ],
-    }
-```
-
-######`suphp`
-
-A hash containing the 'user' and 'group' keys for the [suPHP_UserGroup](http://www.suphp.org/DocumentationView.html?file=apache/CONFIG) setting. It must be used with `suphp_engine => on` in the vhost declaration, and may only be passed within `directories`.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path  => '/path/to/directory', 
-          suphp => 
-            { user  =>  'myappuser', 
-              group => 'myappgroup', 
-            },
-        },
-      ],
-    }
-```
-
-####SSL parameters for `apache::vhost`
-
-All of the SSL parameters for `::vhost` will default to whatever is set in the base `apache` class. Use the below parameters to tweak individual SSL settings for specific vhosts.
-
-#####`ssl`
-
-Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'. Defaults to 'false'. 
-
-#####`ssl_ca`
-
-Specifies the SSL certificate authority. Defaults to 'undef'.
-
-#####`ssl_cert`
-
-Specifies the SSL certification. Defaults are based on your OS: '/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD.
-
-#####`ssl_protocol`
-
-Specifies [SSLProtocol](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol). Defaults to 'undef'. 
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'all -SSLv2'.
-
-#####`ssl_cipher`
-
-Specifies [SSLCipherSuite](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite). Defaults to 'undef'.
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'HIGH:MEDIUM:!aNULL:!MD5'.
-
-#####`ssl_honorcipherorder`
-
-Sets [SSLHonorCipherOrder](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder), which is used to prefer the server's cipher preference order. Defaults to 'On' in the base `apache` config.
-
-#####`ssl_certs_dir`
-
-Specifies the location of the SSL certification directory. Defaults to '/etc/ssl/certs' on Debian, '/etc/pki/tls/certs' on RedHat, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`ssl_chain`
-
-Specifies the SSL chain. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl`
-
-Specifies the certificate revocation list to use. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl_path`
-
-Specifies the location of the certificate revocation list. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_key`
-
-Specifies the SSL key. Defaults are based on your operating system: '/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_verify_client`
-
-Sets the [SSLVerifyClient](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient) directive, which sets the certificate verification level for client authentication. Valid values are: 'none', 'optional', 'require', and 'optional_no_ca'. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_client => 'optional',
-    }
-```
-
-#####`ssl_verify_depth`
-
-Sets the [SSLVerifyDepth](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth) directive, which specifies the maximum depth of CA certificates in client certificate verification. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_depth => 1,
-    }
-```
-
-#####`ssl_options`
-
-Sets the [SSLOptions](http://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions) directive, which configures various SSL engine run-time options. This is the global setting for the given vhost and can be a string or an array. Defaults to 'undef'. 
-
-A string:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => '+ExportCertData',
-    }
-```
-
-An array:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => [ '+StrictRequire', '+ExportCertData' ],
-    }
-```
-
-#####`ssl_proxyengine`
-
-Specifies whether or not to use [SSLProxyEngine](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine). Valid values are 'true' and 'false'. Defaults to 'false'.
-
-
-###Virtual Host Examples
-
-The apache module allows you to set up pretty much any configuration of virtual host you might need. This section will address some common configurations, but look at the [Tests section](https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests) for even more examples.
-
-Configure a vhost with a server administrator
-
-```puppet
-    apache::vhost { 'third.example.com':
-      port        => '80',
-      docroot     => '/var/www/third',
-      serveradmin => 'admin@example.com',
-    }
-```
-
-- - -
-
-Set up a vhost with aliased servers
-
-```puppet
-    apache::vhost { 'sixth.example.com':
-      serveraliases => [
-        'sixth.example.org',
-        'sixth.example.net',
-      ],
-      port          => '80',
-      docroot       => '/var/www/fifth',
-    }
-```
-
-- - -
-
-Configure a vhost with a cgi-bin
-
-```puppet
-    apache::vhost { 'eleventh.example.com':
-      port        => '80',
-      docroot     => '/var/www/eleventh',
-      scriptalias => '/usr/lib/cgi-bin',
-    }
-```
-
-- - -
-
-Set up a vhost with a rack configuration
-
-```puppet
-    apache::vhost { 'fifteenth.example.com':
-      port           => '80',
-      docroot        => '/var/www/fifteenth',
-      rack_base_uris => ['/rackapp1', '/rackapp2'],
-    }
-```
-
-- - -
-
-Set up a mix of SSL and non-SSL vhosts at the same domain
-
-```puppet
-    #The non-ssl vhost
-    apache::vhost { 'first.example.com non-ssl':
-      servername => 'first.example.com',
-      port       => '80',
-      docroot    => '/var/www/first',
-    }
-
-    #The SSL vhost at the same domain
-    apache::vhost { 'first.example.com ssl':
-      servername => 'first.example.com',
-      port       => '443',
-      docroot    => '/var/www/first',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Configure a vhost to redirect non-SSL connections to SSL
-
-```puppet
-    apache::vhost { 'sixteenth.example.com non-ssl':
-      servername      => 'sixteenth.example.com',
-      port            => '80',
-      docroot         => '/var/www/sixteenth',
-      redirect_status => 'permanent',
-      redirect_dest   => 'https://sixteenth.example.com/'
-    }
-    apache::vhost { 'sixteenth.example.com ssl':
-      servername => 'sixteenth.example.com',
-      port       => '443',
-      docroot    => '/var/www/sixteenth',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.
-
-```puppet
-    apache::listen { '80': }
-    apache::listen { '81': }
-```
-
-Then we will set up the IP-based vhosts
-
-```puppet
-    apache::vhost { 'first.example.com':
-      ip       => '10.0.0.10',
-      docroot  => '/var/www/first',
-      ip_based => true,
-    }
-    apache::vhost { 'second.example.com':
-      ip       => '10.0.0.11',
-      docroot  => '/var/www/second',
-      ip_based => true,
-    }
-```
-
-- - -
-
-Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL
-
-```puppet
-    apache::vhost { 'The first IP-based vhost, non-ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '80',
-      ip_based   => true,
-      docroot    => '/var/www/first',
-    }
-    apache::vhost { 'The first IP-based vhost, ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '443',
-      ip_based   => true,
-      docroot    => '/var/www/first-ssl',
-      ssl        => true,
-    }
-```
-
-Then, we will add two name-based vhosts listening on 10.0.0.20
-
-```puppet
-    apache::vhost { 'second.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/second',
-    }
-    apache::vhost { 'third.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/third',
-    }
-```
-
-If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you **MUST** declare `add_listen => 'false'` to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fourth',
-      add_listen => false,
-    }
-    apache::vhost { 'fifth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fifth',
-      add_listen => false,
-    }
-```
-
-###Load Balancing
-
-####Defined Type: `apache::balancer`
-
-`apache::balancer` creates an Apache balancer cluster. Each balancer cluster needs one or more balancer members, which are declared with [`apache::balancermember`](#defined-type-apachebalancermember). 
-
-One `apache::balancer` defined resource should be defined for each Apache load balanced set of servers. The `apache::balancermember` resources for all balancer members can be exported and collected on a single Apache load balancer server using exported resources.
-
-**Parameters within `apache::balancer`:**
-
-#####`name`
-
-Sets the balancer cluster's title. This parameter will also set the title of the conf.d file.
-
-#####`proxy_set`
-
-Configures key-value pairs as [ProxySet](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset) lines. Accepts a hash, and defaults to '{}'.
-
-#####`collect_exported`
-
-Determines whether or not to use exported resources. Valid values 'true' and 'false', defaults to 'true'. 
-
-If you statically declare all of your backend servers, you should set this to 'false' to rely on existing declared balancer member resources. Also make sure to use `apache::balancermember` with array arguments.
-
-If you wish to dynamically declare your backend servers via [exported resources](http://docs.puppetlabs.com/guides/exported_resources.html) collected on a central node, you must set this parameter to 'true' in order to collect the exported balancer member resources that were exported by the balancer member nodes.
-
-If you choose not to use exported resources, all balancer members will be configured in a single puppet run. If you are using exported resources, Puppet has to run on the balanced nodes, then run on the balancer.
-
-####Defined Type: `apache::balancermember`
-
-Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html), which will set up a balancer member inside a listening service configuration block in etc/apache/apache.cfg on the load balancer.
-
-**Parameters within `apache::balancermember`:**
-
-#####`name`
-
-Sets the title of the resource. This name will also set the name of the concat fragment.
-
-#####`balancer_cluster`
-
-Sets the Apache service's instance name. This must match the name of a declared `apache::balancer` resource. Required.
-
-#####`url`
-
-Specifies the URL used to contact the balancer member server. Defaults to 'http://${::fqdn}/'.
-
-#####`options`
-
-An array of [options](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember) to be specified after the URL. Accepts any key-value pairs available to [ProxyPass](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass).
-
-####Examples
-
-To load balance with exported resources, export the `balancermember` from the balancer member
-
-```puppet
-      @@apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then, on the proxy server, create the balancer cluster
-
-```puppet
-      apache::balancer { 'puppet00': }
-```
-
-To load balance without exported resources, declare the following on the proxy
-
-```puppet
-    apache::balancer { 'puppet00': }
-    apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then declare `apache::balancer` and `apache::balancermember` on the proxy server.
-
-If you need to use ProxySet in the balancer config
-
-```puppet
-      apache::balancer { 'puppet01':
-        proxy_set => {'stickysession' => 'JSESSIONID'},
-      }
-```
-
-##Reference
-
-###Classes
-
-####Public Classes
-
-* [`apache`](#class-apache): Guides the basic setup of Apache.
-* `apache::dev`: Installs Apache development libraries. (*Note:* On FreeBSD, you must declare `apache::package` or `apache` before `apache::dev`.)
-* [`apache::mod::[name]`](#classes-apachemodname): Enables specific Apache HTTPD modules.
- 
-####Private Classes
-
-* `apache::confd::no_accf`: Creates the no-accf.conf configuration file in conf.d, required by FreeBSD's Apache 2.4.
-* `apache::default_confd_files`: Includes conf.d files for FreeBSD.
-* `apache::default_mods`: Installs the Apache modules required to run the default configuration.
-* `apache::package`: Installs and configures basic Apache packages.
-* `apache::params`: Manages Apache parameters.
-* `apache::service`: Manages the Apache daemon.
-
-###Defined Types
-
-####Public Defined Types
-
-* `apache::balancer`: Creates an Apache balancer cluster.
-* `apache::balancermember`: Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html).
-* `apache::listen`: Based on the title, controls which ports Apache binds to for listening. Adds [Listen](http://httpd.apache.org/docs/current/bind.html) directives to ports.conf in the Apache HTTPD configuration directory. Titles take the form '<port>', '<ipv4>:<port>', or '<ipv6>:<port>'.
-* `apache::mod`: Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class.
-* `apache::namevirtualhost`: Enables name-based hosting of a virtual host. Adds all [NameVirtualHost](http://httpd.apache.org/docs/current/vhosts/name-based.html) directives to the `ports.conf` file in the Apache HTTPD configuration directory. Titles take the form '\*', '*:<port>', '\_default_:<port>, '<ip>', or '<ip>:<port>'.
-* `apache::vhost`: Allows specialized configurations for virtual hosts that have requirements outside the defaults. 
-
-####Private Defined Types
-
-* `apache::peruser::multiplexer`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-* `apache::peruser::processor`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-
-###Templates
-
-The Apache module relies heavily on templates to enable the `vhost` and `apache::mod` defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.
-
-##Limitations
-
-###Ubuntu 10.04
-
-The `apache::vhost::WSGIImportScript` parameter creates a statement inside the VirtualHost which is unsupported on older versions of Apache, causing this to fail.  This will be remedied in a future refactoring.
-
-###RHEL/CentOS 5
-
-The `apache::mod::passenger` and `apache::mod::proxy_html` classes are untested since repositories are missing compatible packages.   
-
-###RHEL/CentOS 7
-
-The `apache::mod::passenger` class is untested as the repository does not have packages for EL7 yet.  The fact that passenger packages aren't available also makes us unable to test the `rack_base_uri` parameter in `apache::vhost`.
-
-###General
-
-This module is CI tested on Centos 5 & 6, Ubuntu 12.04 & 14.04, Debian 7, and RHEL 5, 6 & 7 platforms against both the OSS and Enterprise version of Puppet. 
-
-The module contains support for other distributions and operating systems, such as FreeBSD and Amazon Linux, but is not formally tested on those and regressions may occur.
-
-###SELinux and Custom Paths
-
-If you are running with SELinux in enforcing mode and want to use custom paths for your `logroot`, `mod_dir`, `vhost_dir`, and `docroot`, you will need to manage the context for the files yourself.
-
-Something along the lines of:
-
-```puppet
-        exec { 'set_apache_defaults':
-          command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          require => Package['policycoreutils-python'],
-        }
-        package { 'policycoreutils-python': ensure => installed }
-        exec { 'restorecon_apache':
-          command => 'restorecon -Rv /apache_spec',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          before  => Service['httpd'],
-          require => Class['apache'],
-        }
-        class { 'apache': }
-        host { 'test.server': ip => '127.0.0.1' }
-        file { '/custom/path': ensure => directory, }
-        file { '/custom/path/include': ensure => present, content => '#additional_includes' }
-        apache::vhost { 'test.server':
-          docroot             => '/custom/path',
-          additional_includes => '/custom/path/include',
-        }
-```
-
-You need to set the contexts using `semanage fcontext` not `chcon` because `file {...}` resources will reset the context to the values in the database if the resource isn't specifying the context.
-
-##Development
-
-###Contributing
-
-Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
-
-We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
-
-You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
-
-###Running tests
-
-This project contains tests for both [rspec-puppet](http://rspec-puppet.com/) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) to verify functionality. For in-depth information please see their respective documentation.
-
-Quickstart:
-
-    gem install bundler
-    bundle install
-    bundle exec rake spec
-    bundle exec rspec spec/acceptance
-    RS_DEBUG=yes bundle exec rspec spec/acceptance

+ 0 - 278
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/README.passenger.md

@@ -1,278 +0,0 @@
-# Passenger
-
-Just enabling the Passenger module is insufficient for the use of Passenger in
-production. Passenger should be tunable to better fit the environment in which
-it is run while being aware of the resources it required.
-
-To this end the Apache passenger module has been modified to apply system wide
-Passenger tuning declarations to `passenger.conf`. Declarations specific to a
-virtual host should be passed through when defining a `vhost` (e.g.
-`rack_base_uris` parameter on the `apache::vhost` type, check `README.md`).
-
-Also, general apache module loading parameters can be supplied to enable using
-a customized passenger module in place of a default-package-based version of
-the module.
-
-# Operating system support and Passenger versions
-
-The most important configuration directive for the Apache Passenger module is
-`PassengerRoot`. Its value depends on the Passenger version used (2.x, 3.x or
-4.x) and on the operating system package from which the Apache Passenger module
-is installed.
-
-The following table summarises the current *default versions* and
-`PassengerRoot` settings for the operating systems supported by
-puppetlabs-apache:
-
-OS               | Passenger version  | `PassengerRoot` 
----------------- | ------------------ | ----------------
-Debian 7         | 3.0.13             | /usr
-Ubuntu 12.04     | 2.2.11             | /usr
-Ubuntu 14.04     | 4.0.37             | /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini 
-RHEL with EPEL6  | 3.0.21             | /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21 
-
-As mentioned in `README.md` there are no compatible packages available for
-RHEL/CentOS 5 or RHEL/CentOS 7.
-
-## Configuration files and locations on RHEL/CentOS
-
-Notice two important points:
-
-1. The Passenger version packaged in the EPEL repositories may change over time.
-2. The value of `PassengerRoot` depends on the Passenger version installed.
-
-To prevent the puppetlabs-apache module from having to keep up with these
-package versions the Passenger configuration files installed by the
-packages are left untouched by this module. All configuration is placed in an
-extra configuration file managed by puppetlabs-apache.
-
-This means '/etc/httpd/conf.d/passenger.conf' is installed by the
-`mod_passenger` package and contains correct values for `PassengerRoot` and
-`PassengerRuby`. Puppet will ignore this file. Additional configuration
-directives as described in the remainder of this document are placed in
-'/etc/httpd/conf.d/passenger_extra.conf', managed by Puppet.
-
-This pertains *only* to RHEL/CentOS, *not* Debian and Ubuntu.
-
-## Third-party and custom Passenger packages and versions
-
-The Passenger version distributed by the default OS packages may be too old to
-be useful. Newer versions may be installed via Gems, from source or from
-third-party OS packages.
-
-Most notably the Passenger developers officially provide Debian packages for a
-variety of Debian and Ubuntu releases in the [Passenger APT
-repository](https://oss-binaries.phusionpassenger.com/apt/passenger). Read more
-about [installing these packages in the offical user
-guide](http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu).
-
-If you install custom Passenger packages and newer version make sure to set the
-directives `PassengerRoot`, `PassengerRuby` and/or `PassengerDefaultRuby`
-correctly, or Passenger and Apache will fail to function properly.
-
-For Passenger 4.x packages on Debian and Ubuntu the `PassengerRoot` directive
-should almost universally be set to
-`/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini`.
-
-# Parameters for `apache::mod::passenger`
-
-The following class parameters configure Passenger in a global, server-wide
-context.
-
-Example:
-
-```puppet
-class { 'apache::mod::passenger':
-  passenger_root             => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini',
-  passenger_default_ruby     => '/usr/bin/ruby1.9.3',
-  passenger_high_performance => 'on',
-  rails_autodetect           => 'off',
-  mod_lib_path               => '/usr/lib/apache2/custom_modules',
-}
-```
-
-The general form is using the all lower-case version of the configuration
-directive, with underscores instead of CamelCase.
-
-## Parameters used with passenger.conf
-
-If you pass a default value to `apache::mod::passenger` it will be ignored and
-not passed through to the configuration file. 
-
-### passenger_root
-
-The location to the Phusion Passenger root directory. This configuration option
-is essential to Phusion Passenger, and allows Phusion Passenger to locate its
-own data files. 
-
-The default depends on the Passenger version and the means of installation. See
-the above section on operating system support, versions and packages for more
-information.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerroot_lt_directory_gt
-
-### passenger_default_ruby
-
-This option specifies the default Ruby interpreter to use for web apps as well
-as for all sorts of internal Phusion Passenger helper scripts, e.g. the one
-used by PassengerPreStart.
-
-This directive was introduced in Passenger 4.0.0 and will not work in versions
-< 4.x. Do not set this parameter if your Passenger version is older than 4.0.0.
-
-Defaults to `undef` for all operating systems except Ubuntu 14.04, where it is
-set to '/usr/bin/ruby'.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultRuby
-
-### passenger_ruby
-
-This directive is the same as `passenger_default_ruby` for Passenger versions
-< 4.x and must be used instead of `passenger_default_ruby` for such versions.
-
-It makes no sense to set `PassengerRuby` for Passenger >= 4.x. That
-directive should only be used to override the value of `PassengerDefaultRuby`
-on a non-global context, i.e. in `<VirtualHost>`, `<Directory>`, `<Location>`
-and so on.
-
-Defaults to `/usr/bin/ruby` for all supported operating systems except Ubuntu
-14.04, where it is set to `undef`.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby
-
-### passenger_high_performance
-
-Default is `off`. When turned `on` Passenger runs in a higher performance mode
-that can be less compatible with other Apache modules.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerHighPerformance
-
-### passenger_max_pool_size
-
-Sets the maximum number of Passenger application processes that may
-simultaneously run. The default value is 6.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt
-
-### passenger_pool_idle_time
-
-The maximum number of seconds a Passenger Application process will be allowed
-to remain idle before being shut down. The default value is 300.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime
-
-### passenger_max_requests
-
-The maximum number of request a Passenger application will process before being
-restarted. The default value is 0, which indicates that a process will only
-shut down if the Pool Idle Time (see above) expires.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMaxRequests
-
-### passenger_stat_throttle_rate
-
-Sets how often Passenger performs file system checks, at most once every _x_
-seconds. Default is 0, which means the checks are performed with every request.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt
-
-### rack_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rack application. Not set by default (`undef`). Note that this directive has
-been removed in Passenger 4.0.0 and `PassengerEnabled` should be used instead.
-Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_rackautodetect_lt_on_off_gt
-
-### rails_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rails application.  Not set by default (`undef`). Note that this directive
-has been removed in Passenger 4.0.0 and `PassengerEnabled` should be used
-instead. Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsautodetect_lt_on_off_gt
-
-### passenger_use_global_queue
-
-Allows toggling of PassengerUseGlobalQueue.  NOTE: PassengerUseGlobalQueue is
-the default in Passenger 4.x and the versions >= 4.x have disabled this
-configuration option altogether.  Use with caution.
-
-## Parameters used to load the module
-
-Unlike the tuning parameters specified above, the following parameters are only
-used when loading customized passenger modules.
-
-### mod_package
-
-Allows overriding the default package name used for the passenger module
-package.
-
-### mod_package_ensure
-
-Allows overriding the package installation setting used by puppet when
-installing the passenger module. The default is 'present'.
-
-### mod_id
-
-Allows overriding the value used by apache to identify the passenger module.
-The default is 'passenger_module'.
-
-### mod_lib_path
-
-Allows overriding the directory path used by apache when loading the passenger
-module. The default is the value of `$apache::params::lib_path`.
-
-### mod_lib
-
-Allows overriding the library file name used by apache when loading the
-passenger module. The default is 'mod_passenger.so'.
-
-### mod_path
-
-Allows overriding the full path to the library file used by apache when loading
-the passenger module. The default is the concatenation of the `mod_lib_path`
-and `mod_lib` parameters.
-
-# Dependencies
-
-RedHat-based systems will need to configure additional package repositories in
-order to install Passenger, specifically:
-
-* [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL)
-* [Phusion Passenger](http://passenger.stealthymonkeys.com)
-
-Configuration of these repositories is beyond the scope of this module and is
-left to the user.
-
-# Attribution
-
-The Passenger tuning parameters for the `apache::mod::passenger` Puppet class
-was modified by Aaron Hicks (hicksa@landcareresearch.co.nz) for work on the
-NeSI Project and the Tuakiri New Zealand Access Federation as a fork from the
-PuppetLabs Apache module on GitHub.
-
-* https://github.com/puppetlabs/puppetlabs-apache
-* https://github.com/nesi/puppetlabs-apache
-* http://www.nesi.org.nz//
-* https://tuakiri.ac.nz/confluence/display/Tuakiri/Home
-
-# Copyright and License
-
-Copyright (C) 2012 [Puppet Labs](https://www.puppetlabs.com/) Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 10
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/Rakefile

@@ -1,10 +0,0 @@
-require 'puppetlabs_spec_helper/rake_tasks'
-require 'puppet-lint/tasks/puppet-lint'
-
-PuppetLint.configuration.fail_on_warnings
-PuppetLint.configuration.send('disable_80chars')
-PuppetLint.configuration.send('disable_class_inherits_from_params_class')
-PuppetLint.configuration.send('disable_class_parameter_defaults')
-PuppetLint.configuration.send('disable_documentation')
-PuppetLint.configuration.send('disable_single_quote_string_with_variables')
-PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

+ 0 - 24
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/files/httpd

@@ -1,24 +0,0 @@
-# Configuration file for the httpd service.
-
-#
-# The default processing model (MPM) is the process-based
-# 'prefork' model.  A thread-based model, 'worker', is also
-# available, but does not work with some modules (such as PHP).
-# The service must be stopped before changing this variable.
-#
-#HTTPD=/usr/sbin/httpd.worker
-
-#
-# To pass additional options (for instance, -D definitions) to the
-# httpd binary at startup, set OPTIONS here.
-#
-#OPTIONS=
-#OPTIONS=-DDOWN
-
-#
-# By default, the httpd process is started in the C locale; to 
-# change the locale in which the server runs, the HTTPD_LANG
-# variable can be set.
-#
-#HTTPD_LANG=C
-export SHORTHOST=`hostname -s`

+ 0 - 34
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb

@@ -1,34 +0,0 @@
-class Puppet::Provider::A2mod < Puppet::Provider
-  def self.prefetch(mods)
-    instances.each do |prov|
-      if mod = mods[prov.name]
-        mod.provider = prov
-      end
-    end
-  end
-
-  def flush
-    @property_hash.clear
-  end
-
-  def properties
-    if @property_hash.empty?
-      @property_hash = query || {:ensure => :absent}
-      @property_hash[:ensure] = :absent if @property_hash.empty?
-    end
-    @property_hash.dup
-  end
-
-  def query
-    self.class.instances.each do |mod|
-      if mod.name == self.name or mod.name.downcase == self.name
-        return mod.properties
-      end
-    end
-    nil
-  end
-
-  def exists?
-    properties[:ensure] != :absent
-  end
-end

+ 0 - 35
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb

@@ -1,35 +0,0 @@
-require 'puppet/provider/a2mod'
-
-Puppet::Type.type(:a2mod).provide(:a2mod, :parent => Puppet::Provider::A2mod) do
-    desc "Manage Apache 2 modules on Debian and Ubuntu"
-
-    optional_commands :encmd => "a2enmod"
-    optional_commands :discmd => "a2dismod"
-    commands :apache2ctl => "apache2ctl"
-
-    confine :osfamily => :debian
-    defaultfor :operatingsystem => [:debian, :ubuntu]
-
-    def self.instances
-      modules = apache2ctl("-M").lines.collect { |line|
-        m = line.match(/(\w+)_module \(shared\)$/)
-        m[1] if m
-      }.compact
-
-      modules.map do |mod|
-        new(
-          :name     => mod,
-          :ensure   => :present,
-          :provider => :a2mod
-        )
-      end
-    end
-
-    def create
-        encmd resource[:name]
-    end
-
-    def destroy
-        discmd resource[:name]
-    end
-end

+ 0 - 116
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb

@@ -1,116 +0,0 @@
-require 'puppet/util/filetype'
-Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
-  desc "Manage Apache 2 modules on Gentoo"
-
-  confine :operatingsystem => :gentoo
-  defaultfor :operatingsystem => :gentoo
-
-  attr_accessor :property_hash
-
-  def create
-    @property_hash[:ensure] = :present
-  end
-
-  def exists?
-    (!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
-  end
-
-  def destroy
-    @property_hash[:ensure] = :absent
-  end
-
-  def flush
-    self.class.flush
-  end
-
-  class << self
-    attr_reader :conf_file
-  end
-
-  def self.clear
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  def self.initvars
-    @conf_file     = "/etc/conf.d/apache2"
-    @filetype      = Puppet::Util::FileType.filetype(:flat).new(conf_file)
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  self.initvars
-
-  # Retrieve an array of all existing modules
-  def self.modules
-    if @modules.length <= 0
-      # Locate the APACHE_OPTS variable
-      records = filetype.read.split(/\n/)
-      apache2_opts = records.grep(/^\s*APACHE2_OPTS=/).first
-
-      # Extract all defines
-      while apache2_opts.sub!(/-D\s+(\w+)/, '')
-        @modules << $1.downcase
-      end
-
-      # Hang on to any remaining options.
-      if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
-        @other_args = $1.strip
-      end
-
-      @modules.sort!.uniq!
-    end
-
-    @modules
-  end
-
-  def self.prefetch(resources={})
-    # Match resources with existing providers
-    instances.each do |provider|
-      if resource = resources[provider.name]
-        resource.provider = provider
-      end
-    end
-
-    # Store all resources using this provider for flushing
-    resources.each do |name, resource|
-      @mod_resources << resource
-    end
-  end
-
-  def self.instances
-    modules.map {|mod| new(:name => mod, :provider => :gentoo, :ensure => :present)}
-  end
-
-  def self.flush
-
-    mod_list       = modules
-    mods_to_remove = @mod_resources.select {|mod| mod.should(:ensure) == :absent}.map {|mod| mod[:name]}
-    mods_to_add    = @mod_resources.select {|mod| mod.should(:ensure) == :present}.map {|mod| mod[:name]}
-
-    mod_list -= mods_to_remove
-    mod_list += mods_to_add
-    mod_list.sort!.uniq!
-
-    if modules != mod_list
-      opts = @other_args + " "
-      opts << mod_list.map {|mod| "-D #{mod.upcase}"}.join(" ")
-      opts.strip!
-      opts.gsub!(/\s+/, ' ')
-
-      apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
-      Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
-
-      records = filetype.read.split(/\n/)
-
-      opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
-      records[opts_index] = apache2_opts
-
-      filetype.backup
-      filetype.write(records.join("\n"))
-      @modules = mod_list
-    end
-  end
-end

+ 0 - 12
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb

@@ -1,12 +0,0 @@
-Puppet::Type.type(:a2mod).provide :modfix do
-    desc "Dummy provider for A2mod.
-
-    Fake nil resources when there is no crontab binary available. Allows
-    puppetd to run on a bootstrapped machine before a Cron package has been
-    installed. Workaround for: http://projects.puppetlabs.com/issues/2384
-    "
-
-    def self.instances
-        []
-    end
-end

+ 0 - 60
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb

@@ -1,60 +0,0 @@
-require 'puppet/provider/a2mod'
-
-Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
-  desc "Manage Apache 2 modules on RedHat family OSs"
-
-  commands :apachectl => "apachectl"
-
-  confine :osfamily => :redhat
-  defaultfor :osfamily => :redhat
-
-  require 'pathname'
-
-  # modpath: Path to default apache modules directory /etc/httpd/mod.d
-  # modfile: Path to module load configuration file; Default: resides under modpath directory
-  # libfile: Path to actual apache module library. Added in modfile LoadModule
-
-  attr_accessor :modfile, :libfile
-  class << self
-    attr_accessor :modpath
-    def preinit
-      @modpath = "/etc/httpd/mod.d"
-    end
-  end
-
-  self.preinit
-
-  def create
-    File.open(modfile,'w') do |f|
-      f.puts "LoadModule #{resource[:identifier]} #{libfile}"
-    end
-  end
-
-  def destroy
-    File.delete(modfile)
-  end
-
-  def self.instances
-    modules = apachectl("-M").lines.collect { |line|
-      m = line.match(/(\w+)_module \(shared\)$/)
-      m[1] if m
-    }.compact
-
-    modules.map do |mod|
-      new(
-        :name     => mod,
-        :ensure   => :present,
-        :provider => :redhat
-      )
-    end
-  end
-
-  def modfile
-    modfile ||= "#{self.class.modpath}/#{resource[:name]}.load"
-  end
-
-  # Set libfile path: If absolute path is passed, then maintain it. Else, make it default from 'modules' dir.
-  def libfile
-    libfile = Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
-  end
-end

+ 0 - 30
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb

@@ -1,30 +0,0 @@
-Puppet::Type.newtype(:a2mod) do
-    @doc = "Manage Apache 2 modules"
-
-    ensurable
-
-    newparam(:name) do
-       Puppet.warning "The a2mod provider is deprecated, please use apache::mod instead"
-       desc "The name of the module to be managed"
-
-       isnamevar
-
-    end
-
-    newparam(:lib) do
-      desc "The name of the .so library to be loaded"
-
-      defaultto { "mod_#{@resource[:name]}.so" }
-    end
- 
-    newparam(:identifier) do
-      desc "Module identifier string used by LoadModule. Default: module-name_module"
-
-      # http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
-
-      defaultto { "#{resource[:name]}_module" }
-    end
-
-    autorequire(:package) { catalog.resource(:package, 'httpd')}
-
-end

+ 0 - 83
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancer.pp

@@ -1,83 +0,0 @@
-# == Define Resource Type: apache::balancer
-#
-# This type will create an apache balancer cluster file inside the conf.d
-# directory. Each balancer cluster needs one or more balancer members (that can
-# be declared with the apache::balancermember defined resource type). Using
-# storeconfigs, you can export the apache::balancermember resources on all
-# balancer members, and then collect them on a single apache load balancer
-# server.
-#
-# === Requirement/Dependencies:
-#
-# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
-# storeconfigs on the Puppet Master to export/collect resources from all
-# balancer members.
-#
-# === Parameters
-#
-# [*name*]
-# The namevar of the defined resource type is the balancer clusters name.
-# This name is also used in the name of the conf.d file
-#
-# [*proxy_set*]
-# Hash, default empty. If given, each key-value pair will be used as a ProxySet
-# line in the configuration.
-#
-# [*collect_exported*]
-# Boolean, default 'true'. True means 'collect exported @@balancermember
-# resources' (for the case when every balancermember node exports itself),
-# false means 'rely on the existing declared balancermember resources' (for the
-# case when you know the full set of balancermembers in advance and use
-# apache::balancermember with array arguments, which allows you to deploy
-# everything in 1 run)
-#
-#
-# === Examples
-#
-# Exporting the resource for a balancer member:
-#
-# apache::balancer { 'puppet00': }
-#
-define apache::balancer (
-  $proxy_set = {},
-  $collect_exported = true,
-) {
-  include concat::setup
-  include ::apache::mod::proxy_balancer
-
-  $target = "${::apache::params::confd_dir}/balancer_${name}.conf"
-
-  concat { $target:
-    owner  => '0',
-    group  => '0',
-    mode   => '0644',
-    notify => Service['httpd'],
-  }
-
-  concat::fragment { "00-${name}-header":
-    ensure  => present,
-    target  => $target,
-    order   => '01',
-    content => "<Proxy balancer://${name}>\n",
-  }
-
-  if $collect_exported {
-    Apache::Balancermember <<| balancer_cluster == $name |>>
-  }
-  # else: the resources have been created and they introduced their
-  # concat fragments. We don't have to do anything about them.
-
-  concat::fragment { "01-${name}-proxyset":
-    ensure  => present,
-    target  => $target,
-    order   => '19',
-    content => inline_template("<% proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= proxy_set[key] %>\n<% end %>"),
-  }
-
-  concat::fragment { "01-${name}-footer":
-    ensure  => present,
-    target  => $target,
-    order   => '20',
-    content => "</Proxy>\n",
-  }
-}

+ 0 - 53
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/balancermember.pp

@@ -1,53 +0,0 @@
-# == Define Resource Type: apache::balancermember
-#
-# This type will setup a balancer member inside a listening service
-# configuration block in /etc/apache/apache.cfg on the load balancer.
-# currently it only has the ability to specify the instance name, url and an
-# array of options. More features can be added as needed. The best way to
-# implement this is to export this resource for all apache balancer member
-# servers, and then collect them on the main apache load balancer.
-#
-# === Requirement/Dependencies:
-#
-# Currently requires the puppetlabs/concat module on the Puppet Forge and
-# uses storeconfigs on the Puppet Master to export/collect resources
-# from all balancer members.
-#
-# === Parameters
-#
-# [*name*]
-# The title of the resource is arbitrary and only utilized in the concat
-# fragment name.
-#
-# [*balancer_cluster*]
-# The apache service's instance name (or, the title of the apache::balancer
-# resource). This must match up with a declared apache::balancer resource.
-#
-# [*url*]
-# The url used to contact the balancer member server.
-#
-# [*options*]
-# An array of options to be specified after the url.
-#
-# === Examples
-#
-# Exporting the resource for a balancer member:
-#
-# @@apache::balancermember { 'apache':
-#   balancer_cluster => 'puppet00',
-#   url              => "ajp://${::fqdn}:8009"
-#   options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-# }
-#
-define apache::balancermember(
-  $balancer_cluster,
-  $url = "http://${::fqdn}/",
-  $options = [],
-) {
-
-  concat::fragment { "BalancerMember ${url}":
-    ensure  => present,
-    target  => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
-    content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
-  }
-}

+ 0 - 10
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp

@@ -1,10 +0,0 @@
-class apache::confd::no_accf {
-  # Template uses no variables
-  file { 'no-accf.conf':
-    ensure  => 'file',
-    path    => "${::apache::confd_dir}/no-accf.conf",
-    content => template('apache/confd/no-accf.conf.erb'),
-    require => Exec["mkdir ${::apache::confd_dir}"],
-    before  => File[$::apache::confd_dir],
-  }
-}

+ 0 - 15
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_confd_files.pp

@@ -1,15 +0,0 @@
-class apache::default_confd_files (
-  $all = true,
-) {
-  # The rest of the conf.d/* files only get loaded if we want them
-  if $all {
-    case $::osfamily {
-      'freebsd': {
-        include ::apache::confd::no_accf
-      }
-      default: {
-        # do nothing
-      }
-    }
-  }
-}

+ 0 - 158
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods.pp

@@ -1,158 +0,0 @@
-class apache::default_mods (
-  $all            = true,
-  $mods           = undef,
-  $apache_version = $::apache::apache_version
-) {
-  # These are modules required to run the default configuration.
-  # They are not configurable at this time, so we just include
-  # them to make sure it works.
-  case $::osfamily {
-    'redhat', 'freebsd': {
-      ::apache::mod { 'log_config': }
-      if versioncmp($apache_version, '2.4') >= 0 {
-        # Lets fork it
-        ::apache::mod { 'systemd': }
-        ::apache::mod { 'unixd': }
-      }
-    }
-    default: {}
-  }
-  ::apache::mod { 'authz_host': }
-
-  # The rest of the modules only get loaded if we want all modules enabled
-  if $all {
-    case $::osfamily {
-      'debian': {
-        include ::apache::mod::reqtimeout
-      }
-      'redhat': {
-        include ::apache::mod::actions
-        include ::apache::mod::cache
-        include ::apache::mod::mime
-        include ::apache::mod::mime_magic
-        include ::apache::mod::vhost_alias
-        include ::apache::mod::suexec
-        include ::apache::mod::rewrite
-        include ::apache::mod::speling
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'ext_filter': }
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'substitute': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-
-        if versioncmp($apache_version, '2.4') >= 0 {
-          ::apache::mod { 'authn_core': }
-        }
-        else {
-          ::apache::mod { 'authn_alias': }
-          ::apache::mod { 'authn_default': }
-        }
-      }
-      'freebsd': {
-        include ::apache::mod::actions
-        include ::apache::mod::cache
-        include ::apache::mod::disk_cache
-        include ::apache::mod::headers
-        include ::apache::mod::info
-        include ::apache::mod::mime_magic
-        include ::apache::mod::reqtimeout
-        include ::apache::mod::rewrite
-        include ::apache::mod::userdir
-        include ::apache::mod::vhost_alias
-        include ::apache::mod::speling
-
-        ::apache::mod { 'asis': }
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_alias': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authn_default': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'cern_meta': }
-        ::apache::mod { 'charset_lite': }
-        ::apache::mod { 'dumpio': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'file_cache': }
-        ::apache::mod { 'filter':}
-        ::apache::mod { 'imagemap':}
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'unique_id': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-      }
-      default: {}
-    }
-    case $::apache::mpm_module {
-      'prefork': {
-        include ::apache::mod::cgi
-      }
-      'worker': {
-        include ::apache::mod::cgid
-      }
-      default: {
-        # do nothing
-      }
-    }
-    include ::apache::mod::alias
-    include ::apache::mod::autoindex
-    include ::apache::mod::dav
-    include ::apache::mod::dav_fs
-    include ::apache::mod::deflate
-    include ::apache::mod::dir
-    include ::apache::mod::mime
-    include ::apache::mod::negotiation
-    include ::apache::mod::setenvif
-    ::apache::mod { 'auth_basic': }
-    ::apache::mod { 'authn_file': }
-
-      if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-
-      # lots of stuff seems to break without access_compat
-      ::apache::mod { 'access_compat': }
-    } else {
-      ::apache::mod { 'authz_default': }
-    }
-
-    ::apache::mod { 'authz_groupfile': }
-    ::apache::mod { 'authz_user': }
-    ::apache::mod { 'env': }
-  } elsif $mods {
-    ::apache::default_mods::load { $mods: }
-
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  } else {
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  }
-}

+ 0 - 8
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/default_mods/load.pp

@@ -1,8 +0,0 @@
-# private define
-define apache::default_mods::load ($module = $title) {
-  if defined("apache::mod::${module}") {
-    include "::apache::mod::${module}"
-  } else {
-    ::apache::mod { $module: }
-  }
-}

+ 0 - 11
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/dev.pp

@@ -1,11 +0,0 @@
-class apache::dev {
-  if $::osfamily == 'FreeBSD' and !defined(Class['apache::package']) {
-    fail('apache::dev requires apache::package; please include apache or apache::package class first')
-  }
-  include ::apache::params
-  $packages = $::apache::params::dev_packages
-  package { $packages:
-    ensure  => present,
-    require => Package['httpd'],
-  }
-}

+ 0 - 340
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/init.pp

@@ -1,340 +0,0 @@
-# Class: apache
-#
-# This class installs Apache
-#
-# Parameters:
-#
-# Actions:
-#   - Install Apache
-#   - Manage Apache service
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache (
-  $service_name         = $::apache::params::service_name,
-  $default_mods         = true,
-  $default_vhost        = true,
-  $default_confd_files  = true,
-  $default_ssl_vhost    = false,
-  $default_ssl_cert     = $::apache::params::default_ssl_cert,
-  $default_ssl_key      = $::apache::params::default_ssl_key,
-  $default_ssl_chain    = undef,
-  $default_ssl_ca       = undef,
-  $default_ssl_crl_path = undef,
-  $default_ssl_crl      = undef,
-  $ip                   = undef,
-  $service_enable       = true,
-  $service_ensure       = 'running',
-  $purge_configs        = true,
-  $purge_vdir           = false,
-  $serveradmin          = 'root@localhost',
-  $sendfile             = 'On',
-  $error_documents      = false,
-  $timeout              = '120',
-  $httpd_dir            = $::apache::params::httpd_dir,
-  $server_root          = $::apache::params::server_root,
-  $confd_dir            = $::apache::params::confd_dir,
-  $vhost_dir            = $::apache::params::vhost_dir,
-  $vhost_enable_dir     = $::apache::params::vhost_enable_dir,
-  $mod_dir              = $::apache::params::mod_dir,
-  $mod_enable_dir       = $::apache::params::mod_enable_dir,
-  $mpm_module           = $::apache::params::mpm_module,
-  $conf_template        = $::apache::params::conf_template,
-  $servername           = $::apache::params::servername,
-  $manage_user          = true,
-  $manage_group         = true,
-  $user                 = $::apache::params::user,
-  $group                = $::apache::params::group,
-  $keepalive            = $::apache::params::keepalive,
-  $keepalive_timeout    = $::apache::params::keepalive_timeout,
-  $max_keepalive_requests = $apache::params::max_keepalive_requests,
-  $logroot              = $::apache::params::logroot,
-  $log_level            = $::apache::params::log_level,
-  $log_formats          = {},
-  $ports_file           = $::apache::params::ports_file,
-  $apache_version       = $::apache::version::default,
-  $server_tokens        = 'OS',
-  $server_signature     = 'On',
-  $trace_enable         = 'On',
-  $package_ensure       = 'installed',
-) inherits ::apache::params {
-  validate_bool($default_vhost)
-  validate_bool($default_ssl_vhost)
-  validate_bool($default_confd_files)
-  # true/false is sufficient for both ensure and enable
-  validate_bool($service_enable)
-
-  $valid_mpms_re = $apache_version ? {
-    '2.4'   => '(event|itk|peruser|prefork|worker)',
-    default => '(event|itk|prefork|worker)'
-  }
-
-  if $mpm_module {
-    validate_re($mpm_module, $valid_mpms_re)
-  }
-
-  # NOTE: on FreeBSD it's mpm module's responsibility to install httpd package.
-  # NOTE: the same strategy may be introduced for other OSes. For this, you
-  # should delete the 'if' block below and modify all MPM modules' manifests
-  # such that they include apache::package class (currently event.pp, itk.pp,
-  # peruser.pp, prefork.pp, worker.pp).
-  if $::osfamily != 'FreeBSD' {
-    package { 'httpd':
-      ensure => $package_ensure,
-      name   => $::apache::params::apache_name,
-      notify => Class['Apache::Service'],
-    }
-  }
-  validate_re($sendfile, [ '^[oO]n$' , '^[oO]ff$' ])
-
-  # declare the web server user and group
-  # Note: requiring the package means the package ought to create them and not puppet
-  validate_bool($manage_user)
-  if $manage_user {
-    user { $user:
-      ensure  => present,
-      gid     => $group,
-      require => Package['httpd'],
-    }
-  }
-  validate_bool($manage_group)
-  if $manage_group {
-    group { $group:
-      ensure  => present,
-      require => Package['httpd']
-    }
-  }
-
-  $valid_log_level_re = '(emerg|alert|crit|error|warn|notice|info|debug)'
-
-  validate_re($log_level, $valid_log_level_re,
-  "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
-
-  class { '::apache::service':
-    service_name   => $service_name,
-    service_enable => $service_enable,
-    service_ensure => $service_ensure,
-  }
-
-  # Deprecated backwards-compatibility
-  if $purge_vdir {
-    warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
-    $purge_confd = $purge_vdir
-  } else {
-    $purge_confd = $purge_configs
-  }
-
-  Exec {
-    path => '/bin:/sbin:/usr/bin:/usr/sbin',
-  }
-
-  exec { "mkdir ${confd_dir}":
-    creates => $confd_dir,
-    require => Package['httpd'],
-  }
-  file { $confd_dir:
-    ensure  => directory,
-    recurse => true,
-    purge   => $purge_confd,
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-
-  if ! defined(File[$mod_dir]) {
-    exec { "mkdir ${mod_dir}":
-      creates => $mod_dir,
-      require => Package['httpd'],
-    }
-    # Don't purge available modules if an enable dir is used
-    $purge_mod_dir = $purge_configs and !$mod_enable_dir
-    file { $mod_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_mod_dir,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $mod_enable_dir and ! defined(File[$mod_enable_dir]) {
-    $mod_load_dir = $mod_enable_dir
-    exec { "mkdir ${mod_enable_dir}":
-      creates => $mod_enable_dir,
-      require => Package['httpd'],
-    }
-    file { $mod_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $mod_load_dir = $mod_dir
-  }
-
-  if ! defined(File[$vhost_dir]) {
-    exec { "mkdir ${vhost_dir}":
-      creates => $vhost_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
-    $vhost_load_dir = $vhost_enable_dir
-    exec { "mkdir ${vhost_load_dir}":
-      creates => $vhost_load_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $vhost_load_dir = $vhost_dir
-  }
-
-  concat { $ports_file:
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-  concat::fragment { 'Apache ports header':
-    ensure  => present,
-    target  => $ports_file,
-    content => template('apache/ports_header.erb')
-  }
-
-  if $::apache::params::conf_dir and $::apache::params::conf_file {
-    case $::osfamily {
-      'debian': {
-        $docroot              = '/var/www'
-        $pidfile              = '${APACHE_PID_FILE}'
-        $error_log            = 'error.log'
-        $error_documents_path = '/usr/share/apache2/error'
-        $scriptalias          = '/usr/lib/cgi-bin'
-        $access_log_file      = 'access.log'
-      }
-      'redhat': {
-        $docroot              = '/var/www/html'
-        $pidfile              = 'run/httpd.pid'
-        $error_log            = 'error_log'
-        $error_documents_path = '/var/www/error'
-        $scriptalias          = '/var/www/cgi-bin'
-        $access_log_file      = 'access_log'
-      }
-      'freebsd': {
-        $docroot              = '/usr/local/www/apache22/data'
-        $pidfile              = '/var/run/httpd.pid'
-        $error_log            = 'httpd-error.log'
-        $error_documents_path = '/usr/local/www/apache22/error'
-        $scriptalias          = '/usr/local/www/apache22/cgi-bin'
-        $access_log_file      = 'httpd-access.log'
-      }
-      default: {
-        fail("Unsupported osfamily ${::osfamily}")
-      }
-    }
-
-    $apxs_workaround = $::osfamily ? {
-      'freebsd' => true,
-      default   => false
-    }
-
-    # Template uses:
-    # - $pidfile
-    # - $user
-    # - $group
-    # - $logroot
-    # - $error_log
-    # - $sendfile
-    # - $mod_dir
-    # - $ports_file
-    # - $confd_dir
-    # - $vhost_dir
-    # - $error_documents
-    # - $error_documents_path
-    # - $apxs_workaround
-    # - $keepalive
-    # - $keepalive_timeout
-    # - $max_keepalive_requests
-    # - $server_root
-    # - $server_tokens
-    # - $server_signature
-    # - $trace_enable
-    file { "${::apache::params::conf_dir}/${::apache::params::conf_file}":
-      ensure  => file,
-      content => template($conf_template),
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-
-    # preserve back-wards compatibility to the times when default_mods was
-    # only a boolean value. Now it can be an array (too)
-    if is_array($default_mods) {
-      class { '::apache::default_mods':
-        all  => false,
-        mods => $default_mods,
-      }
-    } else {
-      class { '::apache::default_mods':
-        all => $default_mods,
-      }
-    }
-    class { '::apache::default_confd_files':
-      all => $default_confd_files
-    }
-    if $mpm_module {
-      class { "::apache::mod::${mpm_module}": }
-    }
-
-    $default_vhost_ensure = $default_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-    $default_ssl_vhost_ensure = $default_ssl_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-
-    ::apache::vhost { 'default':
-      ensure          => $default_vhost_ensure,
-      port            => 80,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => $access_log_file,
-      priority        => '15',
-      ip              => $ip,
-    }
-    $ssl_access_log_file = $::osfamily ? {
-      'freebsd' => $access_log_file,
-      default   => "ssl_${access_log_file}",
-    }
-    ::apache::vhost { 'default-ssl':
-      ensure          => $default_ssl_vhost_ensure,
-      port            => 443,
-      ssl             => true,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => $ssl_access_log_file,
-      priority        => '15',
-      ip              => $ip,
-    }
-  }
-}

+ 0 - 10
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/listen.pp

@@ -1,10 +0,0 @@
-define apache::listen {
-  $listen_addr_port = $name
-
-  # Template uses: $listen_addr_port
-  concat::fragment { "Listen ${listen_addr_port}":
-    ensure  => present,
-    target  => $::apache::ports_file,
-    content => template('apache/listen.erb'),
-  }
-}

+ 0 - 130
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod.pp

@@ -1,130 +0,0 @@
-define apache::mod (
-  $package        = undef,
-  $package_ensure = 'present',
-  $lib            = undef,
-  $lib_path       = $::apache::params::lib_path,
-  $id             = undef,
-  $path           = undef,
-  $loadfile_name  = undef,
-  $loadfiles      = undef,
-) {
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $mod = $name
-  #include apache #This creates duplicate resources in rspec-puppet
-  $mod_dir = $::apache::mod_dir
-
-  # Determine if we have special lib
-  $mod_libs = $::apache::params::mod_libs
-  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
-  if $lib {
-    $_lib = $lib
-  } elsif $mod_lib {
-    $_lib = $mod_lib
-  } else {
-    $_lib = "mod_${mod}.so"
-  }
-
-  # Determine if declaration specified a path to the module
-  if $path {
-    $_path = $path
-  } else {
-    $_path = "${lib_path}/${_lib}"
-  }
-
-  if $id {
-    $_id = $id
-  } else {
-    $_id = "${mod}_module"
-  }
-
-  if $loadfile_name {
-    $_loadfile_name = $loadfile_name
-  } else {
-    $_loadfile_name = "${mod}.load"
-  }
-
-  # Determine if we have a package
-  $mod_packages = $::apache::params::mod_packages
-  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
-  if $package {
-    $_package = $package
-  } elsif $mod_package {
-    $_package = $mod_package
-  } else {
-    $_package = undef
-  }
-  if $_package and ! defined(Package[$_package]) {
-    # note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
-    # httpd.conf with 'LoadModule' directives; here, by proper resource
-    # ordering, we ensure that our version of httpd.conf is reverted after
-    # the module gets installed.
-    $package_before = $::osfamily ? {
-      'freebsd' => [
-        File[$_loadfile_name],
-        File["${::apache::params::conf_dir}/${::apache::params::conf_file}"]
-      ],
-      default => File[$_loadfile_name],
-    }
-    # $_package may be an array
-    package { $_package:
-      ensure  => $package_ensure,
-      require => Package['httpd'],
-      before  => $package_before,
-    }
-  }
-
-  file { "${_loadfile_name}":
-    ensure  => file,
-    path    => "${mod_dir}/${_loadfile_name}",
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    content => template('apache/mod/load.erb'),
-    require => [
-      Package['httpd'],
-      Exec["mkdir ${mod_dir}"],
-    ],
-    before  => File[$mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  if $::osfamily == 'Debian' {
-    $enable_dir = $::apache::mod_enable_dir
-    file{ "${_loadfile_name} symlink":
-      ensure  => link,
-      path    => "${enable_dir}/${_loadfile_name}",
-      target  => "${mod_dir}/${_loadfile_name}",
-      owner   => 'root',
-      group   => $::apache::params::root_group,
-      mode    => '0644',
-      require => [
-        File[$_loadfile_name],
-        Exec["mkdir ${enable_dir}"],
-      ],
-      before  => File[$enable_dir],
-      notify  => Service['httpd'],
-    }
-    # Each module may have a .conf file as well, which should be
-    # defined in the class apache::mod::module
-    # Some modules do not require this file.
-    if defined(File["${mod}.conf"]) {
-      file{ "${mod}.conf symlink":
-        ensure  => link,
-        path    => "${enable_dir}/${mod}.conf",
-        target  => "${mod_dir}/${mod}.conf",
-        owner   => 'root',
-        group   => $::apache::params::root_group,
-        mode    => '0644',
-        require => [
-          File["${mod}.conf"],
-          Exec["mkdir ${enable_dir}"],
-        ],
-        before  => File[$enable_dir],
-        notify  => Service['httpd'],
-      }
-    }
-  }
-}

+ 0 - 3
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/actions.pp

@@ -1,3 +0,0 @@
-class apache::mod::actions {
-  apache::mod { 'actions': }
-}

+ 0 - 19
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/alias.pp

@@ -1,19 +0,0 @@
-class apache::mod::alias(
-  $apache_version = $apache::apache_version
-) {
-  $icons_path = $::osfamily ? {
-    'debian'  => '/usr/share/apache2/icons',
-    'redhat'  => '/var/www/icons',
-    'freebsd' => '/usr/local/www/apache22/icons',
-  }
-  apache::mod { 'alias': }
-  # Template uses $icons_path
-  file { 'alias.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/alias.conf",
-    content => template('apache/mod/alias.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}

+ 0 - 3
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp

@@ -1,3 +0,0 @@
-class apache::mod::auth_basic {
-  ::apache::mod { 'auth_basic': }
-}

+ 0 - 5
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp

@@ -1,5 +0,0 @@
-class apache::mod::auth_kerb {
-  ::apache::mod { 'auth_kerb': }
-}
-
-

+ 0 - 19
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp

@@ -1,19 +0,0 @@
-class apache::mod::authnz_ldap (
-  $verifyServerCert = true,
-) {
-  include '::apache::mod::ldap'
-  ::apache::mod { 'authnz_ldap': }
-
-  validate_bool($verifyServerCert)
-
-  # Template uses:
-  # - $verifyServerCert
-  file { 'authnz_ldap.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/authnz_ldap.conf",
-    content => template('apache/mod/authnz_ldap.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}

+ 0 - 12
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp

@@ -1,12 +0,0 @@
-class apache::mod::autoindex {
-  ::apache::mod { 'autoindex': }
-  # Template uses no variables
-  file { 'autoindex.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/autoindex.conf",
-    content => template('apache/mod/autoindex.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}

+ 0 - 3
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cache.pp

@@ -1,3 +0,0 @@
-class apache::mod::cache {
-  ::apache::mod { 'cache': }
-}

+ 0 - 4
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgi.pp

@@ -1,4 +0,0 @@
-class apache::mod::cgi {
-  Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
-  ::apache::mod { 'cgi': }
-}

+ 0 - 23
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/cgid.pp

@@ -1,23 +0,0 @@
-class apache::mod::cgid {
-  Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
-
-  # Debian specifies it's cgid sock path, but RedHat uses the default value
-  # with no config file
-  $cgisock_path = $::osfamily ? {
-    'debian'  => '${APACHE_RUN_DIR}/cgisock',
-    'freebsd' => 'cgisock',
-    default   => undef,
-  }
-  ::apache::mod { 'cgid': }
-  if $cgisock_path {
-    # Template uses $cgisock_path
-    file { 'cgid.conf':
-      ensure  => file,
-      path    => "${::apache::mod_dir}/cgid.conf",
-      content => template('apache/mod/cgid.conf.erb'),
-      require => Exec["mkdir ${::apache::mod_dir}"],
-      before  => File[$::apache::mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-}

+ 0 - 3
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav.pp

@@ -1,3 +0,0 @@
-class apache::mod::dav {
-  ::apache::mod { 'dav': }
-}

+ 0 - 20
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp

@@ -1,20 +0,0 @@
-class apache::mod::dav_fs {
-  $dav_lock = $::osfamily ? {
-    'debian'  => '${APACHE_LOCK_DIR}/DAVLock',
-    'freebsd' => '/usr/local/var/DavLock',
-    default   => '/var/lib/dav/lockdb',
-  }
-
-  Class['::apache::mod::dav'] -> Class['::apache::mod::dav_fs']
-  ::apache::mod { 'dav_fs': }
-
-  # Template uses: $dav_lock
-  file { 'dav_fs.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/dav_fs.conf",
-    content => template('apache/mod/dav_fs.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}

+ 0 - 14
dev/vagrant/dolibarrdev/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp

@@ -1,14 +0,0 @@
-class apache::mod::dav_svn (
-  $authz_svn_enabled = false,
-) {
-    Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
-    include ::apache::mod::dav
-    ::apache::mod { 'dav_svn': } 
-    
-    if $authz_svn_enabled {
-      ::apache::mod { 'authz_svn':
-        loadfile_name => 'dav_svn_authz_svn.load',
-        require       => Apache::Mod['dav_svn'],
-      }
-    }
-}

Some files were not shown because too many files changed in this diff