Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
hostmaster
Commits
6a8aff70
Commit
6a8aff70
authored
Jun 10, 2010
by
Adrian Rossouw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got site import sort of working, and no longer spawn a verify task because it's already happening.
parent
5ace388b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
1 deletion
+10
-1
modules/hosting/platform/hosting_platform.drush.inc
modules/hosting/platform/hosting_platform.drush.inc
+1
-0
modules/hosting/site/hosting_site.drush.inc
modules/hosting/site/hosting_site.drush.inc
+6
-0
modules/hosting/site/hosting_site.module
modules/hosting/site/hosting_site.module
+2
-0
modules/hosting/task.hosting.inc
modules/hosting/task.hosting.inc
+1
-1
No files found.
modules/hosting/platform/hosting_platform.drush.inc
View file @
6a8aff70
...
...
@@ -53,6 +53,7 @@ function hosting_platform_post_hosting_verify_task($task, $data) {
$site
->
title
=
$url
;
$site
->
platform
=
$node
->
nid
;
$site
->
client
=
HOSTING_DEFAULT_CLIENT
;
$site
->
db_server
=
HOSTING_DEFAULT_DB_SERVER
;
node_save
(
$site
);
drush_log
(
dt
(
"Imported existing site !domain"
,
array
(
'!domain'
=>
_hosting_node_link
(
$site
->
nid
))));
}
...
...
modules/hosting/site/hosting_site.drush.inc
View file @
6a8aff70
...
...
@@ -131,6 +131,12 @@ function hosting_site_post_hosting_backup_task($task, $data) {
function
hosting_site_post_hosting_import_task
(
$task
,
$data
)
{
hosting_import_site
(
$task
->
ref
->
nid
,
$data
[
'context'
],
$task
->
ref
->
platform
);
$context
=
$data
[
'context'
];
$packages
=
$context
[
'packages'
];
hosting_package_sync
(
$packages
);
hosting_package_instance_sync
(
$task
->
ref
->
nid
,
$packages
);
}
function
hosting_site_post_hosting_verify_task
(
$task
,
$data
)
{
...
...
modules/hosting/site/hosting_site.module
View file @
6a8aff70
...
...
@@ -162,6 +162,8 @@ function hosting_import_site($site_id, $data, $platform = HOSTING_DEFAULT_PLATFO
$site
->
status
=
1
;
$site
->
site_status
=
1
;
$site
->
platform
=
$platform
;
$site
->
no_verify
=
TRUE
;
$site
->
verified
=
mktime
();
$site
->
client
=
$client
->
nid
;
$db_server
=
hosting_get_db_server
(
$data
[
'db_id'
]);
$site
->
db_server
=
(
$db_server
)
?
$db_server
->
nid
:
HOSTING_DEFAULT_DB_SERVER
;
...
...
modules/hosting/task.hosting.inc
View file @
6a8aff70
...
...
@@ -64,7 +64,7 @@ function drush_hosting_task() {
ksort
(
$task
->
args
);
// On install/verify, save the named context
if
(
$task
->
task_type
===
'install'
||
$task
->
task_type
===
'verify'
)
{
if
(
$task
->
task_type
===
'install'
||
$task
->
task_type
===
'verify'
||
$task
->
task_type
===
'import'
)
{
module_invoke
(
'hosting_'
.
$task
->
ref
->
type
,
'context_options'
,
$task
);
$output
=
drush_backend_invoke_args
(
'provision-save'
,
array
(
'@'
.
$task
->
ref
->
hosting_name
),
$task
->
context_options
,
$mode
);
}
...
...
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