/[drupal]/contributions/modules/hosting/unpark.hostmaster.inc
ViewVC logotype

Contents of /contributions/modules/hosting/unpark.hostmaster.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Tue Oct 6 06:34:41 2009 UTC (7 weeks, 5 days ago) by adrian
Branch: MAIN
CVS Tags: DRUPAL-6--0-4-ALPHA2
File MIME type: text/x-php
missed adding the command files
1 <?php
2
3 /**
4 * @file Implementation of the hostmaster unpark command
5 */
6
7 include_once('hosting.inc');
8
9 function drush_hosting_hostmaster_unpark($url) {
10 drush_log('bootstrapping drupal');
11 drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL);
12 $platform = drush_get_context('DRUSH_DRUPAL_ROOT');
13 drush_log('fixing platform');
14 if ($platform_id = db_result(db_query('SELECT nid FROM {hosting_platform} WHERE publish_path = "%s"', $platform))) {
15 $nid = db_result(db_query('SELECT nid FROM {node} WHERE type = "site" AND status = 1 AND title = "%s"', $url));
16 $node = node_load($nid);
17 $node->verified = 0;
18 $node->platform = $platform_id;
19 node_save($node);
20 } else {
21 return drush_set_error('PROVISION_FRAMEWORK_ERROR', dt("Could not find the node for platform path %platform", array('%platform' => $platform)));
22 }
23 // TODO: post migration tasks
24 // - turn on new cron job
25 // - save the drush log to the migrate task and set proper status
26 }

  ViewVC Help
Powered by ViewVC 1.1.2