Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
provision
Commits
4323892e
Commit
4323892e
authored
Oct 27, 2014
by
omega8cc
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/6.x-2.x' into 2.3.x-dev
parents
6939a571
dffa256a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
platform/drupal/deploy_7.inc
platform/drupal/deploy_7.inc
+16
-14
platform/drupal/install_7.inc
platform/drupal/install_7.inc
+4
-0
provision.api.php
provision.api.php
+13
-0
No files found.
platform/drupal/deploy_7.inc
View file @
4323892e
...
@@ -44,21 +44,23 @@ function _provision_platform_drupal_deploy_7_replace($old_url, $new_url) {
...
@@ -44,21 +44,23 @@ function _provision_platform_drupal_deploy_7_replace($old_url, $new_url) {
}
}
db_query
(
"UPDATE
{
system
}
SET filename = REPLACE(filename, :old, :new)"
,
$replace_patterns
);
db_query
(
"UPDATE
{
system
}
SET filename = REPLACE(filename, :old, :new)"
,
$replace_patterns
);
$field_map
=
field_info_field_map
();
if
(
function_exists
(
'field_info_field_map'
))
{
foreach
(
$field_map
as
$key
=>
$info
)
{
$field_map
=
field_info_field_map
();
$tablekey
=
db_escape_table
(
$key
);
foreach
(
$field_map
as
$key
=>
$info
)
{
// Replace in all known text fields.
$tablekey
=
db_escape_table
(
$key
);
if
(
in_array
(
$info
[
'type'
],
array
(
'text_long'
,
'text_with_summary'
)))
{
// Replace in all known text fields.
drush_log
(
'Replacing in '
.
$key
,
'debug'
);
if
(
in_array
(
$info
[
'type'
],
array
(
'text_long'
,
'text_with_summary'
)))
{
db_query
(
"UPDATE
{
field_data_${tablekey}
}
SET ${tablekey}_value = REPLACE(${tablekey}_value, :old, :new)"
,
$replace_patterns
);
drush_log
(
'Replacing in '
.
$key
,
'debug'
);
db_query
(
"UPDATE
{
field_revision_${tablekey}
}
SET ${tablekey}_value = REPLACE(${tablekey}_value, :old, :new)"
,
$replace_patterns
);
db_query
(
"UPDATE
{
field_data_${tablekey}
}
SET ${tablekey}_value = REPLACE(${tablekey}_value, :old, :new)"
,
$replace_patterns
);
}
db_query
(
"UPDATE
{
field_revision_${tablekey}
}
SET ${tablekey}_value = REPLACE(${tablekey}_value, :old, :new)"
,
$replace_patterns
);
}
// Replace in the optional summary.
// Replace in the optional summary.
if
(
$info
[
'type'
]
==
'text_with_summary'
)
{
if
(
$info
[
'type'
]
==
'text_with_summary'
)
{
drush_log
(
'Replacing summary in '
.
$key
,
'debug'
);
drush_log
(
'Replacing summary in '
.
$key
,
'debug'
);
db_query
(
"UPDATE
{
field_data_${tablekey}
}
SET ${tablekey}_summary = REPLACE(${tablekey}_summary, :old, :new)"
,
$replace_patterns
);
db_query
(
"UPDATE
{
field_data_${tablekey}
}
SET ${tablekey}_summary = REPLACE(${tablekey}_summary, :old, :new)"
,
$replace_patterns
);
db_query
(
"UPDATE
{
field_revision_${tablekey}
}
SET ${tablekey}_summary = REPLACE(${tablekey}_summary, :old, :new)"
,
$replace_patterns
);
db_query
(
"UPDATE
{
field_revision_${tablekey}
}
SET ${tablekey}_summary = REPLACE(${tablekey}_summary, :old, :new)"
,
$replace_patterns
);
}
}
}
}
}
drush_log
(
drush_log
(
...
...
platform/drupal/install_7.inc
View file @
4323892e
...
@@ -141,6 +141,10 @@ function install_main() {
...
@@ -141,6 +141,10 @@ function install_main() {
),
),
),
),
);
);
// Allow other commands to alter the installation settings.
drush_command_invoke_all_ref
(
'provision_drupal_install_settings_alter'
,
$settings
,
$url
);
try
{
try
{
install_drupal
(
$settings
);
install_drupal
(
$settings
);
}
}
...
...
provision.api.php
View file @
4323892e
...
@@ -212,3 +212,16 @@ function hook_provision_drupal_chgrp_directories_alter(&$chgrp, $url) {
...
@@ -212,3 +212,16 @@ function hook_provision_drupal_chgrp_directories_alter(&$chgrp, $url) {
$chgrp
[
"sites/
$url
/my_special_dir"
]
=
d
(
'@server_master'
)
->
web_group
;
$chgrp
[
"sites/
$url
/my_special_dir"
]
=
d
(
'@server_master'
)
->
web_group
;
$chgrp
[
"sites/
$url
/my_other_dir"
]
=
FALSE
;
// Skip the chgrp on this directory.
$chgrp
[
"sites/
$url
/my_other_dir"
]
=
FALSE
;
// Skip the chgrp on this directory.
}
}
/**
* Alter the settings array just before starting the provision install.
*
* @param $settings
* The array with settings.
* @param $url
* The site url.
*/
function
hook_provision_drupal_install_settings_alter
(
&
$settings
,
$url
)
{
$settings
[
'forms'
][
'install_configure_form'
][
'update_status_module'
]
=
array
();
}
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