]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'tigerfell/pr257'
authorGrant Slater <git@firefishy.com>
Tue, 2 Aug 2022 20:42:54 +0000 (23:42 +0300)
committerGrant Slater <git@firefishy.com>
Tue, 2 Aug 2022 20:42:54 +0000 (23:42 +0300)
547 files changed:
.github/workflows/cookstyle.yml
.github/workflows/test-kitchen.yml
.kitchen.yml
.rubocop.yml
.rubocop_todo.yml
.ruby-version
Gemfile.lock
cookbooks/accounts/files/default/grant/.ssh/authorized_keys
cookbooks/accounts/files/default/matt/.ssh/authorized_keys
cookbooks/accounts/files/default/tomh/.zshrc
cookbooks/apache/recipes/default.rb
cookbooks/apache/resources/conf.rb
cookbooks/apache/resources/module.rb
cookbooks/apache/resources/site.rb
cookbooks/apache/templates/default/brotli.conf.erb [new file with mode: 0644]
cookbooks/apt/recipes/default.rb
cookbooks/backup/files/default/expire-backups
cookbooks/backup/templates/default/expire.cron.erb
cookbooks/bind/recipes/default.rb
cookbooks/bind/templates/default/db.10.erb
cookbooks/blog/recipes/default.rb
cookbooks/blogs/metadata.rb
cookbooks/blogs/recipes/default.rb
cookbooks/blogs/templates/default/backup.cron.erb [new file with mode: 0644]
cookbooks/blogs/templates/default/blogs-update.erb
cookbooks/chef/attributes/default.rb
cookbooks/chef/libraries/subversion.rb
cookbooks/chef/recipes/default.rb
cookbooks/chef/recipes/knife.rb [new file with mode: 0644]
cookbooks/chef/recipes/repository.rb
cookbooks/chef/recipes/server.rb
cookbooks/chef/templates/default/post-receive.erb
cookbooks/civicrm/attributes/default.rb
cookbooks/civicrm/recipes/default.rb
cookbooks/community/README.md [new file with mode: 0644]
cookbooks/community/attributes/default.rb [new file with mode: 0644]
cookbooks/community/metadata.rb [new file with mode: 0644]
cookbooks/community/recipes/default.rb [new file with mode: 0644]
cookbooks/community/templates/default/backup.cron.erb [new file with mode: 0644]
cookbooks/community/templates/default/data.yml.erb [new file with mode: 0644]
cookbooks/community/templates/default/mail-receiver.yml.erb [new file with mode: 0644]
cookbooks/community/templates/default/web_only.yml.erb [new file with mode: 0644]
cookbooks/db/metadata.rb
cookbooks/db/recipes/base.rb
cookbooks/db/templates/default/wal-g.erb [new file with mode: 0644]
cookbooks/dev/metadata.rb
cookbooks/dev/recipes/default.rb
cookbooks/dev/templates/default/cgimap.environment.erb
cookbooks/dev/templates/default/dev.html.erb
cookbooks/dev/templates/default/rails.setup.rb.erb
cookbooks/devices/templates/default/udev.rules.erb
cookbooks/dhcpd/recipes/default.rb
cookbooks/dhcpd/templates/default/dhcpd.conf.erb
cookbooks/dmca/files/default/html/HTML/Common.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/DHTMLRulesTableless.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/PageDHTMLRulesTableless.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/Array.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/ArraySmarty.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/Default.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/ITDynamic.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/ITStatic.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/Object.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/ObjectFlexy.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/QuickHtml.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer/Tableless.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Callback.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Compare.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Email.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Range.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Regex.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/Rule/Required.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/RuleRegistry.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/advcheckbox.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/autocomplete.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/button.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/checkbox.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/date.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/element.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/file.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/group.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/header.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/hidden.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/hiddenselect.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/hierselect.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/html.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/image.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/input.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/link.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/password.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/radio.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/reset.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/select.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/static.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/submit.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/text.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/textarea.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/utils.php [deleted file]
cookbooks/dmca/files/default/html/HTML/QuickForm/xbutton.php [deleted file]
cookbooks/dmca/files/default/html/favicon.ico [deleted file]
cookbooks/dmca/files/default/html/index.php [deleted file]
cookbooks/dmca/files/default/html/robots.txt [deleted file]
cookbooks/dmca/files/default/html/style.css [deleted file]
cookbooks/dmca/recipes/default.rb
cookbooks/dmca/templates/default/apache.erb
cookbooks/dns/recipes/default.rb
cookbooks/dns/templates/default/geo.js.erb [new file with mode: 0644]
cookbooks/docker/recipes/default.rb
cookbooks/exim/attributes/default.rb
cookbooks/exim/files/default/noreply/community [new file with mode: 0644]
cookbooks/exim/files/default/noreply/web
cookbooks/exim/templates/default/exim4.conf.erb
cookbooks/fail2ban/metadata.rb
cookbooks/fail2ban/recipes/default.rb
cookbooks/fail2ban/resources/filter.rb
cookbooks/fail2ban/resources/jail.rb
cookbooks/forum/recipes/default.rb
cookbooks/foundation/metadata.rb
cookbooks/foundation/recipes/board.rb
cookbooks/foundation/recipes/dwg.rb
cookbooks/foundation/recipes/mwg.rb
cookbooks/foundation/recipes/owg.rb
cookbooks/foundation/recipes/wiki.rb
cookbooks/geodns/recipes/default.rb
cookbooks/geodns/templates/default/config.erb
cookbooks/geodns/templates/default/geo.erb
cookbooks/geoipupdate/attributes/default.rb
cookbooks/geoipupdate/recipes/default.rb
cookbooks/git/recipes/server.rb
cookbooks/git/recipes/web.rb
cookbooks/git/templates/default/apache.erb
cookbooks/git/templates/default/gitconfig.erb [new file with mode: 0644]
cookbooks/git/templates/default/gitweb.conf.erb
cookbooks/git/templates/default/indextext.html.erb [new file with mode: 0644]
cookbooks/gps-tile/recipes/default.rb
cookbooks/hardware/attributes/default.rb
cookbooks/hardware/recipes/default.rb
cookbooks/hardware/templates/default/ilo-defaults.xml.erb [new file with mode: 0644]
cookbooks/hardware/templates/default/ipmi_local.yml.erb
cookbooks/hardware/templates/default/lldp.rb.erb [new file with mode: 0644]
cookbooks/hardware/templates/default/modules.erb [deleted file]
cookbooks/hardware/templates/default/ohai.rb.erb
cookbooks/imagery/recipes/default.rb
cookbooks/imagery/recipes/gb_os_sv.rb
cookbooks/imagery/resources/layer.rb
cookbooks/imagery/resources/site.rb
cookbooks/imagery/templates/default/imagery.js.erb
cookbooks/imagery/templates/default/index.html.erb
cookbooks/imagery/templates/default/nginx_default.conf.erb
cookbooks/imagery/templates/default/nginx_imagery.conf.erb
cookbooks/kibana/recipes/default.rb
cookbooks/letsencrypt/files/default/bin/upload
cookbooks/letsencrypt/metadata.rb
cookbooks/letsencrypt/recipes/default.rb
cookbooks/logstash/attributes/default.rb
cookbooks/mailman/metadata.rb
cookbooks/mailman/recipes/default.rb
cookbooks/mailman/templates/default/apache.erb
cookbooks/mailman/templates/default/backup.cron.erb
cookbooks/matomo/README.md [new file with mode: 0644]
cookbooks/matomo/attributes/default.rb [new file with mode: 0644]
cookbooks/matomo/metadata.rb [moved from cookbooks/piwik/metadata.rb with 78% similarity]
cookbooks/matomo/recipes/default.rb [new file with mode: 0644]
cookbooks/matomo/templates/default/apache.erb [new file with mode: 0644]
cookbooks/matomo/templates/default/config.erb [moved from cookbooks/piwik/templates/default/config.erb with 77% similarity]
cookbooks/mediawiki/attributes/default.rb
cookbooks/mediawiki/recipes/default.rb
cookbooks/mediawiki/resources/extension.rb
cookbooks/mediawiki/resources/site.rb
cookbooks/mediawiki/resources/skin.rb
cookbooks/mediawiki/templates/default/LocalSettings.php.erb
cookbooks/mediawiki/templates/default/apache.erb
cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb
cookbooks/mediawiki/templates/default/mw-ext-ConfirmEdit.inc.php.erb
cookbooks/mediawiki/templates/default/mw-ext-SimpleMap.inc.php.erb [deleted file]
cookbooks/mediawiki/templates/default/mw-ext-SpamBlacklist.inc.php.erb
cookbooks/mediawiki/templates/default/mw-ext-TitleBlacklist.inc.php.erb
cookbooks/mediawiki/templates/default/mw-ext-VisualEditor.inc.php.erb
cookbooks/mediawiki/templates/default/mw-ext-osmtaginfo.inc.php.erb [deleted file]
cookbooks/mediawiki/templates/default/parsoid-config.yaml.erb [deleted file]
cookbooks/munin/files/default/plugins/chef_status
cookbooks/munin/files/default/plugins/squid_delay_pools [deleted file]
cookbooks/munin/files/default/plugins/squid_delay_pools_noreferer [deleted file]
cookbooks/munin/files/default/plugins/squid_icp [deleted file]
cookbooks/munin/files/default/plugins/squid_times [deleted file]
cookbooks/munin/recipes/plugins.rb
cookbooks/munin/recipes/server.rb
cookbooks/munin/resources/plugin.rb
cookbooks/munin/resources/plugin_conf.rb
cookbooks/munin/templates/default/munin.conf.erb
cookbooks/mysql/recipes/default.rb
cookbooks/mysql/resources/database.rb
cookbooks/mysql/resources/user.rb
cookbooks/mysql/templates/default/apparmor.erb [new file with mode: 0644]
cookbooks/networking/attributes/default.rb
cookbooks/networking/recipes/default.rb
cookbooks/networking/resources/firewall_rule.rb
cookbooks/networking/templates/default/shorewall-interfaces.erb
cookbooks/networking/templates/default/shorewall-masq.erb [deleted file]
cookbooks/networking/templates/default/shorewall-snat.erb [new file with mode: 0644]
cookbooks/networking/templates/default/shorewall-stoppedrules.erb [new file with mode: 0644]
cookbooks/networking/templates/default/shorewall-zones.erb
cookbooks/networking/templates/default/shorewall.conf.erb
cookbooks/networking/templates/default/wireguard.netdev.erb
cookbooks/networking/templates/default/wireguard.network.erb
cookbooks/nfs/README.md [deleted file]
cookbooks/nfs/attributes/default.rb [deleted file]
cookbooks/nfs/recipes/default.rb [deleted file]
cookbooks/nfs/recipes/server.rb [deleted file]
cookbooks/nfs/templates/default/exports.erb [deleted file]
cookbooks/nginx/resources/site.rb
cookbooks/nodejs/recipes/default.rb
cookbooks/nodejs/resources/package.rb
cookbooks/nodejs/templates/default/yarn.erb [new file with mode: 0644]
cookbooks/nominatim/README.md
cookbooks/nominatim/attributes/default.rb
cookbooks/nominatim/metadata.rb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/git-post-merge-hook.erb [deleted file]
cookbooks/nominatim/templates/default/ipblocks.erb [deleted file]
cookbooks/nominatim/templates/default/nginx-qa-tiles.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nginx.erb
cookbooks/nominatim/templates/default/nominatim-daily-maintenance.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nominatim-update-data.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nominatim-update-refresh-db.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nominatim-update-source.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nominatim-update.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/nominatim.env.erb
cookbooks/nominatim/templates/default/qa_config.erb [new file with mode: 0644]
cookbooks/nominatim/templates/default/updater.erb [deleted file]
cookbooks/nominatim/templates/default/updater.init.erb [deleted file]
cookbooks/ohai/resources/plugin.rb
cookbooks/openssh/attributes/default.rb
cookbooks/openssh/templates/default/ssh_known_hosts.erb
cookbooks/openssh/templates/default/sshd_config.conf.erb
cookbooks/osmosis/recipes/default.rb
cookbooks/otrs/attributes/default.rb
cookbooks/otrs/metadata.rb
cookbooks/otrs/recipes/default.rb
cookbooks/overpass/README.md [new file with mode: 0644]
cookbooks/overpass/attributes/default.rb [new file with mode: 0644]
cookbooks/overpass/metadata.rb [moved from cookbooks/squid/metadata.rb with 57% similarity]
cookbooks/overpass/recipes/default.rb [new file with mode: 0644]
cookbooks/overpass/templates/default/apache.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/logrotate.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/munin.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/munin_db_lag.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/munin_request_count.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/overpass-import-db.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/overpass-update-areas.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/overpass-update-db.erb [new file with mode: 0644]
cookbooks/overpass/templates/default/totp-filter.erb [new file with mode: 0644]
cookbooks/passenger/attributes/default.rb
cookbooks/passenger/metadata.rb
cookbooks/passenger/recipes/default.rb
cookbooks/passenger/resources/application.rb
cookbooks/passenger/templates/default/ruby.erb
cookbooks/php/attributes/default.rb
cookbooks/php/resources/fpm.rb
cookbooks/piwik/README.md [deleted file]
cookbooks/piwik/attributes/default.rb [deleted file]
cookbooks/piwik/recipes/default.rb [deleted file]
cookbooks/piwik/templates/default/apache.erb [deleted file]
cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi
cookbooks/planet/files/default/cgi/HEADER.cgi
cookbooks/planet/files/default/history_cgi/HEADER.cgi
cookbooks/planet/files/default/replication-bin/replicate-cleanup [new file with mode: 0755]
cookbooks/planet/files/default/replication-bin/replicate-minute [moved from cookbooks/planet/templates/default/replicate-minute.erb with 100% similarity, mode: 0755]
cookbooks/planet/files/default/replication-bin/streaming-replicator [deleted file]
cookbooks/planet/files/default/replication-bin/streaming-server [deleted file]
cookbooks/planet/files/default/replication-cgi/HEADER.cgi
cookbooks/planet/metadata.rb
cookbooks/planet/recipes/current.rb
cookbooks/planet/recipes/default.rb
cookbooks/planet/recipes/dump.rb
cookbooks/planet/recipes/replication.rb
cookbooks/planet/templates/default/apache.erb
cookbooks/planet/templates/default/planet-notes-dump.erb
cookbooks/planet/templates/default/planet-update-file.erb
cookbooks/planet/templates/default/planet-update.erb
cookbooks/planet/templates/default/planetdump.erb
cookbooks/planet/templates/default/users-agreed.erb
cookbooks/postgresql/libraries/postgresql.rb
cookbooks/postgresql/recipes/default.rb
cookbooks/postgresql/resources/database.rb
cookbooks/postgresql/resources/execute.rb
cookbooks/postgresql/resources/extension.rb
cookbooks/postgresql/resources/munin.rb
cookbooks/postgresql/resources/table.rb
cookbooks/postgresql/resources/tablespace.rb
cookbooks/postgresql/resources/user.rb
cookbooks/prometheus/attributes/default.rb
cookbooks/prometheus/recipes/default.rb
cookbooks/prometheus/recipes/server.rb
cookbooks/prometheus/resources/collector.rb
cookbooks/prometheus/resources/exporter.rb
cookbooks/prometheus/templates/default/alert_rules.yml.erb
cookbooks/prometheus/templates/default/apache.erb
cookbooks/prometheus/templates/default/chef.prom.erb
cookbooks/prometheus/templates/default/default.alertmanager.erb [deleted file]
cookbooks/prometheus/templates/default/default.prometheus.erb [deleted file]
cookbooks/prometheus/templates/default/filestat.yml.erb [new file with mode: 0644]
cookbooks/prometheus/templates/default/karma.yml.erb [new file with mode: 0644]
cookbooks/prometheus/templates/default/prometheus.yml.erb
cookbooks/python/resources/package.rb
cookbooks/python/resources/virtualenv.rb
cookbooks/rsyncd/recipes/default.rb
cookbooks/ruby/README.md [new file with mode: 0644]
cookbooks/ruby/attributes/default.rb [new file with mode: 0644]
cookbooks/ruby/metadata.rb [moved from cookbooks/nfs/metadata.rb with 70% similarity]
cookbooks/ruby/recipes/default.rb [new file with mode: 0644]
cookbooks/ruby/resources/bundle_exec.rb [new file with mode: 0644]
cookbooks/ruby/resources/bundle_install.rb [new file with mode: 0644]
cookbooks/serverinfo/README.md
cookbooks/serverinfo/metadata.rb
cookbooks/serverinfo/recipes/default.rb
cookbooks/snmpd/recipes/default.rb
cookbooks/squid/README.md [deleted file]
cookbooks/squid/attributes/default.rb [deleted file]
cookbooks/squid/recipes/default.rb [deleted file]
cookbooks/squid/resources/fragment.rb [deleted file]
cookbooks/squid/templates/default/squid.conf.erb [deleted file]
cookbooks/ssl/resources/certificate.rb
cookbooks/stateofthemap/metadata.rb
cookbooks/stateofthemap/recipes/default.rb
cookbooks/subversion/files/default/hooks/post-commit [deleted file]
cookbooks/subversion/files/default/hooks/post-revprop-change [deleted file]
cookbooks/subversion/recipes/default.rb
cookbooks/subversion/templates/default/apache.erb
cookbooks/subversion/templates/default/backup.cron.erb [deleted file]
cookbooks/supybot/templates/default/channels.conf.erb
cookbooks/supybot/templates/default/git.conf.erb
cookbooks/switch2osm/metadata.rb
cookbooks/switch2osm/recipes/default.rb
cookbooks/systemd/resources/path.rb
cookbooks/systemd/resources/service.rb
cookbooks/systemd/resources/socket.rb [new file with mode: 0644]
cookbooks/systemd/resources/timer.rb
cookbooks/systemd/resources/tmpfile.rb
cookbooks/systemd/templates/default/service.erb
cookbooks/systemd/templates/default/socket.erb [new file with mode: 0644]
cookbooks/taginfo/metadata.rb
cookbooks/taginfo/recipes/default.rb
cookbooks/tile/attributes/default.rb
cookbooks/tile/metadata.rb
cookbooks/tile/recipes/default.rb
cookbooks/tile/templates/default/apache.erb
cookbooks/tile/templates/default/export.erb
cookbooks/tile/templates/default/renderd.conf.erb
cookbooks/tile/templates/default/replicate.erb
cookbooks/tile/templates/default/tile-ratelimit.erb [new file with mode: 0755]
cookbooks/tilecache/README.md [deleted file]
cookbooks/tilecache/attributes/default.rb [deleted file]
cookbooks/tilecache/files/default/tilecache-curl-time.txt [deleted file]
cookbooks/tilecache/metadata.rb [deleted file]
cookbooks/tilecache/recipes/default.rb [deleted file]
cookbooks/tilecache/templates/default/logrotate.nginx.erb [deleted file]
cookbooks/tilecache/templates/default/logrotate.squid.erb [deleted file]
cookbooks/tilecache/templates/default/munin.ping.erb [deleted file]
cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb [deleted file]
cookbooks/tilecache/templates/default/nginx_tile.conf.erb [deleted file]
cookbooks/tilecache/templates/default/ohai.rb.erb [deleted file]
cookbooks/tilecache/templates/default/squid.conf.erb [deleted file]
cookbooks/tilecache/templates/default/tilecache-curl-time-cleanup.erb [deleted file]
cookbooks/tilecache/templates/default/tilecache-curl-time.erb [deleted file]
cookbooks/tilelog/attributes/default.rb
cookbooks/tilelog/metadata.rb
cookbooks/tilelog/recipes/default.rb
cookbooks/tilelog/templates/default/tilelog.erb
cookbooks/timescaledb/attributes/default.rb
cookbooks/tools/recipes/default.rb
cookbooks/trac/attributes/default.rb [deleted file]
cookbooks/trac/files/default/tickets.map [new file with mode: 0644]
cookbooks/trac/files/default/trac-authenticate [deleted file]
cookbooks/trac/metadata.rb
cookbooks/trac/recipes/default.rb
cookbooks/trac/templates/default/apache.erb
cookbooks/trac/templates/default/backup.cron.erb [deleted file]
cookbooks/trac/templates/default/sudoers.erb [deleted file]
cookbooks/trac/templates/default/trac.ini.erb [deleted file]
cookbooks/web/README.md
cookbooks/web/attributes/default.rb
cookbooks/web/metadata.rb
cookbooks/web/recipes/backend.rb [deleted file]
cookbooks/web/recipes/base.rb
cookbooks/web/recipes/cgimap.rb
cookbooks/web/recipes/cleanup.rb
cookbooks/web/recipes/frontend.rb
cookbooks/web/recipes/rails.rb
cookbooks/web/recipes/statistics.rb
cookbooks/web/resources/rails_port.rb
cookbooks/web/templates/default/apache.backend.erb [deleted file]
cookbooks/web/templates/default/apache.frontend.erb
cookbooks/web/templates/default/logrotate.web.erb
cookbooks/web/templates/default/statistics.erb
cookbooks/wiki/recipes/default.rb
cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb
cookbooks/wordpress/libraries/wordpress.rb
cookbooks/wordpress/metadata.rb
cookbooks/wordpress/resources/plugin.rb
cookbooks/wordpress/resources/site.rb
cookbooks/wordpress/resources/theme.rb
roles/albi.rb
roles/altavoz.rb [deleted file]
roles/angor.rb
roles/ascalon.rb
roles/backup.rb
roles/balerion.rb
roles/base.rb
roles/blix-nl.rb [deleted file]
roles/blix-no.rb [deleted file]
roles/blix.rb [deleted file]
roles/boitata.rb [deleted file]
roles/bowser.rb
roles/bytemark.rb
roles/c3sl.rb [deleted file]
roles/cherufe.rb [deleted file]
roles/chrysophylax.rb [deleted file]
roles/cmok.rb [deleted file]
roles/community.rb [new file with mode: 0644]
roles/crm.rb
roles/culebre.rb [new file with mode: 0644]
roles/datahata.rb [deleted file]
roles/db-master.rb
roles/db-slave.rb
roles/db.rb
roles/dev.rb
roles/drogon.rb
roles/dulcy.rb
roles/equinix-ams.rb [moved from roles/equinix.rb with 84% similarity]
roles/equinix-dub.rb [new file with mode: 0644]
roles/eustace.rb
roles/fafnir.rb
roles/faimaison.rb [deleted file]
roles/ffrl.rb [deleted file]
roles/firnen.rb
roles/foundation.rb
roles/fume.rb [deleted file]
roles/gorwen.rb [new file with mode: 0644]
roles/gorynych.rb [deleted file]
roles/gp-dl360e-g8.rb [new file with mode: 0644]
roles/greenmini.rb [deleted file]
roles/grifon.rb [deleted file]
roles/grisu.rb
roles/grnet.rb [deleted file]
roles/hetzner.rb [deleted file]
roles/horntail.rb [new file with mode: 0644]
roles/hp-dl180-g6.rb
roles/hp-dl360-g6.rb
roles/idris.rb [new file with mode: 0644]
roles/imagery.rb
roles/ironbelly.rb
roles/iway.rb [deleted file]
roles/jakelong.rb [new file with mode: 0644]
roles/jump.rb [deleted file]
roles/kalessin.rb [deleted file]
roles/karm.rb
roles/keizer.rb [deleted file]
roles/kokosnuss.rb [deleted file]
roles/konqi.rb [new file with mode: 0644]
roles/ladon.rb [deleted file]
roles/lockheed.rb [new file with mode: 0644]
roles/logstash-forwarder.rb
roles/longma.rb
roles/lysator.rb [deleted file]
roles/mail.rb
roles/matomo.rb [moved from roles/piwik.rb with 85% similarity]
roles/meraxes.rb
roles/milkywan.rb [deleted file]
roles/munin.rb
roles/naga.rb
roles/nchc.rb [deleted file]
roles/neak.rb [deleted file]
roles/necrosan.rb
roles/nepomuk.rb
roles/nidhogg.rb
roles/nominatim.rb
roles/norbert.rb
roles/odin.rb
roles/orm.rb [deleted file]
roles/otrs.rb
roles/overpass-query.rb [new file with mode: 0644]
roles/planet.rb
roles/prometheus.rb
roles/pummelzacken.rb
roles/pyrene.rb
roles/ramoth.rb [deleted file]
roles/rhaegal.rb
roles/ridgeback.rb [deleted file]
roles/ridley.rb
roles/saphira.rb [deleted file]
roles/sarkany.rb [deleted file]
roles/scorch.rb
roles/shenron.rb
roles/shruikan.rb [deleted file]
roles/snap-01.rb
roles/snap-02.rb
roles/snap-03.rb [new file with mode: 0644]
roles/spike-01.rb [new file with mode: 0644]
roles/spike-02.rb [new file with mode: 0644]
roles/spike-03.rb [new file with mode: 0644]
roles/spike-06.rb
roles/spike-07.rb
roles/spike-08.rb
roles/stormfly-03.rb
roles/stormfly-04.rb
roles/strato.rb [deleted file]
roles/szerverem.rb [deleted file]
roles/tabaluga.rb
roles/takhisis.rb [deleted file]
roles/thorn-01.rb [deleted file]
roles/thorn-02.rb
roles/thorn-03.rb
roles/tile.rb
roles/tilecache.rb [deleted file]
roles/toothless.rb [deleted file]
roles/trogdor.rb [deleted file]
roles/tuxis.rb [deleted file]
roles/ucl.rb
roles/utelecom.rb [deleted file]
roles/vipertooth.rb [deleted file]
roles/viserion.rb
roles/web-backend.rb [deleted file]
roles/web-frontend.rb
roles/web-storage.rb [deleted file]
roles/yandex.rb [deleted file]
roles/ysera.rb
roles/zcu.rb [deleted file]
test/data_bags/accounts/community.json [new file with mode: 0644]
test/data_bags/accounts/overpass.json [new file with mode: 0644]
test/data_bags/community/passwords.json [new file with mode: 0644]
test/data_bags/matomo/passwords.json [moved from test/data_bags/piwik/passwords.json with 100% similarity]
test/data_bags/tilelog/passwords.json [new file with mode: 0644]
test/data_bags/web/matomo.json [moved from test/data_bags/web/piwik.json with 77% similarity]
test/data_bags/wiki/passwords.json
test/integration/community/serverspec/docker_spec.rb [moved from test/integration/web-backend/serverspec/cgimap_spec.rb with 58% similarity]
test/integration/community/serverspec/http_spec.rb [new file with mode: 0644]
test/integration/docker/serverspec/docker_spec.rb [moved from test/integration/web-backend/serverspec/rails_spec.rb with 56% similarity]
test/integration/matomo/serverspec/apache_spec.rb [moved from test/integration/piwik/serverspec/apache_spec.rb with 100% similarity]
test/integration/overpass/serverspec/apache_spec.rb [moved from test/integration/web-backend/serverspec/apache_spec.rb with 100% similarity]
test/integration/prometheus-server/serverspec/karma_spec.rb [new file with mode: 0644]
test/integration/squid/serverspec/squid_spec.rb [deleted file]
test/integration/subversion/serverspec/subversion_spec.rb [deleted file]
test/integration/tilecache/serverspec/nginx_spec.rb [deleted file]
test/integration/tilecache/serverspec/squid_spec.rb [deleted file]

index 56603f598ac3bb11d03f3468f39258027913c64f..62d14b8aff4111424c078299c947a36206e25f0a 100644 (file)
@@ -1,27 +1,23 @@
 name: Cookstyle
+
 on:
   - push
   - pull_request
