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
294
Merge Requests
294
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
e4a4b7cc
Commit
e4a4b7cc
authored
Jul 05, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#506976
by catch: rename hook_perm to hook_permission.
parent
4a4a6570
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
63 additions
and
63 deletions
+63
-63
modules/aggregator/aggregator.module
modules/aggregator/aggregator.module
+2
-2
modules/block/block.module
modules/block/block.module
+2
-2
modules/blog/blog.module
modules/blog/blog.module
+2
-2
modules/blogapi/blogapi.module
modules/blogapi/blogapi.module
+2
-2
modules/book/book.module
modules/book/book.module
+2
-2
modules/comment/comment.module
modules/comment/comment.module
+2
-2
modules/contact/contact.module
modules/contact/contact.module
+2
-2
modules/filter/filter.module
modules/filter/filter.module
+2
-2
modules/forum/forum.module
modules/forum/forum.module
+2
-2
modules/locale/locale.module
modules/locale/locale.module
+2
-2
modules/menu/menu.module
modules/menu/menu.module
+2
-2
modules/node/node.module
modules/node/node.module
+2
-2
modules/path/path.module
modules/path/path.module
+2
-2
modules/php/php.module
modules/php/php.module
+2
-2
modules/poll/poll.module
modules/poll/poll.module
+2
-2
modules/search/search.module
modules/search/search.module
+2
-2
modules/simpletest/drupal_web_test_case.php
modules/simpletest/drupal_web_test_case.php
+1
-1
modules/simpletest/simpletest.module
modules/simpletest/simpletest.module
+2
-2
modules/simpletest/tests/field_test.module
modules/simpletest/tests/field_test.module
+2
-2
modules/simpletest/tests/module_test.module
modules/simpletest/tests/module_test.module
+2
-2
modules/statistics/statistics.module
modules/statistics/statistics.module
+2
-2
modules/system/system.api.php
modules/system/system.api.php
+1
-1
modules/system/system.module
modules/system/system.module
+3
-3
modules/taxonomy/taxonomy.module
modules/taxonomy/taxonomy.module
+2
-2
modules/toolbar/toolbar.module
modules/toolbar/toolbar.module
+2
-2
modules/translation/translation.module
modules/translation/translation.module
+2
-2
modules/upload/upload.module
modules/upload/upload.module
+2
-2
modules/user/user.admin.inc
modules/user/user.admin.inc
+4
-4
modules/user/user.module
modules/user/user.module
+5
-5
profiles/default/default.profile
profiles/default/default.profile
+1
-1
No files found.
modules/aggregator/aggregator.module
View file @
e4a4b7cc
...
...
@@ -270,9 +270,9 @@ function _aggregator_has_categories() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
aggregator_perm
()
{
function
aggregator_perm
ission
()
{
return
array
(
'administer news feeds'
=>
array
(
'title'
=>
t
(
'Administer news feeds'
),
...
...
modules/block/block.module
View file @
e4a4b7cc
...
...
@@ -105,9 +105,9 @@ function block_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
block_perm
()
{
function
block_perm
ission
()
{
return
array
(
'administer blocks'
=>
array
(
'title'
=>
t
(
'Administer blocks'
),
...
...
modules/blog/blog.module
View file @
e4a4b7cc
...
...
@@ -20,9 +20,9 @@ function blog_node_info() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
blog_perm
()
{
function
blog_perm
ission
()
{
return
node_list_permissions
(
'blog'
);
}
...
...
modules/blogapi/blogapi.module
View file @
e4a4b7cc
...
...
@@ -21,9 +21,9 @@ function blogapi_help($path, $arg) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
blogapi_perm
()
{
function
blogapi_perm
ission
()
{
return
array
(
'administer content with blog api'
=>
array
(
'title'
=>
t
(
'Administer content with blog API'
),
...
...
modules/book/book.module
View file @
e4a4b7cc
...
...
@@ -37,9 +37,9 @@ function book_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
book_perm
()
{
function
book_perm
ission
()
{
return
array
(
'administer book outlines'
=>
array
(
'title'
=>
t
(
'Administer book outlines'
),
...
...
modules/comment/comment.module
View file @
e4a4b7cc
...
...
@@ -224,9 +224,9 @@ function comment_node_type($op, $info) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
comment_perm
()
{
function
comment_perm
ission
()
{
return
array
(
'administer comments'
=>
array
(
'title'
=>
t
(
'Administer comments'
),
...
...
modules/contact/contact.module
View file @
e4a4b7cc
...
...
@@ -33,9 +33,9 @@ function contact_help($path, $arg) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
contact_perm
()
{
function
contact_perm
ission
()
{
return
array
(
'administer site-wide contact form'
=>
array
(
'title'
=>
t
(
'Administer site-wide contact form'
),
...
...
modules/filter/filter.module
View file @
e4a4b7cc
...
...
@@ -145,9 +145,9 @@ function filter_admin_format_title($format) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
filter_perm
()
{
function
filter_perm
ission
()
{
return
array
(
'administer filters'
=>
array
(
'title'
=>
t
(
'Administer filters'
),
...
...
modules/forum/forum.module
View file @
e4a4b7cc
...
...
@@ -419,9 +419,9 @@ function forum_access($op, $node, $account) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
forum_perm
()
{
function
forum_perm
ission
()
{
$perms
=
array
(
'administer forums'
=>
array
(
'title'
=>
t
(
'Administer forums'
),
...
...
modules/locale/locale.module
View file @
e4a4b7cc
...
...
@@ -184,9 +184,9 @@ function locale_inc_callback() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
locale_perm
()
{
function
locale_perm
ission
()
{
return
array
(
'administer languages'
=>
array
(
'title'
=>
t
(
'Administer languages'
),
...
...
modules/menu/menu.module
View file @
e4a4b7cc
...
...
@@ -33,9 +33,9 @@ function menu_help($path, $arg) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
menu_perm
()
{
function
menu_perm
ission
()
{
return
array
(
'administer menu'
=>
array
(
'title'
=>
t
(
'Administer menu'
),
...
...
modules/node/node.module
View file @
e4a4b7cc
...
...
@@ -1261,9 +1261,9 @@ function theme_node_log_message($log) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
node_perm
()
{
function
node_perm
ission
()
{
$perms
=
array
(
'administer content types'
=>
array
(
'title'
=>
t
(
'Administer content types'
),
...
...
modules/path/path.module
View file @
e4a4b7cc
...
...
@@ -256,9 +256,9 @@ function path_form_alter(&$form, $form_state, $form_id) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
path_perm
()
{
function
path_perm
ission
()
{
return
array
(
'administer url aliases'
=>
array
(
'title'
=>
t
(
'Administer URL aliases'
),
...
...
modules/php/php.module
View file @
e4a4b7cc
...
...
@@ -22,9 +22,9 @@ function php_help($path, $arg) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
php_perm
()
{
function
php_perm
ission
()
{
return
array
(
'use PHP for settings'
=>
array
(
'title'
=>
t
(
'Use PHP for settings'
),
...
...
modules/poll/poll.module
View file @
e4a4b7cc
...
...
@@ -51,9 +51,9 @@ function poll_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
poll_perm
()
{
function
poll_perm
ission
()
{
$perms
=
node_list_permissions
(
'poll'
);
$perms
+=
array
(
'vote on polls'
=>
array
(
...
...
modules/search/search.module
View file @
e4a4b7cc
...
...
@@ -141,9 +141,9 @@ function search_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
search_perm
()
{
function
search_perm
ission
()
{
return
array
(
'administer search'
=>
array
(
'title'
=>
t
(
'Administer search'
),
...
...
modules/simpletest/drupal_web_test_case.php
View file @
e4a4b7cc
...
...
@@ -876,7 +876,7 @@ protected function checkPermissions(array $permissions, $reset = FALSE) {
static
$available
;
if
(
!
isset
(
$available
)
||
$reset
)
{
$available
=
array_keys
(
module_invoke_all
(
'perm'
));
$available
=
array_keys
(
module_invoke_all
(
'perm
ission
'
));
}
$valid
=
TRUE
;
...
...
modules/simpletest/simpletest.module
View file @
e4a4b7cc
...
...
@@ -44,9 +44,9 @@ function simpletest_menu() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
simpletest_perm
()
{
function
simpletest_perm
ission
()
{
return
array
(
'administer unit tests'
=>
array
(
'title'
=>
t
(
'Administer unit tests'
),
...
...
modules/simpletest/tests/field_test.module
View file @
e4a4b7cc
...
...
@@ -5,9 +5,9 @@
define
(
'FIELD_TEST_BUNDLE'
,
'test_bundle'
);
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
field_test_perm
()
{
function
field_test_perm
ission
()
{
$perms
=
array
(
'access field_test content'
=>
array
(
'title'
=>
t
(
'Access field_test content'
),
...
...
modules/simpletest/tests/module_test.module
View file @
e4a4b7cc
...
...
@@ -2,9 +2,9 @@
// $Id$
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
module_test_perm
()
{
function
module_test_perm
ission
()
{
return
array
(
'module_test perm'
=>
t
(
'example perm for module_test module'
),
);
...
...
modules/statistics/statistics.module
View file @
e4a4b7cc
...
...
@@ -81,9 +81,9 @@ function statistics_exit() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
statistics_perm
()
{
function
statistics_perm
ission
()
{
return
array
(
'access statistics'
=>
array
(
'title'
=>
t
(
'Access statistics'
),
...
...
modules/system/system.api.php
View file @
e4a4b7cc
...
...
@@ -668,7 +668,7 @@ function hook_system_info_alter(&$info, $file) {
*
* For a detailed usage example, see page_example.module.
*/
function
hook_perm
()
{
function
hook_perm
ission
()
{
return
array
(
'administer my module'
=>
array
(
'title'
=>
t
(
'Administer my module'
),
...
...
modules/system/system.module
View file @
e4a4b7cc
...
...
@@ -193,9 +193,9 @@ function system_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
system_perm
()
{
function
system_perm
ission
()
{
return
array
(
'administer site configuration'
=>
array
(
'title'
=>
t
(
'Administer site configuration'
),
...
...
@@ -2206,7 +2206,7 @@ function system_get_module_admin_tasks($module) {
$admin_tasks
=
array
();
$admin_task_count
=
0
;
// Check for permissions.
if
(
in_array
(
$module
,
module_implements
(
'perm'
))
&&
$admin_access
)
{
if
(
in_array
(
$module
,
module_implements
(
'perm
ission
'
))
&&
$admin_access
)
{
$admin_tasks
[
-
1
]
=
l
(
t
(
'Configure permissions'
),
'admin/user/permissions'
,
array
(
'fragment'
=>
'module-'
.
$module
));
}
...
...
modules/taxonomy/taxonomy.module
View file @
e4a4b7cc
...
...
@@ -7,9 +7,9 @@
*/
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
taxonomy_perm
()
{
function
taxonomy_perm
ission
()
{
return
array
(
'administer taxonomy'
=>
array
(
'title'
=>
t
(
'Administer taxonomy'
),
...
...
modules/toolbar/toolbar.module
View file @
e4a4b7cc
...
...
@@ -7,9 +7,9 @@
*/
/**
* Implementation of hook_perm().
* Implementation of hook_perm
ission
().
*/
function
toolbar_perm
()
{
function
toolbar_perm
ission
()
{
return
array
(
'access toolbar'
=>
array
(
'title'
=>
t
(
'Access administration toolbar'
),
...
...
modules/translation/translation.module
View file @
e4a4b7cc
...
...
@@ -82,9 +82,9 @@ function _translation_tab_access($node) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
translation_perm
()
{
function
translation_perm
ission
()
{
return
array
(
'translate content'
=>
array
(
'title'
=>
t
(
'Translate content'
),
...
...
modules/upload/upload.module
View file @
e4a4b7cc
...
...
@@ -40,9 +40,9 @@ function upload_theme() {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
upload_perm
()
{
function
upload_perm
ission
()
{
return
array
(
'upload files'
=>
array
(
'title'
=>
t
(
'Upload files'
),
...
...
modules/user/user.admin.inc
View file @
e4a4b7cc
...
...
@@ -606,8 +606,8 @@ function user_admin_perm($form_state, $rid = NULL) {
// Render role/permission overview:
$options
=
array
();
$hide_descriptions
=
!
system_admin_compact_mode
();
foreach
(
module_implements
(
'perm'
)
as
$module
)
{
if
(
$permissions
=
module_invoke
(
$module
,
'perm'
))
{
foreach
(
module_implements
(
'perm
ission
'
)
as
$module
)
{
if
(
$permissions
=
module_invoke
(
$module
,
'perm
ission
'
))
{
$info
=
drupal_parse_info_file
(
drupal_get_path
(
'module'
,
$module
)
.
"/
$module
.info"
);
$form
[
'permission'
][]
=
array
(
'#markup'
=>
$info
[
'name'
],
...
...
@@ -933,7 +933,7 @@ function user_modules_installed($modules) {
$rid
=
variable_get
(
'user_admin_role'
,
0
);
if
(
$rid
)
{
foreach
(
$modules
as
$module
)
{
if
(
$permissions
=
module_invoke
(
$module
,
'perm'
))
{
if
(
$permissions
=
module_invoke
(
$module
,
'perm
ission
'
))
{
foreach
(
array_keys
(
$permissions
)
as
$permission
)
{
db_insert
(
'role_permission'
)
->
fields
(
array
(
...
...
@@ -952,7 +952,7 @@ function user_modules_installed($modules) {
function
user_modules_uninstalled
(
$modules
)
{
$permissions
=
array
();
foreach
(
$modules
as
$module
)
{
$permissions
=
array_merge
(
$permissions
,
array_keys
(
module_invoke
(
$module
,
'perm'
)));
$permissions
=
array_merge
(
$permissions
,
array_keys
(
module_invoke
(
$module
,
'perm
ission
'
)));
}
if
(
!
empty
(
$permissions
))
{
db_delete
(
'role_permission'
)
...
...
modules/user/user.module
View file @
e4a4b7cc
...
...
@@ -745,9 +745,9 @@ function user_is_blocked($name) {
}
/**
* Implement hook_perm().
* Implement hook_perm
ission
().
*/
function
user_perm
()
{
function
user_perm
ission
()
{
return
array
(
'administer permissions'
=>
array
(
'title'
=>
t
(
'Administer permissions'
),
...
...
@@ -2394,9 +2394,9 @@ function user_filters() {
}
$options
=
array
();
foreach
(
module_implements
(
'perm'
)
as
$module
)
{
$function
=
$module
.
'_perm'
;
if
(
$permissions
=
$function
(
'perm'
))
{
foreach
(
module_implements
(
'perm
ission
'
)
as
$module
)
{
$function
=
$module
.
'_perm
ission
'
;
if
(
$permissions
=
$function
(
'perm
ission
'
))
{
asort
(
$permissions
);
foreach
(
$permissions
as
$permission
=>
$description
)
{
$options
[
t
(
'@module module'
,
array
(
'@module'
=>
$module
))][
$permission
]
=
t
(
$permission
);
...
...
profiles/default/default.profile
View file @
e4a4b7cc
...
...
@@ -222,7 +222,7 @@ function default_profile_tasks(&$task, $url) {
variable_set
(
'user_admin_role'
,
$rid
);
// Assign all available permissions to this role.
foreach
(
module_invoke_all
(
'perm'
)
as
$key
=>
$value
)
{
foreach
(
module_invoke_all
(
'perm
ission
'
)
as
$key
=>
$value
)
{
db_insert
(
'role_permission'
)
->
fields
(
array
(
'rid'
=>
$rid
,
...
...
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