Project

General

Profile

Download (1.33 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2

    
3

    
4

    
5
function migrate_drush_help($section) {
6
	switch ($section) {
7
		case 'drush:migrate-refresh':
8
			return dt("Refresh the drupal site by reloading all modules [ module_list(TRUE) ]"
9
			." and then all themes [ list_themes(TRUE); ] ."
10
			." This will update the database with the server specific path to the themes and modules."
11
			." Use this command after migrating to a different server via sql dump,"
12
			." before opening any page.");
13
	}
14
}
15

    
16
function migrate_drush_command() {
17
	$items = array();
18

    
19
	$items['migrate-refresh'] = array(
20
            'description' => "Refresh the drupal site by reloading all modules [ module_list(TRUE) ]"
21
            ." and then all themes [ list_themes(TRUE); ] ."
22
            ." This will update the database with the server specific path to the themes and modules."
23
            ." Use this command after migrating to a different server via sql dump,"
24
            ." before opening any page.",
25
            'aliases' => array('mire'),
26
            'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
27
            );
28

    
29
     return $items;
30
}
31

    
32
function drush_migrate_refresh() {
33
	drush_print("migrate-refresh");
34
	drush_invoke("cache-clear");
35
	$modules = module_list(TRUE);
36
	drush_print( count($modules) . " modules loaded");
37
	$themes = list_themes(TRUE);
38
	drush_print( count($themes) . " available themes");
39
	drush_invoke("cache-clear");
40
}
(2-2/2)