Passed
Pull Request — master (#2921)
by Christian
11:20
created
drupal/sites/default/boinc/modules/contrib/jump/jump_views_plugin_style.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,8 +76,7 @@  discard block
 block discarded – undo
76 76
     foreach ($handlers as $field => $handler) {
77 77
       if ($label = $handler->label()) {
78 78
         $field_names[$field] = $label;
79
-      }
80
-      else {
79
+      } else {
81 80
         $field_names[$field] = $handler->ui_name();
82 81
       }
83 82
     }
@@ -125,8 +124,7 @@  discard block
 block discarded – undo
125 124
       $map = array_flip($this->field_map);
126 125
       if (isset($row->$map[$field])) {
127 126
         $tokens["[$field]"] = $row->$map[$field];
128
-      }
129
-      else {
127
+      } else {
130 128
         $tokens["[$field]"] = '';
131 129
       }
132 130
     }
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/forum_access/forum_access.node.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,23 +49,20 @@  discard block
 block discarded – undo
49 49
   foreach ($form['taxonomy'][$vid]['#options'] as $tid => $name) {
50 50
     if (!is_numeric($tid)) {
51 51
       $options[$tid] = $name;
52
-    }
53
-    elseif (is_object($name)) {
52
+    } elseif (is_object($name)) {
54 53
       foreach ($name->option as $sub_tid => $sub_name) {
55 54
         if (!empty($tids[$sub_tid])) {
56 55
           $options[$tid]->option[$sub_tid] = $sub_name;
57 56
         }
58 57
       }
59
-    }
60
-    elseif ($tids[$tid]) {
58
+    } elseif ($tids[$tid]) {
61 59
       $options[$tid] = $name;
62 60
     }
63 61
   }
64 62
 
65 63
   if ($options) {
66 64
     $form['taxonomy'][$vid]['#options'] = $options;
67
-  }
68
-  else {
65
+  } else {
69 66
     unset($form['taxonomy'][$vid]);
70 67
   }
71 68
 
@@ -135,8 +132,7 @@  discard block
 block discarded – undo
135 132
                 }
136 133
             break;
137 134
         }//switch arg(0)
138
-      }
139
-      else {
135
+      } else {
140 136
         if (isset($form['admin']) && !empty($user->_forum_access_moderator)) {
141 137
           foreach (element_children($form['admin']) as $key) {
142 138
             if ($key != 'status') {
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/i18nviews/i18nviews.module 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
 function i18nviews_views_handler_field_allterms($fieldinfo, $fielddata, $value, $data) {
63 63
   if ($fieldinfo['vocabulary']) {
64 64
     $terms = taxonomy_node_get_terms_by_vocabulary($data->nid, $fieldinfo['vocabulary']);
65
-  }
66
-  else {
65
+  } else {
67 66
     $terms = taxonomy_node_get_terms($data->nid);
68 67
   }
69 68
   // Translate all these terms.
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
       $links[] = check_plain($term->name);
75 74
     }
76 75
     $links = !empty($links) ? implode(' | ', $links) : '';
77
-  }
78
-  else {
76
+  } else {
79 77
     $node = new stdClass();
80 78
     $node->taxonomy = $terms;
81 79
     $links = theme('links', taxonomy_link('taxonomy terms', $node));
@@ -126,8 +124,7 @@  discard block
 block discarded – undo
126 124
         if ($data['id'] == 'term_node.name') {
127 125
           // That's a full taxonomy box.
128 126
           $view->field[$index]['handler'] = 'i18ntaxonomy_views_handler_field_allterms';
129
-        }
130
-        elseif (preg_match("/term_node_(\d+)\.name/", $data['id'], $matches)) {
127
+        } elseif (preg_match("/term_node_(\d+)\.name/", $data['id'], $matches)) {
131 128
           $vid = $matches[1];
132 129
           if ($translate[$vid]) {
133 130
             // Set new handler for this field.
@@ -161,8 +158,7 @@  discard block
 block discarded – undo
161 158
       if ($update) {
162 159
         $format = isset($data[$field . '_format']) ? $data[$field . '_format'] : NULL;
163 160
         i18nstrings_update("views:$name:$group:$field", $data[$field], $format);
164
-      }
165
-      else {
161
+      } else {
166 162
         $data[$field] = i18nstrings("views:$name:$group:$field", $data[$field]);
167 163
         $translated[] = $field;
168 164
       }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/wysiwyg.admin.inc 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@  discard block
 block discarded – undo
102 102
     if (count($value) > 1) {
103 103
       $tname = t($value[0]);
104 104
       $predefined[$key] = ($tname == $value[1]) ? $tname : "$tname ($value[1])";
105
-    }
106
-    else {
105
+    } else {
107 106
       $predefined[$key] = t($value[0]);
108 107
     }
109 108
   }
@@ -143,8 +142,7 @@  discard block
 block discarded – undo
143 142
           '#default_value' => !empty($profile->settings['buttons'][$name][$button]) ? $profile->settings['buttons'][$name][$button] : FALSE,
144 143
         );
145 144
       }
146
-    }
147
-    else if (isset($meta['extensions']) && is_array($meta['extensions'])) {
145
+    } else if (isset($meta['extensions']) && is_array($meta['extensions'])) {
148 146
       foreach ($meta['extensions'] as $extension => $title) {
149 147
         $form['buttons'][$name][$extension] = array(
150 148
           '#type' => 'checkbox',
@@ -334,8 +332,7 @@  discard block
 block discarded – undo
334 332
   // Determine if this is an update.
335 333
   if (!db_result(db_query("SELECT 1 FROM {wysiwyg} WHERE format = %d", $format))) {
336 334
     $update = array();
337
-  }
338
-  else {
335
+  } else {
339 336
     $update = array('format');
340 337
   }
341 338
   $wysiwyg = new stdClass();
@@ -405,8 +402,7 @@  discard block
 block discarded – undo
405 402
     );
406 403
     if ($editor['installed']) {
407 404
       $options[$name] = $editor['title'] . (isset($editor['installed version']) ? ' ' . $editor['installed version'] : '');
408
-    }
409
-    else {
405
+    } else {
410 406
       // Build on-site installation instructions.
411 407
       // @todo Setup $library in wysiwyg_load_editor() already.
412 408
       $library = (isset($editor['library']) ? $editor['library'] : key($editor['libraries']));
@@ -467,8 +463,7 @@  discard block
 block discarded – undo
467 463
       if ($in_code_only) {
468 464
         $form['formats'][$id]['name']['#value'] .= ' <em>(' . t('From: !module module', array('!module' => $profiles[$id]->export_module)) . ')</em>';
469 465
       }
470
-    }
471
-    else {
466
+    } else {
472 467
       $form['formats'][$id]['editor'] = array(
473 468
         '#type' => 'select',
474 469
         '#default_value' => '',
@@ -574,8 +569,7 @@  discard block
 block discarded – undo
574 569
   wysiwyg_profile_delete($wysiwyg);
575 570
   if (!empty($form_state['values']['revert'])) {
576 571
     drupal_set_message(t('Wysiwyg profile settings for %name has been reverted.', array('%name' => $format->name)));
577
-  }
578
-  else {
572
+  } else {
579 573
     drupal_set_message(t('Wysiwyg profile for %name has been deleted.', array('%name' => $format->name)));
580 574
   }
581 575
   $form_state['redirect'] = 'admin/settings/wysiwyg';
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/editors/fckeditor.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,8 +130,7 @@
 block discarded – undo
130 130
   if (isset($config['css_setting'])) {
131 131
     if ($config['css_setting'] == 'theme') {
132 132
       $settings['EditorAreaCSS'] = implode(',', wysiwyg_get_css());
133
-    }
134
-    else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
133
+    } else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
135 134
       $settings['EditorAreaCSS'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
136 135
     }
137 136
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/editors/wymeditor.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,8 +173,7 @@
 block discarded – undo
173 173
     if ($config['css_setting'] == 'theme') {
174 174
       // WYMeditor only supports one CSS file currently.
175 175
       $settings['stylesheet'] = reset(wysiwyg_get_css());
176
-    }
177
-    else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
176
+    } else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
178 177
       $settings['stylesheet'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
179 178
     }
180 179
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/editors/ckeditor.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
     natcasesort($themes);
106 106
     $themes = array_values($themes);
107 107
     return !empty($themes) ? $themes : array('default');
108
-  }
109
-  else {
108
+  } else {
110 109
     return array('default');
111 110
   }
112 111
 }
@@ -165,16 +164,13 @@  discard block
 block discarded – undo
165 164
     if (version_compare($editor['installed version'], '3.0.1.4391', '<')) {
166 165
       if ($config['css_setting'] == 'theme') {
167 166
         $settings['contentsCss'] = reset(wysiwyg_get_css());
168
-      }
169
-      elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
167
+      } elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
170 168
         $settings['contentsCss'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
171 169
       }
172
-    }
173
-    else {
170
+    } else {
174 171
       if ($config['css_setting'] == 'theme') {
175 172
         $settings['contentsCss'] = wysiwyg_get_css();
176
-      }
177
-      elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
173
+      } elseif ($config['css_setting'] == 'self' && isset($config['css_path'])) {
178 174
         $settings['contentsCss'] = explode(',', strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme())));
179 175
       }
180 176
     }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/editors/yui.inc 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -176,8 +176,7 @@  discard block
 block discarded – undo
176 176
               }
177 177
             }
178 178
           }
179
-        }
180
-        else if ($button == 'fontname') {
179
+        } else if ($button == 'fontname') {
181 180
           $extra = array('menu' => array(
182 181
             array('text' => 'Arial', 'checked' => TRUE),
183 182
             array('text' => 'Arial Black'),
@@ -201,8 +200,7 @@  discard block
 block discarded – undo
201 200
   if (isset($config['css_setting'])) {
202 201
     if ($config['css_setting'] == 'theme') {
203 202
       $settings['extracss'] = wysiwyg_get_css();
204
-    }
205
-    else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
203
+    } else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
206 204
       $settings['extracss'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
207 205
       $settings['extracss'] = explode(',', $settings['extracss']);
208 206
     }
@@ -249,11 +247,9 @@  discard block
 block discarded – undo
249 247
   if (in_array($button, array('heading', 'fontname'))) {
250 248
     $type = 'select';
251 249
     $label = $extra['menu'][0]['text'];
252
-  }
253
-  elseif (in_array($button, array('fontsize'))) {
250
+  } elseif (in_array($button, array('fontsize'))) {
254 251
     $type = 'spin';
255
-  }
256
-  elseif (in_array($button, array('forecolor', 'backcolor'))) {
252
+  } elseif (in_array($button, array('forecolor', 'backcolor'))) {
257 253
     $type = 'color';
258 254
   }
259 255
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/wysiwyg/editors/openwysiwyg.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
   if (isset($config['css_setting'])) {
102 102
     if ($config['css_setting'] == 'theme') {
103 103
       $settings['CSSFile'] = reset(wysiwyg_get_css());
104
-    }
105
-    else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
104
+    } else if ($config['css_setting'] == 'self' && isset($config['css_path'])) {
106 105
       $settings['CSSFile'] = strtr($config['css_path'], array('%b' => base_path(), '%t' => path_to_theme()));
107 106
     }
108 107
   }
Please login to merge, or discard this patch.