@@ -10,14 +10,14 @@ |
||
10 | 10 | public function __construct($arguments) { |
11 | 11 | parent::__construct($arguments); |
12 | 12 | $this->description = t('Import node translations.'); |
13 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
13 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
14 | 14 | // Create a MigrateSource object. |
15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_news.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_news.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
16 | 16 | $this->destination = new MigrateDestinationNode('wem_news'); |
17 | 17 | // Image |
18 | 18 | $this->addFieldMapping('field_wem_image', 'image'); |
19 | 19 | $this->addFieldMapping('field_wem_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
20 | - $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path . 'images'); |
|
20 | + $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path.'images'); |
|
21 | 21 | $this->addFieldMapping('field_wem_image:destination_file', 'filename'); |
22 | 22 | // Video |
23 | 23 | $this->addFieldMapping('field_wem_video', 'video')->sourceMigration('DFSWEMNewsVideo'); |
@@ -10,14 +10,14 @@ discard block |
||
10 | 10 | public function __construct($arguments) { |
11 | 11 | parent::__construct($arguments); |
12 | 12 | $this->description = t('Import nodes.'); |
13 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
13 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
14 | 14 | // Create a MigrateSource object. |
15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_news.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_news.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
16 | 16 | $this->destination = new MigrateDestinationNode('wem_news'); |
17 | 17 | // Image |
18 | 18 | $this->addFieldMapping('field_wem_image', 'image'); |
19 | 19 | $this->addFieldMapping('field_wem_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
20 | - $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path . 'images'); |
|
20 | + $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path.'images'); |
|
21 | 21 | $this->addFieldMapping('field_wem_image:destination_file', 'filename'); |
22 | 22 | // Video |
23 | 23 | $this->addFieldMapping('field_wem_video', 'video')->sourceMigration('DFSWEMNewsVideo'); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | MigrateDestinationFile::getKeySchema() |
64 | 64 | ); |
65 | 65 | $this->destination = new MigrateDestinationFile('video', 'MigrateExtrasFileYoutube'); |
66 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
67 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_news.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
66 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
67 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_news.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
68 | 68 | $this->addFieldMapping('value', 'video'); |
69 | 69 | } |
70 | 70 |
@@ -21,8 +21,8 @@ |
||
21 | 21 | ); |
22 | 22 | $this->description = t('Import translated WEM Commerce product nodes.'); |
23 | 23 | $this->dependencies = array('DFSWEMProducts'); |
24 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
25 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_commerce.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
24 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
25 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_commerce.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
26 | 26 | $this->destination = new MigrateDestinationNode('wem_commerce'); |
27 | 27 | // Commerce |
28 | 28 | $this->addFieldMapping('field_wem_product_ref', 'skus'); |
@@ -17,5 +17,5 @@ |
||
17 | 17 | * Implements hook_form_FORM_ID_alter(). |
18 | 18 | */ |
19 | 19 | function df_tools_styles_form_panels_edit_style_type_form_alter(&$form, &$form_state, $form_id) { |
20 | - $form['style']['#options']['classy_panel_styles:cps_default'] = variable_get('site_name', 'DF Tools') . ' Styles'; |
|
20 | + $form['style']['#options']['classy_panel_styles:cps_default'] = variable_get('site_name', 'DF Tools').' Styles'; |
|
21 | 21 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | $style = new stdClass(); |
108 | 108 | $style->disabled = FALSE; /* Edit this to true to make a default style disabled initially */ |
109 | 109 | $style->api_version = 1; |
110 | - $style->name = 'df_tools_styles_' . $name; |
|
110 | + $style->name = 'df_tools_styles_'.$name; |
|
111 | 111 | $style->visibility = 1; |
112 | 112 | $style->groups = serialize(array('df_tools_styles')); |
113 | 113 | $style->title = $title; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | function df_tools_bean_bean_types() { |
20 | 20 | $plugins = array(); |
21 | - $plugin_path = drupal_get_path('module', 'df_tools_bean') . '/plugins'; |
|
21 | + $plugin_path = drupal_get_path('module', 'df_tools_bean').'/plugins'; |
|
22 | 22 | $plugins['df_bean_personalized_content'] = array( |
23 | 23 | 'label' => t('Personalized Content'), |
24 | 24 | 'description' => t('A block used for personalization and testing.'), |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * Page callback to reset image styles. |
21 | 21 | */ |
22 | 22 | function df_tools_image_page() { |
23 | - if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], DRUPAL_ROOT . '/df/imagestyles')) { |
|
23 | + if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], DRUPAL_ROOT.'/df/imagestyles')) { |
|
24 | 24 | return drupal_access_denied(); |
25 | 25 | } |
26 | 26 | return df_tools_image_seed_derivatives(); |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | $file_pattern = "[^\/]*"; // Finds anything that does not contain "/", should be fine. |
78 | 78 | } |
79 | 79 | else { |
80 | - $file_pattern = $dir ? $dir . ".+" : ".+"; |
|
80 | + $file_pattern = $dir ? $dir.".+" : ".+"; |
|
81 | 81 | } |
82 | 82 | |
83 | - $regex = "^public:\/\/(" . $file_pattern . ")\.(" . implode($extensions, '|') . ")$"; |
|
83 | + $regex = "^public:\/\/(".$file_pattern.")\.(".implode($extensions, '|').")$"; |
|
84 | 84 | |
85 | 85 | // Query the database for files that match this pattern. |
86 | 86 | $query = db_select('file_managed', 'f') |
87 | - ->condition('filemime', $mimetypes , 'IN') |
|
87 | + ->condition('filemime', $mimetypes, 'IN') |
|
88 | 88 | ->condition('uri', $regex, 'REGEXP'); |
89 | 89 | $total_count = $query->countQuery()->execute()->fetchField(); |
90 | 90 | |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | |
101 | 101 | foreach (image_styles() as $name => $style) { |
102 | 102 | if (!empty($excludes) && in_array($style['name'], $excludes)) { |
103 | - $operations[] = array('drush_log', array('Excluding ' . $name, 'success')); |
|
103 | + $operations[] = array('drush_log', array('Excluding '.$name, 'success')); |
|
104 | 104 | continue; |
105 | 105 | } |
106 | 106 | if (empty($includes[0]) || in_array($style['name'], $includes)) { |
107 | - $operations[] = array('drush_log', array('Processing ' . $name, 'success')); |
|
107 | + $operations[] = array('drush_log', array('Processing '.$name, 'success')); |
|
108 | 108 | $count = 1; |
109 | 109 | $last_progress = 0; |
110 | 110 | foreach ($files as $file) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | if (($progress % 25 === 0 || $progress % 7 === 0) && $progress != $last_progress) { |
119 | 119 | // If we're in the command line, print the percentage, otherwise hide it |
120 | 120 | if (drupal_is_cli()) { |
121 | - $operations[] = array('drush_print', array('...' . $progress . '%', 0, NULL, ($progress == 100))); |
|
121 | + $operations[] = array('drush_print', array('...'.$progress.'%', 0, NULL, ($progress == 100))); |
|
122 | 122 | } |
123 | 123 | $last_progress = $progress; |
124 | 124 | } |
@@ -36,14 +36,14 @@ |
||
36 | 36 | $import_path = $arguments['path']; |
37 | 37 | } |
38 | 38 | else { |
39 | - $import_path = drupal_get_path('module', 'df_tools_hero') . '/import/df_tools_hero.fpp.hero.csv'; |
|
39 | + $import_path = drupal_get_path('module', 'df_tools_hero').'/import/df_tools_hero.fpp.hero.csv'; |
|
40 | 40 | } |
41 | 41 | $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1)); |
42 | 42 | $this->destination = new MigrateDestinationFieldablePanelsPanes('hero', array('text_format' => 'full_html')); |
43 | 43 | |
44 | 44 | $this->addFieldMapping('field_hero_image', 'Image'); |
45 | 45 | $this->addFieldMapping('field_hero_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
46 | - $this->addFieldMapping('field_hero_image:source_dir')->defaultValue(dirname($import_path) . '/images'); |
|
46 | + $this->addFieldMapping('field_hero_image:source_dir')->defaultValue(dirname($import_path).'/images'); |
|
47 | 47 | $this->addFieldMapping('field_hero_image:destination_file', 'filename'); |
48 | 48 | |
49 | 49 | $this->addFieldMapping('field_hero_headline_1', 'Headline 1'); |
@@ -23,10 +23,10 @@ |
||
23 | 23 | * Implements hook_lightning_fpp_types(). |
24 | 24 | */ |
25 | 25 | function df_tools_hero_lightning_fpp_types_alter(&$types) { |
26 | - $icon_path = drupal_get_path('module', 'df_tools_hero') . '/images/'; |
|
26 | + $icon_path = drupal_get_path('module', 'df_tools_hero').'/images/'; |
|
27 | 27 | $types['hero'] = array( |
28 | 28 | 'title' => 'hero', |
29 | - 'icon' => $icon_path . 'icon_hero.png', |
|
29 | + 'icon' => $icon_path.'icon_hero.png', |
|
30 | 30 | 'path' => 'hero', |
31 | 31 | ); |
32 | 32 | } |