Needs review
Project:
Google Image Sitemap
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2013 at 08:35 UTC
Updated:
15 Oct 2018 at 14:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
imiksuPatch provided.
Comment #2
imiksuI found out that rebuild wasn't working because it was using
drupal_goto()function which can't be used on CLI environment. This causes problems when runnin cron in drush.I've fixed it in this patch by using
drupal_is_cli()function.Comment #3
tamarpe commentedIt causes infinity redirect loop when running Cron via the website and not in Drush.
When checking -drupal_is_cli(), there should be another check if the path is cron.php
Comment #4
tamarpe commentedI changed the check from !drupal_is_cli(), to if ((strpos(current_path(), '/google_image_sitemap'))), so it works from the button in the module settings, and cron via drush/manually.
Comment #5
santimg commentedAt first I couldn't apply the patch in #4, I could after adding an empty end of file line.
When applied, I got big load times in some pages, I solved it adding strict type comparison for the strpos() function. Like this:
Also check the code standards for comments please! They are missing some dots at the end of the lines. I think everything is working correctly after applying these changes.
Comment #6
eryth commentedApplied patch from #4 and fix from #5. Sitemap generates but not update on RE-generate
-------------------------
Sorry, it was caching, all work perfect)
Comment #7
jerry commentedPatch from #4 plus fix from #5 working well for me.
Comment #8
tamarpe commentedA bit more elegant way, and some code standards fixes
EDIT - A small typo, the next comment is the up-to-date works patch
Comment #9
tamarpe commentedComment #10
tamarpe commented