Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision
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
provision
Commits
779e38c2
There was an error fetching the commit references. Please try again later.
Commit
779e38c2
authored
Feb 4, 2009
by
Adrian Rossouw
Committed by
adrian
Feb 4, 2009
Browse files
Options
Downloads
Patches
Plain Diff
Provide provision_internal_init which allows us to integrate the external drupal_x scripts.
parent
9f516b40
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
platform/drupal_update.inc
+0
-13
0 additions, 13 deletions
platform/drupal_update.inc
platform/update.provision.inc
+2
-4
2 additions, 4 deletions
platform/update.provision.inc
provision.inc
+17
-0
17 additions, 0 deletions
provision.inc
with
19 additions
and
17 deletions
platform/drupal_update.
php
→
platform/drupal_update.
inc
+
0
−
13
View file @
779e38c2
<?php
<?php
// $Id$
// $Id$
require_once
(
dirname
(
__FILE__
)
.
'/../provision.inc'
);
if
(
$argv
[
1
])
{
// Fake the necessary HTTP headers that Drupal needs:
$data
=
provision_external_init
(
$argv
[
1
],
FALSE
);
}
else
{
provision_set_error
(
PROVISION_FRAMEWORK_ERROR
);
provision_log
(
"error"
,
"USAGE: drupal_update.php url
\n
"
);
provision_output
(
$url
,
$data
);
}
/**
/**
* @file
* @file
* Update.php for provisioned sites.
* Update.php for provisioned sites.
...
@@ -131,4 +119,3 @@ function _update_do_one($module, $number, &$context) {
...
@@ -131,4 +119,3 @@ function _update_do_one($module, $number, &$context) {
}
}
update_main
();
update_main
();
provision_output
(
$data
);
This diff is collapsed.
Click to expand it.
platform/update.provision.inc
+
2
−
4
View file @
779e38c2
...
@@ -6,8 +6,6 @@ function provision_drupal_provision_update_validate() {
...
@@ -6,8 +6,6 @@ function provision_drupal_provision_update_validate() {
}
}
function
provision_drupal_provision_update
(
&
$data
,
$url
)
{
function
provision_drupal_provision_update
(
&
$data
,
$url
)
{
$cmd
=
sprintf
(
"php %s/drupal_update.php %s"
,
dirname
(
__FILE__
),
$url
);
provision_internal_init
(
$data
[
'site_url'
],
false
);
provision_exec
(
$cmd
,
$data
);
include_once
(
sprintf
(
'%s/drupal_update.inc'
,
dirname
(
__FILE__
))
);
}
}
This diff is collapsed.
Click to expand it.
provision.inc
+
17
−
0
View file @
779e38c2
...
@@ -797,6 +797,23 @@ function provision_external_init($url, $bootstrap = TRUE) {
...
@@ -797,6 +797,23 @@ function provision_external_init($url, $bootstrap = TRUE) {
return
TRUE
;
return
TRUE
;
}
}
function
provision_internal_init
(
$url
,
$bootstrap
=
TRUE
)
{
$url
=
(
$url
)
?
$url
:
'default'
;
$drupal_base_url
=
parse_url
(
sprintf
(
"http://"
.
$url
));
$_SERVER
[
'HTTP_HOST'
]
=
$drupal_base_url
[
'host'
];
$_SERVER
[
'PHP_SELF'
]
=
$drupal_base_url
[
'path'
]
.
'/install.php'
;
$_SERVER
[
'REQUEST_URI'
]
=
$_SERVER
[
'SCRIPT_NAME'
]
=
$_SERVER
[
'PHP_SELF'
];
$_SERVER
[
'REMOTE_ADDR'
]
=
''
;
$_SERVER
[
'REQUEST_METHOD'
]
=
NULL
;
$_SERVER
[
'SERVER_SOFTWARE'
]
=
NULL
;
if
(
$bootstrap
)
{
include_once
(
'includes/bootstrap.inc'
);
drupal_bootstrap
(
DRUPAL_BOOTSTRAP_FULL
);
}
}
function
provision_password
(
$length
=
10
)
{
function
provision_password
(
$length
=
10
)
{
// This variable contains the list of allowable characters for the
// This variable contains the list of allowable characters for the
// password. Note that the number 0 and the letter 'O' have been
// password. Note that the number 0 and the letter 'O' have been
...
...
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