Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
300
Merge Requests
300
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
10a5ba71
Commit
10a5ba71
authored
Jun 05, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#482920
by Razorraser: fixed typo in node_access_rebuild().
parent
f8dace9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
3 deletions
+59
-3
modules/node/node.module
modules/node/node.module
+3
-3
modules/node/node.test
modules/node/node.test
+56
-0
No files found.
modules/node/node.module
View file @
10a5ba71
...
...
@@ -789,7 +789,7 @@ function node_type_set_defaults($info = array()) {
* @param $hook
* A string containing the name of the hook.
* @return
* TRUE if
f
the $hook exists in the node type of $node.
* TRUE if the $hook exists in the node type of $node.
*/
function
node_hook
(
$node
,
$hook
)
{
$base
=
node_type_get_base
(
$node
);
...
...
@@ -2870,7 +2870,7 @@ function node_access_rebuild($batch_mode = FALSE) {
}
else
{
// Not using any node_access modules. Add the default grant.
db_insert
(
'node_access
s
'
)
db_insert
(
'node_access'
)
->
fields
(
array
(
'nid'
=>
0
,
'realm'
=>
'all'
,
...
...
@@ -3392,7 +3392,7 @@ function node_requirements($phase) {
$requirements
[
'node_access'
]
=
array
(
'title'
=>
$t
(
'Node Access Permissions'
),
'value'
=>
$value
,
'description'
=>
$description
.
' '
.
l
(
'Rebuild
P
ermissions'
,
'admin/reports/status/rebuild'
),
'description'
=>
$description
.
' '
.
l
(
'Rebuild
p
ermissions'
,
'admin/reports/status/rebuild'
),
);
return
$requirements
;
}
modules/node/node.test
View file @
10a5ba71
...
...
@@ -833,3 +833,59 @@ class NodeTypeTestCase extends DrupalWebTestCase {
$this
->
assertEqual
(
$node_types
[
'page'
]
->
base
,
node_type_get_base
(
'page'
),
t
(
'Correct node type base has been returned.'
));
}
}
/**
* 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.'
));
}
}
/**
* 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.'
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment