Completed
Pull Request — master (#1795)
by Christian
11:36
created
modules/contrib/privatemsg/views/views_handler_field_privatemsg_link.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,11 +106,9 @@
 block discarded – undo
106 106
   function render($values) {
107 107
     if (isset($values->uid)) {
108 108
       $uid = $values->uid;
109
-    }
110
-    elseif (isset($values->users_uid)) {
109
+    } elseif (isset($values->users_uid)) {
111 110
       $uid = $values->users_uid;
112
-    }
113
-    else {
111
+    } else {
114 112
       return '';
115 113
     }
116 114
     $text = t('Write private message');
Please login to merge, or discard this patch.
modules/contrib/privatemsg/privatemsg_filter/privatemsg_filter.admin.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,8 +112,7 @@  discard block
 block discarded – undo
112 112
   if ($tag_id) {
113 113
     // We are editing an existing tag, exclude the current tag from the search.
114 114
     $exists = db_result(db_query("SELECT 1 FROM {pm_tags} WHERE tag = '%s' AND tag_id <> %d", $form_state['values']['tag'], $tag_id));
115
-  }
116
-  else {
115
+  } else {
117 116
     $exists = db_result(db_query("SELECT 1 FROM {pm_tags} WHERE tag = '%s'", $form_state['values']['tag']));
118 117
   }
119 118
   if ($exists) {
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
130 129
     db_query("UPDATE {pm_tags} SET tag = '%s', public = %d WHERE tag_id = %d", $form_state['values']['tag'], $form_state['values']['public'], $form_state['values']['tag_id']);
131 130
     drupal_set_message(t('Tag updated.'));
132 131
     $form_state['redirect'] = 'admin/settings/messages/tags';
133
-  }
134
-  else {
132
+  } else {
135 133
     // Tag does not yet exist, create a new one.
136 134
     db_query("INSERT INTO {pm_tags} (tag, public) VALUES ('%s', %d)", $form_state['values']['tag'], $form_state['values']['public']);
137 135
     drupal_set_message(t('Tag created.'));
Please login to merge, or discard this patch.
boinc/modules/contrib/privatemsg/privatemsg_filter/privatemsg_filter.module 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -192,8 +192,7 @@  discard block
 block discarded – undo
192 192
     if (empty($tag_id) && privatemsg_user_access('create private message tags')) {
193 193
       db_query("INSERT INTO {pm_tags} (tag) VALUES ('%s')", $tag);
194 194
       $tag_id = db_last_insert_id('pm_tags', 'tag_id');
195
-    }
196
-    elseif (empty($tag_id)) {
195
+    } elseif (empty($tag_id)) {
197 196
       // The user does not have permission to create new tags - disregard this tag and move onto the next.
198 197
       drupal_set_message(t('Tag %tag was ignored because you do not have permission to create new tags.', array('%tag' => $tag)));
199 198
       continue;
@@ -251,8 +250,7 @@  discard block
 block discarded – undo
251 250
     foreach ($threads as $thread) {
252 251
       db_query('DELETE FROM {pm_tags_index} WHERE uid = %d AND thread_id = %d', $account->uid, $thread);
253 252
     }
254
-  }
255
-  else {
253
+  } else {
256 254
     // Delete tag mapping for the specified tag.
257 255
     foreach ($threads as $thread) {
258 256
       db_query('DELETE FROM {pm_tags_index} WHERE uid = %d AND thread_id = %d AND tag_id = %d', $account->uid, $thread, $tag_id);
@@ -268,8 +266,7 @@  discard block
 block discarded – undo
268 266
     foreach (explode(',', $_GET['tags']) as $tag) {
269 267
       if (isset($tag_data[$tag])) {
270 268
         $filter['tags'][$tag] = $tag;
271
-      }
272
-      elseif (in_array($tag, $tag_data)) {
269
+      } elseif (in_array($tag, $tag_data)) {
273 270
         $filter['tags'][array_search($tag, $tag_data)] = array_search($tag, $tag_data);
274 271
       }
275 272
     }
@@ -436,8 +433,7 @@  discard block
 block discarded – undo
436 433
     foreach ($filter['tags'] as $tag) {
437 434
       if ((int)$tag > 0) {
438 435
         $ids[] = $tag;
439
-      }
440
-      else {
436
+      } else {
441 437
         $query['tags'][] = $tag;
442 438
       }
443 439
     }
@@ -456,8 +452,7 @@  discard block
 block discarded – undo
456 452
     foreach ($filter['author'] as $author) {
457 453
       if (is_object($author) && isset($author->uid) && isset($author->name)) {
458 454
         $query['author'][] = $author->name;
459
-      }
460
-      elseif ($author_obj = user_load($author)) {
455
+      } elseif ($author_obj = user_load($author)) {
461 456
         $query['author'][] = $author_obj->name;
462 457
       }
463 458
     }
@@ -646,8 +641,7 @@  discard block
 block discarded – undo
646 641
         $fragments['where'][]       = "pm.subject LIKE '%s' OR pm.body LIKE '%s'";
647 642
         $fragments['query_args']['where'][]    = '%%'. $filter['search'] .'%%';
648 643
         $fragments['query_args']['where'][]    = '%%'. $filter['search'] .'%%';
649
-      }
650
-      else {
644
+      } else {
651 645
         $fragments['where'][]       = "pm.subject LIKE '%s'";
652 646
         $fragments['query_args']['where'][]    = '%%'. $filter['search'] .'%%';
653 647
       }
@@ -820,8 +814,7 @@  discard block
 block discarded – undo
820 814
     $fragments['inner_join'][]  = 'INNER JOIN {pm_tags_index} ti on ti.tag_id = t.tag_id';
821 815
     $fragments['where'][] = 'ti.thread_id IN (' . db_placeholders($threads) . ')';
822 816
     $fragments['query_args']['where'] += $threads;
823
-  }
824
-  else {
817
+  } else {
825 818
     // Tag usage counter is only used when we select all tags.
826 819
     $fragments['select'][]      = 'COUNT(ti.thread_id) as count';
827 820
     // LEFT JOIN so that unused tags are displayed too.
@@ -850,8 +843,7 @@  discard block
 block discarded – undo
850 843
                               AND pmtic.uid = ti.uid
851 844
                               AND pmtic.tag_id < ti.tag_id) < %d';
852 845
     $fragments['query_args']['where'][] = $limit;
853
-  }
854
-  elseif (!empty($threads) || !empty($user)) {
846
+  } elseif (!empty($threads) || !empty($user)) {
855 847
     // Only add a sort when we are not loading the tags for the admin page.
856 848
     // Sorting is handled through tablesort_sql() then.
857 849
     $fragments['order_by'][] = 't.tag ASC';
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/privatemsg/privatemsg.theme.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -264,8 +264,7 @@  discard block
 block discarded – undo
264 264
         if (!empty($header['key'])) {
265 265
           if (isset($row['data'][$header['key']])) {
266 266
             $data[] = $row['data'][$header['key']];
267
-          }
268
-          else {
267
+          } else {
269 268
             // Store a empty value so that the order is still correct.
270 269
             $data[] = '';
271 270
           }
@@ -275,8 +274,7 @@  discard block
 block discarded – undo
275 274
       $row['data'] = $data;
276 275
       $themed_rows[] = $row;
277 276
     }
278
-  }
279
-  else {
277
+  } else {
280 278
     // Display a message if now messages are available.
281 279
     $themed_rows[] = array(array('data' => t('No messages available.'), 'colspan' => count($headers)));
282 280
   }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/privatemsg/privatemsg.module 1 patch
Braces   +33 added lines, -66 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@  discard block
 block discarded – undo
104 104
     $last = array_pop($to);
105 105
     if (count($to) == 0) { // Only one participant
106 106
       return t("From !last", array('!last' => $last));
107
-    }
108
-    else { // Multipe participants..
107
+    } else { // Multipe participants..
109 108
       $participants = implode(', ', $to);
110 109
       return t('Participants: !participants and !last', array('!participants' => $participants, '!last' => $last));
111 110
     }
@@ -325,11 +324,9 @@  discard block
 block discarded – undo
325 324
       if (is_null($start)) {
326 325
         if (isset($_GET['start']) && $_GET['start'] < $thread['message_count']) {
327 326
           $start = $_GET['start'];
328
-        }
329
-        elseif (!variable_get('privatemsg_view_use_max_as_default', FALSE) && $max_amount == PRIVATEMSG_UNLIMITED) {
327
+        } elseif (!variable_get('privatemsg_view_use_max_as_default', FALSE) && $max_amount == PRIVATEMSG_UNLIMITED) {
330 328
           $start = PRIVATEMSG_UNLIMITED;
331
-        }
332
-        else {
329
+        } else {
333 330
           $start = $thread['message_count'] - (variable_get('privatemsg_view_use_max_as_default', FALSE) ? variable_get('privatemsg_view_default_amount', 10) : $max_amount);
334 331
         }
335 332
       }
@@ -338,8 +335,7 @@  discard block
 block discarded – undo
338 335
         if ($max_amount == PRIVATEMSG_UNLIMITED) {
339 336
           $last_page = 0;
340 337
           $max_amount = $thread['message_count'];
341
-        }
342
-        else {
338
+        } else {
343 339
           // Calculate the number of messages on the "last" page to avoid
344 340
           // message overlap.
345 341
           // Note - the last page lists the earliest messages, not the latest.
@@ -360,8 +356,7 @@  discard block
 block discarded – undo
360 356
         }
361 357
         if ($start - $max_amount >= 0) {
362 358
           $thread['older_start'] = $start - $max_amount;
363
-        }
364
-        elseif ($start > 0) {
359
+        } elseif ($start > 0) {
365 360
           $thread['older_start'] = 0;
366 361
         }
367 362
 
@@ -377,8 +372,7 @@  discard block
 block discarded – undo
377 372
         // Visual counts start from 1 instead of zero, so plus one.
378 373
         $thread['from'] = $start + 1;
379 374
         $conversation = db_query_range($query['query'], $start, $max_amount);
380
-      }
381
-      else {
375
+      } else {
382 376
         $conversation = db_query($query['query']);
383 377
       }
384 378
       $mids = array();
@@ -398,12 +392,10 @@  discard block
 block discarded – undo
398 392
             // Thread does not exist, display 404.
399 393
             $thread = FALSE;
400 394
           }
