It seems illogical to to start working on $remote_file_dir and $relative_path in the hook_init function before checking stage_file_proxy_origin.

Does this patch sense?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

I definitely see a case for moving the $remote_file_dir and $relative_path code to inside the if ($server) block, but I'm less sure about the other.

Leaving as needs review for other folks to weigh in.

Dave Reid’s picture

Issue summary: View changes

This would be resolved by #2351485: Use hook_file_url_alter() to fetch files (fixes incompatibility with picture module) as well which speeds up code execution if stage file proxy was not configured, but enabled.

helmo’s picture

Status: Needs review » Closed (duplicate)

@Dave Reid: thanks, lets continue there.