Completed
Push — master ( ddedde...1d84e9 )
by Kevin
11:09
created
html/ops/delete_user.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 die("Delete this line first\n");
29 29
 
30
-$id = (int) $argv[1];
30
+$id = (int)$argv[1];
31 31
 
32 32
 $user = BoincUser::lookup_id($id);
33 33
 if (!$user) die("no such user\n");
Please login to merge, or discard this patch.
html/inc/user.inc 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 // they've participated in
36 36
 //
37 37
 function get_other_projects($user) {
38
-    $cpid = md5($user->cross_project_id . $user->email_addr);
38
+    $cpid = md5($user->cross_project_id.$user->email_addr);
39 39
     $url = "http://boinc.netsoft-online.com/get_user.php?cpid=".$cpid;
40 40
 
41 41
     // Check the cache for that URL
42 42
     //
43 43
     $cacheddata = get_cached_data(REMOTE_PROJECTS_TTL, $url);
44
-    if ($cacheddata){
44
+    if ($cacheddata) {
45 45
         $remote = unserialize($cacheddata);
46 46
     } else {
47 47
         // Fetch the XML, use curl if fopen() is disallowed
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 function cmp($a, $b) {
114 114
     if ($a->expavg_credit == $b->expavg_credit) return 0;
115
-    return ($a->expavg_credit < $b->expavg_credit)? 1 : -1;
115
+    return ($a->expavg_credit < $b->expavg_credit) ? 1 : -1;
116 116
 }
117 117
 
118 118
 function show_other_projects($user, $personal) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         ),
136 136
         array("", ALIGN_RIGHT, ALIGN_RIGHT, ALIGN_RIGHT)
137 137
     );
138
-    foreach($user->projects as $project) {
138
+    foreach ($user->projects as $project) {
139 139
         show_project($project);
140 140
     }
141 141
     end_table();
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     }
177 177
 
178 178
     if (!NO_STATS) {
179
-        $cpid = md5($user->cross_project_id . $user->email_addr);
179
+        $cpid = md5($user->cross_project_id.$user->email_addr);
180 180
         $x = "";
181 181
         shuffle($cpid_stats_sites);
182 182
         foreach ($cpid_stats_sites as $site) {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 // show user name, with links to profile if present.
323 323
 // if $badge_height is > 0, show badges
324 324
 //
325
-function user_links($user, $badge_height=0) {
325
+function user_links($user, $badge_height = 0) {
326 326
     BoincForumPrefs::lookup($user);
327 327
     if (is_banished($user)) {
328 328
         return "(banished: ID $user->id)";
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $x .= ' <a href="'.url_base().'view_profile.php?userid='.$user->id.'"><img title="View the profile of '.$user->name.'" src="'.$img_url.'" alt="Profile"></a>';
334 334
     }
335 335
     $x .= " <a href=\"".url_base()."show_user.php?userid=".$user->id."\">".$user->name."</a>";
336
-    if (function_exists("project_user_links")){
336
+    if (function_exists("project_user_links")) {
337 337
         $x .= project_user_links($user);
338 338
     }
339 339
     if ($badge_height) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
             // if there's a foundership request, notify the founder
388 388
             //
389
-            if ($user->id==$team->userid && $team->ping_user >0) {
389
+            if ($user->id == $team->userid && $team->ping_user > 0) {
390 390
                 $x .= "<p class=\"text-danger\">".tra("(foundership change request pending)")."</p>";
391 391
             }
392 392
             row2(tra("Member of team"), $x);
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
     $x = "<a href=\"user_search.php\">".tra("Find friends")."</a><br/>\n";
412 412
     $n = count($friends);
413 413
     if ($n) {
414
-        foreach($friends as $friend) {
414
+        foreach ($friends as $friend) {
415 415
             $fuser = BoincUser::lookup_id($friend->user_dest);
416 416
             if (!$fuser) continue;
417 417
             $x .= friend_links($fuser);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 // Returns a cacheable community links data object
455 455
 // @param user The user to produce a community links object for
456 456
 
457
-function get_community_links_object($user){
457
+function get_community_links_object($user) {
458 458
     $cache_object = new StdClass;
459 459
     $cache_object->post_count = total_posts($user);
460 460
     $cache_object->user = $user;
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     $cache_object->friends = array();
463 463
 
464 464
     $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1");
465
-    foreach($friends as $friend) {
465
+    foreach ($friends as $friend) {
466 466
         $fuser = BoincUser::lookup_id($friend->user_dest);
467 467
         if (!$fuser) continue;
468 468
         $cache_object->friends[] = $fuser;
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     return $cache_object;
471 471
 }
472 472
 
473
-function community_links($clo, $logged_in_user){
473
+function community_links($clo, $logged_in_user) {
474 474
     $user = $clo->user;
475 475
     $team = $clo->team;
476 476
     $friends = $clo->friends;
@@ -496,15 +496,15 @@  discard block
 block discarded – undo
496 496
                 "<a href=\"friend.php?action=cancel_confirm&userid=$user->id\">".tra("Cancel friendship")."</a>"
497 497
             );
498 498
         } else if ($friend) {
499
-            row2(tra("Friends"),  "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>");
499
+            row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>");
500 500
         } else {
501
-            row2(tra("Friends"),  "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>");
501
+            row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>");
502 502
         }
503 503
     }
504 504
     
505 505
     if ($friends) {
506 506
         $x = "";
507
-        foreach($friends as $friend) {
507
+        foreach ($friends as $friend) {
508 508
             $x .= friend_links($friend);
509 509
         }
510 510
         row2(tra("Friends")." (".sizeof($friends).")", $x);
@@ -571,6 +571,6 @@  discard block
 block discarded – undo
571 571
     return true;
572 572
 }
573 573
 
574
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
574
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
575 575
 
576 576
 ?>
Please login to merge, or discard this patch.