@@ -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 | } |
@@ -75,8 +75,7 @@ |
||
75 | 75 | $dir = rtrim($dir, '/'); |
76 | 76 | if ($dir == 'public') { |
77 | 77 | $file_pattern = "[^\/]*"; // Finds anything that does not contain "/", should be fine. |
78 | - } |
|
79 | - else { |
|
78 | + } else { |
|
80 | 79 | $file_pattern = $dir ? $dir . ".+" : ".+"; |
81 | 80 | } |
82 | 81 |
@@ -64,22 +64,22 @@ |
||
64 | 64 | // Generate the title |
65 | 65 | // This is the only block of code that differs from ctools_node_title_content_type_render |
66 | 66 | if (!empty($conf['link'])) { |
67 | - $content = l($node->title, 'node/' . $node->nid, array('attributes' => array('data-quickedit-field-id' => $field_id))); |
|
67 | + $content = l($node->title, 'node/'.$node->nid, array('attributes' => array('data-quickedit-field-id' => $field_id))); |
|
68 | 68 | } |
69 | 69 | else { |
70 | - $content = "<div data-quickedit-field-id=\"$field_id\">" . check_plain($node->title) . '</div>'; |
|
70 | + $content = "<div data-quickedit-field-id=\"$field_id\">".check_plain($node->title).'</div>'; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // Build any surrounding markup if so configured |
74 | 74 | if (isset($conf['markup']) && $conf['markup'] != 'none') { |
75 | - $markup = '<' . $conf['markup']; |
|
75 | + $markup = '<'.$conf['markup']; |
|
76 | 76 | if (!empty($conf['id'])) { |
77 | - $markup .= ' id="' . $conf['id'] . '"'; |
|
77 | + $markup .= ' id="'.$conf['id'].'"'; |
|
78 | 78 | } |
79 | 79 | if (!empty($conf['class'])) { |
80 | - $markup .= ' class="' . $conf['class'] . '"'; |
|
80 | + $markup .= ' class="'.$conf['class'].'"'; |
|
81 | 81 | } |
82 | - $markup .= '>' . $content . '</' . $conf['markup'] . '>' . "\n"; |
|
82 | + $markup .= '>'.$content.'</'.$conf['markup'].'>'."\n"; |
|
83 | 83 | $content = $markup; |
84 | 84 | } |
85 | 85 |
@@ -65,8 +65,7 @@ |
||
65 | 65 | // This is the only block of code that differs from ctools_node_title_content_type_render |
66 | 66 | if (!empty($conf['link'])) { |
67 | 67 | $content = l($node->title, 'node/' . $node->nid, array('attributes' => array('data-quickedit-field-id' => $field_id))); |
68 | - } |
|
69 | - else { |
|
68 | + } else { |
|
70 | 69 | $content = "<div data-quickedit-field-id=\"$field_id\">" . check_plain($node->title) . '</div>'; |
71 | 70 | } |
72 | 71 |
@@ -10,10 +10,10 @@ |
||
10 | 10 | * Implements hook_lightning_fpp_types_alter(). |
11 | 11 | */ |
12 | 12 | function df_tools_webform_lightning_fpp_types_alter(&$types) { |
13 | - $icon_path = drupal_get_path('module', 'df_tools_webform') . '/images/'; |
|
13 | + $icon_path = drupal_get_path('module', 'df_tools_webform').'/images/'; |
|
14 | 14 | $types['web_form'] = array( |
15 | 15 | 'title' => 'Webform', |
16 | - 'icon' => $icon_path . 'icon_form.png', |
|
16 | + 'icon' => $icon_path.'icon_form.png', |
|
17 | 17 | 'path' => 'web-form', |
18 | 18 | ); |
19 | 19 | } |
@@ -23,10 +23,10 @@ |
||
23 | 23 | MigrateDestinationNode::getKeySchema() |
24 | 24 | ); |
25 | 25 | |
26 | - $import_path = drupal_get_path('module', 'df_tools_og') . '/import/'; |
|
26 | + $import_path = drupal_get_path('module', 'df_tools_og').'/import/'; |
|
27 | 27 | |
28 | 28 | // Create a MigrateSource object. |
29 | - $this->source = new MigrateSourceCSV($import_path . 'df_tools_og.base.nodes.group.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
29 | + $this->source = new MigrateSourceCSV($import_path.'df_tools_og.base.nodes.group.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
30 | 30 | |
31 | 31 | $this->destination = new MigrateDestinationNode('organic_group'); |
32 | 32 |
@@ -22,8 +22,8 @@ |
||
22 | 22 | |
23 | 23 | $this->dependencies = array('DemoFrameworkBaseNodesGroup', 'ImportBaseUsers'); |
24 | 24 | |
25 | - $import_path = drupal_get_path('module', 'df_tools_og') . '/import/'; |
|
26 | - $this->source = new MigrateSourceCSV($import_path . 'df_tools_og.base.groups.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
25 | + $import_path = drupal_get_path('module', 'df_tools_og').'/import/'; |
|
26 | + $this->source = new MigrateSourceCSV($import_path.'df_tools_og.base.groups.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
27 | 27 | $this->destination = new MigrateDestinationOGMembership(); |
28 | 28 | |
29 | 29 | // Group |
@@ -10,10 +10,10 @@ |
||
10 | 10 | * Implements hook_lightning_fpp_types_alter(). |
11 | 11 | */ |
12 | 12 | function df_tools_commerce_product_lightning_fpp_types_alter(&$types) { |
13 | - $icon_path = drupal_get_path('module', 'df_tools_commerce') . '/images/'; |
|
13 | + $icon_path = drupal_get_path('module', 'df_tools_commerce').'/images/'; |
|
14 | 14 | $types['commerce_product'] = array( |
15 | 15 | 'title' => 'Commerce Product', |
16 | - 'icon' => $icon_path . 'icon_form.png', |
|
16 | + 'icon' => $icon_path.'icon_form.png', |
|
17 | 17 | 'path' => 'commerce-product', |
18 | 18 | ); |
19 | 19 | } |
@@ -10,18 +10,18 @@ discard block |
||
10 | 10 | function df_tools_menu_child_add_node($parent_path, $entity, $menu = 'main-menu') { |
11 | 11 | // Remove orphaned menu links if any exist. |
12 | 12 | $menu_info = db_select('menu_links', 'ml') |
13 | - ->condition('ml.link_title' , $entity->title) |
|
13 | + ->condition('ml.link_title', $entity->title) |
|
14 | 14 | ->fields('ml', array('mlid')) |
15 | 15 | ->execute() |
16 | 16 | ->fetchAll(); |
17 | - foreach($menu_info as $key => $value) { |
|
17 | + foreach ($menu_info as $key => $value) { |
|
18 | 18 | menu_link_delete($menu_info[$key]->mlid); |
19 | 19 | } |
20 | 20 | $parent = df_tools_menu_parent($parent_path); |
21 | 21 | // Add the new menu link. |
22 | 22 | $link = array( |
23 | 23 | 'menu_name' => $menu, |
24 | - 'link_path' => 'node/' . $entity->nid, |
|
24 | + 'link_path' => 'node/'.$entity->nid, |
|
25 | 25 | 'router_path' => 'node/%', |
26 | 26 | 'link_title' => $entity->title, |
27 | 27 | 'module' => 'menu', |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | function df_tools_menu_parent($parent_path) { |
40 | 40 | // Get the parent menu_link mlid. |
41 | 41 | $parent = db_select('menu_links', 'ml') |
42 | - ->condition('ml.link_path' , $parent_path) |
|
42 | + ->condition('ml.link_path', $parent_path) |
|
43 | 43 | ->fields('ml', array('mlid')) |
44 | 44 | ->execute() |
45 | 45 | ->fetch(); |