$message=t('One or more problems were detected with your XML sitemap configuration: !messages',array('!messages'=>theme('item_list',array('items'=>$messages))));
if(user_access('access site reports')){
$message.=t('Check the <a href="@status-report">status report</a> for more information.',array('@status-report'=>url('admin/reports/status')));
$message=t('One or more problems were detected with your XML sitemap configuration: !messages',array('!messages'=>theme('item_list',array('items'=>$messages))));
if(user_access('access site reports')){
$message.=t('Check the <a href="@status-report">status report</a> for more information.',array('@status-report'=>url('admin/reports/status')));
}
drupal_set_message($message,'warning',FALSE);
}
}
return!empty($messages);
}
/**
* Implements hook_update_last_removed().
*/
...
...
@@ -396,6 +351,7 @@ function xmlsitemap_update_6202() {
'smid'=>array(
'description'=>'Sitemap ID',
'type'=>'serial',
'unsigned'=>TRUE,
'not null'=>TRUE,
),
'context_hash'=>array(
...
...
@@ -439,8 +395,9 @@ function xmlsitemap_update_6202() {
// Add the default sitemap(s) and use language contexts if possible.
if(!db_query("SELECT COUNT(smid) FROM {xmlsitemap_sitemap}")->fetchField()){
// Refresh the schema.
// Refresh the schema and load the module if it's disabled.
* The default inclusion status for link types in the sitemaps.
*/
define('XMLSITEMAP_STATUS_DEFAULT',0);
/**
* The default priority for link types in the sitemaps.
*/
define('XMLSITEMAP_PRIORITY_DEFAULT',0.5);
/**
* Implements hook_hook_info().
*/
...
...
@@ -73,6 +83,9 @@ function xmlsitemap_hook_info() {
$hooks['xmlsitemap_sitemap_operations']=array(
'group'=>'xmlsitemap',
);
$hooks['xmlsitemap_sitemap_delete']=array(
'group'=>'xmlsitemap',
);
return$hooks;
}
...
...
@@ -94,15 +107,13 @@ function xmlsitemap_help($path, $arg) {
$output.='<p>'.t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.").'</p>';
$sitemaps=!empty($smids)?db_query("SELECT * FROM {xmlsitemap_sitemap} WHERE smid IN (:smids)",array(':smids'=>$smids))->fetchAllAssoc('smid',PDO::FETCH_ASSOC):array();