401
-        }
402
-        else {
395
+        } else {
403 396
           $thread = FALSE;
404 397
         }
405
-      }
406
-      else {
398
+      } else {
407 399
         // General data, assume subject is the same for all messages of that thread.
408 400
         $thread['user'] = $account;
409 401
         $message = current($thread['messages']);
@@ -689,8 +681,7 @@  discard block
 block discarded – undo
689 681
     // Trying to view someone else's messages...
690 682
     if (!privatemsg_user_access('read all private messages')) {
691 683
       drupal_set_message(t("You do not have sufficient rights to view someone else's messages"), 'warning');
692
-    }
693
-    elseif ($account_check = user_load(array('uid' => $uid))) {
684
+    } elseif ($account_check = user_load(array('uid' => $uid))) {
694 685
       // Has rights and user_load return an array so user does exist
695 686
       $account = $account_check;
696 687
     }
@@ -852,11 +843,9 @@  discard block
 block discarded – undo
852 843
   // convert recipients to array of user objects
853 844
   if (!empty($recipients) && is_string($recipients) || is_int($recipients)) {
854 845
     $recipients = _privatemsg_generate_user_array($recipients);
855
-  }
856
-  elseif (is_object($recipients)) {
846
+  } elseif (is_object($recipients)) {
857 847
     $recipients = array($recipients);
858
-  }
859
-  elseif (empty($recipients) && is_string($recipients)) {
848
+  } elseif (empty($recipients) && is_string($recipients)) {
860 849
     $recipients = array();
861 850
   }
862 851
 
@@ -879,8 +868,7 @@  discard block
 block discarded – undo
879 868
       }
880 869
       $to[] = $recipient->name;
881 870
       $to_themed[$recipient->uid] = theme('username', $recipient);
882
-    }
883
-    else {
871
+    } else {
884 872
       // Recipient list contains blocked users.
885 873
       $blocked = TRUE;
886 874
     }
@@ -905,8 +893,7 @@  discard block
 block discarded – undo
905 893
   }
906 894
   if (!$thread_id && !empty($recipients_string)) {
907 895
     drupal_set_title(t('Write new message to %recipient', array('%recipient' => $recipients_string)));
908
-  }
909
-  elseif (!$thread_id) {
896
+  } elseif (!$thread_id) {
910 897
     drupal_set_title(t('Write new message'));
911 898
   }
912 899
 
@@ -982,8 +969,7 @@  discard block
 block discarded – undo
982 969
   $title = t('Cancel');
983 970
   if (isset($_REQUEST['destination'])) {
984 971
     $url = $_REQUEST['destination'];
985
-  }
986
-  elseif (!is_null($thread_id)) {
972
+  } elseif (!is_null($thread_id)) {
987 973
     $url = $_GET['q'];
988 974
     $title = t('Clear');
989 975
   }
@@ -1034,8 +1020,7 @@  discard block
 block discarded – undo
1034 1020
   // Only parse the user string for a new thread.
1035 1021
   if (!isset($message['thread_id'])) {
1036 1022
     list($message['recipients'], $invalid) = _privatemsg_parse_userstring($message['recipient']);
1037
-  }
1038
-  else {
1023
+  } else {
1039 1024
     // Load participants.
1040 1025
     $message['recipients'] = _privatemsg_load_thread_participants($message['thread_id']);
1041 1026
     // Remove author.
@@ -1133,8 +1118,7 @@  discard block
 block discarded – undo
1133 1118
   }
1134 1119
   if ($status !== FALSE )  {
1135 1120
     drupal_set_message(t('A message has been sent to !recipients.', array('!recipients' => implode(', ', $recipient_names))));
1136
-  }
1137
-  else {
1121
+  } else {
1138 1122
     drupal_set_message(t('An attempt to send a message <em>may have failed</em> when sending to !recipients.', array('!recipients' => implode(', ', $recipient_names))), 'error');
1139 1123
   }
1140 1124
 }
@@ -1195,8 +1179,7 @@  discard block
 block discarded – undo
1195 1179
       $fragments['select'][]      = "array_to_string(array(SELECT DISTINCT textin(int4out(pmia.uid))
1196 1180
                                                             FROM {pm_index} pmia
1197 1181
                                                             WHERE pmia.thread_id = pmi.thread_id), ',') AS participants";
1198
-    }
1199
-    else {
1182
+    } else {
1200 1183
       $fragments['select'][]      = '(SELECT GROUP_CONCAT(DISTINCT pmia.uid SEPARATOR ",")
1201 1184
                                                             FROM {pm_index} pmia
1202 1185
                                                             WHERE pmia.thread_id = pmi.thread_id) AS participants';
@@ -1490,8 +1473,7 @@  discard block
 block discarded – undo
1490 1473
     );
1491 1474
 
1492 1475
     return $blocks;
1493
-  }
1494
-  elseif ('view' == $op) {
1476
+  } elseif ('view' == $op) {
1495 1477
     $block = array();
1496 1478
     switch ($delta) {
1497 1479
       case 'privatemsg-menu':
@@ -1587,8 +1569,7 @@  discard block
 block discarded – undo
1587 1569
     if (isset($form_state['values']['delete_options']) && $form_state['values']['delete_options']) {
1588 1570
       privatemsg_message_change_delete($form_state['values']['pmid'], 1);
1589 1571
       drupal_set_message(t('Message has been deleted for all users.'));
1590
-    }
1591
-    else {
1572
+    } else {
1592 1573
       privatemsg_message_change_delete($form_state['values']['pmid'], 1, $account);
1593 1574
       drupal_set_message(t('Message has been deleted.'));
1594 1575
     }
@@ -1617,8 +1598,7 @@  discard block
 block discarded – undo
1617 1598
 
1618 1599
   if ($account) {
1619 1600
     db_query('UPDATE {pm_index} SET deleted = %d WHERE mid = %d AND uid = %d', $delete_value, $pmid, $account->uid);
1620
-  }
1621
-  else {
1601
+  } else {
1622 1602
     // Mark deleted for all users.
1623 1603
     db_query('UPDATE {pm_index} SET deleted = %d WHERE mid = %d', $delete_value, $pmid);
1624 1604
   }
@@ -1779,8 +1759,7 @@  discard block
 block discarded – undo
1779 1759
         'success'  => FALSE,
1780 1760
         'messages'   => $messages,
1781 1761
       );
1782
-    }
1783
-    else {
1762
+    } else {
1784 1763
       $messages['error'][] = t('User @user is not allowed to write messages', array('@user' => $message['author']->name));
1785 1764
       return array(
1786 1765
          'success'  => FALSE,
@@ -1794,8 +1773,7 @@  discard block
 block discarded – undo
1794 1773
   if (empty($message['subject'])) {
1795 1774
     if ($form) {
1796 1775
       form_set_error('subject', t('Disallowed to send a message without subject'));
1797
-    }
1798
-    else {
1776
+    } else {
1799 1777
       $messages['error'][] = t('Disallowed to send a message without subject');
1800 1778
     }
1801 1779
   }
@@ -1804,8 +1782,7 @@  discard block
 block discarded – undo
1804 1782
   if (!empty($message['thread_id']) && ($message['body'] === NULL || $message['body'] === '') ) {
1805 1783
     if ($form) {
1806 1784
       form_set_error('body', t('Disallowed to send reply without a message.'));
1807
-    }
1808
-    else {
1785
+    } else {
1809 1786
       $messages['error'][] = t('Disallowed to send reply without a message.');
1810 1787
     }
1811 1788
   }
@@ -1819,8 +1796,7 @@  discard block
 block discarded – undo
1819 1796
   if (!filter_access($message['format'])) {
1820 1797
     if ($form) {
1821 1798
       form_set_error('format', t('You are not allowed to use the specified input format.'));
1822
-    }
1823
-    else {
1799
+    } else {
1824 1800
       $messages['error'][] = t('User @user is not allowed to use the specified input format.', array('@user' => $message['author']->name));
1825 1801
     }
1826 1802
   }
@@ -1831,8 +1807,7 @@  discard block
 block discarded – undo
1831 1807
   if (empty($message['recipients']) || !is_array($message['recipients'])) {
1832 1808
     if ($form) {
1833 1809
       form_set_error('to', t('Disallowed to send a message without at least one valid recipient'));
1834
-    }
1835
-    else {
1810
+    } else {
1836 1811
       $messages['error'][] = t('Disallowed to send a message without at least one valid recipient');
1837 1812
     }
1838 1813
   }
@@ -1842,8 +1817,7 @@  discard block
 block discarded – undo
1842 1817
       unset($message['recipients'][$blocked['uid']]);
1843 1818
       if ($form) {
1844 1819
         drupal_set_message($blocked['message'], 'warning');
1845
-      }
1846
-      else {
1820
+      } else {
1847 1821
         $messages['warning'][] = $blocked['message'];
1848 1822
       }
1849 1823
     }
@@ -1853,8 +1827,7 @@  discard block
 block discarded – undo
1853 1827
   if (empty($message['recipients'])) {
1854 1828
     if ($form) {
1855 1829
       form_set_error('to', t('Disallowed to send message because all recipients are blocked'));
1856
-    }
1857
-    else {
1830
+    } else {
1858 1831
       $messages['error'][] = t('Disallowed to send message because all recipients are blocked');
1859 1832
     }
1860 1833
   }
@@ -2060,8 +2033,7 @@  discard block
 block discarded – undo
2060 2033
   if (is_array($query)) {
2061 2034
     $query_id = $query[0];
2062 2035
     $query_group = $query[1];
2063
-  }
2064
-  else {
2036
+  } else {
2065 2037
     $query_id = $query;
2066 2038
     $query_group = 'privatemsg';
2067 2039
   }
@@ -2141,8 +2113,7 @@  discard block
 block discarded – undo
2141 2113
       // Works fine for thread_id/list but may generate an error when a more complex GROUP BY is used.
2142 2114
       $str_group_by_count = current($GROUP_BY);
2143 2115
       $count = "SELECT COUNT(DISTINCT {$str_group_by_count}) FROM ". $primary_table;
2144
-    }
2145
-    else {
2116
+    } else {
2146 2117
       $count = "SELECT COUNT(*) FROM ". $primary_table;
2147 2118
     }
