Commit 9cfd3e58 authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Fixed errors when calling user_access() during install.

parent 8e07209b
......@@ -29,7 +29,7 @@ function xmlsitemap_requirements($phase) {
$requirements['xmlsitemap_access'] = array(
'title' => $t('XML sitemap anonymous content access'),
'value' => $t('Access denied'),
'description' => $t('In order to allow search engines to view the XML sitemap and content on your site, the anonymous user role must have the <a href="@perm-link">%permission</a> permission.', array('@perm-link' => url('admin/user/permissions/' . DRUPAL_ANONYMOUS_RID, array('fragment' => 'module-node')), '%permission' => 'access content')),
'description' => $t('In order to allow search engines to view the XML sitemap and content on your site, the anonymous user role must have the <a href="@perm-link">%permission</a> permission.', array('@perm-link' => url('admin/config/people/permissions/' . DRUPAL_ANONYMOUS_RID, array('fragment' => 'module-node')), '%permission' => 'access content')),
'severity' => REQUIREMENT_ERROR,
);
}
......
......@@ -695,7 +695,7 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
// Test anonymous users access to sitemap.xml.
$anon_permissions = db_query("SELECT perm FROM {permission} WHERE rid = %d", DRUPAL_ANONYMOUS_RID)->fetchField();
db_query("UPDATE {permission} SET perm = '' WHERE rid = %d", DRUPAL_ANONYMOUS_RID);
$this->assertXMLSitemapProblems(t('In order to allow search engines to view the XML sitemap, the anonymous user role must have the access content permission.'));
$this->assertXMLSitemapProblems(t('In order to allow search engines to view the XML sitemap and content on your site, the anonymous user role must have the access content permission.'));
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", $anon_permissions, DRUPAL_ANONYMOUS_RID);
$this->assertNoXMLSitemapProblems();
......
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