+
+concurrency:
+  group: ${{ github.workflow }}-{{ github.head_ref || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   cookstyle:
     name: Cookstyle
     runs-on: ubuntu-latest
     steps:
     - name: Check out code
-      uses: actions/checkout@v2
+      uses: actions/checkout@v3
     - name: Setup ruby
-      uses: actions/setup-ruby@v1.1.3
-    - name: Cache gems
-      uses: actions/cache@v2.1.4
+      uses: ruby/setup-ruby@v1
       with:
-        path: vendor/bundle
-        key: bundle-${{ runner.OS }}-${{ hashFiles('Gemfile.lock') }}
-        restore-keys: |
-          bundle-${{ runner.OS }}-
-    - name: Install gems
-      run: |
-        gem install bundler
-        bundle config set deployment true
-        bundle install --jobs 4 --retry 3
+        bundler-cache: true
     - name: Run cookstyle
       run: bundle exec cookstyle --format fuubar
index 297d0bbfe8f1b1bd062af4ab4a1b47aad9689a7c..5c622df16ba003f872fc58a35e74c9f6a71bcb9b 100644 (file)
@@ -1,7 +1,13 @@
 name: Test Kitchen
+
 on:
   - push
   - pull_request
+
+concurrency:
+  group: ${{ github.workflow }}-{{ github.head_ref || github.ref }}
+  cancel-in-progress: true
+
 jobs:
   kitchen:
     name: Test Kitchen
@@ -18,6 +24,7 @@ jobs:
           - blogs
           - civicrm
           - clamav
+          - community
           - db-backup
           - db-base
           - db-master
@@ -49,6 +56,7 @@ jobs:
           - logstash-forwarder
           - mail
           - mailman
+          - matomo
           - memcached
           - munin
           - munin-plugins
@@ -63,11 +71,11 @@ jobs:
           - osmosis
           - osqa
           - otrs
+          - overpass
           - passenger
           - php
           - php-apache
           - php-fpm
-          - piwik
           - planet
           - planet-current
           - planet-dump
@@ -81,7 +89,6 @@ jobs:
           - serverinfo
           - snmpd
           - spamassassin
-          - squid
           - ssl
           - stateofthemap
           - subversion
@@ -91,11 +98,9 @@ jobs:
           - sysfs
           - taginfo
           - tile
-          - tilecache
           - tilelog
           - tools
           - trac
-          - web-backend
           - web-cgimap
           - web-frontend
           - web-rails
@@ -103,33 +108,13 @@ jobs:
           - wiki
         os:
           - ubuntu-2004
-        include:
-          - suite: trac
-            os: ubuntu-1804
-        exclude:
-          - suite: trac
-            os: ubuntu-2004
       fail-fast: false
     steps:
     - name: Check out code
-      uses: actions/checkout@v2
+      uses: actions/checkout@v3
     - name: Setup ruby
-      uses: actions/setup-ruby@v1.1.3
-    - name: Cache gems
-      uses: actions/cache@v2.1.4
+      uses: ruby/setup-ruby@v1
       with:
-        path: vendor/bundle
-        key: bundle-${{ runner.OS }}-${{ hashFiles('Gemfile.lock') }}
-        restore-keys: |
-          bundle-${{ runner.OS }}-
-    - name: Disable apparmor for mysqld
-      run: |
-        sudo apt-get install apparmor-utils
-        sudo aa-disable /usr/sbin/mysqld
-    - name: Install gems
-      run: |
-        gem install bundler
-        bundle config set deployment true
-        bundle install --jobs 4 --retry 3
+        bundler-cache: true
     - name: Run kitchen test ${{ matrix.suite }}-${{ matrix.os }}
       run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
index 58a63e3b9871a41e73e3890723c812dd084a1e1a..84a501546457fc32f8534d7e2d63a82c28823be4 100644 (file)
@@ -1,7 +1,9 @@
 ---
 driver:
   name: dokken
-  chef_version: 16
+  chef_version: 17
+  volumes:
+    - /var/lib/docker
   env:
     - container=dokken
 
@@ -18,13 +20,6 @@ verifier:
   sudo: false
 
 platforms:
-  - name: ubuntu-18.04
-    driver:
-      image: dokken/ubuntu-18.04
-      privileged: true
-      pid_one_command: /bin/systemd
-      intermediate_instructions:
-        - RUN /usr/bin/apt-get update -y
   - name: ubuntu-20.04
     driver:
       image: dokken/ubuntu-20.04
@@ -64,6 +59,9 @@ suites:
   - name: clamav
     run_list:
       - recipe[clamav::default]
+  - name: community
+    run_list:
+      - recipe[community::default]
   - name: db-backup
     run_list:
       - recipe[db::backup]
@@ -179,17 +177,23 @@ suites:
     attributes:
       logstash:
         forwarder:
-          filebeat.prospectors:
-            - input_type: log
+          filebeat.inputs:
+            - type: filestream
+              id: apache
               paths:
                 - /var/log/apache2/access.log
-              type: apache
+              fields:
+                type: apache
+              fields_under_root: true
   - name: mail
     run_list:
       - role[mail]
   - name: mailman
     run_list:
       - recipe[mailman::default]
+  - name: matomo
+    run_list:
+      - recipe[matomo::default]
   - name: memcached
     run_list:
       - recipe[memcached::default]
@@ -232,6 +236,9 @@ suites:
   - name: otrs
     run_list:
       - recipe[otrs::default]
+  - name: overpass
+    run_list:
+      - recipe[overpass::default]
   - name: passenger
     run_list:
       - recipe[passenger::default]
@@ -244,9 +251,6 @@ suites:
   - name: php-fpm
     run_list:
       - recipe[php::fpm]
-  - name: piwik
-    run_list:
-      - recipe[piwik::default]
   - name: planet
     run_list:
       - recipe[planet::default]
@@ -290,6 +294,9 @@ suites:
   - name: prometheus-server
     run_list:
       - recipe[prometheus::server]
+    attributes:
+      prometheus:
+        promscale: true
   - name: python
     run_list:
       - recipe[python::default]
@@ -305,9 +312,6 @@ suites:
   - name: spamassassin
     run_list:
       - recipe[spamassassin::default]
-  - name: squid
-    run_list:
-      - recipe[squid::default]
   - name: ssl
     run_list:
       - recipe[ssl::default]
@@ -339,9 +343,6 @@ suites:
   - name: tile
     run_list:
       - recipe[tile::default]
-  - name: tilecache
-    run_list:
-      - recipe[tilecache::default]
   - name: tilelog
     run_list:
       - recipe[tilelog::default]
@@ -354,9 +355,6 @@ suites:
   - name: trac
     run_list:
       - recipe[trac::default]
-  - name: web-backend
-    run_list:
-      - recipe[web::backend]
   - name: web-cgimap
     run_list:
       - recipe[web::cgimap]
index 80bd36dad256c088960a696f3b42a198146448c8..75bc2d9d8472675959475261618e83c012736bcf 100644 (file)
@@ -1,10 +1,13 @@
 inherit_from: .rubocop_todo.yml
 
 AllCops:
-  TargetRubyVersion: 2.7
+  TargetRubyVersion: 3.0
 
 ChefModernize/IncludingAptDefaultRecipe:
   Enabled: false
+  
+Chef/Modernize/CronDFileOrTemplate:
+  Enabled: false
 
 Layout/ExtraSpacing:
   AllowForAlignment: true
index bdb397acf8f7df5de238b01ad83ab44b41d4f91c..a92cef294acfb249ea45ca0dde559e5fc631b239 100644 (file)
@@ -1,19 +1,14 @@
 # This configuration was generated by
 # `rubocop --auto-gen-config`
-# on 2020-07-30 08:39:06 UTC using RuboCop version 0.88.0.
+# on 2021-05-11 07:26:15 UTC using RuboCop version 1.14.0.
 # The point is for the user to remove these configuration records
 # one by one as the offenses are removed from the code base.
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
-# Offense count: 1038
+# Offense count: 1124
 # Cop supports --auto-correct.
 # Configuration parameters: .
 # SupportedStyles: strings, symbols
-ChefStyle/AttributeKeys:
+Chef/Style/AttributeKeys:
   EnforcedStyle: symbols
-
-# Offense count: 3
-# Configuration parameters: CountBlocks.
-Metrics/BlockNesting:
-  Max: 4
index 860487ca19cedeaf219ae3caca5e14df61c44f18..b0f2dcb32fc28c7f80c4d430beab94c89c787578 100644 (file)
@@ -1 +1 @@
-2.7.1
+3.0.4
index 65ffe696d643867790fa275fa9fe9dad28399e1a..c541d8c0936ca27e10ab7e0b096c14d9b72c8aaa 100644 (file)
@@ -4,26 +4,29 @@ GEM
     ast (2.4.2)
     bcrypt_pbkdf (1.1.0)
     builder (3.2.4)
-    chef-utils (16.10.17)
-    cookstyle (7.9.0)
-      rubocop (= 1.11.0)
-    diff-lcs (1.4.4)
-    docker-api (2.0.0)
+    chef-utils (17.10.0)
+      concurrent-ruby
+    concurrent-ruby (1.1.10)
+    cookstyle (7.32.1)
+      rubocop (= 1.25.1)
+    diff-lcs (1.5.0)
+    docker-api (2.2.0)
       excon (>= 0.47.0)
       multi_json
-    ed25519 (1.2.4)
+    ed25519 (1.3.0)
     erubi (1.10.0)
-    excon (0.79.0)
-    ffi (1.14.2)
+    excon (0.92.4)
+    ffi (1.15.5)
     gssapi (1.3.1)
       ffi (>= 1.0.1)
-    gyoku (1.3.1)
+    gyoku (1.4.0)
       builder (>= 2.1.2)
+      rexml (~> 3.0)
     httpclient (2.8.3)
-    kitchen-dokken (2.12.1)
+    kitchen-dokken (2.17.3)
       docker-api (>= 1.33, < 3)
       lockfile (~> 2.1)
-      test-kitchen (>= 1.15, < 3)
+      test-kitchen (>= 1.15, < 4)
     license-acceptance (2.1.13)
       pastel (~> 0.7)
       tomlrb (>= 1.2, < 3.0)
@@ -31,14 +34,14 @@ GEM
       tty-prompt (~> 0.20)
     little-plugger (1.1.4)
     lockfile (2.1.3)
-    logging (2.3.0)
+    logging (2.3.1)
       little-plugger (~> 1.1)
       multi_json (~> 1.14)
-    mixlib-install (3.12.7)
+    mixlib-install (3.12.19)
       mixlib-shellout
       mixlib-versioning
       thor
-    mixlib-shellout (3.2.5)
+    mixlib-shellout (3.2.7)
       chef-utils
     mixlib-versioning (1.2.12)
     multi_json (1.15.0)
@@ -49,61 +52,61 @@ GEM
       net-ssh (>= 4.0.0)
     net-telnet (0.1.1)
     nori (2.6.0)
-    parallel (1.20.1)
-    parser (3.0.0.0)
+    parallel (1.21.0)
+    parser (3.1.1.0)
       ast (~> 2.4.1)
     pastel (0.8.0)
       tty-color (~> 0.5)
-    rainbow (3.0.0)
-    regexp_parser (2.1.1)
-    rexml (3.2.4)
-    rspec (3.9.0)
-      rspec-core (~> 3.9.0)
-      rspec-expectations (~> 3.9.0)
-      rspec-mocks (~> 3.9.0)
-    rspec-core (3.9.2)
-      rspec-support (~> 3.9.3)
-    rspec-expectations (3.9.2)
+    rainbow (3.1.1)
+    regexp_parser (2.2.1)
+    rexml (3.2.5)
+    rspec (3.10.0)
+      rspec-core (~> 3.10.0)
+      rspec-expectations (~> 3.10.0)
+      rspec-mocks (~> 3.10.0)
+    rspec-core (3.10.2)
+      rspec-support (~> 3.10.0)
+    rspec-expectations (3.10.2)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.9.0)
+      rspec-support (~> 3.10.0)
     rspec-its (1.3.0)
       rspec-core (>= 3.0.0)
       rspec-expectations (>= 3.0.0)
-    rspec-mocks (3.9.1)
+    rspec-mocks (3.10.3)
       diff-lcs (>= 1.2.0, < 2.0)
-      rspec-support (~> 3.9.0)
-    rspec-support (3.9.3)
-    rubocop (1.11.0)
+      rspec-support (~> 3.10.0)
+    rspec-support (3.10.3)
+    rubocop (1.25.1)
       parallel (~> 1.10)
-      parser (>= 3.0.0.0)
+      parser (>= 3.1.0.0)
       rainbow (>= 2.2.2, < 4.0)
       regexp_parser (>= 1.8, < 3.0)
       rexml
-      rubocop-ast (>= 1.2.0, < 2.0)
+      rubocop-ast (>= 1.15.1, < 2.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 3.0)
-    rubocop-ast (1.4.1)
-      parser (>= 2.7.1.5)
+    rubocop-ast (1.16.0)
+      parser (>= 3.1.1.0)
     ruby-progressbar (1.11.0)
     rubyntlm (0.6.3)
-    rubyzip (2.3.0)
-    serverspec (2.41.5)
+    rubyzip (2.3.2)
+    serverspec (2.42.0)
       multi_json
       rspec (~> 3.0)
       rspec-its
       specinfra (~> 2.72)
     sfl (2.3)
-    specinfra (2.82.19)
+    specinfra (2.83.1)
       net-scp
       net-ssh (>= 2.7)
       net-telnet (= 0.1.1)
       sfl
-    strings (0.2.0)
+    strings (0.2.1)
       strings-ansi (~> 0.2)
-      unicode-display_width (~> 1.5)
+      unicode-display_width (>= 1.5, < 3.0)
       unicode_utils (~> 1.4)
     strings-ansi (0.2.0)
-    test-kitchen (2.11.1)
+    test-kitchen (3.3.1)
       bcrypt_pbkdf (~> 1.0)
       chef-utils (>= 16.4.35)
       ed25519 (~> 1.2)
@@ -117,15 +120,15 @@ GEM
       winrm (~> 2.0)
       winrm-elevated (~> 1.0)
       winrm-fs (~> 1.1)
-    thor (1.1.0)
-    tomlrb (2.0.1)
+    thor (1.2.1)
+    tomlrb (2.0.3)
     tty-box (0.7.0)
       pastel (~> 0.8)
       strings (~> 0.2.0)
       tty-cursor (~> 0.7)
     tty-color (0.6.0)
     tty-cursor (0.7.1)
-    tty-prompt (0.23.0)
+    tty-prompt (0.23.1)
       pastel (~> 0.8)
       tty-reader (~> 0.8)
     tty-reader (0.9.0)
@@ -133,7 +136,7 @@ GEM
       tty-screen (~> 0.8)
       wisper (~> 2.0)
     tty-screen (0.8.1)
-    unicode-display_width (1.7.0)
+    unicode-display_width (2.2.0)
     unicode_utils (1.4.0)
     winrm (2.3.6)
       builder (>= 2.1.2)
@@ -165,4 +168,4 @@ DEPENDENCIES
   test-kitchen
 
 BUNDLED WITH
-   2.1.4
+   2.2.16
index 26a4f44a99dfaa21612e82663a01a5af8bf0dbcd..fa33091a6cc20199374fc238a0f58b9ce7259622 100644 (file)
@@ -1,3 +1,5 @@
 # DO NOT EDIT - This file is being maintained by Chef - use authorized_keys2 instead
 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6Hw67b4cRzXDvs88XSuKpXTJmFyietVqaQvJRedQflurHay5lGdFyzfPF0P+mG9l5O/qlKzXo5xvZNe6YOGcMCuxzOYiw/bAkEd7oHYVXVJr8jWL2zqusBmf5dLZDEjMtUX9w6IQWiuSvm3To3Fsohn2UjUqEi5aULu6h39O1JtcdtmIvjB4iTmIO4Eme8FxubktDImyCvwOAJVsYQASljeaTDa+31ANqMDehXZSRjFKaVECw1RNyvYclmkbj8rLiw648/IV9xRi/SMtZlNyxrcIKQ6hKmmiyaBA6a5QEqWj7OMVYCECAoNwlWKhBmkMx7fwOh1eKKOLFeFz2kdSt grant@home-desktop-key
 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDuVegqS8l8WgH1T1LMGyJ4OvPeI5Kek5f5bYsHy62DLOhd4aDHCjJPegfiKCdpYde/b2kOQuwG90cl1a+6DDvNXvIDarQvfNzNWGONOtb+NM0/+IuAfSeonh8ROWRLW5ciOQi0PuPGnjD9vYdFMKtCh1lyi9KOq9DJNR0HFqEJgoZg8BoclAUdtgPzYU/fVpgwAS5mdBUTIQga3CbVsRcTWLPFKNlgY46eWYEKb9XqZIoa5AlxqH6AtYjaUQBdGzRpo/PW71VZzpZMP/dhf6illQBUyFJXL+PyVZGsckq94fkb6j3E5OkuGT55o4fEVLQaIDh2sIUB5n2emnP5On44kNTCPZiAMAC2weLv9PD7RFgTuxVTa1WsxbDqqaTueHJH1P+K4TNx2w0wfTfxqXjXKQPwGED1+xHWwOQoWT9eSarvUQF1jtQdseNsljPkJtpTiD2CHIUuCohYm0DxGYbQSl7uTLDK5HfuMMhAfBry/kNDb7CFTWKzN98Zbam8fx7e9TnCoL4MOMR8GOZyw/ITMbjmWRV5JGFfNUvqrteb9DLh99ZNDrcAawoESFLQTaXGPNYwCMcsxHxZAo8obfRGM/RbGvS+njfib6tkMwh6H/7uA1MPVLEbLejosMUzylDcfaoqGB5SryzZSVO0f7lx4JadQDCAimGBb0N3Fem8Rw== grant.slater@FRIDAY
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGW+K3RYYU26wSOp0DWA4OA94UeX9AZdk8aaaiV1KopY grant@home
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG+dY7nSVDShpfzDrgs1UaDeFbQUlXVWl4eECFu0Zo3a grant.slater@LONGS22-M
index a5f67e78a2ac26650a84124e7e74ca7aabd09ab6..de66ccbbc370fd30d3d4c1f19a623ccdcac586a3 100644 (file)
@@ -1,2 +1,3 @@
 # DO NOT EDIT - This file is being maintained by Chef - use authorized_keys2 instead
 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyBrnrkjzAJqXtRP0MFKlc3v4fTnrRzzebIFH8YpFRCaLKpIXWVbg5BqXuxHB/vqf/1Gknycb7bgLPbhWr+b50D+nnodiJ35HPqrQVLG6nsqxnbbVXO1IR7KsctL+Wr3GW5pBeWct9GAALn8ACAR8zZ/4V6qXDgUvh0inefcqpks1YgdPdyAGLMFy7hzI5lY8kGh58kVPXMpyJLVnGX0yUjrip9IkPrGBvMDiGDiPwLOfKGDR0s1An1GK2i4k2rPxkZzdQSbqZXaaCw3MNJkDvwSmQNQp4Rprfy5BqptwJg4PLnGGePfYbzsqYA0/Pq4ccO+NPCDxZxb2XuVjgXEg8Q== matt@horntail.openstreetmap.org
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDntpfnmWsP/9nh3JvT/AuNz3t4azrH54vKLrdtovYQ14QC66GA9EyAJel2eamyhevHQw5JU3Ic6H0ycXZus6QNn5vZKBn72/HXc/mvfRO2F5PvWVVF5LROoe1YBmYJugqpRwFekt9pIs49bbu3lZolnmmVT/uQP3sTFgErc/eqBtzgB+0OYijddQl3otzOZaZh1o4YaUvyutVb8ND3D1xgPxavWKW8B3BTDLF/Lr0wyh+CTWc1LtXVifIWpe9Muv+l+iww8AScyryLdMfcrUY+k76HwmkLbNV01hWMbfnB+4KoshFHnpmFN/Q4maoEXQpwP1II3iEKVs6QWFc4dImREtpiUJm5XeznlmfBuMac2gZPyPqSQPoUmxDTV7+umbcpw5IMGKFom6GJJJN2Az40TqNoQBAwnrJrmxzvLU8POpfYdZZfPLUB8l9nELGvIMhbRTBVpq6t99AxqvHlk3hc6yPTBFfltiBDB62QyOIEggbecnMaD1VvAkrthRITNJ9h0zdvrXM+X0pMo1QM8dBqRvrbBD7fr3gy2Oo+/XMsxf6Q8Fd7iu8oU8HYCwDexqZ8y9Nb54dOglWzSEPsTBAWf6PtBtZaXZ/VnNy3zjnJuOA99STQmqH5OPCY0eg6yRE6TILj9J4wWAXytXL9lF5YAW8JIT4+8pa4WhJoUGQz1w== zerebubuth@gmail.com
index 20211c3c89d8f3b77452892b6fd09deff9ad42a0..1eae8a39221227e7573e98df2817068ffaad31fd 100644 (file)
@@ -28,6 +28,8 @@ unset zle_bracketed_paste
 # Keep tramp happy
 if [[ "$TERM" = "dumb" ]]
 then
+    unsetopt PROMPT_SP
+    unsetopt PROMPT_CR
     unsetopt ZLE
 fi
 
index d443f1e409ce5eff9c76c861ca67f2bddb176583..c927b87b5015c539583bc19dde39c1162f542421 100644 (file)
@@ -71,6 +71,10 @@ apache_module "status" do
   variables :hosts => admins["hosts"]
 end
 
+apache_module "brotli" do
+  conf "brotli.conf.erb"
+end
+
 apache_module "deflate" do
   conf "deflate.conf.erb"
 end
index 12daf87ab48ef39d5bf0e1c84b09da69a07c0f9f..9f1efb24f284f6b8d4c725b925f1946c3927418b 100644 (file)
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+unified_mode true
+
 default_action [:create, :enable]
 
 property :conf, :kind_of => String, :name_property => true
index 6658d52a66320e95f8fbb6045b1c0b9ec515a57d..5de2bfcaade352b9623842a44031b02e297e1799 100644 (file)
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+unified_mode true
+
 default_action [:install, :enable]
 
 property :module, :kind_of => String, :name_property => true
index e039e3ac529e93a67a88d04676678205573fd0b8..598f841ff86e131abea1546c3370e38b56577342 100644 (file)
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+unified_mode true
+
 default_action [:create, :enable]
 
 property :site, :kind_of => String, :name_property => true
diff --git a/cookbooks/apache/templates/default/brotli.conf.erb b/cookbooks/apache/templates/default/brotli.conf.erb
new file mode 100644 (file)
index 0000000..7000e59
--- /dev/null
@@ -0,0 +1,12 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+<IfModule mod_deflate.c>
+        <IfModule mod_filter.c>
+                AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml
+                AddOutputFilterByType BROTLI_COMPRESS text/css
+                AddOutputFilterByType BROTLI_COMPRESS application/x-javascript application/javascript application/ecmascript
+                AddOutputFilterByType BROTLI_COMPRESS application/rss+xml
+                AddOutputFilterByType BROTLI_COMPRESS application/xml
+                AddOutputFilterByType BROTLI_COMPRESS image/svg+xml
+        </IfModule>
+</IfModule>
index 6ab6afb7ecaf793a2a64777e30ef812f71608e31..f69db4f3e553cd725acf2e97af0bced2d6dab2dc 100644 (file)
@@ -58,11 +58,6 @@ repository_actions = Hash.new do |_, repository|
   node[:apt][:sources].include?(repository) ? :add : :remove
 end
 
-apt_repository "brightbox-ruby-ng" do
-  action repository_actions["brightbox-ruby-ng"]
-  uri "ppa:brightbox/ruby-ng"
-end
-
 apt_repository "ubuntugis-stable" do
   action repository_actions["ubuntugis-stable"]
   uri "ppa:ubuntugis/ppa"
@@ -88,21 +83,6 @@ apt_repository "openstreetmap" do
   uri "ppa:osmadmins/ppa"
 end
 
-apt_repository "squid2" do
-  action repository_actions["squid2"]
-  uri "ppa:osmadmins/squid2"
-end
-
-apt_repository "squid3" do
-  action repository_actions["squid3"]
-  uri "ppa:osmadmins/squid3"
-end
-
-apt_repository "squid4" do
-  action repository_actions["squid4"]
-  uri "ppa:osmadmins/squid4"
-end
-
 apt_repository "management-component-pack" do
   action repository_actions["management-component-pack"]
   uri "https://downloads.linux.hpe.com/SDR/repo/mcp"
@@ -135,9 +115,9 @@ apt_repository "elasticsearch5.x" do
   key "D27D666CD88E42B4"
 end
 
-apt_repository "elasticsearch6.x" do
-  action repository_actions["elasticsearch6.x"]
-  uri "https://artifacts.elastic.co/packages/6.x/apt"
+apt_repository "elasticsearch8.x" do
+  action repository_actions["elasticsearch8.x"]
+  uri "https://artifacts.elastic.co/packages/8.x/apt"
   distribution "stable"
   components ["main"]
   key "D27D666CD88E42B4"
@@ -158,14 +138,6 @@ apt_repository "postgresql" do
   key "7FCC7D46ACCC4CF8"
 end
 
-apt_repository "mediawiki" do
-  action repository_actions["mediawiki"]
-  uri "https://releases.wikimedia.org/debian"
-  distribution "jessie-mediawiki"
-  components ["main"]
-  key "AF380A3036A03444"
-end
-
 apt_repository "docker" do
   action repository_actions["docker"]
   uri "https://download.docker.com/linux/ubuntu"
@@ -184,7 +156,9 @@ end
 
 apt_repository "timescaledb" do
   action repository_actions["timescaledb"]
-  uri "ppa:timescale/timescaledb-ppa"
+  uri "https://packagecloud.io/timescale/timescaledb/ubuntu"
+  components ["main"]
+  key "https://packagecloud.io/timescale/timescaledb/gpgkey"
 end
 
 package "unattended-upgrades"
index 0cd75a5029dba6cbafceb5effec5f58f4be775ab..81834d43711197c1a129044b68b25f379d98ef96 100644 (file)
@@ -48,14 +48,18 @@ my $keep = qr/^${prefix}(?:${dates})\./;
 
 opendir(DIR, "$dir") || die "Can't open ${dir}: $!";
 
-while (my $file = readdir(DIR))
-{
-#    print "Expiring $file\n" if $file =~ $match && $file !~ $keep;
-    unlink("${dir}/${file}") if $file =~ $match && $file !~ $keep;
-}
+my @files = sort(grep($match, readdir(DIR)));
 
 closedir(DIR);
 
+pop @files;
+
+for my $file (@files)
+{
+#    print "Expiring $file\n" if $file !~ $keep;
+    unlink("${dir}/${file}") if $file !~ $keep;
+}
+
 exit 0;
 
 sub Monday
index dc4f7e15ea74f394fc6d29a02f4c2a2bba6e5144..bcdc6aaa237bc51671aef823789d4e7ec81c1081 100644 (file)
@@ -2,7 +2,7 @@
 
 # DO NOT EDIT - This file is being maintained by Chef
 
-for prefix in chef-server chef-repository chef-git forum git lists munin osm-blog osm-donate osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org
+for prefix in blogs chef-server chef-repository chef-git community forum git lists munin osm-blog osm-donate osmf-crm osmf-ledgersmb wiki-wiki.osmfoundation.org osqa otrs prometheus sotm svn switch2osm trac wiki-board.osmfoundation.org wiki-dwg.osmfoundation.org wiki-mwg.osmfoundation.org wiki-wiki.openstreetmap.org
 do
   /usr/local/bin/expire-backups --days=3 --weeks=3 --months=3 /store/backup $prefix
 done
index 77c777e1a19e05d27babf440798f58e8639a8417..78db7466f5a3e8e5c3794060cc66228138c41f02 100644 (file)
@@ -31,13 +31,7 @@ end.flatten
 
 package "bind9"
 
-service_name = if node[:lsb][:release].to_f < 20.04
-                 "bind9"
-               else
-                 "named"
-               end
-
-service service_name do
+service "named" do
   action [:enable, :start]
 end
 
@@ -46,7 +40,7 @@ template "/etc/bind/named.conf.local" do
   owner "root"
   group "root"
   mode "644"
-  notifies :restart, "service[#{service_name}]"
+  notifies :restart, "service[named]"
 end
 
 template "/etc/bind/named.conf.options" do
@@ -55,7 +49,7 @@ template "/etc/bind/named.conf.options" do
   group "root"
   mode "644"
   variables :ipv4_clients => ipv4_clients, :ipv6_clients => ipv6_clients
-  notifies :restart, "service[#{service_name}]"
+  notifies :restart, "service[named]"
 end
 
 template "/etc/bind/db.10" do
@@ -63,7 +57,7 @@ template "/etc/bind/db.10" do
   owner "root"
   group "root"
   mode "644"
-  notifies :reload, "service[#{service_name}]"
+  notifies :reload, "service[named]"
 end
 
 firewall_rule "accept-dns-udp" do
index 05dc9d618caed69aac6bf684102624a036fdb8db..55c99e6f68d9c62649eba9ed8e797cc051405290 100644 (file)
@@ -2,7 +2,7 @@
 
 $TTL   604800
 @      IN      SOA     <%= node[:fdqn] %>. root.openstreetmap.org. (
-                     2019040301                ; Serial
+                     2021092001                ; Serial
                          604800                ; Refresh
                           86400                ; Retry
                         2419200                ; Expire
@@ -11,6 +11,7 @@ $TTL  604800
 @              IN      NS      <%= node[:fdqn] %>.
 
 3.0.0          IN      PTR     ridley.ucl.openstreetmap.org.
+4.0.0          IN      PTR     snap-02.ucl.openstreetmap.org.
 5.0.0          IN      PTR     norbert.ucl.openstreetmap.org.
 6.0.0          IN      PTR     urmel.ucl.openstreetmap.org.
 7.0.0          IN      PTR     faffy.ucl.openstreetmap.org.
@@ -21,7 +22,7 @@ $TTL  604800
 12.0.0         IN      PTR     sarel.ucl.openstreetmap.org.
 13.0.0         IN      PTR     noquiklos.ucl.openstreetmap.org.
 14.0.0         IN      PTR     errol.ucl.openstreetmap.org.
-15.0.0         IN      PTR     yevaud.ucl.openstreetmap.org.
+15.0.0         IN      PTR     ysera.ucl.openstreetmap.org.
 17.0.0         IN      PTR     clifford.ucl.openstreetmap.org.
 19.0.0         IN      PTR     grindtooth.ucl.openstreetmap.org.
 20.0.0         IN      PTR     pummelzacken.ucl.openstreetmap.org.
@@ -39,6 +40,7 @@ $TTL  604800
 51.0.0         IN      PTR     tiamat-23.ucl.openstreetmap.org.
 
 3.1.0          IN      PTR     ridley.oob.openstreetmap.org.
+4.1.0          IN      PTR     snap-02.oob.openstreetmap.org.
 5.1.0          IN      PTR     norbert.oob.openstreetmap.org.
 6.1.0          IN      PTR     urmel.oob.openstreetmap.org.
 8.1.0          IN      PTR     zark.oob.openstreetmap.org.
@@ -48,7 +50,7 @@ $TTL  604800
 12.1.0         IN      PTR     sarel.oob.openstreetmap.org.
 13.1.0         IN      PTR     noquiklos.oob.openstreetmap.org.
 14.1.0         IN      PTR     errol.oob.openstreetmap.org.
-15.1.0         IN      PTR     yevaud.oob.openstreetmap.org.
+15.1.0         IN      PTR     ysera.oob.openstreetmap.org.
 17.1.0         IN      PTR     clifford.oob.openstreetmap.org.
 19.1.0         IN      PTR     grindtooth.oob.openstreetmap.org.
 20.1.0         IN      PTR     pummelzacken.oob.openstreetmap.org.
@@ -82,12 +84,6 @@ $TTL 604800
 41.33.0                IN      PTR     thorn-04.oob.openstreetmap.org.
 42.33.0                IN      PTR     thorn-05.oob.openstreetmap.org.
 
-3.48.0         IN      PTR     orm.ams.openstreetmap.org.
-4.48.0         IN      PTR     ouroboros.ams.openstreetmap.org.
-5.48.0         IN      PTR     ramoth.ams.openstreetmap.org.
-6.48.0         IN      PTR     spike-01.ams.openstreetmap.org.
-7.48.0         IN      PTR     spike-02.ams.openstreetmap.org.
-8.48.0         IN      PTR     spike-03.ams.openstreetmap.org.
 9.48.0         IN      PTR     dulcy.ams.openstreetmap.org.
 10.48.0                IN      PTR     ironbelly.ams.openstreetmap.org.
 11.48.0                IN      PTR     spike-06.ams.openstreetmap.org.
@@ -95,19 +91,15 @@ $TTL        604800
 13.48.0                IN      PTR     spike-08.ams.openstreetmap.org.
 14.48.0                IN      PTR     tabaluga.ams.openstreetmap.org.
 15.48.0                IN      PTR     odin.ams.openstreetmap.org.
+16.48.0                IN      PTR     lockheed.ams.openstreetmap.org.
+49.48.0                IN      PTR     snap-01.ams.openstreetmap.org.
 50.48.0                IN      PTR     karm.ams.openstreetmap.org.
-51.48.0                IN      PTR     thorn-01.ams.openstreetmap.org.
 52.48.0                IN      PTR     thorn-02.ams.openstreetmap.org.
 53.48.0                IN      PTR     thorn-03.ams.openstreetmap.org.
-100.48.0       IN      PTR     pdu1.openstreetmap.org.
-101.48.0       IN      PTR     pdu2.openstreetmap.org.
+100.48.0       IN      PTR     pdu1.ams.openstreetmap.org.
+101.48.0       IN      PTR     pdu2.ams.openstreetmap.org.
+102.48.0       IN      PTR     oob1.ams.openstreetmap.org.
 
-3.49.0         IN      PTR     orm.oob.openstreetmap.org.
-4.49.0         IN      PTR     ouroboros.oob.openstreetmap.org.
-5.49.0         IN      PTR     ramoth.oob.openstreetmap.org.
-6.49.0         IN      PTR     spike-01.oob.openstreetmap.org.
-7.49.0         IN      PTR     spike-02.oob.openstreetmap.org.
-8.49.0         IN      PTR     spike-03.oob.openstreetmap.org.
 9.49.0         IN      PTR     dulcy.oob.openstreetmap.org.
 10.49.0                IN      PTR     ironbelly.oob.openstreetmap.org.
 11.49.0                IN      PTR     spike-06.oob.openstreetmap.org.
@@ -115,7 +107,31 @@ $TTL       604800
 13.49.0                IN      PTR     spike-08.oob.openstreetmap.org.
 14.49.0                IN      PTR     tabaluga.oob.openstreetmap.org.
 15.49.0                IN      PTR     odin.oob.openstreetmap.org.
+16.49.0                IN      PTR     lockheed.oob.openstreetmap.org.
+49.49.0                IN      PTR     snap-01.oob.openstreetmap.org.
 50.49.0                IN      PTR     karm.oob.openstreetmap.org.
-51.49.0                IN      PTR     thorn-01.oob.openstreetmap.org.
 52.49.0                IN      PTR     thorn-02.oob.openstreetmap.org.
 53.49.0                IN      PTR     thorn-03.oob.openstreetmap.org.
+
+2.64.0         IN      PTR     fafnir.dub.openstreetmap.org.
+3.64.0         IN      PTR     spike-01.dub.openstreetmap.org.
+4.64.0         IN      PTR     spike-02.dub.openstreetmap.org.
+5.64.0         IN      PTR     spike-03.dub.openstreetmap.org.
+6.64.0         IN      PTR     idris.dub.openstreetmap.org.
+7.64.0         IN      PTR     konqi.dub.openstreetmap.org.
+8.64.0         IN      PTR     naga.dub.openstreetmap.org.
+9.64.0         IN      PTR     culebre.dub.openstreetmap.org.
+50.64.0                IN      PTR     snap-03.dub.openstreetmap.org.
+100.64.0       IN      PTR     pdu1.dub.openstreetmap.org.
+101.64.0       IN      PTR     pdu2.dub.openstreetmap.org.
+102.64.0       IN      PTR     oob1.dub.openstreetmap.org.
+
+2.65.0         IN      PTR     fafnir.oob.openstreetmap.org.
+3.65.0         IN      PTR     spike-01.oob.openstreetmap.org.
+4.65.0         IN      PTR     spike-02.oob.openstreetmap.org.
+5.65.0         IN      PTR     spike-03.oob.openstreetmap.org.
+6.65.0         IN      PTR     idris.oob.openstreetmap.org.
+7.65.0         IN      PTR     konqi.oob.openstreetmap.org.
+8.65.0         IN      PTR     naga.oob.openstreetmap.org.
+9.65.0         IN      PTR     culebre.oob.openstreetmap.org.
+50.65.0                IN      PTR     snap-03.oob.openstreetmap.org.
index 2f80e2b13f78aa2437c9ae905650971a4c540a0e..820731a497b44dba6d9e641f1a5b17597f7fc408 100644 (file)
@@ -53,10 +53,16 @@ wordpress_plugin "blog.openstreetmap.org-google-analytics-for-wordpress" do
 end
 
 wordpress_plugin "blog.openstreetmap.org-google-sitemap-generator" do
+  action :delete
   plugin "google-sitemap-generator"
   site "blog.openstreetmap.org"
 end
 
+# wordpress_plugin "blog.openstreetmap.org-www-xml-sitemap-generator-org" do
+#   plugin "www-xml-sitemap-generator-org"
+#   site "blog.openstreetmap.org"
+# end
+
 wordpress_plugin "blog.openstreetmap.org-shareadraft" do
   plugin "shareadraft"
   site "blog.openstreetmap.org"
@@ -66,7 +72,8 @@ wordpress_plugin "blog.openstreetmap.org-sitepress-multilingual-cms" do
   plugin "sitepress-multilingual-cms"
   site "blog.openstreetmap.org"
   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
-  not_if { ENV["TEST_KITCHEN"] }
+  revision "master"
+  not_if { kitchen? }
 end
 
 wordpress_plugin "blog.openstreetmap.org-wordpress-importer" do
@@ -74,6 +81,11 @@ wordpress_plugin "blog.openstreetmap.org-wordpress-importer" do
   site "blog.openstreetmap.org"
 end
 
+wordpress_plugin "blog.openstreetmap.org-wp-piwik" do
+  plugin "wp-piwik"
+  site "blog.openstreetmap.org"
+end
+
 git "/srv/blog.openstreetmap.org/casts" do
   action :sync
   repository "https://github.com/openstreetmap/opengeodata-podcasts.git"
index 19d88bcfec8c8f80a8ed933c2e449b70d9ba62df..e63df4125a3d0be55db033d4f72203d0bb620fa7 100644 (file)
@@ -9,3 +9,4 @@ supports          "ubuntu"
 depends           "accounts"
 depends           "apache"
 depends           "git"
+depends           "ruby"
index 165befb5e6f391d0f17b40c202bfa590c97b7f79..51e6b62f41f9634f4452a9bb4bfa0b6e44df263c 100644 (file)
 include_recipe "accounts"
 include_recipe "apache"
 include_recipe "git"
-
-ruby_version = if node[:lsb][:release].to_f < 20.04
-                 "2.5"
-               else
-                 "2.7"
-               end
+include_recipe "ruby"
 
 package %W[
-  ruby#{ruby_version}
-  ruby#{ruby_version}-dev
   make
   gcc
   g++
   libsqlite3-dev
+  sqlite3
 ]
 
-gem_package "bundler#{ruby_version}" do
-  package_name "bundler"
-  version "~> 2.1.4"
-  gem_binary "gem#{ruby_version}"
-  options "--format-executable"
-end
-
 directory "/srv/blogs.openstreetmap.org" do
   owner "blogs"
   group "blogs"
@@ -55,22 +42,20 @@ git "/srv/blogs.openstreetmap.org" do
   depth 1
   user "blogs"
   group "blogs"
-  notifies :run, "execute[/srv/blogs.openstreetmap.org/Gemfile]", :immediately
+  notifies :run, "bundle_install[/srv/blogs.openstreetmap.org]", :immediately
 end
 
-execute "/srv/blogs.openstreetmap.org/Gemfile" do
+bundle_install "/srv/blogs.openstreetmap.org" do
   action :nothing
-  command "bundle#{ruby_version} install --deployment"
-  cwd "/srv/blogs.openstreetmap.org"
-  user "blogs"
-  group "blogs"
-  notifies :run, "execute[/srv/blogs.openstreetmap.org]", :immediately
+  options "--deployment"
+  user "root"
+  group "root"
+  notifies :run, "bundle_exec[/srv/blogs.openstreetmap.org]", :immediately
 end
 
-execute "/srv/blogs.openstreetmap.org" do
+bundle_exec "/srv/blogs.openstreetmap.org" do
   action :nothing
-  command "bundle#{ruby_version} exec pluto build -t osm -o build"
-  cwd "/srv/blogs.openstreetmap.org"
+  command "pluto build -t osm -o build"
   user "blogs"
   group "blogs"
 end
@@ -91,7 +76,6 @@ template "/usr/local/bin/blogs-update" do
   owner "root"
   group "root"
   mode "0755"
-  variables :ruby_version => ruby_version
 end
 
 cron_d "blogs" do
@@ -100,3 +84,10 @@ cron_d "blogs" do
   command "/usr/local/bin/blogs-update"
   mailto "admins@openstreetmap.org"
 end
+
+template "/etc/cron.daily/blogs-backup" do
+  source "backup.cron.erb"
+  owner "root"
+  group "root"
+  mode "0755"
+end
diff --git a/cookbooks/blogs/templates/default/backup.cron.erb b/cookbooks/blogs/templates/default/backup.cron.erb
new file mode 100644 (file)
index 0000000..382989a
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+T=$(mktemp -d -t -p /var/tmp blogs.XXXXXXXXXX)
+D=$(date +%Y-%m-%d)
+B=blogs-$D.tar.gz
+
+mkdir $T/blogs-$D
+sqlite3 /srv/blogs.openstreetmap.org/planet.db ".backup $T/blogs-$D/planet.db"
+
+export RSYNC_RSH="ssh -ax"
+
+nice tar --create --dereference --directory=$T blogs-$D | nice gzip --rsyncable -9 > $T/$B
+nice rsync --preallocate --fuzzy $T/$B backup::backup
+
+rm -rf $T
index ef880cdf875151c700f9470134b6526e71220932..15cc82483678222e75d58330689511e8aa9aa99a 100644 (file)
@@ -2,7 +2,7 @@
 
 cd /srv/blogs.openstreetmap.org
 
-/usr/local/bin/bundle<%= @ruby_version %> exec pluto \
+<%= node[:ruby][:bundle] %> exec pluto \
        --quieter \
        --config=/srv/blogs.openstreetmap.org build \
        --dbpath=/srv/blogs.openstreetmap.org \
index 41b03e63adf247b73c9ebb2ac530506811d5ffe1..00c241a9633ed77148997d9114f2cefbdea0c200 100644 (file)
@@ -5,4 +5,4 @@ default[:apt][:sources] = node[:apt][:sources] | ["opscode"]
 default[:chef][:server][:version] = "12.17.33"
 
 # Set the default client version
-default[:chef][:client][:version] = "16.8.14"
+default[:chef][:client][:version] = "17.10.3"
index 8e9f1e3d280295f1b646ff90ebad74f21fc5f107..a2a6e2ba9c91d2c8410a567aa99024a616b41df5 100644 (file)
@@ -5,6 +5,12 @@ class Chef
     class Subversion
       extend Chef::Mixin::ShellOut
 
+      def shell_out!(*args, **options)
+        options = args.pop if options.empty? && args.last.is_a?(Hash)
+
+        super(*args, **options)
+      end
+
       def sync_command
         if current_repository_matches_target_repository?
           c = scm :update, new_resource.svn_arguments, verbose, authentication, proxy, "-r#{revision_int}", new_resource.destination
@@ -42,20 +48,18 @@ class Chef
 
       def svn_info
         command = scm(:info)
-        shell_out!(command, run_options(:cwd => cwd, :returns => [0, 1])).stdout
+        shell_out!(command, **run_options(:cwd => cwd, :returns => [0, 1])).stdout
       end
 
       def revision_int
-        @revision_int ||= begin
-          if new_resource.revision =~ /^\d+$/
-            new_resource.revision
-          else
-            command = scm(:info, new_resource.repository, new_resource.svn_info_args, authentication, "-r#{new_resource.revision}")
-            svn_info = shell_out!(command, run_options(:returns => [0, 1])).stdout
-
-            extract_revision_info(svn_info)
-          end
-        end
+        @revision_int ||= if new_resource.revision =~ /^\d+$/
+                            new_resource.revision
+                          else
+                            command = scm(:info, new_resource.repository, new_resource.svn_info_args, authentication, "-r#{new_resource.revision}")
+                            svn_info = shell_out!(command, **run_options(:returns => [0, 1])).stdout
+
+                            extract_revision_info(svn_info)
+                          end
       end
     end
   end
index 61ac42415fd2a36aeb08c168da46c78fa22e3a79..bd22671a73ced1934610183924c600f1cde64175 100644 (file)
@@ -36,8 +36,14 @@ Dir.glob("#{cache_dir}/chef_*.deb").each do |deb|
   end
 end
 
+ubuntu_release = if node[:lsb][:release].to_f < 22.04
+                   node[:lsb][:release]
+                 else
+                   "20.04"
+                 end
+
 remote_file "#{cache_dir}/#{chef_package}" do
-  source "https://packages.chef.io/files/stable/chef/#{chef_version}/ubuntu/#{node[:lsb][:release]}/#{chef_package}"
+  source "https://packages.chef.io/files/stable/chef/#{chef_version}/ubuntu/#{ubuntu_release}/#{chef_package}"
   owner "root"
   group "root"
   mode "644"
diff --git a/cookbooks/chef/recipes/knife.rb b/cookbooks/chef/recipes/knife.rb
new file mode 100644 (file)
index 0000000..2c96508
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Cookbook:: chef
+# Recipe:: knife
+#
+# Copyright:: 2021, OpenStreetMap Foundation
+#
+# 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
+#
+#     https://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.
+#
+
+package %w[
+  gcc
+  libc6-dev
+  make
+]
+
+chef_gem "knife"
index d5d8d2bc2817c6eeb759ca27f012672ea36fa193..752938bf3fe515935b58ea3afe642296bca3c057 100644 (file)
@@ -17,6 +17,7 @@
 # limitations under the License.
 #
 
+include_recipe "chef::knife"
 include_recipe "git"
 
 keys = data_bag_item("chef", "keys")
index cd4968b734c05452ff75d0d8058a8ac71b615d1c..cd54cf4260e411978c0b6268c7b643a13e2674cb 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 include_recipe "apache"
+include_recipe "chef::knife"
 include_recipe "munin"
 
 # cache_dir = Chef::Config[:file_cache_path]
index b402265c17fffff8be8219c27293490bc965a3dc..28ef5b4345874929661a8c46ff85dbc9e64de4d8 100644 (file)
@@ -5,6 +5,8 @@
 umask 0002
 unset GIT_DIR
 
+knife="/opt/chef/embedded/bin/knife"
+
 while read oldrev newrev refname
 do
   if [[ "$refname" = "refs/heads/master" ]]
@@ -25,17 +27,17 @@ do
       if [[ $file == roles/*.rb ]]
       then
         case "$action" in
-          A|M) knife role from file "${file}";;
-          D) knife role delete -y "${file:t:r}";;
+          A|M) $knife role from file "${file}";;
+          D) $knife role delete -y "${file:t:r}";;
         esac
       elif [[ $file == data_bags/*/*.json ]]
       then
         case "$action" in
           A|M) 
-            knife data bag create "${file:h:t}"
-            knife data bag from file "${file:h:t}" "${file:t}";;
+            $knife data bag create "${file:h:t}"
+            $knife data bag from file "${file:h:t}" "${file:t}";;
           D)
-            knife data bag delete -y "${file:h:t}" "${file:t:r}";;
+            $knife data bag delete -y "${file:h:t}" "${file:t:r}";;
         esac
       elif [[ $file == cookbooks/* ]]
       then
@@ -52,14 +54,14 @@ do
 
     if [[ -n "$updated_cookbooks" ]]
     then
-      knife cookbook upload "${(ou)updated_cookbooks[@]}"
+      $knife cookbook upload "${(ou)updated_cookbooks[@]}"
     fi
 
     if [[ -n "$deleted_cookbooks" ]]
     then
       for cookbook in "${(ou)deleted_cookbooks[@]}"
       do
-        knife cookbook delete -y "$cookbook"
+        $knife cookbook delete -y "$cookbook"
       done
     fi
   fi
index f0143f6f720d0c30a4458f5d8bb54e0d8e8337ed..2375a92c92350fcd247b0e20c60f492f38d79d08 100644 (file)
@@ -1,16 +1,16 @@
-default[:civicrm][:version] = "5.34.0"
+default[:civicrm][:version] = "5.51.1"
 
 default[:civicrm][:extensions][:cividiscount][:name] = "org.civicrm.module.cividiscount"
 default[:civicrm][:extensions][:cividiscount][:repository] = "https://github.com/dlobo/org.civicrm.module.cividiscount.git"
-default[:civicrm][:extensions][:cividiscount][:revision] = "3.8.2"
+default[:civicrm][:extensions][:cividiscount][:revision] = "3.8.4"
 
 default[:civicrm][:extensions][:osm][:name] = "de.systopia.osm"
 default[:civicrm][:extensions][:osm][:repository] = "https://github.com/systopia/de.systopia.osm.git"
-default[:civicrm][:extensions][:osm][:revision] = "1.2.1"
+default[:civicrm][:extensions][:osm][:revision] = "1.3"
 
 default[:civicrm][:extensions][:emailapi][:name] = "org.civicoop.emailapi"
-default[:civicrm][:extensions][:emailapi][:repository] = "https://github.com/CiviCooP/org.civicoop.emailapi.git"
-default[:civicrm][:extensions][:emailapi][:revision] = "1.19"
+default[:civicrm][:extensions][:emailapi][:repository] = "https://lab.civicrm.org/extensions/emailapi.git"
+default[:civicrm][:extensions][:emailapi][:revision] = "2.8"
 
 default[:civicrm][:extensions][:civiruleshttppost][:name] = "org.civicoop.civiruleshttppost"
 default[:civicrm][:extensions][:civiruleshttppost][:repository] = "https://github.com/CiviCooP/org.civicoop.civiruleshttppost.git"
@@ -18,11 +18,11 @@ default[:civicrm][:extensions][:civiruleshttppost][:revision] = "e2c7de5f0fee319
 
 default[:civicrm][:extensions][:civirules][:name] = "org.civicoop.civirules"
 default[:civicrm][:extensions][:civirules][:repository] = "https://lab.civicrm.org/extensions/civirules.git"
-default[:civicrm][:extensions][:civirules][:revision] = "2.22"
+default[:civicrm][:extensions][:civirules][:revision] = "2.43"
 
 default[:civicrm][:extensions][:mailchimp][:name] = "uk.co.vedaconsulting.mailchimp"
 default[:civicrm][:extensions][:mailchimp][:repository] = "https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp.git"
-default[:civicrm][:extensions][:mailchimp][:revision] = "124083b29ab28246883bc83f207498a85f01ecde"
+default[:civicrm][:extensions][:mailchimp][:revision] = "0065ee6de2c2d653e49d10e9563349e8ffb1f9be"
 
 default[:civicrm][:extensions][:username][:name] = "org.openstreetmap.username"
 default[:civicrm][:extensions][:username][:repository] = "https://github.com/grischard/org.openstreetmap.username.git"
@@ -34,4 +34,12 @@ default[:civicrm][:extensions][:donotsendreportemail][:revision] = "3b31c2e0c621
 
 default[:civicrm][:extensions][:shoreditch][:name] = "org.civicrm.shoreditch"
 default[:civicrm][:extensions][:shoreditch][:repository] = "https://github.com/civicrm/org.civicrm.shoreditch.git"
-default[:civicrm][:extensions][:shoreditch][:revision] = "1.0.0-beta.1"
+default[:civicrm][:extensions][:shoreditch][:revision] = "1.0.0-beta.11"
+
+default[:civicrm][:extensions][:membershipextra][:name] = "com.skvare.membershipextra"
+default[:civicrm][:extensions][:membershipextra][:repository] = "https://github.com/lemniscus/com.skvare.membershipextra.git"
+default[:civicrm][:extensions][:membershipextra][:revision] = "1593911d6bfe184b45d59773fed27bab69cbb93a"
+
+default[:civicrm][:extensions][:osmfverifycontributor][:name] = "osmf-verify-contributor"
+default[:civicrm][:extensions][:osmfverifycontributor][:repository] = "https://github.com/openstreetmap/osmf-verify-contributor.git"
+default[:civicrm][:extensions][:osmfverifycontributor][:revision] = "bb0cd61783033fb2e108c30e47224e5a818987f8"
index a8881fc0d898773faf33a35af7216a4e5eab2ed5..a6c4494346f2ef7048660a1f5a83433f48742bf6 100644 (file)
@@ -24,9 +24,9 @@ package %w[
   php-xml
   php-curl
   rsync
-  unzip
   wkhtmltopdf
   php-bcmath
+  php-intl
 ]
 
 cache_dir = Chef::Config[:file_cache_path]
@@ -61,12 +61,6 @@ wordpress_plugin "registration-honeypot" do
   site "join.osmfoundation.org"
 end
 
-wordpress_plugin "sitepress-multilingual-cms" do
-  site "join.osmfoundation.org"
-  repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
-  not_if { ENV["TEST_KITCHEN"] }
-end
-
 wordpress_plugin "contact-form-7" do
   site "join.osmfoundation.org"
 end
@@ -102,22 +96,22 @@ remote_file "#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz" do
   backup false
 end
 
-execute "#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip" do
+archive_file "#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip" do
   action :nothing
-  command "unzip -o -qq #{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip"
-  cwd "/opt/civicrm-#{civicrm_version}"
-  user "wordpress"
+  destination "/opt/civicrm-#{civicrm_version}"
+  overwrite true
+  owner "wordpress"
   group "wordpress"
-  subscribes :run, "remote_file[#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip]", :immediately
+  subscribes :extract, "remote_file[#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip]", :immediately
 end
 
-execute "#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz" do
+archive_file "#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz" do
   action :nothing
-  command "tar -zxf #{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz"
-  cwd "/opt/civicrm-#{civicrm_version}/civicrm"
-  user "wordpress"
+  destination "/opt/civicrm-#{civicrm_version}/civicrm"
+  overwrite true
+  owner "wordpress"
   group "wordpress"
-  subscribes :run, "remote_file[#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz]", :immediately
+  subscribes :extract, "remote_file[#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz]", :immediately
 end
 
 execute "/opt/civicrm-#{civicrm_version}/civicrm" do
@@ -125,8 +119,8 @@ execute "/opt/civicrm-#{civicrm_version}/civicrm" do
   command "rsync --archive --delete /opt/civicrm-#{civicrm_version}/civicrm/ #{civicrm_directory}"
   user "wordpress"
   group "wordpress"
-  subscribes :run, "execute[#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip]", :immediately
-  subscribes :run, "execute[#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz]", :immediately
+  subscribes :run, "archive_file[#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip]", :immediately
+  subscribes :run, "archive_file[#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz]", :immediately
 end
 
 directory "/srv/join.osmfoundation.org/wp-content/uploads" do
diff --git a/cookbooks/community/README.md b/cookbooks/community/README.md
new file mode 100644 (file)
index 0000000..97ee9be
--- /dev/null
@@ -0,0 +1,3 @@
+# Community Cookbook
+
+This installs and configures the community.openstreetmap.org website.
diff --git a/cookbooks/community/attributes/default.rb b/cookbooks/community/attributes/default.rb
new file mode 100644 (file)
index 0000000..68a98c7
--- /dev/null
@@ -0,0 +1 @@
+default[:accounts][:users][:community][:status] = :role
diff --git a/cookbooks/community/metadata.rb b/cookbooks/community/metadata.rb
new file mode 100644 (file)
index 0000000..4d159c4
--- /dev/null
@@ -0,0 +1,13 @@
+name              "community"
+maintainer        "OpenStreetMap Administrators"
+maintainer_email  "admins@openstreetmap.org"
+license           "Apache-2.0"
+description       "Installs and configures community site"
+
+version           "1.0.0"
+supports          "ubuntu"
+depends           "accounts"
+depends           "docker"
+depends           "geoipupdate"
+depends           "git"
+depends           "ssl"
diff --git a/cookbooks/community/recipes/default.rb b/cookbooks/community/recipes/default.rb
new file mode 100644 (file)
index 0000000..89743de
--- /dev/null
@@ -0,0 +1,149 @@
+#
+# Cookbook:: community
+# Recipe:: default
+#
+# Copyright:: 2021, OpenStreetMap Foundation
+#
+# 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
+#
+#     https://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.
+#
+
+include_recipe "accounts"
+include_recipe "docker"
+include_recipe "geoipupdate"
+include_recipe "git"
+include_recipe "ssl"
+
+passwords = data_bag_item("community", "passwords")
+license_keys = data_bag_item("geoipupdate", "license-keys") unless kitchen?
+
+directory "/srv/community.openstreetmap.org" do
+  owner "root"
+  group "root"
+  mode "755"
+end
+
+directory "/srv/community.openstreetmap.org/shared" do
+  owner "community"
+  group "community"
+  mode "755"
+end
+
+git "/srv/community.openstreetmap.org/docker" do
+  action :sync
+  repository "https://github.com/discourse/discourse_docker.git"
+  revision "main"
+  depth 1
+  user "root"
+  group "root"
+  notifies :run, "execute[discourse_container_data_rebuild]"
+  notifies :run, "execute[discourse_container_web_only_bootstrap]"
+  notifies :run, "execute[discourse_container_mail_receiver_rebuild]"
+end
+
+template "/srv/community.openstreetmap.org/docker/containers/data.yml" do
+  source "data.yml.erb"
+  owner "root"
+  group "root"
+  mode "644"
+  variables :passwords => passwords
+  notifies :run, "execute[discourse_container_data_rebuild]"
+end
+
+template "/srv/community.openstreetmap.org/docker/containers/web_only.yml" do
+  source "web_only.yml.erb"
+  owner "root"
+  group "root"
+  mode "644"
+  variables :license_keys => license_keys, :passwords => passwords
+  notifies :run, "execute[discourse_container_web_only_bootstrap]"
+end
+
+template "/srv/community.openstreetmap.org/docker/containers/mail-receiver.yml" do
+  source "mail-receiver.yml.erb"
+  owner "root"
+  group "root"
+  mode "644"
+  variables :passwords => passwords
+  notifies :run, "execute[discourse_container_mail_receiver_rebuild]"
+end
+
+# Destroy Bootstap Start
+execute "discourse_container_data_rebuild" do
+  action :nothing
+  command "./launcher rebuild data"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+end
+
+ssl_certificate "community.openstreetmap.org" do
+  domains ["community.openstreetmap.org", "community.osm.org", "communities.openstreetmap.org", "communities.osm.org"]
+  notifies :run, "execute[discourse_container_web_only_bootstrap]"
+end
+
+execute "discourse_container_data_start" do
+  action :run
+  command "./launcher start data"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+end
+
+execute "discourse_container_web_only_bootstrap" do
+  action :nothing
+  command "./launcher bootstrap web_only"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+  notifies :run, "execute[discourse_container_web_only_destroy]", :immediately
+end
+
+execute "discourse_container_web_only_destroy" do
+  action :nothing
+  command "./launcher destroy web_only"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+  notifies :run, "execute[discourse_container_web_only_start]", :immediately
+end
+
+execute "discourse_container_web_only_start" do
+  action :run
+  command "./launcher start web_only"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+  notifies :run, "execute[discourse_container_data_start]", :before
+end
+
+# Destroy Bootstap Start
+execute "discourse_container_mail_receiver_rebuild" do
+  action :nothing
+  command "./launcher rebuild mail-receiver"
+  cwd "/srv/community.openstreetmap.org/docker/"
+  user "root"
+  group "root"
+end
+
+template "/etc/cron.daily/community-backup" do
+  source "backup.cron.erb"
+  owner "root"
+  group "root"
+  mode "750"
+end
+
+node.default[:prometheus][:exporters][443] = {
+  :name => "community",
+  :address => "#{node[:prometheus][:address]}:443",
+  :sni => "community.openstreetmap.org"
+}
diff --git a/cookbooks/community/templates/default/backup.cron.erb b/cookbooks/community/templates/default/backup.cron.erb
new file mode 100644 (file)
index 0000000..994485c
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+T=$(mktemp -d -t -p /var/tmp community.XXXXXXXXXX)
+D=$(date +%Y-%m-%d)
+B=community-$D.tar.gz
+
+mkdir $T/community-$D
+ln -s /srv/community.openstreetmap.org/docker/containers $T/community-$D/containers
+ln -s /srv/community.openstreetmap.org/shared/web-only $T/community-$D/shared-web-only
+ln -s /srv/community.openstreetmap.org/shared/data/redis_data $T/community-$D/shared-data-redis_data
+ln -s /srv/community.openstreetmap.org/shared/data/postgres_backup $T/community-$D/shared-data-postgres_backup
+
+export RSYNC_RSH="ssh -ax"
+
+nice tar --create --numeric-owner --dereference --directory=$T community-$D | nice gzip --rsyncable -9 > $T/$B
+nice rsync --preallocate --fuzzy $T/$B backup::backup
+
+rm -rf $T
diff --git a/cookbooks/community/templates/default/data.yml.erb b/cookbooks/community/templates/default/data.yml.erb
new file mode 100644 (file)
index 0000000..2aa4de0
--- /dev/null
@@ -0,0 +1,50 @@
+# A container for all things Data, be sure to set a secret password for
+# discourse account, SOME_SECRET is just an example
+#
+
+templates:
+  - "templates/postgres.template.yml"
+  - "templates/redis.template.yml"
+
+# any extra arguments for Docker?
+# docker_args:
+
+params:
+  db_default_text_search_config: "pg_catalog.english"
+
+  ## Set db_shared_buffers to a max of 25% of the total memory.
+  ## will be set automatically by bootstrap based on detected RAM, or you can override
+  db_shared_buffers: "4096MB"
+
+  ## can improve sorting performance, but adds memory usage per-connection
+  #db_work_mem: "40MB"
+
+env:
+  # ensure locale exists in container, you may need to install it
+  LC_ALL: en_US.UTF-8
+  LANG: en_US.UTF-8
+  LANGUAGE: en_US.UTF-8
+
+volumes:
+  - volume:
+        host: /srv/community.openstreetmap.org/shared/data
+        guest: /shared
+  - volume:
+        host: /srv/community.openstreetmap.org/shared/data/log/var-log
+        guest: /var/log
+
+# TODO: SOME_SECRET to a password for the discourse user
+hooks:
+  after_postgres:
+    - exec:
+        stdin: |
+          alter user discourse with password '<%= @passwords["database"] %>';
+        cmd: su - postgres -c 'psql discourse'
+
+        raise_on_fail: false
+    - file:
+        path: /var/spool/cron/crontabs/postgres
+        contents: |
+          # m h  dom mon dow   command
+          # MAILTO=?
+          0 4 * * * /var/lib/postgresql/take-database-backup
diff --git a/cookbooks/community/templates/default/mail-receiver.yml.erb b/cookbooks/community/templates/default/mail-receiver.yml.erb
new file mode 100644 (file)
index 0000000..2d214e9
--- /dev/null
@@ -0,0 +1,51 @@
+## this is the incoming mail receiver container template
+##
+## After making changes to this file, you MUST rebuild
+## /var/discourse/launcher rebuild mail-receiver
+##
+## BE *VERY* CAREFUL WHEN EDITING!
+## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
+## visit http://www.yamllint.com/ to validate this file as needed
+
+base_image: discourse/mail-receiver:release
+update_pups: false
+
+expose:
+  - "2500:25"   # SMTP
+
+env:
+  LC_ALL: en_US.UTF-8
+  LANG: en_US.UTF-8
+  LANGUAGE: en_US.UTF-8
+
+  ## Where e-mail to your forum should be sent.  In general, it's perfectly fine
+  ## to use the same domain as the forum itself here.
+  MAIL_DOMAIN: community.openstreetmap.org
+  POSTCONF_smtpd_tls_key_file: /shared/ssl/ssl.key
+  POSTCONF_smtpd_tls_cert_file: /shared/ssl/ssl.crt
+  POSTCONF_smtpd_tls_security_level: may
+
+  ## The URL of the mail processing endpoint of your Discourse forum.
+  ## This is simply your forum's base URL, with `/admin/email/handle_mail`
+  ## appended.  Be careful if you're running a subfolder setup -- in that case,
+  ## the URL needs to have the subfolder included!
+  DISCOURSE_MAIL_ENDPOINT: 'https://community.openstreetmap.org/admin/email/handle_mail'
+
+  ## The master API key of your Discourse forum.  You can get this from
+  ## the "API" tab of your admin panel.
+  DISCOURSE_API_KEY: '<%= @passwords["mail_receiver_api_key"] %>'
+
+  ## The username to use for processing incoming e-mail.  Unless you have
+  ## renamed the `system` user, you should leave this as-is.
+  DISCOURSE_API_USERNAME: system
+
+volumes:
+  - volume:
+      host: /srv/community.openstreetmap.org/shared/mail-receiver/postfix-spool
+      guest: /var/spool/postfix
+  - volume:
+      host: /etc/ssl/certs/community.openstreetmap.org.pem
+      guest: /shared/ssl/ssl.crt
+  - volume:
+      host: /etc/ssl/private/community.openstreetmap.org.key
+      guest: /shared/ssl/ssl.key
diff --git a/cookbooks/community/templates/default/web_only.yml.erb b/cookbooks/community/templates/default/web_only.yml.erb
new file mode 100644 (file)
index 0000000..5794e49
--- /dev/null
@@ -0,0 +1,116 @@
+templates:
+  - "templates/web.template.yml"
+  - "templates/web.ratelimited.template.yml"
+  - "templates/web.ssl.template.yml"
+
+## which TCP/IP ports should this container expose?
+## If you want Discourse to share a port with another webserver like Apache or nginx,
+## see https://meta.discourse.org/t/17247 for details
+expose:
+  - "80:80"   # http
+  - "443:443" # https
+
+# Use 'links' key to link containers together, aka use Docker --link flag.
+links:
+  - link:
+      name: data
+      alias: data
+
+# any extra arguments for Docker?
+# docker_args:
+
+# Workaround bug: https://github.com/discourse/discourse_docker/pull/505
+# params:
+#  version: v2.8.7
+
+env:
+  LC_ALL: en_US.UTF-8
+  LANG: en_US.UTF-8
+  LANGUAGE: en_US.UTF-8
+  EMBER_CLI_PROD_ASSETS: 1
+  DISCOURSE_FORCE_HTTPS: true
+
+  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
+  ## will be set automatically by bootstrap based on detected CPUs, or you can override
+  UNICORN_WORKERS: 8
+
+  ## TODO: The domain name this Discourse instance will respond to
+  DISCOURSE_HOSTNAME: community.openstreetmap.org
+
+  ## Uncomment if you want the container to be started with the same
+  ## hostname (-h option) as specified above (default "$hostname-$config")
+  #DOCKER_USE_HOSTNAME: true
+
+  ## TODO: List of comma delimited emails that will be made admin and developer
+  ## on initial signup example 'user1@example.com,user2@example.com'
+  DISCOURSE_DEVELOPER_EMAILS: 'operations@openstreetmap.org'
+
+  ## TODO: The SMTP mail server used to validate new accounts and send notifications
+  # SMTP ADDRESS, username, and password are required
+  # WARNING the char '#' in SMTP password can cause problems!
+  DISCOURSE_SMTP_ADDRESS: mail.openstreetmap.org
+  DISCOURSE_SMTP_PORT: 26
+  DISCOURSE_SMTP_USER_NAME:
+  DISCOURSE_SMTP_PASSWORD:
+  # DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
+  DISCOURSE_SMTP_DOMAIN: community.openstreetmap.org
+  DISCOURSE_NOTIFICATION_EMAIL: community@noreply.openstreetmap.org
+
+  ## TODO: configure connectivity to the databases
+  DISCOURSE_DB_SOCKET: ''
+  #DISCOURSE_DB_USERNAME: discourse
+  DISCOURSE_DB_PASSWORD: '<%= @passwords["database"] %>'
+  DISCOURSE_DB_HOST: data
+  DISCOURSE_REDIS_HOST: data
+
+  ## The maxmind geolocation IP address key for IP address lookup
+  ## see https://meta.discourse.org/t/-/137387/23 for details
+<% if @license_keys -%>
+  DISCOURSE_MAXMIND_LICENSE_KEY: '<%= @license_keys[node[:geoipupdate][:account]] %>'
+<% end -%>
+
+volumes:
+  - volume:
+      host: /srv/community.openstreetmap.org/shared/web-only
+      guest: /shared
+  - volume:
+      host: /srv/community.openstreetmap.org/shared/web-only/log/var-log
+      guest: /var/log
+  - volume:
+      host: /etc/ssl/certs/community.openstreetmap.org.pem
+      guest: /shared/ssl/ssl.crt
+  - volume:
+      host: /etc/ssl/private/community.openstreetmap.org.key
+      guest: /shared/ssl/ssl.key
+
+## Plugins go here
+## see https://meta.discourse.org/t/19157 for details
+hooks:
+  after_code:
+    - exec:
+        cd: $home/plugins
+        cmd:
+          - git clone --depth 1 https://github.com/discourse/discourse-oauth2-basic.git
+          - git clone --depth 1 https://github.com/discourse/discourse-solved.git
+          - git clone --depth 1 https://github.com/discourse/discourse-canned-replies.git
+          - git clone --depth 1 https://github.com/discourse/discourse-reactions.git
+          - git clone --depth 1 https://github.com/discourse/discourse-prometheus.git
+          - git clone --depth 1 https://github.com/discourse/discourse-translator.git
+    - exec:
+        cd: $home
+        cmd:
+          - git fetch --depth=1 origin tag v2.8.7 --no-tags
+          - git checkout v2.8.7
+  after_ssl:
+    - replace:
+        filename: "/etc/nginx/conf.d/discourse.conf"
+        from: /listen 80;/
+        to: |
+          listen 80;
+          rewrite ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 permanent;
+
+    - replace:
+        filename: "/etc/nginx/conf.d/discourse.conf"
+        from: /add_header.+/
+        to: |
+          add_header Strict-Transport-Security 'max-age=63072000';
index aadfe47dbab448723064f2f3ad42022e6004dfb5..d52927a7586ae52f5a8b96533d6b56363deef144 100644 (file)
@@ -10,4 +10,5 @@ depends           "accounts"
 depends           "git"
 depends           "postgresql"
 depends           "python"
+depends           "ruby"
 depends           "web"
index 617392701f955f0c31a96f543be0683a4c72b447..520fbe2e86ab1c84a547a3fd209bcc147cf67b15 100644 (file)
@@ -21,15 +21,11 @@ include_recipe "accounts"
 include_recipe "git"
 include_recipe "postgresql"
 include_recipe "python"
+include_recipe "ruby"
 
 passwords = data_bag_item("db", "passwords")
 wal_secrets = data_bag_item("db", "wal-secrets")
 
-ruby_version = node[:passenger][:ruby_version]
-db_version = node[:db][:cluster].split("/").first
-pg_config = "/usr/lib/postgresql/#{db_version}/bin/pg_config"
-function_directory = "/srv/www.openstreetmap.org/rails/db/functions/#{db_version}"
-
 postgresql_munin "openstreetmap" do
   cluster node[:db][:cluster]
   database "openstreetmap"
@@ -41,7 +37,6 @@ directory "/srv/www.openstreetmap.org" do
 end
 
 rails_port "www.openstreetmap.org" do
-  ruby ruby_version
   directory "/srv/www.openstreetmap.org/rails"
   user "rails"
   group "rails"
@@ -52,29 +47,6 @@ rails_port "www.openstreetmap.org" do
   database_name "openstreetmap"
   database_username "openstreetmap"
   database_password passwords["openstreetmap"]
-  gpx_dir "/store/rails/gpx"
-end
-
-directory function_directory do
-  owner "rails"
-  group "rails"
-  mode "755"
-end
-
-execute function_directory do
-  action :nothing
-  command "make BUNDLE=bundle#{ruby_version} PG_CONFIG=#{pg_config} DESTDIR=#{function_directory}"
-  cwd "/srv/www.openstreetmap.org/rails/db/functions"
-  user "rails"
-  group "rails"
-  subscribes :run, "directory[#{function_directory}]"
-  subscribes :run, "git[/srv/www.openstreetmap.org/rails]"
-end
-
-link "/usr/lib/postgresql/#{db_version}/lib/libpgosm.so" do
-  to "#{function_directory}/libpgosm.so"
-  owner "root"
-  group "root"
 end
 
 package %w[
@@ -93,40 +65,68 @@ package %w[
 git "/opt/osmdbt" do
   action :sync
   repository "https://github.com/openstreetmap/osmdbt.git"
-  revision "v0.2"
+  revision "v0.5"
   depth 1
   user "root"
   group "root"
 end
 
-directory "/opt/osmdbt/build-#{db_version}" do
-  owner "root"
-  group "root"
-  mode "755"
-end
-
-execute "/opt/osmdbt/CMakeLists.txt" do
-  action :nothing
-  command "cmake -DPG_CONFIG=/usr/lib/postgresql/#{db_version}/bin/pg_config .."
-  cwd "/opt/osmdbt/build-#{db_version}"
-  user "root"
-  group "root"
-  subscribes :run, "git[/opt/osmdbt]"
-end
-
-execute "/opt/osmdbt/build-#{db_version}/postgresql-plugin/Makefile" do
-  action :nothing
-  command "make"
-  cwd "/opt/osmdbt/build-#{db_version}/postgresql-plugin"
-  user "root"
-  group "root"
-  subscribes :run, "execute[/opt/osmdbt/CMakeLists.txt]"
-end
-
-link "/usr/lib/postgresql/#{db_version}/lib/osm-logical.so" do
-  to "/opt/osmdbt/build-#{db_version}/postgresql-plugin/osm-logical.so"
-  owner "root"
-  group "root"
+node[:postgresql][:versions].each do |db_version|
+  pg_config = "/usr/lib/postgresql/#{db_version}/bin/pg_config"
+  function_directory = "/srv/www.openstreetmap.org/rails/db/functions/#{db_version}"
+
+  directory function_directory do
+    owner "rails"
+    group "rails"
+    mode "755"
+  end
+
+  execute function_directory do
+    action :nothing
+    command "make BUNDLE=#{node[:ruby][:bundle]} PG_CONFIG=#{pg_config} DESTDIR=#{function_directory}"
+    cwd "/srv/www.openstreetmap.org/rails/db/functions"
+    user "rails"
+    group "rails"
+    subscribes :run, "directory[#{function_directory}]"
+    subscribes :run, "git[/srv/www.openstreetmap.org/rails]"
+  end
+
+  link "/usr/lib/postgresql/#{db_version}/lib/libpgosm.so" do
+    to "#{function_directory}/libpgosm.so"
+    owner "root"
+    group "root"
+  end
+
+  directory "/opt/osmdbt/build-#{db_version}" do
+    owner "root"
+    group "root"
+    mode "755"
+  end
+
+  execute "/opt/osmdbt/build-#{db_version}" do
+    action :nothing
+    command "cmake -DPG_CONFIG=/usr/lib/postgresql/#{db_version}/bin/pg_config .."
+    cwd "/opt/osmdbt/build-#{db_version}"
+    user "root"
+    group "root"
+    subscribes :run, "directory[/opt/osmdbt/build-#{db_version}]"
+    subscribes :run, "git[/opt/osmdbt]"
+  end
+
+  execute "/opt/osmdbt/build-#{db_version}/postgresql-plugin/Makefile" do
+    action :nothing
+    command "make"
+    cwd "/opt/osmdbt/build-#{db_version}/postgresql-plugin"
+    user "root"
+    group "root"
+    subscribes :run, "execute[/opt/osmdbt/build-#{db_version}]"
+  end
+
+  link "/usr/lib/postgresql/#{db_version}/lib/osm-logical.so" do
+    to "/opt/osmdbt/build-#{db_version}/postgresql-plugin/osm-logical.so"
+    owner "root"
+    group "root"
+  end
 end
 
 package "lzop"
@@ -146,3 +146,19 @@ template "/usr/local/bin/openstreetmap-wal-e" do
   mode "750"
   variables :s3_key => wal_secrets["s3_key"]
 end
+
+remote_file "/usr/local/bin/wal-g" do
+  action :create
+  source "https://github.com/wal-g/wal-g/releases/download/v1.1/wal-g-pg-ubuntu-20.04-amd64"
+  owner "root"
+  group "root"
+  mode "755"
+end
+
+template "/usr/local/bin/openstreetmap-wal-g" do
+  source "wal-g.erb"
+  owner "root"
+  group "postgres"
+  mode "750"
+  variables :s3_key => wal_secrets["s3_key"]
+end
diff --git a/cookbooks/db/templates/default/wal-g.erb b/cookbooks/db/templates/default/wal-g.erb
new file mode 100644 (file)
index 0000000..867bdac
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+export WALE_S3_PREFIX="s3://openstreetmap-wal/"
+export AWS_ACCESS_KEY_ID="AKIAIQX2LTDOBIW4CZUQ"
+export AWS_SECRET_ACCESS_KEY="<%= @s3_key %>"
+export AWS_REGION="eu-west-2"
+
+exec /usr/local/bin/wal-g "$@" < /dev/null
index 457e46dd090e4936639a5f67e5b48c6e3ad3c2ea..29e665a43dc0934fc0b1bcbb23d75f7436489cff 100644 (file)
@@ -18,5 +18,6 @@ depends           "nodejs"
 depends           "php"
 depends           "postgresql"
 depends           "python"
+depends           "ruby"
 depends           "tools"
 depends           "web"
index e4a977f8a225487b385da6843a8f383942fb0270..d2477273d57e64c982b7a222ed110bac68c8440b 100644 (file)
@@ -31,6 +31,7 @@ include_recipe "nodejs"
 include_recipe "php::fpm"
 include_recipe "postgresql"
 include_recipe "python"
+include_recipe "ruby"
 
 package %w[
   php-cgi
@@ -57,6 +58,7 @@ package %w[
   autoconf
   automake
   libtool
+  libargon2-dev
   libfcgi-dev
   libxml2-dev
   libmemcached-dev
@@ -69,7 +71,10 @@ package %w[
   libpqxx-dev
   libcrypto++-dev
   libyajl-dev
+  libfmt-dev
   zlib1g-dev
+  nano
+  osm2pgsql
 ]
 
 nodejs_package "svgo"
@@ -201,9 +206,9 @@ search(:accounts, "*:*").each do |account|
   end
 end
 
-if node[:postgresql][:clusters][:"12/main"]
+if node[:postgresql][:clusters][:"14/main"]
   postgresql_user "apis" do
-    cluster "12/main"
+    cluster "14/main"
   end
 
   template "/usr/local/bin/cleanup-rails-assets" do
@@ -214,14 +219,12 @@ if node[:postgresql][:clusters][:"12/main"]
     mode "755"
   end
 
-  ruby_version = node[:passenger][:ruby_version]
-
   systemd_service "rails-jobs@" do
     description "Rails job queue runner"
     type "simple"
     user "apis"
     working_directory "/srv/%i.apis.dev.openstreetmap.org/rails"
-    exec_start "/usr/local/bin/bundle#{ruby_version} exec rake jobs:work"
+    exec_start "#{node[:ruby][:bundle]} exec rails jobs:work"
     restart "on-failure"
     private_tmp true
     private_devices true
@@ -247,6 +250,10 @@ if node[:postgresql][:clusters][:"12/main"]
 
   cgimap_port = 9000
 
+  Dir.glob("/srv/*.apis.dev.openstreetmap.org").each do |dir|
+    node.default_unless[:dev][:rails][File.basename(dir).split(".").first] = {}
+  end
+
   node[:dev][:rails].each do |name, details|
     database_name = details[:database] || "apis_#{name}"
     site_name = "#{name}.apis.dev.openstreetmap.org"
@@ -261,12 +268,12 @@ if node[:postgresql][:clusters][:"12/main"]
       secret_key_base = persistent_token("dev", "rails", name, "secret_key_base")
 
       postgresql_database database_name do
-        cluster "12/main"
+        cluster "14/main"
         owner "apis"
       end
 
       postgresql_extension "#{database_name}_btree_gist" do
-        cluster "12/main"
+        cluster "14/main"
         database database_name
         extension "btree_gist"
       end
@@ -302,13 +309,12 @@ if node[:postgresql][:clusters][:"12/main"]
       end
 
       rails_port site_name do
-        ruby ruby_version
         directory rails_directory
         user "apis"
         group "apis"
         repository details[:repository]
         revision details[:revision]
-        database_port node[:postgresql][:clusters][:"12/main"][:port]
+        database_port node[:postgresql][:clusters][:"14/main"][:port]
         database_name database_name
         database_username "apis"
         email_from "OpenStreetMap <web@noreply.openstreetmap.org>"
@@ -352,7 +358,7 @@ if node[:postgresql][:clusters][:"12/main"]
           cwd cgimap_directory
           user "apis"
           group "apis"
-          subscribes :run, "git[#{cgimap_directory}]", :immediate
+          subscribes :run, "git[#{cgimap_directory}]", :immediately
         end
 
         execute "#{cgimap_directory}/configure" do
@@ -361,7 +367,7 @@ if node[:postgresql][:clusters][:"12/main"]
           cwd cgimap_directory
           user "apis"
           group "apis"
-          subscribes :run, "execute[#{cgimap_directory}/autogen.sh]", :immediate
+          subscribes :run, "execute[#{cgimap_directory}/autogen.sh]", :immediately
         end
 
         execute "#{cgimap_directory}/Makefile" do
@@ -370,7 +376,7 @@ if node[:postgresql][:clusters][:"12/main"]
           cwd cgimap_directory
           user "apis"
           group "apis"
-          subscribes :run, "execute[#{cgimap_directory}/configure]", :immediate
+          subscribes :run, "execute[#{cgimap_directory}/configure]", :immediately
           notifies :restart, "service[cgimap@#{name}]"
         end
 
@@ -380,7 +386,7 @@ if node[:postgresql][:clusters][:"12/main"]
           group "root"
           mode "640"
           variables :cgimap_port => cgimap_port,
-                    :database_port => node[:postgresql][:clusters][:"12/main"][:port],
+                    :database_port => node[:postgresql][:clusters][:"14/main"][:port],
                     :database_name => database_name,
                     :log_directory => log_directory
           notifies :restart, "service[cgimap@#{name}]"
@@ -433,6 +439,10 @@ if node[:postgresql][:clusters][:"12/main"]
         action :delete
       end
 
+      service "rails-jobs@#{name}" do
+        action [:stop, :disable]
+      end
+
       directory site_directory do
         action :delete
         recursive true
@@ -444,7 +454,7 @@ if node[:postgresql][:clusters][:"12/main"]
 
       postgresql_database database_name do
         action :drop
-        cluster "12/main"
+        cluster "14/main"
       end
     end
   end
index b9f71ee7ae1484f7b7648832f6589be12e137a75..743599b527bba6edf8c7d4a379ef01a3e7ade6ad 100644 (file)
@@ -8,3 +8,7 @@ CGIMAP_LOGFILE="<%= @log_directory %>/cgimap.log"
 CGIMAP_MEMCACHE="127.0.0.1"
 CGIMAP_RATELIMIT="204800"
 CGIMAP_MAXDEBT="250"
+CGIMAP_MAP_AREA="<%= node[:web][:max_request_area] %>"
+CGIMAP_MAP_NODES"<%= node[:web][:max_number_of_nodes] %>"
+CGIMAP_MAX_WAY_NODES="<%= node[:web][:max_number_of_way_nodes] %>"
+CGIMAP_MAX_RELATION_MEMBERS="<%= node[:web][:max_number_of_relation_members] %>"
index 3b4ab2fba87e97d6e992cfe023601b0d7c022375..f1ec142485c69cd1266fa0f9471d6be256f72c58 100644 (file)
@@ -5,6 +5,6 @@ You've reached errol, the OpenStreetMap dev server. <br />
 <dt>If you are a user...</dt>
 <dd>You probably want <a href="https://www.openstreetmap.org/">OpenStreetMap</a> itself.</dd>
 <dt>If you are a developer...</dt>
-<dd>You might be interested in <a href="https://apis.dev.openstreetmap.org/">live instances</a> of various <a href="https://wiki.openstreetmap.org/index.php/The_Rails_Port#Installation_on_Debian">Rails Port</a> code branches in <a href="https://svn.openstreetmap.org/sites/rails_port_branches/">SVN</a> for testing clients against.</dd>
+<dd>You might be interested in <a href="https://apis.dev.openstreetmap.org/">live instances</a> of various <a href="https://github.com/openstreetmap/openstreetmap-website#readme">Rails Port</a> code branches for testing clients against.</dd>
 </body>
 </html>
index ad42b68f723ed186eed5de0a80a436020c8f8d04..c25ea13e2f2d96ccdfccb79bdd8b4007dc13d105 100644 (file)
@@ -51,4 +51,36 @@ OpenStreetMap::Application.config.after_initialize do
       OAUTH_KEY = website.key
     end
   end
+
+  if ActiveRecord::Base.connection.table_exists?(:oauth_applications)
+    unless id = webmaster.oauth2_applications.find_by_name("iD")
+      id = webmaster.oauth2_applications.new
+      id.name = "iD"
+      id.redirect_uri = "https://<%= @site %>/id"
+      id.scopes = Oauth.scopes.map(&:name)
+      id.confidential = true
+      id.save!
+    end
+
+    if Kernel.const_defined?("Settings")
+      Settings.id_application = id.uid
+    else
+      ID_APPLICATION = id.uid
+    end
+
+    unless website = webmaster.oauth2_applications.find_by_name("Web Site")
+      website = webmaster.oauth2_applications.new
+      website.name = "Web Site"
+      website.redirect_uri = "https://<%= @site %>/"
+      website.scopes = Oauth.scopes.map(&:name)
+      website.confidential = true
+      website.save!
+    end
+
+    if Kernel.const_defined?("Settings")
+      Settings.oauth_application = website.uid
+    else
+      OAUTH_APPLICATION = website.uid
+    end
+  end
 end
index 2c687566ceae531e237a6d4c5a76a9baa13fbcfb..be990389110e34fa05a7ce398c662a6fb63f5ccc 100644 (file)
@@ -92,6 +92,9 @@ SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x1f41
 # Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T
 SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x37d2", RUN+="/sbin/ethtool -G $name rx 4096 tx 4096"
 
+# Disable Firmware Based LLDP handler
+SUBSYSTEM=="net", ACTION=="add", ENV{INTERFACE}=="*", DRIVERS=="i40e", RUN+="/sbin/ethtool --set-priv-flags $name disable-fw-lldp on"
+
 # Workaround unreliable Western Digital WD RE3/RE4 disks (ATA only)
 # Set sufficent Linux subsystem timeout and fix severe NCQ performance issue
 ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD5002ABYS-02B1B0", ATTR{device/timeout}="90", ATTR{device/queue_depth}="1", ATTR{queue/nr_requests}="256"
index a8f0dd6f7a52a9affb1119584a1669c16988bbbf..4304ce006a8ef792aa365dd76d3bdbc4eb0393dc 100644 (file)
 
 include_recipe "networking"
 
-package "isc-dhcp-server"
+package %w[
+  isc-dhcp-server
+  tftpd-hpa
+]
+
+service "tftpd-hpa" do
+  action [:enable, :start]
+  supports :status => true, :restart => true
+end
+
+remote_file "/srv/tftp/netboot.xyz.efi" do
+  action :create
+  source "https://boot.netboot.xyz/ipxe/netboot.xyz.efi"
+  owner "root"
+  group "root"
+  mode "644"
+end
+
+remote_file "/srv/tftp/netboot.xyz.kpxe" do
+  action :create
+  source "https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe"
+  owner "root"
+  group "root"
+  mode "644"
+end
 
 domain = "#{node[:networking][:roles][:external][:zone]}.openstreetmap.org"
 
@@ -36,3 +60,7 @@ service "isc-dhcp-server" do
   supports :status => true, :restart => true
   subscribes :restart, "template[/etc/dhcp/dhcpd.conf]"
 end
+
+service "isc-dhcp-server6" do
+  action [:disable, :stop]
+end
index af2496deccbc36ce8bf3d67d8490e876641de9fd..b5c8dae33cd7efd88acb338b37465d4eaa492226 100644 (file)
@@ -1,5 +1,7 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
+option architecture-type code 93 = unsigned integer 16;
+
 default-lease-time 600;
 max-lease-time 7200;
 <% node.interfaces(:role => :internal).each do |interface| -%>
@@ -12,9 +14,26 @@ subnet <%= interface[:network] %> netmask <%= interface[:netmask] %> {
   option domain-name "<%= @domain %>";
   option domain-name-servers <%= interface[:gateway] %>;
   option ntp-servers <%= node[:ntp][:servers].first %>;
+
+  class "pxeclients" {
+    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
+    next-server <%= interface[:gateway] %>;
+
+    if option architecture-type = 00:07 {
+      filename "netboot.xyz.efi";
+    } else {
+      filename "netboot.xyz.kpxe";
+    }
+  }
 }
 <% end -%>
 
+host oob1.ams.openstreetmap.org {
+  hardware ethernet ea:e4:8e:c2:5b:19;
+  server-name "oob1.ams.openstreetmap.org";
+  fixed-address oob1.ams.openstreetmap.org;
+}
+
 host pdu1.ams.openstreetmap.org {
   hardware ethernet 00:c0:b7:e3:e8:f2;
   server-name "pdu1.ams.openstreetmap.org";
@@ -27,12 +46,36 @@ host pdu2.ams.openstreetmap.org {
   fixed-address pdu2.ams.openstreetmap.org;
 }
 
+host oob1.dub.openstreetmap.org {
+  hardware ethernet 62:bd:62:a6:05:25;
+  server-name "oob1.dub.openstreetmap.org";
+  fixed-address oob1.dub.openstreetmap.org;
+}
+
+host pdu1.dub.openstreetmap.org {
+  hardware ethernet 28:29:86:48:f7:f5;
+  server-name "pdu1.dub.openstreetmap.org";
+  fixed-address pdu1.dub.openstreetmap.org;
+}
+
+host pdu2.dub.openstreetmap.org {
+  hardware ethernet 28:29:86:48:f8:64;
+  server-name "pdu2.dub.openstreetmap.org";
+  fixed-address pdu2.dub.openstreetmap.org;
+}
+
 host clifford.oob.openstreetmap.org {
   hardware ethernet 1c:c1:de:78:20:d6;
   server-name "clifford.oob.openstreetmap.org";
   fixed-address clifford.oob.openstreetmap.org;
 }
 
+host culebre.oob.openstreetmap.org {
+  hardware ethernet 3c:ec:ef:2f:29:41;
+  server-name "culebre.oob.openstreetmap.org";
+  fixed-address culebre.oob.openstreetmap.org;
+}
+
 host draco.oob.openstreetmap.org {
   hardware ethernet 9c:8e:99:25:99:7d;
   server-name "draco.oob.openstreetmap.org";
@@ -63,60 +106,102 @@ host eustace.oob.openstreetmap.org {
   fixed-address eustace.oob.openstreetmap.org;
 }
 
+host fafnir.oob.openstreetmap.org {
+  hardware ethernet 38:63:bb:39:f0:96;
+  server-name "fafnir.oob.openstreetmap.org";
+  fixed-address fafnir.oob.openstreetmap.org;
+}
+
+host gorwen.oob.openstreetmap.org {
+  hardware ethernet d8:9d:67:5f:bd:bc;
+  server-name "gorwen.oob.openstreetmap.org";
+  fixed-address gorwen.oob.openstreetmap.org;
+}
+
 host grindtooth.oob.openstreetmap.org {
   hardware ethernet 98:4b:e1:6d:77:85;
   server-name "grindtooth.oob.openstreetmap.org";
   fixed-address grindtooth.oob.openstreetmap.org;
 }
 
+host horntail.oob.openstreetmap.org {
+  hardware ethernet 3c:ec:ef:82:ac:d2;
+  server-name "horntail.oob.openstreetmap.org";
+  fixed-address horntail.oob.openstreetmap.org;
+}
+
+host idris.oob.openstreetmap.org {
+  hardware ethernet 94:57:a5:50:b5:a0;
+  server-name "idris.oob.openstreetmap.org";
+  fixed-address idris.oob.openstreetmap.org;
+}
+
 host ironbelly.oob.openstreetmap.org {
   hardware ethernet 00:25:90:cd:14:84;
   server-name "ironbelly.oob.openstreetmap.org";
   fixed-address ironbelly.oob.openstreetmap.org;
 }
 
+host jakelong.oob.openstreetmap.org {
+  hardware ethernet d8:9d:67:66:02:9e;
+  server-name "jakelong.oob.openstreetmap.org";
+  fixed-address jakelong.oob.openstreetmap.org;
+}
+
 host karm.oob.openstreetmap.org {
   hardware ethernet 0c:c4:7a:67:cf:c4;
   server-name "karm.oob.openstreetmap.org";
   fixed-address karm.oob.openstreetmap.org;
 }
 
+host konqi.oob.openstreetmap.org {
+  hardware ethernet ec:b1:d7:7a:ea:64;
+  server-name "konqi.oob.openstreetmap.org";
+  fixed-address konqi.oob.openstreetmap.org;
+}
+
+host lockheed.oob.openstreetmap.org {
+  hardware ethernet 44:1e:a1:57:8f:fe;
+  server-name "lockheed.oob.openstreetmap.org";
+  fixed-address lockheed.oob.openstreetmap.org;
+}
+
+host longma.oob.openstreetmap.org {
+  hardware ethernet 3c:ec:ef:2f:6d:4e;
+  server-name "longma.oob.openstreetmap.org";
+  fixed-address longma.oob.openstreetmap.org;
+}
+
+host naga.oob.openstreetmap.org {
+  hardware ethernet 94:57:a5:5f:11:f2;
+  server-name "naga.oob.openstreetmap.org";
+  fixed-address naga.oob.openstreetmap.org;
+}
+
 host noquiklos.oob.openstreetmap.org {
   hardware ethernet 18:a9:05:70:b0:1e;
   server-name "noquiklos.oob.openstreetmap.org";
   fixed-address noquiklos.oob.openstreetmap.org;
 }
 
+host norbert.oob.openstreetmap.org {
+  hardware ethernet 3c:ec:ef:82:ac:cf;
+  server-name "norbert.oob.openstreetmap.org";
+  fixed-address norbert.oob.openstreetmap.org;
+}
+
 host odin.oob.openstreetmap.org {
   hardware ethernet ac:1f:6b:c0:59:a3;
   server-name "odin.oob.openstreetmap.org";
   fixed-address odin.oob.openstreetmap.org;
 }
 
-host orm.oob.openstreetmap.org {
-  hardware ethernet 00:e0:81:c5:26:80;
-  server-name "orm.oob.openstreetmap.org";
-  fixed-address orm.oob.openstreetmap.org;
-}
-
-host ouroboros.oob.openstreetmap.org {
-  hardware ethernet d4:85:64:4c:3d:00;
-  server-name "ouroboros.oob.openstreetmap.org";
-  fixed-address ouroboros.oob.openstreetmap.org;
-}
-
 host pummelzacken.oob.openstreetmap.org {
   hardware ethernet 00:25:90:cf:72:73;
   server-name "pummelzacken.oob.openstreetmap.org";
   fixed-address pummelzacken.oob.openstreetmap.org;
 }
 
-host ramoth.oob.openstreetmap.org {
-  hardware ethernet 0c:c4:7a:af:75:eb;
-  server-name "ramoth.oob.openstreetmap.org";
-  fixed-address ramoth.oob.openstreetmap.org;
-}
-
 host ridley.oob.openstreetmap.org {
   hardware ethernet d4:85:64:52:2d:d8;
   server-name "ridley.oob.openstreetmap.org";
@@ -141,6 +226,12 @@ host snap-02.oob.openstreetmap.org {
   fixed-address snap-02.oob.openstreetmap.org;
 }
 
+host snap-03.oob.openstreetmap.org {
+  hardware ethernet 3c:ec:ef:82:ab:f2;
+  server-name "snap-03.oob.openstreetmap.org";
+  fixed-address snap-03.oob.openstreetmap.org;
+}
+
 host smaug.oob.openstreetmap.org {
   hardware ethernet 00:30:48:9d:57:ff;
   server-name "smaug.oob.openstreetmap.org";
@@ -148,19 +239,19 @@ host smaug.oob.openstreetmap.org {
 }
 
 host spike-01.oob.openstreetmap.org {
-  hardware ethernet 1c:c1:de:e8:1a:1c;
+  hardware ethernet 3c:a8:2a:11:78:d6;
   server-name "spike-01.oob.openstreetmap.org";
   fixed-address spike-01.oob.openstreetmap.org;
 }
 
 host spike-02.oob.openstreetmap.org {
-  hardware ethernet 68:b5:99:af:d6:9c;
+  hardware ethernet 14:58:d0:5d:74:44;
   server-name "spike-02.oob.openstreetmap.org";
   fixed-address spike-02.oob.openstreetmap.org;
 }
 
 host spike-03.oob.openstreetmap.org {
-  hardware ethernet 1c:c1:de:79:61:98;
+  hardware ethernet 38:63:bb:3a:b0:ce;
   server-name "spike-03.oob.openstreetmap.org";
   fixed-address spike-03.oob.openstreetmap.org;
 }
@@ -249,12 +340,6 @@ host tiamat-23.oob.openstreetmap.org {
   fixed-address tiamat-23.oob.openstreetmap.org;
 }
 
-host thorn-01.oob.openstreetmap.org {
-  hardware ethernet 44:1e:a1:57:8f:fe;
-  server-name "thorn-01.oob.openstreetmap.org";
-  fixed-address thorn-01.oob.openstreetmap.org;
-}
-
 host thorn-02.oob.openstreetmap.org {
   hardware ethernet e4:11:5b:ce:e8:aa;
   server-name "thorn-02.oob.openstreetmap.org";
diff --git a/cookbooks/dmca/files/default/html/HTML/Common.php b/cookbooks/dmca/files/default/html/HTML/Common.php
deleted file mode 100644 (file)
index 8823ea4..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Base class for all HTML classes
- *
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- * 
- * @category    HTML
- * @package     HTML_Common
- * @author      Adam Daniel <adaniel1@eesus.jnj.com>
- * @copyright   2001-2009 The PHP Group
- * @license     http://www.php.net/license/3_01.txt PHP License 3.01
- * @version     CVS: $Id: Common.php,v 1.15 2009/04/03 15:26:22 avb Exp $
- * @link        http://pear.php.net/package/HTML_Common/
- */ 
-
-/**
- * Base class for all HTML classes
- *
- * @category    HTML
- * @package     HTML_Common
- * @author      Adam Daniel <adaniel1@eesus.jnj.com>
- * @version     Release: 1.2.5
- * @abstract
- */
-class HTML_Common
-{
-    /**
-     * Associative array of attributes
-     * @var     array
-     * @access  private
-     */
-    var $_attributes = array();
-
-    /**
-     * Tab offset of the tag
-     * @var     int
-     * @access  private
-     */
-    var $_tabOffset = 0;
-
-    /**
-     * Tab string
-     * @var       string
-     * @since     1.7
-     * @access    private
-     */
-    var $_tab = "\11";
-
-    /**
-     * Contains the line end string
-     * @var       string
-     * @since     1.7
-     * @access    private
-     */
-    var $_lineEnd = "\12";
-
-    /**
-     * HTML comment on the object
-     * @var       string
-     * @since     1.5
-     * @access    private
-     */
-    var $_comment = '';
-
-    /**
-     * Class constructor
-     * @param    mixed   $attributes     Associative array of table tag attributes
-     *                                   or HTML attributes name="value" pairs
-     * @param    int     $tabOffset      Indent offset in tabs
-     * @access   public
-     */
-    function HTML_Common($attributes = null, $tabOffset = 0)
-    {
-        $this->setAttributes($attributes);
-        $this->setTabOffset($tabOffset);
-    } // end constructor
-
-    /**
-     * Returns the current API version
-     * @access   public
-     * @returns  double
-     */
-    function apiVersion()
-    {
-        return 1.7;
-    } // end func apiVersion
-
-    /**
-     * Returns the lineEnd
-     *
-     * @since     1.7
-     * @access    private
-     * @return    string
-     */
-    function _getLineEnd()
-    {
-        return $this->_lineEnd;
-    } // end func getLineEnd
-
-    /**
-     * Returns a string containing the unit for indenting HTML
-     *
-     * @since     1.7
-     * @access    private
-     * @return    string
-     */
-    function _getTab()
-    {
-        return $this->_tab;
-    } // end func _getTab
-
-    /**
-     * Returns a string containing the offset for the whole HTML code
-     *
-     * @return    string
-     * @access   private
-     */
-    function _getTabs()
-    {
-        return str_repeat($this->_getTab(), $this->_tabOffset);
-    } // end func _getTabs
-
-    /**
-     * Returns an HTML formatted attribute string
-     * @param    array   $attributes
-     * @return   string
-     * @access   private
-     */
-    function _getAttrString($attributes)
-    {
-        $strAttr = '';
-
-        if (is_array($attributes)) {
-            $charset = HTML_Common::charset();
-            foreach ($attributes as $key => $value) {
-                $strAttr .= ' ' . $key . '="' . htmlspecialchars($value, ENT_COMPAT, $charset) . '"';
-            }
-        }
-        return $strAttr;
-    } // end func _getAttrString
-
-    /**
-     * Returns a valid atrributes array from either a string or array
-     * @param    mixed   $attributes     Either a typical HTML attribute string or an associative array
-     * @access   private
-     * @return   array
-     */
-    function _parseAttributes($attributes)
-    {
-        if (is_array($attributes)) {
-            $ret = array();
-            foreach ($attributes as $key => $value) {
-                if (is_int($key)) {
-                    $key = $value = strtolower($value);
-                } else {
-                    $key = strtolower($key);
-                }
-                $ret[$key] = $value;
-            }
-            return $ret;
-
-        } elseif (is_string($attributes)) {
-            $preg = "/(([A-Za-z_:]|[^\\x00-\\x7F])([A-Za-z0-9_:.-]|[^\\x00-\\x7F])*)" .
-                "([ \\n\\t\\r]+)?(=([ \\n\\t\\r]+)?(\"[^\"]*\"|'[^']*'|[^ \\n\\t\\r]*))?/";
-            if (preg_match_all($preg, $attributes, $regs)) {
-                for ($counter=0; $counter<count($regs[1]); $counter++) {
-                    $name  = $regs[1][$counter];
-                    $check = $regs[0][$counter];
-                    $value = $regs[7][$counter];
-                    if (trim($name) == trim($check)) {
-                        $arrAttr[strtolower(trim($name))] = strtolower(trim($name));
-                    } else {
-                        if (substr($value, 0, 1) == "\"" || substr($value, 0, 1) == "'") {
-                            $arrAttr[strtolower(trim($name))] = substr($value, 1, -1);
-                        } else {
-                            $arrAttr[strtolower(trim($name))] = trim($value);
-                        }
-                    }
-                }
-                return $arrAttr;
-            }
-        }
-    } // end func _parseAttributes
-
-    /**
-     * Returns the array key for the given non-name-value pair attribute
-     *
-     * @param     string    $attr         Attribute
-     * @param     array     $attributes   Array of attribute
-     * @since     1.0
-     * @access    private
-     * @return    bool
-     */
-    function _getAttrKey($attr, $attributes)
-    {
-        if (isset($attributes[strtolower($attr)])) {
-            return true;
-        } else {
-            return null;
-        }
-    } //end func _getAttrKey
-
-    /**
-     * Updates the attributes in $attr1 with the values in $attr2 without changing the other existing attributes
-     * @param    array   $attr1      Original attributes array
-     * @param    array   $attr2      New attributes array
-     * @access   private
-     */
-    function _updateAttrArray(&$attr1, $attr2)
-    {
-        if (!is_array($attr2)) {
-            return false;
-        }
-        foreach ($attr2 as $key => $value) {
-            $attr1[$key] = $value;
-        }
-    } // end func _updateAtrrArray
-
-    /**
-     * Removes the given attribute from the given array
-     *
-     * @param     string    $attr           Attribute name
-     * @param     array     $attributes     Attribute array
-     * @since     1.4
-     * @access    private
-     * @return    void
-     */
-    function _removeAttr($attr, &$attributes)
-    {
-        $attr = strtolower($attr);
-        if (isset($attributes[$attr])) {
-            unset($attributes[$attr]);
-        }
-    } //end func _removeAttr
-
-    /**
-     * Returns the value of the given attribute
-     *
-     * @param     string    $attr   Attribute name
-     * @since     1.5
-     * @access    public
-     * @return    string|null   returns null if an attribute does not exist
-     */
-    function getAttribute($attr)
-    {
-        $attr = strtolower($attr);
-        if (isset($this->_attributes[$attr])) {
-            return $this->_attributes[$attr];
-        }
-        return null;
-    } //end func getAttribute
-
-    /**
-     * Sets the value of the attribute
-     *
-     * @param   string  Attribute name
-     * @param   string  Attribute value (will be set to $name if omitted)
-     * @access  public
-     */
-    function setAttribute($name, $value = null)
-    {
-        $name = strtolower($name);
-        if (is_null($value)) {
-            $value = $name;
-        }
-        $this->_attributes[$name] = $value;
-    } // end func setAttribute
-
-    /**
-     * Sets the HTML attributes
-     * @param    mixed   $attributes     Either a typical HTML attribute string or an associative array
-     * @access   public
-     */
-    function setAttributes($attributes)
-    {
-        $this->_attributes = $this->_parseAttributes($attributes);
-    } // end func setAttributes
-
-    /**
-     * Returns the assoc array (default) or string of attributes
-     *
-     * @param     bool    Whether to return the attributes as string
-     * @since     1.6
-     * @access    public
-     * @return    mixed   attributes
-     */
-    function getAttributes($asString = false)
-    {
-        if ($asString) {
-            return $this->_getAttrString($this->_attributes);
-        } else {
-            return $this->_attributes;
-        }
-    } //end func getAttributes
-
-    /**
-     * Updates the passed attributes without changing the other existing attributes
-     * @param    mixed   $attributes     Either a typical HTML attribute string or an associative array
-     * @access   public
-     */
-    function updateAttributes($attributes)
-    {
-        $this->_updateAttrArray($this->_attributes, $this->_parseAttributes($attributes));
-    } // end func updateAttributes
-
-    /**
-     * Removes an attribute
-     *
-     * @param     string    $attr   Attribute name
-     * @since     1.4
-     * @access    public
-     * @return    void
-     */
-    function removeAttribute($attr)
-    {
-        $this->_removeAttr($attr, $this->_attributes);
-    } //end func removeAttribute
-
-    /**
-     * Sets the line end style to Windows, Mac, Unix or a custom string.
-     *
-     * @param   string  $style  "win", "mac", "unix" or custom string.
-     * @since   1.7
-     * @access  public
-     * @return  void
-     */
-    function setLineEnd($style)
-    {
-        switch ($style) {
-            case 'win':
-                $this->_lineEnd = "\15\12";
-                break;
-            case 'unix':
-                $this->_lineEnd = "\12";
-                break;
-            case 'mac':
-                $this->_lineEnd = "\15";
-                break;
-            default:
-                $this->_lineEnd = $style;
-        }
-    } // end func setLineEnd
-
-    /**
-     * Sets the tab offset
-     *
-     * @param    int     $offset
-     * @access   public
-     */
-    function setTabOffset($offset)
-    {
-        $this->_tabOffset = $offset;
-    } // end func setTabOffset
-
-    /**
-     * Returns the tabOffset
-     *
-     * @since     1.5
-     * @access    public
-     * @return    int
-     */
-    function getTabOffset()
-    {
-        return $this->_tabOffset;
-    } //end func getTabOffset
-
-    /**
-     * Sets the string used to indent HTML
-     *
-     * @since     1.7
-     * @param     string    $string     String used to indent ("\11", "\t", '  ', etc.).
-     * @access    public
-     * @return    void
-     */
-    function setTab($string)
-    {
-        $this->_tab = $string;
-    } // end func setTab
-
-    /**
-     * Sets the HTML comment to be displayed at the beginning of the HTML string
-     *
-     * @param     string
-     * @since     1.4
-     * @access    public
-     * @return    void
-     */
-    function setComment($comment)
-    {
-        $this->_comment = $comment;
-    } // end func setHtmlComment
-
-    /**
-     * Returns the HTML comment
-     *
-     * @since     1.5
-     * @access    public
-     * @return    string
-     */
-    function getComment()
-    {
-        return $this->_comment;
-    } //end func getComment
-
-    /**
-     * Abstract method.  Must be extended to return the objects HTML
-     *
-     * @access    public
-     * @return    string
-     * @abstract
-     */
-    function toHtml()
-    {
-        return '';
-    } // end func toHtml
-
-    /**
-     * Displays the HTML to the screen
-     *
-     * @access    public
-     */
-    function display()
-    {
-        print $this->toHtml();
-    } // end func display
-
-    /**
-     * Sets the charset to use by htmlspecialchars() function
-     *
-     * Since this parameter is expected to be global, the function is designed
-     * to be called statically:
-     * <code>
-     * HTML_Common::charset('utf-8');
-     * </code>
-     * or
-     * <code>
-     * $charset = HTML_Common::charset();
-     * </code>
-     *
-     * @param   string  New charset to use. Omit if just getting the 
-     *                  current value. Consult the htmlspecialchars() docs 
-     *                  for a list of supported character sets.
-     * @return  string  Current charset
-     * @access  public
-     * @static
-     */
-    function charset($newCharset = null)
-    {
-        static $charset = 'ISO-8859-1';
-
-        if (!is_null($newCharset)) {
-            $charset = $newCharset;
-        }
-        return $charset;
-    } // end func charset
-} // end class HTML_Common
-?>
diff --git a/cookbooks/dmca/files/default/html/HTML/QuickForm.php b/cookbooks/dmca/files/default/html/HTML/QuickForm.php
deleted file mode 100644 (file)
index f769b1f..0000000
+++ /dev/null
@@ -1,2073 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * Create, validate and process HTML forms
- *
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Adam Daniel <adaniel1@eesus.jnj.com>
- * @author      Bertrand Mansion <bmansion@mamasam.com>
- * @author      Alexey Borzov <avb@php.net>
- * @copyright   2001-2011 The PHP Group
- * @license     http://www.php.net/license/3_01.txt PHP License 3.01
- * @version     CVS: $Id$
- * @link        http://pear.php.net/package/HTML_QuickForm
- */
-
-/**
- * PEAR and PEAR_Error classes, for error handling
- */
-require_once 'PEAR.php';
-/**
- * Base class for all HTML classes
- */
-require_once 'HTML/Common.php';
-/**
- * Static utility methods
- */
-require_once 'HTML/QuickForm/utils.php';
-
-/**
- * Element types known to HTML_QuickForm
- * @see HTML_QuickForm::registerElementType(), HTML_QuickForm::getRegisteredTypes(),
- *      HTML_QuickForm::isTypeRegistered()
- * @global array $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES']
- */
-$GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] =
-        array(
-            'group'         =>array('HTML/QuickForm/group.php','HTML_QuickForm_group'),
-            'hidden'        =>array('HTML/QuickForm/hidden.php','HTML_QuickForm_hidden'),
-            'reset'         =>array('HTML/QuickForm/reset.php','HTML_QuickForm_reset'),
-            'checkbox'      =>array('HTML/QuickForm/checkbox.php','HTML_QuickForm_checkbox'),
-            'file'          =>array('HTML/QuickForm/file.php','HTML_QuickForm_file'),
-            'image'         =>array('HTML/QuickForm/image.php','HTML_QuickForm_image'),
-            'password'      =>array('HTML/QuickForm/password.php','HTML_QuickForm_password'),
-            'radio'         =>array('HTML/QuickForm/radio.php','HTML_QuickForm_radio'),
-            'button'        =>array('HTML/QuickForm/button.php','HTML_QuickForm_button'),
-            'submit'        =>array('HTML/QuickForm/submit.php','HTML_QuickForm_submit'),
-            'select'        =>array('HTML/QuickForm/select.php','HTML_QuickForm_select'),
-            'hiddenselect'  =>array('HTML/QuickForm/hiddenselect.php','HTML_QuickForm_hiddenselect'),
-            'text'          =>array('HTML/QuickForm/text.php','HTML_QuickForm_text'),
-            'textarea'      =>array('HTML/QuickForm/textarea.php','HTML_QuickForm_textarea'),
-            'link'          =>array('HTML/QuickForm/link.php','HTML_QuickForm_link'),
-            'advcheckbox'   =>array('HTML/QuickForm/advcheckbox.php','HTML_QuickForm_advcheckbox'),
-            'date'          =>array('HTML/QuickForm/date.php','HTML_QuickForm_date'),
-            'static'        =>array('HTML/QuickForm/static.php','HTML_QuickForm_static'),
-            'header'        =>array('HTML/QuickForm/header.php', 'HTML_QuickForm_header'),
-            'html'          =>array('HTML/QuickForm/html.php', 'HTML_QuickForm_html'),
-            'hierselect'    =>array('HTML/QuickForm/hierselect.php', 'HTML_QuickForm_hierselect'),
-            'autocomplete'  =>array('HTML/QuickForm/autocomplete.php', 'HTML_QuickForm_autocomplete'),
-            'xbutton'       =>array('HTML/QuickForm/xbutton.php','HTML_QuickForm_xbutton')
-        );
-
-/**
- * Validation rules known to HTML_QuickForm
- * @see HTML_QuickForm::registerRule(), HTML_QuickForm::getRegisteredRules(),
- *      HTML_QuickForm::isRuleRegistered()
- * @global array $GLOBALS['_HTML_QuickForm_registered_rules']
- */
-$GLOBALS['_HTML_QuickForm_registered_rules'] = array(
-    'required'      => array('html_quickform_rule_required', 'HTML/QuickForm/Rule/Required.php'),
-    'maxlength'     => array('html_quickform_rule_range',    'HTML/QuickForm/Rule/Range.php'),
-    'minlength'     => array('html_quickform_rule_range',    'HTML/QuickForm/Rule/Range.php'),
-    'rangelength'   => array('html_quickform_rule_range',    'HTML/QuickForm/Rule/Range.php'),
-    'email'         => array('html_quickform_rule_email',    'HTML/QuickForm/Rule/Email.php'),
-    'regex'         => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'lettersonly'   => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'alphanumeric'  => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'numeric'       => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'nopunctuation' => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'nonzero'       => array('html_quickform_rule_regex',    'HTML/QuickForm/Rule/Regex.php'),
-    'callback'      => array('html_quickform_rule_callback', 'HTML/QuickForm/Rule/Callback.php'),
-    'compare'       => array('html_quickform_rule_compare',  'HTML/QuickForm/Rule/Compare.php')
-);
-
-// {{{ error codes
-
-/**#@+
- * Error codes for HTML_QuickForm
- *
- * Codes are mapped to textual messages by errorMessage() method, if you add a
- * new code be sure to add a new message for it to errorMessage()
- *
- * @see HTML_QuickForm::errorMessage()
- */
-define('QUICKFORM_OK',                      1);
-define('QUICKFORM_ERROR',                  -1);
-define('QUICKFORM_INVALID_RULE',           -2);
-define('QUICKFORM_NONEXIST_ELEMENT',       -3);
-define('QUICKFORM_INVALID_FILTER',         -4);
-define('QUICKFORM_UNREGISTERED_ELEMENT',   -5);
-define('QUICKFORM_INVALID_ELEMENT_NAME',   -6);
-define('QUICKFORM_INVALID_PROCESS',        -7);
-define('QUICKFORM_DEPRECATED',             -8);
-define('QUICKFORM_INVALID_DATASOURCE',     -9);
-/**#@-*/
-
-// }}}
-
-/**
- * Create, validate and process HTML forms
- *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Adam Daniel <adaniel1@eesus.jnj.com>
- * @author      Bertrand Mansion <bmansion@mamasam.com>
- * @author      Alexey Borzov <avb@php.net>
- * @version     Release: 3.2.16
- */
-class HTML_QuickForm extends HTML_Common
-{
-    // {{{ properties
-
-    /**
-     * Array containing the form fields
-     * @since     1.0
-     * @var  array
-     * @access   private
-     */
-    var $_elements = array();
-
-    /**
-     * Array containing element name to index map
-     * @since     1.1
-     * @var  array
-     * @access   private
-     */
-    var $_elementIndex = array();
-
-    /**
-     * Array containing indexes of duplicate elements
-     * @since     2.10
-     * @var  array
-     * @access   private
-     */
-    var $_duplicateIndex = array();
-
-    /**
-     * Array containing required field IDs
-     * @since     1.0
-     * @var  array
-     * @access   private
-     */
-    var $_required = array();
-
-    /**
-     * Prefix message in javascript alert if error
-     * @since     1.0
-     * @var  string
-     * @access   public
-     */
-    var $_jsPrefix = 'Invalid information entered.';
-
-    /**
-     * Postfix message in javascript alert if error
-     * @since     1.0
-     * @var  string
-     * @access   public
-     */
-    var $_jsPostfix = 'Please correct these fields.';
-
-    /**
-     * Datasource object implementing the informal
-     * datasource protocol
-     * @since     3.3
-     * @var  object
-     * @access   private
-     */
-    var $_datasource;
-
-    /**
-     * Array of default form values
-     * @since     2.0
-     * @var  array
-     * @access   private
-     */
-    var $_defaultValues = array();
-
-    /**
-     * Array of constant form values
-     * @since     2.0
-     * @var  array
-     * @access   private
-     */
-    var $_constantValues = array();
-
-    /**
-     * Array of submitted form values
-     * @since     1.0
-     * @var  array
-     * @access   private
-     */
-    var $_submitValues = array();
-
-    /**
-     * Array of submitted form files
-     * @since     1.0
-     * @var  integer
-     * @access   public
-     */
-    var $_submitFiles = array();
-
-    /**
-     * Value for maxfilesize hidden element if form contains file input
-     * @since     1.0
-     * @var  integer
-     * @access   public
-     */
-    var $_maxFileSize = 1048576; // 1 Mb = 1048576
-
-    /**
-     * Flag to know if all fields are frozen
-     * @since     1.0
-     * @var  boolean
-     * @access   private
-     */
-    var $_freezeAll = false;
-
-    /**
-     * Array containing the form rules
-     * @since     1.0
-     * @var  array
-     * @access   private
-     */
-    var $_rules = array();
-
-    /**
-     * Form rules, global variety
-     * @var     array
-     * @access  private
-     */
-    var $_formRules = array();
-
-    /**
-     * Array containing the validation errors
-     * @since     1.0
-     * @var  array
-     * @access   private
-     */
-    var $_errors = array();
-
-    /**
-     * Note for required fields in the form
-     * @var       string
-     * @since     1.0
-     * @access    private
-     */
-    var $_requiredNote = '<span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%;"> denotes required field</span>';
-
-    /**
-     * Whether the form was submitted
-     * @var       boolean
-     * @access    private
-     */
-    var $_flagSubmitted = false;
-
-    // }}}
-    // {{{ constructor
-
-    /**
-     * Class constructor
-     * @param    string      $formName          Form's name.
-     * @param    string      $method            (optional)Form's method defaults to 'POST'
-     * @param    string      $action            (optional)Form's action
-     * @param    string      $target            (optional)Form's target defaults to '_self'
-     * @param    mixed       $attributes        (optional)Extra attributes for <form> tag
-     * @param    bool        $trackSubmit       (optional)Whether to track if the form was submitted by adding a special hidden field
-     * @access   public
-     */
-    function HTML_QuickForm($formName='', $method='post', $action='', $target='', $attributes=null, $trackSubmit = false)
-    {
-        HTML_Common::HTML_Common($attributes);
-        $method = (strtoupper($method) == 'GET') ? 'get' : 'post';
-        $action = ($action == '') ? $_SERVER['PHP_SELF'] : $action;
-        $target = empty($target) ? array() : array('target' => $target);
-        $attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target;
-        $this->updateAttributes($attributes);
-        if (!$trackSubmit || isset($_REQUEST['_qf__' . $formName])) {
-            if (1 == get_magic_quotes_gpc()) {
-                $this->_submitValues = $this->_recursiveFilter('stripslashes', 'get' == $method? $_GET: $_POST);
-                foreach ($_FILES as $keyFirst => $valFirst) {
-                    foreach ($valFirst as $keySecond => $valSecond) {
-                        if ('name' == $keySecond) {
-                            $this->_submitFiles[$keyFirst][$keySecond] = $this->_recursiveFilter('stripslashes', $valSecond);
-                        } else {
-                            $this->_submitFiles[$keyFirst][$keySecond] = $valSecond;
-                        }
-                    }
-                }
-            } else {
-                $this->_submitValues = 'get' == $method? $_GET: $_POST;
-                $this->_submitFiles  = $_FILES;
-            }
-            $this->_flagSubmitted = count($this->_submitValues) > 0 || count($this->_submitFiles) > 0;
-        }
-        if ($trackSubmit) {
-            unset($this->_submitValues['_qf__' . $formName]);
-            $this->addElement('hidden', '_qf__' . $formName, null);
-        }
-        if (preg_match('/^([0-9]+)([a-zA-Z]*)$/', ini_get('upload_max_filesize'), $matches)) {
-            // see http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
-            switch (strtoupper($matches['2'])) {
-                case 'G':
-                    $this->_maxFileSize = $matches['1'] * 1073741824;
-                    break;
-                case 'M':
-                    $this->_maxFileSize = $matches['1'] * 1048576;
-                    break;
-                case 'K':
-                    $this->_maxFileSize = $matches['1'] * 1024;
-                    break;
-                default:
-                    $this->_maxFileSize = $matches['1'];
-            }
-        }
-    } // end constructor
-
-    // }}}
-    // {{{ apiVersion()
-
-    /**
-     * Returns the current API version
-     *
-     * @since     1.0
-     * @access    public
-     * @return    float
-     */
-    function apiVersion()
-    {
-        return 3.2;
-    } // end func apiVersion
-
-    // }}}
-    // {{{ registerElementType()
-
-    /**
-     * Registers a new element type
-     *
-     * @param     string    $typeName   Name of element type
-     * @param     string    $include    Include path for element type
-     * @param     string    $className  Element class name
-     * @since     1.0
-     * @access    public
-     * @return    void
-     */
-    function registerElementType($typeName, $include, $className)
-    {
-        $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][strtolower($typeName)] = array($include, $className);
-    } // end func registerElementType
-
-    // }}}
-    // {{{ registerRule()
-
-    /**
-     * Registers a new validation rule
-     *
-     * @param     string    $ruleName   Name of validation rule
-     * @param     string    $type       Either: 'regex', 'function' or 'rule' for an HTML_QuickForm_Rule object
-     * @param     string    $data1      Name of function, regular expression or HTML_QuickForm_Rule classname
-     * @param     string    $data2      Object parent of above function or HTML_QuickForm_Rule file path
-     * @since     1.0
-     * @access    public
-     * @return    void
-     */
-    function registerRule($ruleName, $type, $data1, $data2 = null)
-    {
-        include_once('HTML/QuickForm/RuleRegistry.php');
-        $registry =& HTML_QuickForm_RuleRegistry::singleton();
-        $registry->registerRule($ruleName, $type, $data1, $data2);
-    } // end func registerRule
-
-    // }}}
-    // {{{ elementExists()
-
-    /**
-     * Returns true if element is in the form
-     *
-     * @param     string   $element         form name of element to check
-     * @since     1.0
-     * @access    public
-     * @return    boolean
-     */
-    function elementExists($element=null)
-    {
-        return isset($this->_elementIndex[$element]);
-    } // end func elementExists
-
-    // }}}
-    // {{{ setDatasource()
-
-    /**
-     * Sets a datasource object for this form object
-     *
-     * Datasource default and constant values will feed the QuickForm object if
-     * the datasource implements defaultValues() and constantValues() methods.
-     *
-     * @param     object   $datasource          datasource object implementing the informal datasource protocol
-     * @param     mixed    $defaultsFilter      string or array of filter(s) to apply to default values
-     * @param     mixed    $constantsFilter     string or array of filter(s) to apply to constants values
-     * @since     3.3
-     * @access    public
-     * @return    void
-     * @throws    HTML_QuickForm_Error
-     */
-    function setDatasource(&$datasource, $defaultsFilter = null, $constantsFilter = null)
-    {
-        if (is_object($datasource)) {
-            $this->_datasource =& $datasource;
-            if (is_callable(array($datasource, 'defaultValues'))) {
-                $this->setDefaults($datasource->defaultValues($this), $defaultsFilter);
-            }
-            if (is_callable(array($datasource, 'constantValues'))) {
-                $this->setConstants($datasource->constantValues($this), $constantsFilter);
-            }
-        } else {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_DATASOURCE, null, E_USER_WARNING, "Datasource is not an object in QuickForm::setDatasource()", 'HTML_QuickForm_Error', true);
-        }
-    } // end func setDatasource
-
-    // }}}
-    // {{{ setDefaults()
-
-    /**
-     * Initializes default form values
-     *
-     * @param     array    $defaultValues       values used to fill the form
-     * @param     mixed    $filter              (optional) filter(s) to apply to all default values
-     * @since     1.0
-     * @access    public
-     * @return    void
-     * @throws    HTML_QuickForm_Error
-     */
-    function setDefaults($defaultValues = null, $filter = null)
-    {
-        if (is_array($defaultValues)) {
-            if (isset($filter)) {
-                if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
-                    foreach ($filter as $val) {
-                        if (!is_callable($val)) {
-                            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
-                        } else {
-                            $defaultValues = $this->_recursiveFilter($val, $defaultValues);
-                        }
-                    }
-                } elseif (!is_callable($filter)) {
-                    return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
-                } else {
-                    $defaultValues = $this->_recursiveFilter($filter, $defaultValues);
-                }
-            }
-            $this->_defaultValues = HTML_QuickForm::arrayMerge($this->_defaultValues, $defaultValues);
-            foreach (array_keys($this->_elements) as $key) {
-                $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
-            }
-        }
-    } // end func setDefaults
-
-    // }}}
-    // {{{ setConstants()
-
-    /**
-     * Initializes constant form values.
-     * These values won't get overridden by POST or GET vars
-     *
-     * @param     array   $constantValues        values used to fill the form
-     * @param     mixed    $filter              (optional) filter(s) to apply to all default values
-     *
-     * @since     2.0
-     * @access    public
-     * @return    void
-     * @throws    HTML_QuickForm_Error
-     */
-    function setConstants($constantValues = null, $filter = null)
-    {
-        if (is_array($constantValues)) {
-            if (isset($filter)) {
-                if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
-                    foreach ($filter as $val) {
-                        if (!is_callable($val)) {
-                            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
-                        } else {
-                            $constantValues = $this->_recursiveFilter($val, $constantValues);
-                        }
-                    }
-                } elseif (!is_callable($filter)) {
-                    return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
-                } else {
-                    $constantValues = $this->_recursiveFilter($filter, $constantValues);
-                }
-            }
-            $this->_constantValues = HTML_QuickForm::arrayMerge($this->_constantValues, $constantValues);
-            foreach (array_keys($this->_elements) as $key) {
-                $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this);
-            }
-        }
-    } // end func setConstants
-
-    // }}}
-    // {{{ setMaxFileSize()
-
-    /**
-     * Sets the value of MAX_FILE_SIZE hidden element
-     *
-     * @param     int    $bytes    Size in bytes
-     * @since     3.0
-     * @access    public
-     * @return    void
-     */
-    function setMaxFileSize($bytes = 0)
-    {
-        if ($bytes > 0) {
-            $this->_maxFileSize = $bytes;
-        }
-        if (!$this->elementExists('MAX_FILE_SIZE')) {
-            $this->addElement('hidden', 'MAX_FILE_SIZE', $this->_maxFileSize);
-        } else {
-            $el =& $this->getElement('MAX_FILE_SIZE');
-            $el->updateAttributes(array('value' => $this->_maxFileSize));
-        }
-    } // end func setMaxFileSize
-
-    // }}}
-    // {{{ getMaxFileSize()
-
-    /**
-     * Returns the value of MAX_FILE_SIZE hidden element
-     *
-     * @since     3.0
-     * @access    public
-     * @return    int   max file size in bytes
-     */
-    function getMaxFileSize()
-    {
-        return $this->_maxFileSize;
-    } // end func getMaxFileSize
-
-    // }}}
-    // {{{ &createElement()
-
-    /**
-     * Creates a new form element of the given type.
-     *
-     * This method accepts variable number of parameters, their
-     * meaning and count depending on $elementType
-     *
-     * @param     string     $elementType    type of element to add (text, textarea, file...)
-     * @since     1.0
-     * @access    public
-     * @return    HTML_QuickForm_Element
-     * @throws    HTML_QuickForm_Error
-     */
-    function &createElement($elementType)
-    {
-        $args    =  func_get_args();
-        $element =& HTML_QuickForm::_loadElement('createElement', $elementType, array_slice($args, 1), null);
-        return $element;
-    } // end func createElement
-
-    // }}}
-    // {{{ _loadElement()
-
-    /**
-     * Returns a form element of the given type
-     *
-     * @param     string   $event   event to send to newly created element ('createElement' or 'addElement')
-     * @param     string   $type    element type
-     * @param     array    $args    arguments for event
-     * @since     2.0
-     * @access    private
-     * @return    HTML_QuickForm_Element
-     * @throws    HTML_QuickForm_Error
-     */
-    function &_loadElement($event, $type, $args, $form)
-    {
-        $type = strtolower($type);
-        if (!HTML_QuickForm::isTypeRegistered($type)) {
-            $error = PEAR::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING, "Element '$type' does not exist in HTML_QuickForm::_loadElement()", 'HTML_QuickForm_Error', true);
-            return $error;
-        }
-        $className = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][1];
-        $includeFile = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][0];
-        include_once($includeFile);
-        $elementObject = new $className();
-        for ($i = 0; $i < 5; $i++) {
-            if (!isset($args[$i])) {
-                $args[$i] = null;
-            }
-        }
-        $err = $elementObject->onQuickFormEvent($event, $args, $form);
-        if ($err !== true) {
-            return $err;
-        }
-        return $elementObject;
-    } // end func _loadElement
-
-    // }}}
-    // {{{ addElement()
-
-    /**
-     * Adds an element into the form
-     *
-     * If $element is a string representing element type, then this
-     * method accepts variable number of parameters, their meaning
-     * and count depending on $element
-     *
-     * @param    mixed      $element        element object or type of element to add (text, textarea, file...)
-     * @since    1.0
-     * @return   HTML_QuickForm_Element     a reference to newly added element
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function &addElement($element)
-    {
-        if (is_object($element) && is_subclass_of($element, 'html_quickform_element')) {
-           $elementObject = &$element;
-           $elementObject->onQuickFormEvent('updateValue', null, $this);
-        } else {
-            $args = func_get_args();
-            $elementObject =& $this->_loadElement('addElement', $element, array_slice($args, 1), $this);
-            if (PEAR::isError($elementObject)) {
-                return $elementObject;
-            }
-        }
-        $elementName = $elementObject->getName();
-
-        // Add the element if it is not an incompatible duplicate
-        if (!empty($elementName) && isset($this->_elementIndex[$elementName])) {
-            if ($this->_elements[$this->_elementIndex[$elementName]]->getType() ==
-                $elementObject->getType()) {
-                $this->_elements[] =& $elementObject;
-                $elKeys = array_keys($this->_elements);
-                $this->_duplicateIndex[$elementName][] = end($elKeys);
-            } else {
-                $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::addElement()", 'HTML_QuickForm_Error', true);
-                return $error;
-            }
-        } else {
-            $this->_elements[] =& $elementObject;
-            $elKeys = array_keys($this->_elements);
-            $this->_elementIndex[$elementName] = end($elKeys);
-        }
-        if ($this->_freezeAll) {
-            $elementObject->freeze();
-        }
-
-        return $elementObject;
-    } // end func addElement
-
-    // }}}
-    // {{{ insertElementBefore()
-
-   /**
-    * Inserts a new element right before the other element
-    *
-    * Warning: it is not possible to check whether the $element is already
-    * added to the form, therefore if you want to move the existing form
-    * element to a new position, you'll have to use removeElement():
-    * $form->insertElementBefore($form->removeElement('foo', false), 'bar');
-    *
-    * @access   public
-    * @since    3.2.4
-    * @param    HTML_QuickForm_element  Element to insert
-    * @param    string                  Name of the element before which the new
-    *                                   one is inserted
-    * @return   HTML_QuickForm_element  reference to inserted element
-    * @throws   HTML_QuickForm_Error
-    */
-    function &insertElementBefore(&$element, $nameAfter)
-    {
-        if (!empty($this->_duplicateIndex[$nameAfter])) {
-            $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, 'Several elements named "' . $nameAfter . '" exist in HTML_QuickForm::insertElementBefore().', 'HTML_QuickForm_Error', true);
-            return $error;
-        } elseif (!$this->elementExists($nameAfter)) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$nameAfter' does not exist in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
-            return $error;
-        }
-        $elementName = $element->getName();
-        $targetIdx   = $this->_elementIndex[$nameAfter];
-        $duplicate   = false;
-        // Like in addElement(), check that it's not an incompatible duplicate
-        if (!empty($elementName) && isset($this->_elementIndex[$elementName])) {
-            if ($this->_elements[$this->_elementIndex[$elementName]]->getType() != $element->getType()) {
-                $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
-                return $error;
-            }
-            $duplicate = true;
-        }
-        // Move all the elements after added back one place, reindex _elementIndex and/or _duplicateIndex
-        $elKeys = array_keys($this->_elements);
-        for ($i = end($elKeys); $i >= $targetIdx; $i--) {
-            if (isset($this->_elements[$i])) {
-                $currentName = $this->_elements[$i]->getName();
-                $this->_elements[$i + 1] =& $this->_elements[$i];
-                if ($this->_elementIndex[$currentName] == $i) {
-                    $this->_elementIndex[$currentName] = $i + 1;
-                } else {
-                    $dupIdx = array_search($i, $this->_duplicateIndex[$currentName]);
-                    $this->_duplicateIndex[$currentName][$dupIdx] = $i + 1;
-                }
-                unset($this->_elements[$i]);
-            }
-        }
-        // Put the element in place finally
-        $this->_elements[$targetIdx] =& $element;
-        if (!$duplicate) {
-            $this->_elementIndex[$elementName] = $targetIdx;
-        } else {
-            $this->_duplicateIndex[$elementName][] = $targetIdx;
-        }
-        $element->onQuickFormEvent('updateValue', null, $this);
-        if ($this->_freezeAll) {
-            $element->freeze();
-        }
-        // If not done, the elements will appear in reverse order
-        ksort($this->_elements);
-        return $element;
-    }
-
-    // }}}
-    // {{{ addGroup()
-
-    /**
-     * Adds an element group
-     * @param    array      $elements       array of elements composing the group
-     * @param    string     $name           (optional)group name
-     * @param    string     $groupLabel     (optional)group label
-     * @param    string     $separator      (optional)string to separate elements
-     * @param    string     $appendName     (optional)specify whether the group name should be
-     *                                      used in the form element name ex: group[element]
-     * @return   HTML_QuickForm_group       reference to a newly added group
-     * @since    2.8
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function &addGroup($elements, $name=null, $groupLabel='', $separator=null, $appendName = true)
-    {
-        static $anonGroups = 1;
-
-        if (0 == strlen($name)) {
-            $name       = 'qf_group_' . $anonGroups++;
-            $appendName = false;
-        }
-        $group =& $this->addElement('group', $name, $groupLabel, $elements, $separator, $appendName);
-        return $group;
-    } // end func addGroup
-
-    // }}}
-    // {{{ &getElement()
-
-    /**
-     * Returns a reference to the element
-     *
-     * @param     string     $element    Element name
-     * @since     2.0
-     * @access    public
-     * @return    HTML_QuickForm_element    reference to element
-     * @throws    HTML_QuickForm_Error
-     */
-    function &getElement($element)
-    {
-        if (isset($this->_elementIndex[$element])) {
-            return $this->_elements[$this->_elementIndex[$element]];
-        } else {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElement()", 'HTML_QuickForm_Error', true);
-            return $error;
-        }
-    } // end func getElement
-
-    // }}}
-    // {{{ &getElementValue()
-
-    /**
-     * Returns the element's raw value
-     *
-     * This returns the value as submitted by the form (not filtered)
-     * or set via setDefaults() or setConstants()
-     *
-     * @param     string     $element    Element name
-     * @since     2.0
-     * @access    public
-     * @return    mixed     element value
-     * @throws    HTML_QuickForm_Error
-     */
-    function &getElementValue($element)
-    {
-        if (!isset($this->_elementIndex[$element])) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
-            return $error;
-        }
-        $value = $this->_elements[$this->_elementIndex[$element]]->getValue();
-        if (isset($this->_duplicateIndex[$element])) {
-            foreach ($this->_duplicateIndex[$element] as $index) {
-                if (null !== ($v = $this->_elements[$index]->getValue())) {
-                    if (is_array($value)) {
-                        $value[] = $v;
-                    } else {
-                        $value = (null === $value)? $v: array($value, $v);
-                    }
-                }
-            }
-        }
-        return $value;
-    } // end func getElementValue
-
-    // }}}
-    // {{{ getSubmitValue()
-
-    /**
-     * Returns the elements value after submit and filter
-     *
-     * @param     string     Element name
-     * @since     2.0
-     * @access    public
-     * @return    mixed     submitted element value or null if not set
-     */
-    function getSubmitValue($elementName)
-    {
-        $value = null;
-        if (isset($this->_submitValues[$elementName]) || isset($this->_submitFiles[$elementName])) {
-            $value = isset($this->_submitValues[$elementName])? $this->_submitValues[$elementName]: array();
-            if (is_array($value) && isset($this->_submitFiles[$elementName])) {
-                foreach ($this->_submitFiles[$elementName] as $k => $v) {
-                    $value = HTML_QuickForm::arrayMerge($value, $this->_reindexFiles($this->_submitFiles[$elementName][$k], $k));
-                }
-            }
-
-        } elseif ('file' == $this->getElementType($elementName)) {
-            return $this->getElementValue($elementName);
-
-        } elseif (false !== ($pos = strpos($elementName, '['))) {
-            $base = str_replace(
-                        array('\\', '\''), array('\\\\', '\\\''),
-                        substr($elementName, 0, $pos)
-                    );
-
-            $keys = str_replace(
-                array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
-                substr($elementName, $pos + 1, -1)
-                );
-            $idx  = "['" . $keys . "']";
-            $keyArray = explode("']['", $keys);
-
-            if (isset($this->_submitValues[$base])) {
-                $value = HTML_QuickForm_utils::recursiveValue($this->_submitValues[$base], $keyArray, NULL);
-            }
-
-            if ((is_array($value) || null === $value) && isset($this->_submitFiles[$base])) {
-                $props = array('name', 'type', 'size', 'tmp_name', 'error');
-                $code  = "if (!isset(\$this->_submitFiles['{$base}']['name']{$idx})) {\n" .
-                         "    return null;\n" .
-                         "} else {\n" .
-                         "    \$v = array();\n";
-                foreach ($props as $prop) {
-                    $code .= "    \$v = HTML_QuickForm::arrayMerge(\$v, \$this->_reindexFiles(\$this->_submitFiles['{$base}']['{$prop}']{$idx}, '{$prop}'));\n";
-                }
-                $fileValue = eval($code . "    return \$v;\n}\n");
-                if (null !== $fileValue) {
-                    $value = null === $value? $fileValue: HTML_QuickForm::arrayMerge($value, $fileValue);
-                }
-            }
-        }
-
-        // This is only supposed to work for groups with appendName = false
-        if (null === $value && 'group' == $this->getElementType($elementName)) {
-            $group    =& $this->getElement($elementName);
-            $elements =& $group->getElements();
-            foreach (array_keys($elements) as $key) {
-                $name = $group->getElementName($key);
-                // prevent endless recursion in case of radios and such
-                if ($name != $elementName) {
-                    if (null !== ($v = $this->getSubmitValue($name))) {
-                        $value[$name] = $v;
-                    }
-                }
-            }
-        }
-        return $value;
-    } // end func getSubmitValue
-
-    // }}}
-    // {{{ _reindexFiles()
-
-   /**
-    * A helper function to change the indexes in $_FILES array
-    *
-    * @param  mixed   Some value from the $_FILES array
-    * @param  string  The key from the $_FILES array that should be appended
-    * @return array
-    */
-    function _reindexFiles($value, $key)
-    {
-        if (!is_array($value)) {
-            return array($key => $value);
-        } else {
-            $ret = array();
-            foreach ($value as $k => $v) {
-                $ret[$k] = $this->_reindexFiles($v, $key);
-            }
-            return $ret;
-        }
-    }
-
-    // }}}
-    // {{{ getElementError()
-
-    /**
-     * Returns error corresponding to validated element
-     *
-     * @param     string    $element        Name of form element to check
-     * @since     1.0
-     * @access    public
-     * @return    string    error message corresponding to checked element
-     */
-    function getElementError($element)
-    {
-        if (isset($this->_errors[$element])) {
-            return $this->_errors[$element];
-        }
-    } // end func getElementError
-
-    // }}}
-    // {{{ setElementError()
-
-    /**
-     * Set error message for a form element
-     *
-     * @param     string    $element    Name of form element to set error for
-     * @param     string    $message    Error message, if empty then removes the current error message
-     * @since     1.0
-     * @access    public
-     * @return    void
-     */
-    function setElementError($element, $message = null)
-    {
-        if (!empty($message)) {
-            $this->_errors[$element] = $message;
-        } else {
-            unset($this->_errors[$element]);
-        }
-    } // end func setElementError
-
-     // }}}
-     // {{{ getElementType()
-
-     /**
-      * Returns the type of the given element
-      *
-      * @param      string    $element    Name of form element
-      * @since      1.1
-      * @access     public
-      * @return     string    Type of the element, false if the element is not found
-      */
-     function getElementType($element)
-     {
-         if (isset($this->_elementIndex[$element])) {
-             return $this->_elements[$this->_elementIndex[$element]]->getType();
-         }
-         return false;
-     } // end func getElementType
-
-     // }}}
-     // {{{ updateElementAttr()
-
-    /**
-     * Updates Attributes for one or more elements
-     *
-     * @param      mixed    $elements   Array of element names/objects or string of elements to be updated
-     * @param      mixed    $attrs      Array or sting of html attributes
-     * @since      2.10
-     * @access     public
-     * @return     void
-     */
-    function updateElementAttr($elements, $attrs)
-    {
-        if (is_string($elements)) {
-            $elements = preg_split('/[ ]?,[ ]?/', $elements);
-        }
-        foreach (array_keys($elements) as $key) {
-            if (is_object($elements[$key]) && is_a($elements[$key], 'HTML_QuickForm_element')) {
-                $elements[$key]->updateAttributes($attrs);
-            } elseif (isset($this->_elementIndex[$elements[$key]])) {
-                $this->_elements[$this->_elementIndex[$elements[$key]]]->updateAttributes($attrs);
-                if (isset($this->_duplicateIndex[$elements[$key]])) {
-                    foreach ($this->_duplicateIndex[$elements[$key]] as $index) {
-                        $this->_elements[$index]->updateAttributes($attrs);
-                    }
-                }
-            }
-        }
-    } // end func updateElementAttr
-
-    // }}}
-    // {{{ removeElement()
-
-    /**
-     * Removes an element
-     *
-     * The method "unlinks" an element from the form, returning the reference
-     * to the element object. If several elements named $elementName exist,
-     * it removes the first one, leaving the others intact.
-     *
-     * @param string    $elementName The element name
-     * @param boolean   $removeRules True if rules for this element are to be removed too
-     * @access public
-     * @since 2.0
-     * @return HTML_QuickForm_element    a reference to the removed element
-     * @throws HTML_QuickForm_Error
-     */
-    function &removeElement($elementName, $removeRules = true)
-    {
-        if (!isset($this->_elementIndex[$elementName])) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$elementName' does not exist in HTML_QuickForm::removeElement()", 'HTML_QuickForm_Error', true);
-            return $error;
-        }
-        $el =& $this->_elements[$this->_elementIndex[$elementName]];
-        unset($this->_elements[$this->_elementIndex[$elementName]]);
-        if (empty($this->_duplicateIndex[$elementName])) {
-            unset($this->_elementIndex[$elementName]);
-        } else {
-            $this->_elementIndex[$elementName] = array_shift($this->_duplicateIndex[$elementName]);
-        }
-        if ($removeRules) {
-            $this->_required = array_diff($this->_required, array($elementName));
-            unset($this->_rules[$elementName], $this->_errors[$elementName]);
-            if ('group' == $el->getType()) {
-                foreach (array_keys($el->getElements()) as $key) {
-                    unset($this->_rules[$el->getElementName($key)]);
-                }
-            }
-        }
-        return $el;
-    } // end func removeElement
-
-    // }}}
-    // {{{ addRule()
-
-    /**
-     * Adds a validation rule for the given field
-     *
-     * If the element is in fact a group, it will be considered as a whole.
-     * To validate grouped elements as separated entities,
-     * use addGroupRule instead of addRule.
-     *
-     * @param    string     $element       Form element name
-     * @param    string     $message       Message to display for invalid data
-     * @param    string     $type          Rule type, use getRegisteredRules() to get types
-     * @param    string     $format        (optional)Required for extra rule data
-     * @param    string     $validation    (optional)Where to perform validation: "server", "client"
-     * @param    boolean    $reset         Client-side validation: reset the form element to its original value if there is an error?
-     * @param    boolean    $force         Force the rule to be applied, even if the target form element does not exist
-     * @since    1.0
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function addRule($element, $message, $type, $format=null, $validation='server', $reset = false, $force = false)
-    {
-        if (!$force) {
-            if (!is_array($element) && !$this->elementExists($element)) {
-                return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
-            } elseif (is_array($element)) {
-                foreach ($element as $el) {
-                    if (!$this->elementExists($el)) {
-                        return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$el' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
-                    }
-                }
-            }
-        }
-        if (false === ($newName = $this->isRuleRegistered($type, true))) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
-        } elseif (is_string($newName)) {
-            $type = $newName;
-        }
-        if (is_array($element)) {
-            $dependent = $element;
-            $element   = array_shift($dependent);
-        } else {
-            $dependent = null;
-        }
-        if ($type == 'required' || $type == 'uploadedfile') {
-            $this->_required[] = $element;
-        }
-        if (!isset($this->_rules[$element])) {
-            $this->_rules[$element] = array();
-        }
-        if ($validation == 'client') {
-            $this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
-        }
-        $this->_rules[$element][] = array(
-            'type'        => $type,
-            'format'      => $format,
-            'message'     => $message,
-            'validation'  => $validation,
-            'reset'       => $reset,
-            'dependent'   => $dependent
-        );
-    } // end func addRule
-
-    // }}}
-    // {{{ addGroupRule()
-
-    /**
-     * Adds a validation rule for the given group of elements
-     *
-     * Only groups with a name can be assigned a validation rule
-     * Use addGroupRule when you need to validate elements inside the group.
-     * Use addRule if you need to validate the group as a whole. In this case,
-     * the same rule will be applied to all elements in the group.
-     * Use addRule if you need to validate the group against a function.
-     *
-     * @param    string     $group         Form group name
-     * @param    mixed      $arg1          Array for multiple elements or error message string for one element
-     * @param    string     $type          (optional)Rule type use getRegisteredRules() to get types
-     * @param    string     $format        (optional)Required for extra rule data
-     * @param    int        $howmany       (optional)How many valid elements should be in the group
-     * @param    string     $validation    (optional)Where to perform validation: "server", "client"
-     * @param    bool       $reset         Client-side: whether to reset the element's value to its original state if validation failed.
-     * @since    2.5
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function addGroupRule($group, $arg1, $type='', $format=null, $howmany=0, $validation = 'server', $reset = false)
-    {
-        if (!$this->elementExists($group)) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Group '$group' does not exist in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
-        }
-
-        $groupObj =& $this->getElement($group);
-        if (is_array($arg1)) {
-            $required = 0;
-            foreach ($arg1 as $elementIndex => $rules) {
-                $elementName = $groupObj->getElementName($elementIndex);
-                foreach ($rules as $rule) {
-                    $format = (isset($rule[2])) ? $rule[2] : null;
-                    $validation = (isset($rule[3]) && 'client' == $rule[3])? 'client': 'server';
-                    $reset = isset($rule[4]) && $rule[4];
-                    $type = $rule[1];
-                    if (false === ($newName = $this->isRuleRegistered($type, true))) {
-                        return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
-                    } elseif (is_string($newName)) {
-                        $type = $newName;
-                    }
-
-                    $this->_rules[$elementName][] = array(
-                                                        'type'        => $type,
-                                                        'format'      => $format,
-                                                        'message'     => $rule[0],
-                                                        'validation'  => $validation,
-                                                        'reset'       => $reset,
-                                                        'group'       => $group);
-
-                    if ('required' == $type || 'uploadedfile' == $type) {
-                        $groupObj->_required[] = $elementName;
-                        $this->_required[] = $elementName;
-                        $required++;
-                    }
-                    if ('client' == $validation) {
-                        $this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
-                    }
-                }
-            }
-            if ($required > 0 && count($groupObj->getElements()) == $required) {
-                $this->_required[] = $group;
-            }
-        } elseif (is_string($arg1)) {
-            if (false === ($newName = $this->isRuleRegistered($type, true))) {
-                return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
-            } elseif (is_string($newName)) {
-                $type = $newName;
-            }
-
-            // addGroupRule() should also handle <select multiple>
-            if (is_a($groupObj, 'html_quickform_group')) {
-                // Radios need to be handled differently when required
-                if ($type == 'required' && $groupObj->getGroupType() == 'radio') {
-                    $howmany = ($howmany == 0) ? 1 : $howmany;
-                } else {
-                    $howmany = ($howmany == 0) ? count($groupObj->getElements()) : $howmany;
-                }
-            }
-
-            $this->_rules[$group][] = array('type'       => $type,
-                                            'format'     => $format,
-                                            'message'    => $arg1,
-                                            'validation' => $validation,
-                                            'howmany'    => $howmany,
-                                            'reset'      => $reset);
-            if ($type == 'required') {
-                $this->_required[] = $group;
-            }
-            if ($validation == 'client') {
-                $this->updateAttributes(array('onsubmit' => 'try { var myValidator = validate_' . $this->_attributes['id'] . '; } catch(e) { return true; } return myValidator(this);'));
-            }
-        }
-    } // end func addGroupRule
-
-    // }}}
-    // {{{ addFormRule()
-
-   /**
-    * Adds a global validation rule
-    *
-    * This should be used when for a rule involving several fields or if
-    * you want to use some completely custom validation for your form.
-    * The rule function/method should return true in case of successful
-    * validation and array('element name' => 'error') when there were errors.
-    *
-    * @access   public
-    * @param    mixed   Callback, either function name or array(&$object, 'method')
-    * @throws   HTML_QuickForm_Error
-    */
-    function addFormRule($rule)
-    {
-        if (!is_callable($rule)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, 'Callback function does not exist in HTML_QuickForm::addFormRule()', 'HTML_QuickForm_Error', true);
-        }
-        $this->_formRules[] = $rule;
-    }
-
-    // }}}
-    // {{{ applyFilter()
-
-    /**
-     * Applies a data filter for the given field(s)
-     *
-     * @param    mixed     $element       Form element name or array of such names
-     * @param    mixed     $filter        Callback, either function name or array(&$object, 'method')
-     * @since    2.0
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function applyFilter($element, $filter)
-    {
-        if (!is_callable($filter)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::applyFilter()", 'HTML_QuickForm_Error', true);
-        }
-        if ($element == '__ALL__') {
-            $this->_submitValues = $this->_recursiveFilter($filter, $this->_submitValues);
-        } else {
-            if (!is_array($element)) {
-                $element = array($element);
-            }
-            foreach ($element as $elName) {
-                $value = $this->getSubmitValue($elName);
-                if (null !== $value) {
-                    if (false === strpos($elName, '[')) {
-                        $this->_submitValues[$elName] = $this->_recursiveFilter($filter, $value);
-                    } else {
-                        $idx  = "['" . str_replace(
-                                    array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
-                                    $elName
-                                ) . "']";
-                        eval("\$this->_submitValues{$idx} = \$this->_recursiveFilter(\$filter, \$value);");
-                    }
-                }
-            }
-        }
-    } // end func applyFilter
-
-    // }}}
-    // {{{ _recursiveFilter()
-
-    /**
-     * Recursively apply a filter function
-     *
-     * @param     string   $filter    filter to apply
-     * @param     mixed    $value     submitted values
-     * @since     2.0
-     * @access    private
-     * @return    cleaned values
-     */
-    function _recursiveFilter($filter, $value)
-    {
-        if (is_array($value)) {
-            $cleanValues = array();
-            foreach ($value as $k => $v) {
-                $cleanValues[$k] = $this->_recursiveFilter($filter, $v);
-            }
-            return $cleanValues;
-        } else {
-            return call_user_func($filter, $value);
-        }
-    } // end func _recursiveFilter
-
-    // }}}
-    // {{{ arrayMerge()
-
-   /**
-    * Merges two arrays
-    *
-    * Merges two array like the PHP function array_merge but recursively.
-    * The main difference is that existing keys will not be renumbered
-    * if they are integers.
-    *
-    * @access   public
-    * @param    array   $a  original array
-    * @param    array   $b  array which will be merged into first one
-    * @return   array   merged array
-    */
-    function arrayMerge($a, $b)
-    {
-        foreach ($b as $k => $v) {
-            if (is_array($v)) {
-                if (isset($a[$k]) && !is_array($a[$k])) {
-                    $a[$k] = $v;
-                } else {
-                    if (!isset($a[$k])) {
-                        $a[$k] = array();
-                    }
-                    $a[$k] = HTML_QuickForm::arrayMerge($a[$k], $v);
-                }
-            } else {
-                $a[$k] = $v;
-            }
-        }
-        return $a;
-    } // end func arrayMerge
-
-    // }}}
-    // {{{ isTypeRegistered()
-
-    /**
-     * Returns whether or not the form element type is supported
-     *
-     * @param     string   $type     Form element type
-     * @since     1.0
-     * @access    public
-     * @return    boolean
-     */
-    function isTypeRegistered($type)
-    {
-        return isset($GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][strtolower($type)]);
-    } // end func isTypeRegistered
-
-    // }}}
-    // {{{ getRegisteredTypes()
-
-    /**
-     * Returns an array of registered element types
-     *
-     * @since     1.0
-     * @access    public
-     * @return    array
-     */
-    function getRegisteredTypes()
-    {
-        return array_keys($GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES']);
-    } // end func getRegisteredTypes
-
-    // }}}
-    // {{{ isRuleRegistered()
-
-    /**
-     * Returns whether or not the given rule is supported
-     *
-     * @param     string   $name    Validation rule name
-     * @param     bool     Whether to automatically register subclasses of HTML_QuickForm_Rule
-     * @since     1.0
-     * @access    public
-     * @return    mixed    true if previously registered, false if not, new rule name if auto-registering worked
-     */
-    function isRuleRegistered($name, $autoRegister = false)
-    {
-        if (is_scalar($name) && isset($GLOBALS['_HTML_QuickForm_registered_rules'][$name])) {
-            return true;
-        } elseif (!$autoRegister) {
-            return false;
-        }
-        // automatically register the rule if requested
-        include_once 'HTML/QuickForm/RuleRegistry.php';
-        $ruleName = false;
-        if (is_object($name) && is_a($name, 'html_quickform_rule')) {
-            $ruleName = !empty($name->name)? $name->name: strtolower(get_class($name));
-        } elseif (is_string($name) && class_exists($name)) {
-            $parent = strtolower($name);
-            do {
-                if ('html_quickform_rule' == strtolower($parent)) {
-                    $ruleName = strtolower($name);
-                    break;
-                }
-            } while ($parent = get_parent_class($parent));
-        }
-        if ($ruleName) {
-            $registry =& HTML_QuickForm_RuleRegistry::singleton();
-            $registry->registerRule($ruleName, null, $name);
-        }
-        return $ruleName;
-    } // end func isRuleRegistered
-
-    // }}}
-    // {{{ getRegisteredRules()
-
-    /**
-     * Returns an array of registered validation rules
-     *
-     * @since     1.0
-     * @access    public
-     * @return    array
-     */
-    function getRegisteredRules()
-    {
-        return array_keys($GLOBALS['_HTML_QuickForm_registered_rules']);
-    } // end func getRegisteredRules
-
-    // }}}
-    // {{{ isElementRequired()
-
-    /**
-     * Returns whether or not the form element is required
-     *
-     * @param     string   $element     Form element name
-     * @since     1.0
-     * @access    public
-     * @return    boolean
-     */
-    function isElementRequired($element)
-    {
-        return in_array($element, $this->_required, true);
-    } // end func isElementRequired
-
-    // }}}
-    // {{{ isElementFrozen()
-
-    /**
-     * Returns whether or not the form element is frozen
-     *
-     * @param     string   $element     Form element name
-     * @since     1.0
-     * @access    public
-     * @return    boolean
-     */
-    function isElementFrozen($element)
-    {
-         if (isset($this->_elementIndex[$element])) {
-             return $this->_elements[$this->_elementIndex[$element]]->isFrozen();
-         }
-         return false;
-    } // end func isElementFrozen
-
-    // }}}
-    // {{{ setJsWarnings()
-
-    /**
-     * Sets JavaScript warning messages
-     *
-     * @param     string   $pref        Prefix warning
-     * @param     string   $post        Postfix warning
-     * @since     1.1
-     * @access    public
-     * @return    void
-     */
-    function setJsWarnings($pref, $post)
-    {
-        $this->_jsPrefix = $pref;
-        $this->_jsPostfix = $post;
-    } // end func setJsWarnings
-
-    // }}}
-    // {{{ setRequiredNote()
-
-    /**
-     * Sets required-note
-     *
-     * @param     string   $note        Message indicating some elements are required
-     * @since     1.1
-     * @access    public
-     * @return    void
-     */
-    function setRequiredNote($note)
-    {
-        $this->_requiredNote = $note;
-    } // end func setRequiredNote
-
-    // }}}
-    // {{{ getRequiredNote()
-
-    /**
-     * Returns the required note
-     *
-     * @since     2.0
-     * @access    public
-     * @return    string
-     */
-    function getRequiredNote()
-    {
-        return $this->_requiredNote;
-    } // end func getRequiredNote
-
-    // }}}
-    // {{{ validate()
-
-    /**
-     * Performs the server side validation
-     * @access    public
-     * @since     1.0
-     * @return    boolean   true if no error found
-     * @throws    HTML_QuickForm_Error
-     */
-    function validate()
-    {
-        if (count($this->_rules) == 0 && count($this->_formRules) == 0 &&
-            $this->isSubmitted()) {
-            return (0 == count($this->_errors));
-        } elseif (!$this->isSubmitted()) {
-            return false;
-        }
-
-        include_once('HTML/QuickForm/RuleRegistry.php');
-        $registry =& HTML_QuickForm_RuleRegistry::singleton();
-
-        foreach ($this->_rules as $target => $rules) {
-            $submitValue = $this->getSubmitValue($target);
-
-            foreach ($rules as $rule) {
-                if ((isset($rule['group']) && isset($this->_errors[$rule['group']])) ||
-                     isset($this->_errors[$target])) {
-                    continue 2;
-                }
-                // If element is not required and is empty, we shouldn't validate it
-                if (!$this->isElementRequired($target)) {
-                    if (!isset($submitValue) || '' == $submitValue) {
-                        continue 2;
-                    // Fix for bug #3501: we shouldn't validate not uploaded files, either.
-                    // Unfortunately, we can't just use $element->isUploadedFile() since
-                    // the element in question can be buried in group. Thus this hack.
-                    // See also bug #12014, we should only consider a file that has
-                    // status UPLOAD_ERR_NO_FILE as not uploaded, in all other cases
-                    // validation should be performed, so that e.g. 'maxfilesize' rule
-                    // will display an error if status is UPLOAD_ERR_INI_SIZE
-                    // or UPLOAD_ERR_FORM_SIZE
-                    } elseif (is_array($submitValue)) {
-                        if (false === ($pos = strpos($target, '['))) {
-                            $isUpload = !empty($this->_submitFiles[$target]);
-                        } else {
-                            $base = str_replace(
-                                        array('\\', '\''), array('\\\\', '\\\''),
-                                        substr($target, 0, $pos)
-                                    );
-                            $idx  = "['" . str_replace(
-                                        array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"),
-                                        substr($target, $pos + 1, -1)
-                                    ) . "']";
-                            eval("\$isUpload = isset(\$this->_submitFiles['{$base}']['name']{$idx});");
-                        }
-                        if ($isUpload && (!isset($submitValue['error']) || UPLOAD_ERR_NO_FILE == $submitValue['error'])) {
-                            continue 2;
-                        }
-                    }
-                }
-                if (isset($rule['dependent']) && is_array($rule['dependent'])) {
-                    $values = array($submitValue);
-                    foreach ($rule['dependent'] as $elName) {
-                        $values[] = $this->getSubmitValue($elName);
-                    }
-                    $result = $registry->validate($rule['type'], $values, $rule['format'], true);
-                } elseif (is_array($submitValue) && !isset($rule['howmany'])) {
-                    $result = $registry->validate($rule['type'], $submitValue, $rule['format'], true);
-                } else {
-                    $result = $registry->validate($rule['type'], $submitValue, $rule['format'], false);
-                }
-
-                if (!$result || (!empty($rule['howmany']) && $rule['howmany'] > (int)$result)) {
-                    if (isset($rule['group'])) {
-                        $this->_errors[$rule['group']] = $rule['message'];
-                    } else {
-                        $this->_errors[$target] = $rule['message'];
-                    }
-                }
-            }
-        }
-
-        // process the global rules now
-        foreach ($this->_formRules as $rule) {
-            if (true !== ($res = call_user_func($rule, $this->_submitValues, $this->_submitFiles))) {
-                if (is_array($res)) {
-                    $this->_errors += $res;
-                } else {
-                    return PEAR::raiseError(null, QUICKFORM_ERROR, null, E_USER_WARNING, 'Form rule callback returned invalid value in HTML_QuickForm::validate()', 'HTML_QuickForm_Error', true);
-                }
-            }
-        }
-
-        return (0 == count($this->_errors));
-    } // end func validate
-
-    // }}}
-    // {{{ freeze()
-
-    /**
-     * Displays elements without HTML input tags
-     *
-     * @param    mixed   $elementList       array or string of element(s) to be frozen
-     * @since     1.0
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     */
-    function freeze($elementList=null)
-    {
-        if (!isset($elementList)) {
-            $this->_freezeAll = true;
-            $elementList = array();
-        } else {
-            if (!is_array($elementList)) {
-                $elementList = preg_split('/[ ]*,[ ]*/', $elementList);
-            }
-            $elementList = array_flip($elementList);
-        }
-
-        foreach (array_keys($this->_elements) as $key) {
-            $name = $this->_elements[$key]->getName();
-            if ($this->_freezeAll || isset($elementList[$name])) {
-                $this->_elements[$key]->freeze();
-                unset($elementList[$name]);
-            }
-        }
-
-        if (!empty($elementList)) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Nonexistant element(s): '" . implode("', '", array_keys($elementList)) . "' in HTML_QuickForm::freeze()", 'HTML_QuickForm_Error', true);
-        }
-        return true;
-    } // end func freeze
-
-    // }}}
-    // {{{ isFrozen()
-
-    /**
-     * Returns whether or not the whole form is frozen
-     *
-     * @since     3.0
-     * @access    public
-     * @return    boolean
-     */
-    function isFrozen()
-    {
-         return $this->_freezeAll;
-    } // end func isFrozen
-
-    // }}}
-    // {{{ process()
-
-    /**
-     * Performs the form data processing
-     *
-     * @param    mixed     $callback        Callback, either function name or array(&$object, 'method')
-     * @param    bool      $mergeFiles      Whether uploaded files should be processed too
-     * @since    1.0
-     * @access   public
-     * @throws   HTML_QuickForm_Error
-     * @return   mixed     Whatever value the $callback function returns
-     */
-    function process($callback, $mergeFiles = true)
-    {
-        if (!is_callable($callback)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_PROCESS, null, E_USER_WARNING, "Callback function does not exist in QuickForm::process()", 'HTML_QuickForm_Error', true);
-        }
-        $values = ($mergeFiles === true) ? HTML_QuickForm::arrayMerge($this->_submitValues, $this->_submitFiles) : $this->_submitValues;
-        return call_user_func($callback, $values);
-    } // end func process
-
-    // }}}
-    // {{{ accept()
-
-   /**
-    * Accepts a renderer
-    *
-    * @param object     An HTML_QuickForm_Renderer object
-    * @since 3.0
-    * @access public
-    * @return void
-    */
-    function accept(&$renderer)
-    {
-        $renderer->startForm($this);
-        foreach (array_keys($this->_elements) as $key) {
-            $element =& $this->_elements[$key];
-            $elementName = $element->getName();
-            $required    = ($this->isElementRequired($elementName) && !$element->isFrozen());
-            $error       = $this->getElementError($elementName);
-            $element->accept($renderer, $required, $error);
-        }
-        $renderer->finishForm($this);
-    } // end func accept
-
-    // }}}
-    // {{{ defaultRenderer()
-
-   /**
-    * Returns a reference to default renderer object
-    *
-    * @access public
-    * @since 3.0
-    * @return object a default renderer object
-    */
-    function &defaultRenderer()
-    {
-        if (!isset($GLOBALS['_HTML_QuickForm_default_renderer'])) {
-            include_once('HTML/QuickForm/Renderer/Default.php');
-            $GLOBALS['_HTML_QuickForm_default_renderer'] = new HTML_QuickForm_Renderer_Default();
-        }
-        return $GLOBALS['_HTML_QuickForm_default_renderer'];
-    } // end func defaultRenderer
-
-    // }}}
-    // {{{ toHtml ()
-
-    /**
-     * Returns an HTML version of the form
-     *
-     * @param string $in_data (optional) Any extra data to insert right
-     *               before form is rendered.  Useful when using templates.
-     *
-     * @return   string     Html version of the form
-     * @since     1.0
-     * @access   public
-     */
-    function toHtml ($in_data = null)
-    {
-        if (!is_null($in_data)) {
-            $this->addElement('html', $in_data);
-        }
-        $renderer =& $this->defaultRenderer();
-        $this->accept($renderer);
-        return $renderer->toHtml();
-    } // end func toHtml
-
-    // }}}
-    // {{{ getValidationScript()
-
-    /**
-     * Returns the client side validation script
-     *
-     * @since     2.0
-     * @access    public
-     * @return    string    Javascript to perform validation, empty string if no 'client' rules were added
-     */
-    function getValidationScript()
-    {
-        if (empty($this->_rules) || empty($this->_attributes['onsubmit'])) {
-            return '';
-        }
-
-        include_once('HTML/QuickForm/RuleRegistry.php');
-        $registry =& HTML_QuickForm_RuleRegistry::singleton();
-        $test = array();
-        $js_escape = array(
-            "\r"    => '\r',
-            "\n"    => '\n',
-            "\t"    => '\t',
-            "'"     => "\\'",
-            '"'     => '\"',
-            '\\'    => '\\\\'
-        );
-
-        foreach ($this->_rules as $elementName => $rules) {
-            foreach ($rules as $rule) {
-                if ('client' == $rule['validation']) {
-                    unset($element);
-
-                    $dependent  = isset($rule['dependent']) && is_array($rule['dependent']);
-                    $rule['message'] = strtr($rule['message'], $js_escape);
-
-                    if (isset($rule['group'])) {
-                        $group    =& $this->getElement($rule['group']);
-                        // No JavaScript validation for frozen elements
-                        if ($group->isFrozen()) {
-                            continue 2;
-                        }
-                        $elements =& $group->getElements();
-                        foreach (array_keys($elements) as $key) {
-                            if ($elementName == $group->getElementName($key)) {
-                                $element =& $elements[$key];
-                                break;
-                            }
-                        }
-                    } elseif ($dependent) {
-                        $element   =  array();
-                        $element[] =& $this->getElement($elementName);
-                        foreach ($rule['dependent'] as $elName) {
-                            $element[] =& $this->getElement($elName);
-                        }
-                    } else {
-                        $element =& $this->getElement($elementName);
-                    }
-                    // No JavaScript validation for frozen elements
-                    if (is_object($element) && $element->isFrozen()) {
-                        continue 2;
-                    } elseif (is_array($element)) {
-                        foreach (array_keys($element) as $key) {
-                            if ($element[$key]->isFrozen()) {
-                                continue 3;
-                            }
-                        }
-                    }
-
-                    $test[] = $registry->getValidationScript($element, $elementName, $rule);
-                }
-            }
-        }
-        if (count($test) > 0) {
-            return
-                "\n<script type=\"text/javascript\">\n" .
-                "//<![CDATA[\n" .
-                "function validate_" . $this->_attributes['id'] . "(frm) {\n" .
-                "  var value = '';\n" .
-                "  var errFlag = new Array();\n" .
-                "  var _qfGroups = {};\n" .
-                "  _qfMsg = '';\n\n" .
-                join("\n", $test) .
-                "\n  if (_qfMsg != '') {\n" .
-                "    _qfMsg = '" . strtr($this->_jsPrefix, $js_escape) . "' + _qfMsg;\n" .
-                "    _qfMsg = _qfMsg + '\\n" . strtr($this->_jsPostfix, $js_escape) . "';\n" .
-                "    alert(_qfMsg);\n" .
-                "    return false;\n" .
-                "  }\n" .
-                "  return true;\n" .
-                "}\n" .
-                "//]]>\n" .
-                "</script>";
-        }
-        return '';
-    } // end func getValidationScript
-
-    // }}}
-    // {{{ getSubmitValues()
-
-    /**
-     * Returns the values submitted by the form
-     *
-     * @since     2.0
-     * @access    public
-     * @param     bool      Whether uploaded files should be returned too
-     * @return    array
-     */
-    function getSubmitValues($mergeFiles = false)
-    {
-        return $mergeFiles? HTML_QuickForm::arrayMerge($this->_submitValues, $this->_submitFiles): $this->_submitValues;
-    } // end func getSubmitValues
-
-    // }}}
-    // {{{ toArray()
-
-    /**
-     * Returns the form's contents in an array.
-     *
-     * The description of the array structure is in HTML_QuickForm_Renderer_Array docs
-     *
-     * @since     2.0
-     * @access    public
-     * @param     bool      Whether to collect hidden elements (passed to the Renderer's constructor)
-     * @return    array of form contents
-     */
-    function toArray($collectHidden = false)
-    {
-        include_once 'HTML/QuickForm/Renderer/Array.php';
-        $renderer = new HTML_QuickForm_Renderer_Array($collectHidden);
-        $this->accept($renderer);
-        return $renderer->toArray();
-     } // end func toArray
-
-    // }}}
-    // {{{ exportValue()
-
-    /**
-     * Returns a 'safe' element's value
-     *
-     * This method first tries to find a cleaned-up submitted value,
-     * it will return a value set by setValue()/setDefaults()/setConstants()
-     * if submitted value does not exist for the given element.
-     *
-     * @param  string   Name of an element
-     * @access public
-     * @return mixed
-     * @throws HTML_QuickForm_Error
-     */
-    function exportValue($element)
-    {
-        if (!isset($this->_elementIndex[$element])) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
-        }
-        $value = $this->_elements[$this->_elementIndex[$element]]->exportValue($this->_submitValues, false);
-        if (isset($this->_duplicateIndex[$element])) {
-            foreach ($this->_duplicateIndex[$element] as $index) {
-                if (null !== ($v = $this->_elements[$index]->exportValue($this->_submitValues, false))) {
-                    if (is_array($value)) {
-                        $value[] = $v;
-                    } else {
-                        $value = (null === $value)? $v: array($value, $v);
-                    }
-                }
-            }
-        }
-        return $value;
-    }
-
-    // }}}
-    // {{{ exportValues()
-
-    /**
-     * Returns 'safe' elements' values
-     *
-     * Unlike getSubmitValues(), this will return only the values
-     * corresponding to the elements present in the form.
-     *
-     * @param   mixed   Array/string of element names, whose values we want. If not set then return all elements.
-     * @access  public
-     * @return  array   An assoc array of elements' values
-     * @throws  HTML_QuickForm_Error
-     */
-    function exportValues($elementList = null)
-    {
-        $values = array();
-        if (null === $elementList) {
-            // iterate over all elements, calling their exportValue() methods
-            foreach (array_keys($this->_elements) as $key) {
-                $value = $this->_elements[$key]->exportValue($this->_submitValues, true);
-                if (is_array($value)) {
-                    // This shit throws a bogus warning in PHP 4.3.x
-                    $values = HTML_QuickForm::arrayMerge($values, $value);
-                }
-            }
-        } else {
-            if (!is_array($elementList)) {
-                $elementList = array_map('trim', explode(',', $elementList));
-            }
-            foreach ($elementList as $elementName) {
-                $value = $this->exportValue($elementName);
-                if (PEAR::isError($value)) {
-                    return $value;
-                }
-                $values[$elementName] = $value;
-            }
-        }
-        return $values;
-    }
-
-    // }}}
-    // {{{ isSubmitted()
-
-   /**
-    * Tells whether the form was already submitted
-    *
-    * This is useful since the _submitFiles and _submitValues arrays
-    * may be completely empty after the trackSubmit value is removed.
-    *
-    * @access public
-    * @return bool
-    */
-    function isSubmitted()
-    {
-        return $this->_flagSubmitted;
-    }
-
-
-    // }}}
-    // {{{ isError()
-
-    /**
-     * Tell whether a result from a QuickForm method is an error (an instance of HTML_QuickForm_Error)
-     *
-     * @access public
-     * @param mixed     result code
-     * @return bool     whether $value is an error
-     * @static
-     */
-    function isError($value)
-    {
-        return (is_object($value) && is_a($value, 'html_quickform_error'));
-    } // end func isError
-
-    // }}}
-    // {{{ errorMessage()
-
-    /**
-     * Return a textual error message for an QuickForm error code
-     *
-     * @access  public
-     * @param   int     error code
-     * @return  string  error message
-     * @static
-     */
-    function errorMessage($value)
-    {
-        // make the variable static so that it only has to do the defining on the first call
-        static $errorMessages;
-
-        // define the varies error messages
-        if (!isset($errorMessages)) {
-            $errorMessages = array(
-                QUICKFORM_OK                    => 'no error',
-                QUICKFORM_ERROR                 => 'unknown error',
-                QUICKFORM_INVALID_RULE          => 'the rule does not exist as a registered rule',
-                QUICKFORM_NONEXIST_ELEMENT      => 'nonexistent html element',
-                QUICKFORM_INVALID_FILTER        => 'invalid filter',
-                QUICKFORM_UNREGISTERED_ELEMENT  => 'unregistered element',
-                QUICKFORM_INVALID_ELEMENT_NAME  => 'element already exists',
-                QUICKFORM_INVALID_PROCESS       => 'process callback does not exist',
-                QUICKFORM_DEPRECATED            => 'method is deprecated',
-                QUICKFORM_INVALID_DATASOURCE    => 'datasource is not an object'
-            );
-        }
-
-        // If this is an error object, then grab the corresponding error code
-        if (HTML_QuickForm::isError($value)) {
-            $value = $value->getCode();
-        }
-
-        // return the textual error message corresponding to the code
-        return isset($errorMessages[$value]) ? $errorMessages[$value] : $errorMessages[QUICKFORM_ERROR];
-    } // end func errorMessage
-
-    // }}}
-} // end class HTML_QuickForm
-
-/**
- * Class for errors thrown by HTML_QuickForm package
- *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Adam Daniel <adaniel1@eesus.jnj.com>
- * @author      Bertrand Mansion <bmansion@mamasam.com>
- * @version     Release: 3.2.16
- */
-class HTML_QuickForm_Error extends PEAR_Error {
-
-    // {{{ properties
-
-    /**
-    * Prefix for all error messages
-    * @var string
-    */
-    var $error_message_prefix = 'QuickForm Error: ';
-
-    // }}}
-    // {{{ constructor
-
-    /**
-    * Creates a quickform error object, extending the PEAR_Error class
-    *
-    * @param int   $code the error code
-    * @param int   $mode the reaction to the error, either return, die or trigger/callback
-    * @param int   $level intensity of the error (PHP error code)
-    * @param mixed $debuginfo any information that can inform user as to nature of the error
-    */
-    function HTML_QuickForm_Error($code = QUICKFORM_ERROR, $mode = PEAR_ERROR_RETURN,
-                         $level = E_USER_NOTICE, $debuginfo = null)
-    {
-        if (is_int($code)) {
-            $this->PEAR_Error(HTML_QuickForm::errorMessage($code), $code, $mode, $level, $debuginfo);
-        } else {
-            $this->PEAR_Error("Invalid error code: $code", QUICKFORM_ERROR, $mode, $level, $debuginfo);
-        }
-    }
-
-    // }}}
-} // end class HTML_QuickForm_Error
-?>
diff --git a/cookbooks/dmca/files/default/html/HTML/QuickForm/DHTMLRulesTableless.php b/cookbooks/dmca/files/default/html/HTML/QuickForm/DHTMLRulesTableless.php
deleted file mode 100644 (file)
index e0a8823..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-/**
- * DHTML replacement for the standard JavaScript alert window for client-side
- * validation
- *
- * LICENSE:
- * 
- * Copyright (c) 2005-2007, Mark Wiesemann <wiesemann@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *    * Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *    * Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions and the following disclaimer in the 
- *      documentation and/or other materials provided with the distribution.
- *    * The names of the authors may not be used to endorse or promote products 
- *      derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category   HTML
- * @package    HTML_QuickForm_DHTMLRulesTableless
- * @author     Alexey Borzov <borz_off@cs.msu.su>
- * @author     Adam Daniel <adaniel1@eesus.jnj.com>
- * @author     Bertrand Mansion <bmansion@mamasam.com>
- * @author     Justin Patrin <papercrane@gmail.com>
- * @author     Mark Wiesemann <wiesemann@php.net>
- * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version    CVS: $Id: DHTMLRulesTableless.php,v 1.10 2007/10/24 20:36:11 wiesemann Exp $
- * @link       http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless
- */
-
-require_once 'HTML/QuickForm.php';
-
-/**
- * This is a DHTML replacement for the standard JavaScript alert window for
- * client-side validation of forms built with HTML_QuickForm
- *
- * @category   HTML
- * @package    HTML_QuickForm_DHTMLRulesTableless
- * @author     Alexey Borzov <borz_off@cs.msu.su>
- * @author     Adam Daniel <adaniel1@eesus.jnj.com>
- * @author     Bertrand Mansion <bmansion@mamasam.com>
- * @author     Justin Patrin <papercrane@gmail.com>
- * @author     Mark Wiesemann <wiesemann@php.net>
- * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version    Release: 0.3.3
- * @link       http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless
- */
-class HTML_QuickForm_DHTMLRulesTableless extends HTML_QuickForm {
-    // {{{ getValidationScript()
-
-    /**
-     * Returns the client side validation script
-     *
-     * The code here was copied from HTML_QuickForm and slightly modified to run rules per-element
-     *
-     * @access    public
-     * @return    string    Javascript to perform validation, empty string if no 'client' rules were added
-     */
-    function getValidationScript()
-    {
-        if (empty($this->_rules) || empty($this->_attributes['onsubmit'])) {
-            return '';
-        }
-
-        include_once('HTML/QuickForm/RuleRegistry.php');
-        $registry =& HTML_QuickForm_RuleRegistry::singleton();
-        $test = array();
-        $js_escape = array(
-            "\r"    => '\r',
-            "\n"    => '\n',
-            "\t"    => '\t',
-            "'"     => "\\'",
-            '"'     => '\"',
-            '\\'    => '\\\\'
-        );
-
-        foreach ($this->_rules as $elementName => $rules) {
-            foreach ($rules as $rule) {
-                if ('client' == $rule['validation']) {
-                    unset($element);
-
-                    $dependent  = isset($rule['dependent']) && is_array($rule['dependent']);
-                    $rule['message'] = strtr($rule['message'], $js_escape);
-
-                    if (isset($rule['group'])) {
-                        $group    =& $this->getElement($rule['group']);
-                        // No JavaScript validation for frozen elements
-                        if ($group->isFrozen()) {
-                            continue 2;
-                        }
-                        $elements =& $group->getElements();
-                        foreach (array_keys($elements) as $key) {
-                            if ($elementName == $group->getElementName($key)) {
-                                $element =& $elements[$key];
-                                break;
-                            }
-                        }
-                    } elseif ($dependent) {
-                        $element   =  array();
-                        $element[] =& $this->getElement($elementName);
-                        foreach ($rule['dependent'] as $idx => $elName) {
-                            $element[] =& $this->getElement($elName);
-                        }
-                    } else {
-                        $element =& $this->getElement($elementName);
-                    }
-                    // No JavaScript validation for frozen elements
-                    if (is_object($element) && $element->isFrozen()) {
-                        continue 2;
-                    } elseif (is_array($element)) {
-                        foreach (array_keys($element) as $key) {
-                            if ($element[$key]->isFrozen()) {
-                                continue 3;
-                            }
-                        }
-                    }
-
-                    $test[$elementName][] = $registry->getValidationScript($element, $elementName, $rule);
-                }
-            }
-        }
-        $js = '
-<script type="text/javascript"><!--//--><![CDATA[//><!--
-qf_errorHandler = function(element, _qfMsg) {
-  div = element.parentNode;
-  var elementName = element.name.replace(/\[/, "_____");
-  var elementName = elementName.replace(/\]/, "_____");
-  if (_qfMsg != \'\') {
-    span = document.createElement("span");
-    span.className = "error";
-    _qfMsg = _qfMsg.substring(4);
-    span.appendChild(document.createTextNode(_qfMsg));
-    br = document.createElement("br");
-
-    var errorDiv = document.getElementById(elementName + \'_errorDiv\');
-    if (!errorDiv) {
-      errorDiv = document.createElement("div");
-      errorDiv.id = elementName + \'_errorDiv\';
-    } else {
-      if (   div.firstChild.textContent == \'\'
-          || _qfMsg == div.firstChild.textContent
-         ) {
-        return false;
-      }
-    }
-    while (errorDiv.firstChild) {
-      errorDiv.removeChild(errorDiv.firstChild);
-    }
-
-    errorDiv.insertBefore(br, errorDiv.firstChild);
-    errorDiv.insertBefore(span, errorDiv.firstChild);
-
-    errorDivInserted = false;
-    for (var i = element.parentNode.childNodes.length - 1; i >= 0; i--) {
-      j = i - 1;
-      if (j >= 0 && element.parentNode.childNodes[j].nodeName == "DIV") {
-        element.parentNode.insertBefore(errorDiv, element.parentNode.childNodes[i]);
-        errorDivInserted = true;
-        break;
-      }
-    }
-    if (!errorDivInserted) {
-      element.parentNode.insertBefore(errorDiv, element.parentNode.firstChild);
-    }
-
-    if (div.className.substr(div.className.length - 6, 6) != " error"
-        && div.className != "error") {
-      div.className += " error";
-    }
-
-    return false;
-  } else {
-    var errorDiv = document.getElementById(elementName + \'_errorDiv\');
-    if (errorDiv) {
-      errorDiv.parentNode.removeChild(errorDiv);
-    }
-    
-    // do not remove the error style from the div tag if there is still an error
-    // message
-    if (div.firstChild.innerHTML != "") {
-      return true;
-    }
-
-    if (div.className.substr(div.className.length - 6, 6) == " error") {
-      div.className = div.className.substr(0, div.className.length - 6);
-    } else if (div.className == "error") {
-      div.className = "";
-    }
-
-    return true;
-  }
-}';
-        $validateJS = '';
-        foreach ($test as $elementName => $jsArr) {
-            // remove group element part of the element name to avoid JS errors
-            $singleElementName = $elementName;
-            $shortNameForJS = str_replace(array('[', ']'), '__', $elementName);
-            $bracketPos = strpos($elementName, '[');
-            if ($bracketPos !== false) {
-                $singleElementName = substr($elementName, 0, $bracketPos);
-                $groupElementName = substr($elementName, $bracketPos + 1, -1);
-            }
-            if ($bracketPos === false || !$this->elementExists($singleElementName)) {
-                $groupElementName = $elementName;
-                $singleElementName = $elementName;
-            }
-            $id = str_replace('-', '_', $this->_attributes['id']);
-            $js .= '
-validate_' . $id . '_' . $shortNameForJS . ' = function(element) {
-  var value = \'\';
-  var errFlag = new Array();
-  var _qfGroups = {};
-  var _qfMsg = \'\';
-  var frm = element.parentNode;
-  while (frm && frm.nodeName != "FORM") {
-    frm = frm.parentNode;
-  }
-' . join("\n", $jsArr) . '
-  return qf_errorHandler(element, _qfMsg);
-}
-';
-            unset($element);
-            $element =& $this->getElement($singleElementName);
-            $elementNameForJS = 'frm.elements[\'' . $elementName . '\']';
-            if ($element->getType() === 'group' && $singleElementName === $elementName) {
-                $elementNameForJS = 'document.getElementById(\'' . $element->_elements[0]->getAttribute('id') . '\')';
-            }
-            $validateJS .= '
-  ret = validate_' . $id . '_' . $shortNameForJS . '('. $elementNameForJS . ') && ret;';
-            if ($element->getType() !== 'group') {  // not a group
-                $valFunc = 'validate_' . $id . '_' . $shortNameForJS . '(this)';
-                $onBlur = $element->getAttribute('onBlur');
-                $onChange = $element->getAttribute('onChange');
-                $element->updateAttributes(array('onBlur' => $onBlur . $valFunc,
-                                                 'onChange' => $onChange . $valFunc));
-            } else {  // group
-                $elements =& $element->getElements();
-                for ($i = 0; $i < count($elements); $i++) {
-                    // $groupElementName is a substring of attribute name of the element
-                    if (strpos($elements[$i]->getAttribute('name'), $groupElementName) === 0) {
-                        $valFunc = 'validate_' . $id . '_' . $shortNameForJS . '(this)';
-                        $onBlur = $elements[$i]->getAttribute('onBlur');
-                        $onChange = $elements[$i]->getAttribute('onChange');
-                        $elements[$i]->updateAttributes(array('onBlur'   => $onBlur . $valFunc,
-                                                              'onChange' => $onChange . $valFunc));
-                    }
-                }
-            }
-        }
-        $js .= '
-validate_' . $id . ' = function(frm) {
-  var ret = true;
-' . $validateJS . ';
-  return ret;
-}
-//--><!]]></script>';
-        return $js;
-    } // end func getValidationScript
-
-    // }}}
-
-    function display() {
-        $this->getValidationScript();
-        return parent::display();
-    }
-}
-
-?>
\ No newline at end of file
diff --git a/cookbooks/dmca/files/default/html/HTML/QuickForm/PageDHTMLRulesTableless.php b/cookbooks/dmca/files/default/html/HTML/QuickForm/PageDHTMLRulesTableless.php
deleted file mode 100644 (file)
index 6d42150..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-<?php
-/**
- * DHTML replacement for the standard JavaScript alert window for client-side
- * validation
- *
- * LICENSE:
- * 
- * Copyright (c) 2005-2007, Mark Wiesemann <wiesemann@php.net>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *    * Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *    * Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions and the following disclaimer in the 
- *      documentation and/or other materials provided with the distribution.
- *    * The names of the authors may not be used to endorse or promote products 
- *      derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @category   HTML
- * @package    HTML_QuickForm_DHTMLRulesTableless
- * @author     Alexey Borzov <borz_off@cs.msu.su>
- * @author     Adam Daniel <adaniel1@eesus.jnj.com>
- * @author     Bertrand Mansion <bmansion@mamasam.com>
- * @author     Justin Patrin <papercrane@gmail.com>
- * @author     Mark Wiesemann <wiesemann@php.net>
- * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version    CVS: $Id: PageDHTMLRulesTableless.php,v 1.3 2007/10/24 20:36:11 wiesemann Exp $
- * @link       http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless
- */
-
-require_once 'HTML/QuickForm/Page.php';
-
-/**
- * This is a DHTML replacement for the standard JavaScript alert window for
- * client-side validation of forms built with HTML_QuickForm
- *
- * @category   HTML
- * @package    HTML_QuickForm_DHTMLRulesTableless
- * @author     Alexey Borzov <borz_off@cs.msu.su>
- * @author     Adam Daniel <adaniel1@eesus.jnj.com>
- * @author     Bertrand Mansion <bmansion@mamasam.com>
- * @author     Justin Patrin <papercrane@gmail.com>
- * @author     Mark Wiesemann <wiesemann@php.net>
- * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version    Release: 0.3.3
- * @link       http://pear.php.net/package/HTML_QuickForm_DHTMLRulesTableless
- */
-class HTML_QuickForm_PageDHTMLRulesTableless extends HTML_QuickForm_Page
-{
-   /**
-    * Class constructor
-    * 
-    * @access public
-    */
-    function HTML_QuickForm_PageDHTMLRulesTableless($formName, $method = 'post',
-        $target = '', $attributes = null)
-    {
-        $this->HTML_QuickForm_Page($formName, $method, '', $target, $attributes);
-    }
-
-    // {{{ getValidationScript()
-
-    /**
-     * Returns the client side validation script
-     *
-     * The code here was copied from HTML_QuickForm and slightly modified to run rules per-element
-     *
-     * @access    public
-     * @return    string    Javascript to perform validation, empty string if no 'client' rules were added
-     */
-    function getValidationScript()
-    {
-        if (empty($this->_rules) || empty($this->_attributes['onsubmit'])) {
-            return '';
-        }
-
-        include_once('HTML/QuickForm/RuleRegistry.php');
-        $registry =& HTML_QuickForm_RuleRegistry::singleton();
-        $test = array();
-        $js_escape = array(
-            "\r"    => '\r',
-            "\n"    => '\n',
-            "\t"    => '\t',
-            "'"     => "\\'",
-            '"'     => '\"',
-            '\\'    => '\\\\'
-        );
-
-        foreach ($this->_rules as $elementName => $rules) {
-            foreach ($rules as $rule) {
-                if ('client' == $rule['validation']) {
-                    unset($element);
-
-                    $dependent  = isset($rule['dependent']) && is_array($rule['dependent']);
-                    $rule['message'] = strtr($rule['message'], $js_escape);
-
-                    if (isset($rule['group'])) {
-                        $group    =& $this->getElement($rule['group']);
-                        // No JavaScript validation for frozen elements
-                        if ($group->isFrozen()) {
-                            continue 2;
-                        }
-                        $elements =& $group->getElements();
-                        foreach (array_keys($elements) as $key) {
-                            if ($elementName == $group->getElementName($key)) {
-                                $element =& $elements[$key];
-                                break;
-                            }
-                        }
-                    } elseif ($dependent) {
-                        $element   =  array();
-                        $element[] =& $this->getElement($elementName);
-                        foreach ($rule['dependent'] as $idx => $elName) {
-                            $element[] =& $this->getElement($elName);
-                        }
-                    } else {
-                        $element =& $this->getElement($elementName);
-                    }
-                    // No JavaScript validation for frozen elements
-                    if (is_object($element) && $element->isFrozen()) {
-                        continue 2;
-                    } elseif (is_array($element)) {
-                        foreach (array_keys($element) as $key) {
-                            if ($element[$key]->isFrozen()) {
-                                continue 3;
-                            }
-                        }
-                    }
-
-                    $test[$elementName][] = $registry->getValidationScript($element, $elementName, $rule);
-                }
-            }
-        }
-        $js = '
-<script type="text/javascript"><!--//--><![CDATA[//><!--
-qf_errorHandler = function(element, _qfMsg) {
-  div = element.parentNode;
-  var elementName = element.name.replace(/\[/, "_____");
-  var elementName = elementName.replace(/\]/, "_____");
-  if (_qfMsg != \'\') {
-    span = document.createElement("span");
-    span.className = "error";
-    _qfMsg = _qfMsg.substring(4);
-    span.appendChild(document.createTextNode(_qfMsg));
-    br = document.createElement("br");
-
-    var errorDiv = document.getElementById(elementName + \'_errorDiv\');
-    if (!errorDiv) {
-      errorDiv = document.createElement("div");
-      errorDiv.id = elementName + \'_errorDiv\';
-    } else {
-      if (   div.firstChild.textContent == \'\'
-          || _qfMsg == div.firstChild.textContent
-         ) {
-        return false;
-      }
-    }
-    while (errorDiv.firstChild) {
-      errorDiv.removeChild(errorDiv.firstChild);
-    }
-
-    errorDiv.insertBefore(br, errorDiv.firstChild);
-    errorDiv.insertBefore(span, errorDiv.firstChild);
-
-    errorDivInserted = false;
-    for (var i = element.parentNode.childNodes.length - 1; i >= 0; i--) {
-      j = i - 1;
-      if (j >= 0 && element.parentNode.childNodes[j].nodeName == "DIV") {
-        element.parentNode.insertBefore(errorDiv, element.parentNode.childNodes[i]);
-        errorDivInserted = true;
-        break;
-      }
-    }
-    if (!errorDivInserted) {
-      element.parentNode.insertBefore(errorDiv, element.parentNode.firstChild);
-    }
-
-    if (div.className.substr(div.className.length - 6, 6) != " error"
-        && div.className != "error") {
-      div.className += " error";
-    }
-
-    return false;
-  } else {
-    var errorDiv = document.getElementById(elementName + \'_errorDiv\');
-    if (errorDiv) {
-      errorDiv.parentNode.removeChild(errorDiv);
-    }
-    
-    // do not remove the error style from the div tag if there is still an error
-    // message
-    if (div.firstChild.innerHTML != "") {
-      return true;
-    }
-
-    if (div.className.substr(div.className.length - 6, 6) == " error") {
-      div.className = div.className.substr(0, div.className.length - 6);
-    } else if (div.className == "error") {
-      div.className = "";
-    }
-
-    return true;
-  }
-}';
-        $validateJS = '';
-        foreach ($test as $elementName => $jsArr) {
-            // remove group element part of the element name to avoid JS errors
-            $singleElementName = $elementName;
-            $shortNameForJS = str_replace(array('[', ']'), '__', $elementName);
-            $bracketPos = strpos($elementName, '[');
-            if ($bracketPos !== false) {
-                $singleElementName = substr($elementName, 0, $bracketPos);
-                $groupElementName = substr($elementName, $bracketPos + 1, -1);
-            }
-            if ($bracketPos === false || !$this->elementExists($singleElementName)) {
-                $groupElementName = $elementName;
-                $singleElementName = $elementName;
-            }
-            $id = str_replace('-', '_', $this->_attributes['id']);
-            $js .= '
-validate_' . $id . '_' . $shortNameForJS . ' = function(element) {
-  var value = \'\';
-  var errFlag = new Array();
-  var _qfGroups = {};
-  var _qfMsg = \'\';
-  var frm = element.parentNode;
-  while (frm && frm.nodeName != "FORM") {
-    frm = frm.parentNode;
-  }
-' . join("\n", $jsArr) . '
-  return qf_errorHandler(element, _qfMsg);
-}
-';
-            unset($element);
-            $element =& $this->getElement($singleElementName);
-            $elementNameForJS = 'frm.elements[\'' . $elementName . '\']';
-            if ($element->getType() === 'group' && $singleElementName === $elementName) {
-                $elementNameForJS = 'document.getElementById(\'' . $element->_elements[0]->getAttribute('id') . '\')';
-            }
-            $validateJS .= '
-  ret = validate_' . $id . '_' . $shortNameForJS . '('. $elementNameForJS . ') && ret;';
-            if ($element->getType() !== 'group') {  // not a group
-                $valFunc = 'validate_' . $id . '_' . $shortNameForJS . '(this)';
-                $onBlur = $element->getAttribute('onBlur');
-                $onChange = $element->getAttribute('onChange');
-                $element->updateAttributes(array('onBlur' => $onBlur . $valFunc,
-                                                 'onChange' => $onChange . $valFunc));
-            } else {  // group
-                $elements =& $element->getElements();
-                for ($i = 0; $i < count($elements); $i++) {
-                    // $groupElementName is a substring of attribute name of the element
-                    if (strpos($elements[$i]->getAttribute('name'), $groupElementName) === 0) {
-                        $valFunc = 'validate_' . $id . '_' . $shortNameForJS . '(this)';
-                        $onBlur = $elements[$i]->getAttribute('onBlur');
-                        $onChange = $elements[$i]->getAttribute('onChange');
-                        $elements[$i]->updateAttributes(array('onBlur'   => $onBlur . $valFunc,
-                                                              'onChange' => $onChange . $valFunc));
-                    }
-                }
-            }
-        }
-        $js .= '
-validate_' . $id . ' = function (frm) {
-  var ret = true;
-' . $validateJS . ';
-  return ret;
-}
-//--><!]]></script>';
-        return $js;
-    } // end func getValidationScript
-
-    // }}}
-
-    function display() {
-        $this->getValidationScript();
-        return parent::display();
-    }
-}
-
-?>
\ No newline at end of file
diff --git a/cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer.php b/cookbooks/dmca/files/default/html/HTML/QuickForm/Renderer.php
deleted file mode 100644 (file)
index 3a20504..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
-/**
- * An abstract base class for QuickForm renderers
- * 
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.01 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_01.txt If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category    HTML
- * @package     HTML_QuickForm
- * @author      Alexey Borzov <avb@php.net>
- * @copyright   2001-2011 The PHP Group
- * @license     http://www.php.net/license/3_01.txt PHP License 3.01
- * @version     CVS: $Id$
- * @link        http://pear.php.net/package/HTML_QuickForm
- */
-