Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
3448103e
Commit
3448103e
authored
Sep 14, 2012
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1606946
by Albert Volkman, bunthorne: API docs cleanup for PHP files in core directory
parent
568f9c5b
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/authorize.php
+18
-17
18 additions, 17 deletions
core/authorize.php
core/install.php
+5
-5
5 additions, 5 deletions
core/install.php
core/update.php
+17
-7
17 additions, 7 deletions
core/update.php
with
40 additions
and
29 deletions
core/authorize.php
+
18
−
17
View file @
3448103e
...
@@ -4,16 +4,16 @@
...
@@ -4,16 +4,16 @@
* @file
* @file
* Administrative script for running authorized file operations.
* Administrative script for running authorized file operations.
*
*
* Using this script, the site owner (the user actually owning the files on
* Using this script, the site owner (the user actually owning the files on
the
*
the
webserver) can authorize certain file-related operations to proceed
* webserver) can authorize certain file-related operations to proceed
with
*
with
elevated privileges, for example to deploy and upgrade modules or
* elevated privileges, for example to deploy and upgrade modules or
themes.
*
themes.
Users should not visit this page directly, but instead use an
* Users should not visit this page directly, but instead use an
administrative
*
administrative
user interface which knows how to redirect the user to this
* user interface which knows how to redirect the user to this
script as part of
*
script as part of
a multistep process. This script actually performs the
* a multistep process. This script actually performs the
selected operations
*
selected operations
without loading all of Drupal, to be able to more
* without loading all of Drupal, to be able to more
gracefully recover from
*
gracefully recover from
errors. Access to the script is controlled by a
* errors. Access to the script is controlled by a
global killswitch in
*
global killswitch in
settings.php ('allow_authorize_operations') and via
* settings.php ('allow_authorize_operations') and via
the 'administer software
*
the 'administer software
updates' permission.
* updates' permission.
*
*
* There are helper functions for setting up an operation to run via this
* There are helper functions for setting up an operation to run via this
* system in modules/system/system.module. For more information, see:
* system in modules/system/system.module. For more information, see:
...
@@ -24,16 +24,17 @@
...
@@ -24,16 +24,17 @@
chdir
(
'..'
);
chdir
(
'..'
);
/**
/**
*
R
oot directory of Drupal installation.
*
Defines the r
oot directory of
the
Drupal installation.
*/
*/
define
(
'DRUPAL_ROOT'
,
getcwd
());
define
(
'DRUPAL_ROOT'
,
getcwd
());
/**
/**
* Global flag to identify update.php and authorize.php runs, and so
* Global flag to identify update.php and authorize.php runs.
* avoid various unwanted operations, such as hook_init() and
*
* hook_exit() invokes, css/js preprocessing and translation, and
* Identifies update.php and authorize.php runs, avoiding unwanted operations
* solve some theming issues. This flag is checked on several places
* such as hook_init() and hook_exit() invokes, css/js preprocessing and
* in Drupal code (not just authorize.php).
* translation, and solves some theming issues. The flag is checked in other
* places in Drupal code (not just authorize.php).
*/
*/
const
MAINTENANCE_MODE
=
'update'
;
const
MAINTENANCE_MODE
=
'update'
;
...
@@ -54,7 +55,7 @@ function authorize_access_denied_page() {
...
@@ -54,7 +55,7 @@ function authorize_access_denied_page() {
* have access to the 'administer software updates' permission.
* have access to the 'administer software updates' permission.
*
*
* @return
* @return
* TRUE if the current user can run authorize.php,
otherwise FALSE
.
* TRUE if the current user can run authorize.php,
and FALSE if not
.
*/
*/
function
authorize_access_allowed
()
{
function
authorize_access_allowed
()
{
return
variable_get
(
'allow_authorize_operations'
,
TRUE
)
&&
user_access
(
'administer software updates'
);
return
variable_get
(
'allow_authorize_operations'
,
TRUE
)
&&
user_access
(
'administer software updates'
);
...
...
This diff is collapsed.
Click to expand it.
core/install.php
+
5
−
5
View file @
3448103e
...
@@ -9,16 +9,16 @@
...
@@ -9,16 +9,16 @@
chdir
(
'..'
);
chdir
(
'..'
);
/**
/**
*
R
oot directory of Drupal installation.
*
Defines the r
oot directory of
the
Drupal installation.
*/
*/
define
(
'DRUPAL_ROOT'
,
getcwd
());
define
(
'DRUPAL_ROOT'
,
getcwd
());
/**
/**
* Global flag to indicate th
at
site is in installation mode.
* Global flag to indicate th
e
site is in installation mode.
*
*
* Th
is
constant is defined using define() instead of const so that PHP
* Th
e
constant is defined using define() instead of const so that PHP
* versions
older than
5.3 can display
the
proper PHP requirements instead of
* versions
prior to
5.3 can display proper PHP requirements instead of
causing
*
causing
a fatal error.
* a fatal error.
*/
*/
define
(
'MAINTENANCE_MODE'
,
'install'
);
define
(
'MAINTENANCE_MODE'
,
'install'
);
...
...
This diff is collapsed.
Click to expand it.
core/update.php
+
17
−
7
View file @
3448103e
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
chdir
(
'..'
);
chdir
(
'..'
);
/**
/**
*
R
oot directory of Drupal installation.
*
Defines the r
oot directory of
the
Drupal installation.
*/
*/
define
(
'DRUPAL_ROOT'
,
getcwd
());
define
(
'DRUPAL_ROOT'
,
getcwd
());
// Exit early if
running
an incompatible PHP version
to avoid
fatal errors.
// Exit early if an incompatible PHP version
would cause
fatal errors.
// The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
// The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
// yet available. It is defined in bootstrap.inc, but it is not possible to
// yet available. It is defined in bootstrap.inc, but it is not possible to
// load that file yet as it would cause a fatal error on older versions of PHP.
// load that file yet as it would cause a fatal error on older versions of PHP.
...
@@ -46,6 +46,9 @@
...
@@ -46,6 +46,9 @@
*/
*/
define
(
'MAINTENANCE_MODE'
,
'update'
);
define
(
'MAINTENANCE_MODE'
,
'update'
);
/**
* Renders form with a list of available database updates.
*/
function
update_selection_page
()
{
function
update_selection_page
()
{
drupal_set_title
(
'Drupal database update'
);
drupal_set_title
(
'Drupal database update'
);
$elements
=
drupal_get_form
(
'update_script_selection_form'
);
$elements
=
drupal_get_form
(
'update_script_selection_form'
);
...
@@ -56,6 +59,9 @@ function update_selection_page() {
...
@@ -56,6 +59,9 @@ function update_selection_page() {
return
$output
;
return
$output
;
}
}
/**
* Form constructor for the list of available database module updates.
*/
function
update_script_selection_form
(
$form
,
&
$form_state
)
{
function
update_script_selection_form
(
$form
,
&
$form_state
)
{
$count
=
0
;
$count
=
0
;
$incompatible_count
=
0
;
$incompatible_count
=
0
;
...
@@ -157,6 +163,9 @@ function update_script_selection_form($form, &$form_state) {
...
@@ -157,6 +163,9 @@ function update_script_selection_form($form, &$form_state) {
return
$form
;
return
$form
;
}
}
/**
* Provides links to the homepage and administration pages.
*/
function
update_helpful_links
()
{
function
update_helpful_links
()
{
$links
[
'front'
]
=
array
(
$links
[
'front'
]
=
array
(
'title'
=>
t
(
'Front page'
),
'title'
=>
t
(
'Front page'
),
...
@@ -171,6 +180,9 @@ function update_helpful_links() {
...
@@ -171,6 +180,9 @@ function update_helpful_links() {
return
$links
;
return
$links
;
}
}
/**
* Displays results of the update script with any accompanying errors.
*/
function
update_results_page
()
{
function
update_results_page
()
{
drupal_set_title
(
'Drupal database update'
);
drupal_set_title
(
'Drupal database update'
);
...
@@ -313,7 +325,7 @@ function update_access_allowed() {
...
@@ -313,7 +325,7 @@ function update_access_allowed() {
}
}
/**
/**
* Add the update task list to the current page.
* Add
s
the update task list to the current page.
*/
*/
function
update_task_list
(
$active
=
NULL
)
{
function
update_task_list
(
$active
=
NULL
)
{
// Default list of tasks.
// Default list of tasks.
...
@@ -329,8 +341,7 @@ function update_task_list($active = NULL) {
...
@@ -329,8 +341,7 @@ function update_task_list($active = NULL) {
}
}
/**
/**
* Returns (and optionally stores) extra requirements that only apply during
* Returns and stores extra requirements that apply during the update process.
* particular parts of the update.php process.
*/
*/
function
update_extra_requirements
(
$requirements
=
NULL
)
{
function
update_extra_requirements
(
$requirements
=
NULL
)
{
static
$extra_requirements
=
array
();
static
$extra_requirements
=
array
();
...
@@ -341,7 +352,7 @@ function update_extra_requirements($requirements = NULL) {
...
@@ -341,7 +352,7 @@ function update_extra_requirements($requirements = NULL) {
}
}
/**
/**
* Check update requirements and report
any
errors
or
(optionally) warnings.
* Check
s
update requirements and report
s
errors
and
(optionally) warnings.
*
*
* @param $skip_warnings
* @param $skip_warnings
* (optional) If set to TRUE, requirement warnings will be ignored, and a
* (optional) If set to TRUE, requirement warnings will be ignored, and a
...
@@ -507,5 +518,4 @@ function update_check_requirements($skip_warnings = FALSE) {
...
@@ -507,5 +518,4 @@ function update_check_requirements($skip_warnings = FALSE) {
else
{
else
{
print
theme
(
'update_page'
,
array
(
'content'
=>
$output
,
'show_messages'
=>
!
$progress_page
));
print
theme
(
'update_page'
,
array
(
'content'
=>
$output
,
'show_messages'
=>
!
$progress_page
));
}
}
}
}
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