diff --git a/composer.json b/composer.json index 0ab17cc43..7cd834f31 100644 --- a/composer.json +++ b/composer.json @@ -160,6 +160,7 @@ "drupal/readonlymode": "^1.2", "drupal/realname": "^1.4", "drupal/redirect": "1.0-rc4", + "drupal/redirect_404": "^1.1", "drupal/registry_autoload": "^1.3", "drupal/registry_rebuild": "^2.5", "drupal/restclient": "^2.0", diff --git a/composer.lock b/composer.lock index 04a9ad9c4..559c4993e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5ba3ea429f7ef803d22864719073ad83", + "content-hash": "dda09a4ed3ac9114b0afa45da8018bd5", "packages": [ { "name": "composer/installers", @@ -8380,6 +8380,50 @@ "source": "https://git.drupalcode.org/project/redirect" } }, + { + "name": "drupal/redirect_404", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/redirect_404.git", + "reference": "7.x-1.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/redirect_404-7.x-1.1.zip", + "reference": "7.x-1.1", + "shasum": "21a18f2846f5027494cc94024ea094b6c29a20da" + }, + "require": { + "drupal/drupal": "~7.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "7.x-1.1", + "datestamp": "1378403209", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/7/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "vlad.pavlovic", + "homepage": "https://www.drupal.org/user/92673" + } + ], + "description": "Redirects 404 allows you to specify a number of servers that should be attempted to be redirected to if a 404 (Page not found) error is encountered.", + "homepage": "https://www.drupal.org/project/redirect_404", + "support": { + "source": "https://git.drupalcode.org/project/redirect_404" + } + }, { "name": "drupal/registry_autoload", "version": "1.3.0", diff --git a/docker/Dockerfile b/docker/Dockerfile index fbd76e709..d7c3575e6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -33,6 +33,7 @@ COPY --from=builder /srv/www/vendor /srv/www/vendor COPY --from=builder /srv/www/composer.json /srv/www/composer.json COPY --from=builder /srv/www/composer.lock /srv/www/composer.lock COPY --from=builder /srv/www/composer.patches.json /srv/www/composer.patches.json +COPY --from=builder /srv/www/docker/drupal.conf /etc/nginx/apps/drupal/drupal.conf COPY --from=builder /srv/www/docker/fastcgi_drupal.conf /etc/nginx/apps/drupal/fastcgi_drupal.conf COPY --from=builder /srv/www/docker/custom /etc/nginx/custom COPY --from=builder /srv/www/docker/ratelimit.conf.template /etc/nginx/ratelimit.conf.template diff --git a/docker/drupal.conf b/docker/drupal.conf new file mode 100644 index 000000000..8425fdda2 --- /dev/null +++ b/docker/drupal.conf @@ -0,0 +1,387 @@ +# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*- +### Nginx configuration for Drupal. This configuration makes use of +### drush (http:///drupal.org/project/drush) for site maintenance +### and like tasks: +### +### 1. Run the cronjobs. +### 2. Run the DB and code updates: drush up or drush upc followed by +### drush updb to run any DB updates required by the code upgrades +### that were performed. +### 3. Disabling of xmlrpc.xml, install.php (needed only for +### installing the site) and update.php: all updates are now +### handled through drush. + +## The 'default' location. +location / { + + # Passworded until launch. Keeps bots out. + # satisfy any; + # allow 10.5.103.1/32; + # allow 10.5.103.2/32; + # allow 10.5.104.1/32; + # allow 10.5.104.2/32; + # deny all; + # auth_basic "Restricted access"; #realm + # auth_basic_user_file /etc/nginx/.htpasswd-users; + + ## Drupal 404 from can impact performance. If using a module like + ## search404 then 404's *have *to be handled by Drupal. Uncomment to + ## relay the handling of 404's to Drupal. + ## error_page 404 /index.php; + + ## Using a nested location is the 'correct' way to use regexes. + + ## Regular private file serving (i.e. handled by Drupal). + location ^~ /system/files/ { + ## Include the specific FastCGI configuration. This is for a + ## FCGI backend like php-cgi or php-fpm. + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + + ## If proxying to apache comment the two lines above and + ## uncomment the two lines below. + #proxy_pass http://phpapache/index.php?q=$uri; + #proxy_set_header Connection ''; + + ## For not signaling a 404 in the error log whenever the + ## system/files directory is accessed add the line below. + ## Note that the 404 is the intended behavior. + log_not_found off; + } + + # Do the same for multilingual private files. + location ^~ /ar/system/files/ { + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + log_not_found off; + } + location ^~ /en/system/files/ { + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + log_not_found off; + } + location ^~ /fr/system/files/ { + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + log_not_found off; + } + location ^~ /ru/system/files/ { + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + log_not_found off; + } + location ^~ /es/system/files/ { + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + log_not_found off; + } + + ## Trying to access private files directly returns a 404. + location ^~ /sites/default/private/ { + internal; + } + + ## Trying to access private files directly returns a 404. + location ^~ /sites/(.*)/private/ { + internal; + } + + ## Support for the file_force module + ## http://drupal.org/project/file_force. + location ^~ /(ar|en|fr|ru|es)/system/files_force/ { + ## Include the specific FastCGI configuration. This is for a + ## FCGI backend like php-cgi or php-fpm. + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + + ## If proxying to apache comment the two lines above and + ## uncomment the two lines below. + #proxy_pass http://phpapache/index.php?q=$uri; + #proxy_set_header Connection ''; + + ## For not signaling a 404 in the error log whenever the + ## system/files directory is accessed add the line below. + ## Note that the 404 is the intended behavior. + log_not_found off; + } + + ## If accessing an image generated by Drupal 6 imagecache, serve it + ## directly if available, if not relay the request to Drupal to (re)generate + ## the image. + location ~* /imagecache/ { + ## Image hotlinking protection. If you want hotlinking + ## protection for your images uncomment the following line. + #include apps/drupal/hotlinking_protection.conf; + + access_log off; + expires 30d; + try_files $uri @drupal; + } + + ## Drupal 7 generated image handling, i.e., imagecache in core. See: + ## http://drupal.org/node/371374. + location ~* /files/styles/ { + ## Image hotlinking protection. If you want hotlinking + ## protection for your images uncomment the following line. + #include apps/drupal/hotlinking_protection.conf; + + access_log off; + expires 30d; + try_files $uri @drupal; + } + + ## Advanced Aggregation module CSS + ## support. http://drupal.org/project/advagg. + location ~* /files/advagg_(?:css|js)/ { + gzip_static on; + access_log off; + expires max; + add_header ETag ""; + add_header Cache-Control "max-age=31449600, no-transform, public"; + add_header Accept-Ranges ''; + try_files $uri $uri/ @drupal; + } + + ## Location for public derivative images to avoid hitting Drupal for invalid + ## image derivative paths or if the source image doesn't exist. + location ^~ /sites/default/files/styles/ { + + ## Valid public derivative image paths. + location ~ "^/sites/default/files/styles/[^/]+/public/(?.*)$" { + access_log off; + expires 30d; + ## No need to bleed constant updates. Send the all shebang in one + ## fell swoop. + tcp_nodelay off; + ## Set the OS file cache. + open_file_cache max=3000 inactive=120s; + open_file_cache_valid 45s; + open_file_cache_min_uses 2; + open_file_cache_errors off; + + ## Return the derivative image if it already exists or ask Drupal + ## to generate it otherwise. + try_files $uri @drupal-generate-derivative-image; + } + + ## Simply return a 404 for unrecognized derivative image paths. + return 404; + } + + ## All static files will be served directly. + location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|otf|ttf|eot|woff|svg)$ { + + access_log off; + expires 30d; + ## No need to bleed constant updates. Send the all shebang in one + ## fell swoop. + tcp_nodelay off; + ## Set the OS file cache. + open_file_cache max=3000 inactive=120s; + open_file_cache_valid 45s; + open_file_cache_min_uses 2; + open_file_cache_errors off; + } + + ## PDFs and powerpoint files handling. + location ~* ^.+\.(?:pdf|pptx?)$ { + expires 30d; + ## No need to bleed constant updates. Send the all shebang in one + ## fell swoop. + tcp_nodelay off; + } + + ## MP3 and Ogg/Vorbis files are served using AIO when supported. Your OS must support it. + location ~* /files/audio/mp3/.*\.mp3$ { + directio 4k; # for XFS + ## If you're using ext3 or similar uncomment the line below and comment the above. + #directio 512; # for ext3 or similar (block alignments) + tcp_nopush off; + aio on; + output_buffers 1 2M; + } + + location ~* /files/audio/ogg/.*\.ogg$ { + directio 4k; # for XFS + ## If you're using ext3 or similar uncomment the line below and comment the above. + #directio 512; # for ext3 or similar (block alignments) + tcp_nopush off; + aio on; + output_buffers 1 2M; + } + + ## Pseudo streaming of FLV files: + ## http://wiki.nginx.org/HttpFlvStreamModule. + ## If pseudo streaming isn't working, try to comment + ## out in nginx.conf line with: + ## add_header X-Frame-Options SAMEORIGIN; + # location ^~ /sites/default/files/video/flv { + # location ~* ^/sites/default/files/video/flv/.*\.flv$ { + # flv; + # } + # } + + ## Pseudo streaming of H264/AAC files. This requires an Nginx + ## version greater or equal to 1.0.7 for the stable branch and + ## greater or equal to 1.1.3 for the development branch. + ## Cf. http://nginx.org/en/docs/http/ngx_http_mp4_module.html. + # location ^~ /sites/default/files/video/mp4 { # videos + # location ~* ^/sites/default/files/video/mp4/.*\.(?:mp4|mov)$ { + # mp4; + # mp4_buffer_size 1M; + # mp4_max_buffer_size 5M; + # } + # } + + # location ^~ /sites/default/files/audio/m4a { # audios + # location ~* ^/sites/default/files/audio/m4a/.*\.m4a$ { + # mp4; + # mp4_buffer_size 1M; + # mp4_max_buffer_size 5M; + # } + # } + + ## Replicate the Apache directive of Drupal standard + ## .htaccess. Disable access to any code files. Return a 404 to curtail + ## information disclosure. Hide also the text files. + ## And amend the list with Drupal 8/9/10 yaml files. + location ~* ^(?:.+\.(?:htaccess|make|txt|engine|inc|info|install|module|profile|po|pot|sh|.*sql|test|theme|twig|tpl(?:\.php)?|xtmpl|yaml|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?|code-style\.pl|/Entries.*|/Repository|/Root|/Tag|/Template|)$ { + return 404; + } + + ## Extend the list with Drupal 8/9/10 composer files and the rest of the new shipped .htaccess list :-) + location ~* (composer\.(json|lock)|web\.config)|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ { + return 404; + } + + ## First we try the URI and relay to the /index.php?q=$uri&$args if not found. + try_files $uri @drupal; +} + +########### Security measures ########## + +## Uncomment the line below if you want to enable basic auth for +## access to all /admin URIs. Note that this provides much better +## protection if use HTTPS. Since it can easily be eavesdropped if you +## use HTTP. +#include apps/drupal/admin_basic_auth.conf; + +## Restrict access to the strictly necessary PHP files. Reducing the +## scope for exploits. Handling of PHP code and the Drupal event loop. +location @drupal { + ## Include the FastCGI config. + include apps/drupal/fastcgi_drupal.conf; + fastcgi_pass phpcgi; + + ## If proxying to apache comment the two lines above and + ## uncomment the two lines below. + #proxy_pass http://phpapache/index.php?q=$uri; + #proxy_set_header Connection ''; + + ## Filefield Upload progress + ## http://drupal.org/project/filefield_nginx_progress support + ## through the NginxUploadProgress modules. + # track_uploads uploads 60s; +} + +location @drupal-no-args { + ## Include the specific FastCGI configuration. This is for a + ## FCGI backend like php-cgi or php-fpm. + include apps/drupal/fastcgi_no_args_drupal.conf; + fastcgi_pass phpcgi; + + ## If proxying to apache comment the two lines above and + ## uncomment the two lines below. + #proxy_pass http://phpapache/index.php?q=$uri; + #proxy_set_header Connection ''; +} + +## Internal location to ask Drupal to generate a derivative image if the source +## image is present. +location @drupal-generate-derivative-image { + ## If the source image doesn't exist return a 404. + if (!-f "$document_root/sites/default/files/$file_path") { + return 404; + } + + ## Otherwise pass the request to drupal. + try_files /dev/null @drupal; +} + +## Disallow access to .bzr, .git, .hg, .svn, .cvs directories: return +## 404 as not to disclose information. +location ^~ /.bzr { + return 404; +} + +location ^~ /.git { + return 404; +} + +location ^~ /.hg { + return 404; +} + +location ^~ /.svn { + return 404; +} + +location ^~ /.cvs { + return 404; +} + +## Disallow access to patches directory. +location ^~ /patches { + return 404; +} + +## Disallow access to drush backup directory. +location ^~ /backup { + return 404; +} + +## Disable access logs for robots.txt. +location = /robots.txt { + access_log off; + ## Add support for the robotstxt module + ## http://drupal.org/project/robotstxt. + try_files $uri @drupal-no-args; +} + +## RSS feed support. +location = /rss.xml { + try_files $uri @drupal-no-args; +} + +## XML Sitemap support. +location = /sitemap.xml { + try_files $uri @drupal-no-args; +} + +## Support for favicon. Return an 1x1 transparent GIF if it doesn't +## exist. +location = /favicon.ico { + expires 30d; + try_files /favicon.ico @empty; +} + +## Return an in memory 1x1 transparent GIF. +location @empty { + expires 30d; + empty_gif; +} + +## Any other attempt to access PHP files returns a 404. +location ~* ^.+\.php$ { + return 404; +} + +if ( $args ~* "/autocomplete/" ) { + return 406; + ### error_page 406 = @drupal; ### error_page directive is not allowed within pseudo-location +} + +error_page 406 = @drupal; + +# Custom: On 404, redirect to a 404 on RW Response. +error_page 404 = https://response.reliefweb.int/404; diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProvider/DataProviderOgMemberships.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProvider/DataProviderOgMemberships.php index 5fae31e84..64b770997 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProvider/DataProviderOgMemberships.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProvider/DataProviderOgMemberships.php @@ -3,8 +3,8 @@ namespace Drupal\hr_api\Plugin\resource\DataProvider; use Drupal\restful\Exception\ForbiddenException; -use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; use Drupal\restful\Http\RequestInterface; +use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; /** * Class DataProviderOgMemberships. diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProviderOptimized.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProviderOptimized.php index 63d1bb7c0..23b466c04 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProviderOptimized.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/DataProviderOptimized.php @@ -2,11 +2,11 @@ namespace Drupal\hr_api\Plugin\resource; -use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; -use Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface; -use Drupal\restful\Http\RequestInterface; use Drupal\restful\Exception\ForbiddenException; use Drupal\restful\Exception\UnprocessableEntityException; +use Drupal\restful\Http\RequestInterface; +use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; +use Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/Field/ResourceFieldEntityTextCustom.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/Field/ResourceFieldEntityTextCustom.php index a9a561986..93f57a918 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/Field/ResourceFieldEntityTextCustom.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/Field/ResourceFieldEntityTextCustom.php @@ -2,8 +2,8 @@ namespace Drupal\hr_api\Plugin\resource\Field; -use Drupal\restful\Plugin\resource\Field\ResourceFieldEntityText; use Drupal\restful\Plugin\resource\Field\ResourceFieldEntityInterface; +use Drupal\restful\Plugin\resource\Field\ResourceFieldEntityText; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/ResourceCustom.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/ResourceCustom.php index 150102273..320accc8e 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/ResourceCustom.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/ResourceCustom.php @@ -2,8 +2,8 @@ namespace Drupal\hr_api\Plugin\resource; -use Drupal\restful\Plugin\resource\ResourceEntity; use Drupal\restful\Http\HttpHeader; +use Drupal\restful\Plugin\resource\ResourceEntity; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/RestfulFiles.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/RestfulFiles.php index c32478e00..e7b754c5f 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/RestfulFiles.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/RestfulFiles.php @@ -3,8 +3,8 @@ namespace Drupal\hr_api\Plugin\resource; use Drupal\restful\Exception\UnauthorizedException; -use Drupal\restful\Plugin\resource\ResourceInterface; use Drupal\restful\Http\RequestInterface; +use Drupal\restful\Plugin\resource\ResourceInterface; /** * Class RestfulFiles. diff --git a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/fields/ResourceFieldEntityMinimal.php b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/fields/ResourceFieldEntityMinimal.php index 4f6b3cf7f..0ce1f965d 100644 --- a/html/sites/all/modules/hr/hr_api/src/Plugin/resource/fields/ResourceFieldEntityMinimal.php +++ b/html/sites/all/modules/hr/hr_api/src/Plugin/resource/fields/ResourceFieldEntityMinimal.php @@ -2,12 +2,12 @@ namespace Drupal\hr_api\Plugin\resource\fields; -use Drupal\restful\Plugin\resource\Field\ResourceFieldEntity; -use Drupal\restful\Plugin\resource\Field\ResourceFieldEntityInterface; use Drupal\restful\Exception\InaccessibleRecordException; use Drupal\restful\Exception\UnprocessableEntityException; use Drupal\restful\Http\Request; use Drupal\restful\Http\RequestInterface; +use Drupal\restful\Plugin\resource\Field\ResourceFieldEntity; +use Drupal\restful\Plugin\resource\Field\ResourceFieldEntityInterface; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_assessments/src/Plugin/resource/DataProviderAssessments.php b/html/sites/all/modules/hr/hr_assessments/src/Plugin/resource/DataProviderAssessments.php index 7560230a8..c7fc089fe 100644 --- a/html/sites/all/modules/hr/hr_assessments/src/Plugin/resource/DataProviderAssessments.php +++ b/html/sites/all/modules/hr/hr_assessments/src/Plugin/resource/DataProviderAssessments.php @@ -2,10 +2,10 @@ namespace Drupal\hr_assessments\Plugin\resource; +use Drupal\restful\Exception\ForbiddenException; +use Drupal\restful\Http\RequestInterface; use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; use Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface; -use Drupal\restful\Http\RequestInterface; -use Drupal\restful\Exception\ForbiddenException; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_core/hr_core.install b/html/sites/all/modules/hr/hr_core/hr_core.install index 890c2d608..dbad0c6ff 100644 --- a/html/sites/all/modules/hr/hr_core/hr_core.install +++ b/html/sites/all/modules/hr/hr_core/hr_core.install @@ -892,3 +892,14 @@ function hr_core_update_7053() { module_disable($disable); drupal_uninstall_modules($disable, FALSE); } + +/** + * Enable and configure redirect_404 module. + */ +function hr_core_update_7054() { + variable_set('redirect_404_redirect', 'https://response.reliefweb.int/404'); + $enable = array( + 'redirect_404', + ); + module_enable($enable); +} diff --git a/html/sites/all/modules/hr/hr_core/hr_core.module b/html/sites/all/modules/hr/hr_core/hr_core.module index 792f061ca..8d92dd42e 100644 --- a/html/sites/all/modules/hr/hr_core/hr_core.module +++ b/html/sites/all/modules/hr/hr_core/hr_core.module @@ -2319,13 +2319,19 @@ function hr_core_resolve_full_url_from_configuration_single($configuration) { * * Ensure that redirects to response.reliefweb.int are not emitted if the * user-agent header contains "archive" so that archive.org can get our - * original content. + * original content. Prevent caching, so *other* users get redirected and + * not actual content from the page or varnish cache. * * @see https://humanitarian.atlassian.net/browse/OPS-9290 */ function hr_core_redirect_alter(&$redirect) { + // Early return if not archive.org. + if (!isset($_SERVER['HTTP_USER_AGENT']) || (stripos($_SERVER['HTTP_USER_AGENT'], "archive") == FALSE)) { + return; + } - if (isset($redirect->redirect) && (strpos($redirect->redirect, "https://response.reliefweb.int") !== FALSE) && isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], "archive") !== FALSE)) { + if (isset($redirect->redirect) && (stripos($redirect->redirect, "https://response.reliefweb.int") !== FALSE)) { + drupal_page_is_cacheable(FALSE); $redirect->redirect = FALSE; } } diff --git a/html/sites/all/modules/hr/hr_disasters/src/Plugin/resource/RestfulEntityNodeDisasters.php b/html/sites/all/modules/hr/hr_disasters/src/Plugin/resource/RestfulEntityNodeDisasters.php index 666244aa5..5d0ac2fad 100644 --- a/html/sites/all/modules/hr/hr_disasters/src/Plugin/resource/RestfulEntityNodeDisasters.php +++ b/html/sites/all/modules/hr/hr_disasters/src/Plugin/resource/RestfulEntityNodeDisasters.php @@ -2,8 +2,8 @@ namespace Drupal\hr_disasters\Plugin\resource; -use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterInterface; use Drupal\hr_api\Plugin\resource\ResourceCustom; +use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterInterface; use Drupal\restful\Plugin\resource\ResourceInterface; /** diff --git a/html/sites/all/modules/hr/hr_documents/src/Plugin/resource/DataProviderFieldFilesCollection.php b/html/sites/all/modules/hr/hr_documents/src/Plugin/resource/DataProviderFieldFilesCollection.php index 840fb86b7..801b5d232 100644 --- a/html/sites/all/modules/hr/hr_documents/src/Plugin/resource/DataProviderFieldFilesCollection.php +++ b/html/sites/all/modules/hr/hr_documents/src/Plugin/resource/DataProviderFieldFilesCollection.php @@ -2,9 +2,9 @@ namespace Drupal\hr_documents\Plugin\resource; +use Drupal\restful\Http\RequestInterface; use Drupal\restful\Plugin\resource\DataProvider\DataProviderEntity; use Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface; -use Drupal\restful\Http\RequestInterface; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_events/hr_events.drush.inc b/html/sites/all/modules/hr/hr_events/hr_events.drush.inc index 1910d7ccc..333ba19bc 100644 --- a/html/sites/all/modules/hr/hr_events/hr_events.drush.inc +++ b/html/sites/all/modules/hr/hr_events/hr_events.drush.inc @@ -47,7 +47,7 @@ function drush_hr_events_hid_contacts() { 'finished' => 'drush_hr_events_hid_contacts_batch_finished', ); batch_set($batch); - $batch =& batch_get(); + $batch = & batch_get(); drush_backend_batch_process(); } diff --git a/html/sites/all/modules/hr/hr_locations/src/Plugin/resource/RestfulEntityTaxonomyTermLocations.php b/html/sites/all/modules/hr/hr_locations/src/Plugin/resource/RestfulEntityTaxonomyTermLocations.php index 131ea8f31..1e32f73f4 100644 --- a/html/sites/all/modules/hr/hr_locations/src/Plugin/resource/RestfulEntityTaxonomyTermLocations.php +++ b/html/sites/all/modules/hr/hr_locations/src/Plugin/resource/RestfulEntityTaxonomyTermLocations.php @@ -3,9 +3,9 @@ namespace Drupal\hr_locations\Plugin\resource; use Drupal\hr_api\Plugin\resource\ResourceCustom; -use Drupal\restful\Plugin\resource\ResourceInterface; -use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterInterface; use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterEMW; +use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterInterface; +use Drupal\restful\Plugin\resource\ResourceInterface; /** * Class RestfulEntityTaxonomyTermLocations. diff --git a/html/sites/all/modules/hr/hr_operations/src/Plugin/resource/RestfulEntityNodeOperations.php b/html/sites/all/modules/hr/hr_operations/src/Plugin/resource/RestfulEntityNodeOperations.php index 3e0f73a6a..10cbdbe6e 100644 --- a/html/sites/all/modules/hr/hr_operations/src/Plugin/resource/RestfulEntityNodeOperations.php +++ b/html/sites/all/modules/hr/hr_operations/src/Plugin/resource/RestfulEntityNodeOperations.php @@ -3,8 +3,8 @@ namespace Drupal\hr_operations\Plugin\resource; use Drupal\hr_api\Plugin\resource\ResourceCustom; -use Drupal\restful\Plugin\resource\ResourceInterface; use Drupal\restful\Plugin\resource\DataInterpreter\DataInterpreterInterface; +use Drupal\restful\Plugin\resource\ResourceInterface; /** * Class RestfulEntityNodeOperations. diff --git a/html/sites/all/modules/hr/hr_organizations/src/Plugin/resource/DataProviderOrganizations.php b/html/sites/all/modules/hr/hr_organizations/src/Plugin/resource/DataProviderOrganizations.php index 6b7f5f694..0982d4919 100644 --- a/html/sites/all/modules/hr/hr_organizations/src/Plugin/resource/DataProviderOrganizations.php +++ b/html/sites/all/modules/hr/hr_organizations/src/Plugin/resource/DataProviderOrganizations.php @@ -2,9 +2,9 @@ namespace Drupal\hr_organizations\Plugin\resource; +use Drupal\restful\Http\RequestInterface; use Drupal\restful\Plugin\resource\DataProvider\DataProviderTaxonomyTerm; use Drupal\restful\Plugin\resource\DataProvider\DataProviderInterface; -use Drupal\restful\Http\RequestInterface; /** * Class definition. diff --git a/html/sites/all/modules/hr/hr_tools/hr_tools.drush.inc b/html/sites/all/modules/hr/hr_tools/hr_tools.drush.inc index e166a266f..9683b5317 100644 --- a/html/sites/all/modules/hr/hr_tools/hr_tools.drush.inc +++ b/html/sites/all/modules/hr/hr_tools/hr_tools.drush.inc @@ -63,7 +63,7 @@ function drush_hr_tools_access_rebuild() { 'finished' => '_drush_hr_tools__node_access_rebuild_batch_finished', ); batch_set($batch); - $batch =& batch_get(); + $batch = & batch_get(); drush_backend_batch_process(); } if (!isset($batch)) {