@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * Stores and formats the parameters for the request to the reCAPTCHA service. |
31 | 31 | */ |
32 | -class RequestParameters |
|
33 | -{ |
|
32 | +class RequestParameters { |
|
34 | 33 | /** |
35 | 34 | * Site secret. |
36 | 35 | * @var string |
@@ -63,8 +62,7 @@ discard block |
||
63 | 62 | * @param string $remoteIp User's IP address. |
64 | 63 | * @param string $version Version of this client library. |
65 | 64 | */ |
66 | - public function __construct($secret, $response, $remoteIp = null, $version = null) |
|
67 | - { |
|
65 | + public function __construct($secret, $response, $remoteIp = null, $version = null) { |
|
68 | 66 | $this->secret = $secret; |
69 | 67 | $this->response = $response; |
70 | 68 | $this->remoteIp = $remoteIp; |
@@ -76,8 +74,7 @@ discard block |
||
76 | 74 | * |
77 | 75 | * @return array Array formatted parameters. |
78 | 76 | */ |
79 | - public function toArray() |
|
80 | - { |
|
77 | + public function toArray() { |
|
81 | 78 | $params = array('secret' => $this->secret, 'response' => $this->response); |
82 | 79 | |
83 | 80 | if (!is_null($this->remoteIp)) { |
@@ -96,8 +93,7 @@ discard block |
||
96 | 93 | * |
97 | 94 | * @return string Query string formatted parameters. |
98 | 95 | */ |
99 | - public function toQueryString() |
|
100 | - { |
|
96 | + public function toQueryString() { |
|
101 | 97 | return http_build_query($this->toArray(), '', '&'); |
102 | 98 | } |
103 | 99 | } |
@@ -56,17 +56,17 @@ discard block |
||
56 | 56 | $dl_md5_path = "$dl_path.md5"; |
57 | 57 | $have_md5_file = false; |
58 | 58 | $md5 = md5_file($path); |
59 | - if ($md5 === FALSE) { |
|
59 | + if ($md5 === false) { |
|
60 | 60 | return -2; |
61 | 61 | } |
62 | 62 | $size = filesize($path); |
63 | - if ($size === FALSE) { |
|
63 | + if ($size === false) { |
|
64 | 64 | return -2; |
65 | 65 | } |
66 | 66 | |
67 | 67 | if (file_exists($dl_md5_path)) { |
68 | 68 | $x = file_get_contents($dl_md5_path); |
69 | - if ($x === FALSE) { |
|
69 | + if ($x === false) { |
|
70 | 70 | return -2; |
71 | 71 | } |
72 | 72 | $x = explode(" ", $x); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | if (file_exists($dl_path)) { |
79 | 79 | if ($have_md5_file) { |
80 | 80 | $s = filesize($dl_path); |
81 | - if ($s === FALSE) { |
|
81 | + if ($s === false) { |
|
82 | 82 | return -2; |
83 | 83 | } |
84 | 84 | if ($s == $dl_size && $dl_md5 == $md5) { |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | // missing the .md5 file; need to look at the file |
92 | 92 | // |
93 | 93 | $m = md5_file($dl_path); |
94 | - if ($m === FALSE) { |
|
94 | + if ($m === false) { |
|
95 | 95 | return -2; |
96 | 96 | } |
97 | 97 | if ($m == $md5) { |
98 | - if (file_put_contents($dl_md5_path, "$md5 $size\n") === FALSE) { |
|
98 | + if (file_put_contents($dl_md5_path, "$md5 $size\n") === false) { |
|
99 | 99 | return -2; |
100 | 100 | } |
101 | 101 | return 0; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return -1; |
104 | 104 | } |
105 | 105 | } else { |
106 | - if (file_put_contents($dl_md5_path, "$md5 $size\n") === FALSE) { |
|
106 | + if (file_put_contents($dl_md5_path, "$md5 $size\n") === false) { |
|
107 | 107 | return -2; |
108 | 108 | } |
109 | 109 | return 1; |
@@ -367,7 +367,7 @@ |
||
367 | 367 | $i++; |
368 | 368 | } |
369 | 369 | if ($start === null) { |
370 | - echo "Post $postid not found."; |
|
370 | + echo "post $postid not found."; |
|
371 | 371 | return; |
372 | 372 | } |
373 | 373 | } else if ($logged_in_user && $logged_in_user->prefs->jump_to_unread) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | // return a string for navigating pages |
226 | 226 | // |
227 | -function page_links($url, $nitems, $items_per_page, $start){ |
|
227 | +function page_links($url, $nitems, $items_per_page, $start) { |
|
228 | 228 | // How many pages to potentially show before and after this one: |
229 | 229 | $preshow = 3; |
230 | 230 | $postshow = 3; |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | // If this is not the first page, display "previous" |
239 | 239 | // |
240 | - if ($curpage > 0){ |
|
240 | + if ($curpage > 0) { |
|
241 | 241 | $x .= page_link( |
242 | 242 | $url, $curpage-1, $items_per_page, |
243 | 243 | tra("Previous")." · " |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | } |
255 | 255 | // Display a list of pages surrounding this one |
256 | 256 | // |
257 | - for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){ |
|
257 | + for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++) { |
|
258 | 258 | $page_str = (string)($i+1); |
259 | 259 | if ($i < 0) continue; |
260 | 260 | if ($i >= $npages) break; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } |
276 | 276 | // If there is a next page |
277 | 277 | // |
278 | - if ($curpage < $npages-1){ |
|
278 | + if ($curpage < $npages-1) { |
|
279 | 279 | $x .= page_link( |
280 | 280 | $url, $curpage+1, $items_per_page, |
281 | 281 | " · ".tra("Next") |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | |
503 | 503 | // If the user no longer exists, skip the post |
504 | 504 | // |
505 | - if (!$user){ |
|
505 | + if (!$user) { |
|
506 | 506 | return; |
507 | 507 | } |
508 | 508 | |
@@ -518,9 +518,9 @@ discard block |
||
518 | 518 | // check whether the poster is on the list of people to ignore |
519 | 519 | // |
520 | 520 | $ignore_poster = false; |
521 | - if ($logged_in_user){ |
|
521 | + if ($logged_in_user) { |
|
522 | 522 | $tokens = url_tokens($logged_in_user->authenticator); |
523 | - if (is_ignoring($logged_in_user, $user)){ |
|
523 | + if (is_ignoring($logged_in_user, $user)) { |
|
524 | 524 | $ignore_poster = true; |
525 | 525 | } |
526 | 526 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | |
558 | 558 | // Highlight special users if set in prefs; |
559 | 559 | // |
560 | - if ($logged_in_user && $logged_in_user->prefs){ |
|
560 | + if ($logged_in_user && $logged_in_user->prefs) { |
|
561 | 561 | $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special; |
562 | 562 | } else { |
563 | 563 | $highlight = $is_posted_by_special; |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | echo "<span class=\"small\">"; |
579 | 579 | if ($fstatus) echo "$fstatus"; |
580 | 580 | |
581 | - if (!$filter || !$ignore_poster){ |
|
581 | + if (!$filter || !$ignore_poster) { |
|
582 | 582 | if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) { |
583 | 583 | echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>"; |
584 | 584 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | $user->nposts = BoincPost::count("user=$user->id"); |
595 | 595 | } |
596 | 596 | |
597 | - if (function_exists('project_forum_user_info')){ |
|
597 | + if (function_exists('project_forum_user_info')) { |
|
598 | 598 | project_forum_user_info($user); |
599 | 599 | } else { |
600 | 600 | echo tra("Posts: %1", $user->nposts)."<br>"; |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">"; |
634 | 634 | } |
635 | 635 | |
636 | - if ($logged_in_user && $post->timestamp > $latest_viewed){ |
|
636 | + if ($logged_in_user && $post->timestamp > $latest_viewed) { |
|
637 | 637 | show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT); |
638 | 638 | } |
639 | 639 | |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | if ($post->modified) { |
654 | 654 | echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified)); |
655 | 655 | } |
656 | - if ($ignore_poster && $filter){ |
|
656 | + if ($ignore_poster && $filter) { |
|
657 | 657 | echo "<br>" .tra( |
658 | 658 | "This post is hidden because the sender is on your 'ignore' list. Click %1 here %2 to view hidden posts", |
659 | 659 | "<a href=\"?id=".$thread->id."&filter=false&start=$start#".$post->id."\">", |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | <p> |
668 | 668 | "; |
669 | 669 | |
670 | - if (!$filter || !$ignore_poster){ |
|
670 | + if (!$filter || !$ignore_poster) { |
|
671 | 671 | $posttext = $post->content; |
672 | 672 | |
673 | 673 | // If the creator of this post has a signature and |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | // user has signatures enabled: show it |
676 | 676 | // |
677 | 677 | $posttext = output_transform($posttext, $options); |
678 | - if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){ |
|
678 | + if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) { |
|
679 | 679 | $sig = output_transform($user->prefs->signature, $options); |
680 | 680 | $posttext .= "<hr>$sig\n"; |
681 | 681 | } |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | |
1036 | 1036 | $sql = 'forum = ' . $forumID ; |
1037 | 1037 | $stickysql = ""; |
1038 | - if ($sticky){ |
|
1038 | + if ($sticky) { |
|
1039 | 1039 | $stickysql = "sticky DESC, "; |
1040 | 1040 | } |
1041 | 1041 | if (!$show_hidden) { |
@@ -1116,7 +1116,7 @@ discard block |
||
1116 | 1116 | // |
1117 | 1117 | function show_post_moderation_links( |
1118 | 1118 | $config, $logged_in_user, $post, $forum, $tokens |
1119 | -){ |
|
1119 | +) { |
|
1120 | 1120 | $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban"); |
1121 | 1121 | $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban"); |
1122 | 1122 |
@@ -784,9 +784,9 @@ discard block |
||
784 | 784 | |
785 | 785 | function post_rules() { |
786 | 786 | if (function_exists("project_forum_post_rules")) { |
787 | - $project_rules=project_forum_post_rules(); |
|
787 | + $project_rules=project_forum_post_rules(); |
|
788 | 788 | } else { |
789 | - $project_rules=""; |
|
789 | + $project_rules=""; |
|
790 | 790 | } |
791 | 791 | return sprintf(" |
792 | 792 | <ul> |
@@ -1229,7 +1229,7 @@ discard block |
||
1229 | 1229 | } |
1230 | 1230 | if ($thread->hidden) { |
1231 | 1231 | error_page( |
1232 | - tra("Can't post to a hidden thread.") |
|
1232 | + tra("Can't post to a hidden thread.") |
|
1233 | 1233 | ); |
1234 | 1234 | } |
1235 | 1235 |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | define('THREAD_SOLVED', 1); |
55 | 55 | |
56 | 56 | define('AVATAR_WIDTH', 100); |
57 | -define('AVATAR_HEIGHT',100); |
|
57 | +define('AVATAR_HEIGHT', 100); |
|
58 | 58 | |
59 | 59 | define('ST_NEW_TIME', 1209600); //3600*24*14 - 14 days |
60 | 60 | define('ST_NEW', 'New member'); |
61 | 61 | |
62 | -define('MAXIMUM_EDIT_TIME',3600); |
|
62 | +define('MAXIMUM_EDIT_TIME', 3600); |
|
63 | 63 | // allow edits of forums posts up till one hour after posting. |
64 | 64 | |
65 | 65 | define('MAX_FORUM_LOGGING_TIME', 2419200); //3600*24*28 - 28 days |
@@ -77,24 +77,24 @@ discard block |
||
77 | 77 | define('IMAGE_HIDDEN', 'img/hidden.png'); |
78 | 78 | define('IMAGE_STICKY_LOCKED', 'img/sticky_locked_post.png'); |
79 | 79 | define('IMAGE_POST', 'img/post.png'); |
80 | -define('NEW_IMAGE_HEIGHT','15'); |
|
80 | +define('NEW_IMAGE_HEIGHT', '15'); |
|
81 | 81 | define('EMPHASIZE_IMAGE', 'img/emphasized_post.png'); |
82 | -define('EMPHASIZE_IMAGE_HEIGHT','15'); |
|
82 | +define('EMPHASIZE_IMAGE_HEIGHT', '15'); |
|
83 | 83 | define('FILTER_IMAGE', 'img/filtered_post.png'); |
84 | -define('FILTER_IMAGE_HEIGHT','15'); |
|
84 | +define('FILTER_IMAGE_HEIGHT', '15'); |
|
85 | 85 | define('RATE_POSITIVE_IMAGE', 'img/rate_positive.png'); |
86 | -define('RATE_POSITIVE_IMAGE_HEIGHT','9'); |
|
86 | +define('RATE_POSITIVE_IMAGE_HEIGHT', '9'); |
|
87 | 87 | define('RATE_NEGATIVE_IMAGE', 'img/rate_negative.png'); |
88 | -define('RATE_NEGATIVE_IMAGE_HEIGHT','9'); |
|
88 | +define('RATE_NEGATIVE_IMAGE_HEIGHT', '9'); |
|
89 | 89 | define('REPORT_POST_IMAGE', 'img/report_post.png'); |
90 | -define('REPORT_POST_IMAGE_HEIGHT','9'); |
|
90 | +define('REPORT_POST_IMAGE_HEIGHT', '9'); |
|
91 | 91 | |
92 | 92 | define('SOLUTION', tra('This answered my question')); |
93 | 93 | define('SUFFERER', tra('I also have this question')); |
94 | 94 | define('OFF_TOPIC', tra('Off-topic')); |
95 | 95 | |
96 | -define ('DEFAULT_LOW_RATING_THRESHOLD', -25); |
|
97 | -define ('DEFAULT_HIGH_RATING_THRESHOLD', 5); |
|
96 | +define('DEFAULT_LOW_RATING_THRESHOLD', -25); |
|
97 | +define('DEFAULT_HIGH_RATING_THRESHOLD', 5); |
|
98 | 98 | |
99 | 99 | // special user attributes |
100 | 100 | // |
@@ -164,15 +164,15 @@ discard block |
||
164 | 164 | |
165 | 165 | // Output the forum/thread title. |
166 | 166 | // |
167 | -function show_forum_title($category, $forum, $thread, $link_thread=false) { |
|
167 | +function show_forum_title($category, $forum, $thread, $link_thread = false) { |
|
168 | 168 | if ($category) { |
169 | 169 | $is_helpdesk = $category->is_helpdesk; |
170 | 170 | } else { |
171 | 171 | $is_helpdesk = false; |
172 | 172 | } |
173 | 173 | |
174 | - $where = $is_helpdesk?tra("Questions and Answers"):tra("Message boards"); |
|
175 | - $top_url = $is_helpdesk?"forum_help_desk.php":"forum_index.php"; |
|
174 | + $where = $is_helpdesk ?tra("Questions and Answers") : tra("Message boards"); |
|
175 | + $top_url = $is_helpdesk ? "forum_help_desk.php" : "forum_index.php"; |
|
176 | 176 | |
177 | 177 | if (!$forum && !$thread) { |
178 | 178 | echo "<span class=\"title\">$where</span>\n"; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | } |
202 | 202 | |
203 | -function show_team_forum_title($forum, $thread=null, $link_thread=false) { |
|
203 | +function show_team_forum_title($forum, $thread = null, $link_thread = false) { |
|
204 | 204 | $team = BoincTeam::lookup_id($forum->category); |
205 | 205 | echo "<span class=title> |
206 | 206 | <a href=\"forum_index.php\">".tra("Message boards")."</a> : |
@@ -235,12 +235,12 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | function page_link($url, $page_num, $items_per_page, $text) { |
238 | - return " <a href=\"$url&start=" . $page_num*$items_per_page . "\">$text</a> "; |
|
238 | + return " <a href=\"$url&start=".$page_num*$items_per_page."\">$text</a> "; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | // return a string for navigating pages |
242 | 242 | // |
243 | -function page_links($url, $nitems, $items_per_page, $start){ |
|
243 | +function page_links($url, $nitems, $items_per_page, $start) { |
|
244 | 244 | // How many pages to potentially show before and after this one: |
245 | 245 | $preshow = 3; |
246 | 246 | $postshow = 3; |
@@ -248,14 +248,14 @@ discard block |
||
248 | 248 | $x = ""; |
249 | 249 | |
250 | 250 | if ($nitems <= $items_per_page) return ""; |
251 | - $npages = ceil($nitems / $items_per_page); |
|
252 | - $curpage = ceil($start / $items_per_page); |
|
251 | + $npages = ceil($nitems/$items_per_page); |
|
252 | + $curpage = ceil($start/$items_per_page); |
|
253 | 253 | |
254 | 254 | // If this is not the first page, display "previous" |
255 | 255 | // |
256 | - if ($curpage > 0){ |
|
256 | + if ($curpage > 0) { |
|
257 | 257 | $x .= page_link( |
258 | - $url, $curpage-1, $items_per_page, |
|
258 | + $url, $curpage - 1, $items_per_page, |
|
259 | 259 | tra("Previous")." · " |
260 | 260 | ); |
261 | 261 | } |
@@ -270,8 +270,8 @@ discard block |
||
270 | 270 | } |
271 | 271 | // Display a list of pages surrounding this one |
272 | 272 | // |
273 | - for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){ |
|
274 | - $page_str = (string)($i+1); |
|
273 | + for ($i = $curpage - $preshow; $i <= $curpage + $postshow; $i++) { |
|
274 | + $page_str = (string)($i + 1); |
|
275 | 275 | if ($i < 0) continue; |
276 | 276 | if ($i >= $npages) break; |
277 | 277 | |
@@ -280,20 +280,20 @@ discard block |
||
280 | 280 | } else { |
281 | 281 | $x .= page_link($url, $i, $items_per_page, $page_str); |
282 | 282 | } |
283 | - if ($i == $npages-1) break; |
|
284 | - if ($i == $curpage+$postshow) break; |
|
283 | + if ($i == $npages - 1) break; |
|
284 | + if ($i == $curpage + $postshow) break; |
|
285 | 285 | $x .= " · "; |
286 | 286 | } |
287 | 287 | |
288 | - if ($curpage + $postshow < $npages-1) { |
|
288 | + if ($curpage + $postshow < $npages - 1) { |
|
289 | 289 | $x .= " . . . "; |
290 | - $x .= page_link($url, $npages-1, $items_per_page, $npages); |
|
290 | + $x .= page_link($url, $npages - 1, $items_per_page, $npages); |
|
291 | 291 | } |
292 | 292 | // If there is a next page |
293 | 293 | // |
294 | - if ($curpage < $npages-1){ |
|
294 | + if ($curpage < $npages - 1) { |
|
295 | 295 | $x .= page_link( |
296 | - $url, $curpage+1, $items_per_page, |
|
296 | + $url, $curpage + 1, $items_per_page, |
|
297 | 297 | " · ".tra("Next") |
298 | 298 | ); |
299 | 299 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | function cleanup_title($title) { |
315 | 315 | $x = sanitize_tags(bb2html($title)); |
316 | 316 | $x = trim($x); |
317 | - if (strlen($x)==0) return "(no title)"; |
|
317 | + if (strlen($x) == 0) return "(no title)"; |
|
318 | 318 | else return $x; |
319 | 319 | } |
320 | 320 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $i = 0; |
377 | 377 | foreach ($posts as $post) { |
378 | 378 | if ($post->id == $postid) { |
379 | - $start = $i - ($i % $num_to_show); |
|
379 | + $start = $i - ($i%$num_to_show); |
|
380 | 380 | $jump_to_post = $post; |
381 | 381 | break; |
382 | 382 | } |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | // if jump to post, figure out what page to show |
404 | 404 | // |
405 | 405 | if ($jump_to_post) { |
406 | - $start = $ibest - ($ibest % $num_to_show); |
|
406 | + $start = $ibest - ($ibest%$num_to_show); |
|
407 | 407 | } else { |
408 | 408 | $start = $default_start; |
409 | 409 | } |
@@ -505,8 +505,8 @@ discard block |
||
505 | 505 | // Generates a table row with two cells: author and message |
506 | 506 | // |
507 | 507 | function show_post( |
508 | - $post, $thread, $forum, $logged_in_user, $start=0, |
|
509 | - $latest_viewed=0, $controls=FORUM_CONTROLS, $filter=true |
|
508 | + $post, $thread, $forum, $logged_in_user, $start = 0, |
|
509 | + $latest_viewed = 0, $controls = FORUM_CONTROLS, $filter = true |
|
510 | 510 | ) { |
511 | 511 | global $country_to_iso3166_2; |
512 | 512 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | // If the user no longer exists, skip the post |
520 | 520 | // |
521 | - if (!$user){ |
|
521 | + if (!$user) { |
|
522 | 522 | return; |
523 | 523 | } |
524 | 524 | |
@@ -534,9 +534,9 @@ discard block |
||
534 | 534 | // check whether the poster is on the list of people to ignore |
535 | 535 | // |
536 | 536 | $ignore_poster = false; |
537 | - if ($logged_in_user){ |
|
537 | + if ($logged_in_user) { |
|
538 | 538 | $tokens = url_tokens($logged_in_user->authenticator); |
539 | - if (is_ignoring($logged_in_user, $user)){ |
|
539 | + if (is_ignoring($logged_in_user, $user)) { |
|
540 | 540 | $ignore_poster = true; |
541 | 541 | } |
542 | 542 | } |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | if (is_moderator($logged_in_user, $forum)) { |
551 | 551 | $can_edit = true; |
552 | 552 | } else if (can_reply($thread, $forum, $logged_in_user)) { |
553 | - $time_limit = $post->timestamp+MAXIMUM_EDIT_TIME; |
|
554 | - $can_edit = time()<$time_limit; |
|
553 | + $time_limit = $post->timestamp + MAXIMUM_EDIT_TIME; |
|
554 | + $can_edit = time() < $time_limit; |
|
555 | 555 | } else { |
556 | 556 | $can_edit = false; |
557 | 557 | } |
@@ -561,24 +561,24 @@ discard block |
||
561 | 561 | // Print the special user lines, if any |
562 | 562 | // |
563 | 563 | global $special_user_bitfield; |
564 | - $fstatus=""; |
|
564 | + $fstatus = ""; |
|
565 | 565 | $keys = array_keys($special_user_bitfield); |
566 | 566 | $is_posted_by_special = false; |
567 | - for ($i=0; $i<sizeof($special_user_bitfield);$i++) { |
|
567 | + for ($i = 0; $i < sizeof($special_user_bitfield); $i++) { |
|
568 | 568 | if ($user->prefs && $user->prefs->privilege($keys[$i])) { |
569 | - $fstatus.=$special_user_bitfield[$keys[$i]]."<br>"; |
|
569 | + $fstatus .= $special_user_bitfield[$keys[$i]]."<br>"; |
|
570 | 570 | $is_posted_by_special = true; |
571 | 571 | } |
572 | 572 | } |
573 | 573 | |
574 | 574 | // Highlight special users if set in prefs; |
575 | 575 | // |
576 | - if ($logged_in_user && $logged_in_user->prefs){ |
|
576 | + if ($logged_in_user && $logged_in_user->prefs) { |
|
577 | 577 | $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special; |
578 | 578 | } else { |
579 | 579 | $highlight = $is_posted_by_special; |
580 | 580 | } |
581 | - $class = $highlight?' style="border-left: 5px solid LightGreen" ':''; |
|
581 | + $class = $highlight ? ' style="border-left: 5px solid LightGreen" ' : ''; |
|
582 | 582 | |
583 | 583 | // row and start of author col |
584 | 584 | // |
@@ -590,12 +590,12 @@ discard block |
||
590 | 590 | |
591 | 591 | echo user_links($user, 0); |
592 | 592 | echo "<br>"; |
593 | - if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW."<br>"; |
|
593 | + if ($user->create_time > time() - ST_NEW_TIME) $fstatus .= ST_NEW."<br>"; |
|
594 | 594 | echo "<span class=\"small\">"; |
595 | 595 | if ($fstatus) echo "$fstatus"; |
596 | 596 | |
597 | - if (!$filter || !$ignore_poster){ |
|
598 | - if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) { |
|
597 | + if (!$filter || !$ignore_poster) { |
|
598 | + if ($user->prefs && $user->prefs->avatar != "" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars == false))) { |
|
599 | 599 | echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>"; |
600 | 600 | } |
601 | 601 | } |
@@ -603,14 +603,14 @@ discard block |
||
603 | 603 | |
604 | 604 | $url = "pm.php?action=new&userid=".$user->id; |
605 | 605 | $name = $user->name; |
606 | - show_button_small($url, tra("Send message"), tra("Send %1 a private message",$name)); |
|
606 | + show_button_small($url, tra("Send message"), tra("Send %1 a private message", $name)); |
|
607 | 607 | echo '<br>'.tra("Joined: %1", gmdate('j M y', $user->create_time)), "<br>"; |
608 | 608 | |
609 | 609 | if (!isset($user->nposts)) { |
610 | 610 | $user->nposts = BoincPost::count("user=$user->id"); |
611 | 611 | } |
612 | 612 | |
613 | - if (function_exists('project_forum_user_info')){ |
|
613 | + if (function_exists('project_forum_user_info')) { |
|
614 | 614 | project_forum_user_info($user); |
615 | 615 | } else { |
616 | 616 | echo tra("Posts: %1", $user->nposts)."<br>"; |
@@ -619,8 +619,8 @@ discard block |
||
619 | 619 | // |
620 | 620 | //echo "ID: ".$user->id."<br>"; |
621 | 621 | if (!NO_COMPUTING) { |
622 | - echo tra("Credit: %1", number_format($user->total_credit)) ."<br>"; |
|
623 | - echo tra("RAC: %1", number_format($user->expavg_credit))."<br>"; |
|
622 | + echo tra("Credit: %1", number_format($user->total_credit))."<br>"; |
|
623 | + echo tra("RAC: %1", number_format($user->expavg_credit))."<br>"; |
|
624 | 624 | } |
625 | 625 | |
626 | 626 | // to use this feature: |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">"; |
650 | 650 | } |
651 | 651 | |
652 | - if ($logged_in_user && $post->timestamp > $latest_viewed){ |
|
652 | + if ($logged_in_user && $post->timestamp > $latest_viewed) { |
|
653 | 653 | show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT); |
654 | 654 | } |
655 | 655 | |
@@ -669,8 +669,8 @@ discard block |
||
669 | 669 | if ($post->modified) { |
670 | 670 | echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified)); |
671 | 671 | } |
672 | - if ($ignore_poster && $filter){ |
|
673 | - echo "<br>" .tra( |
|
672 | + if ($ignore_poster && $filter) { |
|
673 | + echo "<br>".tra( |
|
674 | 674 | "This post is hidden because the sender is on your 'ignore' list. Click %1 here %2 to view hidden posts", |
675 | 675 | "<a href=\"?id=".$thread->id."&filter=false&start=$start#".$post->id."\">", |
676 | 676 | "</a>" |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | <p> |
684 | 684 | "; |
685 | 685 | |
686 | - if (!$filter || !$ignore_poster){ |
|
686 | + if (!$filter || !$ignore_poster) { |
|
687 | 687 | $posttext = $post->content; |
688 | 688 | |
689 | 689 | // If the creator of this post has a signature and |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | // user has signatures enabled: show it |
692 | 692 | // |
693 | 693 | $posttext = output_transform($posttext, $options); |
694 | - if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){ |
|
694 | + if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) { |
|
695 | 695 | $sig = output_transform($user->prefs->signature, $options); |
696 | 696 | $posttext .= "<hr>$sig\n"; |
697 | 697 | } |
@@ -725,10 +725,10 @@ discard block |
||
725 | 725 | } |
726 | 726 | if (($controls == FORUM_CONTROLS) && (can_reply($thread, $forum, $logged_in_user))) { |
727 | 727 | echo " "; |
728 | - $url = "forum_reply.php?thread=" . $thread->id . "&post=" . $post->id . "&no_quote=1#input"; |
|
728 | + $url = "forum_reply.php?thread=".$thread->id."&post=".$post->id."&no_quote=1#input"; |
|
729 | 729 | // "Reply" is used as a verb |
730 | 730 | show_button($url, tra("Reply"), tra("Post a reply to this message")); |
731 | - $url = "forum_reply.php?thread=" . $thread->id . "&post=" . $post->id . "#input"; |
|
731 | + $url = "forum_reply.php?thread=".$thread->id."&post=".$post->id."#input"; |
|
732 | 732 | // "Quote" is used as a verb |
733 | 733 | show_button($url, tra("Quote"), tra("Post a reply by quoting this message")); |
734 | 734 | } |
@@ -800,9 +800,9 @@ discard block |
||
800 | 800 | |
801 | 801 | function post_rules() { |
802 | 802 | if (function_exists("project_forum_post_rules")) { |
803 | - $project_rules=project_forum_post_rules(); |
|
803 | + $project_rules = project_forum_post_rules(); |
|
804 | 804 | } else { |
805 | - $project_rules=""; |
|
805 | + $project_rules = ""; |
|
806 | 806 | } |
807 | 807 | return sprintf(" |
808 | 808 | <ul> |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | ); |
832 | 832 | } |
833 | 833 | |
834 | -function post_warning($forum=null) { |
|
834 | +function post_warning($forum = null) { |
|
835 | 835 | $x = "<br><br> |
836 | 836 | <table><tr><td align=left> |
837 | 837 | "; |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | $content = substr($content, 0, 64000); |
892 | 892 | $content = BoincDb::escape_string($content); |
893 | 893 | $now = time(); |
894 | - $sig = $signature?1:0; |
|
894 | + $sig = $signature ? 1 : 0; |
|
895 | 895 | $id = BoincPost::insert("(thread, user, timestamp, content, modified, parent_post, score, votes, signature, hidden) values ($thread->id, $user->id, $now, '$content', 0, $parent_id, 0, 0, $sig, 0)"); |
896 | 896 | if (!$id) { |
897 | 897 | $forum_error = "Failed to add post to DB."; |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | // |
912 | 912 | function update_thread_timestamp($thread) { |
913 | 913 | $posts = BoincPost::enum("thread=$thread->id and hidden=0 order by timestamp desc limit 1"); |
914 | - if (count($posts)>0) { |
|
914 | + if (count($posts) > 0) { |
|
915 | 915 | $post = $posts[0]; |
916 | 916 | $thread->update("timestamp=$post->timestamp"); |
917 | 917 | } |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | |
920 | 920 | function update_forum_timestamp($forum) { |
921 | 921 | $threads = BoincThread::enum("forum=$forum->id and hidden=0 order by timestamp desc limit 1"); |
922 | - if (count($threads)>0) { |
|
922 | + if (count($threads) > 0) { |
|
923 | 923 | $thread = $threads[0]; |
924 | 924 | $forum->update("timestamp=$thread->timestamp"); |
925 | 925 | } |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | if (is_news_forum($forum) && !$export) { |
943 | 943 | $status = 1; |
944 | 944 | } |
945 | - $id = BoincThread::insert("(forum, owner, status, title, timestamp, views, replies, activity, sufferers, score, votes, create_time, hidden, sticky, locked) values ($forum->id, $user->id, $status, '$title', $now, 0, -1, 0, 0, 0, 0, $now, 0, 0, 0)"); |
|
945 | + $id = BoincThread::insert("(forum, owner, status, title, timestamp, views, replies, activity, sufferers, score, votes, create_time, hidden, sticky, locked) values ($forum->id, $user->id, $status, '$title', $now, 0, -1, 0, 0, 0, 0, $now, 0, 0, 0)"); |
|
946 | 946 | if (!$id) { |
947 | 947 | $forum_error = "Failed to add thread to DB."; |
948 | 948 | return null; |
@@ -1070,22 +1070,22 @@ discard block |
||
1070 | 1070 | // $sticky - bool (not directly passed to SQL) |
1071 | 1071 | // |
1072 | 1072 | function get_forum_threads( |
1073 | - $forumID, $start=-1, $nRec=-1, $sort_style=MODIFIED_NEW, |
|
1073 | + $forumID, $start = -1, $nRec = -1, $sort_style = MODIFIED_NEW, |
|
1074 | 1074 | $show_hidden = 0, $sticky = 1 |
1075 | 1075 | ) { |
1076 | 1076 | //if (! (is_numeric($forumID) && is_numeric($min) && is_numeric($nRec))) { |
1077 | 1077 | // return NULL; // Something is wrong here. |
1078 | 1078 | //} |
1079 | 1079 | |
1080 | - $sql = 'forum = ' . $forumID ; |
|
1080 | + $sql = 'forum = '.$forumID; |
|
1081 | 1081 | $stickysql = ""; |
1082 | - if ($sticky){ |
|
1082 | + if ($sticky) { |
|
1083 | 1083 | $stickysql = "sticky DESC, "; |
1084 | 1084 | } |
1085 | 1085 | if (!$show_hidden) { |
1086 | 1086 | $sql .= ' AND hidden = 0'; |
1087 | 1087 | } |
1088 | - switch($sort_style) { |
|
1088 | + switch ($sort_style) { |
|
1089 | 1089 | case MODIFIED_NEW: |
1090 | 1090 | $sql .= ' ORDER BY '.$stickysql.'timestamp DESC'; |
1091 | 1091 | break; |
@@ -1138,7 +1138,7 @@ discard block |
||
1138 | 1138 | if (!$show_hidden) { |
1139 | 1139 | $sql .= ' AND hidden = 0'; |
1140 | 1140 | } |
1141 | - switch($sort_style) { |
|
1141 | + switch ($sort_style) { |
|
1142 | 1142 | case CREATE_TIME_NEW: |
1143 | 1143 | $sql .= ' ORDER BY timestamp desc'; |
1144 | 1144 | break; |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | // |
1161 | 1161 | function show_post_moderation_links( |
1162 | 1162 | $config, $logged_in_user, $post, $forum, $tokens |
1163 | -){ |
|
1163 | +) { |
|
1164 | 1164 | $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban"); |
1165 | 1165 | $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban"); |
1166 | 1166 | |
@@ -1247,14 +1247,14 @@ discard block |
||
1247 | 1247 | // We do not tell the (ab)user how much this is - |
1248 | 1248 | // no need to make it easy for them to break the system. |
1249 | 1249 | // |
1250 | - if ($user->total_credit<$forum->post_min_total_credit || $user->expavg_credit<$forum->post_min_expavg_credit) { |
|
1250 | + if ($user->total_credit < $forum->post_min_total_credit || $user->expavg_credit < $forum->post_min_expavg_credit) { |
|
1251 | 1251 | error_page(tra("To create a new thread in %1 you must have a certain level of average credit. This is to protect against abuse of the system.", $forum->title)); |
1252 | 1252 | } |
1253 | 1253 | |
1254 | 1254 | // If the user is posting faster than forum regulations allow |
1255 | 1255 | // Tell the user to wait a while before creating any more posts |
1256 | 1256 | // |
1257 | - if (time()-$user->prefs->last_post <$forum->post_min_interval) { |
|
1257 | + if (time() - $user->prefs->last_post < $forum->post_min_interval) { |
|
1258 | 1258 | error_page(tra("You cannot create threads right now. Please wait before trying again. This is to protect against abuse of the system.")); |
1259 | 1259 | } |
1260 | 1260 | } |
@@ -1282,7 +1282,7 @@ discard block |
||
1282 | 1282 | |
1283 | 1283 | function is_moderator($user, $forum) { |
1284 | 1284 | if (!$user) return false; |
1285 | - $type = $forum?$forum->parent_type:0; |
|
1285 | + $type = $forum ? $forum->parent_type : 0; |
|
1286 | 1286 | switch ($type) { |
1287 | 1287 | case 0: |
1288 | 1288 | if ($user->prefs->privilege(S_MODERATOR)) return true; |
@@ -1319,7 +1319,7 @@ discard block |
||
1319 | 1319 | if (!is_forum_visible_to_user($thread_forum, $user)) return; |
1320 | 1320 | $owner = BoincUser::lookup_id($thread->owner); |
1321 | 1321 | echo "<tr><td>\n"; |
1322 | - switch($thread_forum->parent_type) { |
|
1322 | + switch ($thread_forum->parent_type) { |
|
1323 | 1323 | case 0: |
1324 | 1324 | $category = BoincCategory::lookup_id($thread_forum->category); |
1325 | 1325 | show_forum_title($category, $thread_forum, $thread, true); |
@@ -1329,7 +1329,7 @@ discard block |
||
1329 | 1329 | break; |
1330 | 1330 | } |
1331 | 1331 | echo ' |
1332 | - </td><td class="numbers">'.($thread->replies+1).'</td> |
|
1332 | + </td><td class="numbers">'.($thread->replies + 1).'</td> |
|
1333 | 1333 | <td>'.user_links($owner).'</td> |
1334 | 1334 | <td class="numbers">'.$thread->views.'</td> |
1335 | 1335 | <td class="lastpost">'.time_diff_str($thread->timestamp, time()).'</td> |
@@ -1363,13 +1363,13 @@ discard block |
||
1363 | 1363 | |
1364 | 1364 | function subscribed_post_web_line($notify) { |
1365 | 1365 | $thread = BoincThread::lookup_id($notify->opaque); |
1366 | - return tra("New posts in the thread %1","<a href=forum_thread.php?id=$thread->id>$thread->title</a>"); |
|
1366 | + return tra("New posts in the thread %1", "<a href=forum_thread.php?id=$thread->id>$thread->title</a>"); |
|
1367 | 1367 | } |
1368 | 1368 | |
1369 | 1369 | function subscribe_rss($notify, &$title, &$msg, &$url) { |
1370 | 1370 | $thread = BoincThread::lookup_id($notify->opaque); |
1371 | 1371 | $title = tra("New posts in subscribed thread"); |
1372 | - $msg = tra("There are new posts in the thread '%1'",$thread->title); |
|
1372 | + $msg = tra("There are new posts in the thread '%1'", $thread->title); |
|
1373 | 1373 | $url = secure_url_base()."forum_thread.php?id=$thread->id"; |
1374 | 1374 | } |
1375 | 1375 |
@@ -500,9 +500,9 @@ discard block |
||
500 | 500 | // @return String A human readable error message |
501 | 501 | // @param Integer $x An error number |
502 | 502 | // |
503 | -function windows_error_code_str($x){ |
|
503 | +function windows_error_code_str($x) { |
|
504 | 504 | $h=int2hex($x); |
505 | - switch($h){ |
|
505 | + switch($h) { |
|
506 | 506 | case "0xC0000005": return "STATUS_ACCESS_VIOLATION"; |
507 | 507 | case "0xC000001D": return "STATUS_ILLEGAL_INSTRUCTION"; |
508 | 508 | case "0xC0000094": return "STATUS_INTEGER_DIVIDE_BY_ZERO"; |
@@ -523,10 +523,10 @@ discard block |
||
523 | 523 | // @return String A human readable error message |
524 | 524 | // @param Integer $x An error number |
525 | 525 | // |
526 | -function error_code_str($x){ |
|
526 | +function error_code_str($x) { |
|
527 | 527 | // severe Windows error numbers are always large negative integers |
528 | 528 | if ($x<-400) return windows_error_code_str($x); |
529 | - switch($x){ |
|
529 | + switch($x) { |
|
530 | 530 | case 0: return ""; |
531 | 531 | case 192: return "EXIT_STATEFILE_WRITE"; |
532 | 532 | case 193: return "EXIT_SIGNAL"; |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | return $platforms[$id]; |
54 | 54 | } |
55 | 55 | |
56 | -function anon_platform_string($result, $rsc_name=null) { |
|
56 | +function anon_platform_string($result, $rsc_name = null) { |
|
57 | 57 | $app = get_app($result->appid); |
58 | - $n = $app->user_friendly_name."<br>". tra("Anonymous platform"); |
|
58 | + $n = $app->user_friendly_name."<br>".tra("Anonymous platform"); |
|
59 | 59 | if ($rsc_name) { |
60 | 60 | $n .= " ($rsc_name)"; |
61 | 61 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | return $string_to_show; |
98 | 98 | } |
99 | 99 | if ($result->server_state <> RESULT_SERVER_STATE_OVER) return "---"; |
100 | - switch($result->outcome) { |
|
100 | + switch ($result->outcome) { |
|
101 | 101 | case RESULT_OUTCOME_SUCCESS: |
102 | 102 | switch ($result->validate_state) { |
103 | 103 | case VALIDATE_STATE_INIT: |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | ) { |
213 | 213 | return tra("Not started by deadline - canceled"); |
214 | 214 | } |
215 | - switch($result->client_state) { |
|
215 | + switch ($result->client_state) { |
|
216 | 216 | case RESULT_FILES_DOWNLOADING: return tra("Error while downloading"); |
217 | 217 | case RESULT_FILES_DOWNLOADED: |
218 | 218 | case RESULT_COMPUTE_ERROR: return tra("Error while computing"); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | function result_server_state_string($result) { |
234 | - switch($result->server_state) { |
|
234 | + switch ($result->server_state) { |
|
235 | 235 | case RESULT_SERVER_STATE_INACTIVE: return tra("Inactive"); |
236 | 236 | case RESULT_SERVER_STATE_UNSENT: return tra("Unsent"); |
237 | 237 | case RESULT_SERVER_STATE_IN_PROGRESS: return tra("In progress"); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | function result_outcome_string($result) { |
244 | - switch($result->outcome) { |
|
244 | + switch ($result->outcome) { |
|
245 | 245 | case RESULT_OUTCOME_INIT: return "---"; |
246 | 246 | case RESULT_OUTCOME_SUCCESS: return tra("Success"); |
247 | 247 | case RESULT_OUTCOME_COULDNT_SEND: return tra("Couldn't send"); |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | function result_client_state_string($result) { |
262 | - switch($result->client_state) { |
|
262 | + switch ($result->client_state) { |
|
263 | 263 | case RESULT_NEW: return tra("New"); |
264 | 264 | case RESULT_FILES_DOWNLOADING: return tra("Downloading"); |
265 | 265 | case RESULT_FILES_DOWNLOADED: return tra("Processing"); |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | } |
278 | 278 | |
279 | 279 | function validate_state_str($result) { |
280 | - switch($result->validate_state) { |
|
280 | + switch ($result->validate_state) { |
|
281 | 281 | case VALIDATE_STATE_INIT: return tra("Initial"); |
282 | 282 | case VALIDATE_STATE_VALID: return tra("Valid"); |
283 | 283 | case VALIDATE_STATE_INVALID: |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | function assimilate_state_str($s) { |
296 | - switch($s) { |
|
296 | + switch ($s) { |
|
297 | 297 | case ASSIMILATE_INIT: return "Initial"; |
298 | 298 | case ASSIMILATE_READY: return "Ready to assimilate"; |
299 | 299 | case ASSIMILATE_DONE: return "Assimilated"; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | } |
303 | 303 | |
304 | 304 | function file_delete_state_str($s) { |
305 | - switch($s) { |
|
305 | + switch ($s) { |
|
306 | 306 | case FILE_DELETE_INIT: return "Initial"; |
307 | 307 | case FILE_DELETE_READY: return "Ready to delete"; |
308 | 308 | case FILE_DELETE_DONE: return "Deleted"; |
@@ -312,27 +312,27 @@ discard block |
||
312 | 312 | } |
313 | 313 | function wu_error_mask_str($s) { |
314 | 314 | $x = ""; |
315 | - if ($s & WU_ERROR_COULDNT_SEND_RESULT) { |
|
315 | + if ($s&WU_ERROR_COULDNT_SEND_RESULT) { |
|
316 | 316 | $x = $x." ".tra("Couldn't send result"); |
317 | 317 | $s -= WU_ERROR_COULDNT_SEND_RESULT; |
318 | 318 | } |
319 | - if ($s & WU_ERROR_TOO_MANY_ERROR_RESULTS) { |
|
319 | + if ($s&WU_ERROR_TOO_MANY_ERROR_RESULTS) { |
|
320 | 320 | $x = $x." ".tra("Too many errors (may have bug)"); |
321 | 321 | $s -= WU_ERROR_TOO_MANY_ERROR_RESULTS; |
322 | 322 | } |
323 | - if ($s & WU_ERROR_TOO_MANY_SUCCESS_RESULTS) { |
|
323 | + if ($s&WU_ERROR_TOO_MANY_SUCCESS_RESULTS) { |
|
324 | 324 | $x = $x." ".tra("Too many results (may be nondeterministic)"); |
325 | 325 | $s -= WU_ERROR_TOO_MANY_SUCCESS_RESULTS; |
326 | 326 | } |
327 | - if ($s & WU_ERROR_TOO_MANY_TOTAL_RESULTS) { |
|
327 | + if ($s&WU_ERROR_TOO_MANY_TOTAL_RESULTS) { |
|
328 | 328 | $x = $x." ".tra("Too many total results"); |
329 | 329 | $s -= WU_ERROR_TOO_MANY_TOTAL_RESULTS; |
330 | 330 | } |
331 | - if ($s & WU_ERROR_CANCELLED) { |
|
331 | + if ($s&WU_ERROR_CANCELLED) { |
|
332 | 332 | $x = $x." ".tra("WU cancelled"); |
333 | 333 | $s -= WU_ERROR_CANCELLED; |
334 | 334 | } |
335 | - if ($s & WU_ERROR_NO_CANONICAL_RESULT) { |
|
335 | + if ($s&WU_ERROR_NO_CANONICAL_RESULT) { |
|
336 | 336 | $x = $x." ".tra("Canonical result is missing"); |
337 | 337 | $s -= WU_ERROR_NO_CANONICAL_RESULT; |
338 | 338 | } |
@@ -340,9 +340,9 @@ discard block |
||
340 | 340 | $x = $x." ".tra("Unrecognized Error: %1", $s); |
341 | 341 | } |
342 | 342 | if (strlen($x)) { |
343 | - $x="<font color=\"#ff3333\">".$x."</font>"; |
|
343 | + $x = "<font color=\"#ff3333\">".$x."</font>"; |
|
344 | 344 | } else { |
345 | - $x=""; |
|
345 | + $x = ""; |
|
346 | 346 | } |
347 | 347 | return $x; |
348 | 348 | } |
@@ -426,10 +426,10 @@ discard block |
||
426 | 426 | if ($result->received_time) { |
427 | 427 | $r = time_str($result->received_time); |
428 | 428 | } else if ($result->report_deadline) { |
429 | - if ($result->report_deadline>time()) { |
|
430 | - $r = "<font color='#33cc33'>" . time_str($result->report_deadline) . "</font>"; |
|
429 | + if ($result->report_deadline > time()) { |
|
430 | + $r = "<font color='#33cc33'>".time_str($result->report_deadline)."</font>"; |
|
431 | 431 | } else { |
432 | - $r = "<font color='#ff3333'>" . time_str($result->report_deadline) . "</font>"; |
|
432 | + $r = "<font color='#ff3333'>".time_str($result->report_deadline)."</font>"; |
|
433 | 433 | } |
434 | 434 | } else { |
435 | 435 | $r = "---"; |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | // @param Integer $dec A signed integer |
491 | 491 | // |
492 | 492 | function int2hex($dec) { |
493 | - return "0x".strtoupper(substr(sprintf("%08x",$dec), -8)); |
|
493 | + return "0x".strtoupper(substr(sprintf("%08x", $dec), -8)); |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | // Decode a windows error number into semi-human-readable, |
@@ -500,9 +500,9 @@ discard block |
||
500 | 500 | // @return String A human readable error message |
501 | 501 | // @param Integer $x An error number |
502 | 502 | // |
503 | -function windows_error_code_str($x){ |
|
504 | - $h=int2hex($x); |
|
505 | - switch($h){ |
|
503 | +function windows_error_code_str($x) { |
|
504 | + $h = int2hex($x); |
|
505 | + switch ($h) { |
|
506 | 506 | case "0xC0000005": return "STATUS_ACCESS_VIOLATION"; |
507 | 507 | case "0xC000001D": return "STATUS_ILLEGAL_INSTRUCTION"; |
508 | 508 | case "0xC0000094": return "STATUS_INTEGER_DIVIDE_BY_ZERO"; |
@@ -523,10 +523,10 @@ discard block |
||
523 | 523 | // @return String A human readable error message |
524 | 524 | // @param Integer $x An error number |
525 | 525 | // |
526 | -function error_code_str($x){ |
|
526 | +function error_code_str($x) { |
|
527 | 527 | // severe Windows error numbers are always large negative integers |
528 | - if ($x<-400) return windows_error_code_str($x); |
|
529 | - switch($x){ |
|
528 | + if ($x < -400) return windows_error_code_str($x); |
|
529 | + switch ($x) { |
|
530 | 530 | case 0: return ""; |
531 | 531 | case 192: return "EXIT_STATEFILE_WRITE"; |
532 | 532 | case 193: return "EXIT_SIGNAL"; |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | return $x." (".int2hex($x).") ".error_code_str($x); |
688 | 688 | } |
689 | 689 | |
690 | -function show_result($result, $show_outfile_links=false) { |
|
690 | +function show_result($result, $show_outfile_links = false) { |
|
691 | 691 | start_table(); |
692 | 692 | row2(tra("Name"), $result->name); |
693 | 693 | row2(tra("Workunit"), "<a href=\"workunit.php?wuid=$result->workunitid\">$result->workunitid</a>"); |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | echo "<h3>".tra("Stderr output")."</h3> <pre>" |
737 | 737 | .htmlspecialchars( |
738 | 738 | $result->stderr_out, |
739 | - ENT_QUOTES | (defined('ENT_SUBSTITUTE')?ENT_SUBSTITUTE:0), |
|
739 | + ENT_QUOTES|(defined('ENT_SUBSTITUTE') ?ENT_SUBSTITUTE:0), |
|
740 | 740 | 'utf-8' |
741 | 741 | ) |
742 | 742 | ."</pre>" |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | |
752 | 752 | $apps = BoincApp::enum('deprecated=0 ORDER BY user_friendly_name'); |
753 | 753 | |
754 | - for ($i=0; $i<NSTATES; $i++) { |
|
754 | + for ($i = 0; $i < NSTATES; $i++) { |
|
755 | 755 | $state_count[$i] = 0; |
756 | 756 | } |
757 | 757 | foreach ($apps as $app) { |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $x .= "<a href=$url>".tra("Next")." ".$info->results_per_page."</a>"; |
794 | 794 | } |
795 | 795 | $x .= "<br>".tra("State").": "; |
796 | - for ($i=0; $i<NSTATES; $i++) { |
|
796 | + for ($i = 0; $i < NSTATES; $i++) { |
|
797 | 797 | if ($i) $x .= " · "; |
798 | 798 | if ($info->state == $i) { |
799 | 799 | $x .= $state_name[$i]; |
@@ -838,6 +838,6 @@ discard block |
||
838 | 838 | return $x; |
839 | 839 | } |
840 | 840 | |
841 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
841 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
842 | 842 | |
843 | 843 | ?> |
@@ -183,15 +183,15 @@ discard block |
||
183 | 183 | </ol>", PROJECT); |
184 | 184 | } |
185 | 185 | |
186 | -function project_workunit($wu){ |
|
186 | +function project_workunit($wu) { |
|
187 | 187 | // shown in the workunit page |
188 | 188 | } |
189 | 189 | |
190 | -function project_user_summary($user){ |
|
190 | +function project_user_summary($user) { |
|
191 | 191 | // shown in the user summary page |
192 | 192 | } |
193 | 193 | |
194 | -function project_user_page_private($user){ |
|
194 | +function project_user_page_private($user) { |
|
195 | 195 | // shown in the private account page |
196 | 196 | } |
197 | 197 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)), |
259 | 259 | ); |
260 | 260 | |
261 | -function project_user_credit($user){ |
|
261 | +function project_user_credit($user) { |
|
262 | 262 | global $sub_projects; |
263 | 263 | foreach ($sub_projects as $sp) { |
264 | 264 | show_app_credit_user($user, $sp["name"], $sp["appids"]); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | define("FORUM_QA_MERGED_MODE", true); |
50 | 50 | // Set to true to merge Message boards and Q&A section |
51 | -define ("DISABLE_PROFILES", true); |
|
51 | +define("DISABLE_PROFILES", true); |
|
52 | 52 | // enable profiles only after enabling reCAPTCHA |
53 | 53 | // https://boinc.berkeley.edu/trac/wiki/ProtectionFromSpam |
54 | 54 | define("USE_STOPFORUMSPAM", true); |
@@ -183,15 +183,15 @@ discard block |
||
183 | 183 | </ol>", PROJECT); |
184 | 184 | } |
185 | 185 | |
186 | -function project_workunit($wu){ |
|
186 | +function project_workunit($wu) { |
|
187 | 187 | // shown in the workunit page |
188 | 188 | } |
189 | 189 | |
190 | -function project_user_summary($user){ |
|
190 | +function project_user_summary($user) { |
|
191 | 191 | // shown in the user summary page |
192 | 192 | } |
193 | 193 | |
194 | -function project_user_page_private($user){ |
|
194 | +function project_user_page_private($user) { |
|
195 | 195 | // shown in the private account page |
196 | 196 | } |
197 | 197 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)), |
259 | 259 | ); |
260 | 260 | |
261 | -function project_user_credit($user){ |
|
261 | +function project_user_credit($user) { |
|
262 | 262 | global $sub_projects; |
263 | 263 | foreach ($sub_projects as $sp) { |
264 | 264 | show_app_credit_user($user, $sp["name"], $sp["appids"]); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | */ |
6 | 6 | function work_and_host_stats_default_page_manager_pages() { |
7 | 7 | $page = new stdClass; |
8 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
8 | + $page->disabled = false; /* Edit this to true to make a default page disabled initially */ |
|
9 | 9 | $page->api_version = 1; |
10 | 10 | $page->name = 'page_stats'; |
11 | 11 | $page->task = 'page'; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $page->path = 'community/stats'; |
15 | 15 | $page->access = array( |
16 | 16 | 'type' => 'none', |
17 | - 'settings' => NULL, |
|
17 | + 'settings' => null, |
|
18 | 18 | ); |
19 | 19 | $page->menu = array( |
20 | 20 | 'type' => 'normal', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $page->conf = array(); |
33 | 33 | $page->default_handlers = array(); |
34 | 34 | $handler = new stdClass; |
35 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
35 | + $handler->disabled = false; /* Edit this to true to make a default handler disabled initially */ |
|
36 | 36 | $handler->api_version = 1; |
37 | 37 | $handler->name = 'page_page_stats_panel_context'; |
38 | 38 | $handler->task = 'page'; |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | $display->layout_settings = array(); |
54 | 54 | $display->panel_settings = array( |
55 | 55 | 'style_settings' => array( |
56 | - 'default' => NULL, |
|
57 | - 'middle' => NULL, |
|
56 | + 'default' => null, |
|
57 | + 'middle' => null, |
|
58 | 58 | ), |
59 | 59 | ); |
60 | 60 | $display->cache = array(); |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | $pane->panel = 'middle'; |
67 | 67 | $pane->type = 'views_panes'; |
68 | 68 | $pane->subtype = 'boinc_users-panel_pane_1'; |
69 | - $pane->shown = TRUE; |
|
69 | + $pane->shown = true; |
|
70 | 70 | $pane->access = array(); |
71 | 71 | $pane->configuration = array(); |
72 | 72 | $pane->cache = array(); |
73 | 73 | $pane->style = array( |
74 | - 'settings' => NULL, |
|
74 | + 'settings' => null, |
|
75 | 75 | ); |
76 | 76 | $pane->css = array( |
77 | 77 | 'css_id' => '', |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | $pane->panel = 'middle'; |
87 | 87 | $pane->type = 'views_panes'; |
88 | 88 | $pane->subtype = 'boinc_host_list-panel_pane_1'; |
89 | - $pane->shown = TRUE; |
|
89 | + $pane->shown = true; |
|
90 | 90 | $pane->access = array(); |
91 | 91 | $pane->configuration = array(); |
92 | 92 | $pane->cache = array(); |
93 | 93 | $pane->style = array( |
94 | - 'settings' => NULL, |
|
94 | + 'settings' => null, |
|
95 | 95 | ); |
96 | 96 | $pane->css = array( |
97 | 97 | 'css_id' => '', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $pane->panel = 'middle'; |
107 | 107 | $pane->type = 'views_panes'; |
108 | 108 | $pane->subtype = 'boinc_teams-panel_pane_4'; |
109 | - $pane->shown = TRUE; |
|
109 | + $pane->shown = true; |
|
110 | 110 | $pane->access = array(); |
111 | 111 | $pane->configuration = array( |
112 | 112 | 'link_to_view' => 0, |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ); |
120 | 120 | $pane->cache = array(); |
121 | 121 | $pane->style = array( |
122 | - 'settings' => NULL, |
|
122 | + 'settings' => null, |
|
123 | 123 | ); |
124 | 124 | $pane->css = array( |
125 | 125 | 'css_id' => '', |
@@ -4,42 +4,42 @@ discard block |
||
4 | 4 | * Implementation of hook_default_page_manager_pages(). |
5 | 5 | */ |
6 | 6 | function work_and_host_stats_default_page_manager_pages() { |
7 | - $page = new stdClass; |
|
8 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
9 | - $page->api_version = 1; |
|
10 | - $page->name = 'page_stats'; |
|
11 | - $page->task = 'page'; |
|
12 | - $page->admin_title = 'Stats'; |
|
13 | - $page->admin_description = ''; |
|
14 | - $page->path = 'community/stats'; |
|
15 | - $page->access = array( |
|
7 | + $page = new stdClass; |
|
8 | + $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
9 | + $page->api_version = 1; |
|
10 | + $page->name = 'page_stats'; |
|
11 | + $page->task = 'page'; |
|
12 | + $page->admin_title = 'Stats'; |
|
13 | + $page->admin_description = ''; |
|
14 | + $page->path = 'community/stats'; |
|
15 | + $page->access = array( |
|
16 | 16 | 'type' => 'none', |
17 | 17 | 'settings' => NULL, |
18 | - ); |
|
19 | - $page->menu = array( |
|
18 | + ); |
|
19 | + $page->menu = array( |
|
20 | 20 | 'type' => 'normal', |
21 | 21 | 'title' => 'Statistics', |
22 | 22 | 'name' => 'primary-links', |
23 | 23 | 'weight' => '20', |
24 | 24 | 'parent' => array( |
25 | - 'type' => 'none', |
|
26 | - 'title' => '', |
|
27 | - 'name' => 'navigation', |
|
28 | - 'weight' => '0', |
|
25 | + 'type' => 'none', |
|
26 | + 'title' => '', |
|
27 | + 'name' => 'navigation', |
|
28 | + 'weight' => '0', |
|
29 | 29 | ), |
30 | - ); |
|
31 | - $page->arguments = array(); |
|
32 | - $page->conf = array(); |
|
33 | - $page->default_handlers = array(); |
|
34 | - $handler = new stdClass; |
|
35 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
36 | - $handler->api_version = 1; |
|
37 | - $handler->name = 'page_page_stats_panel_context'; |
|
38 | - $handler->task = 'page'; |
|
39 | - $handler->subtask = 'page_stats'; |
|
40 | - $handler->handler = 'panel_context'; |
|
41 | - $handler->weight = 0; |
|
42 | - $handler->conf = array( |
|
30 | + ); |
|
31 | + $page->arguments = array(); |
|
32 | + $page->conf = array(); |
|
33 | + $page->default_handlers = array(); |
|
34 | + $handler = new stdClass; |
|
35 | + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
36 | + $handler->api_version = 1; |
|
37 | + $handler->name = 'page_page_stats_panel_context'; |
|
38 | + $handler->task = 'page'; |
|
39 | + $handler->subtask = 'page_stats'; |
|
40 | + $handler->handler = 'panel_context'; |
|
41 | + $handler->weight = 0; |
|
42 | + $handler->conf = array( |
|
43 | 43 | 'title' => 'Panel', |
44 | 44 | 'no_blocks' => 0, |
45 | 45 | 'pipeline' => 'standard', |
@@ -47,22 +47,22 @@ discard block |
||
47 | 47 | 'css' => '', |
48 | 48 | 'contexts' => array(), |
49 | 49 | 'relationships' => array(), |
50 | - ); |
|
51 | - $display = new panels_display; |
|
52 | - $display->layout = 'onecol'; |
|
53 | - $display->layout_settings = array(); |
|
54 | - $display->panel_settings = array( |
|
50 | + ); |
|
51 | + $display = new panels_display; |
|
52 | + $display->layout = 'onecol'; |
|
53 | + $display->layout_settings = array(); |
|
54 | + $display->panel_settings = array( |
|
55 | 55 | 'style_settings' => array( |
56 | - 'default' => NULL, |
|
57 | - 'middle' => NULL, |
|
56 | + 'default' => NULL, |
|
57 | + 'middle' => NULL, |
|
58 | 58 | ), |
59 | - ); |
|
60 | - $display->cache = array(); |
|
61 | - $display->title = 'Statistics and Leaderboards'; |
|
62 | - $display->storage_type = 'page_manager'; |
|
63 | - $display->storage_id = 'page_page_stats_panel_context'; |
|
64 | - $display->content = array(); |
|
65 | - $display->panels = array(); |
|
59 | + ); |
|
60 | + $display->cache = array(); |
|
61 | + $display->title = 'Statistics and Leaderboards'; |
|
62 | + $display->storage_type = 'page_manager'; |
|
63 | + $display->storage_id = 'page_page_stats_panel_context'; |
|
64 | + $display->content = array(); |
|
65 | + $display->panels = array(); |
|
66 | 66 | $pane = new stdClass; |
67 | 67 | $pane->pid = 'new-1'; |
68 | 68 | $pane->panel = 'middle'; |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | $pane->configuration = array(); |
74 | 74 | $pane->cache = array(); |
75 | 75 | $pane->style = array( |
76 | - 'settings' => NULL, |
|
76 | + 'settings' => NULL, |
|
77 | 77 | ); |
78 | 78 | $pane->css = array( |
79 | - 'css_id' => '', |
|
80 | - 'css_class' => 'panel-primary container shadow', |
|
79 | + 'css_id' => '', |
|
80 | + 'css_class' => 'panel-primary container shadow', |
|
81 | 81 | ); |
82 | 82 | $pane->extras = array(); |
83 | 83 | $pane->position = 0; |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | $pane->configuration = array(); |
94 | 94 | $pane->cache = array(); |
95 | 95 | $pane->style = array( |
96 | - 'settings' => NULL, |
|
96 | + 'settings' => NULL, |
|
97 | 97 | ); |
98 | 98 | $pane->css = array( |
99 | - 'css_id' => '', |
|
100 | - 'css_class' => 'panel-primary container shadow', |
|
99 | + 'css_id' => '', |
|
100 | + 'css_class' => 'panel-primary container shadow', |
|
101 | 101 | ); |
102 | 102 | $pane->extras = array(); |
103 | 103 | $pane->position = 1; |
@@ -111,32 +111,32 @@ discard block |
||
111 | 111 | $pane->shown = TRUE; |
112 | 112 | $pane->access = array(); |
113 | 113 | $pane->configuration = array( |
114 | - 'link_to_view' => 0, |
|
115 | - 'more_link' => 1, |
|
116 | - 'use_pager' => 0, |
|
117 | - 'pager_id' => '', |
|
118 | - 'items_per_page' => '10', |
|
119 | - 'override_title' => 0, |
|
120 | - 'override_title_text' => '', |
|
114 | + 'link_to_view' => 0, |
|
115 | + 'more_link' => 1, |
|
116 | + 'use_pager' => 0, |
|
117 | + 'pager_id' => '', |
|
118 | + 'items_per_page' => '10', |
|
119 | + 'override_title' => 0, |
|
120 | + 'override_title_text' => '', |
|
121 | 121 | ); |
122 | 122 | $pane->cache = array(); |
123 | 123 | $pane->style = array( |
124 | - 'settings' => NULL, |
|
124 | + 'settings' => NULL, |
|
125 | 125 | ); |
126 | 126 | $pane->css = array( |
127 | - 'css_id' => '', |
|
128 | - 'css_class' => 'panel-primary container shadow', |
|
127 | + 'css_id' => '', |
|
128 | + 'css_class' => 'panel-primary container shadow', |
|
129 | 129 | ); |
130 | 130 | $pane->extras = array(); |
131 | 131 | $pane->position = 2; |
132 | 132 | $display->content['new-3'] = $pane; |
133 | 133 | $display->panels['middle'][2] = 'new-3'; |
134 | - $display->hide_title = PANELS_TITLE_FIXED; |
|
135 | - $display->title_pane = '0'; |
|
136 | - $handler->conf['display'] = $display; |
|
137 | - $page->default_handlers[$handler->name] = $handler; |
|
138 | - $pages['page_stats'] = $page; |
|
134 | + $display->hide_title = PANELS_TITLE_FIXED; |
|
135 | + $display->title_pane = '0'; |
|
136 | + $handler->conf['display'] = $display; |
|
137 | + $page->default_handlers[$handler->name] = $handler; |
|
138 | + $pages['page_stats'] = $page; |
|
139 | 139 | |
140 | - return $pages; |
|
140 | + return $pages; |
|
141 | 141 | |
142 | 142 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $export = array(); |
8 | 8 | |
9 | 9 | $mini = new stdClass; |
10 | - $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
10 | + $mini->disabled = false; /* Edit this to true to make a default mini disabled initially */ |
|
11 | 11 | $mini->api_version = 1; |
12 | 12 | $mini->name = 'dashboard_tables'; |
13 | 13 | $mini->category = 'BOINC'; |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | $display->layout_settings = array(); |
22 | 22 | $display->panel_settings = array( |
23 | 23 | 'style_settings' => array( |
24 | - 'default' => NULL, |
|
25 | - 'left' => NULL, |
|
26 | - 'right' => NULL, |
|
27 | - 'top' => NULL, |
|
28 | - 'bottom' => NULL, |
|
24 | + 'default' => null, |
|
25 | + 'left' => null, |
|
26 | + 'right' => null, |
|
27 | + 'top' => null, |
|
28 | + 'bottom' => null, |
|
29 | 29 | ), |
30 | 30 | ); |
31 | 31 | $display->cache = array(); |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | $pane->panel = 'left'; |
38 | 38 | $pane->type = 'views_panes'; |
39 | 39 | $pane->subtype = 'boinc_account_computers-panel_pane_1'; |
40 | - $pane->shown = TRUE; |
|
40 | + $pane->shown = true; |
|
41 | 41 | $pane->access = array(); |
42 | 42 | $pane->configuration = array(); |
43 | 43 | $pane->cache = array(); |
44 | 44 | $pane->style = array( |
45 | - 'settings' => NULL, |
|
45 | + 'settings' => null, |
|
46 | 46 | ); |
47 | 47 | $pane->css = array(); |
48 | 48 | $pane->extras = array(); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $pane->panel = 'right'; |
55 | 55 | $pane->type = 'panels_mini'; |
56 | 56 | $pane->subtype = 'user_project_list'; |
57 | - $pane->shown = TRUE; |
|
57 | + $pane->shown = true; |
|
58 | 58 | $pane->access = array(); |
59 | 59 | $pane->configuration = array( |
60 | 60 | 'override_title' => 0, |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | ); |
63 | 63 | $pane->cache = array(); |
64 | 64 | $pane->style = array( |
65 | - 'settings' => NULL, |
|
65 | + 'settings' => null, |
|
66 | 66 | ); |
67 | 67 | $pane->css = array(); |
68 | 68 | $pane->extras = array(); |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | $pane->panel = 'top'; |
75 | 75 | $pane->type = 'views_panes'; |
76 | 76 | $pane->subtype = 'boinc_account_stats-panel_pane_1'; |
77 | - $pane->shown = TRUE; |
|
77 | + $pane->shown = true; |
|
78 | 78 | $pane->access = array(); |
79 | 79 | $pane->configuration = array(); |
80 | 80 | $pane->cache = array(); |
81 | 81 | $pane->style = array( |
82 | - 'settings' => NULL, |
|
82 | + 'settings' => null, |
|
83 | 83 | ); |
84 | 84 | $pane->css = array(); |
85 | 85 | $pane->extras = array(); |
@@ -4,36 +4,36 @@ discard block |
||
4 | 4 | * Implementation of hook_default_panels_mini(). |
5 | 5 | */ |
6 | 6 | function boinc_standard_default_panels_mini() { |
7 | - $export = array(); |
|
7 | + $export = array(); |
|
8 | 8 | |
9 | - $mini = new stdClass; |
|
10 | - $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
11 | - $mini->api_version = 1; |
|
12 | - $mini->name = 'dashboard_tables'; |
|
13 | - $mini->category = 'BOINC'; |
|
14 | - $mini->admin_title = 'Dashboard tables'; |
|
15 | - $mini->admin_description = 'Tables of computers and projects for a user'; |
|
16 | - $mini->requiredcontexts = array(); |
|
17 | - $mini->contexts = array(); |
|
18 | - $mini->relationships = array(); |
|
19 | - $display = new panels_display; |
|
20 | - $display->layout = 'twocol_stacked'; |
|
21 | - $display->layout_settings = array(); |
|
22 | - $display->panel_settings = array( |
|
9 | + $mini = new stdClass; |
|
10 | + $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
11 | + $mini->api_version = 1; |
|
12 | + $mini->name = 'dashboard_tables'; |
|
13 | + $mini->category = 'BOINC'; |
|
14 | + $mini->admin_title = 'Dashboard tables'; |
|
15 | + $mini->admin_description = 'Tables of computers and projects for a user'; |
|
16 | + $mini->requiredcontexts = array(); |
|
17 | + $mini->contexts = array(); |
|
18 | + $mini->relationships = array(); |
|
19 | + $display = new panels_display; |
|
20 | + $display->layout = 'twocol_stacked'; |
|
21 | + $display->layout_settings = array(); |
|
22 | + $display->panel_settings = array( |
|
23 | 23 | 'style_settings' => array( |
24 | - 'default' => NULL, |
|
25 | - 'left' => NULL, |
|
26 | - 'right' => NULL, |
|
27 | - 'top' => NULL, |
|
28 | - 'bottom' => NULL, |
|
24 | + 'default' => NULL, |
|
25 | + 'left' => NULL, |
|
26 | + 'right' => NULL, |
|
27 | + 'top' => NULL, |
|
28 | + 'bottom' => NULL, |
|
29 | 29 | ), |
30 | - ); |
|
31 | - $display->cache = array(); |
|
32 | - $display->title = ''; |
|
33 | - $display->storage_type = 'panels_mini'; |
|
34 | - $display->storage_id = 'dashboard_tables'; |
|
35 | - $display->content = array(); |
|
36 | - $display->panels = array(); |
|
30 | + ); |
|
31 | + $display->cache = array(); |
|
32 | + $display->title = ''; |
|
33 | + $display->storage_type = 'panels_mini'; |
|
34 | + $display->storage_id = 'dashboard_tables'; |
|
35 | + $display->content = array(); |
|
36 | + $display->panels = array(); |
|
37 | 37 | $pane = new stdClass; |
38 | 38 | $pane->pid = 'new-1'; |
39 | 39 | $pane->panel = 'left'; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $pane->configuration = array(); |
45 | 45 | $pane->cache = array(); |
46 | 46 | $pane->style = array( |
47 | - 'settings' => NULL, |
|
47 | + 'settings' => NULL, |
|
48 | 48 | ); |
49 | 49 | $pane->css = array(); |
50 | 50 | $pane->extras = array(); |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | $pane->shown = TRUE; |
60 | 60 | $pane->access = array(); |
61 | 61 | $pane->configuration = array( |
62 | - 'override_title' => 0, |
|
63 | - 'override_title_text' => '', |
|
62 | + 'override_title' => 0, |
|
63 | + 'override_title_text' => '', |
|
64 | 64 | ); |
65 | 65 | $pane->cache = array(); |
66 | 66 | $pane->style = array( |
67 | - 'settings' => NULL, |
|
67 | + 'settings' => NULL, |
|
68 | 68 | ); |
69 | 69 | $pane->css = array(); |
70 | 70 | $pane->extras = array(); |
@@ -81,17 +81,17 @@ discard block |
||
81 | 81 | $pane->configuration = array(); |
82 | 82 | $pane->cache = array(); |
83 | 83 | $pane->style = array( |
84 | - 'settings' => NULL, |
|
84 | + 'settings' => NULL, |
|
85 | 85 | ); |
86 | 86 | $pane->css = array(); |
87 | 87 | $pane->extras = array(); |
88 | 88 | $pane->position = 0; |
89 | 89 | $display->content['new-3'] = $pane; |
90 | 90 | $display->panels['top'][0] = 'new-3'; |
91 | - $display->hide_title = PANELS_TITLE_NONE; |
|
92 | - $display->title_pane = '0'; |
|
93 | - $mini->display = $display; |
|
94 | - $export['dashboard_tables'] = $mini; |
|
91 | + $display->hide_title = PANELS_TITLE_NONE; |
|
92 | + $display->title_pane = '0'; |
|
93 | + $mini->display = $display; |
|
94 | + $export['dashboard_tables'] = $mini; |
|
95 | 95 | |
96 | - return $export; |
|
96 | + return $export; |
|
97 | 97 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $view->base_table = 'users'; |
15 | 15 | $view->core = 6; |
16 | 16 | $view->api_version = '2'; |
17 | - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
17 | + $view->disabled = false; /* Edit this to true to make a default view disabled initially */ |
|
18 | 18 | $handler = $view->new_display('default', 'Defaults', 'default'); |
19 | 19 | $handler->override_option('fields', array( |
20 | 20 | 'uid' => array( |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | 'operator' => 'contains', |
295 | 295 | 'value' => '', |
296 | 296 | 'group' => '0', |
297 | - 'exposed' => TRUE, |
|
297 | + 'exposed' => true, |
|
298 | 298 | 'expose' => array( |
299 | 299 | 'use_operator' => 0, |
300 | 300 | 'operator' => 'name_op', |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | 'operator' => 'contains', |
313 | 313 | 'value' => '', |
314 | 314 | 'group' => '0', |
315 | - 'exposed' => TRUE, |
|
315 | + 'exposed' => true, |
|
316 | 316 | 'expose' => array( |
317 | 317 | 'use_operator' => 0, |
318 | 318 | 'operator' => 'mail_op', |
@@ -4,22 +4,22 @@ discard block |
||
4 | 4 | * Implementation of hook_views_default_views(). |
5 | 5 | */ |
6 | 6 | function boinc_standard_views_default_views() { |
7 | - $views = array(); |
|
7 | + $views = array(); |
|
8 | 8 | |
9 | - // Exported view: admin_user_search |
|
10 | - $view = new view; |
|
11 | - $view->name = 'admin_user_search'; |
|
12 | - $view->description = 'Administrator User Search'; |
|
13 | - $view->tag = ''; |
|
14 | - $view->base_table = 'users'; |
|
15 | - $view->core = 6; |
|
16 | - $view->api_version = '2'; |
|
17 | - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
18 | - $handler = $view->new_display('default', 'Defaults', 'default'); |
|
19 | - $handler->override_option('fields', array( |
|
9 | + // Exported view: admin_user_search |
|
10 | + $view = new view; |
|
11 | + $view->name = 'admin_user_search'; |
|
12 | + $view->description = 'Administrator User Search'; |
|
13 | + $view->tag = ''; |
|
14 | + $view->base_table = 'users'; |
|
15 | + $view->core = 6; |
|
16 | + $view->api_version = '2'; |
|
17 | + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
18 | + $handler = $view->new_display('default', 'Defaults', 'default'); |
|
19 | + $handler->override_option('fields', array( |
|
20 | 20 | 'uid' => array( |
21 | - 'label' => 'Uid', |
|
22 | - 'alter' => array( |
|
21 | + 'label' => 'Uid', |
|
22 | + 'alter' => array( |
|
23 | 23 | 'alter_text' => 0, |
24 | 24 | 'text' => '', |
25 | 25 | 'make_link' => 0, |
@@ -38,21 +38,21 @@ discard block |
||
38 | 38 | 'ellipsis' => 1, |
39 | 39 | 'html' => 0, |
40 | 40 | 'strip_tags' => 0, |
41 | - ), |
|
42 | - 'empty' => '', |
|
43 | - 'hide_empty' => 0, |
|
44 | - 'empty_zero' => 0, |
|
45 | - 'hide_alter_empty' => 1, |
|
46 | - 'link_to_user' => 0, |
|
47 | - 'exclude' => 0, |
|
48 | - 'id' => 'uid', |
|
49 | - 'table' => 'users', |
|
50 | - 'field' => 'uid', |
|
51 | - 'relationship' => 'none', |
|
41 | + ), |
|
42 | + 'empty' => '', |
|
43 | + 'hide_empty' => 0, |
|
44 | + 'empty_zero' => 0, |
|
45 | + 'hide_alter_empty' => 1, |
|
46 | + 'link_to_user' => 0, |
|
47 | + 'exclude' => 0, |
|
48 | + 'id' => 'uid', |
|
49 | + 'table' => 'users', |
|
50 | + 'field' => 'uid', |
|
51 | + 'relationship' => 'none', |
|
52 | 52 | ), |
53 | 53 | 'name' => array( |
54 | - 'label' => 'Name', |
|
55 | - 'alter' => array( |
|
54 | + 'label' => 'Name', |
|
55 | + 'alter' => array( |
|
56 | 56 | 'alter_text' => 0, |
57 | 57 | 'text' => '', |
58 | 58 | 'make_link' => 1, |
@@ -71,23 +71,23 @@ discard block |
||
71 | 71 | 'ellipsis' => 1, |
72 | 72 | 'html' => 0, |
73 | 73 | 'strip_tags' => 0, |
74 | - ), |
|
75 | - 'empty' => '', |
|
76 | - 'hide_empty' => 0, |
|
77 | - 'empty_zero' => 0, |
|
78 | - 'hide_alter_empty' => 1, |
|
79 | - 'link_to_user' => 0, |
|
80 | - 'overwrite_anonymous' => 0, |
|
81 | - 'anonymous_text' => '', |
|
82 | - 'exclude' => 0, |
|
83 | - 'id' => 'name', |
|
84 | - 'table' => 'users', |
|
85 | - 'field' => 'name', |
|
86 | - 'relationship' => 'none', |
|
74 | + ), |
|
75 | + 'empty' => '', |
|
76 | + 'hide_empty' => 0, |
|
77 | + 'empty_zero' => 0, |
|
78 | + 'hide_alter_empty' => 1, |
|
79 | + 'link_to_user' => 0, |
|
80 | + 'overwrite_anonymous' => 0, |
|
81 | + 'anonymous_text' => '', |
|
82 | + 'exclude' => 0, |
|
83 | + 'id' => 'name', |
|
84 | + 'table' => 'users', |
|
85 | + 'field' => 'name', |
|
86 | + 'relationship' => 'none', |
|
87 | 87 | ), |
88 | 88 | 'phpcode' => array( |
89 | - 'label' => 'BOINC user name', |
|
90 | - 'alter' => array( |
|
89 | + 'label' => 'BOINC user name', |
|
90 | + 'alter' => array( |
|
91 | 91 | 'alter_text' => 0, |
92 | 92 | 'text' => '', |
93 | 93 | 'make_link' => 1, |
@@ -106,29 +106,29 @@ discard block |
||
106 | 106 | 'ellipsis' => 1, |
107 | 107 | 'html' => 0, |
108 | 108 | 'strip_tags' => 0, |
109 | - ), |
|
110 | - 'empty' => '', |
|
111 | - 'hide_empty' => 0, |
|
112 | - 'empty_zero' => 0, |
|
113 | - 'hide_alter_empty' => 1, |
|
114 | - 'value' => '<?php |
|
109 | + ), |
|
110 | + 'empty' => '', |
|
111 | + 'hide_empty' => 0, |
|
112 | + 'empty_zero' => 0, |
|
113 | + 'hide_alter_empty' => 1, |
|
114 | + 'value' => '<?php |
|
115 | 115 | $myuser = user_load($data->uid); |
116 | 116 | echo $myuser->boincuser_name; |
117 | 117 | ?>', |
118 | - 'exclude' => 0, |
|
119 | - 'id' => 'phpcode', |
|
120 | - 'table' => 'customfield', |
|
121 | - 'field' => 'phpcode', |
|
122 | - 'relationship' => 'none', |
|
118 | + 'exclude' => 0, |
|
119 | + 'id' => 'phpcode', |
|
120 | + 'table' => 'customfield', |
|
121 | + 'field' => 'phpcode', |
|
122 | + 'relationship' => 'none', |
|
123 | 123 | ), |
124 | 124 | 'mail' => array( |
125 | - 'id' => 'mail', |
|
126 | - 'table' => 'users', |
|
127 | - 'field' => 'mail', |
|
125 | + 'id' => 'mail', |
|
126 | + 'table' => 'users', |
|
127 | + 'field' => 'mail', |
|
128 | 128 | ), |
129 | 129 | 'rid' => array( |
130 | - 'label' => 'Roles', |
|
131 | - 'alter' => array( |
|
130 | + 'label' => 'Roles', |
|
131 | + 'alter' => array( |
|
132 | 132 | 'alter_text' => 0, |
133 | 133 | 'text' => '', |
134 | 134 | 'make_link' => 0, |
@@ -147,22 +147,22 @@ discard block |
||
147 | 147 | 'ellipsis' => 1, |
148 | 148 | 'html' => 0, |
149 | 149 | 'strip_tags' => 0, |
150 | - ), |
|
151 | - 'empty' => '', |
|
152 | - 'hide_empty' => 0, |
|
153 | - 'empty_zero' => 0, |
|
154 | - 'hide_alter_empty' => 1, |
|
155 | - 'type' => 'separator', |
|
156 | - 'separator' => ', ', |
|
157 | - 'exclude' => 0, |
|
158 | - 'id' => 'rid', |
|
159 | - 'table' => 'users_roles', |
|
160 | - 'field' => 'rid', |
|
161 | - 'relationship' => 'none', |
|
150 | + ), |
|
151 | + 'empty' => '', |
|
152 | + 'hide_empty' => 0, |
|
153 | + 'empty_zero' => 0, |
|
154 | + 'hide_alter_empty' => 1, |
|
155 | + 'type' => 'separator', |
|
156 | + 'separator' => ', ', |
|
157 | + 'exclude' => 0, |
|
158 | + 'id' => 'rid', |
|
159 | + 'table' => 'users_roles', |
|
160 | + 'field' => 'rid', |
|
161 | + 'relationship' => 'none', |
|
162 | 162 | ), |
163 | 163 | 'status' => array( |
164 | - 'label' => 'Banned', |
|
165 | - 'alter' => array( |
|
164 | + 'label' => 'Banned', |
|
165 | + 'alter' => array( |
|
166 | 166 | 'alter_text' => 0, |
167 | 167 | 'text' => '', |
168 | 168 | 'make_link' => 0, |
@@ -181,22 +181,22 @@ discard block |
||
181 | 181 | 'ellipsis' => 1, |
182 | 182 | 'html' => 0, |
183 | 183 | 'strip_tags' => 0, |
184 | - ), |
|
185 | - 'empty' => '', |
|
186 | - 'hide_empty' => 0, |
|
187 | - 'empty_zero' => 0, |
|
188 | - 'hide_alter_empty' => 1, |
|
189 | - 'type' => 'yes-no', |
|
190 | - 'not' => 1, |
|
191 | - 'exclude' => 0, |
|
192 | - 'id' => 'status', |
|
193 | - 'table' => 'users', |
|
194 | - 'field' => 'status', |
|
195 | - 'relationship' => 'none', |
|
184 | + ), |
|
185 | + 'empty' => '', |
|
186 | + 'hide_empty' => 0, |
|
187 | + 'empty_zero' => 0, |
|
188 | + 'hide_alter_empty' => 1, |
|
189 | + 'type' => 'yes-no', |
|
190 | + 'not' => 1, |
|
191 | + 'exclude' => 0, |
|
192 | + 'id' => 'status', |
|
193 | + 'table' => 'users', |
|
194 | + 'field' => 'status', |
|
195 | + 'relationship' => 'none', |
|
196 | 196 | ), |
197 | 197 | 'access' => array( |
198 | - 'label' => 'Last access', |
|
199 | - 'alter' => array( |
|
198 | + 'label' => 'Last access', |
|
199 | + 'alter' => array( |
|
200 | 200 | 'alter_text' => 0, |
201 | 201 | 'text' => '', |
202 | 202 | 'make_link' => 0, |
@@ -215,22 +215,22 @@ discard block |
||
215 | 215 | 'ellipsis' => 1, |
216 | 216 | 'html' => 0, |
217 | 217 | 'strip_tags' => 0, |
218 | - ), |
|
219 | - 'empty' => '', |
|
220 | - 'hide_empty' => 0, |
|
221 | - 'empty_zero' => 0, |
|
222 | - 'hide_alter_empty' => 1, |
|
223 | - 'date_format' => 'time ago', |
|
224 | - 'custom_date_format' => '', |
|
225 | - 'exclude' => 0, |
|
226 | - 'id' => 'access', |
|
227 | - 'table' => 'users', |
|
228 | - 'field' => 'access', |
|
229 | - 'relationship' => 'none', |
|
218 | + ), |
|
219 | + 'empty' => '', |
|
220 | + 'hide_empty' => 0, |
|
221 | + 'empty_zero' => 0, |
|
222 | + 'hide_alter_empty' => 1, |
|
223 | + 'date_format' => 'time ago', |
|
224 | + 'custom_date_format' => '', |
|
225 | + 'exclude' => 0, |
|
226 | + 'id' => 'access', |
|
227 | + 'table' => 'users', |
|
228 | + 'field' => 'access', |
|
229 | + 'relationship' => 'none', |
|
230 | 230 | ), |
231 | 231 | 'login' => array( |
232 | - 'label' => 'Last login', |
|
233 | - 'alter' => array( |
|
232 | + 'label' => 'Last login', |
|
233 | + 'alter' => array( |
|
234 | 234 | 'alter_text' => 0, |
235 | 235 | 'text' => '', |
236 | 236 | 'make_link' => 0, |
@@ -249,22 +249,22 @@ discard block |
||
249 | 249 | 'ellipsis' => 1, |
250 | 250 | 'html' => 0, |
251 | 251 | 'strip_tags' => 0, |
252 | - ), |
|
253 | - 'empty' => '', |
|
254 | - 'hide_empty' => 0, |
|
255 | - 'empty_zero' => 0, |
|
256 | - 'hide_alter_empty' => 1, |
|
257 | - 'date_format' => 'time ago', |
|
258 | - 'custom_date_format' => '', |
|
259 | - 'exclude' => 0, |
|
260 | - 'id' => 'login', |
|
261 | - 'table' => 'users', |
|
262 | - 'field' => 'login', |
|
263 | - 'relationship' => 'none', |
|
252 | + ), |
|
253 | + 'empty' => '', |
|
254 | + 'hide_empty' => 0, |
|
255 | + 'empty_zero' => 0, |
|
256 | + 'hide_alter_empty' => 1, |
|
257 | + 'date_format' => 'time ago', |
|
258 | + 'custom_date_format' => '', |
|
259 | + 'exclude' => 0, |
|
260 | + 'id' => 'login', |
|
261 | + 'table' => 'users', |
|
262 | + 'field' => 'login', |
|
263 | + 'relationship' => 'none', |
|
264 | 264 | ), |
265 | 265 | 'created' => array( |
266 | - 'label' => 'Created date', |
|
267 | - 'alter' => array( |
|
266 | + 'label' => 'Created date', |
|
267 | + 'alter' => array( |
|
268 | 268 | 'alter_text' => 0, |
269 | 269 | 'text' => '', |
270 | 270 | 'make_link' => 0, |
@@ -283,22 +283,22 @@ discard block |
||
283 | 283 | 'ellipsis' => 1, |
284 | 284 | 'html' => 0, |
285 | 285 | 'strip_tags' => 0, |
286 | - ), |
|
287 | - 'empty' => '', |
|
288 | - 'hide_empty' => 0, |
|
289 | - 'empty_zero' => 0, |
|
290 | - 'hide_alter_empty' => 1, |
|
291 | - 'date_format' => 'time ago', |
|
292 | - 'custom_date_format' => '', |
|
293 | - 'exclude' => 0, |
|
294 | - 'id' => 'created', |
|
295 | - 'table' => 'users', |
|
296 | - 'field' => 'created', |
|
297 | - 'relationship' => 'none', |
|
286 | + ), |
|
287 | + 'empty' => '', |
|
288 | + 'hide_empty' => 0, |
|
289 | + 'empty_zero' => 0, |
|
290 | + 'hide_alter_empty' => 1, |
|
291 | + 'date_format' => 'time ago', |
|
292 | + 'custom_date_format' => '', |
|
293 | + 'exclude' => 0, |
|
294 | + 'id' => 'created', |
|
295 | + 'table' => 'users', |
|
296 | + 'field' => 'created', |
|
297 | + 'relationship' => 'none', |
|
298 | 298 | ), |
299 | 299 | 'edit_node' => array( |
300 | - 'label' => '', |
|
301 | - 'alter' => array( |
|
300 | + 'label' => '', |
|
301 | + 'alter' => array( |
|
302 | 302 | 'alter_text' => 0, |
303 | 303 | 'text' => '', |
304 | 304 | 'make_link' => 0, |
@@ -317,143 +317,143 @@ discard block |
||
317 | 317 | 'ellipsis' => 1, |
318 | 318 | 'html' => 0, |
319 | 319 | 'strip_tags' => 0, |
320 | - ), |
|
321 | - 'empty' => '', |
|
322 | - 'hide_empty' => 0, |
|
323 | - 'empty_zero' => 0, |
|
324 | - 'hide_alter_empty' => 1, |
|
325 | - 'text' => '', |
|
326 | - 'exclude' => 0, |
|
327 | - 'id' => 'edit_node', |
|
328 | - 'table' => 'users', |
|
329 | - 'field' => 'edit_node', |
|
330 | - 'relationship' => 'none', |
|
320 | + ), |
|
321 | + 'empty' => '', |
|
322 | + 'hide_empty' => 0, |
|
323 | + 'empty_zero' => 0, |
|
324 | + 'hide_alter_empty' => 1, |
|
325 | + 'text' => '', |
|
326 | + 'exclude' => 0, |
|
327 | + 'id' => 'edit_node', |
|
328 | + 'table' => 'users', |
|
329 | + 'field' => 'edit_node', |
|
330 | + 'relationship' => 'none', |
|
331 | 331 | ), |
332 | - )); |
|
333 | - $handler->override_option('filters', array( |
|
332 | + )); |
|
333 | + $handler->override_option('filters', array( |
|
334 | 334 | 'name' => array( |
335 | - 'operator' => 'contains', |
|
336 | - 'value' => '', |
|
337 | - 'group' => '0', |
|
338 | - 'exposed' => TRUE, |
|
339 | - 'expose' => array( |
|
335 | + 'operator' => 'contains', |
|
336 | + 'value' => '', |
|
337 | + 'group' => '0', |
|
338 | + 'exposed' => TRUE, |
|
339 | + 'expose' => array( |
|
340 | 340 | 'use_operator' => 0, |
341 | 341 | 'operator' => 'name_op', |
342 | 342 | 'identifier' => 'name', |
343 | 343 | 'label' => 'Part of a User\'s name', |
344 | 344 | 'remember' => 0, |
345 | - ), |
|
346 | - 'case' => 0, |
|
347 | - 'id' => 'name', |
|
348 | - 'table' => 'users', |
|
349 | - 'field' => 'name', |
|
350 | - 'relationship' => 'none', |
|
345 | + ), |
|
346 | + 'case' => 0, |
|
347 | + 'id' => 'name', |
|
348 | + 'table' => 'users', |
|
349 | + 'field' => 'name', |
|
350 | + 'relationship' => 'none', |
|
351 | 351 | ), |
352 | 352 | 'mail' => array( |
353 | - 'operator' => 'contains', |
|
354 | - 'value' => '', |
|
355 | - 'group' => '0', |
|
356 | - 'exposed' => TRUE, |
|
357 | - 'expose' => array( |
|
353 | + 'operator' => 'contains', |
|
354 | + 'value' => '', |
|
355 | + 'group' => '0', |
|
356 | + 'exposed' => TRUE, |
|
357 | + 'expose' => array( |
|
358 | 358 | 'use_operator' => 0, |
359 | 359 | 'operator' => 'mail_op', |
360 | 360 | 'identifier' => 'mail', |
361 | 361 | 'label' => 'Part of a User\'s E-mail', |
362 | 362 | 'remember' => 0, |
363 | - ), |
|
364 | - 'case' => 0, |
|
365 | - 'id' => 'mail', |
|
366 | - 'table' => 'users', |
|
367 | - 'field' => 'mail', |
|
368 | - 'relationship' => 'none', |
|
363 | + ), |
|
364 | + 'case' => 0, |
|
365 | + 'id' => 'mail', |
|
366 | + 'table' => 'users', |
|
367 | + 'field' => 'mail', |
|
368 | + 'relationship' => 'none', |
|
369 | 369 | ), |
370 | - )); |
|
371 | - $handler->override_option('access', array( |
|
370 | + )); |
|
371 | + $handler->override_option('access', array( |
|
372 | 372 | 'type' => 'perm', |
373 | 373 | 'perm' => 'administer users', |
374 | - )); |
|
375 | - $handler->override_option('cache', array( |
|
374 | + )); |
|
375 | + $handler->override_option('cache', array( |
|
376 | 376 | 'type' => 'none', |
377 | - )); |
|
378 | - $handler->override_option('use_pager', '1'); |
|
379 | - $handler->override_option('style_plugin', 'table'); |
|
380 | - $handler->override_option('style_options', array( |
|
377 | + )); |
|
378 | + $handler->override_option('use_pager', '1'); |
|
379 | + $handler->override_option('style_plugin', 'table'); |
|
380 | + $handler->override_option('style_options', array( |
|
381 | 381 | 'grouping' => '', |
382 | 382 | 'override' => 1, |
383 | 383 | 'sticky' => 0, |
384 | 384 | 'order' => 'desc', |
385 | 385 | 'summary' => '', |
386 | 386 | 'columns' => array( |
387 | - 'uid' => 'uid', |
|
388 | - 'name' => 'name', |
|
389 | - 'phpcode' => 'phpcode', |
|
390 | - 'mail' => 'mail', |
|
391 | - 'rid' => 'rid', |
|
392 | - 'status' => 'status', |
|
393 | - 'access' => 'access', |
|
394 | - 'login' => 'login', |
|
395 | - 'created' => 'created', |
|
396 | - 'edit_node' => 'edit_node', |
|
387 | + 'uid' => 'uid', |
|
388 | + 'name' => 'name', |
|
389 | + 'phpcode' => 'phpcode', |
|
390 | + 'mail' => 'mail', |
|
391 | + 'rid' => 'rid', |
|
392 | + 'status' => 'status', |
|
393 | + 'access' => 'access', |
|
394 | + 'login' => 'login', |
|
395 | + 'created' => 'created', |
|
396 | + 'edit_node' => 'edit_node', |
|
397 | 397 | ), |
398 | 398 | 'info' => array( |
399 | - 'uid' => array( |
|
399 | + 'uid' => array( |
|
400 | 400 | 'sortable' => 1, |
401 | 401 | 'separator' => '', |
402 | - ), |
|
403 | - 'name' => array( |
|
402 | + ), |
|
403 | + 'name' => array( |
|
404 | 404 | 'sortable' => 1, |
405 | 405 | 'separator' => '', |
406 | - ), |
|
407 | - 'phpcode' => array( |
|
406 | + ), |
|
407 | + 'phpcode' => array( |
|
408 | 408 | 'separator' => '', |
409 | - ), |
|
410 | - 'mail' => array( |
|
409 | + ), |
|
410 | + 'mail' => array( |
|
411 | 411 | 'sortable' => 1, |
412 | 412 | 'separator' => '', |
413 | - ), |
|
414 | - 'rid' => array( |
|
413 | + ), |
|
414 | + 'rid' => array( |
|
415 | 415 | 'separator' => '', |
416 | - ), |
|
417 | - 'status' => array( |
|
416 | + ), |
|
417 | + 'status' => array( |
|
418 | 418 | 'sortable' => 1, |
419 | 419 | 'separator' => '', |
420 | - ), |
|
421 | - 'access' => array( |
|
420 | + ), |
|
421 | + 'access' => array( |
|
422 | 422 | 'sortable' => 1, |
423 | 423 | 'separator' => '', |
424 | - ), |
|
425 | - 'login' => array( |
|
424 | + ), |
|
425 | + 'login' => array( |
|
426 | 426 | 'sortable' => 1, |
427 | 427 | 'separator' => '', |
428 | - ), |
|
429 | - 'created' => array( |
|
428 | + ), |
|
429 | + 'created' => array( |
|
430 | 430 | 'sortable' => 1, |
431 | 431 | 'separator' => '', |
432 | - ), |
|
433 | - 'edit_node' => array( |
|
432 | + ), |
|
433 | + 'edit_node' => array( |
|
434 | 434 | 'separator' => '', |
435 | - ), |
|
435 | + ), |
|
436 | 436 | ), |
437 | 437 | 'default' => 'access', |
438 | - )); |
|
439 | - $handler = $view->new_display('page', 'Page', 'page_1'); |
|
440 | - $handler->override_option('path', 'admin/user/search'); |
|
441 | - $handler->override_option('menu', array( |
|
438 | + )); |
|
439 | + $handler = $view->new_display('page', 'Page', 'page_1'); |
|
440 | + $handler->override_option('path', 'admin/user/search'); |
|
441 | + $handler->override_option('menu', array( |
|
442 | 442 | 'type' => 'normal', |
443 | 443 | 'title' => 'User search', |
444 | 444 | 'description' => 'Find users by partial name or email address', |
445 | 445 | 'weight' => '0', |
446 | 446 | 'name' => 'navigation', |
447 | - )); |
|
448 | - $handler->override_option('tab_options', array( |
|
447 | + )); |
|
448 | + $handler->override_option('tab_options', array( |
|
449 | 449 | 'type' => 'none', |
450 | 450 | 'title' => '', |
451 | 451 | 'description' => '', |
452 | 452 | 'weight' => 0, |
453 | 453 | 'name' => 'navigation', |
454 | - )); |
|
454 | + )); |
|
455 | 455 | |
456 | - $views[$view->name] = $view; |
|
456 | + $views[$view->name] = $view; |
|
457 | 457 | |
458 | - return $views; |
|
458 | + return $views; |
|
459 | 459 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $export = array(); |
8 | 8 | |
9 | 9 | $mini = new stdClass; |
10 | - $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
10 | + $mini->disabled = false; /* Edit this to true to make a default mini disabled initially */ |
|
11 | 11 | $mini->api_version = 1; |
12 | 12 | $mini->name = 'user_profile'; |
13 | 13 | $mini->category = 'BOINC'; |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | $display->layout_settings = array(); |
29 | 29 | $display->panel_settings = array( |
30 | 30 | 'style_settings' => array( |
31 | - 'default' => NULL, |
|
32 | - 'middle' => NULL, |
|
31 | + 'default' => null, |
|
32 | + 'middle' => null, |
|
33 | 33 | ), |
34 | 34 | ); |
35 | 35 | $display->cache = array(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $pane->panel = 'middle'; |
42 | 42 | $pane->type = 'user_profile'; |
43 | 43 | $pane->subtype = 'user_profile'; |
44 | - $pane->shown = TRUE; |
|
44 | + $pane->shown = true; |
|
45 | 45 | $pane->access = array(); |
46 | 46 | $pane->configuration = array( |
47 | 47 | 'context' => 'requiredcontext_user_1', |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ); |
51 | 51 | $pane->cache = array(); |
52 | 52 | $pane->style = array( |
53 | - 'settings' => NULL, |
|
53 | + 'settings' => null, |
|
54 | 54 | ); |
55 | 55 | $pane->css = array(); |
56 | 56 | $pane->extras = array(); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $pane->panel = 'middle'; |
63 | 63 | $pane->type = 'custom'; |
64 | 64 | $pane->subtype = 'custom'; |
65 | - $pane->shown = TRUE; |
|
65 | + $pane->shown = true; |
|
66 | 66 | $pane->access = array(); |
67 | 67 | $pane->configuration = array( |
68 | 68 | 'admin_title' => 'Flag user', |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ); |
74 | 74 | $pane->cache = array(); |
75 | 75 | $pane->style = array( |
76 | - 'settings' => NULL, |
|
76 | + 'settings' => null, |
|
77 | 77 | ); |
78 | 78 | $pane->css = array(); |
79 | 79 | $pane->extras = array(); |
@@ -4,40 +4,40 @@ discard block |
||
4 | 4 | * Implementation of hook_default_panels_mini(). |
5 | 5 | */ |
6 | 6 | function user_profiles_default_panels_mini() { |
7 | - $export = array(); |
|
7 | + $export = array(); |
|
8 | 8 | |
9 | - $mini = new stdClass; |
|
10 | - $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
11 | - $mini->api_version = 1; |
|
12 | - $mini->name = 'user_profile'; |
|
13 | - $mini->category = 'BOINC'; |
|
14 | - $mini->admin_title = 'User profile'; |
|
15 | - $mini->admin_description = 'A user\'s profile information, including background and opinions'; |
|
16 | - $mini->requiredcontexts = array( |
|
9 | + $mini = new stdClass; |
|
10 | + $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ |
|
11 | + $mini->api_version = 1; |
|
12 | + $mini->name = 'user_profile'; |
|
13 | + $mini->category = 'BOINC'; |
|
14 | + $mini->admin_title = 'User profile'; |
|
15 | + $mini->admin_description = 'A user\'s profile information, including background and opinions'; |
|
16 | + $mini->requiredcontexts = array( |
|
17 | 17 | 0 => array( |
18 | - 'name' => 'user', |
|
19 | - 'id' => 1, |
|
20 | - 'identifier' => 'User', |
|
21 | - 'keyword' => 'user', |
|
18 | + 'name' => 'user', |
|
19 | + 'id' => 1, |
|
20 | + 'identifier' => 'User', |
|
21 | + 'keyword' => 'user', |
|
22 | 22 | ), |
23 | - ); |
|
24 | - $mini->contexts = array(); |
|
25 | - $mini->relationships = array(); |
|
26 | - $display = new panels_display; |
|
27 | - $display->layout = 'onecol'; |
|
28 | - $display->layout_settings = array(); |
|
29 | - $display->panel_settings = array( |
|
23 | + ); |
|
24 | + $mini->contexts = array(); |
|
25 | + $mini->relationships = array(); |
|
26 | + $display = new panels_display; |
|
27 | + $display->layout = 'onecol'; |
|
28 | + $display->layout_settings = array(); |
|
29 | + $display->panel_settings = array( |
|
30 | 30 | 'style_settings' => array( |
31 | - 'default' => NULL, |
|
32 | - 'middle' => NULL, |
|
31 | + 'default' => NULL, |
|
32 | + 'middle' => NULL, |
|
33 | 33 | ), |
34 | - ); |
|
35 | - $display->cache = array(); |
|
36 | - $display->title = ''; |
|
37 | - $display->storage_type = 'panels_mini'; |
|
38 | - $display->storage_id = 'user_profile'; |
|
39 | - $display->content = array(); |
|
40 | - $display->panels = array(); |
|
34 | + ); |
|
35 | + $display->cache = array(); |
|
36 | + $display->title = ''; |
|
37 | + $display->storage_type = 'panels_mini'; |
|
38 | + $display->storage_id = 'user_profile'; |
|
39 | + $display->content = array(); |
|
40 | + $display->panels = array(); |
|
41 | 41 | $pane = new stdClass; |
42 | 42 | $pane->pid = 'new-1'; |
43 | 43 | $pane->panel = 'middle'; |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | $pane->shown = TRUE; |
47 | 47 | $pane->access = array(); |
48 | 48 | $pane->configuration = array( |
49 | - 'context' => 'requiredcontext_user_1', |
|
50 | - 'override_title' => 1, |
|
51 | - 'override_title_text' => '', |
|
49 | + 'context' => 'requiredcontext_user_1', |
|
50 | + 'override_title' => 1, |
|
51 | + 'override_title_text' => '', |
|
52 | 52 | ); |
53 | 53 | $pane->cache = array(); |
54 | 54 | $pane->style = array( |
55 | - 'settings' => NULL, |
|
55 | + 'settings' => NULL, |
|
56 | 56 | ); |
57 | 57 | $pane->css = array(); |
58 | 58 | $pane->extras = array(); |
@@ -67,25 +67,25 @@ discard block |
||
67 | 67 | $pane->shown = TRUE; |
68 | 68 | $pane->access = array(); |
69 | 69 | $pane->configuration = array( |
70 | - 'admin_title' => 'Flag user', |
|
71 | - 'title' => '', |
|
72 | - 'body' => '<?php print boincuser_get_profile_links(%user:uid); ?>', |
|
73 | - 'format' => '3', |
|
74 | - 'substitute' => 1, |
|
70 | + 'admin_title' => 'Flag user', |
|
71 | + 'title' => '', |
|
72 | + 'body' => '<?php print boincuser_get_profile_links(%user:uid); ?>', |
|
73 | + 'format' => '3', |
|
74 | + 'substitute' => 1, |
|
75 | 75 | ); |
76 | 76 | $pane->cache = array(); |
77 | 77 | $pane->style = array( |
78 | - 'settings' => NULL, |
|
78 | + 'settings' => NULL, |
|
79 | 79 | ); |
80 | 80 | $pane->css = array(); |
81 | 81 | $pane->extras = array(); |
82 | 82 | $pane->position = 1; |
83 | 83 | $display->content['new-2'] = $pane; |
84 | 84 | $display->panels['middle'][1] = 'new-2'; |
85 | - $display->hide_title = PANELS_TITLE_NONE; |
|
86 | - $display->title_pane = 'new-1'; |
|
87 | - $mini->display = $display; |
|
88 | - $export['user_profile'] = $mini; |
|
85 | + $display->hide_title = PANELS_TITLE_NONE; |
|
86 | + $display->title_pane = 'new-1'; |
|
87 | + $mini->display = $display; |
|
88 | + $export['user_profile'] = $mini; |
|
89 | 89 | |
90 | - return $export; |
|
90 | + return $export; |
|
91 | 91 | } |