@@ -127,7 +127,9 @@ discard block |
||
| 127 | 127 | $reply = "\r\nreply-to: $email_addr"; |
| 128 | 128 | $body .= "\n\n"; |
| 129 | 129 | $body .= $msg; |
| 130 | - if (!$subject) $subject = "BOINC Help request"; |
|
| 130 | + if (!$subject) { |
|
| 131 | + $subject = "BOINC Help request"; |
|
| 132 | + } |
|
| 131 | 133 | mail($vol->email_addr, $subject, $body, "From: BOINC".$reply); |
| 132 | 134 | page_head("Message sent"); |
| 133 | 135 | echo "Your message has been sent to $vol->name"; |
@@ -157,14 +159,20 @@ discard block |
||
| 157 | 159 | $oldr = rating_lookup($r); |
| 158 | 160 | if ($oldr) { |
| 159 | 161 | $retval = rating_update($r); |
| 160 | - if ($retval) vol_update_rating($vol, $oldr, $r); |
|
| 162 | + if ($retval) { |
|
| 163 | + vol_update_rating($vol, $oldr, $r); |
|
| 164 | + } |
|
| 161 | 165 | } else { |
| 162 | 166 | $retval = rating_insert($r); |
| 163 | - if ($retval) vol_new_rating($vol, $rating); |
|
| 167 | + if ($retval) { |
|
| 168 | + vol_new_rating($vol, $rating); |
|
| 169 | + } |
|
| 164 | 170 | } |
| 165 | 171 | } else { |
| 166 | 172 | $retval = rating_insert($r); |
| 167 | - if ($retval) vol_new_rating($vol, $rating); |
|
| 173 | + if ($retval) { |
|
| 174 | + vol_new_rating($vol, $rating); |
|
| 175 | + } |
|
| 168 | 176 | } |
| 169 | 177 | if (!$retval) { |
| 170 | 178 | echo mysql_error(); |
@@ -19,9 +19,15 @@ |
||
| 19 | 19 | $version = null; |
| 20 | 20 | $controlid = null; |
| 21 | 21 | |
| 22 | -if (isset($_GET['target'])) $target = $_GET['target']; |
|
| 23 | -if (isset($_GET['version'])) $version = $_GET['version']; |
|
| 24 | -if (isset($_GET['controlid'])) $controlid = $_GET['controlid']; |
|
| 22 | +if (isset($_GET['target'])) { |
|
| 23 | + $target = $_GET['target']; |
|
| 24 | +} |
|
| 25 | +if (isset($_GET['version'])) { |
|
| 26 | + $version = $_GET['version']; |
|
| 27 | +} |
|
| 28 | +if (isset($_GET['controlid'])) { |
|
| 29 | + $controlid = $_GET['controlid']; |
|
| 30 | +} |
|
| 25 | 31 | |
| 26 | 32 | if ($target == "notice") { |
| 27 | 33 | if ($controlid == 'download') { |
@@ -157,7 +157,9 @@ |
||
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | function project_forum_post_info($forum) { |
| 160 | - if (!$forum || $forum->title != "Questions and problems") return ""; |
|
| 160 | + if (!$forum || $forum->title != "Questions and problems") { |
|
| 161 | + return ""; |
|
| 162 | + } |
|
| 161 | 163 | return " |
| 162 | 164 | <b>When reporting a problem, please include</b>: |
| 163 | 165 | <ul> |
@@ -759,8 +759,12 @@ |
||
| 759 | 759 | function lookup_project($url) { |
| 760 | 760 | foreach ($areas as $area) { |
| 761 | 761 | foreach ($area as $p) { |
| 762 | - if ($p[1] == $url) return $p; |
|
| 763 | - if (sizeof($p)>6 && $p[6] == $url) return $p; |
|
| 762 | + if ($p[1] == $url) { |
|
| 763 | + return $p; |
|
| 764 | + } |
|
| 765 | + if (sizeof($p)>6 && $p[6] == $url) { |
|
| 766 | + return $p; |
|
| 767 | + } |
|
| 764 | 768 | } |
| 765 | 769 | } |
| 766 | 770 | return null; |
@@ -389,7 +389,9 @@ |
||
| 389 | 389 | function latest_version($p) { |
| 390 | 390 | $dev = false; |
| 391 | 391 | foreach ($p['versions'] as $i=>$v) { |
| 392 | - if (!$dev && is_dev($v)) continue; |
|
| 392 | + if (!$dev && is_dev($v)) { |
|
| 393 | + continue; |
|
| 394 | + } |
|
| 393 | 395 | return $v; |
| 394 | 396 | } |
| 395 | 397 | foreach ($p['versions'] as $i=>$v) { |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | |
| 62 | 62 | function is_spoken_language($lang) { |
| 63 | 63 | global $spoken_languages; |
| 64 | - if (!$lang) return true; |
|
| 64 | + if (!$lang) { |
|
| 65 | + return true; |
|
| 66 | + } |
|
| 65 | 67 | return in_array($lang, $spoken_languages); |
| 66 | 68 | } |
| 67 | 69 | |
@@ -56,7 +56,9 @@ |
||
| 56 | 56 | if ($platforms) { |
| 57 | 57 | echo " <platforms>\n"; |
| 58 | 58 | foreach ($platforms as $platform) { |
| 59 | - if ($platform == 'Unknown') continue; |
|
| 59 | + if ($platform == 'Unknown') { |
|
| 60 | + continue; |
|
| 61 | + } |
|
| 60 | 62 | echo " <name>$platform</name>\n"; |
| 61 | 63 | } |
| 62 | 64 | echo " </platforms>\n"; |
@@ -92,10 +92,18 @@ |
||
| 92 | 92 | } |
| 93 | 93 | $master_url = urldecode($master_url); |
| 94 | 94 | $project_name = urldecode($project_name); |
| 95 | -if ($auth) $auth = urldecode($auth); |
|
| 96 | -if ($user_name) $user_name = urldecode($user_name); |
|
| 97 | -if ($project_desc) $project_desc = urldecode($project_desc); |
|
| 98 | -if ($project_inst) $project_inst = urldecode($project_inst); |
|
| 95 | +if ($auth) { |
|
| 96 | + $auth = urldecode($auth); |
|
| 97 | +} |
|
| 98 | +if ($user_name) { |
|
| 99 | + $user_name = urldecode($user_name); |
|
| 100 | +} |
|
| 101 | +if ($project_desc) { |
|
| 102 | + $project_desc = urldecode($project_desc); |
|
| 103 | +} |
|
| 104 | +if ($project_inst) { |
|
| 105 | + $project_inst = urldecode($project_inst); |
|
| 106 | +} |
|
| 99 | 107 | |
| 100 | 108 | if ($download) { |
| 101 | 109 | $download_url = url_to_download(); |
@@ -12,30 +12,62 @@ discard block |
||
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | function button_image($status) { |
| 15 | - if ($status==1) return "offline.png"; |
|
| 16 | - if ($status==2) return "online.png"; |
|
| 17 | - if ($status==7) return "skypeme.png"; |
|
| 18 | - if ($status==3) return "away.png"; |
|
| 19 | - if ($status==4) return "notavailable.png"; |
|
| 20 | - if ($status==5) return "donotdisturb.png"; |
|
| 21 | - if ($status==6) return "offline.png"; |
|
| 15 | + if ($status==1) { |
|
| 16 | + return "offline.png"; |
|
| 17 | + } |
|
| 18 | + if ($status==2) { |
|
| 19 | + return "online.png"; |
|
| 20 | + } |
|
| 21 | + if ($status==7) { |
|
| 22 | + return "skypeme.png"; |
|
| 23 | + } |
|
| 24 | + if ($status==3) { |
|
| 25 | + return "away.png"; |
|
| 26 | + } |
|
| 27 | + if ($status==4) { |
|
| 28 | + return "notavailable.png"; |
|
| 29 | + } |
|
| 30 | + if ($status==5) { |
|
| 31 | + return "donotdisturb.png"; |
|
| 32 | + } |
|
| 33 | + if ($status==6) { |
|
| 34 | + return "offline.png"; |
|
| 35 | + } |
|
| 22 | 36 | return "offline.png"; |
| 23 | 37 | } |
| 24 | 38 | |
| 25 | 39 | function status_string($status) { |
| 26 | - if ($status==1) return "Offline"; |
|
| 27 | - if ($status==2) return "<font color=00aa00><b>Online</b></font>"; |
|
| 28 | - if ($status==7) return "<font color=00aa00><b>Skype Me!</b></font>"; |
|
| 29 | - if ($status==3) return "Away"; |
|
| 30 | - if ($status==4) return "Not available"; |
|
| 31 | - if ($status==5) return "Do not disturb"; |
|
| 32 | - if ($status==6) return "Offline"; |
|
| 40 | + if ($status==1) { |
|
| 41 | + return "Offline"; |
|
| 42 | + } |
|
| 43 | + if ($status==2) { |
|
| 44 | + return "<font color=00aa00><b>Online</b></font>"; |
|
| 45 | + } |
|
| 46 | + if ($status==7) { |
|
| 47 | + return "<font color=00aa00><b>Skype Me!</b></font>"; |
|
| 48 | + } |
|
| 49 | + if ($status==3) { |
|
| 50 | + return "Away"; |
|
| 51 | + } |
|
| 52 | + if ($status==4) { |
|
| 53 | + return "Not available"; |
|
| 54 | + } |
|
| 55 | + if ($status==5) { |
|
| 56 | + return "Do not disturb"; |
|
| 57 | + } |
|
| 58 | + if ($status==6) { |
|
| 59 | + return "Offline"; |
|
| 60 | + } |
|
| 33 | 61 | return "Unknown"; |
| 34 | 62 | } |
| 35 | 63 | |
| 36 | 64 | function online($status) { |
| 37 | - if ($status == 2) return true; |
|
| 38 | - if ($status == 7) return true; |
|
| 65 | + if ($status == 2) { |
|
| 66 | + return true; |
|
| 67 | + } |
|
| 68 | + if ($status == 7) { |
|
| 69 | + return true; |
|
| 70 | + } |
|
| 39 | 71 | return false; |
| 40 | 72 | } |
| 41 | 73 | |
@@ -115,8 +147,12 @@ discard block |
||
| 115 | 147 | $x = ""; |
| 116 | 148 | for ($i=5; $i>=0; $i--) { |
| 117 | 149 | $text = ""; |
| 118 | - if ($i==0) $text="No"; |
|
| 119 | - if ($i==5) $text="Yes"; |
|
| 150 | + if ($i==0) { |
|
| 151 | + $text="No"; |
|
| 152 | + } |
|
| 153 | + if ($i==5) { |
|
| 154 | + $text="Yes"; |
|
| 155 | + } |
|
| 120 | 156 | |
| 121 | 157 | $checked = ($val==$i)?"checked":""; |
| 122 | 158 | $x .= " |