2148 2119
 
@@ -2263,8 +2234,7 @@  discard block
 block discarded – undo
2263 2234
 
2264 2235
   if ($status == PRIVATEMSG_UNREAD) {
2265 2236
     drupal_set_message(format_plural(count($threads), 'Marked 1 thread as unread.', 'Marked @count threads as unread.'));
2266
-  }
2267
-  else {
2237
+  } else {
2268 2238
     drupal_set_message(format_plural(count($threads), 'Marked 1 thread as read.', 'Marked @count threads as read.'));
2269 2239
   }
2270 2240
 }
@@ -2445,8 +2415,7 @@  discard block
 block discarded – undo
2445 2415
   // Add in callback arguments if present.
2446 2416
   if (isset($operation['callback arguments'])) {
2447 2417
     $args = array_merge(array($threads), $operation['callback arguments']);
2448
-  }
2449
-  else {
2418
+  } else {
2450 2419
     $args = array($threads);
2451 2420
   }
2452 2421
 
@@ -2463,8 +2432,7 @@  discard block
 block discarded – undo
2463 2432
     // Add in callback arguments if present.
2464 2433
     if (isset($operation['undo callback arguments'])) {
2465 2434
       $undo_args = array_merge(array($threads), $operation['undo callback arguments']);
2466
-    }
2467
-    else {
2435
+    } else {
2468 2436
       $undo_args = array($threads);
2469 2437
     }
2470 2438
 
@@ -2516,8 +2484,7 @@  discard block
 block discarded – undo
2516 2484
 
2517 2485
   if ($delete) {
2518 2486
     drupal_set_message(format_plural(count($threads), 'Deleted 1 thread.', 'Deleted @count threads.'));
2519
-  }
2520
-  else {
2487
+  } else {
2521 2488
     drupal_set_message(format_plural(count($threads), 'Restored 1 thread.', 'Restored @count threads.'));
2522 2489
   }
2523 2490
 }
Please login to merge, or discard this patch.
default/boinc/modules/contrib/privatemsg/pm_block_user/pm_block_user.module 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
   }
Please login to merge, or discard this patch.
sites/default/boinc/modules/node_comment_block/node_comment_block.module 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
modules/boinc_solr_search/boinc_solr_comments/boinc_solr_comments.module 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
default/boinc/modules/boincstats/includes/pchart/class/pBarcode39.class.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,8 +139,7 @@  discard block
 block discarded – undo
139 139
         {
140 140
          $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10);
141 141
          $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10);
142
-        }
143
-       else
142
+        } else
144 143
         {
145 144
          $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+20);
146 145
          $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+20);
@@ -187,8 +186,9 @@  discard block
 block discarded – undo
187 186
      $length   = strlen( $string );
188 187
      $charset  = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%';
189 188
 
190
-     for( $i=0; $i < $length; ++$i )
191
-      $checksum += strpos( $charset, $string[$i] );
189
+     for( $i=0; $i < $length; ++$i ) {
190
+           $checksum += strpos( $charset, $string[$i] );
191
+     }
192 192
  
193 193
      return substr( $charset, ($checksum % 43), 1 );
194 194
     }
Please login to merge, or discard this patch.