@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | $sort = $this->options['default']; |
54 | 54 | $this->order = !empty($this->options['order']) ? $this->options['order'] : 'asc'; |
55 | - } |
|
56 | - else { |
|
55 | + } else { |
|
57 | 56 | $sort = $_GET['order']; |
58 | 57 | // Store the $order for later use. |
59 | 58 | $this->order = !empty($_GET['sort']) ? strtolower($_GET['sort']) : 'asc'; |
@@ -186,8 +185,7 @@ discard block |
||
186 | 185 | if (!isset($columns[$default])) { |
187 | 186 | $default = -1; |
188 | 187 | } |
189 | - } |
|
190 | - else { |
|
188 | + } else { |
|
191 | 189 | $default = -1; |
192 | 190 | } |
193 | 191 |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | // Tell views our sitename_title option belongs in the title section. |
54 | 54 | if ($section == 'title') { |
55 | 55 | $sections[] = 'sitename_title'; |
56 | - } |
|
57 | - elseif (!$section) { |
|
56 | + } elseif (!$section) { |
|
58 | 57 | $sections['title'][] = 'sitename_title'; |
59 | 58 | } |
60 | 59 | return $sections; |
@@ -98,8 +97,7 @@ discard block |
||
98 | 97 | $displays = array_filter($this->get_option('displays')); |
99 | 98 | if (count($displays) > 1) { |
100 | 99 | $attach_to = t('Multiple displays'); |
101 | - } |
|
102 | - else if (count($displays) == 1) { |
|
100 | + } else if (count($displays) == 1) { |
|
103 | 101 | $display = array_shift($displays); |
104 | 102 | if (!empty($this->view->display[$display])) { |
105 | 103 | $attach_to = check_plain($this->view->display[$display]->display_title); |
@@ -122,8 +122,7 @@ |
||
122 | 122 | $field = html_entity_decode(strip_tags($this->row_plugin->render($row)), ENT_QUOTES); |
123 | 123 | if ($title) { |
124 | 124 | $options[$title][$path] = $field; |
125 | - } |
|
126 | - else { |
|
125 | + } else { |
|
127 | 126 | $options[$path] = $field; |
128 | 127 | } |
129 | 128 | $paths[$path] = $path; |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | '#options' => $relationship_options, |
86 | 86 | '#default_value' => $rel, |
87 | 87 | ); |
88 | - } |
|
89 | - else { |
|
88 | + } else { |
|
90 | 89 | $form['relationship'] = array( |
91 | 90 | '#type' => 'value', |
92 | 91 | '#value' => 'none', |
@@ -110,8 +109,7 @@ discard block |
||
110 | 109 | if (isset($this->base_table) && isset($this->options['relationship']) && isset($this->view->relationship[$this->options['relationship']])) { |
111 | 110 | $relationship = $this->view->relationship[$this->options['relationship']]; |
112 | 111 | $this->field_alias = $this->view->query->add_field($relationship->alias, $this->base_field); |
113 | - } |
|
114 | - else { |
|
112 | + } else { |
|
115 | 113 | $this->field_alias = $this->view->base_field; |
116 | 114 | } |
117 | 115 | } |
@@ -16,11 +16,9 @@ |
||
16 | 16 | $count = count($this->options['role']); |
17 | 17 | if ($count < 1) { |
18 | 18 | return t('No role(s) selected'); |
19 | - } |
|
20 | - else if ($count > 1) { |
|
19 | + } else if ($count > 1) { |
|
21 | 20 | return t('Multiple roles'); |
22 | - } |
|
23 | - else { |
|
21 | + } else { |
|
24 | 22 | $rids = views_ui_get_roles(); |
25 | 23 | $rid = reset($this->options['role']); |
26 | 24 | return $rids[$rid]; |
@@ -91,8 +91,7 @@ |
||
91 | 91 | $displays = array_filter($this->get_option('displays')); |
92 | 92 | if (count($displays) > 1) { |
93 | 93 | $attach_to = t('Multiple displays'); |
94 | - } |
|
95 | - else if (count($displays) == 1) { |
|
94 | + } else if (count($displays) == 1) { |
|
96 | 95 | $display = array_shift($displays); |
97 | 96 | if (!empty($this->view->display[$display])) { |
98 | 97 | $attach_to = check_plain($this->view->display[$display]->display_title); |
@@ -150,8 +150,7 @@ discard block |
||
150 | 150 | $this->view->row_index = $row_index; |
151 | 151 | $rows[] = $this->row_plugin->render($row); |
152 | 152 | } |
153 | - } |
|
154 | - else { |
|
153 | + } else { |
|
155 | 154 | $rows = $records; |
156 | 155 | } |
157 | 156 | |
@@ -190,8 +189,7 @@ discard block |
||
190 | 189 | } |
191 | 190 | $sets[$grouping][$index] = $row; |
192 | 191 | } |
193 | - } |
|
194 | - else { |
|
192 | + } else { |
|
195 | 193 | // Create a single group with an empty grouping field. |
196 | 194 | $sets[''] = $records; |
197 | 195 | } |
@@ -249,8 +247,7 @@ discard block |
||
249 | 247 | $plugin = $this->display->handler->get_plugin('row'); |
250 | 248 | if (empty($plugin)) { |
251 | 249 | $errors[] = t('Style @style requires a row style but the row plugin is invalid.', array('@style' => $this->definition['title'])); |
252 | - } |
|
253 | - else { |
|
250 | + } else { |
|
254 | 251 | $result = $plugin->validate(); |
255 | 252 | if (!empty($result) && is_array($result)) { |
256 | 253 | $errors = array_merge($errors, $result); |
@@ -23,8 +23,7 @@ |
||
23 | 23 | if (empty($this->preview)) { |
24 | 24 | drupal_add_feed($url, $title); |
25 | 25 | } |
26 | - } |
|
27 | - else { |
|
26 | + } else { |
|
28 | 27 | if (empty($this->view->feed_icon)) { |
29 | 28 | $this->view->feed_icon = ''; |
30 | 29 | } |
@@ -333,8 +333,7 @@ discard block |
||
333 | 333 | '#process' => array('views_process_dependency'), |
334 | 334 | '#dependency' => array('radio:menu[type]' => array('normal')), |
335 | 335 | ); |
336 | - } |
|
337 | - else { |
|
336 | + } else { |
|
338 | 337 | $form['menu']['name'] = array( |
339 | 338 | '#type' => 'value', |
340 | 339 | '#value' => $menu['name'], |
@@ -407,8 +406,7 @@ discard block |
||
407 | 406 | '#process' => array('views_process_dependency'), |
408 | 407 | '#dependency' => array('radio:tab_options[type]' => array('normal')), |
409 | 408 | ); |
410 | - } |
|
411 | - else { |
|
409 | + } else { |
|
412 | 410 | $form['tab_options']['name'] = array( |
413 | 411 | '#type' => 'value', |
414 | 412 | '#value' => $tab_options['name'], |