Commit 4fbfba0f authored by gbyte.co's avatar gbyte.co

Issue #2623932 by sagesolutions: Fixed error message during cron when no...

Issue #2623932 by sagesolutions: Fixed error message during cron when no content type was included. Added additional info during module installation.
parent 3c9079ae
......@@ -32,6 +32,14 @@ function simplesitemap_schema() {
return $schema;
}
/**
* Implements hook_install().
*/
function simplesitemap_install() {
$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> and <a href='@taxonomy_vocabulary_url' target='_blank'>taxonomy vocabulary</a> pages.)", array('@sitemap_url' => "$base_url/sitemap.xml", '@content_type_url' => "$base_url/admin/structure/types", '@taxonomy_vocabulary_url' => "$base_url/admin/structure/taxonomy")));
}
/**
* Altering the {simplesitemap} language_code table field to hold longer strings.
*/
......
......@@ -41,11 +41,11 @@ class SitemapGenerator {
}
public function set_entity_types($entity_types) {
$this->entity_types = $entity_types;
$this->entity_types = is_array($entity_types) ? $entity_types : array();
}
public function set_custom_links($custom) {
$this->custom = $custom;
$this->custom = is_array($custom) ? $custom : array();
}
public function set_sitemap_lang($language) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment