Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443488
Commits
703557e1
Commit
703557e1
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#283201
by pwolanin, Dries: use code registry properly for locale page callbacks.
parent
0bdd86b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/locale/locale.module
+18
-25
18 additions, 25 deletions
modules/locale/locale.module
with
18 additions
and
25 deletions
modules/locale/locale.module
+
18
−
25
View file @
703557e1
...
...
@@ -78,17 +78,14 @@ function locale_help($path, $arg) {
/**
* Implementation of hook_menu().
*
* Locale module only provides administrative menu items, so all
* menu items are invoked through locale_inc_callback().
*/
function
locale_menu
()
{
// Manage languages
$items
[
'admin/settings/language'
]
=
array
(
'title'
=>
'Languages'
,
'description'
=>
'Configure languages for content and the user interface.'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_languages_overview_form'
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_languages_overview_form'
),
'access arguments'
=>
array
(
'administer languages'
),
);
$items
[
'admin/settings/language/overview'
]
=
array
(
...
...
@@ -98,31 +95,30 @@ function locale_menu() {
);
$items
[
'admin/settings/language/add'
]
=
array
(
'title'
=>
'Add language'
,
'page callback'
=>
'locale_inc_callback'
,
'page arguments'
=>
array
(
'locale_languages_add_screen'
),
// two forms concatenated
'page callback'
=>
'locale_languages_add_screen'
,
// two forms concatenated
'access arguments'
=>
array
(
'administer languages'
),
'weight'
=>
5
,
'type'
=>
MENU_LOCAL_TASK
,
);
$items
[
'admin/settings/language/configure'
]
=
array
(
'title'
=>
'Configure'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_languages_configure_form'
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_languages_configure_form'
),
'access arguments'
=>
array
(
'administer languages'
),
'weight'
=>
10
,
'type'
=>
MENU_LOCAL_TASK
,
);
$items
[
'admin/settings/language/edit/%'
]
=
array
(
'title'
=>
'Edit language'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_languages_edit_form'
,
4
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_languages_edit_form'
,
4
),
'access arguments'
=>
array
(
'administer languages'
),
'type'
=>
MENU_CALLBACK
,
);
$items
[
'admin/settings/language/delete/%'
]
=
array
(
'title'
=>
'Confirm'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_languages_delete_form'
,
4
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_languages_delete_form'
,
4
),
'access arguments'
=>
array
(
'administer languages'
),
'type'
=>
MENU_CALLBACK
,
);
...
...
@@ -131,8 +127,7 @@ function locale_menu() {
$items
[
'admin/build/translate'
]
=
array
(
'title'
=>
'Translate interface'
,
'description'
=>
'Translate the built in interface and optionally other text.'
,
'page callback'
=>
'locale_inc_callback'
,
'page arguments'
=>
array
(
'locale_translate_overview_screen'
),
// not a form, just a table
'page callback'
=>
'locale_translate_overview_screen'
,
// not a form, just a table
'access arguments'
=>
array
(
'translate interface'
),
);
$items
[
'admin/build/translate/overview'
]
=
array
(
...
...
@@ -144,37 +139,35 @@ function locale_menu() {
'title'
=>
'Search'
,
'weight'
=>
10
,
'type'
=>
MENU_LOCAL_TASK
,
'page callback'
=>
'locale_inc_callback'
,
'page arguments'
=>
array
(
'locale_translate_seek_screen'
),
// search results and form concatenated
'page callback'
=>
'locale_translate_seek_screen'
,
// search results and form concatenated
'access arguments'
=>
array
(
'translate interface'
),
);
$items
[
'admin/build/translate/import'
]
=
array
(
'title'
=>
'Import'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_translate_import_form'
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_translate_import_form'
),
'access arguments'
=>
array
(
'translate interface'
),
'weight'
=>
20
,
'type'
=>
MENU_LOCAL_TASK
,
);
$items
[
'admin/build/translate/export'
]
=
array
(
'title'
=>
'Export'
,
'page callback'
=>
'locale_inc_callback'
,
'page arguments'
=>
array
(
'locale_translate_export_screen'
),
// possibly multiple forms concatenated
'page callback'
=>
'locale_translate_export_screen'
,
// possibly multiple forms concatenated
'access arguments'
=>
array
(
'translate interface'
),
'weight'
=>
30
,
'type'
=>
MENU_LOCAL_TASK
,
);
$items
[
'admin/build/translate/edit/%'
]
=
array
(
'title'
=>
'Edit string'
,
'page callback'
=>
'
locale_inc_callback
'
,
'page arguments'
=>
array
(
'drupal_get_form'
,
'locale_translate_edit_form'
,
4
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'locale_translate_edit_form'
,
4
),
'access arguments'
=>
array
(
'translate interface'
),
'type'
=>
MENU_CALLBACK
,
);
$items
[
'admin/build/translate/delete/%'
]
=
array
(
'title'
=>
'Delete string'
,
'page callback'
=>
'locale_
inc_callback
'
,
'page arguments'
=>
array
(
'locale_translate_delete_page'
,
4
),
'page callback'
=>
'locale_
translate_delete_page
'
,
'page arguments'
=>
array
(
4
),
'access arguments'
=>
array
(
'translate interface'
),
'type'
=>
MENU_CALLBACK
,
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment