Commit 831b2e0e authored by Dries's avatar Dries

- Rollback of last patch.

parent 10a5ba71
...@@ -789,7 +789,7 @@ function node_type_set_defaults($info = array()) { ...@@ -789,7 +789,7 @@ function node_type_set_defaults($info = array()) {
* @param $hook * @param $hook
* A string containing the name of the hook. * A string containing the name of the hook.
* @return * @return
* TRUE if the $hook exists in the node type of $node. * TRUE iff the $hook exists in the node type of $node.
*/ */
function node_hook($node, $hook) { function node_hook($node, $hook) {
$base = node_type_get_base($node); $base = node_type_get_base($node);
...@@ -2870,7 +2870,7 @@ function node_access_rebuild($batch_mode = FALSE) { ...@@ -2870,7 +2870,7 @@ function node_access_rebuild($batch_mode = FALSE) {
} }
else { else {
// Not using any node_access modules. Add the default grant. // Not using any node_access modules. Add the default grant.
db_insert('node_access') db_insert('node_accesss')
->fields(array( ->fields(array(
'nid' => 0, 'nid' => 0,
'realm' => 'all', 'realm' => 'all',
...@@ -3392,7 +3392,7 @@ function node_requirements($phase) { ...@@ -3392,7 +3392,7 @@ function node_requirements($phase) {
$requirements['node_access'] = array( $requirements['node_access'] = array(
'title' => $t('Node Access Permissions'), 'title' => $t('Node Access Permissions'),
'value' => $value, 'value' => $value,
'description' => $description . ' ' . l('Rebuild permissions', 'admin/reports/status/rebuild'), 'description' => $description . ' ' . l('Rebuild Permissions', 'admin/reports/status/rebuild'),
); );
return $requirements; return $requirements;
} }
...@@ -861,31 +861,3 @@ class NodeAccessRebuildTestCase extends DrupalWebTestCase { ...@@ -861,31 +861,3 @@ class NodeAccessRebuildTestCase extends DrupalWebTestCase {
$this->assertText(t('Content permissions have been rebuilt.')); $this->assertText(t('Content permissions have been rebuilt.'));
} }
} }
/**
* Rebuild the node_access table.
*/
class NodeAccessRebuildTestCase extends DrupalWebTestCase {
function getInfo() {
return array(
'name' => t('Node access rebuild'),
'description' => t('Ensures that node access rebuild functions work correctly.'),
'group' => t('Node'),
);
}
function setUp() {
parent::setUp();
$web_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'access site reports'));
$this->drupalLogin($web_user);
$this->web_user = $web_user;
}
function testNodeAccessRebuild() {
$this->drupalGet('admin/reports/status');
$this->clickLink(t('Rebuild permissions'));
$this->drupalPost(NULL, array(), t('Rebuild permissions'));
$this->assertText(t('Content permissions have been rebuilt.'));
}
}
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