@@ -79,8 +79,7 @@ discard block |
||
79 | 79 | // Should we populate the form with data from $form_state or the database? |
80 | 80 | if (!isset($form_state['pm_block_user']['block_actions'])) { |
81 | 81 | $block_actions = variable_get('pm_block_user_actions', array()); |
82 | - } |
|
83 | - else { |
|
82 | + } else { |
|
84 | 83 | $block_actions = $form_state['pm_block_user']['block_actions']; |
85 | 84 | } |
86 | 85 | // Work through each rule, adding it as a new element in |
@@ -160,8 +159,7 @@ discard block |
||
160 | 159 | PM_BLOCK_USER_DISALLOW_SENDING => t('Disallow sending message'), |
161 | 160 | ); |
162 | 161 | $default_value = (isset($details['action']) ? $details['action'] : PM_BLOCK_USER_DISALLOW_BLOCKING); |
163 | - } |
|
164 | - else { |
|
162 | + } else { |
|
165 | 163 | // @todo: add whitelist options/default_value here. |
166 | 164 | } |
167 | 165 | $form['action'] = array( |
@@ -239,8 +237,7 @@ discard block |
||
239 | 237 | // builder. |
240 | 238 | if (isset($form_state['values']['block_actions'])) { |
241 | 239 | variable_set('pm_block_user_actions', _pm_block_user_settings_filter($form_state['values']['block_actions'])); |
242 | - } |
|
243 | - else { |
|
240 | + } else { |
|
244 | 241 | variable_set('pm_block_user_actions', array()); |
245 | 242 | } |
246 | 243 | drupal_set_message(t('The configuration options have been saved.')); |
@@ -272,8 +269,7 @@ discard block |
||
272 | 269 | } |
273 | 270 | if (count($matching) > 0) { |
274 | 271 | return $matching; |
275 | - } |
|
276 | - else { |
|
272 | + } else { |
|
277 | 273 | return array_map('_pm_block_user_settings_filter', $settings); |
278 | 274 | } |
279 | 275 | } |
@@ -463,8 +459,7 @@ discard block |
||
463 | 459 | t('Unblock @author', array('@author' => $author->name)), |
464 | 460 | t('Cancel') |
465 | 461 | ); |
466 | - } |
|
467 | - else { |
|
462 | + } else { |
|
468 | 463 | $form['block_action'] = array( |
469 | 464 | '#type' => 'value', |
470 | 465 | '#value' => 'block_user', |
@@ -564,8 +559,7 @@ discard block |
||
564 | 559 | if ($user->uid <> $author->uid) { |
565 | 560 | if ($vars['message']['is_blocked']) { |
566 | 561 | $vars['message_actions']['unblock_author'] = array('title' => t('Unblock author'), 'href' => 'messages/block/'. $author->uid, 'query' => 'destination=messages/view/' . $thread_id); |
567 | - } |
|
568 | - else { |
|
562 | + } else { |
|
569 | 563 | $vars['message_actions']['block_author'] = array('title' => t('Block author'), 'href' => 'messages/block/'. $author->uid, 'query' => 'destination=messages/view/' . $thread_id); |
570 | 564 | } |
571 | 565 | } |
@@ -42,8 +42,7 @@ |
||
42 | 42 | if (is_array($element)) { |
43 | 43 | show($element); |
44 | 44 | return drupal_render($element); |
45 | - } |
|
46 | - else { |
|
45 | + } else { |
|
47 | 46 | // Safe-guard for inappropriate use of render() on flat variables: return |
48 | 47 | // the variable as-is. |
49 | 48 | return $element; |
@@ -131,8 +131,7 @@ discard block |
||
131 | 131 | if ($comment->uid == 0 || strlen($comment->name) == 0) { |
132 | 132 | // @see user_validate_name(). !'0' === TRUE. |
133 | 133 | $comment_document->ss_name = '0'; |
134 | - } |
|
135 | - else { |
|
134 | + } else { |
|
136 | 135 | $comment_document->ss_name = $comment->name; |
137 | 136 | // We want the name to be searchable for keywords. |
138 | 137 | $comment_document->tos_name = $comment->name; |
@@ -318,8 +317,7 @@ discard block |
||
318 | 317 | $solr->deleteByQuery($query); |
319 | 318 | // Log the query used for deletion. |
320 | 319 | watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO); |
321 | - } |
|
322 | - catch (Exception $e) { |
|
320 | + } catch (Exception $e) { |
|
323 | 321 | watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR); |
324 | 322 | return FALSE; |
325 | 323 | }// try |
@@ -376,8 +374,7 @@ discard block |
||
376 | 374 | $solr->deleteByQuery($query); |
377 | 375 | // Log the query used for deletion. |
378 | 376 | watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO); |
379 | - } |
|
380 | - catch (Exception $e) { |
|
377 | + } catch (Exception $e) { |
|
381 | 378 | watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR); |
382 | 379 | return FALSE; |
383 | 380 | }// try |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | if (module_exists('pathauto')) { |
58 | 58 | module_load_include('inc', 'pathauto', 'pathauto'); |
59 | 59 | $node['path'] = pathauto_cleanstring($boincteam->name); |
60 | - } |
|
61 | - else { |
|
60 | + } else { |
|
62 | 61 | echo 'Pathauto module is required!'; |
63 | 62 | exit; |
64 | 63 | } |
@@ -77,7 +76,9 @@ discard block |
||
77 | 76 | // Determine team membership |
78 | 77 | db_set_active('boinc'); |
79 | 78 | $boincteam_member_ids = array(); |
80 | - while ($boincuser = db_fetch_object($boincteam_members)) $boincteam_member_ids[] = $boincuser->id; |
|
79 | + while ($boincuser = db_fetch_object($boincteam_members)) { |
|
80 | + $boincteam_member_ids[] = $boincuser->id; |
|
81 | + } |
|
81 | 82 | db_set_active('default'); |
82 | 83 | if ($boincteam_member_ids) { |
83 | 84 | $team_members = db_query('SELECT uid FROM {boincuser} WHERE boinc_id IN(%s)', implode(',', $boincteam_member_ids)); |
@@ -220,8 +220,7 @@ discard block |
||
220 | 220 | if (!$values['boinc_translate_transifex_pass']) { |
221 | 221 | if (!variable_get('boinc_translate_transifex_pass', '')) { |
222 | 222 | form_set_error('boinc_translate_transifex_pass', t('Password is required.')); |
223 | - } |
|
224 | - else { |
|
223 | + } else { |
|
225 | 224 | unset($form_state['values']['boinc_translate_transifex_pass']); |
226 | 225 | } |
227 | 226 | } |
@@ -260,8 +259,7 @@ discard block |
||
260 | 259 | 'boinc_translate_transifex_pass', |
261 | 260 | t('Transifex authentication failed.') |
262 | 261 | ); |
263 | - } |
|
264 | - else { |
|
262 | + } else { |
|
265 | 263 | $authenticated = TRUE; |
266 | 264 | } |
267 | 265 | } |
@@ -278,14 +276,12 @@ discard block |
||
278 | 276 | ); |
279 | 277 | if ($project_name AND $project_resources) { |
280 | 278 | $transifex_resources[$project_name] = $project_resources; |
281 | - } |
|
282 | - elseif ($project_name AND !$project_resources) { |
|
279 | + } elseif ($project_name AND !$project_resources) { |
|
283 | 280 | drupal_set_message( |
284 | 281 | t('No project-specific resources were provided'), |
285 | 282 | 'warning' |
286 | 283 | ); |
287 | - } |
|
288 | - elseif ($project_resources AND !$project_name) { |
|
284 | + } elseif ($project_resources AND !$project_name) { |
|
289 | 285 | drupal_set_message( |
290 | 286 | t('No project-specific Transifex project name was provided'), |
291 | 287 | 'warning' |
@@ -157,13 +157,11 @@ discard block |
||
157 | 157 | if (!$values['boinc_root_dir']) { |
158 | 158 | form_set_error('boinc_root_dir', t('BOINC project root directory must be |
159 | 159 | defined!')); |
160 | - } |
|
161 | - elseif (!is_dir($values['boinc_root_dir'])) { |
|
160 | + } elseif (!is_dir($values['boinc_root_dir'])) { |
|
162 | 161 | form_set_error('boinc_root_dir', t('BOINC project root not found at %directory', |
163 | 162 | array('%directory' => $values['boinc_root_dir']) |
164 | 163 | )); |
165 | - } |
|
166 | - else { |
|
164 | + } else { |
|
167 | 165 | // By default, try to automatically set specific directories from the root |
168 | 166 | if (!$values['boinc_config_xml_dir']) { |
169 | 167 | $values['boinc_config_xml_dir'] = $values['boinc_root_dir']; |
@@ -285,8 +283,7 @@ discard block |
||
285 | 283 | if (!$values['boinc_scheduler_urls']) { |
286 | 284 | form_set_error('boinc_scheduler_urls', t('At least one scheduling server |
287 | 285 | URL must be specified.')); |
288 | - } |
|
289 | - else { |
|
286 | + } else { |
|
290 | 287 | $urls = explode("\r\n", $values['boinc_scheduler_urls']); |
291 | 288 | foreach ($urls as $key => $url) { |
292 | 289 | if (!$url) { |
@@ -7,11 +7,9 @@ |
||
7 | 7 | list($module, $api) = func_get_args(); |
8 | 8 | if ($module == "apachesolr" && $api == "apachesolr_environments") { |
9 | 9 | return array("version" => 1); |
10 | - } |
|
11 | - elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") { |
|
10 | + } elseif ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") { |
|
12 | 11 | return array("version" => 3); |
13 | - } |
|
14 | - elseif ($module == "facetapi" && $api == "facetapi_defaults") { |
|
12 | + } elseif ($module == "facetapi" && $api == "facetapi_defaults") { |
|
15 | 13 | return array("version" => 1); |
16 | 14 | } |
17 | 15 | } |
@@ -7,17 +7,13 @@ |
||
7 | 7 | list($module, $api) = func_get_args(); |
8 | 8 | if ($module == "input_formats" && $api == "input_formats") { |
9 | 9 | return array("version" => 1); |
10 | - } |
|
11 | - elseif ($module == "page_manager" && $api == "pages_default") { |
|
10 | + } elseif ($module == "page_manager" && $api == "pages_default") { |
|
12 | 11 | return array("version" => 1); |
13 | - } |
|
14 | - elseif ($module == "panels_mini" && $api == "panels_default") { |
|
12 | + } elseif ($module == "panels_mini" && $api == "panels_default") { |
|
15 | 13 | return array("version" => 1); |
16 | - } |
|
17 | - elseif ($module == "strongarm" && $api == "strongarm") { |
|
14 | + } elseif ($module == "strongarm" && $api == "strongarm") { |
|
18 | 15 | return array("version" => 1); |
19 | - } |
|
20 | - elseif ($module == "wysiwyg" && $api == "wysiwyg") { |
|
16 | + } elseif ($module == "wysiwyg" && $api == "wysiwyg") { |
|
21 | 17 | return array("version" => 2); |
22 | 18 | } |
23 | 19 | } |
@@ -7,8 +7,7 @@ |
||
7 | 7 | list($module, $api) = func_get_args(); |
8 | 8 | if ($module == "context" && $api == "context") { |
9 | 9 | return array("version" => 3); |
10 | - } |
|
11 | - elseif ($module == "strongarm" && $api == "strongarm") { |
|
10 | + } elseif ($module == "strongarm" && $api == "strongarm") { |
|
12 | 11 | return array("version" => 1); |
13 | 12 | } |
14 | 13 | } |