@@ -82,7 +82,7 @@ function simple_sitemap_schema() {
*/
functionsimple_sitemap_install(){
$sitemap=newSimplesitemap;
$sitemap->generate_sitemap('drush');
$sitemap->generate_sitemap('cron');
$base_url=$GLOBALS['base_url'];
drupal_set_message(t("You can now include content into the <a href='@sitemap_url' target='_blank'>XML sitemap</a> by visiting the corresponding entity type edit pages (e.g. <a href='@content_type_url' target='_blank'>content type</a>, <a href='@taxonomy_vocabulary_url' target='_blank'>taxonomy vocabulary</a>, <a href='@menu_url' target='_blank'>menu</a> and <a href='@user_url' target='_blank'>user</a> pages.)<br/>Custom links can be added on <a href='@config_url' target='_blank'>this configuration page</a>.",array('@sitemap_url'=>"$base_url/sitemap.xml",'@content_type_url'=>"$base_url/admin/structure/types",'@taxonomy_vocabulary_url'=>"$base_url/admin/structure/taxonomy",'@menu_url'=>"$base_url/admin/structure/menu",'@user_url'=>"$base_url/admin/config/people/accounts",'@config_url'=>"$base_url/admin/config/search/simplesitemap/custom")));
constPATH_DOES_NOT_EXIST_OR_NO_ACCESS="The path @faulty_path has been omitted from the XML sitemap as it either does not exist, or it is not accessible to anonymous users.";
if(!\Drupal::service('path.validator')->isValid($custom_path['path'])){//todo: change to different function, as this also checks if current user has access. The user however varies depending if process started from the web interface or via cron/drush.
if(!\Drupal::service('path.validator')->isValid($custom_path['path'])){//todo: Change to different function, as this also checks if current user has access. The user however varies depending if process was started from the web interface or via cron/drush.