Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
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-3443915
Commits
a524aa54
Commit
a524aa54
authored
12 years ago
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1827200
by benjifisher: Fix up documentation for system_authorized_init()
parent
681fe02e
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/system/system.module
+21
-8
21 additions, 8 deletions
modules/system/system.module
with
21 additions
and
8 deletions
modules/system/system.module
+
21
−
8
View file @
a524aa54
...
...
@@ -1740,16 +1740,27 @@ function _system_themes_access($theme) {
/**
* Setup a given callback to run via authorize.php with elevated privileges.
*
* To use authorize.php, certain variables must be stashed into $_SESSION.
* This function sets up all the necessary $_SESSION variables, then returns
* the full path to authorize.php so the caller can redirect to authorize.php.
* That initiates the workflow that will eventually lead to the callback being
* invoked. The callback will be invoked at a low bootstrap level, without all
* modules being invoked, so it needs to be careful not to assume any code
* exists.
* To use authorize.php, certain variables must be stashed into $_SESSION. This
* function sets up all the necessary $_SESSION variables. The calling function
* should then redirect to authorize.php, using the full path returned by
* system_authorized_get_url(). That initiates the workflow that will eventually
* lead to the callback being invoked. The callback will be invoked at a low
* bootstrap level, without all modules being invoked, so it needs to be careful
* not to assume any code exists. Example (system_authorized_run()):
* @code
* system_authorized_init($callback, $file, $arguments, $page_title);
* drupal_goto(system_authorized_get_url());
* @endcode
* Example (update_manager_install_form_submit()):
* @code
* system_authorized_init('update_authorize_run_install',
* drupal_get_path('module', 'update') . '/update.authorize.inc',
* $arguments, t('Update manager'));
* $form_state['redirect'] = system_authorized_get_url();
* @endcode
*
* @param $callback
* The name of the function to invoke one the user authorizes the operation.
* The name of the function to invoke on
c
e the user authorizes the operation.
* @param $file
* The full path to the file where the callback function is implemented.
* @param $arguments
...
...
@@ -1786,6 +1797,8 @@ function system_authorized_init($callback, $file, $arguments = array(), $page_ti
* Optional array of options to pass to url().
* @return
* The full URL to authorize.php, using HTTPS if available.
*
* @see system_authorized_init()
*/
function
system_authorized_get_url
(
array
$options
=
array
())
{
global
$base_url
;
...
...
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