Passed
Push — dpa_pm3 ( ba2f7a )
by David
08:53
created
html/inc/pm.inc 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     return $x;
52 52
 }
53 53
 
54
-function pm_team_form($user, $teamid, $error=null) {
54
+function pm_team_form($user, $teamid, $error = null) {
55 55
     global $bbcode_html, $bbcode_js;
56 56
     $team = BoincTeam::lookup_id($teamid);
57 57
     if (!$team) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         error_page("not admin");
62 62
     }
63 63
 
64
-    page_head(tra("Send message to team"),'','','', $bbcode_js);
64
+    page_head(tra("Send message to team"), '', '', '', $bbcode_js);
65 65
 
66 66
     $subject = post_str("subject", true);
67 67
     $content = post_str("content", true);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 function pm_form_page($replyto, $userid, $error = null) {
114 114
     global $bbcode_html, $bbcode_js;
115 115
     global $g_logged_in_user;
116
-    page_head(tra("Send private message"),'','','', $bbcode_js);
116
+    page_head(tra("Send private message"), '', '', '', $bbcode_js);
117 117
 
118 118
     if (post_str("preview", true) == tra("Preview")) {
119 119
         $content = post_str("content", true);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         if (!$user) {
138 138
             error_page("Sender no longer exists");
139 139
         }
140
-        $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")";
140
+        $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")";
141 141
         $subject = $message->subject;
142 142
         if (substr($subject, 0, 3) != "re:") {
143 143
             $subject = "re: ".$subject;
@@ -156,15 +156,15 @@  discard block
 block discarded – undo
156 156
                 time_str($user->prefs->banished_until)
157 157
             );
158 158
         }
159
-        $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")";
159
+        $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")";
160 160
     } else {
161 161
         $writeto = sanitize_tags(post_str("to", true));
162 162
         $subject = post_str("subject", true);
163 163
         $content = post_str("content", true);
164 164
     }
165 165
 
166
-    $content = $content?htmlspecialchars($content):'';
167
-    $subject = $subject?htmlspecialchars($subject):'';
166
+    $content = $content ?htmlspecialchars($content) : '';
167
+    $subject = $subject ?htmlspecialchars($subject) : '';
168 168
 
169 169
     if ($error != null) {
170 170
         echo "<p class=\"text-danger\">".$error."</p>\n";
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 function send_pm_notification_email(
221 221
     $logged_in_user, $to_user, $subject, $content
222 222
 ) {
223
-    $message  = "
223
+    $message = "
224 224
 You have received a new private message at ".PROJECT.".
225 225
 
226 226
 From: $logged_in_user->name (ID $logged_in_user->id)
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     $pm = BoincPrivateMessage::lookup_id($notify->opaque);
251 251
     $from_user = BoincUser::lookup_id($pm->senderid);
252 252
     if (!$pm || !$from_user) return null;
253
-    return "<a href=pm.php>".tra("Private message%1 from %2, subject:" , "</a>", $from_user->name )." $pm->subject";
253
+    return "<a href=pm.php>".tra("Private message%1 from %2, subject:", "</a>", $from_user->name)." $pm->subject";
254 254
 }
255 255
 
256 256
 function pm_send_msg($from_user, $to_user, $subject, $content, $send_email) {
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
 
315 315
 function pm_email_remind($user) {
316 316
     if (!$user->prefs->pm_notification) {
317
-        return "<br><small>" .
317
+        return "<br><small>".
318 318
             tra(
319 319
                 "For email notification, %1 edit community prefs %2",
320 320
                 '<a href="edit_forum_preferences_form.php">', '</a>'
321
-            ) .
321
+            ).
322 322
             "</small>"
323 323
         ;
324 324
     }
Please login to merge, or discard this patch.