Passed
Push — dpa_docker_wrapper12 ( e18bd7 )
by David
08:59
created
default/boinc/modules/boincuser/boincuser_quote/boincuser_quote.module 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
             $boincusername = (!empty($account)) ? $account->boincuser_name : variable_get('anonymous', 'Anonymous');
54 54
             $replace = TRUE;
55 55
           }
56
-        }
57
-        elseif ($nid && _quote_variable_get('node_link_display')) {
56
+        } elseif ($nid && _quote_variable_get('node_link_display')) {
58 57
           $node = node_load(array('nid' => $nid));
59 58
           if (in_array($node->type, _quote_variable_get('node_types'))) {
60 59
             $account = user_load($node->uid);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
         $nid = arg(2);
46 46
         $cid = arg(3);
47 47
 
48
-        $replace = FALSE;
48
+        $replace = false;
49 49
         if ($cid) {
50 50
           $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0', $cid));
51 51
           if ($comment->uid) {
52 52
             $account = user_load($comment->uid);
53 53
             $boincusername = (!empty($account)) ? $account->boincuser_name : variable_get('anonymous', 'Anonymous');
54
-            $replace = TRUE;
54
+            $replace = true;
55 55
           }
56 56
         }
57 57
         elseif ($nid && _quote_variable_get('node_link_display')) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
           if (in_array($node->type, _quote_variable_get('node_types'))) {
60 60
             $account = user_load($node->uid);
61 61
             $boincusername = (!empty($account)) ? $account->boincuser_name : variable_get('anonymous', 'Anonymous');
62
-            $replace = TRUE;
62
+            $replace = true;
63 63
           }
64 64
         }
65 65
 
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,43 +31,43 @@
 block discarded – undo
31 31
  */
32 32
 
33 33
 function boincuser_quote_form_alter(&$form, $form_state, $form_id) {
34
-  switch ($form_id) {
35
-  // Comment form
36
-  case 'comment_form':
34
+    switch ($form_id) {
35
+    // Comment form
36
+    case 'comment_form':
37 37
     // If there is a quote as part of the comment body, replace the
38 38
     // first instance of quote=author with quote=boincusername. This
39 39
     // is done with regexp.
40 40
     // Modify for quotes only
41 41
     if ((isset($_POST['quote']) || isset($_GET['quote']) && $_GET['quote'])) {
42
-      // If default_value is already set, then modify it
43
-      if (isset($form['comment_filter']['comment']['#default_value'])) {
42
+        // If default_value is already set, then modify it
43
+        if (isset($form['comment_filter']['comment']['#default_value'])) {
44 44
         $nid = arg(2);
45 45
         $cid = arg(3);
46 46
 
47 47
         $replace = FALSE;
48 48
         if ($cid) {
49
-          $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0', $cid));
50
-          if ($comment->uid) {
49
+            $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0', $cid));
50
+            if ($comment->uid) {
51 51
             $account = user_load($comment->uid);
52 52
             $boincusername = (!empty($account)) ? $account->boincuser_name : variable_get('anonymous', 'Anonymous');
53 53
             $replace = TRUE;
54
-          }
54
+            }
55 55
         }
56 56
         elseif ($nid && _quote_variable_get('node_link_display')) {
57
-          $node = node_load(array('nid' => $nid));
58
-          if (in_array($node->type, _quote_variable_get('node_types'))) {
57
+            $node = node_load(array('nid' => $nid));
58
+            if (in_array($node->type, _quote_variable_get('node_types'))) {
59 59
             $account = user_load($node->uid);
60 60
             $boincusername = (!empty($account)) ? $account->boincuser_name : variable_get('anonymous', 'Anonymous');
61 61
             $replace = TRUE;
62
-          }
62
+            }
63 63
         }
64 64
 
65 65
         // Replace the quoted author name (drupal name) with BOINC username.
66 66
         if ($replace) {
67
-          $form['comment_filter']['comment']['#default_value'] = preg_replace("/\[quote=(.*?)\]/", "[quote=${boincusername}]", $form['comment_filter']['comment']['#default_value'], 1);
67
+            $form['comment_filter']['comment']['#default_value'] = preg_replace("/\[quote=(.*?)\]/", "[quote=${boincusername}]", $form['comment_filter']['comment']['#default_value'], 1);
68
+        }
68 69
         }
69
-      }
70 70
     }
71 71
     break;
72
-  }
72
+    }
73 73
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.module 4 patches
Braces   +15 added lines, -25 removed lines patch added patch discarded remove patch
@@ -418,11 +418,9 @@  discard block
 block discarded – undo
418 418
 
419 419
         if ($edit['boincuser_name']) {
420 420
           $myname = $edit['boincuser_name'];
421
-        }
422
-        else if ($edit['name']) {
421
+        } else if ($edit['name']) {
423 422
           $myname = $edit['name'];
424
-        }
425
-        else {
423
+        } else {
426 424
           $myname = 'noname';
427 425
         }
428 426
 
@@ -434,8 +432,7 @@  discard block
 block discarded – undo
434 432
         // If the 'pass' variable is already a hash, then don't hash it again.
435 433
         if ($edit['boinchash_flag']) {
436 434
           $user_params['passwd_hash'] = $edit['pass'];
437
-        }
438
-        else {
435
+        } else {
439 436
           // The passwd_hash here is only the md5() hash. This is
440 437
           // because BOINC make_user(), called later, will run
441 438
           // password_hash() on this md5 hash.
@@ -506,8 +503,7 @@  discard block
 block discarded – undo
506 503
               $prev_email = $account->mail;
507 504
               $mytime = (user_access('administer users')) ? $boinc_user->email_addr_change_time : time();
508 505
               $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}', previous_email_addr = '{$prev_email}', email_addr_change_time = $mytime";
509
-            }
510
-            else {
506
+            } else {
511 507
               $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}'";
512 508
             }
513 509
 
@@ -750,8 +746,7 @@  discard block
 block discarded – undo
750 746
       case FLAG_FRIEND_APPROVAL:
751 747
         if ($action == 'flag') {
752 748
           $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
753
-        }
754
-        elseif ($action == 'unflag') {
749
+        } elseif ($action == 'unflag') {
755 750
           unset($form['actions']);
756 751
           $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
757 752
         }
@@ -1527,8 +1522,7 @@  discard block
 block discarded – undo
1527 1522
         array(
1528 1523
           '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1529 1524
         ), NULL, 'boinc:join-page') . '</li>';
1530
-    }
1531
-    else {
1525
+    } else {
1532 1526
       $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1533 1527
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1534 1528
         array(
@@ -1563,8 +1557,7 @@  discard block
 block discarded – undo
1563 1557
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1564 1558
         '@sitename' => $site_name,
1565 1559
       ), NULL, 'boinc:join-page') . '</li>';
1566
-    }
1567
-    else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1560
+    } else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1568 1561
       $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1569 1562
         '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1570 1563
       ), NULL, 'boinc:join-page') . '</li>';
@@ -1606,8 +1599,7 @@  discard block
 block discarded – undo
1606 1599
   ));
1607 1600
   if ($current_uotd->uotd_time < strtotime('today midnight')) {
1608 1601
     $uotd = boincuser_select_user_of_the_day();
1609
-  }
1610
-  else {
1602
+  } else {
1611 1603
     $uotd = user_load($current_uotd->uid);
1612 1604
   }
1613 1605
   $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
@@ -1618,8 +1610,7 @@  discard block
 block discarded – undo
1618 1610
   $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1619 1611
   if ($user->uid) {
1620 1612
     $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1621
-  }
1622
-  else {
1613
+  } else {
1623 1614
     $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1624 1615
   }
1625 1616
   $output .= '</div>';
@@ -1704,12 +1695,10 @@  discard block
 block discarded – undo
1704 1695
     if ( ($params['passwd_hash'] == $boinc_user->passwd_hash) or
1705 1696
     password_verify($params['passwd_hash'], $boinc_user->passwd_hash) ) {
1706 1697
       $output = array('authenticator' => $boinc_user->authenticator);
1707
-    }
1708
-    else {
1698
+    } else {
1709 1699
       xml_error(-137);
1710 1700
     }
1711
-  }
1712
-  else {
1701
+  } else {
1713 1702
     // Verify that there isn't somehow a Drupal user already (not possible with proper function)
1714 1703
     if ($existing_user = user_load(array('mail' => $params['email_addr']))) {
1715 1704
       xml_error(-137, 'account error');
@@ -2193,7 +2182,9 @@  discard block
 block discarded – undo
2193 2182
     'cpid' => $cpid
2194 2183
   );
2195 2184
   $args = array();
2196
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2185
+  foreach ($get as $arg => $value) {
2186
+      $args[] = "{$arg}=" . rawurlencode($value);
2187
+  }
2197 2188
   $query = '?' . implode('&', $args);
2198 2189
   
2199 2190
   // Load XML from RPC
@@ -2324,8 +2315,7 @@  discard block
 block discarded – undo
2324 2315
       if ($node->uid == 0 || strlen($node->name) == 0) {
2325 2316
         // @see user_validate_name(). !'0' === TRUE.
2326 2317
         $document->ss_name = '0';
2327
-      }
2328
-      else {
2318
+      } else {
2329 2319
         $document->ss_name = $account->boincuser_name;
2330 2320
         // We want the name to be searchable for keywords.
2331 2321
         $document->tos_name = $account->boincuser_name;
Please login to merge, or discard this patch.
Indentation   +847 added lines, -847 removed lines patch added patch discarded remove patch
@@ -27,44 +27,44 @@  discard block
 block discarded – undo
27 27
  * with defined URL paths
28 28
  */
29 29
 function boincuser_menu() {
30
-  $items['account/posts'] = array(
30
+    $items['account/posts'] = array(
31 31
     'title' => 'Recent posts',
32 32
     'description' => '',
33 33
     'page callback' => 'boincuser_goto_recent_posts',
34 34
     'access callback' => 'user_is_logged_in',
35 35
     'type' => MENU_CALLBACK,
36
-  );
37
-  $items['account/profile'] = array(
36
+    );
37
+    $items['account/profile'] = array(
38 38
     'title' => '',
39 39
     'description' => '',
40 40
     'page callback' => 'boincuser_view_profile',
41 41
     'access callback' => 'user_is_logged_in',
42 42
     'type' => MENU_NORMAL_ITEM
43
-  );
44
-  $items['account/profile/view'] = array(
43
+    );
44
+    $items['account/profile/view'] = array(
45 45
     'title' => 'View',
46 46
     'description' => 'Show a user profile',
47 47
     'page callback' => 'boincuser_view_profile',
48 48
     'access callback' => 'user_is_logged_in',
49 49
     'type' => MENU_DEFAULT_LOCAL_TASK,
50 50
     'weight' => 0
51
-  );
52
-  $items['account/profile/edit'] = array(
51
+    );
52
+    $items['account/profile/edit'] = array(
53 53
     'title' => 'Edit',
54 54
     'description' => 'Edit a user profile',
55 55
     'page callback' => 'boincuser_edit_profile',
56 56
     'access arguments' => array('edit own profile content'),
57 57
     'type' => MENU_LOCAL_TASK,
58 58
     'weight' => 5
59
-  );
60
-  $items['account/team'] = array(
59
+    );
60
+    $items['account/team'] = array(
61 61
     'title' => 'User team',
62 62
     'description' => '',
63 63
     'page callback' => 'boincuser_goto_team',
64 64
     'access callback' => 'user_is_logged_in',
65 65
     'type' => MENU_CALLBACK,
66
-  );
67
-  $items['moderate/profile/%user/approve'] = array(
66
+    );
67
+    $items['moderate/profile/%user/approve'] = array(
68 68
     'title' => 'Profile approval',
69 69
     'description' => 'Approve profile content',
70 70
     'page callback' => 'boincuser_moderate_profile_approve',
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
     'access arguments' => array('edit any profile content'),
73 73
     'type' => MENU_CALLBACK,
74 74
     'weight' => 5
75
-  );
76
-  $items['moderate/profile/%user/edit'] = array(
75
+    );
76
+    $items['moderate/profile/%user/edit'] = array(
77 77
     'title' => 'Profile editor',
78 78
     'description' => 'Edit a user profile',
79 79
     'page callback' => 'boincuser_edit_profile',
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
     'access arguments' => array('edit any profile content'),
82 82
     'type' => MENU_CALLBACK,
83 83
     'weight' => 5
84
-  );
85
-  $items['moderate/profile/%/reject'] = array(
84
+    );
85
+    $items['moderate/profile/%/reject'] = array(
86 86
     'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
87 87
     'description' => 'Reject profile content',
88 88
     'page callback' => 'drupal_get_form',
@@ -90,60 +90,60 @@  discard block
 block discarded – undo
90 90
     'access arguments' => array('edit any profile content'),
91 91
     'type' => MENU_CALLBACK,
92 92
     'weight' => 5
93
-  );
94
-  $items['moderate/user/%/ban'] = array(
93
+    );
94
+    $items['moderate/user/%/ban'] = array(
95 95
     'title' => bts('Ban user', array(), NULL, 'boinc:moderate-ban-user'),
96 96
     'description' => 'Ban a user from using community features',
97 97
     'page callback' => 'drupal_get_form',
98 98
     'page arguments' => array('boincuser_moderate_user_ban_form', 2),
99 99
     'access callback' => 'boincuser_moderate_community_access',
100 100
     'type' => MENU_CALLBACK,
101
-  );
102
-  $items['join'] = array(
101
+    );
102
+    $items['join'] = array(
103 103
     'title' => '',
104 104
     'description' => '',
105 105
     'page callback' => 'join_page',
106 106
     'access arguments' => array('access content'),
107 107
     'type' => MENU_NORMAL_ITEM
108
-  );
109
-  $items['join/new'] = array(
108
+    );
109
+    $items['join/new'] = array(
110 110
     'title' => bts("I'm new"),
111 111
     'page callback' => 'join_page',
112 112
     'page arguments' => array(1),
113 113
     'access arguments' => array('access content'),
114 114
     'type' => MENU_DEFAULT_LOCAL_TASK,
115 115
     'weight' => 0
116
-  );
117
-  $items['join/boinc'] = array(
116
+    );
117
+    $items['join/boinc'] = array(
118 118
     'title' => bts("I'm a BOINC user"),
119 119
     'page callback' => 'join_page',
120 120
     'page arguments' => array(1),
121 121
     'access arguments' => array('access content'),
122 122
     'type' => MENU_LOCAL_TASK,
123 123
     'weight' => 5
124
-  );
125
-  $items['user/login/auth'] = array(
124
+    );
125
+    $items['user/login/auth'] = array(
126 126
     'title' => bts('Authenticator login', array(), NULL, 'boinc:authenticator-login-page'),
127 127
     'description' => 'Log in using a user authenticator',
128 128
     'page callback' => 'drupal_get_form',
129 129
     'page arguments' => array('boincuser_authloginform'),
130 130
     'access arguments' => array('access content'),
131 131
     'type' => MENU_CALLBACK,
132
-  );
133
-  $items['user/termsofuse'] = array(
132
+    );
133
+    $items['user/termsofuse'] = array(
134 134
     'title' => bts('Terms of Use', array(), NULL, 'boinc:termsofuse-form'),
135 135
     'description' => 'A site\'s term of use.',
136 136
     'page callback' => 'drupal_get_form',
137 137
     'page arguments' => array('boincuser_termsofuse_form'),
138 138
     'access callback' => 'user_is_logged_in',
139 139
     'type' => MENU_CALLBACK,
140
-  );
141
-  $items['user_control'] = array(
140
+    );
141
+    $items['user_control'] = array(
142 142
     'page callback' => 'boincuser_control',
143 143
     'access arguments' => array('access user profiles'),
144 144
     'type' => MENU_CALLBACK
145
-  );
146
-  $items['admin/boinc'] = array(
145
+    );
146
+    $items['admin/boinc'] = array(
147 147
     'title' => 'BOINC configuration',
148 148
     'position' => 'right',
149 149
     'weight' => -8,
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
     'access arguments' => array('administer site configuration'),
152 152
     'file' => 'system.admin.inc',
153 153
     'file path' => drupal_get_path('module', 'system'),
154
-  );
155
-  $items['admin/boinc/environment'] = array(
154
+    );
155
+    $items['admin/boinc/environment'] = array(
156 156
     'title' => 'Environment: General',
157 157
     'description' => 'Set paths to BOINC functions and any other necessary
158 158
       variables that establish a BOINC environment.',
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
     'access arguments' => array('administer site configuration'),
162 162
     'type' => MENU_NORMAL_ITEM,
163 163
     'file' => 'boincuser.admin.inc'
164
-  );
165
-  $items['admin/boinc/scheduler'] = array(
164
+    );
165
+    $items['admin/boinc/scheduler'] = array(
166 166
     'title' => 'Environment: Scheduling server URLs',
167 167
     'description' => 'Set BOINC scheduler options.',
168 168
     'page callback' => 'drupal_get_form',
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
     'access arguments' => array('administer site configuration'),
171 171
     'type' => MENU_NORMAL_ITEM,
172 172
     'file' => 'boincuser.admin.inc'
173
-  );
174
-  $items['admin/boinc/weboptions'] = array(
173
+    );
174
+    $items['admin/boinc/weboptions'] = array(
175 175
     'title' => 'Environment: Website Options',
176 176
     'description' => 'Set options configuring this Drupal-BOINC Web site.',
177 177
     'page callback' => 'drupal_get_form',
@@ -179,117 +179,117 @@  discard block
 block discarded – undo
179 179
     'access arguments' => array('administer site configuration'),
180 180
     'type' => MENU_NORMAL_ITEM,
181 181
     'file' => 'boincuser.admin.inc'
182
-  );
182
+    );
183 183
 
184
-  $items['create_account.php'] = array(
184
+    $items['create_account.php'] = array(
185 185
     'title' => 'Create Account RPC',
186 186
     'description' => 'RPC for creating user accounts.',
187 187
     'page callback' => 'boincuser_create_account',
188 188
     'access callback' => TRUE,
189 189
     'type' => MENU_CALLBACK
190
-  );
191
-  $items['account_finish.php'] = array(
190
+    );
191
+    $items['account_finish.php'] = array(
192 192
     'title' => 'Welcome to ' . variable_get('site_name', 'Drupal-BOINC'),
193 193
     'description' => 'RPC for after a user has created an account.',
194 194
     'page callback' => 'boincuser_account_finish',
195 195
     'access callback' => TRUE,
196 196
     'type' => MENU_CALLBACK,
197
-  );
198
-  $items['boincuser/autocomplete'] = array(
197
+    );
198
+    $items['boincuser/autocomplete'] = array(
199 199
     'page callback' => '_boincuser_user_name_autocomplete',
200 200
     'access callback' => TRUE,
201 201
     'type' => MENU_CALLBACK,
202
-  );
203
-  $items['user/%user/recoveremail/%'] = array(
202
+    );
203
+    $items['user/%user/recoveremail/%'] = array(
204 204
     'title' => t('Recover previous email'),
205 205
     'description' => t('Form to revert email to previous address.'),
206 206
     'page callback' => 'drupal_get_form',
207 207
     'page arguments' => array('boincuser_revertemail', 3),
208 208
     'access callback' => 'user_is_logged_in',
209 209
     'type' => MENU_CALLBACK,
210
-  );
211
-  $items['recover_email.php'] = array(
210
+    );
211
+    $items['recover_email.php'] = array(
212 212
     'title' => t('Recover previous email'),
213 213
     'description' => t('redirect'),
214 214
     'page callback' => '_boincuser_redirect_recover_email',
215 215
     'access callback' => TRUE,
216 216
     'type' => MENU_CALLBACK,
217
-  );
218
-  return $items;
217
+    );
218
+    return $items;
219 219
 }
220 220
 
221 221
 /**
222 222
  * Implementation of hook_init()
223 223
  */
224 224
 function boincuser_init() {
225
-  global $user;
226
-  // Skip this check for charts, which are loaded separately
227
-  // (may get duplicate or unexpected messages otherwise)
228
-  if (substr($_GET['q'], 0, 7) == 'charts/') {
225
+    global $user;
226
+    // Skip this check for charts, which are loaded separately
227
+    // (may get duplicate or unexpected messages otherwise)
228
+    if (substr($_GET['q'], 0, 7) == 'charts/') {
229 229
     return;
230
-  }
230
+    }
231 231
 
232
-  // If admin user, do some basic site functionality checks
233
-  if (user_access('administer site configuration')) {
232
+    // If admin user, do some basic site functionality checks
233
+    if (user_access('administer site configuration')) {
234 234
     // Ensure we have a configured BOINC environment
235 235
     boinc_get_path();
236 236
     boinc_get_scheduler_tags();
237
-  }
237
+    }
238 238
 
239
-  // Check credits for the verified contributor role
240
-  boincuser_check_credit_requirements();
239
+    // Check credits for the verified contributor role
240
+    boincuser_check_credit_requirements();
241 241
 
242
-  if (module_exists('boincteam')) {
242
+    if (module_exists('boincteam')) {
243 243
     // Display any persistent team messages
244 244
     boincteam_show_messages();
245
-  }
245
+    }
246 246
 
247
-  // Check if user has agreed to the terms of use. If not, send the
248
-  // user to the terms-of-use form. This is only makes sense if the
249
-  // termsofuse is enabled, by having text in the termsofuse variable.
250
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
-  if ( (!empty($termsofuse)) and ($user->uid) ) {
247
+    // Check if user has agreed to the terms of use. If not, send the
248
+    // user to the terms-of-use form. This is only makes sense if the
249
+    // termsofuse is enabled, by having text in the termsofuse variable.
250
+    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
+    if ( (!empty($termsofuse)) and ($user->uid) ) {
253 253
     if ( !boincuser_check_termsofuse($user) and ($existinguser_tou) ) {
254 254
 
255
-      // Admins are exempt, otherwise the admin may not be able to
256
-      // access the site!
257
-      $administrator_role = array_search('administrator', user_roles(true));
258
-      if (!isset($user->roles[$administrator_role])) {
255
+        // Admins are exempt, otherwise the admin may not be able to
256
+        // access the site!
257
+        $administrator_role = array_search('administrator', user_roles(true));
258
+        if (!isset($user->roles[$administrator_role])) {
259 259
         $path = drupal_get_path_alias($_GET['q']);
260 260
 
261 261
         // Any paths that should NOT be redirected go here.
262 262
         // The site will not function correctly if these are not exempt!
263 263
         $paths0 = array(
264
-          'user/termsofuse',
265
-          'logout',
266
-          'account/info/edit',
267
-          'user/' . $user->uid . '/edit',
268
-          'user/' . $user->uid . '/recoveremail/*',
269
-          'recover_email.php',
264
+            'user/termsofuse',
265
+            'logout',
266
+            'account/info/edit',
267
+            'user/' . $user->uid . '/edit',
268
+            'user/' . $user->uid . '/recoveremail/*',
269
+            'recover_email.php',
270 270
         );
271 271
         if (module_exists('boincuser_delete')) {
272
-          $paths0[] = 'user/' . $user->uid . '/delete';
273
-          $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
-          $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
272
+            $paths0[] = 'user/' . $user->uid . '/delete';
273
+            $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
+            $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
275 275
         }
276 276
 
277 277
         // Paths added by the admin
278 278
         $paths1 = preg_split('/\r\n|\r|\n/', variable_get('boinc_weboptions_pathstoignore', "moderation\ncontent/moderation\nprivacy"));
279 279
         $paths2 = array();
280 280
         if (is_array($paths1)) {
281
-          $paths2 = array_map('strtolower', $paths1);
281
+            $paths2 = array_map('strtolower', $paths1);
282 282
         }
283 283
 
284 284
         // paths to ignore
285 285
         $paths_to_ignore = array_unique( array_merge($paths0, $paths2) );
286 286
 
287 287
         if (!_boincuser_ignore_paths($path, $paths_to_ignore)) {
288
-          drupal_goto('user/termsofuse');
288
+            drupal_goto('user/termsofuse');
289
+        }
289 290
         }
290
-      }
291 291
     }
292
-  }
292
+    }
293 293
 }
294 294
 
295 295
 /**
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
  * Drupal user operations
298 298
  */
299 299
 function boincuser_user($op, &$edit, &$account, $category = NULL) {
300
-  require_boinc('boinc_db');
301
-  require_boinc('user');
302
-  require_boinc('xml');
300
+    require_boinc('boinc_db');
301
+    require_boinc('user');
302
+    require_boinc('xml');
303 303
 
304
-  require_boinc('password_compat/password');
305
-  // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306
-  if (isset($account->uid) && ($account->uid > 1)) {
304
+    require_boinc('password_compat/password');
305
+    // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306
+    if (isset($account->uid) && ($account->uid > 1)) {
307 307
     switch($op) {
308 308
     case 'load':
309 309
       // User loading; insert BOINC data into the user object
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
         SELECT boinc_id, penalty_expiration
312 312
         FROM {boincuser} WHERE uid = %d",
313 313
         $account->uid
314
-      ));
315
-      $account->boincuser_id = $drupal_user->boinc_id;
316
-      $account->boincuser_penalty_expiration = $drupal_user->penalty_expiration;
317
-      db_set_active('boinc_rw');
318
-      $boinc_user = db_fetch_object(db_query("
314
+        ));
315
+        $account->boincuser_id = $drupal_user->boinc_id;
316
+        $account->boincuser_penalty_expiration = $drupal_user->penalty_expiration;
317
+        db_set_active('boinc_rw');
318
+        $boinc_user = db_fetch_object(db_query("
319 319
         SELECT
320 320
           name,
321 321
           authenticator,
@@ -331,29 +331,29 @@  discard block
 block discarded – undo
331 331
         FROM {user}
332 332
         WHERE id = %d",
333 333
         $account->boincuser_id
334
-      ));
335
-      $account->boincuser_name = $boinc_user->name;
336
-      $account->boincuser_account_key = $boinc_user->authenticator;
337
-      $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
338
-      $account->boincuser_total_credit = round($boinc_user->total_credit);
339
-      $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340
-      $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
-      $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
342
-      $account->boincuser_default_pref_set = $boinc_user->venue;
343
-      $account->boincteam_id = $boinc_user->teamid;
344
-      $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
345
-      $account->boincuser_email_addr_change_time = $boinc_user->email_addr_change_time;
346
-      db_set_active('default');
347
-      // Set Drupal team ID
348
-      $account->team = NULL;
349
-      if ($account->boincteam_id) {
334
+        ));
335
+        $account->boincuser_name = $boinc_user->name;
336
+        $account->boincuser_account_key = $boinc_user->authenticator;
337
+        $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
338
+        $account->boincuser_total_credit = round($boinc_user->total_credit);
339
+        $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340
+        $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
+        $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
342
+        $account->boincuser_default_pref_set = $boinc_user->venue;
343
+        $account->boincteam_id = $boinc_user->teamid;
344
+        $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
345
+        $account->boincuser_email_addr_change_time = $boinc_user->email_addr_change_time;
346
+        db_set_active('default');
347
+        // Set Drupal team ID
348
+        $account->team = NULL;
349
+        if ($account->boincteam_id) {
350 350
         $account->team = db_result(db_query("
351 351
           SELECT nid FROM {boincteam} WHERE team_id = %d",
352
-          $account->boincteam_id
352
+            $account->boincteam_id
353 353
         ));
354
-      }
355
-      // Set post count
356
-      $account->post_count = db_result(db_query("
354
+        }
355
+        // Set post count
356
+        $account->post_count = db_result(db_query("
357 357
         SELECT COUNT(*) +
358 358
         (
359 359
           SELECT COUNT(*) FROM {node}
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
         WHERE comments.uid = '%d'
367 367
         AND node.status = 1",
368 368
         $account->uid, $account->uid
369
-      ));
370
-      break;
369
+        ));
370
+        break;
371 371
 
372 372
     case 'view':
373 373
       // SAMPLE: Add BOINC data to the user profile
@@ -393,74 +393,74 @@  discard block
 block discarded – undo
393 393
         case 'user_account':
394 394
           // Validate data before updating user account info
395 395
           boincuser_account_validate($edit, $account);
396
-          break;
396
+            break;
397 397
 
398 398
         default:
399 399
 
400 400
         }
401 401
         // We don't want to save validation source, so remove it
402 402
         $edit['validation_source'] = null;
403
-      }
404
-      break;
403
+        }
404
+        break;
405 405
 
406 406
     case 'insert':
407 407
       // New user being added to the system
408 408
       $imported = $_SESSION['importedUser'];
409
-      unset($_SESSION['importedUser']);
409
+        unset($_SESSION['importedUser']);
410 410
 
411
-      watchdog(
411
+        watchdog(
412 412
         'boincuser',
413 413
         'Creating user account for %email_addr',
414 414
         array('%email_addr' => $edit['mail']),
415 415
         WATCHDOG_NOTICE
416
-      );
416
+        );
417 417
 
418
-      // The create_acount RPC will call this block of code when
419
-      // user_save() is used. If user is registering using the Web
420
-      // registration form, create a BOINC user and relationships.
421
-      // Create a BOINC account unless importing from BOINC.
422
-      if (!$imported) {
418
+        // The create_acount RPC will call this block of code when
419
+        // user_save() is used. If user is registering using the Web
420
+        // registration form, create a BOINC user and relationships.
421
+        // Create a BOINC account unless importing from BOINC.
422
+        if (!$imported) {
423 423
 
424 424
         // set email address lower-case
425 425
         $lower_email_addr = strtolower($edit['mail']);
426 426
 
427 427
         if ($edit['boincuser_name']) {
428
-          $myname = $edit['boincuser_name'];
428
+            $myname = $edit['boincuser_name'];
429 429
         }
430 430
         else if ($edit['name']) {
431
-          $myname = $edit['name'];
431
+            $myname = $edit['name'];
432 432
         }
433 433
         else {
434
-          $myname = 'noname';
434
+            $myname = 'noname';
435 435
         }
436 436
 
437 437
         $user_params = array(
438
-          'email_addr' => $lower_email_addr,
439
-          'name' => $myname,
438
+            'email_addr' => $lower_email_addr,
439
+            'name' => $myname,
440 440
         );
441 441
 
442 442
         // If the 'pass' variable is already a hash, then don't hash it again.
443 443
         if ($edit['boinchash_flag']) {
444
-          $user_params['passwd_hash'] = $edit['pass'];
444
+            $user_params['passwd_hash'] = $edit['pass'];
445 445
         }
446 446
         else {
447
-          // The passwd_hash here is only the md5() hash. This is
448
-          // because BOINC make_user(), called later, will run
449
-          // password_hash() on this md5 hash.
450
-          $user_params['passwd_hash'] = md5($edit['pass'].$lower_email_addr);
447
+            // The passwd_hash here is only the md5() hash. This is
448
+            // because BOINC make_user(), called later, will run
449
+            // password_hash() on this md5 hash.
450
+            $user_params['passwd_hash'] = md5($edit['pass'].$lower_email_addr);
451 451
         }
452 452
 
453 453
         $boinc_user = boincuser_register_make_user($user_params);
454 454
         if (!$boinc_user) {
455
-          // Account exists with this email addr
456
-          form_set_error('email', bts('Error creating BOINC account.', array(), NULL, 'boinc:add-new-user'));
457
-          return;
455
+            // Account exists with this email addr
456
+            form_set_error('email', bts('Error creating BOINC account.', array(), NULL, 'boinc:add-new-user'));
457
+            return;
458 458
         }
459 459
 
460 460
         // Add user to community role by default (not banned)
461 461
         $unrestricted_role = array_search('community member', user_roles(true));
462 462
         $edit['roles'] = array(
463
-          $unrestricted_role => ''
463
+            $unrestricted_role => ''
464 464
         );
465 465
 
466 466
         // Disable show_hosts flag, set to TRUE by default
@@ -471,14 +471,14 @@  discard block
 block discarded – undo
471 471
         // Cross reference Drupal account with BOINC
472 472
         $reference = db_query("INSERT INTO {boincuser} SET uid='%d', boinc_id='%d'", $account->uid, $boinc_user->id);
473 473
         if (!$reference) {
474
-          drupal_set_message(t('Error connecting BOINC account.'), 'error');
475
-          return;
474
+            drupal_set_message(t('Error connecting BOINC account.'), 'error');
475
+            return;
476 476
         }
477 477
 
478 478
         // if terms of use exist, the user must agree.
479 479
         $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
480 480
         if (!empty($termsofuse)) {
481
-          $reference2 = boincuser_consentto_termsofuse($account);
481
+            $reference2 = boincuser_consentto_termsofuse($account);
482 482
         }
483 483
 
484 484
         // Don't save custom fields to the Drupal user object
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
         $edit['boinchash_flag'] = null;
487 487
         // Set email address to lower case in Drupal users table
488 488
         if ($account) {
489
-          user_save($account, array('mail' => $lower_email_addr));
489
+            user_save($account, array('mail' => $lower_email_addr));
490 490
         }
491
-      }
492
-      break;
491
+        }
492
+        break;
493 493
 
494 494
     case 'update':
495 495
       if (isset($edit['update_source'])) {
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
           // Ensure that BOINC data is altered
501 501
 
502 502
           $changing_email = ($edit['mail'] AND $edit['mail'] != $boinc_user->email_addr) ? true : false;
503
-          $changing_pass = ($edit['pass']) ? true : false;
504
-          if ($changing_email OR $changing_pass) {
503
+            $changing_pass = ($edit['pass']) ? true : false;
504
+            if ($changing_email OR $changing_pass) {
505 505
             // set email address to lower-case
506 506
             $lower_email_addr = strtolower($edit['mail']);
507 507
 
@@ -510,47 +510,47 @@  discard block
 block discarded – undo
510 510
             $passwd_hash = password_hash( md5($passwd.$lower_email_addr), PASSWORD_DEFAULT );
511 511
             // Algorithm for changing email and/or password
512 512
             if ($changing_email) {
513
-              // locally store current email to set as previous email
514
-              $prev_email = $account->mail;
515
-              $mytime = (user_access('administer users')) ? $boinc_user->email_addr_change_time : time();
516
-              $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}', previous_email_addr = '{$prev_email}', email_addr_change_time = $mytime";
513
+                // locally store current email to set as previous email
514
+                $prev_email = $account->mail;
515
+                $mytime = (user_access('administer users')) ? $boinc_user->email_addr_change_time : time();
516
+                $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}', previous_email_addr = '{$prev_email}', email_addr_change_time = $mytime";
517 517
             }
518 518
             else {
519
-              $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}'";
519
+                $querypart = "email_addr='{$lower_email_addr}', passwd_hash='{$passwd_hash}'";
520 520
             }
521 521
 
522 522
             // Update user account information
523 523
             $result = $boinc_user->update($querypart);
524 524
 
525 525
             if ($changing_email) {
526
-              // reload account
527
-              $account = user_load($account->uid);
528
-              _boincuser_send_emailchange($account, $lower_email_addr, $prev_email, user_access('administer users'));
526
+                // reload account
527
+                $account = user_load($account->uid);
528
+                _boincuser_send_emailchange($account, $lower_email_addr, $prev_email, user_access('administer users'));
529 529
             }
530 530
 
531 531
             // Change email to edit to lower-case version, this sets
532 532
             // email in Drupal database to the lower-case email
533 533
             // address.
534 534
             $edit['mail'] = strtolower($lower_email_addr);
535
-          }
535
+            }
536 536
 
537
-          // Change boinc username
538
-          if ($edit['boincuser_name'] and ($edit['boincuser_name'] != $boinc_user->name)) {
537
+            // Change boinc username
538
+            if ($edit['boincuser_name'] and ($edit['boincuser_name'] != $boinc_user->name)) {
539 539
             $boincuser_name = $edit['boincuser_name'];
540 540
             $result = $boinc_user->update(
541 541
                 "name='{$boincuser_name}'"
542 542
             );
543
-          }
543
+            }
544 544
 
545
-          break;
545
+            break;
546 546
         case 'user_profile':
547 547
           if ($edit['boincuser_name'] != $boinc_user->name) {
548 548
             $boincuser_name = $edit['boincuser_name'];
549 549
             $result = $boinc_user->update(
550 550
                 "name='{$boincuser_name}'"
551 551
             );
552
-          }
553
-          break;
552
+            }
553
+            break;
554 554
         default:
555 555
         }
556 556
         // We don't want to save update source or duplicate custom fields, so
@@ -558,23 +558,23 @@  discard block
 block discarded – undo
558 558
         $edit['update_source'] = null;
559 559
         $edit['boincuser_name'] = null;
560 560
         $edit['current_pass'] = null;
561
-      }
562
-      break;
561
+        }
562
+        break;
563 563
 
564 564
     case 'login':
565 565
       // Function is forward compatible to Drupal 7
566 566
       boincuser_user_login($edit, $account);
567
-      break;
567
+        break;
568 568
 
569 569
     case 'delete':
570 570
       // Function is forward compatible to Drupal 7
571 571
       boincuser_user_delete($account);
572
-      break;
572
+        break;
573 573
 
574 574
     default:
575 575
 
576 576
     }
577
-  }
577
+    }
578 578
 }
579 579
 
580 580
 /**
@@ -583,39 +583,39 @@  discard block
 block discarded – undo
583 583
  *(forward compatible to Drupal 7).
584 584
  */
585 585
 function boincuser_user_login(&$edit, $account) {
586
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
587
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
588
-
589
-  // Use the same code as boincuser_form_alter(), for case
590
-  // 'user_profile_form', if the refering page is the user password
591
-  // reset form, then do not check for terms of use.
592
-  $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === FALSE) ? 0 : 1;
593
-  if ($reset_pass) {
586
+    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
587
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
588
+
589
+    // Use the same code as boincuser_form_alter(), for case
590
+    // 'user_profile_form', if the refering page is the user password
591
+    // reset form, then do not check for terms of use.
592
+    $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === FALSE) ? 0 : 1;
593
+    if ($reset_pass) {
594 594
     return;
595
-  }
595
+    }
596 596
 
597
-  // Check if user has agreed to terms of use.
598
-  if ( (!empty($termsofuse)) and ($account->uid) and
597
+    // Check if user has agreed to terms of use.
598
+    if ( (!empty($termsofuse)) and ($account->uid) and
599 599
        (!boincuser_check_termsofuse($account)) and ($existinguser_tou) ) {
600 600
 
601 601
     // Admins are exempted.
602 602
     $administrator_role = array_search('administrator', user_roles(true));
603 603
     if (!isset($account->roles[$administrator_role])) {
604 604
 
605
-      // Find and save the current destination and use as an parameter
606
-      // to send the user back to here he/she came from.
607
-      $np = ltrim('user/termsofuse', '/');
608
-      $path_for_destination = rawurlencode($np);
605
+        // Find and save the current destination and use as an parameter
606
+        // to send the user back to here he/she came from.
607
+        $np = ltrim('user/termsofuse', '/');
608
+        $path_for_destination = rawurlencode($np);
609 609
 
610
-      $query_for_destination = '';
611
-      $prevdest = $_REQUEST['destination'];
612
-      if ($prevdest) {
610
+        $query_for_destination = '';
611
+        $prevdest = $_REQUEST['destination'];
612
+        if ($prevdest) {
613 613
         $query_for_destination = '?destination=' . $prevdest;
614
-      }
615
-      $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
614
+        }
615
+        $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
616 616
 
617 617
     }
618
-  }
618
+    }
619 619
 }
620 620
 
621 621
 /**
@@ -624,16 +624,16 @@  discard block
 block discarded – undo
624 624
  */
625 625
 function boincuser_user_delete($account) {
626 626
 
627
-  $boincid = $account->boincuser_id;
628
-  // bug in comment module, remove user name from comments. Find all
629
-  // comments with uid=0 and clear the field 'name'.
630
-  $qrc1 = db_query("UPDATE {comments} SET comments.name='' WHERE comments.uid=0");
627
+    $boincid = $account->boincuser_id;
628
+    // bug in comment module, remove user name from comments. Find all
629
+    // comments with uid=0 and clear the field 'name'.
630
+    $qrc1 = db_query("UPDATE {comments} SET comments.name='' WHERE comments.uid=0");
631 631
 
632
-  // Delete entry in drupal boincuser table.
633
-  $qrc2 = db_query("DELETE FROM {boincuser} WHERE uid=%d", $account->uid);
634
-  if (!$qrc2) {
632
+    // Delete entry in drupal boincuser table.
633
+    $qrc2 = db_query("DELETE FROM {boincuser} WHERE uid=%d", $account->uid);
634
+    if (!$qrc2) {
635 635
     watchdog('user', 'Error deleting user account, boincuser table UID: %uid.', array('%uid' => $account->uid), WATCHDOG_ERROR);
636
-  }
636
+    }
637 637
 }
638 638
 
639 639
 
@@ -642,13 +642,13 @@  discard block
 block discarded – undo
642 642
  * Obsolete in Drupal 7...
643 643
  */
644 644
 function boincuser_nodeapi(&$node, $op, $a3 = null, $a4 = null) {
645
-  // In Drupal 7, these operation cases will all exist as their own hooks,
646
-  // so let's approximate that here so that this function can simply be removed
647
-  // upon migration to 7
648
-  switch($op) {
649
-  case 'update':
645
+    // In Drupal 7, these operation cases will all exist as their own hooks,
646
+    // so let's approximate that here so that this function can simply be removed
647
+    // upon migration to 7
648
+    switch($op) {
649
+    case 'update':
650 650
     boincuser_node_update($node);
651
-  }
651
+    }
652 652
 }
653 653
 
654 654
 /**
@@ -656,8 +656,8 @@  discard block
 block discarded – undo
656 656
  * is updated (forward compatible to Drupal 7)
657 657
  */
658 658
 function boincuser_node_update($node) {
659
-  switch($node->type) {
660
-  case 'profile':
659
+    switch($node->type) {
660
+    case 'profile':
661 661
     // Update the BOINC database directly
662 662
     $account = user_load($node->uid);
663 663
     // Save user account data
@@ -669,11 +669,11 @@  discard block
 block discarded – undo
669 669
       UPDATE user
670 670
       SET country = '%s', postal_code = '%s', url = '%s', has_profile = 1
671 671
       WHERE id = %d",
672
-      $country, $postal_code, $url, $account->boincuser_id
672
+        $country, $postal_code, $url, $account->boincuser_id
673 673
     );
674 674
     db_set_active('default');
675 675
     if (!$account_updated) {
676
-      drupal_set_message(t('Error saving BOINC account info.'), 'error');
676
+        drupal_set_message(t('Error saving BOINC account info.'), 'error');
677 677
     }
678 678
     // Save profile data
679 679
     $response1 = $node->field_background[0]['value'];
@@ -684,16 +684,16 @@  discard block
 block discarded – undo
684 684
       SET userid = %d, response1 = '%s', response2 = '%s'
685 685
       ON DUPLICATE KEY UPDATE
686 686
         response1 = '%s', response2 = '%s'",
687
-      $account->boincuser_id, $response1, $response2,
688
-      $response1, $response2
687
+        $account->boincuser_id, $response1, $response2,
688
+        $response1, $response2
689 689
     );
690 690
     db_set_active('default');
691 691
     if (!$profile_updated) {
692
-      drupal_set_message(t('Error saving BOINC profile.'), 'error');
692
+        drupal_set_message(t('Error saving BOINC profile.'), 'error');
693 693
     }
694 694
     break;
695 695
 
696
-  default:
696
+    default:
697 697
 
698 698
   }
699 699
 }
@@ -702,21 +702,21 @@  discard block
 block discarded – undo
702 702
 * Implementation of hook_views_api()
703 703
 */
704 704
 function boincuser_views_api() {
705
-  return array(
705
+    return array(
706 706
     'api' => 2.0,
707 707
     'path' => drupal_get_path('module', 'boincuser')
708
-  );
708
+    );
709 709
 }
710 710
 
711 711
 /**
712 712
 * Implementation of hook_form_alter()
713 713
 */
714 714
 function boincuser_form_alter(&$form, $form_state, $form_id) {
715
-  require_boinc('token');
715
+    require_boinc('token');
716 716
 
717
-  global $user;
718
-  switch ($form_id) {
719
-  case 'flag_confirm':
717
+    global $user;
718
+    switch ($form_id) {
719
+    case 'flag_confirm':
720 720
     // The URL seems to be the only way to put any kind of context to this
721 721
     // request!
722 722
     $action = arg(2);
@@ -725,25 +725,25 @@  discard block
 block discarded – undo
725 725
 
726 726
     // Wrap action buttons for styling consistency
727 727
     $form['form control tabs prefix'] = array(
728
-      '#value' => '<ul class="form-control tab-list">',
729
-      '#weight' => 1001,
728
+        '#value' => '<ul class="form-control tab-list">',
729
+        '#weight' => 1001,
730 730
     );
731 731
 
732 732
     switch ($flag_type) {
733 733
     case 'friend':
734 734
       $friend_id = $form['content_id']['#value'];
735
-      $flag = flag_get_flag('friend');
736
-      $friend_status = flag_friend_determine_friend_status($flag, $friend_id, $user->uid);
737
-
738
-      // General friend form overrides
739
-      $form['flag_friend_submit']['#prefix'] = '<li class="first tab">';
740
-      $form['flag_friend_submit']['#value'] = bts('Send request', array(), NULL, 'boinc:friends-page');
741
-      $form['flag_friend_submit']['#type'] = 'submit';
742
-      $form['flag_friend_submit']['#suffix'] = '</li>';
743
-      $form['flag_friend_submit']['#weight'] = 1002;
744
-
745
-      switch ($friend_status) {
746
-      case FLAG_FRIEND_BOTH:
735
+        $flag = flag_get_flag('friend');
736
+        $friend_status = flag_friend_determine_friend_status($flag, $friend_id, $user->uid);
737
+
738
+        // General friend form overrides
739
+        $form['flag_friend_submit']['#prefix'] = '<li class="first tab">';
740
+        $form['flag_friend_submit']['#value'] = bts('Send request', array(), NULL, 'boinc:friends-page');
741
+        $form['flag_friend_submit']['#type'] = 'submit';
742
+        $form['flag_friend_submit']['#suffix'] = '</li>';
743
+        $form['flag_friend_submit']['#weight'] = 1002;
744
+
745
+        switch ($friend_status) {
746
+        case FLAG_FRIEND_BOTH:
747 747
       case FLAG_FRIEND_FLAGGED:
748 748
         unset($form['actions']);
749 749
         $form['flag_friend_submit']['#value'] = bts('Remove friend', array(), NULL, 'boinc:friends-remove');
@@ -752,53 +752,53 @@  discard block
 block discarded – undo
752 752
         $form['#submit'][] = 'boincuser_fix_unfriend_form_submit';
753 753
         $form['#submit'][] = $final_handler;
754 754
         break;
755
-      case FLAG_FRIEND_PENDING:
755
+        case FLAG_FRIEND_PENDING:
756 756
         unset($form['actions']);
757 757
         $form['flag_friend_submit']['#value'] = bts('Remove request', array(), NULL, 'boinc:friends-page');
758 758
         break;
759
-      case FLAG_FRIEND_APPROVAL:
759
+        case FLAG_FRIEND_APPROVAL:
760 760
         if ($action == 'flag') {
761
-          $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
761
+            $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
762 762
         }
763 763
         elseif ($action == 'unflag') {
764
-          unset($form['actions']);
765
-          $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
764
+            unset($form['actions']);
765
+            $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
766 766
         }
767 767
         break;
768
-      case FLAG_FRIEND_UNFLAGGED:
768
+        case FLAG_FRIEND_UNFLAGGED:
769 769
       default:
770 770
         $user_links[] = array(
771
-          'title' => bts('Add as friend', array(), NULL, 'boinc:friends-add'),
772
-          'href' => "flag/confirm/flag/friend/{$account->uid}"
771
+            'title' => bts('Add as friend', array(), NULL, 'boinc:friends-add'),
772
+            'href' => "flag/confirm/flag/friend/{$account->uid}"
773 773
         );
774
-      }
775
-      break;
774
+        }
775
+        break;
776 776
 
777 777
     default:
778 778
     }
779 779
 
780 780
     $form['cancel'] = array(
781
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
782
-      '#weight' => 1004,
781
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
782
+        '#weight' => 1004,
783 783
     );
784 784
     $form['form control tabs suffix'] = array(
785
-      '#value' => '</ul>',
786
-      '#weight' => 1010,
785
+        '#value' => '</ul>',
786
+        '#weight' => 1010,
787 787
     );
788 788
 
789 789
     break;
790 790
 
791
-  // General node edit form
792
-  case 'news_node_form':
791
+    // General node edit form
792
+    case 'news_node_form':
793 793
     $form['separator_bottom'] = array(
794
-      '#value' => '<div class="separator buttons"></div>',
795
-      '#weight' => 999,
794
+        '#value' => '<div class="separator buttons"></div>',
795
+        '#weight' => 999,
796 796
     );
797 797
 
798 798
     // Wrap action buttons for styling consistency
799 799
     $form['buttons']['form control tabs prefix'] = array(
800
-      '#value' => '<ul class="form-control tab-list">',
801
-      '#weight' => 1001,
800
+        '#value' => '<ul class="form-control tab-list">',
801
+        '#weight' => 1001,
802 802
     );
803 803
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
804 804
     $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
@@ -811,15 +811,15 @@  discard block
 block discarded – undo
811 811
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
812 812
     $form['buttons']['preview_changes']['#weight'] = 1004;
813 813
     $form['buttons']['cancel'] = array(
814
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
815
-      '#weight' => 1005,
814
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
815
+        '#weight' => 1005,
816 816
     );
817 817
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
818 818
     $form['buttons']['delete']['#suffix'] = '</li>';
819 819
     $form['buttons']['delete']['#weight'] = 1006;
820 820
     $form['buttons']['form control tabs suffix'] = array(
821
-      '#value' => '</ul>',
822
-      '#weight' => 1010,
821
+        '#value' => '</ul>',
822
+        '#weight' => 1010,
823 823
     );
824 824
 
825 825
     // Preview is ugly, unset until it works
@@ -827,16 +827,16 @@  discard block
 block discarded – undo
827 827
 
828 828
     break;
829 829
 
830
-  case 'node_delete_confirm':
830
+    case 'node_delete_confirm':
831 831
     $form['separator_bottom'] = array(
832
-      '#value' => '<div class="separator buttons"></div>',
833
-      '#weight' => 999,
832
+        '#value' => '<div class="separator buttons"></div>',
833
+        '#weight' => 999,
834 834
     );
835 835
 
836 836
     // Wrap action buttons for styling consistency
837 837
     $form['actions']['form control tabs prefix'] = array(
838
-      '#value' => '<ul class="form-control tab-list">',
839
-      '#weight' => 1001,
838
+        '#value' => '<ul class="form-control tab-list">',
839
+        '#weight' => 1001,
840 840
     );
841 841
     $form['actions']['submit']['#prefix'] = '<li class="first tab">';
842 842
     $form['actions']['submit']['#value'] = bts('Delete', array(), NULL, 'boinc:form-delete');
@@ -844,23 +844,23 @@  discard block
 block discarded – undo
844 844
     $form['actions']['submit']['#weight'] = 1002;
845 845
     $form['actions']['cancel'] = array(
846 846
         '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
847
-      '#weight' => 1005,
847
+        '#weight' => 1005,
848 848
     );
849 849
     $form['actions']['form control tabs suffix'] = array(
850
-      '#value' => '</ul>',
851
-      '#weight' => 1010,
850
+        '#value' => '</ul>',
851
+        '#weight' => 1010,
852 852
     );
853 853
     $form['#redirect'] = 'account/profile';
854 854
     break;
855 855
 
856
-  case 'privatemsg_new':
856
+    case 'privatemsg_new':
857 857
 
858 858
     $form['privatemsg']['body']['#title'] = '';
859 859
 
860 860
     // Wrap action buttons for styling consistency
861 861
     $form['privatemsg']['form control tabs prefix'] = array(
862
-      '#value' => '<ul class="form-control tab-list">',
863
-      '#weight' => 1001,
862
+        '#value' => '<ul class="form-control tab-list">',
863
+        '#weight' => 1001,
864 864
     );
865 865
     $form['privatemsg']['submit']['#prefix'] = '<li class="first tab">';
866 866
     $form['privatemsg']['submit']['#value'] = bts('Send message', array(), NULL, 'boinc:private-message');
@@ -870,26 +870,26 @@  discard block
 block discarded – undo
870 870
     $form['privatemsg']['preview']['#suffix'] = '</li>';
871 871
     $form['privatemsg']['preview']['#weight'] = 1003;
872 872
     $form['privatemsg']['cancel'] = array(
873
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
874
-      '#weight' => 1004,
873
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
874
+        '#weight' => 1004,
875 875
     );
876 876
     $form['privatemsg']['form control tabs suffix'] = array(
877
-      '#value' => '</ul>',
878
-      '#weight' => 1010,
877
+        '#value' => '</ul>',
878
+        '#weight' => 1010,
879 879
     );
880 880
 
881 881
     unset($form['privatemsg']['recipient_display']);
882 882
 
883 883
     break;
884 884
 
885
-  // Login form
886
-  case 'user_login':
885
+    // Login form
886
+    case 'user_login':
887 887
   case 'user_login_block':
888 888
       drupal_set_title(bts('Login', array(), NULL, 'boinc:menu-link'));
889 889
     // Replace name with email in login form
890 890
     unset($form['name']);
891 891
     array_unshift($form, array(
892
-      'email' => array(
892
+        'email' => array(
893 893
         '#type' => 'textfield',
894 894
         '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
895 895
         '#size' => ($form_id == 'user_login_block') ? 15 : 60,
@@ -897,18 +897,18 @@  discard block
 block discarded – undo
897 897
         '#required' => TRUE,
898 898
         '#attributes' => array('tabindex' => '1'),
899 899
         '#description' => bts('Enter your @s email address.', array('@s' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:standard-login-page')
900
-      ),
901
-      'validation_source' => array(
900
+        ),
901
+        'validation_source' => array(
902 902
         '#type' => 'hidden',
903 903
         '#value' => 'user_login'
904
-      )
904
+        )
905 905
     ));
906 906
     $form['#redirect'] = 'home';
907 907
 
908 908
     // Wrap action buttons for styling consistency
909 909
     $form['buttons']['form control tabs prefix'] = array(
910
-      '#value' => '<ul class="form-control tab-list">',
911
-      '#weight' => 1001,
910
+        '#value' => '<ul class="form-control tab-list">',
911
+        '#weight' => 1001,
912 912
     );
913 913
     $form['buttons']['submit'] = $form['submit'];
914 914
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
@@ -916,8 +916,8 @@  discard block
 block discarded – undo
916 916
     $form['buttons']['submit']['#suffix'] = '</li>';
917 917
     $form['buttons']['submit']['#weight'] = 1002;
918 918
     $form['buttons']['form control tabs suffix'] = array(
919
-      '#value' => '</ul>',
920
-      '#weight' => 1010,
919
+        '#value' => '</ul>',
920
+        '#weight' => 1010,
921 921
     );
922 922
     unset($form['submit']);
923 923
 
@@ -926,23 +926,23 @@  discard block
 block discarded – undo
926 926
     isset($form['buttons']['submit']['#attributes']) ? array_push($form['buttons']['submit']['#attributes'], array('tabindex' => '3')) : $form['buttons']['submit']['#attributes'] = array('tabindex' => '3');
927 927
     // If the user login form is being submitted, use BOINC validation handler.
928 928
     if (isset($form_state['post']['email']) and isset($form_state['post']['pass'])) {
929
-      // Find the local validation function's entry so we can replace it.
930
-      $array_key = array_search('user_login_authenticate_validate', $form['#validate']);
931
-      if ($array_key === FALSE) {
929
+        // Find the local validation function's entry so we can replace it.
930
+        $array_key = array_search('user_login_authenticate_validate', $form['#validate']);
931
+        if ($array_key === FALSE) {
932 932
         // Could not find it. Some other module must have run form_alter().
933 933
         // We will simply add our validation just before the final validator.
934 934
         $final_validator = array_pop($form['#validate']);
935 935
         $form['#validate'][] = 'boincuser_login_validate';
936 936
         $form['#validate'][] = $final_validator;
937
-      } else {
937
+        } else {
938 938
         // Replace the local validation function with BOINC validation
939 939
         $form['#validate'][$array_key] = 'boincuser_login_validate';
940
-      }
940
+        }
941 941
     }
942 942
     break;
943 943
 
944
-  // User credentials form
945
-  case 'user_profile_form':
944
+    // User credentials form
945
+    case 'user_profile_form':
946 946
 
947 947
     // Use the displaly name as the title, not the username
948 948
     $account = user_load($form['#uid']);
@@ -950,28 +950,28 @@  discard block
 block discarded – undo
950 950
 
951 951
     // Message for admins
952 952
     if (user_access('administer users')) {
953
-      drupal_set_message(
953
+        drupal_set_message(
954 954
         bts('WARNING: You are editing the information for user. Please note: you may change a user\'s password by itself. But to change the user\'s email address you must change both the email address and the password simultaneously.')
955
-      , 'warning');
955
+        , 'warning');
956 956
     }
957 957
 
958 958
     // Set special message if user has not agreed to TOU
959 959
     $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
960 960
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
961 961
     if ( (!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users')) ) {
962
-      drupal_set_message(
962
+        drupal_set_message(
963 963
         bts('INFO: You have not agreed to the terms of use for @project. You may use this form to change your email address and/or password. Please note: you may not delete your account within seven (7) days of changing your email address.',
964 964
         array(
965
-          '@project' => variable_get('site_name','Drupal-BOINC'),
965
+            '@project' => variable_get('site_name','Drupal-BOINC'),
966 966
         ), NULL, 'boinc:account-credentials-change')
967
-      , 'info');
967
+        , 'info');
968 968
     }
969 969
 
970 970
     // A bit hackish... but don't require the user to enter his password if
971 971
     // coming from the password reset function
972 972
     $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/{$form['#uid']}") === FALSE) ? 0 : 1;
973 973
     if ($reset_pass) {
974
-      $_SESSION['reset_pass'] = 1;
974
+        $_SESSION['reset_pass'] = 1;
975 975
     }
976 976
 
977 977
     // Adjust form elements already present
@@ -983,8 +983,8 @@  discard block
 block discarded – undo
983 983
     $form['account']['pass']['#size'] = 17;
984 984
 
985 985
     if (user_access('administer users')) {
986
-      // Add BOINC username (aka displayname)
987
-      $form['account']['boincuser_name'] = array(
986
+        // Add BOINC username (aka displayname)
987
+        $form['account']['boincuser_name'] = array(
988 988
         '#type' => 'textfield',
989 989
         '#title' => bts('BOINC Username', array(), NULL, 'boinc:user-or-team-name'),
990 990
         '#default_value' => $account->boincuser_name,
@@ -992,68 +992,68 @@  discard block
 block discarded – undo
992 992
         '#required' => TRUE,
993 993
         '#description' => bts('This is the BOINC (external) username. This is the same setting as found in Account -> Preferences -> Community.', array(), NULL, 'boinc:username-change'),
994 994
         '#size' => 40,
995
-      );
995
+        );
996 996
     }
997 997
 
998 998
     // If email address was changed less than 7 days (7 * 86400 s)
999 999
     // ago, it cannot be changed again.
1000 1000
     $duration = TOKEN_DURATION_ONE_WEEK;
1001 1001
     if (($account->boincuser_email_addr_change_time + $duration) > time() and (!user_access('administer users'))) {
1002
-      $form['account']['mail']['#required'] = FALSE;
1003
-      $form['account']['mailhelp'] = array(
1002
+        $form['account']['mail']['#required'] = FALSE;
1003
+        $form['account']['mailhelp'] = array(
1004 1004
         '#value' => bts("You email address was changed within the past seven (7) days. Please look for an email to !prev_email if you need to revert this change. You may change your email address on !time.",
1005
-          array(
1005
+            array(
1006 1006
             '!prev_email' => $account->boincuser_previous_email_addr,
1007 1007
             '!time' => date('F j, Y \a\t G:i T', $account->boincuser_email_addr_change_time + $duration),
1008
-          ), NULL, 'boinc:account-credentials-change'),
1009
-      );
1008
+            ), NULL, 'boinc:account-credentials-change'),
1009
+        );
1010 1010
     }
1011 1011
 
1012 1012
     if (!$reset_pass AND ($user->uid == $account->uid OR !user_access('administer users'))) {
1013
-      // Add a password authenticator, required to change email or pw
1014
-      $form['account']['current_pass'] = array(
1013
+        // Add a password authenticator, required to change email or pw
1014
+        $form['account']['current_pass'] = array(
1015 1015
         '#type' => 'password',
1016 1016
         '#title' => bts('Enter your password to save changes', array(), NULL, 'boinc:account-credentials-change'),
1017 1017
         '#description' => bts('Enter your current password if changing your email
1018 1018
           address or password.', array(), NULL, 'boinc:account-credentials-change'),
1019 1019
         '#size' => 17,
1020 1020
         '#attributes' => array(
1021
-          'autocomplete' => 'off',
1021
+            'autocomplete' => 'off',
1022 1022
         ),
1023
-      );
1023
+        );
1024 1024
     }
1025 1025
 
1026 1026
     // Add account keys, CPID, etc
1027 1027
     $form['account']['boincuser_id'] = array(
1028
-      '#value' => '
1028
+        '#value' => '
1029 1029
         <div class="form-item">
1030 1030
           <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1031 1031
           <span>' . $account->boincuser_id . '</span>
1032 1032
         </div>',
1033 1033
     );
1034 1034
     $form['account']['user_id'] = array(
1035
-      '#value' => '
1035
+        '#value' => '
1036 1036
         <div class="form-item">
1037 1037
           <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1038 1038
           <span>' . $account->uid . '</span>
1039 1039
         </div>',
1040 1040
     );
1041 1041
     $form['account']['account_key'] = array(
1042
-      '#value' => '
1042
+        '#value' => '
1043 1043
         <div class="form-item">
1044 1044
           <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1045 1045
           <span>' . $account->boincuser_account_key . '</span>
1046 1046
         </div>',
1047 1047
     );
1048 1048
     $form['account']['weak_account_key'] = array(
1049
-      '#value' => '
1049
+        '#value' => '
1050 1050
         <div class="form-item">
1051 1051
           <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1052 1052
           <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
1053 1053
         </div>',
1054 1054
     );
1055 1055
     $form['account']['cpid'] = array(
1056
-      '#value' => '
1056
+        '#value' => '
1057 1057
         <div class="form-item">
1058 1058
           <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1059 1059
           <span>' . $account->boincuser_cpid . '</span>
@@ -1061,30 +1061,30 @@  discard block
 block discarded – undo
1061 1061
     );
1062 1062
 
1063 1063
     $form['account']['separator_bottom'] = array(
1064
-      '#value' => '<div class="separator buttons"></div>'
1064
+        '#value' => '<div class="separator buttons"></div>'
1065 1065
     );
1066 1066
 
1067 1067
     // Wrap action buttons for styling consistency
1068 1068
     $form['form control tabs prefix'] = array(
1069
-      '#value' => '<ul class="form-control tab-list">',
1070
-      '#weight' => 1001,
1069
+        '#value' => '<ul class="form-control tab-list">',
1070
+        '#weight' => 1001,
1071 1071
     );
1072 1072
     $form['submit']['#prefix'] = '<li class="first tab">';
1073 1073
     $form['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
1074 1074
     $form['submit']['#suffix'] = '</li>';
1075 1075
     $form['submit']['#weight'] = 1002;
1076 1076
     $form['cancel'] = array(
1077
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1078
-      '#weight' => 1003,
1077
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1078
+        '#weight' => 1003,
1079 1079
     );
1080 1080
     if (isset($form['delete']) AND is_array($form['delete'])) {
1081
-      $form['delete']['#prefix'] = '<li class="first alt tab">';
1082
-      $form['delete']['#suffix'] = '</li>';
1083
-      $form['delete']['#weight'] = 1004;
1081
+        $form['delete']['#prefix'] = '<li class="first alt tab">';
1082
+        $form['delete']['#suffix'] = '</li>';
1083
+        $form['delete']['#weight'] = 1004;
1084 1084
     }
1085 1085
     $form['form control tabs suffix'] = array(
1086
-      '#value' => '</ul>',
1087
-      '#weight' => 1010,
1086
+        '#value' => '</ul>',
1087
+        '#weight' => 1010,
1088 1088
     );
1089 1089
 
1090 1090
     // Rearrange form elements
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
     // Remove redundant / unnecessary form elements
1105 1105
     unset($form['theme_select']);
1106 1106
     if (!module_exists('boincuser_delete')) {
1107
-      unset($form['delete']);
1107
+        unset($form['delete']);
1108 1108
     }
1109 1109
 
1110 1110
     // These are on the Community preferences form (boincwork module)
@@ -1120,18 +1120,18 @@  discard block
 block discarded – undo
1120 1120
 
1121 1121
     // Internal fields to indicate where these user changes are taking place
1122 1122
     array_unshift($form, array(
1123
-      'validation_source' => array(
1123
+        'validation_source' => array(
1124 1124
         '#type' => 'hidden',
1125 1125
         '#value' => 'user_account'
1126
-      ),
1127
-      'update_source' => array(
1126
+        ),
1127
+        'update_source' => array(
1128 1128
         '#type' => 'hidden',
1129 1129
         '#value' => 'user_account'
1130
-      )
1130
+        )
1131 1131
     ));
1132 1132
     break;
1133 1133
 
1134
-  case 'profile_node_form':
1134
+    case 'profile_node_form':
1135 1135
 
1136 1136
     // Use the display name as the title, not the username
1137 1137
     $account = user_load($form['uid']['#value']);
@@ -1142,22 +1142,22 @@  discard block
 block discarded – undo
1142 1142
     $form['title']['#access'] = FALSE;
1143 1143
 
1144 1144
     $form['separator_bottom'] = array(
1145
-      '#value' => '<div class="separator buttons"></div>',
1146
-      '#weight' => 999,
1145
+        '#value' => '<div class="separator buttons"></div>',
1146
+        '#weight' => 999,
1147 1147
     );
1148 1148
 
1149 1149
     if (module_exists('captcha')) {
1150
-      // Add an optional captcha
1151
-      $form['profile_captcha'] = array(
1150
+        // Add an optional captcha
1151
+        $form['profile_captcha'] = array(
1152 1152
         '#type' => 'captcha',
1153 1153
         '#weight' => 1000,
1154
-      );
1154
+        );
1155 1155
     }
1156 1156
 
1157 1157
     // Wrap action buttons for styling consistency
1158 1158
     $form['buttons']['form control tabs prefix'] = array(
1159
-      '#value' => '<ul class="form-control tab-list">',
1160
-      '#weight' => 1001,
1159
+        '#value' => '<ul class="form-control tab-list">',
1160
+        '#weight' => 1001,
1161 1161
     );
1162 1162
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
1163 1163
     $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
@@ -1170,8 +1170,8 @@  discard block
 block discarded – undo
1170 1170
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
1171 1171
     $form['buttons']['preview_changes']['#weight'] = 1004;
1172 1172
     $form['buttons']['cancel'] = array(
1173
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1174
-      '#weight' => 1005,
1173
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1174
+        '#weight' => 1005,
1175 1175
     );
1176 1176
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
1177 1177
     $form['buttons']['delete']['#suffix'] = '</li>';
@@ -1179,8 +1179,8 @@  discard block
 block discarded – undo
1179 1179
     $form['buttons']['delete']['#weight'] = 1006;
1180 1180
     $form['buttons']['delete']['#submit'] = array('_boincuser_node_profile_delete_submit');
1181 1181
     $form['buttons']['form control tabs suffix'] = array(
1182
-      '#value' => '</ul>',
1183
-      '#weight' => 1010,
1182
+        '#value' => '</ul>',
1183
+        '#weight' => 1010,
1184 1184
     );
1185 1185
 
1186 1186
     $form['#after_build'][] = 'boincuser_profile_node_form_after_build';
@@ -1193,33 +1193,33 @@  discard block
 block discarded – undo
1193 1193
 
1194 1194
     // Internal fields to indicate where these user changes are taking place
1195 1195
     array_unshift($form, array(
1196
-      'validation_source' => array(
1196
+        'validation_source' => array(
1197 1197
         '#type' => 'hidden',
1198 1198
         '#value' => 'user_profile'
1199
-      ),
1200
-      'update_source' => array(
1199
+        ),
1200
+        'update_source' => array(
1201 1201
         '#type' => 'hidden',
1202 1202
         '#value' => 'user_profile'
1203
-      )
1203
+        )
1204 1204
     ));
1205 1205
     break;
1206 1206
 
1207
-  // Registration form
1208
-  case 'user_register':
1207
+    // Registration form
1208
+    case 'user_register':
1209 1209
     array_unshift($form, array(
1210
-      'boincuser_name' => array(
1210
+        'boincuser_name' => array(
1211 1211
         '#type' => 'textfield',
1212 1212
         '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1213 1213
         '#default_value' => $edit['boincuser_name'],
1214 1214
         '#maxlength' => USERNAME_MAX_LENGTH,
1215 1215
         '#description' => bts('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.', array(), NULL, 'boinc:user-register'),
1216 1216
         '#required' => TRUE
1217
-      ),
1217
+        ),
1218 1218
     ));
1219 1219
     // Set name temporarily to dummy value to beat validation
1220 1220
     $form['name'] = array(
1221
-      '#type' => 'hidden',
1222
-      '#value' => rand() . '.' . time()
1221
+        '#type' => 'hidden',
1222
+        '#value' => rand() . '.' . time()
1223 1223
     );
1224 1224
 
1225 1225
     // Add JS for submit button disabling
@@ -1229,50 +1229,50 @@  discard block
 block discarded – undo
1229 1229
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
1230 1230
     if (!empty($termsofuse)) {
1231 1231
 
1232
-      $form['termsofuse'] = array(
1232
+        $form['termsofuse'] = array(
1233 1233
         '#type'   => 'fieldset',
1234 1234
         '#prefix' => '<div id="termsofuse-wrapper">', // This is our wrapper div.
1235 1235
         '#suffix' => '</div>',
1236 1236
         '#tree'   => TRUE,
1237 1237
         '#weight' => -15,
1238
-      );
1238
+        );
1239 1239
 
1240
-      $form['termsofuse']['title1'] = array(
1240
+        $form['termsofuse']['title1'] = array(
1241 1241
         '#weight' => -12,
1242 1242
         '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register' ) . '</h2>',
1243 1243
         '#prefix' => '<div id="register-title1">',
1244 1244
         '#suffix' => '</div>',
1245
-      );
1245
+        );
1246 1246
 
1247
-      $form['termsofuse']['body'] = array(
1247
+        $form['termsofuse']['body'] = array(
1248 1248
         '#weight' => -10,
1249 1249
         '#value' => bts($termsofuse, array(), NULL, 'project:user-register'),
1250 1250
         '#prefix' => '<div id="register-termsofuse">',
1251 1251
         '#suffix' => '</div>',
1252
-      );
1252
+        );
1253 1253
 
1254
-      $form['termsofuse']['agreeTOU'] = array(
1254
+        $form['termsofuse']['agreeTOU'] = array(
1255 1255
         '#type' => 'checkbox',
1256 1256
         '#title' => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), NULL, 'project:user-register'),
1257 1257
         '#weight' => -8,
1258 1258
         '#prefix' => '<div id="register-checkbox">',
1259 1259
         '#suffix' => '</div>',
1260
-      );
1260
+        );
1261 1261
     }
1262 1262
 
1263 1263
     $form['title2'] = array(
1264
-      '#weight' => -6,
1265
-      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1266
-      '#prefix' => '<div id="register-title2">',
1267
-      '#suffix' => '</div>',
1264
+        '#weight' => -6,
1265
+        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1266
+        '#prefix' => '<div id="register-title2">',
1267
+        '#suffix' => '</div>',
1268 1268
     );
1269 1269
 
1270 1270
     if (module_exists('captcha')) {
1271
-      // Add an optional captcha
1272
-      $form['register_captcha'] = array(
1271
+        // Add an optional captcha
1272
+        $form['register_captcha'] = array(
1273 1273
         '#type' => 'captcha',
1274 1274
         '#weight' => 1000,
1275
-      );
1275
+        );
1276 1276
     }
1277 1277
 
1278 1278
     $form['#validate'][] = 'boincuser_register_validate';
@@ -1280,45 +1280,45 @@  discard block
 block discarded – undo
1280 1280
     $form['submit']['#weight'] = 1001;
1281 1281
     break;
1282 1282
 
1283
-  // Request new password form
1284
-  case 'user_pass':
1283
+    // Request new password form
1284
+    case 'user_pass':
1285 1285
     drupal_set_title(bts('Forgot password', array(), NULL, 'boinc:forgot-password'));
1286 1286
     // Replace name/email text box with email only; retain "name" label
1287 1287
     // for compatibility with standard Drupal submit function
1288 1288
     unset($form['name']);
1289 1289
     array_unshift($form, array(
1290
-      'name' => array(
1290
+        'name' => array(
1291 1291
         '#type' => 'textfield',
1292 1292
         '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
1293 1293
         '#size' => 60,
1294 1294
         '#maxlength' => EMAIL_MAX_LENGTH,
1295 1295
         '#required' => TRUE,
1296 1296
         '#description' => bts(
1297
-          'Enter your email address to receive instructions for resetting your password (or use the !authenticator_login).',
1298
-          array(
1297
+            'Enter your email address to receive instructions for resetting your password (or use the !authenticator_login).',
1298
+            array(
1299 1299
             '!authenticator_login' => l(
1300
-              bts('authenticator-based login', array(), NULL, 'boinc:forgot-password'),
1301
-              'user/login/auth'
1300
+                bts('authenticator-based login', array(), NULL, 'boinc:forgot-password'),
1301
+                'user/login/auth'
1302
+            )
1302 1303
             )
1303
-          )
1304 1304
         , NULL, 'boinc:forgot-password'),
1305
-      ),
1305
+        ),
1306 1306
     ));
1307 1307
 
1308 1308
     if (module_exists('captcha')) {
1309
-      // Add an optional captcha
1310
-      $form['register_captcha'] = array(
1309
+        // Add an optional captcha
1310
+        $form['register_captcha'] = array(
1311 1311
         '#type' => 'captcha',
1312 1312
         '#weight' => 0,
1313 1313
         '#prefix' => '<div id="captcha-password-reset">',
1314 1314
         '#suffix' => '</div>'
1315
-      );
1315
+        );
1316 1316
     }
1317 1317
 
1318 1318
     // Wrap action buttons for styling consistency
1319 1319
     $form['buttons']['form control tabs prefix'] = array(
1320
-      '#value' => '<ul class="form-control tab-list">',
1321
-      '#weight' => 1001,
1320
+        '#value' => '<ul class="form-control tab-list">',
1321
+        '#weight' => 1001,
1322 1322
     );
1323 1323
     $form['buttons']['submit'] = $form['submit'];
1324 1324
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
@@ -1326,26 +1326,26 @@  discard block
 block discarded – undo
1326 1326
     $form['buttons']['submit']['#suffix'] = '</li>';
1327 1327
     $form['buttons']['submit']['#weight'] = 1002;
1328 1328
     $form['buttons']['cancel'] = array(
1329
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1330
-      '#weight' => 1005,
1329
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1330
+        '#weight' => 1005,
1331 1331
     );
1332 1332
     $form['buttons']['form control tabs suffix'] = array(
1333
-      '#value' => '</ul>',
1334
-      '#weight' => 1010,
1333
+        '#value' => '</ul>',
1334
+        '#weight' => 1010,
1335 1335
     );
1336 1336
     unset($form['submit']);
1337 1337
 
1338 1338
     // If the form is being submitted, use BOINC validation handler.
1339 1339
     if (isset($form_state['post']['name'])) {
1340
-      // Prepend the BOINC validation function to local validation
1341
-      array_unshift($form['#validate'], 'boincuser_request_pass_validate');
1340
+        // Prepend the BOINC validation function to local validation
1341
+        array_unshift($form['#validate'], 'boincuser_request_pass_validate');
1342 1342
     }
1343 1343
     break;
1344 1344
 
1345
-  case 'views_exposed_form':
1345
+    case 'views_exposed_form':
1346 1346
       $form['submit']['#value'] = bts('Search', array(), NULL, 'boinc:search-user');
1347 1347
     break;
1348
-  }
1348
+    }
1349 1349
 }
1350 1350
 
1351 1351
 /**
@@ -1353,10 +1353,10 @@  discard block
 block discarded – undo
1353 1353
  * built; this is called from boincuser_form_alter()
1354 1354
  */
1355 1355
 function boincuser_profile_node_form_after_build($form, &$form_state) {
1356
-  // Move to community prefs form
1357
-  $form_state['storage']['avatar'] = $form['field_image'];
1358
-  unset($form['field_image']);
1359
-  return $form;
1356
+    // Move to community prefs form
1357
+    $form_state['storage']['avatar'] = $form['field_image'];
1358
+    unset($form['field_image']);
1359
+    return $form;
1360 1360
 }
1361 1361
 
1362 1362
 /**
@@ -1364,8 +1364,8 @@  discard block
 block discarded – undo
1364 1364
  * @see http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_elements/6
1365 1365
  */
1366 1366
 function boincuser_elements() {
1367
-  $type['password_confirm']['#process'][] = 'boincuser_process_password_confirm';
1368
-  return $type;
1367
+    $type['password_confirm']['#process'][] = 'boincuser_process_password_confirm';
1368
+    return $type;
1369 1369
 }
1370 1370
 
1371 1371
 /**
@@ -1373,11 +1373,11 @@  discard block
 block discarded – undo
1373 1373
  * profile form
1374 1374
  */
1375 1375
 function boincuser_process_password_confirm($element) {
1376
-  // Check if parent element is "account".
1377
-  if ($element['#array_parents'][0] == 'account') {
1376
+    // Check if parent element is "account".
1377
+    if ($element['#array_parents'][0] == 'account') {
1378 1378
     $element['pass1']['#title'] = bts('Change password', array(), NULL, 'boinc:forgot-password');
1379
-  }
1380
-  return $element;
1379
+    }
1380
+    return $element;
1381 1381
 }
1382 1382
 
1383 1383
 /**
@@ -1385,42 +1385,42 @@  discard block
 block discarded – undo
1385 1385
  * Register theme functions for use in this module.
1386 1386
  */
1387 1387
 function boincuser_theme($existing, $type, $theme, $path) {
1388
-  return array(
1388
+    return array(
1389 1389
     'boincuser_user_pass' => array(
1390
-      'arguments' => array()
1390
+        'arguments' => array()
1391 1391
     )
1392
-  );
1392
+    );
1393 1393
 }
1394 1394
 
1395 1395
 /**
1396 1396
  * Implementation of hook_token_values
1397 1397
  */
1398 1398
 function boincuser_token_values($type, $object = NULL, $options = array()) {
1399
-  if ($type == 'user') {
1399
+    if ($type == 'user') {
1400 1400
     $account = user_load($object->uid);
1401 1401
     $tokens['display-name'] = $account->boincuser_name;
1402 1402
     return $tokens;
1403
-  }
1403
+    }
1404 1404
 }
1405 1405
 
1406 1406
 /**
1407 1407
  * Implementation of hook_token_list
1408 1408
  */
1409 1409
 function boincuser_token_list($type = 'all') {
1410
-  if ($type == 'user' || $type == 'all') {
1410
+    if ($type == 'user' || $type == 'all') {
1411 1411
     $tokens['user']['display-name']      = t("The user's name that should be displayed");
1412 1412
     return $tokens;
1413
-  }
1413
+    }
1414 1414
 }
1415 1415
 
1416 1416
 /**
1417 1417
  * Implementation of hook_views_pre_execute()
1418 1418
  */
1419 1419
 function boincuser_views_pre_execute(&$view) {
1420
-  if ($view->args) {
1420
+    if ($view->args) {
1421 1421
     $account_id = $view->args[0];
1422
-  }
1423
-  if ($view->name=="user_activity") {
1422
+    }
1423
+    if ($view->name=="user_activity") {
1424 1424
     // Run the following custom query for the user_activity view
1425 1425
     $view->build_info['query']= "
1426 1426
       SELECT node_revisions.vid AS vid,
@@ -1452,25 +1452,25 @@  discard block
 block discarded – undo
1452 1452
 
1453 1453
     // count_query determines the pager.  Do this so the right item count is returned.
1454 1454
     $view->build_info['count_query'] = $view->build_info['query'];
1455
-  }
1455
+    }
1456 1456
 }
1457 1457
 
1458 1458
 /**
1459 1459
  * Implementation of hook_cron()
1460 1460
  */
1461 1461
 function boincuser_cron() {
1462
-  // Delete expired users in the BOINC database, user_delete table.
1463
-  require_boinc('boinc_db');
1464
-  $num_deleted = BoincUserDeleted::delete_expired();
1465
-  if ($num_deleted>0) {
1462
+    // Delete expired users in the BOINC database, user_delete table.
1463
+    require_boinc('boinc_db');
1464
+    $num_deleted = BoincUserDeleted::delete_expired();
1465
+    if ($num_deleted>0) {
1466 1466
     watchdog('boincuser', "Deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1467
-  }
1467
+    }
1468 1468
 
1469
-  // Delete expired tokens from token table
1470
-  $tokens_deleted = BoincToken::delete_expired();
1471
-  if ($tokens_deleted>0) {
1469
+    // Delete expired tokens from token table
1470
+    $tokens_deleted = BoincToken::delete_expired();
1471
+    if ($tokens_deleted>0) {
1472 1472
     watchdog('boincuser', "Deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1473
-  }
1473
+    }
1474 1474
 }
1475 1475
 
1476 1476
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -1481,17 +1481,17 @@  discard block
 block discarded – undo
1481 1481
  * Page callback shortcut to recent posts for the logged in user
1482 1482
  */
1483 1483
 function boincuser_goto_recent_posts() {
1484
-  global $user;
1485
-  drupal_goto("account/{$user->uid}/posts");
1484
+    global $user;
1485
+    drupal_goto("account/{$user->uid}/posts");
1486 1486
 }
1487 1487
 
1488 1488
 /**
1489 1489
  * Page callback shortcut to the team of the logged in user
1490 1490
  */
1491 1491
 function boincuser_goto_team() {
1492
-  global $user;
1493
-  $account = user_load($user->uid);
1494
-  drupal_goto("community/teams/{$account->team}");
1492
+    global $user;
1493
+    $account = user_load($user->uid);
1494
+    drupal_goto("community/teams/{$account->team}");
1495 1495
 }
1496 1496
 
1497 1497
 /**
@@ -1500,93 +1500,93 @@  discard block
 block discarded – undo
1500 1500
  * user profile pages, so use a wrapper for display
1501 1501
  */
1502 1502
 function boincuser_view_profile($account = null) {
1503
-  // Create the user profile page
1504
-  if (!$account) {
1503
+    // Create the user profile page
1504
+    if (!$account) {
1505 1505
     global $user;
1506 1506
     $account = $user;
1507
-  }
1507
+    }
1508 1508
 
1509
-  $min_credit_to_post = variable_get('boinc_comment_min_credit', 0);
1510
-  $verified_contributor = array_search('verified contributor', user_roles(true));
1511
-  if (!isset($account->roles[$verified_contributor])) {
1509
+    $min_credit_to_post = variable_get('boinc_comment_min_credit', 0);
1510
+    $verified_contributor = array_search('verified contributor', user_roles(true));
1511
+    if (!isset($account->roles[$verified_contributor])) {
1512 1512
     drupal_set_message(bts(
1513 1513
         'You may only create or modify your user profile after earning @count credits.',
1514 1514
         array('@count' => $min_credit_to_post), NULL, 'boinc:view-profile'
1515 1515
     ), 'warning', FALSE);
1516
-  }
1516
+    }
1517 1517
 
1518
-  // For now, just call the user module profile view function
1519
-  user_build_content($account);
1520
-  return theme('user_profile', $account);
1518
+    // For now, just call the user module profile view function
1519
+    user_build_content($account);
1520
+    return theme('user_profile', $account);
1521 1521
 }
1522 1522
 
1523 1523
 /**
1524 1524
  * Page callback for editing a user profile
1525 1525
  */
1526 1526
 function boincuser_edit_profile($account = null) {
1527
-  // Create the user profile form
1528
-  if (!$account) {
1527
+    // Create the user profile form
1528
+    if (!$account) {
1529 1529
     global $user;
1530 1530
     $account = $user;
1531
-  }
1532
-  // Render the form
1533
-  module_load_include('pages.inc', 'node', 'node');
1534
-  return content_profile_page_edit('profile', $account);
1531
+    }
1532
+    // Render the form
1533
+    module_load_include('pages.inc', 'node', 'node');
1534
+    return content_profile_page_edit('profile', $account);
1535 1535
 }
1536 1536
 
1537 1537
 /**
1538
-  * Join page menu callback.
1539
-  * Display instructions on joining for new or existing BOINC users
1540
-  */
1538
+ * Join page menu callback.
1539
+ * Display instructions on joining for new or existing BOINC users
1540
+ */
1541 1541
 function join_page($type = null) {
1542
-  global $base_url;
1543
-  /* The paths/links to the rules-and-policies page is hardcoded
1542
+    global $base_url;
1543
+    /* The paths/links to the rules-and-policies page is hardcoded
1544 1544
    * here. An improvement would be admin settings for the Join Page
1545 1545
    * where this path could be set.
1546 1546
    */
1547
-  $ruleslinkA = 'rules-and-policies';
1548
-  $ruleslinkB = 'content/rules-and-policies';
1549
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1550
-  $registration_enabled = variable_get('user_register', 0);
1551
-  $output = '<div class="join">';
1552
-  switch ($type) {
1553
-  case 'boinc':
1547
+    $ruleslinkA = 'rules-and-policies';
1548
+    $ruleslinkB = 'content/rules-and-policies';
1549
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1550
+    $registration_enabled = variable_get('user_register', 0);
1551
+    $output = '<div class="join">';
1552
+    switch ($type) {
1553
+    case 'boinc':
1554 1554
     $output .= '<ol>';
1555 1555
     if ($registration_enabled) {
1556
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1557
-      array(
1556
+        $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1557
+        array(
1558 1558
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1559 1559
         '@sitename' => $site_name,
1560
-      ), NULL, 'boinc:join-page') . '</li>';
1560
+        ), NULL, 'boinc:join-page') . '</li>';
1561 1561
     }
1562 1562
     $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page') . '</li>';
1563 1563
     $output .= '  <li>' . bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1564 1564
     array(
1565
-      '@sitename' => $site_name,
1566
-      '@siteurl' => $base_url,
1565
+        '@sitename' => $site_name,
1566
+        '@siteurl' => $base_url,
1567 1567
     ), NULL, 'boinc:join-page') . '</li>';
1568 1568
     if ($registration_enabled) {
1569
-      $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1569
+        $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1570 1570
         array(
1571
-          '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1571
+            '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1572 1572
         ), NULL, 'boinc:join-page') . '</li>';
1573 1573
     }
1574 1574
     else {
1575
-      $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1575
+        $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1576 1576
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1577 1577
         array(
1578
-          '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1578
+            '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1579 1579
         ), NULL, 'boinc:join-page') . '</li>';
1580 1580
     }
1581 1581
     $output .= '<li>' . bts("If you're running a pre-5.0 version of BOINC, please
1582 1582
       upgrade to a more recent version of BOINC to create an account
1583 1583
       at @this_project.",
1584
-      array(
1584
+        array(
1585 1585
         '@this_project' => $site_name,
1586
-      ), NULL, 'boinc:join-page') . '</li>';
1586
+        ), NULL, 'boinc:join-page') . '</li>';
1587 1587
     $output .=  '</ol>';
1588 1588
     break;
1589
-  case 'new':
1589
+    case 'new':
1590 1590
   default:
1591 1591
     // Determine if there is a link to rules-and-policies
1592 1592
     //$ruleslink='';
@@ -1601,95 +1601,95 @@  discard block
 block discarded – undo
1601 1601
     // Join page output
1602 1602
     $output .= '<ol>';
1603 1603
     if ($registration_enabled) {
1604
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1605
-      array(
1604
+        $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1605
+        array(
1606 1606
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1607 1607
         '@sitename' => $site_name,
1608
-      ), NULL, 'boinc:join-page') . '</li>';
1608
+        ), NULL, 'boinc:join-page') . '</li>';
1609 1609
     }
1610 1610
     else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1611
-      $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1611
+        $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1612 1612
         '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1613
-      ), NULL, 'boinc:join-page') . '</li>';
1613
+        ), NULL, 'boinc:join-page') . '</li>';
1614 1614
     }
1615 1615
     $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1616 1616
     $output .= '    <p>';
1617 1617
     $output .= '      <a class="button" href="http://boinc.berkeley.edu/download.php">Download</a>';
1618 1618
     $output .= '    </p>';
1619 1619
     $output .= '    ' . bts("For Android devices, visit !fdroid_link or download !apk_link directly.", array(
1620
-      '!fdroid_link' => '<a href="https://f-droid.org/en/packages/edu.berkeley.boinc">F-Droid</a>',
1621
-      '!apk_link' => '<a href="https://boinc.berkeley.edu/download_all.php">BOINC for Android</a>',
1620
+        '!fdroid_link' => '<a href="https://f-droid.org/en/packages/edu.berkeley.boinc">F-Droid</a>',
1621
+        '!apk_link' => '<a href="https://boinc.berkeley.edu/download_all.php">BOINC for Android</a>',
1622 1622
     ), NULL, 'boinc:join-page');
1623 1623
     $output .= '  </li>';
1624 1624
     $output .= '  <li>' . bts('Run the installer.', array(), NULL, 'boinc:join-page') . '</li>';
1625 1625
     $output .= '  <li>' . bts('Choose @sitename from the list, or enter @siteurl.', array(
1626
-      '@sitename' => $site_name,
1627
-      '@siteurl' => $base_url,
1626
+        '@sitename' => $site_name,
1627
+        '@siteurl' => $base_url,
1628 1628
     ), NULL, 'boinc:join-page') . '</li>';
1629 1629
     $output .=  '</ol>';
1630
-  }
1631
-  $output .= '</div>';
1632
-  return $output;
1630
+    }
1631
+    $output .= '</div>';
1632
+    return $output;
1633 1633
 }
1634 1634
 
1635 1635
 /**
1636
-  * Home page content for embedding in Panels page
1637
-  */
1636
+ * Home page content for embedding in Panels page
1637
+ */
1638 1638
 function boincuser_home_page() {
1639
-  global $user;
1640
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1641
-  // get the front page message from database; this is set in the admin interface under BOINC Other
1642
-  $site_message = variable_get('boinc_other_frontpage','');
1639
+    global $user;
1640
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1641
+    // get the front page message from database; this is set in the admin interface under BOINC Other
1642
+    $site_message = variable_get('boinc_other_frontpage','');
1643 1643
 
1644
-  // Determine the user of the day
1645
-  $current_uotd = db_fetch_object(db_query("
1644
+    // Determine the user of the day
1645
+    $current_uotd = db_fetch_object(db_query("
1646 1646
     SELECT
1647 1647
       uid,
1648 1648
       uotd_time
1649 1649
     FROM {boincuser}
1650 1650
     ORDER BY uotd_time DESC
1651 1651
     LIMIT 1"
1652
-  ));
1653
-  if ($current_uotd->uotd_time < strtotime('today midnight')) {
1652
+    ));
1653
+    if ($current_uotd->uotd_time < strtotime('today midnight')) {
1654 1654
     $uotd = boincuser_select_user_of_the_day();
1655
-  }
1656
-  else {
1655
+    }
1656
+    else {
1657 1657
     $uotd = user_load($current_uotd->uid);
1658
-  }
1659
-  $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
1660
-  $output = '<h2 class="pane-title">';
1661
-  $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1662
-  $output .= '</h2>';
1663
-  $output .= '<div class="boinc-overview balance-height-front">';
1664
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1665
-  if ($user->uid) {
1658
+    }
1659
+    $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
1660
+    $output = '<h2 class="pane-title">';
1661
+    $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1662
+    $output .= '</h2>';
1663
+    $output .= '<div class="boinc-overview balance-height-front">';
1664
+    $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1665
+    if ($user->uid) {
1666 1666
     $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1667
-  }
1668
-  else {
1667
+    }
1668
+    else {
1669 1669
     $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1670
-  }
1671
-  $output .= '</div>';
1672
-  $output .= '<div class="boinc-overview-details">';
1673
-  $output .= '  <div class="detail-container">';
1674
-  $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1675
-  $output .= '      <div class="picture">';
1676
-  $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1670
+    }
1671
+    $output .= '</div>';
1672
+    $output .= '<div class="boinc-overview-details">';
1673
+    $output .= '  <div class="detail-container">';
1674
+    $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1675
+    $output .= '      <div class="picture">';
1676
+    $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1677 1677
     $uotd_image['alt'], array(), FALSE);
1678
-  $output .= '      </div>';
1679
-  $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1680
-  $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1681
-  $output .= '    </a>';
1682
-  $output .= '    <div class="volunteers">';
1683
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1684
-  $output .= '      <div class="platforms">';
1685
-  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1686
-  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1687
-  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1688
-  $output .= '      </div>';
1689
-  $output .= '    </div>';
1690
-  $output .= '  </div>';
1691
-  $output .= '</div>';
1692
-  return $output;
1678
+    $output .= '      </div>';
1679
+    $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1680
+    $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1681
+    $output .= '    </a>';
1682
+    $output .= '    <div class="volunteers">';
1683
+    $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1684
+    $output .= '      <div class="platforms">';
1685
+    $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1686
+    $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1687
+    $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1688
+    $output .= '      </div>';
1689
+    $output .= '    </div>';
1690
+    $output .= '  </div>';
1691
+    $output .= '</div>';
1692
+    return $output;
1693 1693
 }
1694 1694
 
1695 1695
 /**
@@ -1697,81 +1697,81 @@  discard block
 block discarded – undo
1697 1697
  * Create a new user account based on supplied parameters.
1698 1698
  */
1699 1699
 function boincuser_create_account() {
1700
-  global $base_url;
1700
+    global $base_url;
1701 1701
 
1702
-  require_boinc('boinc_db');
1703
-  require_boinc('user_util');
1704
-  require_boinc('xml');
1705
-  $params = array(
1702
+    require_boinc('boinc_db');
1703
+    require_boinc('user_util');
1704
+    require_boinc('xml');
1705
+    $params = array(
1706 1706
     'email_addr' => isset($_GET['email_addr']) ? $_GET['email_addr'] : '',
1707 1707
     'user_name' => isset($_GET['user_name']) ? $_GET['user_name'] : '',
1708 1708
     'passwd_hash' => isset($_GET['passwd_hash']) ? $_GET['passwd_hash'] : ''
1709
-  );
1709
+    );
1710 1710
 
1711
-  // Begin output
1712
-  xml_header();
1711
+    // Begin output
1712
+    xml_header();
1713 1713
 
1714
-  // Account creation disabled
1715
-  $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1716
-  if (!$enablethisRPC) {
1714
+    // Account creation disabled
1715
+    $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1716
+    if (!$enablethisRPC) {
1717 1717
     $mess = bts('Account creation is done through our Web site. Please register at @url', array(
1718
-      '@url' => $base_url . '/user/registration',
1718
+        '@url' => $base_url . '/user/registration',
1719 1719
     ),
1720 1720
     NULL, 'boinc:create_account');
1721 1721
     xml_error(-208, $mess);
1722
-  }
1723
-  // Invalid invite code
1722
+    }
1723
+    // Invalid invite code
1724 1724
 
1725
-  // Validate input
1726
-  if (user_validate_mail($params['email_addr']) or !is_valid_email_addr($params['email_addr'])) {
1725
+    // Validate input
1726
+    if (user_validate_mail($params['email_addr']) or !is_valid_email_addr($params['email_addr'])) {
1727 1727
     xml_error(-205);
1728
-  }
1728
+    }
1729 1729
 
1730
-  // Make sure user_name is unique and cleaned
1731
-  $unique_name = create_proper_drupalname($params['user_name']);
1732
-  if ($error = user_validate_name($unique_name)) {
1730
+    // Make sure user_name is unique and cleaned
1731
+    $unique_name = create_proper_drupalname($params['user_name']);
1732
+    if ($error = user_validate_name($unique_name)) {
1733 1733
     xml_error(-188, $error);
1734
-  }
1735
-  if (strlen($params['passwd_hash']) != 32) {
1734
+    }
1735
+    if (strlen($params['passwd_hash']) != 32) {
1736 1736
     xml_error(-1, 'password hash length not 32');
1737
-  }
1737
+    }
1738 1738
 
1739
-  // Process input
1740
-  // Check this email against previous email addresses.
1741
-  $tmpuser = BoincUser::lookup_prev_email_addr($params['email_addr']);
1742
-  if ($tmpuser) {
1739
+    // Process input
1740
+    // Check this email against previous email addresses.
1741
+    $tmpuser = BoincUser::lookup_prev_email_addr($params['email_addr']);
1742
+    if ($tmpuser) {
1743 1743
     xml_error(-137);
1744
-  }
1744
+    }
1745 1745
 
1746
-  // Check this email on current email addresses.
1747
-  $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1748
-  if ($boinc_user) {
1746
+    // Check this email on current email addresses.
1747
+    $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1748
+    if ($boinc_user) {
1749 1749
     // Return authenticator for existing users
1750 1750
     if ( ($params['passwd_hash'] == $boinc_user->passwd_hash) or
1751 1751
     password_verify($params['passwd_hash'], $boinc_user->passwd_hash) ) {
1752
-      $output = array('authenticator' => $boinc_user->authenticator);
1752
+        $output = array('authenticator' => $boinc_user->authenticator);
1753 1753
     }
1754 1754
     else {
1755
-      xml_error(-137);
1755
+        xml_error(-137);
1756 1756
     }
1757
-  }
1758
-  else {
1757
+    }
1758
+    else {
1759 1759
     // Verify that there isn't somehow a Drupal user already (not possible with proper function)
1760 1760
     if ($existing_user = user_load(array('mail' => $params['email_addr']))) {
1761
-      xml_error(-137, 'account error');
1761
+        xml_error(-137, 'account error');
1762 1762
     }
1763 1763
     // Create new account
1764 1764
     $unrestricted_role = array_search('community member', user_roles(true));
1765 1765
 
1766 1766
     $newUser = array(
1767
-      'name' => $unique_name,
1768
-      'pass' => $params['passwd_hash'], // note: passing a hash here requires ALL passwords to be hashed via hook prior to interacting with the hash stored in the db
1769
-      'mail' => $params['email_addr'],
1770
-      'status' => 1,
1771
-      'init' => $params['email_addr'],
1772
-      'roles' => array($unrestricted_role => ''),
1773
-      'boincuser_name' => $params['user_name'],
1774
-      'boinchash_flag' => TRUE,
1767
+        'name' => $unique_name,
1768
+        'pass' => $params['passwd_hash'], // note: passing a hash here requires ALL passwords to be hashed via hook prior to interacting with the hash stored in the db
1769
+        'mail' => $params['email_addr'],
1770
+        'status' => 1,
1771
+        'init' => $params['email_addr'],
1772
+        'roles' => array($unrestricted_role => ''),
1773
+        'boincuser_name' => $params['user_name'],
1774
+        'boinchash_flag' => TRUE,
1775 1775
     );
1776 1776
 
1777 1777
     // Create the drupal user. If the drupal user cannot be created,
@@ -1779,17 +1779,17 @@  discard block
 block discarded – undo
1779 1779
     // The user is created in the 'insert' op in hook_user.
1780 1780
     $user = user_save(null, $newUser);
1781 1781
     if (!$user) {
1782
-      watchdog('boincuser', 'create_account: Failed to create Drupal user account for @email', array('@email' => $params['email_addr']), WATCHDOG_WARNING);
1783
-      xml_error(-137, 'error creating BOINC account');
1782
+        watchdog('boincuser', 'create_account: Failed to create Drupal user account for @email', array('@email' => $params['email_addr']), WATCHDOG_WARNING);
1783
+        xml_error(-137, 'error creating BOINC account');
1784 1784
     }// if drupal user created.
1785 1785
 
1786 1786
     $output = array('authenticator' => $user->boincuser_account_key);
1787
-  }// if existing user found.
1787
+    }// if existing user found.
1788 1788
 
1789
-  // Output authenticator
1790
-  echo " <account_out>\n";
1791
-  echo "   <authenticator>{$output['authenticator']}</authenticator>\n";
1792
-  echo "</account_out>\n";
1789
+    // Output authenticator
1790
+    echo " <account_out>\n";
1791
+    echo "   <authenticator>{$output['authenticator']}</authenticator>\n";
1792
+    echo "</account_out>\n";
1793 1793
 }
1794 1794
 
1795 1795
 /**
@@ -1797,166 +1797,166 @@  discard block
 block discarded – undo
1797 1797
  * account is created using the BOINC clinet.
1798 1798
  */
1799 1799
 function boincuser_account_finish() {
1800
-  global $user;
1800
+    global $user;
1801 1801
 
1802
-  $authtoken = isset($_GET['auth']) ? $_GET['auth'] : '';
1802
+    $authtoken = isset($_GET['auth']) ? $_GET['auth'] : '';
1803 1803
 
1804
-  // Ensure there is a authentication token before continuing
1805
-  if (empty($authtoken)) {
1804
+    // Ensure there is a authentication token before continuing
1805
+    if (empty($authtoken)) {
1806 1806
     drupal_not_found();
1807 1807
     return ;
1808
-  }
1808
+    }
1809 1809
 
1810
-  if (strlen($authtoken) != 32) {
1810
+    if (strlen($authtoken) != 32) {
1811 1811
     drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1812 1812
     drupal_goto();
1813
-  }
1813
+    }
1814 1814
 
1815
-  require_boinc('boinc_db');
1816
-  $boinc_user = BoincUser::lookup("authenticator='".addslashes($authtoken)."'");
1817
-  if (!$boinc_user) {
1815
+    require_boinc('boinc_db');
1816
+    $boinc_user = BoincUser::lookup("authenticator='".addslashes($authtoken)."'");
1817
+    if (!$boinc_user) {
1818 1818
     drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1819 1819
     drupal_goto();
1820
-  }
1821
-  $user = user_load(get_drupal_id($boinc_user->id));
1820
+    }
1821
+    $user = user_load(get_drupal_id($boinc_user->id));
1822 1822
 
1823
-  if (!$user) {
1823
+    if (!$user) {
1824 1824
     drupal_set_message(bts('ERROR: There was a problem loading your account. Try logging in with your user name and password.', array(), NULL, 'boinc:account-finish'), 'error');
1825 1825
     drupal_goto();
1826
-  }
1826
+    }
1827 1827
 
1828
-  // Lookup path to custom account finish page
1829
-  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1830
-  if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1828
+    // Lookup path to custom account finish page
1829
+    $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1830
+    if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1831 1831
     $node = menu_get_object('node', 1, $customaccountfinishpath);
1832 1832
     if ($node) {
1833
-      return node_page_view($node);
1833
+        return node_page_view($node);
1834
+    }
1834 1835
     }
1835
-  }
1836 1836
 
1837
-  // open links in new window
1838
-  $options = array(
1837
+    // open links in new window
1838
+    $options = array(
1839 1839
     'attributes' => array( 'target' => '_blank' ),
1840
-  );
1840
+    );
1841 1841
 
1842
-  // Check moderation page exists
1843
-  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1844
-  if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1842
+    // Check moderation page exists
1843
+    $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1844
+    if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1845 1845
     $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
1846
-  } else {
1846
+    } else {
1847 1847
     $modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
1848
-  }
1848
+    }
1849 1849
 
1850
-  $username = $user->boincuser_name;
1851
-  $site_name = variable_get('site_name', 'Drupal-BOINC');
1852
-  $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1853
-  array(
1850
+    $username = $user->boincuser_name;
1851
+    $site_name = variable_get('site_name', 'Drupal-BOINC');
1852
+    $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1853
+    array(
1854 1854
     '@user_name' => $username,
1855 1855
     '@site_name' => $site_name,
1856
-  ), NULL, 'boinc:account-finish') . "</p>";
1856
+    ), NULL, 'boinc:account-finish') . "</p>";
1857 1857
 
1858
-  $links = array(
1858
+    $links = array(
1859 1859
     array(
1860
-      'data' => bts('Change your username at !community_preferences.', array(
1860
+        'data' => bts('Change your username at !community_preferences.', array(
1861 1861
         '!community_preferences' => l(bts('Community Preferences', array(), NULL, 'boinc:account-fininsh'), 'account/prefs/community', $options),
1862
-      ), NULL, 'boinc:account-finish'),
1863
-      'children' => array(
1862
+        ), NULL, 'boinc:account-finish'),
1863
+        'children' => array(
1864 1864
         bts('Your username is used to identify yourself to other volunteers on this Web site.', array(), NULL, 'boinc:account-finish'),
1865 1865
         bts('In addition, you may set your account\'s default language and adjust notification settings.', array(), NULL, 'boinc:account-finish'),
1866
-      ),
1866
+        ),
1867 1867
     ),
1868 1868
     array(
1869
-      'data' => bts('Change your !computing_preferences.', array(
1869
+        'data' => bts('Change your !computing_preferences.', array(
1870 1870
         '!computing_preferences' => l(bts('Computing Preferences', array(), NULL, 'boinc:account-finish'), 'account/prefs', $options),
1871
-      ), NULL, 'boinc:account-finish'),
1872
-      'children' => array(
1871
+        ), NULL, 'boinc:account-finish'),
1872
+        'children' => array(
1873 1873
         bts('You may adjust how much CPU, RAM, and Disk space the BOINC client is allowed to use for tasks on your computer.', array(), NULL, 'boinc:account-finish'),
1874 1874
         bts('By default, you will run @site_name tasks without any additional configuration.', array(
1875
-          '@site_name' => $site_name,
1875
+            '@site_name' => $site_name,
1876 1876
         ), NULL, 'boinc:account-finish'),
1877 1877
         bts('It is recommended new volunteers leave the default settings until they gain experience running some tasks. Ask questions in the !forums to get advice before making changes to a setting you don\'t understand.', array(
1878
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options),
1878
+            '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options),
1879 1879
         ), NULL, 'boinc:account-finish'),
1880
-      ),
1880
+        ),
1881 1881
     ),
1882 1882
     array(
1883 1883
         'data' => bts('Create a !user_profile.', array(
1884
-          '!user_profile' => l(bts('User Profile', array(), NULL, 'boinc:account-finish'), '/account/profile/edit', $options),
1884
+            '!user_profile' => l(bts('User Profile', array(), NULL, 'boinc:account-finish'), '/account/profile/edit', $options),
1885 1885
         ), NULL, 'boinc:account-finish'),
1886
-      'children' => array(
1886
+        'children' => array(
1887 1887
         bts('A user profile will inform other volunteers who you are and why you joined @site_name.', array(
1888
-          '@site_name' => $site_name,
1888
+            '@site_name' => $site_name,
1889 1889
         ), NULL, 'boinc:account-finish'),
1890 1890
         $modsentence,
1891
-      ),
1891
+        ),
1892 1892
     ),
1893 1893
     array(
1894
-      'data' => bts('Join a !team.', array(
1894
+        'data' => bts('Join a !team.', array(
1895 1895
         '!team' => l(bts('Team', array(), NULL, 'boinc:account-finish'), '/community/teams', $options),
1896
-      ), NULL, 'boinc:account-finish'),
1897
-      'children' => array(
1896
+        ), NULL, 'boinc:account-finish'),
1897
+        'children' => array(
1898 1898
         bts('You may join a team, made up of other volunteers.', array(), NULL, 'boinc:account-finish'),
1899
-      ),
1899
+        ),
1900 1900
     ),
1901 1901
     array(
1902
-      'data' => bts('Go to your !account_dashboard.', array(
1902
+        'data' => bts('Go to your !account_dashboard.', array(
1903 1903
         '!account_dashboard'=> l(bts('Account Dashboard', array(), NULL, 'boinc:account-finish'), 'account/dashboard', $options),
1904
-      ), NULL, 'boinc:account-finish'),
1905
-      'children' => array(
1904
+        ), NULL, 'boinc:account-finish'),
1905
+        'children' => array(
1906 1906
         bts('Your account dashboard has information and links about your computer(s) and task(s) assigned.', array(), NULL, 'boinc:account-finish'),
1907
-      ),
1907
+        ),
1908 1908
     ),
1909 1909
     array(
1910
-      'data' => bts('Visit our !help pages.', array(
1910
+        'data' => bts('Visit our !help pages.', array(
1911 1911
         '!help' => l(bts('Help', array(), NULL, 'boinc:account-finish'), '/help', $options)
1912
-      ), NULL, 'boinc:account-finish'),
1913
-      'children' => array(
1912
+        ), NULL, 'boinc:account-finish'),
1913
+        'children' => array(
1914 1914
         bts('Ask for help in our community\'s !forums.', array(
1915
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options)
1915
+            '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options)
1916 1916
         ), NULL, 'boinc:account-finish'),
1917
-      ),
1917
+        ),
1918 1918
     ),
1919
-  );
1919
+    );
1920 1920
 
1921
-  //List of links
1922
-  $output .= theme_item_list($links, $title = NULL, $type='ul');
1921
+    //List of links
1922
+    $output .= theme_item_list($links, $title = NULL, $type='ul');
1923 1923
 
1924
-  return $output;
1924
+    return $output;
1925 1925
 }
1926 1926
 
1927 1927
 /**
1928 1928
  * Determine if the user has permission to control community access
1929 1929
  */
1930 1930
 function boincuser_moderate_community_access() {
1931
-  if (user_access('assign community member role')
1931
+    if (user_access('assign community member role')
1932 1932
   OR user_access('assign all roles')) {
1933 1933
     return TRUE;
1934
-  }
1935
-  return FALSE;
1934
+    }
1935
+    return FALSE;
1936 1936
 }
1937 1937
 
1938 1938
 /**
1939 1939
  * Get the count of items in the moderation queue
1940 1940
  */
1941 1941
 function boincuser_moderation_queue_count($caller = 'user') {
1942
-  $allowed = FALSE;
1943
-  switch ($caller) {
1944
-  case 'cron':
1942
+    $allowed = FALSE;
1943
+    switch ($caller) {
1944
+    case 'cron':
1945 1945
     $allowed = TRUE;
1946 1946
     break;
1947
-  case 'user':
1947
+    case 'user':
1948 1948
   default:
1949 1949
     $allowed = user_access('edit any profile content');
1950
-  }
1951
-  if ($allowed) {
1950
+    }
1951
+    if ($allowed) {
1952 1952
     return db_result(db_query("
1953 1953
       SELECT COUNT(*)
1954 1954
       FROM {node}
1955 1955
       WHERE type = 'profile'
1956 1956
       AND moderate = 1"
1957 1957
     ));
1958
-  }
1959
-  return NULL;
1958
+    }
1959
+    return NULL;
1960 1960
 }
1961 1961
 
1962 1962
 /**
@@ -1965,43 +1965,43 @@  discard block
 block discarded – undo
1965 1965
  * than through the user account info form.
1966 1966
  */
1967 1967
 function boincuser_control($uid = NULL, $action = NULL) {
1968
-  if (!$uid OR !$account = user_load($uid)) {
1968
+    if (!$uid OR !$account = user_load($uid)) {
1969 1969
     // What are you even doing here...
1970 1970
     return FALSE;
1971
-  }
1972
-  switch ($action) {
1973
-  case 'ban':
1971
+    }
1972
+    switch ($action) {
1973
+    case 'ban':
1974 1974
     if (boincuser_moderate_community_access()) {
1975
-      $penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
1976
-      $boincuser_record = array(
1975
+        $penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
1976
+        $boincuser_record = array(
1977 1977
         'uid' => $uid,
1978 1978
         'penalty_expiration' => time() + $penalty_period,
1979
-      );
1980
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
1981
-      $community_role = array_search('community member', user_roles(true));
1982
-      if (isset($account->roles[$community_role])) {
1979
+        );
1980
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
1981
+        $community_role = array_search('community member', user_roles(true));
1982
+        if (isset($account->roles[$community_role])) {
1983 1983
         unset($account->roles[$community_role]);
1984 1984
         user_save($account, array('roles' => $account->roles));
1985
-      }
1985
+        }
1986 1986
     }
1987 1987
     break;
1988
-  case 'lift-ban':
1988
+    case 'lift-ban':
1989 1989
     if (boincuser_moderate_community_access()) {
1990
-      $boincuser_record = array(
1990
+        $boincuser_record = array(
1991 1991
         'uid' => $uid,
1992 1992
         'penalty_expiration' => 0,
1993
-      );
1994
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
1995
-      $community_role = array_search('community member', user_roles(true));
1996
-      if (!isset($account->roles[$community_role])) {
1993
+        );
1994
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
1995
+        $community_role = array_search('community member', user_roles(true));
1996
+        if (!isset($account->roles[$community_role])) {
1997 1997
         $account->roles[$community_role] = 'community member';
1998 1998
         user_save($account, array('roles' => $account->roles));
1999
-      }
1999
+        }
2000 2000
     }
2001 2001
     break;
2002
-  default:
2002
+    default:
2003 2003
   }
2004
-  drupal_goto("account/{$account->uid}");
2004
+    drupal_goto("account/{$account->uid}");
2005 2005
 }
2006 2006
 
2007 2007
 /**
@@ -2009,29 +2009,29 @@  discard block
 block discarded – undo
2009 2009
  * moderation flag.
2010 2010
  */
2011 2011
 function boincuser_moderate_profile_approve($account) {
2012
-  $node = new stdClass;
2013
-  $node->type = 'profile';
2014
-  $node->language = '';
2015
-  $nid = content_profile_profile_exists($node, $account->uid);
2016
-  $profile = node_load($nid);
2017
-  $profile->moderate = 0;
2018
-  $profile->status = 1;
2019
-  node_save($profile);
2020
-  drupal_set_message('This profile has been marked as approved.');
2021
-  drupal_goto();
2012
+    $node = new stdClass;
2013
+    $node->type = 'profile';
2014
+    $node->language = '';
2015
+    $nid = content_profile_profile_exists($node, $account->uid);
2016
+    $profile = node_load($nid);
2017
+    $profile->moderate = 0;
2018
+    $profile->status = 1;
2019
+    node_save($profile);
2020
+    drupal_set_message('This profile has been marked as approved.');
2021
+    drupal_goto();
2022 2022
 }
2023 2023
 
2024 2024
 /**
2025 2025
  * Mark a user profile as rejected and notify the user of the reason.
2026 2026
  */
2027 2027
 function boincuser_moderate_profile_reject($uid, $reason = '') {
2028
-  $account = user_load($uid);
2029
-  $node = new stdClass;
2030
-  $node->type = 'profile';
2031
-  $node->language = '';
2032
-  $nid = content_profile_profile_exists($node, $uid);
2033
-  $profile = node_load($nid);
2034
-  if ($profile->nid) {
2028
+    $account = user_load($uid);
2029
+    $node = new stdClass;
2030
+    $node->type = 'profile';
2031
+    $node->language = '';
2032
+    $nid = content_profile_profile_exists($node, $uid);
2033
+    $profile = node_load($nid);
2034
+    if ($profile->nid) {
2035 2035
     global $user;
2036 2036
     global $base_url;
2037 2037
     global $base_path;
@@ -2042,64 +2042,64 @@  discard block
 block discarded – undo
2042 2042
     $profile->status = 0;
2043 2043
     node_save($profile);
2044 2044
     $settings = array(
2045
-      'from' => '',
2046
-      'subject' => "Profile moderation at {$site_name}",
2047
-      'message' => ''
2048
-      . "{$account->boincuser_name},\n"
2049
-      . "\n"
2050
-      . "{$moderator->boincuser_name} has rejected your profile at"
2051
-      . " {$site_name} for the following reason: \n"
2052
-      . "\n"
2053
-      . "{$reason}\n"
2054
-      . "\n"
2055
-      . "\n"
2056
-      . "Since it has not been approved, your profile is not visible to other"
2057
-      . " {$site_name} users. Please make the needed changes here:\n"
2058
-      . "\n"
2059
-      . "{$site_url}account/profile \n"
2060
-      . "\n"
2061
-      . "Thanks, \n"
2062
-      . "\n"
2063
-      . "{$site_name} support team",
2045
+        'from' => '',
2046
+        'subject' => "Profile moderation at {$site_name}",
2047
+        'message' => ''
2048
+        . "{$account->boincuser_name},\n"
2049
+        . "\n"
2050
+        . "{$moderator->boincuser_name} has rejected your profile at"
2051
+        . " {$site_name} for the following reason: \n"
2052
+        . "\n"
2053
+        . "{$reason}\n"
2054
+        . "\n"
2055
+        . "\n"
2056
+        . "Since it has not been approved, your profile is not visible to other"
2057
+        . " {$site_name} users. Please make the needed changes here:\n"
2058
+        . "\n"
2059
+        . "{$site_url}account/profile \n"
2060
+        . "\n"
2061
+        . "Thanks, \n"
2062
+        . "\n"
2063
+        . "{$site_name} support team",
2064 2064
     );
2065 2065
     rules_action_mail_to_user($account, $settings);
2066 2066
     drupal_set_message('This profile has been marked as rejected.');
2067
-  }
2068
-  drupal_goto();
2067
+    }
2068
+    drupal_goto();
2069 2069
 }
2070 2070
 
2071 2071
 /**
2072 2072
  * Ban a user and send a notification of the reason.
2073 2073
  */
2074 2074
 function boincuser_moderate_user_ban($uid, $reason = '', $duration = '') {
2075
-  if (user_access('assign community member role')
2075
+    if (user_access('assign community member role')
2076 2076
   OR user_access('assign all roles')) {
2077 2077
     $account = user_load($uid);
2078 2078
     if ($account->uid) {
2079
-      module_load_include('inc', 'rules', 'modules/system.rules');
2080
-      if ($duration === '') {
2079
+        module_load_include('inc', 'rules', 'modules/system.rules');
2080
+        if ($duration === '') {
2081 2081
         $duration = variable_get('boinc_penalty_period', 7*24*60*60);
2082
-      }
2083
-      $penalty_expiration = ($duration > 0) ? time() + $duration : 4294967295;
2084
-      $boincuser_record = array(
2082
+        }
2083
+        $penalty_expiration = ($duration > 0) ? time() + $duration : 4294967295;
2084
+        $boincuser_record = array(
2085 2085
         'uid' => $uid,
2086 2086
         'penalty_expiration' => $penalty_expiration,
2087
-      );
2088
-      drupal_write_record('boincuser', $boincuser_record, 'uid');
2087
+        );
2088
+        drupal_write_record('boincuser', $boincuser_record, 'uid');
2089 2089
 
2090
-      $community_role = array_search('community member', user_roles(true));
2091
-      if (isset($account->roles[$community_role])) {
2090
+        $community_role = array_search('community member', user_roles(true));
2091
+        if (isset($account->roles[$community_role])) {
2092 2092
         unset($account->roles[$community_role]);
2093 2093
         user_save($account, array('roles' => $account->roles));
2094
-      }
2095
-
2096
-      global $user;
2097
-      global $base_url;
2098
-      global $base_path;
2099
-      $site_name = variable_get('site_name', 'Drupal-BOINC');
2100
-      $site_url = $base_url . $base_path;
2101
-      $moderator = user_load($user->uid);
2102
-      $settings = array(
2094
+        }
2095
+
2096
+        global $user;
2097
+        global $base_url;
2098
+        global $base_path;
2099
+        $site_name = variable_get('site_name', 'Drupal-BOINC');
2100
+        $site_url = $base_url . $base_path;
2101
+        $moderator = user_load($user->uid);
2102
+        $settings = array(
2103 2103
         'from' => '',
2104 2104
         'subject' => "User moderation at {$site_name}",
2105 2105
         'message' => ''
@@ -2120,12 +2120,12 @@  discard block
 block discarded – undo
2120 2120
         . "Thanks, \n"
2121 2121
         . "\n"
2122 2122
         . "{$site_name} support team",
2123
-      );
2124
-      rules_action_mail_to_user($account, $settings);
2125
-      drupal_set_message('This user has been banned.');
2123
+        );
2124
+        rules_action_mail_to_user($account, $settings);
2125
+        drupal_set_message('This user has been banned.');
2126 2126
     }
2127
-  }
2128
-  drupal_goto();
2127
+    }
2128
+    drupal_goto();
2129 2129
 }
2130 2130
 
2131 2131
 
@@ -2137,15 +2137,15 @@  discard block
 block discarded – undo
2137 2137
  *
2138 2138
  */
2139 2139
 function boincuser_get_weak_auth($boinc_id = null) {
2140
-  if (!$boinc_id) {
2140
+    if (!$boinc_id) {
2141 2141
     global $user;
2142 2142
     $account = user_load($user->uid);
2143 2143
     $boinc_id = $account->boincuser_id;
2144
-  }
2144
+    }
2145 2145
 
2146
-  $boinc_user = boincuser_load($account->boincuser_id);
2146
+    $boinc_user = boincuser_load($account->boincuser_id);
2147 2147
 
2148
-  return weak_auth($boinc_user);
2148
+    return weak_auth($boinc_user);
2149 2149
 }
2150 2150
 
2151 2151
 /**
@@ -2154,75 +2154,75 @@  discard block
 block discarded – undo
2154 2154
  * Drupal User so must be inserted into comments, etc. (not so by default)
2155 2155
  */
2156 2156
 function boincuser_get_user_profile_image($uid, $avatar = TRUE) {
2157
-  // Though the function name implies otherwise, get the avatar by default
2158
-  $image_field = ($avatar) ? 'field_image_fid' : 'field_profile_image_fid';
2159
-  $image_fid = db_result(db_query("
2157
+    // Though the function name implies otherwise, get the avatar by default
2158
+    $image_field = ($avatar) ? 'field_image_fid' : 'field_profile_image_fid';
2159
+    $image_fid = db_result(db_query("
2160 2160
     SELECT ctp.%s
2161 2161
     FROM {content_type_profile} ctp
2162 2162
     INNER JOIN {node} n ON ctp.nid = n.nid
2163 2163
     WHERE n.uid = %d AND n.type = '%s'",
2164 2164
     $image_field, $uid, 'profile'));
2165
-  $user_image['image'] = field_file_load($image_fid);
2166
-  if (!$user_image['image']['filepath']) {
2165
+    $user_image['image'] = field_file_load($image_fid);
2166
+    if (!$user_image['image']['filepath']) {
2167 2167
     // Load the default image if one does not exist
2168 2168
     $account = user_load($uid);
2169 2169
     if ($avatar AND module_exists('gravatar') AND user_access('use gravatar', $account) AND $account->gravatar) {
2170
-      // Use a Gravatar rather than the system default image
2171
-      $options = array(
2170
+        // Use a Gravatar rather than the system default image
2171
+        $options = array(
2172 2172
         'size' => 100,
2173 2173
         'rating' => 'G',
2174
-      );
2175
-      // Get the Gravatar URL and see if the image exists
2176
-      $url = gravatar_get_gravatar($account->mail, $options);
2177
-      $headers = @get_headers($url);
2178
-      if (preg_match("|200|", $headers[0])) {
2174
+        );
2175
+        // Get the Gravatar URL and see if the image exists
2176
+        $url = gravatar_get_gravatar($account->mail, $options);
2177
+        $headers = @get_headers($url);
2178
+        if (preg_match("|200|", $headers[0])) {
2179 2179
         return $url;
2180
-      }
2180
+        }
2181 2181
     }
2182 2182
     // Get default image if nothing else works
2183 2183
     $content_node_widget_settings = db_result(db_query("SELECT widget_settings FROM {content_node_field_instance} WHERE field_name = '%s'", ($avatar ? 'field_image' : 'field_profile_image')));
2184 2184
     $content_node_widget_settings = unserialize($content_node_widget_settings);
2185 2185
     $user_image['image'] = $content_node_widget_settings['default_image'];
2186
-  }
2187
-  $user = user_load($uid);
2188
-  // Use boinc username for image alt/title attributes
2189
-  $user_image['alt'] = $user->boincuser_name;
2190
-  return $user_image;
2186
+    }
2187
+    $user = user_load($uid);
2188
+    // Use boinc username for image alt/title attributes
2189
+    $user_image['alt'] = $user->boincuser_name;
2190
+    return $user_image;
2191 2191
 }
2192 2192
 
2193 2193
 /**
2194 2194
  * Generate a table of a user's projects
2195 2195
  */
2196 2196
 function boincuser_get_projects_table($account = null) {
2197
-  if ($account AND is_numeric($account)) {
2197
+    if ($account AND is_numeric($account)) {
2198 2198
     $account = user_load($account);
2199
-  }
2200
-  $projects = boincuser_get_projects($account);
2201
-  if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2202
-
2203
-  $output = '';
2204
-  $output .= '<table class="user-projects">' . "\n";
2205
-  $output .= '<thead>' . "\n";
2206
-  $output .= '  <tr>' . "\n";
2207
-  $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2208
-  $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2209
-  $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2210
-  $output .= '  </tr>' . "\n";
2211
-  $output .= '</thead>' . "\n";
2212
-  $output .= '<tbody>' . "\n";
2213
-  foreach ($projects AS $project) {
2199
+    }
2200
+    $projects = boincuser_get_projects($account);
2201
+    if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2202
+
2203
+    $output = '';
2204
+    $output .= '<table class="user-projects">' . "\n";
2205
+    $output .= '<thead>' . "\n";
2206
+    $output .= '  <tr>' . "\n";
2207
+    $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2208
+    $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2209
+    $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2210
+    $output .= '  </tr>' . "\n";
2211
+    $output .= '</thead>' . "\n";
2212
+    $output .= '<tbody>' . "\n";
2213
+    foreach ($projects AS $project) {
2214 2214
     $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
2215 2215
     $output .= '  <tr>' . "\n";
2216 2216
     $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
2217 2217
     $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->expavg_credit) . '</td>' . "\n";
2218 2218
     $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->total_credit) . '</td>' . "\n";
2219 2219
     $output .= '  </tr>' . "\n";
2220
-  }
2221
-  $output .= '</tbody>' . "\n";
2222
-  $output .= '</table>' . "\n";
2223
-  $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2224
-  //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2225
-  return $output;
2220
+    }
2221
+    $output .= '</tbody>' . "\n";
2222
+    $output .= '</table>' . "\n";
2223
+    $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2224
+    //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2225
+    return $output;
2226 2226
 }
2227 2227
 
2228 2228
 /**
@@ -2230,25 +2230,25 @@  discard block
 block discarded – undo
2230 2230
  */
2231 2231
 function boincuser_get_stats_user_data($cpid = null) {
2232 2232
 
2233
-  // [TODO] Set this stuff in site config!
2234
-  $stats_server = 'stats.gridrepublic.org';
2235
-  $stats_rpc = 'rpc/get_user.php';
2233
+    // [TODO] Set this stuff in site config!
2234
+    $stats_server = 'stats.gridrepublic.org';
2235
+    $stats_rpc = 'rpc/get_user.php';
2236 2236
 
2237
-  // Construct query string
2238
-  $get = array(
2237
+    // Construct query string
2238
+    $get = array(
2239 2239
     'cpid' => $cpid
2240
-  );
2241
-  $args = array();
2242
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2243
-  $query = '?' . implode('&', $args);
2244
-
2245
-  // Load XML from RPC
2246
-  $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
2247
-  $result = drupal_http_request($target_url);
2248
-  if (in_array($result->code, array(200, 304)) || in_array($result->redirect_code, array(200, 304))) {
2240
+    );
2241
+    $args = array();
2242
+    foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2243
+    $query = '?' . implode('&', $args);
2244
+
2245
+    // Load XML from RPC
2246
+    $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
2247
+    $result = drupal_http_request($target_url);
2248
+    if (in_array($result->code, array(200, 304)) || in_array($result->redirect_code, array(200, 304))) {
2249 2249
     return simplexml_load_string($result->data);
2250
-  }
2251
-  return NULL;
2250
+    }
2251
+    return NULL;
2252 2252
 }
2253 2253
 
2254 2254
 /**
@@ -2256,15 +2256,15 @@  discard block
 block discarded – undo
2256 2256
  */
2257 2257
 function boincuser_get_projects($account = null) {
2258 2258
 
2259
-  // Use the current user by default
2260
-  if (!$account) {
2259
+    // Use the current user by default
2260
+    if (!$account) {
2261 2261
     global $user;
2262 2262
     $account = user_load($user->uid);
2263
-  }
2263
+    }
2264 2264
 
2265
-  $account_stats = boincuser_get_stats_user_data($account->boincuser_cpid);
2265
+    $account_stats = boincuser_get_stats_user_data($account->boincuser_cpid);
2266 2266
 
2267
-  return ($account_stats AND isset($account_stats->project)) ? $account_stats->project : null;
2267
+    return ($account_stats AND isset($account_stats->project)) ? $account_stats->project : null;
2268 2268
 }
2269 2269
 
2270 2270
 
@@ -2272,11 +2272,11 @@  discard block
 block discarded – undo
2272 2272
  * Get the links to display under the user profile
2273 2273
  */
2274 2274
 function boincuser_get_profile_links($uid) {
2275
-  global $user;
2276
-  $account = user_load($uid);
2277
-  $profile = content_profile_load('profile', $account->uid);
2278
-  $output = '';
2279
-  if ($profile) {
2275
+    global $user;
2276
+    $account = user_load($uid);
2277
+    $profile = content_profile_load('profile', $account->uid);
2278
+    $output = '';
2279
+    if ($profile) {
2280 2280
     $profile_is_approved = ($profile->status AND !$profile->moderate);
2281 2281
     $user_is_moderator = user_access('edit any profile content');
2282 2282
     $is_own_profile = ($user->uid == $account->uid);
@@ -2284,15 +2284,15 @@  discard block
 block discarded – undo
2284 2284
     $links = array();
2285 2285
 
2286 2286
     if ($profile->moderate AND $user_is_moderator) {
2287
-      $links['approve_profile'] = array(
2287
+        $links['approve_profile'] = array(
2288 2288
         'title' => bts('Approve profile', array(), NULL, 'boinc:moderate-user'),
2289 2289
         'href' => "{$profile_moderation_path}/approve",
2290 2290
         'attributes' => array(
2291
-          'title' => bts('Approve this profile content', array(), NULL, 'boinc:moderate-user'),
2292
-          'class' => 'first primary tab',
2291
+            'title' => bts('Approve this profile content', array(), NULL, 'boinc:moderate-user'),
2292
+            'class' => 'first primary tab',
2293 2293
         )
2294
-      );
2295
-      /*$links['edit_profile'] = array(
2294
+        );
2295
+        /*$links['edit_profile'] = array(
2296 2296
         'title' => bts('Edit profile', array(), NULL, 'boinc:moderate-user'),
2297 2297
         'href' => "{$profile_moderation_path}/edit",
2298 2298
         'attributes' => array(
@@ -2300,27 +2300,27 @@  discard block
 block discarded – undo
2300 2300
           'class' => 'tab',
2301 2301
         )
2302 2302
       );*/
2303
-      $links['reject_profile'] = array(
2303
+        $links['reject_profile'] = array(
2304 2304
         'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
2305 2305
         'href' => "{$profile_moderation_path}/reject",
2306 2306
         'attributes' => array(
2307
-          'title' => bts('Reject this profile content', array(), NULL, 'boinc:moderate-user'),
2308
-          'class' => 'tab',
2307
+            'title' => bts('Reject this profile content', array(), NULL, 'boinc:moderate-user'),
2308
+            'class' => 'tab',
2309 2309
         )
2310
-      );
2310
+        );
2311 2311
     }
2312 2312
     $output .= '<ul class="tab-list">';
2313 2313
     $count = 0;
2314 2314
     foreach ($links as $key => $link) {
2315
-      $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2316
-      $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2317
-      $output .= '</li>';
2318
-      $count++;
2315
+        $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2316
+        $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2317
+        $output .= '</li>';
2318
+        $count++;
2319 2319
     }
2320 2320
     $output .= '<li class="' . (($count) ? '' : 'first ') . 'last tab">' . flag_create_link('abuse_user_meta', $account->uid) . '</li>';
2321 2321
     $output .= '</ul>';
2322
-  }
2323
-  return $output;
2322
+    }
2323
+    return $output;
2324 2324
 /*
2325 2325
 <ul class="tab-list">
2326 2326
   <li class="primary first tab">
@@ -2357,36 +2357,36 @@  discard block
 block discarded – undo
2357 2357
  */
2358 2358
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
2359 2359
 
2360
-  foreach ($documents as $document) {
2360
+    foreach ($documents as $document) {
2361 2361
     if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
2362
-      // Node information.
2363
-      $nid = $document->entity_id;
2364
-      $node = node_load($nid);
2365
-      $account = user_load($node->uid);
2366
-
2367
-      // Use boincuser name and not drupal user name
2368
-      $document->label = apachesolr_clean_text($account->boincuser_name);
2369
-      // Author information
2370
-      if ($node->uid == 0 || strlen($node->name) == 0) {
2362
+        // Node information.
2363
+        $nid = $document->entity_id;
2364
+        $node = node_load($nid);
2365
+        $account = user_load($node->uid);
2366
+
2367
+        // Use boincuser name and not drupal user name
2368
+        $document->label = apachesolr_clean_text($account->boincuser_name);
2369
+        // Author information
2370
+        if ($node->uid == 0 || strlen($node->name) == 0) {
2371 2371
         // @see user_validate_name(). !'0' === TRUE.
2372 2372
         $document->ss_name = '0';
2373
-      }
2374
-      else {
2373
+        }
2374
+        else {
2375 2375
         $document->ss_name = $account->boincuser_name;
2376 2376
         // We want the name to be searchable for keywords.
2377 2377
         $document->tos_name = $account->boincuser_name;
2378
-      }
2378
+        }
2379 2379
 
2380
-      // Rename "Profle" to "User"
2381
-      $document->bundle = "User";
2382
-      $document->bundle_name = "User";
2380
+        // Rename "Profle" to "User"
2381
+        $document->bundle = "User";
2382
+        $document->bundle_name = "User";
2383 2383
 
2384
-      // Replace the Solr document's created field with the date the user
2385
-      // account was created. This replaces the node creation date typically
2386
-      // used for indexing nodes.
2387
-      $document->ds_created = apachesolr_date_iso($account->created);
2384
+        // Replace the Solr document's created field with the date the user
2385
+        // account was created. This replaces the node creation date typically
2386
+        // used for indexing nodes.
2387
+        $document->ds_created = apachesolr_date_iso($account->created);
2388
+    }
2388 2389
     }
2389
-  }
2390 2390
 
2391 2391
 }
2392 2392
 
@@ -2398,23 +2398,23 @@  discard block
 block discarded – undo
2398 2398
  * Implementation of hook_privatemsg_name_lookup();
2399 2399
  */
2400 2400
 function boincuser_privatemsg_name_lookup($string) {
2401
-  // Get the BOINC ID from the name string, and lookup the
2402
-  // corresponding drupal user.
2403
-  $boincname = substr($string, 0, strrpos($string, '_'));
2404
-  $boincid = substr($string, strrpos($string, '_') + 1);
2405
-  $drupalid = get_drupal_id($boincid);
2406
-
2407
-  // Name has spaced replaced with special UTF-8 characters in
2408
-  // privatemsg module. We need to convert them back to spaces for the
2409
-  // check below.
2410
-  $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2411
-  if ($drupalid>0) {
2401
+    // Get the BOINC ID from the name string, and lookup the
2402
+    // corresponding drupal user.
2403
+    $boincname = substr($string, 0, strrpos($string, '_'));
2404
+    $boincid = substr($string, strrpos($string, '_') + 1);
2405
+    $drupalid = get_drupal_id($boincid);
2406
+
2407
+    // Name has spaced replaced with special UTF-8 characters in
2408
+    // privatemsg module. We need to convert them back to spaces for the
2409
+    // check below.
2410
+    $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2411
+    if ($drupalid>0) {
2412 2412
     if ($recipient = user_load(array('uid' => $drupalid))) {
2413
-      // Double-check that the loaded user matches both boincuser_id
2414
-      // and boincuser_name.
2415
-      if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2413
+        // Double-check that the loaded user matches both boincuser_id
2414
+        // and boincuser_name.
2415
+        if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2416 2416
         return $recipient;
2417
-      }
2417
+        }
2418
+    }
2418 2419
     }
2419
-  }
2420 2420
 }
Please login to merge, or discard this patch.
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     'type' => MENU_CALLBACK
190 190
   );
191 191
   $items['account_finish.php'] = array(
192
-    'title' => 'Welcome to ' . variable_get('site_name', 'Drupal-BOINC'),
192
+    'title' => 'Welcome to '.variable_get('site_name', 'Drupal-BOINC'),
193 193
     'description' => 'RPC for after a user has created an account.',
194 194
     'page callback' => 'boincuser_account_finish',
195 195
     'access callback' => TRUE,
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
   // termsofuse is enabled, by having text in the termsofuse variable.
250 250
   $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
251 251
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252
-  if ( (!empty($termsofuse)) and ($user->uid) ) {
253
-    if ( !boincuser_check_termsofuse($user) and ($existinguser_tou) ) {
252
+  if ((!empty($termsofuse)) and ($user->uid)) {
253
+    if (!boincuser_check_termsofuse($user) and ($existinguser_tou)) {
254 254
 
255 255
       // Admins are exempt, otherwise the admin may not be able to
256 256
       // access the site!
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
           'user/termsofuse',
265 265
           'logout',
266 266
           'account/info/edit',
267
-          'user/' . $user->uid . '/edit',
268
-          'user/' . $user->uid . '/recoveremail/*',
267
+          'user/'.$user->uid.'/edit',
268
+          'user/'.$user->uid.'/recoveremail/*',
269 269
           'recover_email.php',
270 270
         );
271 271
         if (module_exists('boincuser_delete')) {
272
-          $paths0[] = 'user/' . $user->uid . '/delete';
273
-          $paths0[] = 'user/' . $user->uid . '/deleteconfirm/*';
274
-          $paths0[] = 'user/' . $user->uid . '/odeleteconfirm/*';
272
+          $paths0[] = 'user/'.$user->uid.'/delete';
273
+          $paths0[] = 'user/'.$user->uid.'/deleteconfirm/*';
274
+          $paths0[] = 'user/'.$user->uid.'/odeleteconfirm/*';
275 275
         }
276 276
 
277 277
         // Paths added by the admin
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         }
283 283
 
284 284
         // paths to ignore
285
-        $paths_to_ignore = array_unique( array_merge($paths0, $paths2) );
285
+        $paths_to_ignore = array_unique(array_merge($paths0, $paths2));
286 286
 
287 287
         if (!_boincuser_ignore_paths($path, $paths_to_ignore)) {
288 288
           drupal_goto('user/termsofuse');
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
   require_boinc('password_compat/password');
305 305
   // Handle BOINC integration for users with UID > 1 (skip anonymous and admin)
306 306
   if (isset($account->uid) && ($account->uid > 1)) {
307
-    switch($op) {
307
+    switch ($op) {
308 308
     case 'load':
309 309
       // User loading; insert BOINC data into the user object
310 310
       $drupal_user = db_fetch_object(db_query("
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
       ));
335 335
       $account->boincuser_name = $boinc_user->name;
336 336
       $account->boincuser_account_key = $boinc_user->authenticator;
337
-      $account->boincuser_weak_auth = md5($boinc_user->authenticator . $boinc_user->passwd_hash);
337
+      $account->boincuser_weak_auth = md5($boinc_user->authenticator.$boinc_user->passwd_hash);
338 338
       $account->boincuser_total_credit = round($boinc_user->total_credit);
339 339
       $account->boincuser_expavg_credit = round($boinc_user->expavg_credit);
340 340
       $account->boincuser_expavg_time = round($boinc_user->expavg_time);
341
-      $account->boincuser_cpid = md5($boinc_user->cross_project_id . $account->mail);
341
+      $account->boincuser_cpid = md5($boinc_user->cross_project_id.$account->mail);
342 342
       $account->boincuser_default_pref_set = $boinc_user->venue;
343 343
       $account->boincteam_id = $boinc_user->teamid;
344 344
       $account->boincuser_previous_email_addr = $boinc_user->previous_email_addr;
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
             // Set password hash appropriately
509 509
             $passwd = ($edit['pass']) ? $edit['pass'] : $edit['current_pass'];
510
-            $passwd_hash = password_hash( md5($passwd.$lower_email_addr), PASSWORD_DEFAULT );
510
+            $passwd_hash = password_hash(md5($passwd.$lower_email_addr), PASSWORD_DEFAULT);
511 511
             // Algorithm for changing email and/or password
512 512
             if ($changing_email) {
513 513
               // locally store current email to set as previous email
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
   }
596 596
 
597 597
   // Check if user has agreed to terms of use.
598
-  if ( (!empty($termsofuse)) and ($account->uid) and
599
-       (!boincuser_check_termsofuse($account)) and ($existinguser_tou) ) {
598
+  if ((!empty($termsofuse)) and ($account->uid) and
599
+       (!boincuser_check_termsofuse($account)) and ($existinguser_tou)) {
600 600
 
601 601
     // Admins are exempted.
602 602
     $administrator_role = array_search('administrator', user_roles(true));
@@ -610,9 +610,9 @@  discard block
 block discarded – undo
610 610
       $query_for_destination = '';
611 611
       $prevdest = $_REQUEST['destination'];
612 612
       if ($prevdest) {
613
-        $query_for_destination = '?destination=' . $prevdest;
613
+        $query_for_destination = '?destination='.$prevdest;
614 614
       }
615
-      $_REQUEST['destination'] = $path_for_destination . $query_for_destination;
615
+      $_REQUEST['destination'] = $path_for_destination.$query_for_destination;
616 616
 
617 617
     }
618 618
   }
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
   // In Drupal 7, these operation cases will all exist as their own hooks,
646 646
   // so let's approximate that here so that this function can simply be removed
647 647
   // upon migration to 7
648
-  switch($op) {
648
+  switch ($op) {
649 649
   case 'update':
650 650
     boincuser_node_update($node);
651 651
   }
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
  * is updated (forward compatible to Drupal 7)
657 657
  */
658 658
 function boincuser_node_update($node) {
659
-  switch($node->type) {
659
+  switch ($node->type) {
660 660
   case 'profile':
661 661
     // Update the BOINC database directly
662 662
     $account = user_load($node->uid);
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
     }
779 779
 
780 780
     $form['cancel'] = array(
781
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
781
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest).'</li>',
782 782
       '#weight' => 1004,
783 783
     );
784 784
     $form['form control tabs suffix'] = array(
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
812 812
     $form['buttons']['preview_changes']['#weight'] = 1004;
813 813
     $form['buttons']['cancel'] = array(
814
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
814
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}").'</li>',
815 815
       '#weight' => 1005,
816 816
     );
817 817
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
     $form['actions']['submit']['#suffix'] = '</li>';
844 844
     $form['actions']['submit']['#weight'] = 1002;
845 845
     $form['actions']['cancel'] = array(
846
-        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
846
+        '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}").'</li>',
847 847
       '#weight' => 1005,
848 848
     );
849 849
     $form['actions']['form control tabs suffix'] = array(
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
     $form['privatemsg']['preview']['#suffix'] = '</li>';
871 871
     $form['privatemsg']['preview']['#weight'] = 1003;
872 872
     $form['privatemsg']['cancel'] = array(
873
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
873
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
874 874
       '#weight' => 1004,
875 875
     );
876 876
     $form['privatemsg']['form control tabs suffix'] = array(
@@ -958,11 +958,11 @@  discard block
 block discarded – undo
958 958
     // Set special message if user has not agreed to TOU
959 959
     $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
960 960
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
961
-    if ( (!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users')) ) {
961
+    if ((!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users'))) {
962 962
       drupal_set_message(
963 963
         bts('INFO: You have not agreed to the terms of use for @project. You may use this form to change your email address and/or password. Please note: you may not delete your account within seven (7) days of changing your email address.',
964 964
         array(
965
-          '@project' => variable_get('site_name','Drupal-BOINC'),
965
+          '@project' => variable_get('site_name', 'Drupal-BOINC'),
966 966
         ), NULL, 'boinc:account-credentials-change')
967 967
       , 'info');
968 968
     }
@@ -1027,36 +1027,36 @@  discard block
 block discarded – undo
1027 1027
     $form['account']['boincuser_id'] = array(
1028 1028
       '#value' => '
1029 1029
         <div class="form-item">
1030
-          <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1031
-          <span>' . $account->boincuser_id . '</span>
1030
+          <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1031
+          <span>' . $account->boincuser_id.'</span>
1032 1032
         </div>',
1033 1033
     );
1034 1034
     $form['account']['user_id'] = array(
1035 1035
       '#value' => '
1036 1036
         <div class="form-item">
1037
-          <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1038
-          <span>' . $account->uid . '</span>
1037
+          <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1038
+          <span>' . $account->uid.'</span>
1039 1039
         </div>',
1040 1040
     );
1041 1041
     $form['account']['account_key'] = array(
1042 1042
       '#value' => '
1043 1043
         <div class="form-item">
1044
-          <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1045
-          <span>' . $account->boincuser_account_key . '</span>
1044
+          <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change').'</label>
1045
+          <span>' . $account->boincuser_account_key.'</span>
1046 1046
         </div>',
1047 1047
     );
1048 1048
     $form['account']['weak_account_key'] = array(
1049 1049
       '#value' => '
1050 1050
         <div class="form-item">
1051
-          <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1052
-          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
1051
+          <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change').'</label>
1052
+          <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}".'</span>
1053 1053
         </div>',
1054 1054
     );
1055 1055
     $form['account']['cpid'] = array(
1056 1056
       '#value' => '
1057 1057
         <div class="form-item">
1058
-          <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1059
-          <span>' . $account->boincuser_cpid . '</span>
1058
+          <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change').'</label>
1059
+          <span>' . $account->boincuser_cpid.'</span>
1060 1060
         </div>',
1061 1061
     );
1062 1062
 
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
     $form['submit']['#suffix'] = '</li>';
1075 1075
     $form['submit']['#weight'] = 1002;
1076 1076
     $form['cancel'] = array(
1077
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1077
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
1078 1078
       '#weight' => 1003,
1079 1079
     );
1080 1080
     if (isset($form['delete']) AND is_array($form['delete'])) {
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
1171 1171
     $form['buttons']['preview_changes']['#weight'] = 1004;
1172 1172
     $form['buttons']['cancel'] = array(
1173
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1173
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
1174 1174
       '#weight' => 1005,
1175 1175
     );
1176 1176
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -1219,11 +1219,11 @@  discard block
 block discarded – undo
1219 1219
     // Set name temporarily to dummy value to beat validation
1220 1220
     $form['name'] = array(
1221 1221
       '#type' => 'hidden',
1222
-      '#value' => rand() . '.' . time()
1222
+      '#value' => rand().'.'.time()
1223 1223
     );
1224 1224
 
1225 1225
     // Add JS for submit button disabling
1226
-    drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
1226
+    drupal_add_js(drupal_get_path('module', 'boincuser').'/boincuser.js');
1227 1227
 
1228 1228
     // Terms of use section
1229 1229
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
 
1240 1240
       $form['termsofuse']['title1'] = array(
1241 1241
         '#weight' => -12,
1242
-        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register' ) . '</h2>',
1242
+        '#value' => '<h2>'.bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register').'</h2>',
1243 1243
         '#prefix' => '<div id="register-title1">',
1244 1244
         '#suffix' => '</div>',
1245 1245
       );
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
 
1263 1263
     $form['title2'] = array(
1264 1264
       '#weight' => -6,
1265
-      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1265
+      '#value' => '<h2>'.bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register').'</h2>',
1266 1266
       '#prefix' => '<div id="register-title2">',
1267 1267
       '#suffix' => '</div>',
1268 1268
     );
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
     $form['buttons']['submit']['#suffix'] = '</li>';
1327 1327
     $form['buttons']['submit']['#weight'] = 1002;
1328 1328
     $form['buttons']['cancel'] = array(
1329
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1329
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login').'</li>',
1330 1330
       '#weight' => 1005,
1331 1331
     );
1332 1332
     $form['buttons']['form control tabs suffix'] = array(
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
  */
1409 1409
 function boincuser_token_list($type = 'all') {
1410 1410
   if ($type == 'user' || $type == 'all') {
1411
-    $tokens['user']['display-name']      = t("The user's name that should be displayed");
1411
+    $tokens['user']['display-name'] = t("The user's name that should be displayed");
1412 1412
     return $tokens;
1413 1413
   }
1414 1414
 }
@@ -1420,9 +1420,9 @@  discard block
 block discarded – undo
1420 1420
   if ($view->args) {
1421 1421
     $account_id = $view->args[0];
1422 1422
   }
1423
-  if ($view->name=="user_activity") {
1423
+  if ($view->name == "user_activity") {
1424 1424
     // Run the following custom query for the user_activity view
1425
-    $view->build_info['query']= "
1425
+    $view->build_info['query'] = "
1426 1426
       SELECT node_revisions.vid AS vid,
1427 1427
         node.nid AS node_nid,
1428 1428
         node.uid AS users_node_uid,
@@ -1462,13 +1462,13 @@  discard block
 block discarded – undo
1462 1462
   // Delete expired users in the BOINC database, user_delete table.
1463 1463
   require_boinc('boinc_db');
1464 1464
   $num_deleted = BoincUserDeleted::delete_expired();
1465
-  if ($num_deleted>0) {
1465
+  if ($num_deleted > 0) {
1466 1466
     watchdog('boincuser', "Deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1467 1467
   }
1468 1468
 
1469 1469
   // Delete expired tokens from token table
1470 1470
   $tokens_deleted = BoincToken::delete_expired();
1471
-  if ($tokens_deleted>0) {
1471
+  if ($tokens_deleted > 0) {
1472 1472
     watchdog('boincuser', "Deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1473 1473
   }
1474 1474
 }
@@ -1553,38 +1553,38 @@  discard block
 block discarded – undo
1553 1553
   case 'boinc':
1554 1554
     $output .= '<ol>';
1555 1555
     if ($registration_enabled) {
1556
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1556
+      $output .= '<li>'.bts('First !create_an_account here at @sitename.',
1557 1557
       array(
1558 1558
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1559 1559
         '@sitename' => $site_name,
1560
-      ), NULL, 'boinc:join-page') . '</li>';
1560
+      ), NULL, 'boinc:join-page').'</li>';
1561 1561
     }
1562
-    $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page') . '</li>';
1563
-    $output .= '  <li>' . bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1562
+    $output .= '  <li>'.bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page').'</li>';
1563
+    $output .= '  <li>'.bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1564 1564
     array(
1565 1565
       '@sitename' => $site_name,
1566 1566
       '@siteurl' => $base_url,
1567
-    ), NULL, 'boinc:join-page') . '</li>';
1567
+    ), NULL, 'boinc:join-page').'</li>';
1568 1568
     if ($registration_enabled) {
1569
-      $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1569
+      $output .= '<li>'.bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1570 1570
         array(
1571 1571
           '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1572
-        ), NULL, 'boinc:join-page') . '</li>';
1572
+        ), NULL, 'boinc:join-page').'</li>';
1573 1573
     }
1574 1574
     else {
1575
-      $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1575
+      $output .= '<li>'.bts("If you're running a command-line version of BOINC,
1576 1576
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1577 1577
         array(
1578 1578
           '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1579
-        ), NULL, 'boinc:join-page') . '</li>';
1579
+        ), NULL, 'boinc:join-page').'</li>';
1580 1580
     }
1581
-    $output .= '<li>' . bts("If you're running a pre-5.0 version of BOINC, please
1581
+    $output .= '<li>'.bts("If you're running a pre-5.0 version of BOINC, please
1582 1582
       upgrade to a more recent version of BOINC to create an account
1583 1583
       at @this_project.",
1584 1584
       array(
1585 1585
         '@this_project' => $site_name,
1586
-      ), NULL, 'boinc:join-page') . '</li>';
1587
-    $output .=  '</ol>';
1586
+      ), NULL, 'boinc:join-page').'</li>';
1587
+    $output .= '</ol>';
1588 1588
     break;
1589 1589
   case 'new':
1590 1590
   default:
@@ -1596,37 +1596,37 @@  discard block
 block discarded – undo
1596 1596
     //  $ruleslink = drupal_lookup_path('source', $ruleslinkB);
1597 1597
     //}
1598 1598
 
1599
-    $ruleslink = drupal_lookup_path('source', variable_get('boinc_weboptions_rulespolicies', '') );
1599
+    $ruleslink = drupal_lookup_path('source', variable_get('boinc_weboptions_rulespolicies', ''));
1600 1600
 
1601 1601
     // Join page output
1602 1602
     $output .= '<ol>';
1603 1603
     if ($registration_enabled) {
1604
-      $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1604
+      $output .= '<li>'.bts('First !create_an_account here at @sitename.',
1605 1605
       array(
1606 1606
         '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1607 1607
         '@sitename' => $site_name,
1608
-      ), NULL, 'boinc:join-page') . '</li>';
1608
+      ), NULL, 'boinc:join-page').'</li>';
1609 1609
     }
1610
-    else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1611
-      $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1610
+    else if (menu_valid_path(array('link_path' => $ruleslink))) {
1611
+      $output .= '  <li>'.bts("Read our !rules_and_policies.", array(
1612 1612
         '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1613
-      ), NULL, 'boinc:join-page') . '</li>';
1613
+      ), NULL, 'boinc:join-page').'</li>';
1614 1614
     }
1615
-    $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1615
+    $output .= '  <li>'.bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1616 1616
     $output .= '    <p>';
1617 1617
     $output .= '      <a class="button" href="http://boinc.berkeley.edu/download.php">Download</a>';
1618 1618
     $output .= '    </p>';
1619
-    $output .= '    ' . bts("For Android devices, visit !fdroid_link or download !apk_link directly.", array(
1619
+    $output .= '    '.bts("For Android devices, visit !fdroid_link or download !apk_link directly.", array(
1620 1620
       '!fdroid_link' => '<a href="https://f-droid.org/en/packages/edu.berkeley.boinc">F-Droid</a>',
1621 1621
       '!apk_link' => '<a href="https://boinc.berkeley.edu/download_all.php">BOINC for Android</a>',
1622 1622
     ), NULL, 'boinc:join-page');
1623 1623
     $output .= '  </li>';
1624
-    $output .= '  <li>' . bts('Run the installer.', array(), NULL, 'boinc:join-page') . '</li>';
1625
-    $output .= '  <li>' . bts('Choose @sitename from the list, or enter @siteurl.', array(
1624
+    $output .= '  <li>'.bts('Run the installer.', array(), NULL, 'boinc:join-page').'</li>';
1625
+    $output .= '  <li>'.bts('Choose @sitename from the list, or enter @siteurl.', array(
1626 1626
       '@sitename' => $site_name,
1627 1627
       '@siteurl' => $base_url,
1628
-    ), NULL, 'boinc:join-page') . '</li>';
1629
-    $output .=  '</ol>';
1628
+    ), NULL, 'boinc:join-page').'</li>';
1629
+    $output .= '</ol>';
1630 1630
   }
1631 1631
   $output .= '</div>';
1632 1632
   return $output;
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
   global $user;
1640 1640
   $site_name = variable_get('site_name', 'Drupal-BOINC');
1641 1641
   // get the front page message from database; this is set in the admin interface under BOINC Other
1642
-  $site_message = variable_get('boinc_other_frontpage','');
1642
+  $site_message = variable_get('boinc_other_frontpage', '');
1643 1643
 
1644 1644
   // Determine the user of the day
1645 1645
   $current_uotd = db_fetch_object(db_query("
@@ -1661,30 +1661,30 @@  discard block
 block discarded – undo
1661 1661
   $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1662 1662
   $output .= '</h2>';
1663 1663
   $output .= '<div class="boinc-overview balance-height-front">';
1664
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1664
+  $output .= '  <div>'.bts($site_message, array(), NULL, "project:front page").' '.l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about').'</div>';
1665 1665
   if ($user->uid) {
1666
-    $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1666
+    $output .= '  <div>'.l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))).'</div>';
1667 1667
   }
1668 1668
   else {
1669
-    $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1669
+    $output .= '  <div>'.l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))).'</div>';
1670 1670
   }
1671 1671
   $output .= '</div>';
1672 1672
   $output .= '<div class="boinc-overview-details">';
1673 1673
   $output .= '  <div class="detail-container">';
1674
-  $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1674
+  $output .= '    <a class="user-of-the-day" href="account/'.$uotd->uid.'">';
1675 1675
   $output .= '      <div class="picture">';
1676 1676
   $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1677 1677
     $uotd_image['alt'], array(), FALSE);
1678 1678
   $output .= '      </div>';
1679
-  $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1680
-  $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1679
+  $output .= '      <div class="text">'.bts('User of the day', array(), NULL, 'boinc:front-page').'</div>';
1680
+  $output .= '      <div class="detail">'.$uotd->boincuser_name.'</div>';
1681 1681
   $output .= '    </a>';
1682 1682
   $output .= '    <div class="volunteers">';
1683
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1683
+  $output .= '      <div class="text">'.bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page').'</div>';
1684 1684
   $output .= '      <div class="platforms">';
1685
-  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1686
-  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1687
-  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1685
+  $output .= '        <div class="detail platform windows">'.bts('Windows', array(), NULL, 'boinc:front-page').'</div>';
1686
+  $output .= '        <div class="detail platform mac">'.bts('Mac', array(), NULL, 'boinc:front-page').'</div>';
1687
+  $output .= '        <div class="detail platform linux">'.bts('Linux', array(), NULL, 'boinc:front-page').'</div>';
1688 1688
   $output .= '      </div>';
1689 1689
   $output .= '    </div>';
1690 1690
   $output .= '  </div>';
@@ -1715,7 +1715,7 @@  discard block
 block discarded – undo
1715 1715
   $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1716 1716
   if (!$enablethisRPC) {
1717 1717
     $mess = bts('Account creation is done through our Web site. Please register at @url', array(
1718
-      '@url' => $base_url . '/user/registration',
1718
+      '@url' => $base_url.'/user/registration',
1719 1719
     ),
1720 1720
     NULL, 'boinc:create_account');
1721 1721
     xml_error(-208, $mess);
@@ -1747,8 +1747,8 @@  discard block
 block discarded – undo
1747 1747
   $boinc_user = BoincUser::lookup_email_addr($params['email_addr']);
1748 1748
   if ($boinc_user) {
1749 1749
     // Return authenticator for existing users
1750
-    if ( ($params['passwd_hash'] == $boinc_user->passwd_hash) or
1751
-    password_verify($params['passwd_hash'], $boinc_user->passwd_hash) ) {
1750
+    if (($params['passwd_hash'] == $boinc_user->passwd_hash) or
1751
+    password_verify($params['passwd_hash'], $boinc_user->passwd_hash)) {
1752 1752
       $output = array('authenticator' => $boinc_user->authenticator);
1753 1753
     }
1754 1754
     else {
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
   // Ensure there is a authentication token before continuing
1805 1805
   if (empty($authtoken)) {
1806 1806
     drupal_not_found();
1807
-    return ;
1807
+    return;
1808 1808
   }
1809 1809
 
1810 1810
   if (strlen($authtoken) != 32) {
@@ -1826,8 +1826,8 @@  discard block
 block discarded – undo
1826 1826
   }
1827 1827
 
1828 1828
   // Lookup path to custom account finish page
1829
-  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', '') );
1830
-  if ( menu_valid_path(array('link_path' => $customaccountfinishpath)) ) {
1829
+  $customaccountfinishpath = drupal_lookup_path('source', variable_get('boinc_weboptions_accountfinish', ''));
1830
+  if (menu_valid_path(array('link_path' => $customaccountfinishpath))) {
1831 1831
     $node = menu_get_object('node', 1, $customaccountfinishpath);
1832 1832
     if ($node) {
1833 1833
       return node_page_view($node);
@@ -1836,12 +1836,12 @@  discard block
 block discarded – undo
1836 1836
 
1837 1837
   // open links in new window
1838 1838
   $options = array(
1839
-    'attributes' => array( 'target' => '_blank' ),
1839
+    'attributes' => array('target' => '_blank'),
1840 1840
   );
1841 1841
 
1842 1842
   // Check moderation page exists
1843
-  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1844
-  if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1843
+  $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', ''));
1844
+  if (menu_valid_path(array('link_path' => $moderationpath))) {
1845 1845
     $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
1846 1846
   } else {
1847 1847
     $modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
@@ -1849,11 +1849,11 @@  discard block
 block discarded – undo
1849 1849
 
1850 1850
   $username = $user->boincuser_name;
1851 1851
   $site_name = variable_get('site_name', 'Drupal-BOINC');
1852
-  $output = "<p>" . bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1852
+  $output = "<p>".bts('Thank you @user_name for joining @site_name. Your account has been created. Your BOINC client should start working on assigned tasks soon, without any additional action or configuration. Please visit the links below for more information and additional options. (Links will open in a new window.)',
1853 1853
   array(
1854 1854
     '@user_name' => $username,
1855 1855
     '@site_name' => $site_name,
1856
-  ), NULL, 'boinc:account-finish') . "</p>";
1856
+  ), NULL, 'boinc:account-finish')."</p>";
1857 1857
 
1858 1858
   $links = array(
1859 1859
     array(
@@ -1919,7 +1919,7 @@  discard block
 block discarded – undo
1919 1919
   );
1920 1920
 
1921 1921
   //List of links
1922
-  $output .= theme_item_list($links, $title = NULL, $type='ul');
1922
+  $output .= theme_item_list($links, $title = NULL, $type = 'ul');
1923 1923
 
1924 1924
   return $output;
1925 1925
 }
@@ -2036,7 +2036,7 @@  discard block
 block discarded – undo
2036 2036
     global $base_url;
2037 2037
     global $base_path;
2038 2038
     $site_name = variable_get('site_name', 'Drupal-BOINC');
2039
-    $site_url = $base_url . $base_path;
2039
+    $site_url = $base_url.$base_path;
2040 2040
     $moderator = user_load($user->uid);
2041 2041
     $profile->moderate = 0;
2042 2042
     $profile->status = 0;
@@ -2097,7 +2097,7 @@  discard block
 block discarded – undo
2097 2097
       global $base_url;
2098 2098
       global $base_path;
2099 2099
       $site_name = variable_get('site_name', 'Drupal-BOINC');
2100
-      $site_url = $base_url . $base_path;
2100
+      $site_url = $base_url.$base_path;
2101 2101
       $moderator = user_load($user->uid);
2102 2102
       $settings = array(
2103 2103
         'from' => '',
@@ -2201,25 +2201,25 @@  discard block
 block discarded – undo
2201 2201
   if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2202 2202
 
2203 2203
   $output = '';
2204
-  $output .= '<table class="user-projects">' . "\n";
2205
-  $output .= '<thead>' . "\n";
2206
-  $output .= '  <tr>' . "\n";
2207
-  $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2208
-  $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2209
-  $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2210
-  $output .= '  </tr>' . "\n";
2211
-  $output .= '</thead>' . "\n";
2212
-  $output .= '<tbody>' . "\n";
2204
+  $output .= '<table class="user-projects">'."\n";
2205
+  $output .= '<thead>'."\n";
2206
+  $output .= '  <tr>'."\n";
2207
+  $output .= '    <th>'.bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite').'</th>'."\n";
2208
+  $output .= '    <th class="numeric">'.bts('Avg credit', array(), NULL, 'boinc:account-dashboard').'</th>'."\n";
2209
+  $output .= '    <th class="numeric">'.bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits').'</th>'."\n";
2210
+  $output .= '  </tr>'."\n";
2211
+  $output .= '</thead>'."\n";
2212
+  $output .= '<tbody>'."\n";
2213 2213
   foreach ($projects AS $project) {
2214
-    $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
2215
-    $output .= '  <tr>' . "\n";
2216
-    $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
2217
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->expavg_credit) . '</td>' . "\n";
2218
-    $output .= '    <td class="numeric">' . boincwork_format_stats((float) $project->total_credit) . '</td>' . "\n";
2219
-    $output .= '  </tr>' . "\n";
2214
+    $url = rtrim($project->url, '/').'/show_user.php?userid='.$project->id;
2215
+    $output .= '  <tr>'."\n";
2216
+    $output .= '    <td>'.l($project->name, $url).'</td>'."\n";
2217
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->expavg_credit).'</td>'."\n";
2218
+    $output .= '    <td class="numeric">'.boincwork_format_stats((float)$project->total_credit).'</td>'."\n";
2219
+    $output .= '  </tr>'."\n";
2220 2220
   }
2221
-  $output .= '</tbody>' . "\n";
2222
-  $output .= '</table>' . "\n";
2221
+  $output .= '</tbody>'."\n";
2222
+  $output .= '</table>'."\n";
2223 2223
   $more_link = ($account) ? "user/{$account->uid}/stats" : 'account/stats';
2224 2224
   //$output .= "<div class=\"more-link\"><a href=\"{$more_link}\">More stats</a></div>" . "\n";
2225 2225
   return $output;
@@ -2239,8 +2239,8 @@  discard block
 block discarded – undo
2239 2239
     'cpid' => $cpid
2240 2240
   );
2241 2241
   $args = array();
2242
-  foreach ($get as $arg => $value) $args[] = "{$arg}=" . rawurlencode($value);
2243
-  $query = '?' . implode('&', $args);
2242
+  foreach ($get as $arg => $value) $args[] = "{$arg}=".rawurlencode($value);
2243
+  $query = '?'.implode('&', $args);
2244 2244
 
2245 2245
   // Load XML from RPC
2246 2246
   $target_url = "http://{$stats_server}/{$stats_rpc}{$query}";
@@ -2312,12 +2312,12 @@  discard block
 block discarded – undo
2312 2312
     $output .= '<ul class="tab-list">';
2313 2313
     $count = 0;
2314 2314
     foreach ($links as $key => $link) {
2315
-      $output .= '<li class="' . (($count == 0) ? 'first primary ' : '') . 'tab">';
2315
+      $output .= '<li class="'.(($count == 0) ? 'first primary ' : '').'tab">';
2316 2316
       $output .= l($link['title'], $link['href'], array('query' => drupal_get_destination()));
2317 2317
       $output .= '</li>';
2318 2318
       $count++;
2319 2319
     }
2320
-    $output .= '<li class="' . (($count) ? '' : 'first ') . 'last tab">' . flag_create_link('abuse_user_meta', $account->uid) . '</li>';
2320
+    $output .= '<li class="'.(($count) ? '' : 'first ').'last tab">'.flag_create_link('abuse_user_meta', $account->uid).'</li>';
2321 2321
     $output .= '</ul>';
2322 2322
   }
2323 2323
   return $output;
@@ -2358,7 +2358,7 @@  discard block
 block discarded – undo
2358 2358
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
2359 2359
 
2360 2360
   foreach ($documents as $document) {
2361
-    if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
2361
+    if ($document->entity_type == 'node' AND $document->bundle == 'profile') {
2362 2362
       // Node information.
2363 2363
       $nid = $document->entity_id;
2364 2364
       $node = node_load($nid);
@@ -2408,11 +2408,11 @@  discard block
 block discarded – undo
2408 2408
   // privatemsg module. We need to convert them back to spaces for the
2409 2409
   // check below.
2410 2410
   $boincname = preg_replace("/\\xc2\\xa0/", " ", $boincname);
2411
-  if ($drupalid>0) {
2411
+  if ($drupalid > 0) {
2412 2412
     if ($recipient = user_load(array('uid' => $drupalid))) {
2413 2413
       // Double-check that the loaded user matches both boincuser_id
2414 2414
       // and boincuser_name.
2415
-      if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2415
+      if (($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name)) {
2416 2416
         return $recipient;
2417 2417
       }
2418 2418
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     'weight' => 5
84 84
   );
85 85
   $items['moderate/profile/%/reject'] = array(
86
-    'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
86
+    'title' => bts('Reject profile', array(), null, 'boinc:moderate-user'),
87 87
     'description' => 'Reject profile content',
88 88
     'page callback' => 'drupal_get_form',
89 89
     'page arguments' => array('boincuser_moderate_profile_reject_form', 2),
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     'weight' => 5
93 93
   );
94 94
   $items['moderate/user/%/ban'] = array(
95
-    'title' => bts('Ban user', array(), NULL, 'boinc:moderate-ban-user'),
95
+    'title' => bts('Ban user', array(), null, 'boinc:moderate-ban-user'),
96 96
     'description' => 'Ban a user from using community features',
97 97
     'page callback' => 'drupal_get_form',
98 98
     'page arguments' => array('boincuser_moderate_user_ban_form', 2),
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     'weight' => 5
124 124
   );
125 125
   $items['user/login/auth'] = array(
126
-    'title' => bts('Authenticator login', array(), NULL, 'boinc:authenticator-login-page'),
126
+    'title' => bts('Authenticator login', array(), null, 'boinc:authenticator-login-page'),
127 127
     'description' => 'Log in using a user authenticator',
128 128
     'page callback' => 'drupal_get_form',
129 129
     'page arguments' => array('boincuser_authloginform'),
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     'type' => MENU_CALLBACK,
132 132
   );
133 133
   $items['user/termsofuse'] = array(
134
-    'title' => bts('Terms of Use', array(), NULL, 'boinc:termsofuse-form'),
134
+    'title' => bts('Terms of Use', array(), null, 'boinc:termsofuse-form'),
135 135
     'description' => 'A site\'s term of use.',
136 136
     'page callback' => 'drupal_get_form',
137 137
     'page arguments' => array('boincuser_termsofuse_form'),
@@ -185,19 +185,19 @@  discard block
 block discarded – undo
185 185
     'title' => 'Create Account RPC',
186 186
     'description' => 'RPC for creating user accounts.',
187 187
     'page callback' => 'boincuser_create_account',
188
-    'access callback' => TRUE,
188
+    'access callback' => true,
189 189
     'type' => MENU_CALLBACK
190 190
   );
191 191
   $items['account_finish.php'] = array(
192 192
     'title' => 'Welcome to ' . variable_get('site_name', 'Drupal-BOINC'),
193 193
     'description' => 'RPC for after a user has created an account.',
194 194
     'page callback' => 'boincuser_account_finish',
195
-    'access callback' => TRUE,
195
+    'access callback' => true,
196 196
     'type' => MENU_CALLBACK,
197 197
   );
198 198
   $items['boincuser/autocomplete'] = array(
199 199
     'page callback' => '_boincuser_user_name_autocomplete',
200
-    'access callback' => TRUE,
200
+    'access callback' => true,
201 201
     'type' => MENU_CALLBACK,
202 202
   );
203 203
   $items['user/%user/recoveremail/%'] = array(
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     'title' => t('Recover previous email'),
213 213
     'description' => t('redirect'),
214 214
     'page callback' => '_boincuser_redirect_recover_email',
215
-    'access callback' => TRUE,
215
+    'access callback' => true,
216 216
     'type' => MENU_CALLBACK,
217 217
   );
218 218
   return $items;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
   // Check if user has agreed to the terms of use. If not, send the
248 248
   // user to the terms-of-use form. This is only makes sense if the
249 249
   // termsofuse is enabled, by having text in the termsofuse variable.
250
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
250
+  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', false);
251 251
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
252 252
   if ( (!empty($termsofuse)) and ($user->uid) ) {
253 253
     if ( !boincuser_check_termsofuse($user) and ($existinguser_tou) ) {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
  * Implementation of hook_user(); add custom actions to standard
297 297
  * Drupal user operations
298 298
  */
299
-function boincuser_user($op, &$edit, &$account, $category = NULL) {
299
+function boincuser_user($op, &$edit, &$account, $category = null) {
300 300
   require_boinc('boinc_db');
301 301
   require_boinc('user');
302 302
   require_boinc('xml');
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
       $account->boincuser_email_addr_change_time = $boinc_user->email_addr_change_time;
346 346
       db_set_active('default');
347 347
       // Set Drupal team ID
348
-      $account->team = NULL;
348
+      $account->team = null;
349 349
       if ($account->boincteam_id) {
350 350
         $account->team = db_result(db_query("
351 351
           SELECT nid FROM {boincteam} WHERE team_id = %d",
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         $boinc_user = boincuser_register_make_user($user_params);
454 454
         if (!$boinc_user) {
455 455
           // Account exists with this email addr
456
-          form_set_error('email', bts('Error creating BOINC account.', array(), NULL, 'boinc:add-new-user'));
456
+          form_set_error('email', bts('Error creating BOINC account.', array(), null, 'boinc:add-new-user'));
457 457
           return;
458 458
         }
459 459
 
@@ -499,9 +499,9 @@  discard block
 block discarded – undo
499 499
         case 'user_account':
500 500
           // Ensure that BOINC data is altered
501 501
 
502
-          $changing_email = ($edit['mail'] AND $edit['mail'] != $boinc_user->email_addr) ? true : false;
502
+          $changing_email = ($edit['mail'] and $edit['mail'] != $boinc_user->email_addr) ? true : false;
503 503
           $changing_pass = ($edit['pass']) ? true : false;
504
-          if ($changing_email OR $changing_pass) {
504
+          if ($changing_email or $changing_pass) {
505 505
             // set email address to lower-case
506 506
             $lower_email_addr = strtolower($edit['mail']);
507 507
 
@@ -583,13 +583,13 @@  discard block
 block discarded – undo
583 583
  *(forward compatible to Drupal 7).
584 584
  */
585 585
 function boincuser_user_login(&$edit, $account) {
586
-  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
586
+  $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', false);
587 587
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
588 588
 
589 589
   // Use the same code as boincuser_form_alter(), for case
590 590
   // 'user_profile_form', if the refering page is the user password
591 591
   // reset form, then do not check for terms of use.
592
-  $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === FALSE) ? 0 : 1;
592
+  $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/$account->uid") === false) ? 0 : 1;
593 593
   if ($reset_pass) {
594 594
     return;
595 595
   }
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 
738 738
       // General friend form overrides
739 739
       $form['flag_friend_submit']['#prefix'] = '<li class="first tab">';
740
-      $form['flag_friend_submit']['#value'] = bts('Send request', array(), NULL, 'boinc:friends-page');
740
+      $form['flag_friend_submit']['#value'] = bts('Send request', array(), null, 'boinc:friends-page');
741 741
       $form['flag_friend_submit']['#type'] = 'submit';
742 742
       $form['flag_friend_submit']['#suffix'] = '</li>';
743 743
       $form['flag_friend_submit']['#weight'] = 1002;
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
       case FLAG_FRIEND_BOTH:
747 747
       case FLAG_FRIEND_FLAGGED:
748 748
         unset($form['actions']);
749
-        $form['flag_friend_submit']['#value'] = bts('Remove friend', array(), NULL, 'boinc:friends-remove');
749
+        $form['flag_friend_submit']['#value'] = bts('Remove friend', array(), null, 'boinc:friends-remove');
750 750
         // Add in our hack handler to fix the flag_friend module
751 751
         $final_handler = array_pop($form['#submit']);
752 752
         $form['#submit'][] = 'boincuser_fix_unfriend_form_submit';
@@ -754,21 +754,21 @@  discard block
 block discarded – undo
754 754
         break;
755 755
       case FLAG_FRIEND_PENDING:
756 756
         unset($form['actions']);
757
-        $form['flag_friend_submit']['#value'] = bts('Remove request', array(), NULL, 'boinc:friends-page');
757
+        $form['flag_friend_submit']['#value'] = bts('Remove request', array(), null, 'boinc:friends-page');
758 758
         break;
759 759
       case FLAG_FRIEND_APPROVAL:
760 760
         if ($action == 'flag') {
761
-          $form['flag_friend_submit']['#value'] = bts('Approve request', array(), NULL, 'boinc:friends-page');
761
+          $form['flag_friend_submit']['#value'] = bts('Approve request', array(), null, 'boinc:friends-page');
762 762
         }
763 763
         elseif ($action == 'unflag') {
764 764
           unset($form['actions']);
765
-          $form['flag_friend_submit']['#value'] = bts('Deny request', array(), NULL, 'boinc:friends-page');
765
+          $form['flag_friend_submit']['#value'] = bts('Deny request', array(), null, 'boinc:friends-page');
766 766
         }
767 767
         break;
768 768
       case FLAG_FRIEND_UNFLAGGED:
769 769
       default:
770 770
         $user_links[] = array(
771
-          'title' => bts('Add as friend', array(), NULL, 'boinc:friends-add'),
771
+          'title' => bts('Add as friend', array(), null, 'boinc:friends-add'),
772 772
           'href' => "flag/confirm/flag/friend/{$account->uid}"
773 773
         );
774 774
       }
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
     }
779 779
 
780 780
     $form['cancel'] = array(
781
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $cancel_dest) . '</li>',
781
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $cancel_dest) . '</li>',
782 782
       '#weight' => 1004,
783 783
     );
784 784
     $form['form control tabs suffix'] = array(
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
       '#weight' => 1001,
802 802
     );
803 803
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
804
-    $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
804
+    $form['buttons']['submit']['#value'] = bts('Save changes', array(), null, 'boinc:form-save');
805 805
     $form['buttons']['submit']['#suffix'] = '</li>';
806 806
     $form['buttons']['submit']['#weight'] = 1002;
807 807
     $form['buttons']['preview']['#prefix'] = '<li class="tab">';
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
812 812
     $form['buttons']['preview_changes']['#weight'] = 1004;
813 813
     $form['buttons']['cancel'] = array(
814
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
814
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
815 815
       '#weight' => 1005,
816 816
     );
817 817
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
@@ -839,11 +839,11 @@  discard block
 block discarded – undo
839 839
       '#weight' => 1001,
840 840
     );
841 841
     $form['actions']['submit']['#prefix'] = '<li class="first tab">';
842
-    $form['actions']['submit']['#value'] = bts('Delete', array(), NULL, 'boinc:form-delete');
842
+    $form['actions']['submit']['#value'] = bts('Delete', array(), null, 'boinc:form-delete');
843 843
     $form['actions']['submit']['#suffix'] = '</li>';
844 844
     $form['actions']['submit']['#weight'] = 1002;
845 845
     $form['actions']['cancel'] = array(
846
-        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
846
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "node/{$form['nid']['#value']}") . '</li>',
847 847
       '#weight' => 1005,
848 848
     );
849 849
     $form['actions']['form control tabs suffix'] = array(
@@ -863,14 +863,14 @@  discard block
 block discarded – undo
863 863
       '#weight' => 1001,
864 864
     );
865 865
     $form['privatemsg']['submit']['#prefix'] = '<li class="first tab">';
866
-    $form['privatemsg']['submit']['#value'] = bts('Send message', array(), NULL, 'boinc:private-message');
866
+    $form['privatemsg']['submit']['#value'] = bts('Send message', array(), null, 'boinc:private-message');
867 867
     $form['privatemsg']['submit']['#suffix'] = '</li>';
868 868
     $form['privatemsg']['submit']['#weight'] = 1002;
869 869
     $form['privatemsg']['preview']['#prefix'] = '<li class="tab">';
870 870
     $form['privatemsg']['preview']['#suffix'] = '</li>';
871 871
     $form['privatemsg']['preview']['#weight'] = 1003;
872 872
     $form['privatemsg']['cancel'] = array(
873
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
873
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>',
874 874
       '#weight' => 1004,
875 875
     );
876 876
     $form['privatemsg']['form control tabs suffix'] = array(
@@ -885,18 +885,18 @@  discard block
 block discarded – undo
885 885
   // Login form
886 886
   case 'user_login':
887 887
   case 'user_login_block':
888
-      drupal_set_title(bts('Login', array(), NULL, 'boinc:menu-link'));
888
+      drupal_set_title(bts('Login', array(), null, 'boinc:menu-link'));
889 889
     // Replace name with email in login form
890 890
     unset($form['name']);
891 891
     array_unshift($form, array(
892 892
       'email' => array(
893 893
         '#type' => 'textfield',
894
-        '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
894
+        '#title' => bts('Email address', array(), null, 'boinc:email-address-to-login'),
895 895
         '#size' => ($form_id == 'user_login_block') ? 15 : 60,
896 896
         '#maxlength' => EMAIL_MAX_LENGTH,
897
-        '#required' => TRUE,
897
+        '#required' => true,
898 898
         '#attributes' => array('tabindex' => '1'),
899
-        '#description' => bts('Enter your @s email address.', array('@s' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:standard-login-page')
899
+        '#description' => bts('Enter your @s email address.', array('@s' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:standard-login-page')
900 900
       ),
901 901
       'validation_source' => array(
902 902
         '#type' => 'hidden',
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
     );
913 913
     $form['buttons']['submit'] = $form['submit'];
914 914
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
915
-    $form['buttons']['submit']['#value'] = bts('Log in', array(), NULL, 'boinc:standard-login-page');
915
+    $form['buttons']['submit']['#value'] = bts('Log in', array(), null, 'boinc:standard-login-page');
916 916
     $form['buttons']['submit']['#suffix'] = '</li>';
917 917
     $form['buttons']['submit']['#weight'] = 1002;
918 918
     $form['buttons']['form control tabs suffix'] = array(
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
     if (isset($form_state['post']['email']) and isset($form_state['post']['pass'])) {
929 929
       // Find the local validation function's entry so we can replace it.
930 930
       $array_key = array_search('user_login_authenticate_validate', $form['#validate']);
931
-      if ($array_key === FALSE) {
931
+      if ($array_key === false) {
932 932
         // Could not find it. Some other module must have run form_alter().
933 933
         // We will simply add our validation just before the final validator.
934 934
         $final_validator = array_pop($form['#validate']);
@@ -956,26 +956,26 @@  discard block
 block discarded – undo
956 956
     }
957 957
 
958 958
     // Set special message if user has not agreed to TOU
959
-    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', FALSE);
959
+    $existinguser_tou = variable_get('boinc_weboptions_existinguser_tou', false);
960 960
     $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
961 961
     if ( (!boincuser_check_termsofuse($account)) and ($existinguser_tou) and (!empty($termsofuse)) and (!user_access('administer users')) ) {
962 962
       drupal_set_message(
963 963
         bts('INFO: You have not agreed to the terms of use for @project. You may use this form to change your email address and/or password. Please note: you may not delete your account within seven (7) days of changing your email address.',
964 964
         array(
965 965
           '@project' => variable_get('site_name','Drupal-BOINC'),
966
-        ), NULL, 'boinc:account-credentials-change')
966
+        ), null, 'boinc:account-credentials-change')
967 967
       , 'info');
968 968
     }
969 969
 
970 970
     // A bit hackish... but don't require the user to enter his password if
971 971
     // coming from the password reset function
972
-    $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/{$form['#uid']}") === FALSE) ? 0 : 1;
972
+    $reset_pass = (strpos($_SERVER['HTTP_REFERER'], "/user/reset/{$form['#uid']}") === false) ? 0 : 1;
973 973
     if ($reset_pass) {
974 974
       $_SESSION['reset_pass'] = 1;
975 975
     }
976 976
 
977 977
     // Adjust form elements already present
978
-    $form['account']['name']['#title'] = bts('Drupal Username', array(), NULL, 'boinc:drupal-username');
978
+    $form['account']['name']['#title'] = bts('Drupal Username', array(), null, 'boinc:drupal-username');
979 979
     $form['account']['name']['#size'] = 40;
980 980
     $form['account']['name']['#attributes']['autocomplete'] = 'off';
981 981
     $form['account']['name']['#description'] .= '<p>This is the drupal (internal) username. The title above shows the BOINC username, which is the display name used publicly that the user can change in Community Preferences.';
@@ -986,11 +986,11 @@  discard block
 block discarded – undo
986 986
       // Add BOINC username (aka displayname)
987 987
       $form['account']['boincuser_name'] = array(
988 988
         '#type' => 'textfield',
989
-        '#title' => bts('BOINC Username', array(), NULL, 'boinc:user-or-team-name'),
989
+        '#title' => bts('BOINC Username', array(), null, 'boinc:user-or-team-name'),
990 990
         '#default_value' => $account->boincuser_name,
991 991
         '#maxlength' => USERNAME_MAX_LENGTH,
992
-        '#required' => TRUE,
993
-        '#description' => bts('This is the BOINC (external) username. This is the same setting as found in Account -> Preferences -> Community.', array(), NULL, 'boinc:username-change'),
992
+        '#required' => true,
993
+        '#description' => bts('This is the BOINC (external) username. This is the same setting as found in Account -> Preferences -> Community.', array(), null, 'boinc:username-change'),
994 994
         '#size' => 40,
995 995
       );
996 996
     }
@@ -999,23 +999,23 @@  discard block
 block discarded – undo
999 999
     // ago, it cannot be changed again.
1000 1000
     $duration = TOKEN_DURATION_ONE_WEEK;
1001 1001
     if (($account->boincuser_email_addr_change_time + $duration) > time() and (!user_access('administer users'))) {
1002
-      $form['account']['mail']['#required'] = FALSE;
1002
+      $form['account']['mail']['#required'] = false;
1003 1003
       $form['account']['mailhelp'] = array(
1004 1004
         '#value' => bts("You email address was changed within the past seven (7) days. Please look for an email to !prev_email if you need to revert this change. You may change your email address on !time.",
1005 1005
           array(
1006 1006
             '!prev_email' => $account->boincuser_previous_email_addr,
1007 1007
             '!time' => date('F j, Y \a\t G:i T', $account->boincuser_email_addr_change_time + $duration),
1008
-          ), NULL, 'boinc:account-credentials-change'),
1008
+          ), null, 'boinc:account-credentials-change'),
1009 1009
       );
1010 1010
     }
1011 1011
 
1012
-    if (!$reset_pass AND ($user->uid == $account->uid OR !user_access('administer users'))) {
1012
+    if (!$reset_pass and ($user->uid == $account->uid or !user_access('administer users'))) {
1013 1013
       // Add a password authenticator, required to change email or pw
1014 1014
       $form['account']['current_pass'] = array(
1015 1015
         '#type' => 'password',
1016
-        '#title' => bts('Enter your password to save changes', array(), NULL, 'boinc:account-credentials-change'),
1016
+        '#title' => bts('Enter your password to save changes', array(), null, 'boinc:account-credentials-change'),
1017 1017
         '#description' => bts('Enter your current password if changing your email
1018
-          address or password.', array(), NULL, 'boinc:account-credentials-change'),
1018
+          address or password.', array(), null, 'boinc:account-credentials-change'),
1019 1019
         '#size' => 17,
1020 1020
         '#attributes' => array(
1021 1021
           'autocomplete' => 'off',
@@ -1027,35 +1027,35 @@  discard block
 block discarded – undo
1027 1027
     $form['account']['boincuser_id'] = array(
1028 1028
       '#value' => '
1029 1029
         <div class="form-item">
1030
-          <label>' . bts('BOINC user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1030
+          <label>' . bts('BOINC user ID', array(), null, 'boinc:account-credentials-change') . '</label>
1031 1031
           <span>' . $account->boincuser_id . '</span>
1032 1032
         </div>',
1033 1033
     );
1034 1034
     $form['account']['user_id'] = array(
1035 1035
       '#value' => '
1036 1036
         <div class="form-item">
1037
-          <label>' . bts('Drupal user ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1037
+          <label>' . bts('Drupal user ID', array(), null, 'boinc:account-credentials-change') . '</label>
1038 1038
           <span>' . $account->uid . '</span>
1039 1039
         </div>',
1040 1040
     );
1041 1041
     $form['account']['account_key'] = array(
1042 1042
       '#value' => '
1043 1043
         <div class="form-item">
1044
-          <label>' . bts('Account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1044
+          <label>' . bts('Account key', array(), null, 'boinc:account-credentials-change') . '</label>
1045 1045
           <span>' . $account->boincuser_account_key . '</span>
1046 1046
         </div>',
1047 1047
     );
1048 1048
     $form['account']['weak_account_key'] = array(
1049 1049
       '#value' => '
1050 1050
         <div class="form-item">
1051
-          <label>' . bts('Weak account key', array(), NULL, 'boinc:account-credentials-change') . '</label>
1051
+          <label>' . bts('Weak account key', array(), null, 'boinc:account-credentials-change') . '</label>
1052 1052
           <span>' . "{$account->boincuser_id}_{$account->boincuser_weak_auth}" . '</span>
1053 1053
         </div>',
1054 1054
     );
1055 1055
     $form['account']['cpid'] = array(
1056 1056
       '#value' => '
1057 1057
         <div class="form-item">
1058
-          <label>' . bts('Cross-project ID', array(), NULL, 'boinc:account-credentials-change') . '</label>
1058
+          <label>' . bts('Cross-project ID', array(), null, 'boinc:account-credentials-change') . '</label>
1059 1059
           <span>' . $account->boincuser_cpid . '</span>
1060 1060
         </div>',
1061 1061
     );
@@ -1070,14 +1070,14 @@  discard block
 block discarded – undo
1070 1070
       '#weight' => 1001,
1071 1071
     );
1072 1072
     $form['submit']['#prefix'] = '<li class="first tab">';
1073
-    $form['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
1073
+    $form['submit']['#value'] = bts('Save changes', array(), null, 'boinc:form-save');
1074 1074
     $form['submit']['#suffix'] = '</li>';
1075 1075
     $form['submit']['#weight'] = 1002;
1076 1076
     $form['cancel'] = array(
1077
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1077
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1078 1078
       '#weight' => 1003,
1079 1079
     );
1080
-    if (isset($form['delete']) AND is_array($form['delete'])) {
1080
+    if (isset($form['delete']) and is_array($form['delete'])) {
1081 1081
       $form['delete']['#prefix'] = '<li class="first alt tab">';
1082 1082
       $form['delete']['#suffix'] = '</li>';
1083 1083
       $form['delete']['#weight'] = 1004;
@@ -1139,7 +1139,7 @@  discard block
 block discarded – undo
1139 1139
 
1140 1140
     // Set form['title'], but hide it
1141 1141
     $form['title']['#default_value'] = $account->boincuser_name;
1142
-    $form['title']['#access'] = FALSE;
1142
+    $form['title']['#access'] = false;
1143 1143
 
1144 1144
     $form['separator_bottom'] = array(
1145 1145
       '#value' => '<div class="separator buttons"></div>',
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
       '#weight' => 1001,
1161 1161
     );
1162 1162
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
1163
-    $form['buttons']['submit']['#value'] = bts('Save changes', array(), NULL, 'boinc:form-save');
1163
+    $form['buttons']['submit']['#value'] = bts('Save changes', array(), null, 'boinc:form-save');
1164 1164
     $form['buttons']['submit']['#suffix'] = '</li>';
1165 1165
     $form['buttons']['submit']['#weight'] = 1002;
1166 1166
     $form['buttons']['preview']['#prefix'] = '<li class="tab">';
@@ -1170,12 +1170,12 @@  discard block
 block discarded – undo
1170 1170
     $form['buttons']['preview_changes']['#suffix'] = '</li>';
1171 1171
     $form['buttons']['preview_changes']['#weight'] = 1004;
1172 1172
     $form['buttons']['cancel'] = array(
1173
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1173
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1174 1174
       '#weight' => 1005,
1175 1175
     );
1176 1176
     $form['buttons']['delete']['#prefix'] = '<li class="tab">';
1177 1177
     $form['buttons']['delete']['#suffix'] = '</li>';
1178
-    $form['buttons']['delete']['#value'] = bts('Clear User Profile', array(), NULL, 'boinc:form-save');
1178
+    $form['buttons']['delete']['#value'] = bts('Clear User Profile', array(), null, 'boinc:form-save');
1179 1179
     $form['buttons']['delete']['#weight'] = 1006;
1180 1180
     $form['buttons']['delete']['#submit'] = array('_boincuser_node_profile_delete_submit');
1181 1181
     $form['buttons']['form control tabs suffix'] = array(
@@ -1209,11 +1209,11 @@  discard block
 block discarded – undo
1209 1209
     array_unshift($form, array(
1210 1210
       'boincuser_name' => array(
1211 1211
         '#type' => 'textfield',
1212
-        '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1212
+        '#title' => bts('Name', array(), null, 'boinc:user-or-team-name'),
1213 1213
         '#default_value' => $edit['boincuser_name'],
1214 1214
         '#maxlength' => USERNAME_MAX_LENGTH,
1215
-        '#description' => bts('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.', array(), NULL, 'boinc:user-register'),
1216
-        '#required' => TRUE
1215
+        '#description' => bts('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.', array(), null, 'boinc:user-register'),
1216
+        '#required' => true
1217 1217
       ),
1218 1218
     ));
1219 1219
     // Set name temporarily to dummy value to beat validation
@@ -1233,27 +1233,27 @@  discard block
 block discarded – undo
1233 1233
         '#type'   => 'fieldset',
1234 1234
         '#prefix' => '<div id="termsofuse-wrapper">', // This is our wrapper div.
1235 1235
         '#suffix' => '</div>',
1236
-        '#tree'   => TRUE,
1236
+        '#tree'   => true,
1237 1237
         '#weight' => -15,
1238 1238
       );
1239 1239
 
1240 1240
       $form['termsofuse']['title1'] = array(
1241 1241
         '#weight' => -12,
1242
-        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:user-register' ) . '</h2>',
1242
+        '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), null, 'project:user-register' ) . '</h2>',
1243 1243
         '#prefix' => '<div id="register-title1">',
1244 1244
         '#suffix' => '</div>',
1245 1245
       );
1246 1246
 
1247 1247
       $form['termsofuse']['body'] = array(
1248 1248
         '#weight' => -10,
1249
-        '#value' => bts($termsofuse, array(), NULL, 'project:user-register'),
1249
+        '#value' => bts($termsofuse, array(), null, 'project:user-register'),
1250 1250
         '#prefix' => '<div id="register-termsofuse">',
1251 1251
         '#suffix' => '</div>',
1252 1252
       );
1253 1253
 
1254 1254
       $form['termsofuse']['agreeTOU'] = array(
1255 1255
         '#type' => 'checkbox',
1256
-        '#title' => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), NULL, 'project:user-register'),
1256
+        '#title' => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), null, 'project:user-register'),
1257 1257
         '#weight' => -8,
1258 1258
         '#prefix' => '<div id="register-checkbox">',
1259 1259
         '#suffix' => '</div>',
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
 
1263 1263
     $form['title2'] = array(
1264 1264
       '#weight' => -6,
1265
-      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), NULL, 'project:user-register') . '</h2>',
1265
+      '#value' => '<h2>' . bts(variable_get('boinc_weboptions_registrationtitle2', 'Fill in your name, email, and choose a secure passphrase.'), array(), null, 'project:user-register') . '</h2>',
1266 1266
       '#prefix' => '<div id="register-title2">',
1267 1267
       '#suffix' => '</div>',
1268 1268
     );
@@ -1282,26 +1282,26 @@  discard block
 block discarded – undo
1282 1282
 
1283 1283
   // Request new password form
1284 1284
   case 'user_pass':
1285
-    drupal_set_title(bts('Forgot password', array(), NULL, 'boinc:forgot-password'));
1285
+    drupal_set_title(bts('Forgot password', array(), null, 'boinc:forgot-password'));
1286 1286
     // Replace name/email text box with email only; retain "name" label
1287 1287
     // for compatibility with standard Drupal submit function
1288 1288
     unset($form['name']);
1289 1289
     array_unshift($form, array(
1290 1290
       'name' => array(
1291 1291
         '#type' => 'textfield',
1292
-        '#title' => bts('Email address', array(), NULL, 'boinc:email-address-to-login'),
1292
+        '#title' => bts('Email address', array(), null, 'boinc:email-address-to-login'),
1293 1293
         '#size' => 60,
1294 1294
         '#maxlength' => EMAIL_MAX_LENGTH,
1295
-        '#required' => TRUE,
1295
+        '#required' => true,
1296 1296
         '#description' => bts(
1297 1297
           'Enter your email address to receive instructions for resetting your password (or use the !authenticator_login).',
1298 1298
           array(
1299 1299
             '!authenticator_login' => l(
1300
-              bts('authenticator-based login', array(), NULL, 'boinc:forgot-password'),
1300
+              bts('authenticator-based login', array(), null, 'boinc:forgot-password'),
1301 1301
               'user/login/auth'
1302 1302
             )
1303 1303
           )
1304
-        , NULL, 'boinc:forgot-password'),
1304
+        , null, 'boinc:forgot-password'),
1305 1305
       ),
1306 1306
     ));
1307 1307
 
@@ -1322,11 +1322,11 @@  discard block
 block discarded – undo
1322 1322
     );
1323 1323
     $form['buttons']['submit'] = $form['submit'];
1324 1324
     $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
1325
-    $form['buttons']['submit']['#value'] = bts('Send', array(), NULL, 'boinc:form-send');
1325
+    $form['buttons']['submit']['#value'] = bts('Send', array(), null, 'boinc:form-send');
1326 1326
     $form['buttons']['submit']['#suffix'] = '</li>';
1327 1327
     $form['buttons']['submit']['#weight'] = 1002;
1328 1328
     $form['buttons']['cancel'] = array(
1329
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/login') . '</li>',
1329
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), 'user/login') . '</li>',
1330 1330
       '#weight' => 1005,
1331 1331
     );
1332 1332
     $form['buttons']['form control tabs suffix'] = array(
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
     break;
1344 1344
 
1345 1345
   case 'views_exposed_form':
1346
-      $form['submit']['#value'] = bts('Search', array(), NULL, 'boinc:search-user');
1346
+      $form['submit']['#value'] = bts('Search', array(), null, 'boinc:search-user');
1347 1347
     break;
1348 1348
   }
1349 1349
 }
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
 function boincuser_process_password_confirm($element) {
1376 1376
   // Check if parent element is "account".
1377 1377
   if ($element['#array_parents'][0] == 'account') {
1378
-    $element['pass1']['#title'] = bts('Change password', array(), NULL, 'boinc:forgot-password');
1378
+    $element['pass1']['#title'] = bts('Change password', array(), null, 'boinc:forgot-password');
1379 1379
   }
1380 1380
   return $element;
1381 1381
 }
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 /**
1396 1396
  * Implementation of hook_token_values
1397 1397
  */
1398
-function boincuser_token_values($type, $object = NULL, $options = array()) {
1398
+function boincuser_token_values($type, $object = null, $options = array()) {
1399 1399
   if ($type == 'user') {
1400 1400
     $account = user_load($object->uid);
1401 1401
     $tokens['display-name'] = $account->boincuser_name;
@@ -1463,13 +1463,13 @@  discard block
 block discarded – undo
1463 1463
   require_boinc('boinc_db');
1464 1464
   $num_deleted = BoincUserDeleted::delete_expired();
1465 1465
   if ($num_deleted>0) {
1466
-    watchdog('boincuser', "Deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1466
+    watchdog('boincuser', "deleted ${num_deleted} users from user_deleted table", WATCHDOG_NOTICE);
1467 1467
   }
1468 1468
 
1469 1469
   // Delete expired tokens from token table
1470 1470
   $tokens_deleted = BoincToken::delete_expired();
1471 1471
   if ($tokens_deleted>0) {
1472
-    watchdog('boincuser', "Deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1472
+    watchdog('boincuser', "deleted ${tokens_deleted} tokens from token table", WATCHDOG_NOTICE);
1473 1473
   }
1474 1474
 }
1475 1475
 
@@ -1511,8 +1511,8 @@  discard block
 block discarded – undo
1511 1511
   if (!isset($account->roles[$verified_contributor])) {
1512 1512
     drupal_set_message(bts(
1513 1513
         'You may only create or modify your user profile after earning @count credits.',
1514
-        array('@count' => $min_credit_to_post), NULL, 'boinc:view-profile'
1515
-    ), 'warning', FALSE);
1514
+        array('@count' => $min_credit_to_post), null, 'boinc:view-profile'
1515
+    ), 'warning', false);
1516 1516
   }
1517 1517
 
1518 1518
   // For now, just call the user module profile view function
@@ -1555,35 +1555,35 @@  discard block
 block discarded – undo
1555 1555
     if ($registration_enabled) {
1556 1556
       $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1557 1557
       array(
1558
-        '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1558
+        '!create_an_account' => l(bts('create an account', array(), null, 'boinc:join-page'), 'user/registration'),
1559 1559
         '@sitename' => $site_name,
1560
-      ), NULL, 'boinc:join-page') . '</li>';
1560
+      ), null, 'boinc:join-page') . '</li>';
1561 1561
     }
1562
-    $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), NULL, 'boinc:join-page') . '</li>';
1562
+    $output .= '  <li>' . bts("Install BOINC on this device if not already present.", array(), null, 'boinc:join-page') . '</li>';
1563 1563
     $output .= '  <li>' . bts("Select <i>Tools / Add Project</i>. Choose @sitename from the list, or enter @siteurl.",
1564 1564
     array(
1565 1565
       '@sitename' => $site_name,
1566 1566
       '@siteurl' => $base_url,
1567
-    ), NULL, 'boinc:join-page') . '</li>';
1567
+    ), null, 'boinc:join-page') . '</li>';
1568 1568
     if ($registration_enabled) {
1569 1569
       $output .= '<li>' . bts("If you're running a command-line or pre-5.0 version of BOINC, use <b>!boinccmd</b> to add the project.",
1570 1570
         array(
1571 1571
           '!boinccmd' => l('boinccmd --project_attach', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1572
-        ), NULL, 'boinc:join-page') . '</li>';
1572
+        ), null, 'boinc:join-page') . '</li>';
1573 1573
     }
1574 1574
     else {
1575 1575
       $output .= '<li>' . bts("If you're running a command-line version of BOINC,
1576 1576
         please follow the <b>!instructionslink</b> to first <i>create an account</i>, and then <i>attach</i> to this project. Use the same project URL as above.",
1577 1577
         array(
1578 1578
           '!instructionslink' => l('instructions', 'http://boinc.berkeley.edu/wiki/Boinccmd_tool'),
1579
-        ), NULL, 'boinc:join-page') . '</li>';
1579
+        ), null, 'boinc:join-page') . '</li>';
1580 1580
     }
1581 1581
     $output .= '<li>' . bts("If you're running a pre-5.0 version of BOINC, please
1582 1582
       upgrade to a more recent version of BOINC to create an account
1583 1583
       at @this_project.",
1584 1584
       array(
1585 1585
         '@this_project' => $site_name,
1586
-      ), NULL, 'boinc:join-page') . '</li>';
1586
+      ), null, 'boinc:join-page') . '</li>';
1587 1587
     $output .=  '</ol>';
1588 1588
     break;
1589 1589
   case 'new':
@@ -1603,29 +1603,29 @@  discard block
 block discarded – undo
1603 1603
     if ($registration_enabled) {
1604 1604
       $output .= '<li>' . bts('First !create_an_account here at @sitename.',
1605 1605
       array(
1606
-        '!create_an_account' => l(bts('create an account', array(), NULL, 'boinc:join-page'), 'user/registration'),
1606
+        '!create_an_account' => l(bts('create an account', array(), null, 'boinc:join-page'), 'user/registration'),
1607 1607
         '@sitename' => $site_name,
1608
-      ), NULL, 'boinc:join-page') . '</li>';
1608
+      ), null, 'boinc:join-page') . '</li>';
1609 1609
     }
1610 1610
     else if ( menu_valid_path(array('link_path' => $ruleslink)) ) {
1611 1611
       $output .= '  <li>' . bts("Read our !rules_and_policies.", array(
1612
-        '!rules_and_policies' => l(bts('Rules and Policies', array(), NULL, 'boinc:join-page'), $ruleslink),
1613
-      ), NULL, 'boinc:join-page') . '</li>';
1612
+        '!rules_and_policies' => l(bts('Rules and Policies', array(), null, 'boinc:join-page'), $ruleslink),
1613
+      ), null, 'boinc:join-page') . '</li>';
1614 1614
     }
1615
-    $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), NULL, 'boinc:join-page');
1615
+    $output .= '  <li>' . bts('Download the BOINC desktop software.', array(), null, 'boinc:join-page');
1616 1616
     $output .= '    <p>';
1617 1617
     $output .= '      <a class="button" href="http://boinc.berkeley.edu/download.php">Download</a>';
1618 1618
     $output .= '    </p>';
1619 1619
     $output .= '    ' . bts("For Android devices, visit !fdroid_link or download !apk_link directly.", array(
1620 1620
       '!fdroid_link' => '<a href="https://f-droid.org/en/packages/edu.berkeley.boinc">F-Droid</a>',
1621 1621
       '!apk_link' => '<a href="https://boinc.berkeley.edu/download_all.php">BOINC for Android</a>',
1622
-    ), NULL, 'boinc:join-page');
1622
+    ), null, 'boinc:join-page');
1623 1623
     $output .= '  </li>';
1624
-    $output .= '  <li>' . bts('Run the installer.', array(), NULL, 'boinc:join-page') . '</li>';
1624
+    $output .= '  <li>' . bts('Run the installer.', array(), null, 'boinc:join-page') . '</li>';
1625 1625
     $output .= '  <li>' . bts('Choose @sitename from the list, or enter @siteurl.', array(
1626 1626
       '@sitename' => $site_name,
1627 1627
       '@siteurl' => $base_url,
1628
-    ), NULL, 'boinc:join-page') . '</li>';
1628
+    ), null, 'boinc:join-page') . '</li>';
1629 1629
     $output .=  '</ol>';
1630 1630
   }
1631 1631
   $output .= '</div>';
@@ -1656,17 +1656,17 @@  discard block
 block discarded – undo
1656 1656
   else {
1657 1657
     $uotd = user_load($current_uotd->uid);
1658 1658
   }
1659
-  $uotd_image = boincuser_get_user_profile_image($uotd->uid, FALSE);
1659
+  $uotd_image = boincuser_get_user_profile_image($uotd->uid, false);
1660 1660
   $output = '<h2 class="pane-title">';
1661
-  $output .= ($user->uid) ? bts('Welcome back!', array(), NULL, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), NULL, 'boinc:front-page'));
1661
+  $output .= ($user->uid) ? bts('Welcome back!', array(), null, 'boinc:front-page') : ($site_name ? bts('What is @this_project?', array('@this_project' => $site_name)) : bts('Welcome!', array(), null, 'boinc:front-page'));
1662 1662
   $output .= '</h2>';
1663 1663
   $output .= '<div class="boinc-overview balance-height-front">';
1664
-  $output .= '  <div>' . bts($site_message, array(), NULL, "project:front page") . ' ' . l(bts('Learn more', array(), NULL, 'boinc:front-page'), 'about') . '</div>';
1664
+  $output .= '  <div>' . bts($site_message, array(), null, "project:front page") . ' ' . l(bts('Learn more', array(), null, 'boinc:front-page'), 'about') . '</div>';
1665 1665
   if ($user->uid) {
1666
-    $output .= '  <div>' . l(bts('View account', array(), NULL, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1666
+    $output .= '  <div>' . l(bts('View account', array(), null, 'boinc:front-page'), 'dashboard', array('attributes' => array('class' => 'join button'))) . '</div>';
1667 1667
   }
1668 1668
   else {
1669
-    $output .= '  <div>' . l(bts('Join now', array(), NULL, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1669
+    $output .= '  <div>' . l(bts('Join now', array(), null, 'boinc:front-page'), 'join', array('attributes' => array('class' => 'join button'))) . '</div>';
1670 1670
   }
1671 1671
   $output .= '</div>';
1672 1672
   $output .= '<div class="boinc-overview-details">';
@@ -1674,17 +1674,17 @@  discard block
 block discarded – undo
1674 1674
   $output .= '    <a class="user-of-the-day" href="account/' . $uotd->uid . '">';
1675 1675
   $output .= '      <div class="picture">';
1676 1676
   $output .= theme('imagefield_image', $uotd_image['image'], $uotd_image['alt'],
1677
-    $uotd_image['alt'], array(), FALSE);
1677
+    $uotd_image['alt'], array(), false);
1678 1678
   $output .= '      </div>';
1679
-  $output .= '      <div class="text">' . bts('User of the day', array(), NULL, 'boinc:front-page') . '</div>';
1679
+  $output .= '      <div class="text">' . bts('User of the day', array(), null, 'boinc:front-page') . '</div>';
1680 1680
   $output .= '      <div class="detail">' . $uotd->boincuser_name . '</div>';
1681 1681
   $output .= '    </a>';
1682 1682
   $output .= '    <div class="volunteers">';
1683
-  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), NULL, 'boinc:front-page') . '</div>';
1683
+  $output .= '      <div class="text">' . bts('Over 500,000 volunteers and counting.', array(), null, 'boinc:front-page') . '</div>';
1684 1684
   $output .= '      <div class="platforms">';
1685
-  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), NULL, 'boinc:front-page') . '</div>';
1686
-  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), NULL, 'boinc:front-page') . '</div>';
1687
-  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), NULL, 'boinc:front-page') . '</div>';
1685
+  $output .= '        <div class="detail platform windows">' . bts('Windows', array(), null, 'boinc:front-page') . '</div>';
1686
+  $output .= '        <div class="detail platform mac">' .  bts('Mac', array(), null, 'boinc:front-page') . '</div>';
1687
+  $output .= '        <div class="detail platform linux">' . bts('Linux', array(), null, 'boinc:front-page') . '</div>';
1688 1688
   $output .= '      </div>';
1689 1689
   $output .= '    </div>';
1690 1690
   $output .= '  </div>';
@@ -1712,12 +1712,12 @@  discard block
 block discarded – undo
1712 1712
   xml_header();
1713 1713
 
1714 1714
   // Account creation disabled
1715
-  $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', TRUE);
1715
+  $enablethisRPC = variable_get('boinc_weboptions_enableaccountcreateRPC', true);
1716 1716
   if (!$enablethisRPC) {
1717 1717
     $mess = bts('Account creation is done through our Web site. Please register at @url', array(
1718 1718
       '@url' => $base_url . '/user/registration',
1719 1719
     ),
1720
-    NULL, 'boinc:create_account');
1720
+    null, 'boinc:create_account');
1721 1721
     xml_error(-208, $mess);
1722 1722
   }
1723 1723
   // Invalid invite code
@@ -1771,7 +1771,7 @@  discard block
 block discarded – undo
1771 1771
       'init' => $params['email_addr'],
1772 1772
       'roles' => array($unrestricted_role => ''),
1773 1773
       'boincuser_name' => $params['user_name'],
1774
-      'boinchash_flag' => TRUE,
1774
+      'boinchash_flag' => true,
1775 1775
     );
1776 1776
 
1777 1777
     // Create the drupal user. If the drupal user cannot be created,
@@ -1808,20 +1808,20 @@  discard block
 block discarded – undo
1808 1808
   }
1809 1809
 
1810 1810
   if (strlen($authtoken) != 32) {
1811
-    drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1811
+    drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), null, 'boinc:account-finish'), 'error');
1812 1812
     drupal_goto();
1813 1813
   }
1814 1814
 
1815 1815
   require_boinc('boinc_db');
1816 1816
   $boinc_user = BoincUser::lookup("authenticator='".addslashes($authtoken)."'");
1817 1817
   if (!$boinc_user) {
1818
-    drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), NULL, 'boinc:account-finish'), 'error');
1818
+    drupal_set_message(bts('ERROR: There is no account with that authenticator.', array(), null, 'boinc:account-finish'), 'error');
1819 1819
     drupal_goto();
1820 1820
   }
1821 1821
   $user = user_load(get_drupal_id($boinc_user->id));
1822 1822
 
1823 1823
   if (!$user) {
1824
-    drupal_set_message(bts('ERROR: There was a problem loading your account. Try logging in with your user name and password.', array(), NULL, 'boinc:account-finish'), 'error');
1824
+    drupal_set_message(bts('ERROR: There was a problem loading your account. Try logging in with your user name and password.', array(), null, 'boinc:account-finish'), 'error');
1825 1825
     drupal_goto();
1826 1826
   }
1827 1827
 
@@ -1842,9 +1842,9 @@  discard block
 block discarded – undo
1842 1842
   // Check moderation page exists
1843 1843
   $moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
1844 1844
   if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
1845
-    $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
1845
+    $modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), null, 'boinc:account-finish'), $moderationpath, $options)), null, 'boinc:account-finish');
1846 1846
   } else {
1847
-    $modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
1847
+    $modsentence = bts('Please note: user profiles are subject to moderation.', array(), null, 'boinc:account-finish');
1848 1848
   }
1849 1849
 
1850 1850
   $username = $user->boincuser_name;
@@ -1853,73 +1853,73 @@  discard block
 block discarded – undo
1853 1853
   array(
1854 1854
     '@user_name' => $username,
1855 1855
     '@site_name' => $site_name,
1856
-  ), NULL, 'boinc:account-finish') . "</p>";
1856
+  ), null, 'boinc:account-finish') . "</p>";
1857 1857
 
1858 1858
   $links = array(
1859 1859
     array(
1860 1860
       'data' => bts('Change your username at !community_preferences.', array(
1861
-        '!community_preferences' => l(bts('Community Preferences', array(), NULL, 'boinc:account-fininsh'), 'account/prefs/community', $options),
1862
-      ), NULL, 'boinc:account-finish'),
1861
+        '!community_preferences' => l(bts('Community Preferences', array(), null, 'boinc:account-fininsh'), 'account/prefs/community', $options),
1862
+      ), null, 'boinc:account-finish'),
1863 1863
       'children' => array(
1864
-        bts('Your username is used to identify yourself to other volunteers on this Web site.', array(), NULL, 'boinc:account-finish'),
1865
-        bts('In addition, you may set your account\'s default language and adjust notification settings.', array(), NULL, 'boinc:account-finish'),
1864
+        bts('Your username is used to identify yourself to other volunteers on this Web site.', array(), null, 'boinc:account-finish'),
1865
+        bts('In addition, you may set your account\'s default language and adjust notification settings.', array(), null, 'boinc:account-finish'),
1866 1866
       ),
1867 1867
     ),
1868 1868
     array(
1869 1869
       'data' => bts('Change your !computing_preferences.', array(
1870
-        '!computing_preferences' => l(bts('Computing Preferences', array(), NULL, 'boinc:account-finish'), 'account/prefs', $options),
1871
-      ), NULL, 'boinc:account-finish'),
1870
+        '!computing_preferences' => l(bts('Computing Preferences', array(), null, 'boinc:account-finish'), 'account/prefs', $options),
1871
+      ), null, 'boinc:account-finish'),
1872 1872
       'children' => array(
1873
-        bts('You may adjust how much CPU, RAM, and Disk space the BOINC client is allowed to use for tasks on your computer.', array(), NULL, 'boinc:account-finish'),
1873
+        bts('You may adjust how much CPU, RAM, and Disk space the BOINC client is allowed to use for tasks on your computer.', array(), null, 'boinc:account-finish'),
1874 1874
         bts('By default, you will run @site_name tasks without any additional configuration.', array(
1875 1875
           '@site_name' => $site_name,
1876
-        ), NULL, 'boinc:account-finish'),
1876
+        ), null, 'boinc:account-finish'),
1877 1877
         bts('It is recommended new volunteers leave the default settings until they gain experience running some tasks. Ask questions in the !forums to get advice before making changes to a setting you don\'t understand.', array(
1878
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options),
1879
-        ), NULL, 'boinc:account-finish'),
1878
+          '!forums' => l(bts('forums', array(), null, 'boinc:account-finish'), 'community/forum', $options),
1879
+        ), null, 'boinc:account-finish'),
1880 1880
       ),
1881 1881
     ),
1882 1882
     array(
1883 1883
         'data' => bts('Create a !user_profile.', array(
1884
-          '!user_profile' => l(bts('User Profile', array(), NULL, 'boinc:account-finish'), '/account/profile/edit', $options),
1885
-        ), NULL, 'boinc:account-finish'),
1884
+          '!user_profile' => l(bts('User Profile', array(), null, 'boinc:account-finish'), '/account/profile/edit', $options),
1885
+        ), null, 'boinc:account-finish'),
1886 1886
       'children' => array(
1887 1887
         bts('A user profile will inform other volunteers who you are and why you joined @site_name.', array(
1888 1888
           '@site_name' => $site_name,
1889
-        ), NULL, 'boinc:account-finish'),
1889
+        ), null, 'boinc:account-finish'),
1890 1890
         $modsentence,
1891 1891
       ),
1892 1892
     ),
1893 1893
     array(
1894 1894
       'data' => bts('Join a !team.', array(
1895
-        '!team' => l(bts('Team', array(), NULL, 'boinc:account-finish'), '/community/teams', $options),
1896
-      ), NULL, 'boinc:account-finish'),
1895
+        '!team' => l(bts('Team', array(), null, 'boinc:account-finish'), '/community/teams', $options),
1896
+      ), null, 'boinc:account-finish'),
1897 1897
       'children' => array(
1898
-        bts('You may join a team, made up of other volunteers.', array(), NULL, 'boinc:account-finish'),
1898
+        bts('You may join a team, made up of other volunteers.', array(), null, 'boinc:account-finish'),
1899 1899
       ),
1900 1900
     ),
1901 1901
     array(
1902 1902
       'data' => bts('Go to your !account_dashboard.', array(
1903
-        '!account_dashboard'=> l(bts('Account Dashboard', array(), NULL, 'boinc:account-finish'), 'account/dashboard', $options),
1904
-      ), NULL, 'boinc:account-finish'),
1903
+        '!account_dashboard'=> l(bts('Account Dashboard', array(), null, 'boinc:account-finish'), 'account/dashboard', $options),
1904
+      ), null, 'boinc:account-finish'),
1905 1905
       'children' => array(
1906
-        bts('Your account dashboard has information and links about your computer(s) and task(s) assigned.', array(), NULL, 'boinc:account-finish'),
1906
+        bts('Your account dashboard has information and links about your computer(s) and task(s) assigned.', array(), null, 'boinc:account-finish'),
1907 1907
       ),
1908 1908
     ),
1909 1909
     array(
1910 1910
       'data' => bts('Visit our !help pages.', array(
1911
-        '!help' => l(bts('Help', array(), NULL, 'boinc:account-finish'), '/help', $options)
1912
-      ), NULL, 'boinc:account-finish'),
1911
+        '!help' => l(bts('Help', array(), null, 'boinc:account-finish'), '/help', $options)
1912
+      ), null, 'boinc:account-finish'),
1913 1913
       'children' => array(
1914 1914
         bts('Ask for help in our community\'s !forums.', array(
1915
-          '!forums' => l(bts('forums', array(), NULL, 'boinc:account-finish'), 'community/forum', $options)
1916
-        ), NULL, 'boinc:account-finish'),
1915
+          '!forums' => l(bts('forums', array(), null, 'boinc:account-finish'), 'community/forum', $options)
1916
+        ), null, 'boinc:account-finish'),
1917 1917
       ),
1918 1918
     ),
1919 1919
   );
1920 1920
 
1921 1921
   //List of links
1922
-  $output .= theme_item_list($links, $title = NULL, $type='ul');
1922
+  $output .= theme_item_list($links, $title = null, $type='ul');
1923 1923
 
1924 1924
   return $output;
1925 1925
 }
@@ -1929,20 +1929,20 @@  discard block
 block discarded – undo
1929 1929
  */
1930 1930
 function boincuser_moderate_community_access() {
1931 1931
   if (user_access('assign community member role')
1932
-  OR user_access('assign all roles')) {
1933
-    return TRUE;
1932
+  or user_access('assign all roles')) {
1933
+    return true;
1934 1934
   }
1935
-  return FALSE;
1935
+  return false;
1936 1936
 }
1937 1937
 
1938 1938
 /**
1939 1939
  * Get the count of items in the moderation queue
1940 1940
  */
1941 1941
 function boincuser_moderation_queue_count($caller = 'user') {
1942
-  $allowed = FALSE;
1942
+  $allowed = false;
1943 1943
   switch ($caller) {
1944 1944
   case 'cron':
1945
-    $allowed = TRUE;
1945
+    $allowed = true;
1946 1946
     break;
1947 1947
   case 'user':
1948 1948
   default:
@@ -1956,7 +1956,7 @@  discard block
 block discarded – undo
1956 1956
       AND moderate = 1"
1957 1957
     ));
1958 1958
   }
1959
-  return NULL;
1959
+  return null;
1960 1960
 }
1961 1961
 
1962 1962
 /**
@@ -1964,10 +1964,10 @@  discard block
 block discarded – undo
1964 1964
  * Allow community membership status to be set for users by direct link rather
1965 1965
  * than through the user account info form.
1966 1966
  */
1967
-function boincuser_control($uid = NULL, $action = NULL) {
1968
-  if (!$uid OR !$account = user_load($uid)) {
1967
+function boincuser_control($uid = null, $action = null) {
1968
+  if (!$uid or !$account = user_load($uid)) {
1969 1969
     // What are you even doing here...
1970
-    return FALSE;
1970
+    return false;
1971 1971
   }
1972 1972
   switch ($action) {
1973 1973
   case 'ban':
@@ -2073,7 +2073,7 @@  discard block
 block discarded – undo
2073 2073
  */
2074 2074
 function boincuser_moderate_user_ban($uid, $reason = '', $duration = '') {
2075 2075
   if (user_access('assign community member role')
2076
-  OR user_access('assign all roles')) {
2076
+  or user_access('assign all roles')) {
2077 2077
     $account = user_load($uid);
2078 2078
     if ($account->uid) {
2079 2079
       module_load_include('inc', 'rules', 'modules/system.rules');
@@ -2153,7 +2153,7 @@  discard block
 block discarded – undo
2153 2153
  * User profile image is managed by the content_profile module rather than core
2154 2154
  * Drupal User so must be inserted into comments, etc. (not so by default)
2155 2155
  */
2156
-function boincuser_get_user_profile_image($uid, $avatar = TRUE) {
2156
+function boincuser_get_user_profile_image($uid, $avatar = true) {
2157 2157
   // Though the function name implies otherwise, get the avatar by default
2158 2158
   $image_field = ($avatar) ? 'field_image_fid' : 'field_profile_image_fid';
2159 2159
   $image_fid = db_result(db_query("
@@ -2166,7 +2166,7 @@  discard block
 block discarded – undo
2166 2166
   if (!$user_image['image']['filepath']) {
2167 2167
     // Load the default image if one does not exist
2168 2168
     $account = user_load($uid);
2169
-    if ($avatar AND module_exists('gravatar') AND user_access('use gravatar', $account) AND $account->gravatar) {
2169
+    if ($avatar and module_exists('gravatar') and user_access('use gravatar', $account) and $account->gravatar) {
2170 2170
       // Use a Gravatar rather than the system default image
2171 2171
       $options = array(
2172 2172
         'size' => 100,
@@ -2194,23 +2194,23 @@  discard block
 block discarded – undo
2194 2194
  * Generate a table of a user's projects
2195 2195
  */
2196 2196
 function boincuser_get_projects_table($account = null) {
2197
-  if ($account AND is_numeric($account)) {
2197
+  if ($account and is_numeric($account)) {
2198 2198
     $account = user_load($account);
2199 2199
   }
2200 2200
   $projects = boincuser_get_projects($account);
2201
-  if (!$projects) return bts('no projects...', array(), NULL, 'boinc:account-dashboard');
2201
+  if (!$projects) return bts('no projects...', array(), null, 'boinc:account-dashboard');
2202 2202
 
2203 2203
   $output = '';
2204 2204
   $output .= '<table class="user-projects">' . "\n";
2205 2205
   $output .= '<thead>' . "\n";
2206 2206
   $output .= '  <tr>' . "\n";
2207
-  $output .= '    <th>' . bts('Name', array(), NULL, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2208
-  $output .= '    <th class="numeric">' . bts('Avg credit', array(), NULL, 'boinc:account-dashboard') . '</th>' . "\n";
2209
-  $output .= '    <th class="numeric">' . bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2207
+  $output .= '    <th>' . bts('Name', array(), null, 'boinc:project-name:-1:ignoreoverwrite') . '</th>' . "\n";
2208
+  $output .= '    <th class="numeric">' . bts('Avg credit', array(), null, 'boinc:account-dashboard') . '</th>' . "\n";
2209
+  $output .= '    <th class="numeric">' . bts('Total credit', array(), null, 'boinc:user-or-team-total-credits') . '</th>' . "\n";
2210 2210
   $output .= '  </tr>' . "\n";
2211 2211
   $output .= '</thead>' . "\n";
2212 2212
   $output .= '<tbody>' . "\n";
2213
-  foreach ($projects AS $project) {
2213
+  foreach ($projects as $project) {
2214 2214
     $url = rtrim($project->url, '/') . '/show_user.php?userid=' . $project->id;
2215 2215
     $output .= '  <tr>' . "\n";
2216 2216
     $output .= '    <td>' . l($project->name, $url) . '</td>' . "\n";
@@ -2248,7 +2248,7 @@  discard block
 block discarded – undo
2248 2248
   if (in_array($result->code, array(200, 304)) || in_array($result->redirect_code, array(200, 304))) {
2249 2249
     return simplexml_load_string($result->data);
2250 2250
   }
2251
-  return NULL;
2251
+  return null;
2252 2252
 }
2253 2253
 
2254 2254
 /**
@@ -2264,7 +2264,7 @@  discard block
 block discarded – undo
2264 2264
 
2265 2265
   $account_stats = boincuser_get_stats_user_data($account->boincuser_cpid);
2266 2266
 
2267
-  return ($account_stats AND isset($account_stats->project)) ? $account_stats->project : null;
2267
+  return ($account_stats and isset($account_stats->project)) ? $account_stats->project : null;
2268 2268
 }
2269 2269
 
2270 2270
 
@@ -2277,18 +2277,18 @@  discard block
 block discarded – undo
2277 2277
   $profile = content_profile_load('profile', $account->uid);
2278 2278
   $output = '';
2279 2279
   if ($profile) {
2280
-    $profile_is_approved = ($profile->status AND !$profile->moderate);
2280
+    $profile_is_approved = ($profile->status and !$profile->moderate);
2281 2281
     $user_is_moderator = user_access('edit any profile content');
2282 2282
     $is_own_profile = ($user->uid == $account->uid);
2283 2283
     $profile_moderation_path = "moderate/profile/{$account->uid}";
2284 2284
     $links = array();
2285 2285
 
2286
-    if ($profile->moderate AND $user_is_moderator) {
2286
+    if ($profile->moderate and $user_is_moderator) {
2287 2287
       $links['approve_profile'] = array(
2288
-        'title' => bts('Approve profile', array(), NULL, 'boinc:moderate-user'),
2288
+        'title' => bts('Approve profile', array(), null, 'boinc:moderate-user'),
2289 2289
         'href' => "{$profile_moderation_path}/approve",
2290 2290
         'attributes' => array(
2291
-          'title' => bts('Approve this profile content', array(), NULL, 'boinc:moderate-user'),
2291
+          'title' => bts('Approve this profile content', array(), null, 'boinc:moderate-user'),
2292 2292
           'class' => 'first primary tab',
2293 2293
         )
2294 2294
       );
@@ -2301,10 +2301,10 @@  discard block
 block discarded – undo
2301 2301
         )
2302 2302
       );*/
2303 2303
       $links['reject_profile'] = array(
2304
-        'title' => bts('Reject profile', array(), NULL, 'boinc:moderate-user'),
2304
+        'title' => bts('Reject profile', array(), null, 'boinc:moderate-user'),
2305 2305
         'href' => "{$profile_moderation_path}/reject",
2306 2306
         'attributes' => array(
2307
-          'title' => bts('Reject this profile content', array(), NULL, 'boinc:moderate-user'),
2307
+          'title' => bts('Reject this profile content', array(), null, 'boinc:moderate-user'),
2308 2308
           'class' => 'tab',
2309 2309
         )
2310 2310
       );
@@ -2358,7 +2358,7 @@  discard block
 block discarded – undo
2358 2358
 function boincuser_apachesolr_index_documents_alter(array &$documents, $entity, $entity_type, $env_id) {
2359 2359
 
2360 2360
   foreach ($documents as $document) {
2361
-    if ( $document->entity_type=='node' AND $document->bundle=='profile' ) {
2361
+    if ( $document->entity_type=='node' and $document->bundle=='profile' ) {
2362 2362
       // Node information.
2363 2363
       $nid = $document->entity_id;
2364 2364
       $node = node_load($nid);
@@ -2412,7 +2412,7 @@  discard block
 block discarded – undo
2412 2412
     if ($recipient = user_load(array('uid' => $drupalid))) {
2413 2413
       // Double-check that the loaded user matches both boincuser_id
2414 2414
       // and boincuser_name.
2415
-      if ( ($boincid == $recipient->boincuser_id) AND ($boincname == $recipient->boincuser_name) ) {
2415
+      if ( ($boincid == $recipient->boincuser_id) and ($boincname == $recipient->boincuser_name) ) {
2416 2416
         return $recipient;
2417 2417
       }
2418 2418
     }
Please login to merge, or discard this patch.
html/inc/util.inc 4 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -556,14 +556,14 @@
 block discarded – undo
556 556
     $tnow = get_str('tnow', true);
557 557
     $ttok = get_str('ttok', true);
558 558
     if (!$tnow) {
559
-      if (isset($_POST['tnow'])) {
560
-          $tnow = $_POST['tnow'];
561
-      }
559
+        if (isset($_POST['tnow'])) {
560
+            $tnow = $_POST['tnow'];
561
+        }
562 562
     }
563 563
     if (!$ttok) {
564
-      if (isset($_POST['ttok'])) {
565
-          $ttok = $_POST['ttok'];
566
-      }
564
+        if (isset($_POST['ttok'])) {
565
+            $ttok = $_POST['ttok'];
566
+        }
567 567
     }
568 568
     if (!$tnow) return false;
569 569
     if (!$ttok) return false;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@
 block discarded – undo
306 306
 <link rel="stylesheet" href="custom_dark.css" media="(prefers-color-scheme: dark)">
307 307
 <link rel="stylesheet" href="sample_bootstrap.min.css" media="(prefers-color-scheme: no-preference), (prefers-color-scheme: light)">
308 308
 <link rel="stylesheet" href="custom.css" media="(prefers-color-scheme: no-preference), (prefers-color-scheme: light)">
309
-EOT;
309
+eot;
310 310
     } else {
311 311
         echo '
312 312
             <link type="text/css" rel="stylesheet" href="'.secure_url_base().'/bootstrap.min.css" media="all">
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 // with an existing web framework can more easily do so.
255 255
 // To do so, define page_head() in html/project/project.inc
256 256
 //
257
-if (!function_exists("page_head")){
257
+if (!function_exists("page_head")) {
258 258
 function page_head(
259 259
     $title,
260 260
         // page title. Put in <title>, used as title for browser tab.
@@ -375,7 +375,8 @@  discard block
 block discarded – undo
375 375
     echo '<div class="container-fluid">
376 376
     ';
377 377
 
378
-    switch($title) {    //kludge
378
+    switch($title) {
379
+//kludge
379 380
     case tra("Log in"):
380 381
     case tra("Create an account"):
381 382
     case tra("Server status page"):
@@ -390,7 +391,7 @@  discard block
 block discarded – undo
390 391
 
391 392
 // See the comments for page_head()
392 393
 //
393
-if (!function_exists("page_tail")){
394
+if (!function_exists("page_tail")) {
394 395
 function page_tail(
395 396
     $show_date=false,
396 397
         // true for pages that are generated periodically rather than on the fly
@@ -895,7 +896,7 @@  discard block
 block discarded – undo
895 896
     return $str;
896 897
 }
897 898
 
898
-function strip_bbcode($string){
899
+function strip_bbcode($string) {
899 900
     return preg_replace("/((\[.+\])+?)(.+?)((\[\/.+\])+?)/","",$string);
900 901
 }
901 902
 
@@ -1156,7 +1157,7 @@  discard block
 block discarded – undo
1156 1157
 // Otherwise return 0.
1157 1158
 // Format of user agent string is "BOINC client (windows_x86_64 7.3.17)"
1158 1159
 //
1159
-function boinc_client_version(){
1160
+function boinc_client_version() {
1160 1161
     if (!array_key_exists('HTTP_USER_AGENT', $_SERVER)) return 0;
1161 1162
     $x = $_SERVER['HTTP_USER_AGENT'];
1162 1163
     $e =  "/BOINC client [^ ]* (\d+).(\d+).(\d+)\)/";
Please login to merge, or discard this patch.
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 require_once("../inc/bootstrap.inc");
31 31
 
32 32
 function master_url() {
33
-    return parse_config(get_config() , "<master_url>");
33
+    return parse_config(get_config(), "<master_url>");
34 34
 }
35 35
 function recaptcha_public_key() {
36 36
     return parse_config(get_config(), "<recaptcha_public_key>");
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 // Set parameters to defaults if not defined in config.xml
43 43
 
44 44
 $x = parse_config(get_config(), "<user_country>");
45
-define('USER_COUNTRY', ($x===null)?1:(int)$x);
45
+define('USER_COUNTRY', ($x === null) ? 1 : (int)$x);
46 46
 
47 47
 $x = parse_config(get_config(), "<user_url>");
48
-define('USER_URL', ($x===null)?1:(int)$x);
48
+define('USER_URL', ($x === null) ? 1 : (int)$x);
49 49
 
50 50
 // Set parameters to defaults if not defined in project.inc
51 51
 
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
 }
156 156
 
157 157
 function url_base() {
158
-    return is_https()?secure_url_base():URL_BASE;
158
+    return is_https() ?secure_url_base() : URL_BASE;
159 159
 }
160 160
 
161
-function send_cookie($name, $value, $permanent, $ops=false) {
161
+function send_cookie($name, $value, $permanent, $ops = false) {
162 162
     // the following allows independent login for projects on the same server
163 163
     //
164 164
     $url = parse_url(master_url());
@@ -167,28 +167,28 @@  discard block
 block discarded – undo
167 167
         $path = substr($path, 0, -1);
168 168
         $path .= "_ops/";
169 169
     }
170
-    $expire = $permanent?time()+3600*24*365:0;
170
+    $expire = $permanent ?time() + 3600*24*365 : 0;
171 171
     setcookie($name, $value, $expire, $path,
172 172
         '',
173
-        is_https(),     // if this page is secure, make cookie secure
173
+        is_https(), // if this page is secure, make cookie secure
174 174
         true            // httponly; no JS access
175 175
     );
176 176
 }
177 177
 
178
-function clear_cookie($name, $ops=false) {
178
+function clear_cookie($name, $ops = false) {
179 179
     $url = parse_url(master_url());
180 180
     $path = $url['path'];
181 181
     if ($ops) {
182 182
         $path = substr($path, 0, -1);
183 183
         $path .= "_ops/";
184 184
     }
185
-    setcookie($name, '', time()-3600, $path);
185
+    setcookie($name, '', time() - 3600, $path);
186 186
 }
187 187
 
188 188
 $g_logged_in_user = null;
189 189
 $got_logged_in_user = false;
190 190
 
191
-function get_logged_in_user($must_be_logged_in=true) {
191
+function get_logged_in_user($must_be_logged_in = true) {
192 192
     global $g_logged_in_user, $got_logged_in_user;
193 193
     if ($got_logged_in_user) {
194 194
         // this could have been called earlier with $must_be_logged_in false
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             $next_url = $_SERVER['REQUEST_URI'];
215 215
             $n = strrpos($next_url, "/");
216 216
             if ($n) {
217
-                $next_url = substr($next_url, $n+1);
217
+                $next_url = substr($next_url, $n + 1);
218 218
             }
219 219
         }
220 220
         $next_url = urlencode($next_url);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     return $g_logged_in_user;
226 226
 }
227 227
 
228
-function show_login_info($prefix="") {
228
+function show_login_info($prefix = "") {
229 229
     $user = get_logged_in_user(false);
230 230
     if ($user) {
231 231
         $url_tokens = url_tokens($user->authenticator);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     }
236 236
 }
237 237
 
238
-$cache_control_extra="";
238
+$cache_control_extra = "";
239 239
 $is_login_page = false;
240 240
 
241 241
 // Call this to start pages.
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
 // with an existing web framework can more easily do so.
248 248
 // To do so, define page_head() in html/project/project.inc
249 249
 //
250
-if (!function_exists("page_head")){
250
+if (!function_exists("page_head")) {
251 251
 function page_head(
252 252
     $title,
253 253
         // page title. Put in <title>, used as title for browser tab.
254
-    $body_attrs=null,
254
+    $body_attrs = null,
255 255
         // <body XXXX>
256 256
         // e.g. Javascript to put focus in an input field
257 257
         // (onload="document.form.foo.focus()")
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
         // if set, include schedulers.txt.
261 261
         // also pass to project_banner() in case you want a different
262 262
         // header for your main page.
263
-    $url_prefix="",
263
+    $url_prefix = "",
264 264
         // prepend this to links.
265 265
         // Use for web pages not in the top directory
266
-    $head_extra=null
266
+    $head_extra = null
267 267
         // extra stuff to put in <head>. E.g.:
268 268
         // reCAPTCHA code (create_profile.php)
269 269
         // bbcode javascript (forums)
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         header("Content-type: text/html; charset=utf-8");
286 286
         header("Expires: Mon, 26 Jul 1997 05:00:00 UTC");
287 287
             // Date in the past
288
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " UTC");
288
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s")." UTC");
289 289
             // always modified
290 290
         header("Cache-Control: $cache_control_extra no-cache, must-revalidate, post-check=0, pre-check=0");
291 291
             // for HTTP/1.1
@@ -308,11 +308,11 @@  discard block
 block discarded – undo
308 308
     if ($head_extra) {
309 309
         echo "\n$head_extra\n";
310 310
     }
311
-    if ($is_main && (!defined('NO_COMPUTING')||!NO_COMPUTING)) {
311
+    if ($is_main && (!defined('NO_COMPUTING') || !NO_COMPUTING)) {
312 312
         readfile("schedulers.txt");
313 313
     }
314 314
 
315
-    $t = $title?$title:PROJECT;
315
+    $t = $title ? $title : PROJECT;
316 316
     echo "<title>$t</title>\n";
317 317
     echo '
318 318
         <meta charset="utf-8">
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     echo '<div class="container-fluid">
369 369
     ';
370 370
 
371
-    switch($title) {    //kludge
371
+    switch ($title) {    //kludge
372 372
     case tra("Log in"):
373 373
     case tra("Create an account"):
374 374
     case tra("Server status page"):
@@ -383,13 +383,13 @@  discard block
 block discarded – undo
383 383
 
384 384
 // See the comments for page_head()
385 385
 //
386
-if (!function_exists("page_tail")){
386
+if (!function_exists("page_tail")) {
387 387
 function page_tail(
388
-    $show_date=false,
388
+    $show_date = false,
389 389
         // true for pages that are generated periodically rather than on the fly
390
-    $url_prefix="",
390
+    $url_prefix = "",
391 391
         // use for pages not at top level
392
-    $is_main=false
392
+    $is_main = false
393 393
         // passed to project_footer;
394 394
 ) {
395 395
     echo "<br>\n";
@@ -423,24 +423,24 @@  discard block
 block discarded – undo
423 423
 // convert time interval in seconds to a string of the form
424 424
 // 'D days h hours m min s sec'.
425 425
 
426
-function time_diff($x, $res=3) {
426
+function time_diff($x, $res = 3) {
427 427
     $x = (int)$x;
428 428
     $days    = (int)($x/86400);
429
-    $hours   = (int)(($x-$days*86400)/3600);
430
-    $minutes = (int)(($x-$days*86400-$hours*3600)/60);
431
-    $seconds = $x % 60;
429
+    $hours   = (int)(($x - $days*86400)/3600);
430
+    $minutes = (int)(($x - $days*86400 - $hours*3600)/60);
431
+    $seconds = $x%60;
432 432
 
433 433
     $s = "";
434 434
     if ($days) {
435 435
         $s .= "$days ".tra("days")." ";
436 436
     }
437
-    if ($res>0 && ($hours || strlen($s))) {
437
+    if ($res > 0 && ($hours || strlen($s))) {
438 438
         $s .= "$hours ".tra("hours")." ";
439 439
     }
440
-    if ($res>1 && ($minutes || strlen($s))) {
440
+    if ($res > 1 && ($minutes || strlen($s))) {
441 441
         $s .= "$minutes ".tra("min")." ";
442 442
     }
443
-    if ($res>2) {
443
+    if ($res > 2) {
444 444
         $s .= "$seconds ".tra("sec")." ";
445 445
     }
446 446
     return $s;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
 function time_str($x) {
456 456
     if ($x == 0) return "---";
457
-    return gmdate('j M Y, G:i:s', (int)$x) . " UTC";
457
+    return gmdate('j M Y, G:i:s', (int)$x)." UTC";
458 458
 }
459 459
 
460 460
 function local_time_str($x) {
@@ -466,14 +466,14 @@  discard block
 block discarded – undo
466 466
     return time_str($x);
467 467
 }
468 468
 
469
-function start_table_str($class="", $style="") {
470
-    $s = $style?'style="'.$style.'"':'';
469
+function start_table_str($class = "", $style = "") {
470
+    $s = $style ? 'style="'.$style.'"' : '';
471 471
     return '<div class="table">
472 472
       <table '.$s.' width="100%" class="table table-condensed '.$class.'" >
473 473
     ';
474 474
 }
475 475
 
476
-function start_table($class="", $style="") {
476
+function start_table($class = "", $style = "") {
477 477
     echo start_table_str($class, $style);
478 478
 }
479 479
 
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
     echo "</tr>\n";
519 519
 }
520 520
 
521
-function row1($x, $ncols=2, $class="heading") {
521
+function row1($x, $ncols = 2, $class = "heading") {
522 522
     if ($class == "heading") {
523 523
         echo "<tr><th class=\"bg-primary\" colspan=\"$ncols\">$x</th></tr>\n";
524 524
     } else {
@@ -532,10 +532,10 @@  discard block
 block discarded – undo
532 532
 
533 533
 // a table row with 2 columns, with the left on right-aligned
534 534
 
535
-function row2($x, $y, $show_error=false, $lwidth='40%') {
536
-    if ($x==="") $x="<br>";
537
-    if ($y==="") $y="<br>";
538
-    $attrs = $show_error?VALUE_ATTRS_ERR:VALUE_ATTRS;
535
+function row2($x, $y, $show_error = false, $lwidth = '40%') {
536
+    if ($x === "") $x = "<br>";
537
+    if ($y === "") $y = "<br>";
538
+    $attrs = $show_error ?VALUE_ATTRS_ERR:VALUE_ATTRS;
539 539
     echo "<tr>
540 540
         <td width=\"$lwidth\" ".NAME_ATTRS.">$x</td>
541 541
         <td $attrs >$y</td>
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 // output the first part of row2();
547 547
 // then write the content, followed by </td></tr>
548 548
 
549
-function row2_init($x, $lwidth='40%') {
549
+function row2_init($x, $lwidth = '40%') {
550 550
     echo sprintf('<tr>
551 551
         <td width="%s" %s>%s</td>
552 552
         <td %s>',
@@ -562,31 +562,31 @@  discard block
 block discarded – undo
562 562
     echo "<tr><td>$string</td></tr>";
563 563
 }
564 564
 
565
-function row_array($x, $attrs=null) {
565
+function row_array($x, $attrs = null) {
566 566
     echo "<tr>\n";
567 567
     $i = 0;
568 568
     foreach ($x as $h) {
569
-        $a = $attrs?$attrs[$i]:"";
569
+        $a = $attrs ? $attrs[$i] : "";
570 570
         echo "<td $a>$h</td>\n";
571 571
         $i++;
572 572
     }
573 573
     echo "</tr>\n";
574 574
 }
575 575
 
576
-define ('ALIGN_RIGHT', 'style="text-align:right;"');
576
+define('ALIGN_RIGHT', 'style="text-align:right;"');
577 577
 
578
-function row_heading_array($x, $attrs=null, $class='bg-primary') {
578
+function row_heading_array($x, $attrs = null, $class = 'bg-primary') {
579 579
     echo "<tr>";
580 580
     $i = 0;
581 581
     foreach ($x as $h) {
582
-        $a = $attrs?$attrs[$i]:"";
582
+        $a = $attrs ? $attrs[$i] : "";
583 583
         echo "<th $a class=\"$class\">$h</th>";
584 584
         $i++;
585 585
     }
586 586
     echo "</tr>\n";
587 587
 }
588 588
 
589
-function row_heading($x, $class='bg-primary') {
589
+function row_heading($x, $class = 'bg-primary') {
590 590
     echo sprintf('<tr><th class="%s" colspan=99>%s</th></tr>
591 591
         ', $class, $x
592 592
     );
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 // If $ellipsis is true, then an ellipsis is added to any sentence which
647 647
 // is cut short.
648 648
 
649
-function sub_sentence($sentence, $delimiter, $max_chars, $ellipsis=false) {
649
+function sub_sentence($sentence, $delimiter, $max_chars, $ellipsis = false) {
650 650
     $words = explode($delimiter, $sentence);
651 651
     $total_chars = 0;
652 652
     $trunc = false;
@@ -729,8 +729,8 @@  discard block
 block discarded – undo
729 729
 
730 730
 // returns null if the arg is optional and missing
731 731
 //
732
-function get_int($name, $optional=false) {
733
-    $x=null;
732
+function get_int($name, $optional = false) {
733
+    $x = null;
734 734
     if (isset($_GET[$name])) $x = $_GET[$name];
735 735
     if (!is_numeric($x)) {
736 736
         if ($optional) {
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 
750 750
 // returns null if the arg is optional and missing
751 751
 //
752
-function post_num($name, $optional=false) {
752
+function post_num($name, $optional = false) {
753 753
     $x = null;
754 754
     if (isset($_POST[$name])) $x = $_POST[$name];
755 755
     if (!is_numeric($x)) {
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 
765 765
 // returns null if the arg is optional and missing
766 766
 //
767
-function post_int($name, $optional=false) {
767
+function post_int($name, $optional = false) {
768 768
     $x = post_num($name, $optional);
769 769
     if (is_null($x)) return null;
770 770
     $y = (int)$x;
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
     }
783 783
 }
784 784
 
785
-function get_str($name, $optional=false) {
785
+function get_str($name, $optional = false) {
786 786
     if (isset($_GET[$name])) {
787 787
         $x = $_GET[$name];
788 788
     } else {
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
     return undo_magic_quotes($x);
795 795
 }
796 796
 
797
-function post_str($name, $optional=false) {
797
+function post_str($name, $optional = false) {
798 798
     if (isset($_POST[$name])) {
799 799
         $x = $_POST[$name];
800 800
     } else {
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
     return undo_magic_quotes($x);
807 807
 }
808 808
 
809
-function post_arr($name, $optional=false) {
809
+function post_arr($name, $optional = false) {
810 810
     if (isset($_POST[$name]) && is_array($_POST[$name])) {
811 811
         $x = $_POST[$name];
812 812
     } else {
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
     // the mb_* functions are not included by default
823 823
     // return (mb_detect_encoding($passwd) -= 'ASCII');
824 824
 
825
-    for ($i=0; $i<strlen($str); $i++) {
825
+    for ($i = 0; $i < strlen($str); $i++) {
826 826
         $c = ord(substr($str, $i));
827 827
         if ($c < 32 || $c > 127) return false;
828 828
     }
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
     $number = str_replace(',', '.', $number); // replace the german decimal separator
847 847
     // if no value was entered and this is ok
848 848
     //
849
-    if ($number=='' && !$low) return true;
849
+    if ($number == '' && !$low) return true;
850 850
 
851 851
     // the supplied value contains alphabetic characters
852 852
     //
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
 
864 864
 // Generate a "select" element from an array of values
865 865
 //
866
-function select_from_array($name, $array, $selection=null, $width=240) {
866
+function select_from_array($name, $array, $selection = null, $width = 240) {
867 867
     $out = '<select style="color:#000;"class="form-control input-sm" style="width:'.$width.'px" name="'.$name.'">"';
868 868
 
869 869
     foreach ($array as $key => $value) {
@@ -888,12 +888,12 @@  discard block
 block discarded – undo
888 888
     return $str;
889 889
 }
890 890
 
891
-function strip_bbcode($string){
892
-    return preg_replace("/((\[.+\])+?)(.+?)((\[\/.+\])+?)/","",$string);
891
+function strip_bbcode($string) {
892
+    return preg_replace("/((\[.+\])+?)(.+?)((\[\/.+\])+?)/", "", $string);
893 893
 }
894 894
 
895 895
 function current_url() {
896
-    $url = is_https()?'https':'http';
896
+    $url = is_https() ? 'https' : 'http';
897 897
     $url .= "://";
898 898
     $url .= $_SERVER['SERVER_NAME'];
899 899
     $url .= ":".$_SERVER['SERVER_PORT'];
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 // the colors for bootstrap's btn-success are almost illegible;
912 912
 // the green is too light.  Use a darker green.
913 913
 //
914
-function button_style($color='green', $font_size=null) {
914
+function button_style($color = 'green', $font_size = null) {
915 915
     $fs = '';
916 916
     if ($font_size) {
917 917
         $fs = sprintf('; font-size:%dpx', $font_size);
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
 // class: class of the button, e.g. btn
931 931
 // extra: Additional text in href tag
932 932
 //
933
-function button_text($url, $text, $desc=null, $class=null, $extra='') {
933
+function button_text($url, $text, $desc = null, $class = null, $extra = '') {
934 934
     if (!$desc) {
935 935
         $desc = $text;
936 936
     }
@@ -945,23 +945,23 @@  discard block
 block discarded – undo
945 945
     );
946 946
 }
947 947
 
948
-function button_text_small($url, $text, $desc=null) {
948
+function button_text_small($url, $text, $desc = null) {
949 949
     return button_text($url, $text, $desc, "btn btn-xs", button_style());
950 950
 }
951 951
 
952
-function show_button($url, $text, $desc=null, $class=null, $extra=null) {
952
+function show_button($url, $text, $desc = null, $class = null, $extra = null) {
953 953
     echo button_text($url, $text, $desc, $class, $extra);
954 954
 }
955 955
 
956 956
 // for places with a bunch of buttons, like forum posts
957 957
 //
958
-function show_button_small($url, $text, $desc=null) {
958
+function show_button_small($url, $text, $desc = null) {
959 959
     echo button_text_small($url, $text, $desc);
960 960
 }
961 961
 
962 962
 // used for showing icons
963 963
 //
964
-function show_image($src, $title, $alt, $height=null) {
964
+function show_image($src, $title, $alt, $height = null) {
965 965
     $h = "";
966 966
     if ($height) {
967 967
         $h = "height=\"$height\"";
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 // tries instead to connect to <replica_db_host> if tag exists.
999 999
 // DEPRECATED - use boinc_db.inc
1000 1000
 //
1001
-function db_init($try_replica=false) {
1001
+function db_init($try_replica = false) {
1002 1002
     check_web_stopped();
1003 1003
     $retval = db_init_aux($try_replica);
1004 1004
     if ($retval == 1) {
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
 // Check this to avoid XSS vulnerability
1075 1075
 //
1076 1076
 function sanitize_sort_by($x) {
1077
-    switch($x) {
1077
+    switch ($x) {
1078 1078
     case 'expavg_credit':
1079 1079
     case 'total_credit':
1080 1080
         return;
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
 }
1093 1093
 
1094 1094
 function do_download($path) {
1095
-    $name=basename($path);
1095
+    $name = basename($path);
1096 1096
     header('Content-Description: File Transfer');
1097 1097
     header('Content-Type: application/octet-stream');
1098 1098
     header('Content-Disposition: attachment; filename='.$name);
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
     header('Expires: 0');
1101 1101
     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
1102 1102
     header('Pragma: public');
1103
-    header('Content-Length: ' . filesize($path));
1103
+    header('Content-Length: '.filesize($path));
1104 1104
     flush();
1105 1105
     readfile($path);
1106 1106
 }
@@ -1149,10 +1149,10 @@  discard block
 block discarded – undo
1149 1149
 // Otherwise return 0.
1150 1150
 // Format of user agent string is "BOINC client (windows_x86_64 7.3.17)"
1151 1151
 //
1152
-function boinc_client_version(){
1152
+function boinc_client_version() {
1153 1153
     if (!array_key_exists('HTTP_USER_AGENT', $_SERVER)) return 0;
1154 1154
     $x = $_SERVER['HTTP_USER_AGENT'];
1155
-    $e =  "/BOINC client [^ ]* (\d+).(\d+).(\d+)\)/";
1155
+    $e = "/BOINC client [^ ]* (\d+).(\d+).(\d+)\)/";
1156 1156
     if (preg_match($e, $x, $matches)) {
1157 1157
         return $matches[1]*10000 + $matches[2]*100 + $matches[3];
1158 1158
     }
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
     $rem_name = $name."_remaining";
1182 1182
     return "<textarea name=\"$name\" class=\"form-control\" rows=3 id=\"$name\" onkeydown=\"text_counter(this.form.$name, this.form.$rem_name, $maxlen);\"
1183 1183
         onkeyup=\"text_counter(this.form.$name, this.form.$rem_name, $maxlen);\">".$text."</textarea>
1184
-        <br><input name=\"$rem_name\" type=\"text\" id=\"$rem_name\" value=\"".($maxlen-strlen($text))."\" size=\"3\" maxlength=\"3\" readonly> ".tra("characters remaining")
1184
+        <br><input name=\"$rem_name\" type=\"text\" id=\"$rem_name\" value=\"".($maxlen - strlen($text))."\" size=\"3\" maxlength=\"3\" readonly> ".tra("characters remaining")
1185 1185
     ;
1186 1186
 }
1187 1187
 
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
 // use the following around text with long lines,
1212 1212
 // to limit the width and make it more readable.
1213 1213
 //
1214
-function text_start($width=640) {
1214
+function text_start($width = 640) {
1215 1215
     echo sprintf("<div style=\"max-width: %dpx;\">\n", $width);
1216 1216
 }
1217 1217
 function text_end() {
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
 }
1238 1238
 
1239 1239
 function cert_filename() {
1240
-    return defined("CERT_FILENAME")?CERT_FILENAME:"cert1.php";
1240
+    return defined("CERT_FILENAME") ?CERT_FILENAME:"cert1.php";
1241 1241
 }
1242 1242
 
1243 1243
 // if user hasn't validated their email addr, tell them to
Please login to merge, or discard this patch.
html/ops/mass_email_script.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $globals->batch = 1000;
56 56
 $globals->lapsed_interval = 60*86400;
57 57
 
58
-for ($i=1; $i<$argc; $i++) {
58
+for ($i = 1; $i < $argc; $i++) {
59 59
     if ($argv[$i] == "--batch") {
60 60
         $i++;
61 61
         $globals->batch = $argv[$i];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         gmdate('d F Y', $user->create_time),
170 170
         number_format($user->total_credit, 0),
171 171
         opt_out_url($user),
172
-        floor((time() - $user->last_rpc_time) / 86400),
172
+        floor((time() - $user->last_rpc_time)/86400),
173 173
     );
174 174
     return preg_replace($pat, $rep, $template);
175 175
 }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     while ($user = _mysql_fetch_object($result)) {
239 239
         handle_user($user);
240 240
         $startid = $user->id;
241
-        fputs($log, $user->id . "\n");
241
+        fputs($log, $user->id."\n");
242 242
         fflush($log);
243 243
     }
244 244
     _mysql_free_result($result);
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
     $user = _mysql_fetch_object($result);
253 253
     if ($user) {
254 254
         handle_user($user);
255
-        fputs($log, $user->id . "\n");
255
+        fputs($log, $user->id."\n");
256 256
         fflush($log);
257 257
     }
258 258
     _mysql_free_result($result);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     } else {
290 290
         $fid = fopen($id_file, 'r');
291 291
         if (!$fid) {
292
-            echo  $id_file . ' not found - create ID list and run again\n';
292
+            echo  $id_file.' not found - create ID list and run again\n';
293 293
             exit();
294 294
         }
295 295
         $thisid = 0;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         }
301 301
         fclose($fid);
302 302
     }
303
-    echo 'All done!' . "\n";
303
+    echo 'All done!'."\n";
304 304
 }
305 305
 
306 306
 if (!function_exists('make_php_mailer')) {
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc 4 patches
Braces   +17 added lines, -34 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@  discard block
 block discarded – undo
127 127
         if (isset($prefs[$name]['@value'])) {
128 128
           $default[$name] = $prefs[$name]['@value'];
129 129
         }
130
-      }
131
-      else {
130
+      } else {
132 131
         $default[$name] = $prefs[$name];
133 132
       }
134 133
     }
@@ -655,8 +654,7 @@  discard block
 block discarded – undo
655 654
   // Save the preset selection (or lack thereof)
656 655
   if (!$preset OR $preset == 'custom') {
657 656
     $prefs['preset'] = 'custom';
658
-  }
659
-  else {
657
+  } else {
660 658
     $prefs['preset'] = $preset;
661 659
   }
662 660
   
@@ -671,8 +669,7 @@  discard block
 block discarded – undo
671 669
   if (!$result) {
672 670
     watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
673 671
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
674
-  }
675
-  elseif (!drupal_get_messages('status', FALSE)) {
672
+  } elseif (!drupal_get_messages('status', FALSE)) {
676 673
     // Show this message if the set wasn't created automatically (in which case
677 674
     // there is a message tailored to that) {
678 675
     drupal_set_message(t('Your preferences have been updated.
@@ -927,8 +924,7 @@  discard block
 block discarded – undo
927 924
     if (boincwork_host_merge($old_host, $current_host, $message)) {
928 925
       $merged[$old_host->id] = $old_host->id;
929 926
       $current_host = boincwork_host_get_info($current_host_id);
930
-    }
931
-    else {
927
+    } else {
932 928
       $errors[$old_host->id] = $message;
933 929
     }
934 930
   }
@@ -944,8 +940,7 @@  discard block
 block discarded – undo
944 940
         $oxford_comma = '';
945 941
       }
946 942
       $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
947
-    }
948
-    else {
943
+    } else {
949 944
       $list = $last;
950 945
     }
951 946
     if (count($merged) == 1) {
@@ -956,8 +951,7 @@  discard block
 block discarded – undo
956 951
           '@id' => $current_host_id
957 952
         ),
958 953
         NULL, 'boinc:account-host-merge'));
959
-    }
960
-    else {
954
+    } else {
961 955
       drupal_set_message(bts(
962 956
         'Computers @old_ids have been merged successfully into @id.',
963 957
         array(
@@ -1023,11 +1017,9 @@  discard block
 block discarded – undo
1023 1017
     if ($account->boincuser_default_pref_set == $venue) {
1024 1018
       $venue_is_default = TRUE;
1025 1019
     }
1026
-  }
1027
-  elseif (!$venue OR $venue == 'generic') {
1020
+  } elseif (!$venue OR $venue == 'generic') {
1028 1021
     $venue_is_default = TRUE;
1029
-  }
1030
-  else {
1022
+  } else {
1031 1023
     $venue_is_default = FALSE;
1032 1024
   }
1033 1025
   
@@ -1047,8 +1039,7 @@  discard block
 block discarded – undo
1047 1039
         if (isset($prefs[$name]['@value'])) {
1048 1040
           $default[$name] = $prefs[$name]['@value'];
1049 1041
         }
1050
-      }
1051
-      else {
1042
+      } else {
1052 1043
         $default[$name] = $prefs[$name];
1053 1044
       }
1054 1045
     }
@@ -1232,16 +1223,13 @@  discard block
 block discarded – undo
1232 1223
       foreach ($element as $ordered_element) {
1233 1224
         if (isset($ordered_element['@position'])) {
1234 1225
           $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
1235
-        }
1236
-        else {
1226
+        } else {
1237 1227
           $unordered_array[] = array($type => $ordered_element);
1238 1228
         }
1239 1229
       }
1240
-    }
1241
-    elseif (isset($element['@position'])) {
1230
+    } elseif (isset($element['@position'])) {
1242 1231
       $ordered_array[$element['@position']] = array($type => $element);
1243
-    }
1244
-    else {
1232
+    } else {
1245 1233
       $unordered_array[] = array($type => $element);
1246 1234
     }
1247 1235
   }
@@ -1356,8 +1344,7 @@  discard block
 block discarded – undo
1356 1344
   // Update the user's default preference set
1357 1345
   if ($edit['default_set']['default_venue']) {
1358 1346
     boincwork_set_default_venue($venue);
1359
-  }
1360
-  elseif ($venue == $account->boincuser_default_pref_set) {
1347
+  } elseif ($venue == $account->boincuser_default_pref_set) {
1361 1348
     // User has cleared out the default venue setting
1362 1349
     boincwork_set_default_venue();
1363 1350
   }
@@ -1365,8 +1352,7 @@  discard block
 block discarded – undo
1365 1352
   if (!$result) {
1366 1353
     watchdog('boincwork', 'Error updating project prefs for user @id: @message', array('@id' => $user->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
1367 1354
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
1368
-  }
1369
-  elseif (!drupal_get_messages('status', FALSE)) {
1355
+  } elseif (!drupal_get_messages('status', FALSE)) {
1370 1356
     // Show this message if the set wasn't created automatically (in which case
1371 1357
     // there is a message tailored to that)
1372 1358
     drupal_set_message(t('Your preferences have been updated.
@@ -1519,8 +1505,7 @@  discard block
 block discarded – undo
1519 1505
   // Upload an avatar (pulled from profile_node_form):
1520 1506
   if (!empty($profile_form['field_image'])) {
1521 1507
     $form['field_image'] = $profile_form['field_image'];
1522
-  }
1523
-  else {
1508
+  } else {
1524 1509
     $form['field_image'] = array(
1525 1510
       '#value' => '<div class="form-item">'
1526 1511
         . '<label class="placeholder">'
@@ -1690,8 +1675,7 @@  discard block
 block discarded – undo
1690 1675
       global $base_url;
1691 1676
       if ($edit['language'] != language_default('language')) {
1692 1677
         $form_state['redirect'] = $base_url . '/' . $edit['language'] . '/' . $_GET['q'];
1693
-      }
1694
-      else {
1678
+      } else {
1695 1679
         $form_state['redirect'] = $base_url . '/' . $_GET['q'];
1696 1680
       }
1697 1681
     }
@@ -1882,8 +1866,7 @@  discard block
 block discarded – undo
1882 1866
       $row[] = drupal_render($form['ignoreblock']['delete'][$key]);
1883 1867
       $rows[] = $row;
1884 1868
     }
1885
-  }
1886
-  else {
1869
+  } else {
1887 1870
     $rows[] = array(
1888 1871
       array(
1889 1872
         'data' => bts('You have not added any users to your Ignore List.', array(), NULL, 'boinc:ignore-user-list'),
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
       }// switch
72 72
   } else {
73 73
       $form_state['storage']['wip'] = TRUE;
74
-      if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
74
+      if (!in_array($prefs_preset, array('standard', 'maximum', 'green', 'minimum', 'custom'))) {
75 75
           if ($established) {
76 76
               $prefs_preset = 'custom';
77 77
           } else {
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
   );
142 142
   $form['hour_options'] = array(
143 143
     '#type' => 'value',
144
-    '#value' => array('0:00','1:00','2:00','3:00','4:00',
145
-     '5:00','6:00','7:00','8:00','9:00','10:00','11:00',
146
-     '12:00','13:00','14:00','15:00','16:00','17:00',
147
-     '18:00','19:00','20:00','21:00','22:00','23:00')
144
+    '#value' => array('0:00', '1:00', '2:00', '3:00', '4:00',
145
+     '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00',
146
+     '12:00', '13:00', '14:00', '15:00', '16:00', '17:00',
147
+     '18:00', '19:00', '20:00', '21:00', '22:00', '23:00')
148 148
   );
149 149
 
150 150
   // Identify preference sets that are established to distinguish what has been
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), NULL, 'boinc:account-preferences-computing'),
282 282
   );
283 283
   $form['prefs']['advanced']['processor']['hour_label'] = array(
284
-    '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
284
+    '#value' => '<div class="form-item"><label>'.bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing').'</label></div>'
285 285
   );
286 286
   $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     '#default_value' => $default['start_hour']
290 290
   );
291 291
   $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
292
+    '#value' => '<span>'.bts('and', array(), NULL, 'boinc:account-preference').'</span>'
293 293
   );
294 294
   $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     '#default_value' => $default['end_hour']
298 298
   );
299 299
   $form['prefs']['advanced']['processor']['hour_description'] = array(
300
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
300
+    '#value' => '<div class="form-item slim"><div class="description">'.bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing').'</div></div>'
301 301
   );
302 302
   $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303 303
     '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), NULL, 'boinc:account-preferences-computing'),
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     '#description' => bts('Limit the upload rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
455 455
   );
456 456
   $form['prefs']['advanced']['network']['hour_label'] = array(
457
-    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
457
+    '#value' => '<div class="form-item"><label>'.bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing').'</label></div>'
458 458
   );
459 459
   $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     '#default_value' => $default['net_start_hour']
463 463
   );
464 464
   $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
465
+    '#value' => '<span>'.bts('and', array(), NULL, 'boinc:account-preference').'</span>'
466 466
   );
467 467
   $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     '#default_value' => $default['net_end_hour']
471 471
   );
472 472
   $form['prefs']['advanced']['network']['hour_description'] = array(
473
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
473
+    '#value' => '<div class="form-item slim"><div class="description">'.bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing').'</div></div>'
474 474
   );
475 475
   $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476 476
     '#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
@@ -530,23 +530,23 @@  discard block
 block discarded – undo
530 530
     '#suffix' => '</li>'
531 531
   );
532 532
   $form['prefs']['form control tabs'] = array(
533
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
533
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")).'</li>'
534 534
   );
535 535
   if ($venue AND $venue != 'generic') {
536 536
     global $base_path;
537
-    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
537
+    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">'.
538 538
       l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
540
+          'query' => 'destination='.urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541 541
           'attributes' => array(
542
-            'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
542
+            'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
+              array('@name' => $venue), NULL, 'boinc:account-preferences').'\')'
544 544
           )
545 545
         )
546
-      ) . '</li>';
546
+      ).'</li>';
547 547
   }
548 548
   $form['prefs']['view control'] = array(
549
-    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
549
+    '#value' => '<li class="first alt tab">'.l('('.bts('Show comparison view', array(), NULL, 'boinc:account-preferences').')', 'account/prefs/computing/combined').'</li>'
550 550
   );
551 551
   $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
     return FALSE;
785 785
   }
786 786
 
787
-  if ($new_host->userid==0) {
787
+  if ($new_host->userid == 0) {
788 788
     rules_invoke_event('boincwork_zombie_merge_error', $old_host->id, $new_host->id, variable_get('boinc_admin_mailing_list_subject_tag', ''));
789 789
     watchdog('boincwork',
790 790
       'Zombie merge attempted, target host has userid=0: old host id=%old_host, target host id=%new_host',
@@ -880,9 +880,9 @@  discard block
 block discarded – undo
880 880
   }
881 881
 
882 882
   $form['overview'] = array(
883
-    '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
883
+    '#value' => '<p>'.bts('Sometimes BOINC assigns separate identities to'
884 884
       . ' the same computer by mistake. You can correct this by merging old'
885
-      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
885
+      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge').'</p>'
886 886
       . '<p>'
887 887
       . bts('Check the computers that are the same as @name'
888 888
       . ' (created on @date at @time with computer ID @id)',
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
           '@time' => date('G:i:s T', $current_host->create_time),
893 893
           '@id' => $current_host->id,
894 894
         ),
895
-        NULL, 'boinc:account-host-merge') . '</p>',
895
+        NULL, 'boinc:account-host-merge').'</p>',
896 896
   );
897 897
 
898 898
   $options = array();
@@ -926,7 +926,7 @@  discard block
 block discarded – undo
926 926
     '#suffix' => '</li>'
927 927
   );
928 928
   $form['prefs']['form control tabs'] = array(
929
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
929
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}").'</li>'
930 930
   );
931 931
 
932 932
   return $form;
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
       if (count($merged) == 2) {
972 972
         $oxford_comma = '';
973 973
       }
974
-      $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
974
+      $list = implode(', ', $list).$oxford_comma.' '.$conjunction.' '.$last;
975 975
     }
976 976
     else {
977 977
       $list = $last;
@@ -1220,23 +1220,23 @@  discard block
 block discarded – undo
1220 1220
     '#suffix' => '</li>'
1221 1221
   );
1222 1222
   $form['prefs']['form control tabs'] = array(
1223
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1223
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>'
1224 1224
   );
1225 1225
   if ($venue AND $venue != 'generic') {
1226 1226
     global $base_path;
1227
-    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
1227
+    $form['prefs']['form control tabs']['#value'] .= '<li class="tab">'.
1228 1228
       l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1229 1229
         array(
1230
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1230
+          'query' => 'destination='.urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1231 1231
           'attributes' => array(
1232
-            'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1233
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1232
+            'onclick' => 'return confirm(\''.bts('This will remove all of your settings from the @name preference set. Are you sure?',
1233
+              array('@name' => $venue), NULL, 'boinc:account-preferences').'\')'
1234 1234
           )
1235 1235
         )
1236
-      ) . '</li>';
1236
+      ).'</li>';
1237 1237
   }
1238 1238
   $form['prefs']['view control'] = array(
1239
-      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1239
+      '#value' => '<li class="first alt tab">'.l('('.bts('Show comparison view', array(), NULL, 'boinc:account-preferences').')', 'account/prefs/project/combined').'</li>'
1240 1240
   );
1241 1241
   $form['prefs']['form control tabs suffix'] = array(
1242 1242
     '#value' => '</ul>'
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 
1280 1280
   foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1281 1281
     $type = key($wrapped_element);
1282
-    $element= reset($wrapped_element);
1282
+    $element = reset($wrapped_element);
1283 1283
     boincwork_generate_prefs_element($form, $type, $element, $prefs['project_specific']);
1284 1284
   }
1285 1285
 }
@@ -1505,7 +1505,7 @@  discard block
 block discarded – undo
1505 1505
     $names = array();
1506 1506
     foreach ($languages as $langcode => $item) {
1507 1507
       $name = t($item->name);
1508
-      $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1508
+      $names[check_plain($langcode)] = check_plain($name.($item->native != $name ? ' ('.$item->native.')' : ''));
1509 1509
     }
1510 1510
     $form['locale'] = array(
1511 1511
       '#type' => 'fieldset',
@@ -1530,20 +1530,20 @@  discard block
 block discarded – undo
1530 1530
   // Avatar options
1531 1531
   $form['gravatar'] = array(
1532 1532
     '#type' => 'item',
1533
-    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1533
+    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/'.$account->mail), NULL, 'boinc:account-preferences-community'),
1534 1534
     '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), NULL, 'boinc:account-preferences-community'),
1535 1535
   );
1536 1536
   if (user_access('disable own gravatar', $account)) {
1537 1537
     $form['gravatar'] = array(
1538 1538
       '#type' => 'checkbox',
1539
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1539
+      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/'.$account->mail), NULL, 'boinc:account-preferences-community'),
1540 1540
       '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1541 1541
       '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1542 1542
       '#disabled' => !empty($account->picture),
1543 1543
     );
1544 1544
   }
1545 1545
   $form['gravatar']['#weight'] = 15;
1546
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1546
+  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">'.bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community').'</a></legend>';
1547 1547
   // Upload an avatar (pulled from profile_node_form):
1548 1548
   if (!empty($profile_form['field_image'])) {
1549 1549
     $form['field_image'] = $profile_form['field_image'];
@@ -1578,7 +1578,7 @@  discard block
 block discarded – undo
1578 1578
   );
1579 1579
   // Can't have a typical Drupal form suffix on a select box?
1580 1580
   $form['forums']['comments_per_page_suffix'] = array(
1581
-    '#value' => '<span>' . bts('comments per page', array(), NULL, 'boinc:account-preferences-community') . '</span>'
1581
+    '#value' => '<span>'.bts('comments per page', array(), NULL, 'boinc:account-preferences-community').'</span>'
1582 1582
   );
1583 1583
   $form['forums']['comments_order'] = array(
1584 1584
     '#type' => 'select',
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
     '#weight' => 1002,
1632 1632
   );
1633 1633
   $form['form control tabs'] = array(
1634
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1634
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>',
1635 1635
     '#weight' => 1003,
1636 1636
   );
1637 1637
   $form['form control tabs suffix'] = array(
@@ -1717,10 +1717,10 @@  discard block
 block discarded – undo
1717 1717
     if ($user->language != $edit['language']) {
1718 1718
       global $base_url;
1719 1719
       if ($edit['language'] != language_default('language')) {
1720
-        $form_state['redirect'] = $base_url . '/' . $edit['language'] . '/' . $_GET['q'];
1720
+        $form_state['redirect'] = $base_url.'/'.$edit['language'].'/'.$_GET['q'];
1721 1721
       }
1722 1722
       else {
1723
-        $form_state['redirect'] = $base_url . '/' . $_GET['q'];
1723
+        $form_state['redirect'] = $base_url.'/'.$_GET['q'];
1724 1724
       }
1725 1725
     }
1726 1726
   }
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
   // option that deals with privacy.
1791 1791
   foreach ($privacy_consent_types as $ct) {
1792 1792
 
1793
-    $currstate = (check_user_consent($boincuser, $ct['shortname'])) ? 1 : 0 ;
1793
+    $currstate = (check_user_consent($boincuser, $ct['shortname'])) ? 1 : 0;
1794 1794
     // Set name to 'privacyconsent_SHORTNAME', which can be parsed
1795 1795
     // later in the submit function.
1796 1796
     $form['privacy']['privacyconsent_'.$ct['shortname']] = array(
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
     // Add a description with link to the question 'Do you consent to
1805 1805
     // exporting your data...'.
1806 1806
     $mypatt = '/Do you consent to exporting your data/';
1807
-    if (preg_match($mypatt, $ct['description']) ) {
1807
+    if (preg_match($mypatt, $ct['description'])) {
1808 1808
       $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1809 1809
       array(
1810 1810
         '!privacy_policy_link' => l(
@@ -1843,7 +1843,7 @@  discard block
 block discarded – undo
1843 1843
       $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1844 1844
         '#value' => l(
1845 1845
           bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1846
-          'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1846
+          'account/prefs/privacy/ignore_user/remove/'.$ignored_user['iuid'],
1847 1847
           array()
1848 1848
         ),
1849 1849
       );
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
     '#suffix' => '</li>'
1895 1895
   );
1896 1896
   $form['prefs']['form control tabs'] = array(
1897
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1897
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>'
1898 1898
   );
1899 1899
   $form['prefs']['form control tabs suffix'] = array(
1900 1900
     '#value' => '</ul>'
@@ -1981,7 +1981,7 @@  discard block
 block discarded – undo
1981 1981
   $privacyconsent_prefs = array_intersect_key($form_state['values'], array_flip($result));
1982 1982
   foreach ($privacyconsent_prefs as $name => $newstate) {
1983 1983
     $subname = explode('_', $name)[1];
1984
-    $currstate = (check_user_consent($boincuser, $subname)) ? 1 : 0 ;
1984
+    $currstate = (check_user_consent($boincuser, $subname)) ? 1 : 0;
1985 1985
     list($checkct, $ctid) = check_consent_type($subname);
1986 1986
     if ($checkct && ($currstate != $newstate)) {
1987 1987
       consent_to_a_policy($boincuser, $ctid, $newstate, 0, 'Webform', time());
@@ -2047,7 +2047,7 @@  discard block
 block discarded – undo
2047 2047
 function boincwork_selectapp_form_submit($form, &$form_state) {
2048 2048
   $myargs = arg();
2049 2049
   array_pop($myargs);
2050
-  $newpath = implode('/', $myargs ) . '/' . $form['selectapp']['#value'];
2050
+  $newpath = implode('/', $myargs).'/'.$form['selectapp']['#value'];
2051 2051
   $form_state['redirect'] = $newpath;
2052 2052
 }
2053 2053
 
Please login to merge, or discard this patch.
Indentation   +965 added lines, -965 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
  * The structure of the general preferences form
16 16
  */
17 17
 function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = FALSE) {
18
-  $form = array();
19
-  $prefs = null;
20
-  $established = TRUE;
18
+    $form = array();
19
+    $prefs = null;
20
+    $established = TRUE;
21 21
 
22
-  // Enable AHAH form support for dynamically updating content based on preset
23
-  ahah_helper_register($form, $form_state);
22
+    // Enable AHAH form support for dynamically updating content based on preset
23
+    ahah_helper_register($form, $form_state);
24 24
 
25
-  if (!$prefs_preset) {
25
+    if (!$prefs_preset) {
26 26
     if (isset($form_state['storage']['prefs']['preset'])) {
27
-      $prefs_preset = $form_state['storage']['prefs']['preset'];
27
+        $prefs_preset = $form_state['storage']['prefs']['preset'];
28 28
     }
29 29
 
30 30
     // Load preferences from BOINC account
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     // Take note if this is not an established preference set on the account
34 34
     if (isset($prefs['@attributes']['cleared'])) {
35
-      $established = FALSE;
35
+        $established = FALSE;
36 36
     }
37 37
 
38 38
     // Determine if a preset is selected or if these are custom settings
@@ -47,45 +47,45 @@  discard block
 block discarded – undo
47 47
             $prefs_preset = $prefs['preset']['@value'];
48 48
         }
49 49
     }// if !$prefs_preset
50
-  }
51
-  // Extract mod_time tag if present, because it will be erased with
52
-  // boincwork_get_preset_prefs() below.
53
-  $mod_time = null;
54
-  if (isset($prefs['mod_time']['@value'])) {
55
-      $mod_time = $prefs['mod_time']['@value'];
56
-  }
57
-
58
-  if (isset($form_state['storage']['wip'])) {
59
-      switch ($prefs_preset) {
60
-      case 'standard':
50
+    }
51
+    // Extract mod_time tag if present, because it will be erased with
52
+    // boincwork_get_preset_prefs() below.
53
+    $mod_time = null;
54
+    if (isset($prefs['mod_time']['@value'])) {
55
+        $mod_time = $prefs['mod_time']['@value'];
56
+    }
57
+
58
+    if (isset($form_state['storage']['wip'])) {
59
+        switch ($prefs_preset) {
60
+        case 'standard':
61 61
       case 'maximum':
62 62
       case 'green':
63 63
       case 'minimum':
64 64
           $prefs = boincwork_get_preset_prefs($prefs_preset);
65
-          break;
66
-      case 'custom':
65
+            break;
66
+        case 'custom':
67 67
       default:
68 68
           // Just keeps prefs as they are
69 69
           unset($prefs['preset']);
70
-          break;
71
-      }// switch
72
-  } else {
73
-      $form_state['storage']['wip'] = TRUE;
74
-      if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75
-          if ($established) {
76
-              $prefs_preset = 'custom';
77
-          } else {
78
-              $prefs_preset = 'standard';
79
-              $prefs = boincwork_get_preset_prefs($prefs_preset);
80
-          }// if $established
81
-      }// if $prefs_preset
82
-  }// if WIP
83
-
84
-  // This set of preferences is used in the form if no preferences
85
-  // have been set above, in variable $prefs.
86
-  require_boinc(array('db', 'prefs'));
87
-  $disk_space_config = get_disk_space_config();
88
-  $default = array(
70
+            break;
71
+        }// switch
72
+    } else {
73
+        $form_state['storage']['wip'] = TRUE;
74
+        if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75
+            if ($established) {
76
+                $prefs_preset = 'custom';
77
+            } else {
78
+                $prefs_preset = 'standard';
79
+                $prefs = boincwork_get_preset_prefs($prefs_preset);
80
+            }// if $established
81
+        }// if $prefs_preset
82
+    }// if WIP
83
+
84
+    // This set of preferences is used in the form if no preferences
85
+    // have been set above, in variable $prefs.
86
+    require_boinc(array('db', 'prefs'));
87
+    $disk_space_config = get_disk_space_config();
88
+    $default = array(
89 89
     'preset' => $prefs_preset,
90 90
     // Processing...
91 91
     'run_on_batteries' => 0,
@@ -120,385 +120,385 @@  discard block
 block discarded – undo
120 120
     'daily_xfer_limit_mb' => 0,
121 121
     'daily_xfer_period_days' => 0,
122 122
     'dont_verify_images' => 0
123
-  );
124
-  foreach ($default as $name => $value) {
123
+    );
124
+    foreach ($default as $name => $value) {
125 125
     if (isset($prefs[$name])) {
126
-      if (is_array($prefs[$name])) {
126
+        if (is_array($prefs[$name])) {
127 127
         if (isset($prefs[$name]['@value'])) {
128
-          $default[$name] = $prefs[$name]['@value'];
128
+            $default[$name] = $prefs[$name]['@value'];
129
+        }
129 130
         }
130
-      }
131
-      else {
131
+        else {
132 132
         $default[$name] = $prefs[$name];
133
-      }
133
+        }
134
+    }
134 135
     }
135
-  }
136 136
 
137
-  // Standard option sets
138
-  $form['boolean_options'] = array(
137
+    // Standard option sets
138
+    $form['boolean_options'] = array(
139 139
     '#type' => 'value',
140 140
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
141
-  );
142
-  $form['hour_options'] = array(
141
+    );
142
+    $form['hour_options'] = array(
143 143
     '#type' => 'value',
144 144
     '#value' => array('0:00','1:00','2:00','3:00','4:00',
145
-     '5:00','6:00','7:00','8:00','9:00','10:00','11:00',
146
-     '12:00','13:00','14:00','15:00','16:00','17:00',
147
-     '18:00','19:00','20:00','21:00','22:00','23:00')
148
-  );
145
+        '5:00','6:00','7:00','8:00','9:00','10:00','11:00',
146
+        '12:00','13:00','14:00','15:00','16:00','17:00',
147
+        '18:00','19:00','20:00','21:00','22:00','23:00')
148
+    );
149 149
 
150
-  // Identify preference sets that are established to distinguish what has been
151
-  // saved to the database from what is just showing default values
152
-  $form['#established'] = $established;
150
+    // Identify preference sets that are established to distinguish what has been
151
+    // saved to the database from what is just showing default values
152
+    $form['#established'] = $established;
153 153
 
154
-  // Set up the preference container for AHAH
155
-  $form['prefs'] = array(
154
+    // Set up the preference container for AHAH
155
+    $form['prefs'] = array(
156 156
     '#title' => '',
157 157
     '#type' => 'fieldset',
158 158
     '#prefix' => '<div id="prefs-wrapper">', // This is our wrapper div.
159 159
     '#attributes' => array('class' => 'ahah-container'),
160 160
     '#suffix' => '</div>',
161 161
     '#tree'   => TRUE
162
-  );
163
-  //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
162
+    );
163
+    //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
164 164
 
165
-  // Hidden elements
166
-  $form['prefs']['modified'] = array(
165
+    // Hidden elements
166
+    $form['prefs']['modified'] = array(
167 167
     '#type' => 'hidden',
168 168
     '#value' => $mod_time
169
-  );
170
-  $form['prefs']['venue'] = array(
169
+    );
170
+    $form['prefs']['venue'] = array(
171 171
     '#type' => 'hidden',
172 172
     '#value' => $venue
173
-  );
173
+    );
174 174
 
175
-  $form['prefs']['separator_top'] = array(
175
+    $form['prefs']['separator_top'] = array(
176 176
     '#value' => '<div class="separator"></div>'
177
-  );
177
+    );
178 178
 
179
-  // Simplified selectors
180
-  $form['prefs']['preset'] = array(
181
-      '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
179
+    // Simplified selectors
180
+    $form['prefs']['preset'] = array(
181
+        '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
182 182
     '#type' => 'radios',
183 183
     '#description' => ' ',
184 184
     '#options' => array(
185
-      'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
-      'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
-      'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
-      'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
-      'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
185
+        'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
+        'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
+        'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
+        'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
+        'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
190 190
     ),
191 191
     '#prefix' => '<div class="simple-form-controls">',
192 192
     '#suffix' => '</div>',
193 193
     '#default_value' => $default['preset'],
194 194
     '#ahah' => array(
195
-      'event' => 'change',
196
-      'path' => ahah_helper_path(array('prefs')),
197
-      'wrapper' => 'prefs-wrapper'
195
+        'event' => 'change',
196
+        'path' => ahah_helper_path(array('prefs')),
197
+        'wrapper' => 'prefs-wrapper'
198 198
     )
199
-  );
200
-  $form['prefs']['select preset'] = array(
199
+    );
200
+    $form['prefs']['select preset'] = array(
201 201
     '#type'  => 'submit',
202 202
     '#value' => bts('Update preset', array(), NULL, 'boinc:account-preferences-preset'),
203 203
     '#submit' => array('ahah_helper_generic_submit'),
204 204
     // The 'no-js' class only displays this button if javascript is disabled
205 205
     '#attributes' => array('class' => 'no-js'),
206
-  );
206
+    );
207 207
 
208
-  // Advanced preferences
209
-  $form['prefs']['advanced'] = array(
208
+    // Advanced preferences
209
+    $form['prefs']['advanced'] = array(
210 210
     '#title' => bts('Advanced settings', array(), NULL, 'boinc:account-preferences-option'),
211 211
     '#type' => 'fieldset',
212 212
     '#description' => '',
213 213
     '#collapsible' => TRUE,
214 214
     '#collapsed' => !$advanced,
215 215
     '#attributes' => array('class' => 'advanced-settings'),
216
-  );
216
+    );
217 217
 
218
-  // Processing preferences
218
+    // Processing preferences
219 219
 
220
-  $form['prefs']['advanced']['anchor'] = array(
220
+    $form['prefs']['advanced']['anchor'] = array(
221 221
     '#value' => '<a name="advanced"></a>'
222
-  );
222
+    );
223 223
 
224
-  $form['prefs']['advanced']['separator_top'] = array(
224
+    $form['prefs']['advanced']['separator_top'] = array(
225 225
     '#value' => '<div class="separator"></div>'
226
-  );
226
+    );
227 227
 
228
-  $form['prefs']['advanced']['processor'] = array(
228
+    $form['prefs']['advanced']['processor'] = array(
229 229
     '#title' => bts('Processor usage', array(), NULL, 'boinc:account-preferences-computing'),
230 230
     '#type' => 'fieldset',
231 231
     '#description' => '',
232 232
     '#collapsible' => FALSE,
233 233
     '#collapsed' => FALSE
234
-  );
235
-  $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
234
+    );
235
+    $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
236 236
     '#title' => bts('Suspend when computer is on battery?', array(), NULL, 'boinc:account-preferences-computing'),
237 237
     '#type' => 'radios',
238 238
     '#description' => bts('Suspends computing on portables when running on battery power.', array(), NULL, 'boinc:account-preferences-computing'),
239 239
     '#options' => $form['boolean_options']['#value'],
240 240
     '#attributes' => array('class' => 'fancy'),
241 241
     '#default_value' => ($default['run_on_batteries']) ? 0 : 1 // intentional inversion of setting
242
-  );
243
-  $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
242
+    );
243
+    $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
244 244
     '#title' => bts('Suspend when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
245 245
     '#type' => 'radios',
246 246
     '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
247 247
     '#options' => $form['boolean_options']['#value'],
248 248
     '#attributes' => array('class' => 'fancy'),
249 249
     '#default_value' => ($default['run_if_user_active']) ? 0 : 1 // intentional inversion of setting
250
-  );
251
-  $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
250
+    );
251
+    $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
252 252
     '#title' => bts('Suspend GPU computing when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
253 253
     '#type' => 'radios',
254 254
     '#description' => bts("Suspends GPU computing when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
255 255
     '#options' => $form['boolean_options']['#value'],
256 256
     '#attributes' => array('class' => 'fancy'),
257 257
     '#default_value' => ($default['run_gpu_if_user_active']) ? 0 : 1 // intentional inversion of setting
258
-  );
259
-  $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
-      '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
258
+    );
259
+    $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
+        '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
261 261
     '#type' => 'textfield',
262 262
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
263 263
     '#default_value' => $default['idle_time_to_run'],
264 264
     '#size' => 1,
265 265
     '#description' => bts('This determines when the computer is considered "in use".', array(), NULL, 'boinc:account-preferences-computing')
266
-  );
267
-  $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
266
+    );
267
+    $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
268 268
     '#title' => bts('Suspend when no mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
269 269
     '#type' => 'textfield',
270 270
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
271 271
     '#default_value' => $default['suspend_if_no_recent_input'],
272 272
     '#size' => 1,
273 273
     '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), NULL, 'boinc:account-preferences-computing')
274
-  );
275
-  $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
274
+    );
275
+    $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
276 276
     '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), NULL, 'boinc:account-preferences-computing'),
277 277
     '#type' => 'textfield',
278 278
     '#field_suffix' => '%',
279 279
     '#default_value' => $default['suspend_cpu_usage'],
280 280
     '#size' => 1,
281 281
     '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), NULL, 'boinc:account-preferences-computing'),
282
-  );
283
-  $form['prefs']['advanced']['processor']['hour_label'] = array(
282
+    );
283
+    $form['prefs']['advanced']['processor']['hour_label'] = array(
284 284
     '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
285
-  );
286
-  $form['prefs']['advanced']['processor']['start_hour'] = array(
285
+    );
286
+    $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
288 288
     '#options' => $form['hour_options']['#value'],
289 289
     '#default_value' => $default['start_hour']
290
-  );
291
-  $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
290
+    );
291
+    $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292 292
     '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
293
-  );
294
-  $form['prefs']['advanced']['processor']['end_hour'] = array(
293
+    );
294
+    $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
296 296
     '#options' => $form['hour_options']['#value'],
297 297
     '#default_value' => $default['end_hour']
298
-  );
299
-  $form['prefs']['advanced']['processor']['hour_description'] = array(
298
+    );
299
+    $form['prefs']['advanced']['processor']['hour_description'] = array(
300 300
     '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
301
-  );
302
-  $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
301
+    );
302
+    $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303 303
     '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), NULL, 'boinc:account-preferences-computing'),
304 304
     '#type' => 'radios',
305 305
     '#options' => $form['boolean_options']['#value'],
306 306
     '#attributes' => array('class' => 'fancy'),
307 307
     '#default_value' => $default['leave_apps_in_memory'],
308 308
     '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), NULL, 'boinc:account-preferences-computing')
309
-  );
310
-  $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
309
+    );
310
+    $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
311 311
     '#title' => bts('Switch between tasks every', array(), NULL, 'boinc:account-preferences-computing'),
312 312
     '#type' => 'textfield',
313 313
     '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
314 314
     '#default_value' => $default['cpu_scheduling_period_minutes'],
315 315
     '#size' => 1,
316 316
     '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), NULL, 'boinc:account-preferences-computing')
317
-  );
318
-  $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
317
+    );
318
+    $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
319 319
     '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
320 320
     '#type' => 'textfield',
321 321
     '#field_suffix' => bts('% of the processors', array(), NULL, 'boinc:account-preferences-computing'),
322 322
     '#default_value' => $default['max_ncpus_pct'],
323 323
     '#size' => 1,
324 324
     '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), NULL, 'boinc:account-preferences-computing'),
325
-  );
326
-  $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
325
+    );
326
+    $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
327 327
     '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
328 328
     '#type' => 'textfield',
329 329
     '#field_suffix' => bts('% of the CPU time', array(), NULL, 'boinc:account-preferences-computing'),
330 330
     '#default_value' => $default['cpu_usage_limit'],
331 331
     '#size' => 1,
332 332
     '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), NULL, 'boinc:account-preferences-computing')
333
-  );
333
+    );
334 334
 
335
-  // Disk and memory preferences
336
-  $form['prefs']['advanced']['storage'] = array(
335
+    // Disk and memory preferences
336
+    $form['prefs']['advanced']['storage'] = array(
337 337
     '#title' => bts('Disk and memory usage', array(), NULL, 'boinc:account-preferences-computing'),
338 338
     '#type' => 'fieldset',
339 339
     '#description' => '',
340 340
     '#collapsible' => FALSE,
341 341
     '#collapsed' => FALSE
342
-  );
343
-  $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
342
+    );
343
+    $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
344 344
     '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
345 345
     '#type' => 'textfield',
346 346
     '#field_suffix' => 'GB',
347 347
     '#default_value' => $default['disk_max_used_gb'],
348 348
     '#size' => 1,
349 349
     '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), NULL, 'boinc:account-preferences-computing'),
350
-  );
351
-  $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
350
+    );
351
+    $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
352 352
     '#title' => bts('Disk: leave at least', array(), NULL, 'boinc:account-preferences-computing'),
353 353
     '#type' => 'textfield',
354 354
     '#field_suffix' => 'GB free',
355 355
     '#default_value' => $default['disk_min_free_gb'],
356 356
     '#size' => 1,
357 357
     '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), NULL, 'boinc:account-preferences-computing'),
358
-  );
359
-  $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
358
+    );
359
+    $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
360 360
     '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
361 361
     '#type' => 'textfield',
362 362
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
363 363
     '#default_value' => $default['disk_max_used_pct'],
364 364
     '#size' => 1,
365 365
     '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), NULL, 'boinc:account-preferences-computing')
366
-  );
367
-  $form['prefs']['advanced']['storage']['disk_interval'] = array(
366
+    );
367
+    $form['prefs']['advanced']['storage']['disk_interval'] = array(
368 368
     '#title' => bts('Request tasks to checkpoint at most every', array(), NULL, 'boinc:account-preferences-computing'),
369 369
     '#type' => 'textfield',
370 370
     '#field_suffix' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
371 371
     '#default_value' => $default['disk_interval'],
372 372
     '#size' => 1,
373 373
     '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), NULL, 'boinc:account-preferences-computing')
374
-  );
375
-  $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
374
+    );
375
+    $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
376 376
     '#title' => bts('Page/swap file: use at most', array(), NULL, 'boinc:account-preferences-computing'),
377 377
     '#type' => 'textfield',
378 378
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
379 379
     '#default_value' => $default['vm_max_used_pct'],
380 380
     '#size' => 1,
381 381
     '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), NULL, 'boinc:account-preferences-computing')
382
-  );
383
-  $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
382
+    );
383
+    $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
384 384
     '#title' => bts('Memory: when computer is in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
385 385
     '#type' => 'textfield',
386 386
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
387 387
     '#default_value' => $default['ram_max_used_busy_pct'],
388 388
     '#size' => 1,
389 389
     '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing')
390
-  );
391
-  $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
390
+    );
391
+    $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
392 392
     '#title' => bts('Memory: when computer is not in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
393 393
     '#type' => 'textfield',
394 394
     '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
395 395
     '#default_value' => $default['ram_max_used_idle_pct'],
396 396
     '#size' => 1,
397 397
     '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), NULL, 'boinc:account-preferences-computing')
398
-  );
398
+    );
399 399
 
400
-  // Network preferences
401
-  $form['prefs']['advanced']['network'] = array(
400
+    // Network preferences
401
+    $form['prefs']['advanced']['network'] = array(
402 402
     '#title' => bts('Network usage', array(), NULL, 'boinc:account-preferences-computing'),
403 403
     '#type' => 'fieldset',
404 404
     '#description' => '',
405 405
     '#collapsible' => FALSE,
406 406
     '#collapsed' => FALSE
407
-  );
408
-  $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
407
+    );
408
+    $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
409 409
     '#title' => bts('Store at least', array(), NULL, 'boinc:account-preferences-computing'),
410 410
     '#type' => 'textfield',
411 411
     '#field_suffix' => bts('days of work', array(), NULL, 'boinc:account-preferences-computing'),
412 412
     '#default_value' => $default['work_buf_min_days'],
413 413
     '#size' => 1,
414 414
     '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), NULL, 'boinc:account-preferences-computing')
415
-  );
416
-  $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
415
+    );
416
+    $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
417 417
     '#title' => bts('Store up to an additional', array(), NULL, 'boinc:account-preferences-computing'),
418 418
     '#type' => 'textfield',
419 419
     '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
420 420
     '#default_value' => $default['work_buf_additional_days'],
421 421
     '#size' => 1,
422 422
     '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), NULL, 'boinc:account-preferences-computing')
423
-  );
424
-  $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
423
+    );
424
+    $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
425 425
     '#title' => bts('Confirm before connecting to Internet?', array(), NULL, 'boinc:account-preferences-computing'),
426 426
     '#type' => 'radios',
427 427
     '#options' => $form['boolean_options']['#value'],
428 428
     '#attributes' => array('class' => 'fancy'),
429 429
     '#default_value' => $default['confirm_before_connecting'],
430 430
     '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
431
-  );
432
-  $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
431
+    );
432
+    $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
433 433
     '#title' => bts('Disconnect when done?', array(), NULL, 'boinc:account-preferences-computing'),
434 434
     '#type' => 'radios',
435 435
     '#options' => $form['boolean_options']['#value'],
436 436
     '#attributes' => array('class' => 'fancy'),
437 437
     '#default_value' => $default['hangup_if_dialed'],
438 438
     '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
439
-  );
440
-  $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
439
+    );
440
+    $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
441 441
     '#title' => bts('Limit download rate to', array(), NULL, 'boinc:account-preferences-computing'),
442 442
     '#type' => 'textfield',
443 443
     '#field_suffix' => 'Kbytes/sec',
444 444
     '#default_value' => $default['max_bytes_sec_down']/1000,
445 445
     '#size' => 1,
446 446
     '#description' => bts('Limit the download rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
447
-  );
448
-  $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
447
+    );
448
+    $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
449 449
     '#title' => bts('Limit upload rate to', array(), NULL, 'boinc:account-preferences-computing'),
450 450
     '#type' => 'textfield',
451 451
     '#field_suffix' => 'Kbytes/sec',
452 452
     '#default_value' => $default['max_bytes_sec_up']/1000,
453 453
     '#size' => 1,
454 454
     '#description' => bts('Limit the upload rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
455
-  );
456
-  $form['prefs']['advanced']['network']['hour_label'] = array(
455
+    );
456
+    $form['prefs']['advanced']['network']['hour_label'] = array(
457 457
     '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
458
-  );
459
-  $form['prefs']['advanced']['network']['net_start_hour'] = array(
458
+    );
459
+    $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
461 461
     '#options' => $form['hour_options']['#value'],
462 462
     '#default_value' => $default['net_start_hour']
463
-  );
464
-  $form['prefs']['advanced']['network']['hour_delimiter'] = array(
463
+    );
464
+    $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465 465
     '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
466
-  );
467
-  $form['prefs']['advanced']['network']['net_end_hour'] = array(
466
+    );
467
+    $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
469 469
     '#options' => $form['hour_options']['#value'],
470 470
     '#default_value' => $default['net_end_hour']
471
-  );
472
-  $form['prefs']['advanced']['network']['hour_description'] = array(
471
+    );
472
+    $form['prefs']['advanced']['network']['hour_description'] = array(
473 473
     '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
474
-  );
475
-  $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
474
+    );
475
+    $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476 476
     '#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
477 477
     '#type' => 'textfield',
478 478
     '#field_suffix' => 'Mbytes',
479 479
     '#default_value' => $default['daily_xfer_limit_mb'],
480 480
     '#size' => 1
481
-  );
482
-  $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
481
+    );
482
+    $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
483 483
     '#field_prefix' => 'every',
484 484
     '#type' => 'textfield',
485 485
     '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
486 486
     '#default_value' => $default['daily_xfer_period_days'],
487 487
     '#size' => 1,
488 488
     '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), NULL, 'boinc:account-preferences-computing'),
489
-  );
490
-  $form['prefs']['advanced']['network']['dont_verify_images'] = array(
489
+    );
490
+    $form['prefs']['advanced']['network']['dont_verify_images'] = array(
491 491
     '#title' => bts('Skip data verification for image files?', array(), NULL, 'boinc:account-preferences-computing'),
492 492
     '#type' => 'radios',
493 493
     '#options' => $form['boolean_options']['#value'],
494 494
     '#attributes' => array('class' => 'fancy'),
495 495
     '#default_value' => $default['dont_verify_images'],
496 496
     '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), NULL, 'boinc:account-preferences-computing')
497
-  );
497
+    );
498 498
 
499
-  // The "fancy radios" are made via javascript on document load. In order for
500
-  // these to work with AHAH, we need this crazy setTimeout() call.
501
-  $form['prefs']['fancy-radios'] = array(
499
+    // The "fancy radios" are made via javascript on document load. In order for
500
+    // these to work with AHAH, we need this crazy setTimeout() call.
501
+    $form['prefs']['fancy-radios'] = array(
502 502
     '#value' => '
503 503
       <script>
504 504
         setTimeout(
@@ -509,177 +509,177 @@  discard block
 block discarded – undo
509 509
           300
510 510
         )
511 511
       </script>'
512
-  );
513
-  $form['prefs']['view advanced'] = array(
512
+    );
513
+    $form['prefs']['view advanced'] = array(
514 514
     '#type' => 'hidden',
515 515
     '#value' => 1
516
-  );
516
+    );
517 517
 
518
-  $form['prefs']['separator_bottom'] = array(
518
+    $form['prefs']['separator_bottom'] = array(
519 519
     '#value' => '<div class="separator buttons"></div>'
520
-  );
520
+    );
521 521
 
522
-  // Form control
523
-  $form['prefs']['form control tabs prefix'] = array(
522
+    // Form control
523
+    $form['prefs']['form control tabs prefix'] = array(
524 524
     '#value' => '<ul class="form-control tab-list">'
525
-  );
526
-  $form['prefs']['submit'] = array(
525
+    );
526
+    $form['prefs']['submit'] = array(
527 527
     '#prefix' => '<li class="first tab">',
528 528
     '#type' => 'submit',
529 529
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
530 530
     '#suffix' => '</li>'
531
-  );
532
-  $form['prefs']['form control tabs'] = array(
531
+    );
532
+    $form['prefs']['form control tabs'] = array(
533 533
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
534
-  );
535
-  if ($venue AND $venue != 'generic') {
534
+    );
535
+    if ($venue AND $venue != 'generic') {
536 536
     global $base_path;
537 537
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
538
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
538
+        l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541
-          'attributes' => array(
540
+            'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541
+            'attributes' => array(
542 542
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
544
-          )
543
+                array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
544
+            )
545 545
         )
546
-      ) . '</li>';
547
-  }
548
-  $form['prefs']['view control'] = array(
546
+        ) . '</li>';
547
+    }
548
+    $form['prefs']['view control'] = array(
549 549
     '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
550
-  );
551
-  $form['prefs']['form control tabs suffix'] = array(
550
+    );
551
+    $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
553
-  );
554
-  $form['#submit'][] = 'boincwork_generalprefs_form_submit';
553
+    );
554
+    $form['#submit'][] = 'boincwork_generalprefs_form_submit';
555 555
 
556
-  return $form;
556
+    return $form;
557 557
 }
558 558
 
559 559
 /**
560
-  * Validate the general preferences form.
561
-  */
560
+ * Validate the general preferences form.
561
+ */
562 562
 function boincwork_generalprefs_form_validate($form, &$form_state) {
563
-  require_boinc('util');
564
-  $values = $form_state['values']['prefs']['advanced'];
565
-
566
-  //drupal_set_message('<pre>' . print_r($form_state['values'], true) . '</pre>');
567
-  // Verify all non-boolean user input values and notify form API of failures
568
-
569
-  // Processing preferences
570
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
578
-
579
-  // Storage preferences
580
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
587
-
588
-  // Network preferences
589
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
563
+    require_boinc('util');
564
+    $values = $form_state['values']['prefs']['advanced'];
565
+
566
+    //drupal_set_message('<pre>' . print_r($form_state['values'], true) . '</pre>');
567
+    // Verify all non-boolean user input values and notify form API of failures
568
+
569
+    // Processing preferences
570
+    if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
+    if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
+    if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
+    if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
+    if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
+    if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
+    if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
+    if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
578
+
579
+    // Storage preferences
580
+    if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
+    if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
+    if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
+    if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
+    if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
+    if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
+    if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
587
+
588
+    // Network preferences
589
+    if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
+    if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
+    if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
+    if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
+    if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
+    if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
+    if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
+    if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
597 597
 }
598 598
 
599 599
 /**
600
-  * Handle post-validation submission of general preferences form.
601
-  */
600
+ * Handle post-validation submission of general preferences form.
601
+ */
602 602
 function boincwork_generalprefs_form_submit($form, &$form_state) {
603
-  global $user;
604
-  $account = user_load($user->uid);
605
-
606
-  $values = $form_state['values']['prefs']['advanced'];
607
-  $venue = $form_state['values']['prefs']['venue'];
608
-  $preset = $form_state['values']['prefs']['preset'];
609
-
610
-  // Load preferences from BOINC account
611
-  $prefs = boincwork_load_prefs('general', $venue);
612
-
613
-  // Processing preferences
614
-  $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
615
-  $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
616
-  $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
617
-  $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
618
-  $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
619
-  $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
620
-  $prefs['start_hour'] = $values['processor']['start_hour'];
621
-  $prefs['end_hour'] = $values['processor']['end_hour'];
622
-  $prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
623
-  $prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
624
-  $prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
625
-  $prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
626
-
627
-  // Storage preferences
628
-  $prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
629
-  $prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
630
-  $prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
631
-  $prefs['disk_interval'] = $values['storage']['disk_interval'];
632
-  $prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
633
-  $prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
634
-  $prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
635
-
636
-  // Network preferences
637
-  $prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
638
-  $prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
639
-  $prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
640
-  $prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
641
-  $prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
642
-  $prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
643
-  $prefs['net_start_hour'] = $values['network']['net_start_hour'];
644
-  $prefs['net_end_hour'] = $values['network']['net_end_hour'];
645
-  $prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
646
-  $prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
647
-  $prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
648
-
649
-  // transform old way to store the preset into new way
650
-  // ideally this should already have happened in boincwork_generalprefs_form()
651
-  if (isset($prefs['@attributes']['preset'])) {
603
+    global $user;
604
+    $account = user_load($user->uid);
605
+
606
+    $values = $form_state['values']['prefs']['advanced'];
607
+    $venue = $form_state['values']['prefs']['venue'];
608
+    $preset = $form_state['values']['prefs']['preset'];
609
+
610
+    // Load preferences from BOINC account
611
+    $prefs = boincwork_load_prefs('general', $venue);
612
+
613
+    // Processing preferences
614
+    $prefs['run_on_batteries'] = ($values['processor']['run_on_batteries']) ? 0 : 1;
615
+    $prefs['run_if_user_active'] = ($values['processor']['run_if_user_active']) ? 0 : 1;
616
+    $prefs['run_gpu_if_user_active'] = ($values['processor']['run_gpu_if_user_active']) ? 0 : 1;
617
+    $prefs['idle_time_to_run'] = $values['processor']['idle_time_to_run'];
618
+    $prefs['suspend_if_no_recent_input'] = $values['processor']['suspend_if_no_recent_input'];
619
+    $prefs['suspend_cpu_usage'] = $values['processor']['suspend_cpu_usage'];
620
+    $prefs['start_hour'] = $values['processor']['start_hour'];
621
+    $prefs['end_hour'] = $values['processor']['end_hour'];
622
+    $prefs['leave_apps_in_memory'] = ($values['processor']['leave_apps_in_memory']) ? 1 : 0;
623
+    $prefs['cpu_scheduling_period_minutes'] = $values['processor']['cpu_scheduling_period_minutes'];
624
+    $prefs['max_ncpus_pct'] = $values['processor']['max_ncpus_pct'];
625
+    $prefs['cpu_usage_limit'] = $values['processor']['cpu_usage_limit'];
626
+
627
+    // Storage preferences
628
+    $prefs['disk_max_used_gb'] = $values['storage']['disk_max_used_gb'];
629
+    $prefs['disk_min_free_gb'] = $values['storage']['disk_min_free_gb'];
630
+    $prefs['disk_max_used_pct'] = $values['storage']['disk_max_used_pct'];
631
+    $prefs['disk_interval'] = $values['storage']['disk_interval'];
632
+    $prefs['vm_max_used_pct'] = $values['storage']['vm_max_used_pct'];
633
+    $prefs['ram_max_used_busy_pct'] = $values['storage']['ram_max_used_busy_pct'];
634
+    $prefs['ram_max_used_idle_pct'] = $values['storage']['ram_max_used_idle_pct'];
635
+
636
+    // Network preferences
637
+    $prefs['work_buf_min_days'] = $values['network']['work_buf_min_days'];
638
+    $prefs['work_buf_additional_days'] = $values['network']['work_buf_additional_days'];
639
+    $prefs['confirm_before_connecting'] = ($values['network']['confirm_before_connecting']) ? 1 : 0;
640
+    $prefs['hangup_if_dialed'] = ($values['network']['hangup_if_dialed']) ? 1 : 0;
641
+    $prefs['max_bytes_sec_down'] = $values['network']['max_bytes_sec_down']*1000;
642
+    $prefs['max_bytes_sec_up'] = $values['network']['max_bytes_sec_up']*1000;
643
+    $prefs['net_start_hour'] = $values['network']['net_start_hour'];
644
+    $prefs['net_end_hour'] = $values['network']['net_end_hour'];
645
+    $prefs['daily_xfer_limit_mb'] = $values['network']['daily_xfer_limit_mb'];
646
+    $prefs['daily_xfer_period_days'] = $values['network']['daily_xfer_period_days'];
647
+    $prefs['dont_verify_images'] = ($values['network']['dont_verify_images']) ? 1 : 0;
648
+
649
+    // transform old way to store the preset into new way
650
+    // ideally this should already have happened in boincwork_generalprefs_form()
651
+    if (isset($prefs['@attributes']['preset'])) {
652 652
     $prefs['preset'] = $prefs['@attributes']['preset'];
653 653
     unset($prefs['@attributes']['preset']);
654
-  }
655
-  // Save the preset selection (or lack thereof)
656
-  if (!$preset OR $preset == 'custom') {
654
+    }
655
+    // Save the preset selection (or lack thereof)
656
+    if (!$preset OR $preset == 'custom') {
657 657
     $prefs['preset'] = 'custom';
658
-  }
659
-  else {
658
+    }
659
+    else {
660 660
     $prefs['preset'] = $preset;
661
-  }
661
+    }
662 662
 
663
-  // If this is a new preference set, be sure to unset the "cleared" attribute
664
-  if (isset($prefs['@attributes']['cleared'])) {
663
+    // If this is a new preference set, be sure to unset the "cleared" attribute
664
+    if (isset($prefs['@attributes']['cleared'])) {
665 665
     unset($prefs['@attributes']['cleared']);
666
-  }
666
+    }
667 667
 
668
-  // Update database
669
-  $result = boincwork_save_prefs($prefs, 'general', $venue);
668
+    // Update database
669
+    $result = boincwork_save_prefs($prefs, 'general', $venue);
670 670
 
671
-  if (!$result) {
671
+    if (!$result) {
672 672
     watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
673 673
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
674
-  }
675
-  elseif (!drupal_get_messages('status', FALSE)) {
674
+    }
675
+    elseif (!drupal_get_messages('status', FALSE)) {
676 676
     // Show this message if the set wasn't created automatically (in which case
677 677
     // there is a message tailored to that) {
678 678
     drupal_set_message(t('Your preferences have been updated.
679 679
       Client-related preferences will take effect when your computer
680 680
       communicates with @project or you issue the "Update"
681 681
       command from the BOINC client.', array('@project' => PROJECT)));
682
-  }
682
+    }
683 683
 }
684 684
 
685 685
 
@@ -691,116 +691,116 @@  discard block
 block discarded – undo
691 691
  * Find compatible hosts for merging
692 692
  */
693 693
 function boincwork_host_get_compatible_hosts($host_id) {
694
-  require_boinc('host');
695
-  global $user;
696
-  $account = user_load($user->uid);
697
-  $compatible_hosts = array();
698
-  $host_count = 0;
699
-  db_set_active('boinc_ro');
700
-  $current_host = db_fetch_object(db_query("
694
+    require_boinc('host');
695
+    global $user;
696
+    $account = user_load($user->uid);
697
+    $compatible_hosts = array();
698
+    $host_count = 0;
699
+    db_set_active('boinc_ro');
700
+    $current_host = db_fetch_object(db_query("
701 701
     SELECT id, domain_name, create_time, total_credit, rpc_time, os_name,
702 702
       p_vendor, p_model
703 703
     FROM {host}
704 704
     WHERE userid = '%d' AND id = '%d'",
705 705
     $account->boincuser_id, $host_id
706
-  ));
707
-  db_set_active('default');
708
-  $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
-  $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
710
-  // Get the list of all other hosts owned by this user for comparison
711
-  db_set_active('boinc_ro');
712
-  $all_other_hosts = db_query("
706
+    ));
707
+    db_set_active('default');
708
+    $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
+    $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
710
+    // Get the list of all other hosts owned by this user for comparison
711
+    db_set_active('boinc_ro');
712
+    $all_other_hosts = db_query("
713 713
     SELECT id, domain_name, create_time, total_credit, rpc_time, os_name,
714 714
       p_vendor, p_model
715 715
     FROM {host}
716 716
     WHERE userid = '%d' AND id <> '%d'",
717 717
     $account->boincuser_id, $host_id
718
-  );
719
-  db_set_active('default');
720
-  // Compare all hosts to see if any are plausible duplicates
721
-  while ($other_host = db_fetch_object($all_other_hosts)) {
718
+    );
719
+    db_set_active('default');
720
+    // Compare all hosts to see if any are plausible duplicates
721
+    while ($other_host = db_fetch_object($all_other_hosts)) {
722 722
     // First, disqualify if hosts were active at the same time
723 723
     if (!$current_host->is_new) {
724
-      $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
-      $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
726
-      if (!$other_host->is_new) {
724
+        $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
+        $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
726
+        if (!$other_host->is_new) {
727 727
         // If both hosts being compared are not new, see if times overlap
728 728
         if (!times_disjoint($current_host, $other_host)) {
729
-          // Hosts were active at the same time; can't be a duplicate
730
-          continue;
729
+            // Hosts were active at the same time; can't be a duplicate
730
+            continue;
731
+        }
731 732
         }
732
-      }
733 733
     }
734 734
     // Next, disqualify if hosts have different OS platforms
735 735
     if (!os_compatible($current_host, $other_host)) {
736
-      // Hosts have different OS platforms; not really a duplicate
737
-      continue;
736
+        // Hosts have different OS platforms; not really a duplicate
737
+        continue;
738 738
     }
739 739
     // Finally, disqualify if hosts have different CPUs
740 740
     if (!cpus_compatible($current_host, $other_host)) {
741
-      // CPUs don't match; not a duplicate
742
-      continue;
741
+        // CPUs don't match; not a duplicate
742
+        continue;
743 743
     }
744 744
     // If not disqualified, this host is available for merging
745 745
     $hosts[] = $other_host;
746 746
     $host_count++;
747 747
     if ($host_count == 500) {
748
-      // This is enough!
749
-      break;
748
+        // This is enough!
749
+        break;
750 750
     }
751
-  }
752
-  return $hosts;
751
+    }
752
+    return $hosts;
753 753
 }
754 754
 
755 755
 /**
756 756
  * Perform the database updates to merge the old host into the new host
757 757
  */
758 758
 function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
759
-  // Decay the average credit of the two hosts
760
-  require_boinc('credit');
761
-  $now = time();
762
-  update_average($now, 0, 0, $old_host->expavg_credit, $old_host->expavg_time);
763
-  update_average($now, 0, 0, $new_host->expavg_credit, $new_host->expavg_time);
759
+    // Decay the average credit of the two hosts
760
+    require_boinc('credit');
761
+    $now = time();
762
+    update_average($now, 0, 0, $old_host->expavg_credit, $old_host->expavg_time);
763
+    update_average($now, 0, 0, $new_host->expavg_credit, $new_host->expavg_time);
764 764
 
765
-  // Update the database:
766
-  // - add credit from old host to new host
767
-  // - change results to refer to the new host
768
-  // - put old host in "zombie" state (userid=0, rpc_seqno=[new_host_id])
765
+    // Update the database:
766
+    // - add credit from old host to new host
767
+    // - change results to refer to the new host
768
+    // - put old host in "zombie" state (userid=0, rpc_seqno=[new_host_id])
769 769
 
770
-  $total_credit = $old_host->total_credit + $new_host->total_credit;
771
-  $recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
770
+    $total_credit = $old_host->total_credit + $new_host->total_credit;
771
+    $recent_credit = $old_host->expavg_credit + $new_host->expavg_credit;
772 772
 
773
-  if ($new_host->rpc_seqno == $old_host->id) {
773
+    if ($new_host->rpc_seqno == $old_host->id) {
774 774
     rules_invoke_event('boincwork_circular_merge_error', $old_host->id, $new_host->id, variable_get('boinc_admin_mailing_list_subject_tag', ''));
775 775
     watchdog('boincwork',
776
-      'Circular merge attempted, target host rpc_seqno is equal to old host\'s id: old host id=%old_host, target host id=%new_host',
777
-      array(
776
+        'Circular merge attempted, target host rpc_seqno is equal to old host\'s id: old host id=%old_host, target host id=%new_host',
777
+        array(
778 778
         '%old_host' => $old_host->id,
779 779
         '%new_host' => $new_host->id,
780
-      ),
781
-      WATCHDOG_WARNING
780
+        ),
781
+        WATCHDOG_WARNING
782 782
     );
783 783
     $message = 'Could not merge due to a circular merge error. The site administrators have been contacted about this issue, and will investigate further.';
784 784
     return FALSE;
785
-  }
785
+    }
786 786
 
787
-  if ($new_host->userid==0) {
787
+    if ($new_host->userid==0) {
788 788
     rules_invoke_event('boincwork_zombie_merge_error', $old_host->id, $new_host->id, variable_get('boinc_admin_mailing_list_subject_tag', ''));
789 789
     watchdog('boincwork',
790
-      'Zombie merge attempted, target host has userid=0: old host id=%old_host, target host id=%new_host',
791
-      array(
790
+        'Zombie merge attempted, target host has userid=0: old host id=%old_host, target host id=%new_host',
791
+        array(
792 792
         '%old_host' => $old_host->id,
793 793
         '%new_host' => $new_host->id,
794
-      ),
795
-      WATCHDOG_WARNING
794
+        ),
795
+        WATCHDOG_WARNING
796 796
     );
797 797
     $message = 'Could not merge because the target host has userid=0. The site administrators have been contacted about this issue, and will investigate further.';
798 798
     return FALSE;
799
-  }
799
+    }
800 800
 
801
-  // Move credit from the old host to the new host
802
-  db_set_active('boinc_rw');
803
-  $credit_updated = db_query("
801
+    // Move credit from the old host to the new host
802
+    db_set_active('boinc_rw');
803
+    $credit_updated = db_query("
804 804
     UPDATE {host}
805 805
     SET
806 806
       total_credit = '%d',
@@ -808,34 +808,34 @@  discard block
 block discarded – undo
808 808
       expavg_time = '%d'
809 809
     WHERE id = '%d'",
810 810
     $total_credit, $recent_credit, $now, $new_host->id
811
-  );
812
-  db_set_active('default');
813
-  if (!$credit_updated) {
811
+    );
812
+    db_set_active('default');
813
+    if (!$credit_updated) {
814 814
     if ($message !== NULL) {
815
-      $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
815
+        $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
816 816
     }
817 817
     return FALSE;
818
-  }
818
+    }
819 819
 
820
-  // Move results from the old host to the new host
821
-  db_set_active('boinc_rw');
822
-  $results_updated = db_query("
820
+    // Move results from the old host to the new host
821
+    db_set_active('boinc_rw');
822
+    $results_updated = db_query("
823 823
     UPDATE {result}
824 824
     SET hostid = '%d'
825 825
     WHERE hostid = '%d'",
826 826
     $new_host->id, $old_host->id
827
-  );
828
-  db_set_active('default');
829
-  if (!$results_updated) {
827
+    );
828
+    db_set_active('default');
829
+    if (!$results_updated) {
830 830
     if ($message !== NULL) {
831
-      $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
831
+        $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
832 832
     }
833 833
     return FALSE;
834
-  }
834
+    }
835 835
 
836
-  // Retire the old host
837
-  db_set_active('boinc_rw');
838
-  $old_host_retired = db_query("
836
+    // Retire the old host
837
+    db_set_active('boinc_rw');
838
+    $old_host_retired = db_query("
839 839
     UPDATE {host}
840 840
     SET
841 841
       total_credit = '0',
@@ -844,16 +844,16 @@  discard block
 block discarded – undo
844 844
       rpc_seqno = '%d'
845 845
     WHERE id = '%d'",
846 846
     $new_host->id, $old_host->id
847
-  );
848
-  db_set_active('default');
849
-  if (!$old_host_retired) {
847
+    );
848
+    db_set_active('default');
849
+    if (!$old_host_retired) {
850 850
     if ($message !== NULL) {
851
-      $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
851
+        $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
852 852
     }
853 853
     return FALSE;
854
-  }
854
+    }
855 855
 
856
-  return TRUE;
856
+    return TRUE;
857 857
 }
858 858
 
859 859
 /**
@@ -861,75 +861,75 @@  discard block
 block discarded – undo
861 861
  */
862 862
 function boincwork_host_merge_form(&$form_state, $host_id) {
863 863
 
864
-  if (!boincwork_host_user_is_owner($host_id)) {
864
+    if (!boincwork_host_user_is_owner($host_id)) {
865 865
     drupal_goto("host/{$host_id}");
866
-  }
866
+    }
867 867
 
868
-  $form = array();
869
-  $form_state['storage']['current_host_id'] = $host_id;
870
-  $current_host = boincwork_host_get_info($host_id);
868
+    $form = array();
869
+    $form_state['storage']['current_host_id'] = $host_id;
870
+    $current_host = boincwork_host_get_info($host_id);
871 871
 
872
-  // Get hosts that could be merged with this one
873
-  $hosts = boincwork_host_get_compatible_hosts($host_id);
872
+    // Get hosts that could be merged with this one
873
+    $hosts = boincwork_host_get_compatible_hosts($host_id);
874 874
 
875
-  if (!$hosts) {
875
+    if (!$hosts) {
876 876
     drupal_set_message(t('There are no computers eligible for merging with this
877 877
       one'), 'warning'
878 878
     );
879 879
     drupal_goto("host/{$host_id}");
880
-  }
880
+    }
881 881
 
882
-  $form['overview'] = array(
882
+    $form['overview'] = array(
883 883
     '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
884
-      . ' the same computer by mistake. You can correct this by merging old'
885
-      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
886
-      . '<p>'
887
-      . bts('Check the computers that are the same as @name'
888
-      . ' (created on @date at @time with computer ID @id)',
884
+        . ' the same computer by mistake. You can correct this by merging old'
885
+        . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
886
+        . '<p>'
887
+        . bts('Check the computers that are the same as @name'
888
+        . ' (created on @date at @time with computer ID @id)',
889 889
         array(
890
-          '@name' => $current_host->domain_name,
891
-          '@date' => date('j M Y', $current_host->create_time),
892
-          '@time' => date('G:i:s T', $current_host->create_time),
893
-          '@id' => $current_host->id,
890
+            '@name' => $current_host->domain_name,
891
+            '@date' => date('j M Y', $current_host->create_time),
892
+            '@time' => date('G:i:s T', $current_host->create_time),
893
+            '@id' => $current_host->id,
894 894
         ),
895 895
         NULL, 'boinc:account-host-merge') . '</p>',
896
-  );
896
+    );
897 897
 
898
-  $options = array();
899
-  foreach ($hosts as $host) {
898
+    $options = array();
899
+    foreach ($hosts as $host) {
900 900
     $options[$host->id] = array(
901
-      $host->domain_name,
902
-      date('j M Y G:i:s T', $host->create_time),
903
-      $host->id,
901
+        $host->domain_name,
902
+        date('j M Y G:i:s T', $host->create_time),
903
+        $host->id,
904 904
     );
905
-  }
905
+    }
906 906
 
907
-  $form['merge'] = array(
907
+    $form['merge'] = array(
908 908
     '#title' => '',
909 909
     '#type' => 'tableselect',
910 910
     '#header' => array(bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), NULL, 'boinc:host-details'), bts('Computer ID', array(), NULL, 'boinc:host-list')),
911 911
     '#options' => $options,
912
-  );
912
+    );
913 913
 
914
-  $form['prefs']['separator_bottom'] = array(
915
-  //  '#value' => '<div class="separator buttons"></div>'
916
-  );
914
+    $form['prefs']['separator_bottom'] = array(
915
+    //  '#value' => '<div class="separator buttons"></div>'
916
+    );
917 917
 
918
-  // Form control
919
-  $form['prefs']['form control tabs prefix'] = array(
918
+    // Form control
919
+    $form['prefs']['form control tabs prefix'] = array(
920 920
     '#value' => '<ul class="form-control tab-list">'
921
-  );
922
-  $form['prefs']['submit'] = array(
921
+    );
922
+    $form['prefs']['submit'] = array(
923 923
     '#prefix' => '<li class="first tab">',
924 924
     '#type' => 'submit',
925 925
     '#value' => bts('Merge', array(), NULL, 'boinc:form-merge'),
926 926
     '#suffix' => '</li>'
927
-  );
928
-  $form['prefs']['form control tabs'] = array(
927
+    );
928
+    $form['prefs']['form control tabs'] = array(
929 929
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
930
-  );
930
+    );
931 931
 
932
-  return $form;
932
+    return $form;
933 933
 }
934 934
 
935 935
 /**
@@ -942,76 +942,76 @@  discard block
 block discarded – undo
942 942
  * Handle submission of the merge host form
943 943
  */
944 944
 function boincwork_host_merge_form_submit($form, &$form_state) {
945
-  $merged = array();
946
-  $errors = array();
947
-  $current_host_id = $form_state['storage']['current_host_id'];
948
-  $current_host = boincwork_host_get_info($current_host_id);
949
-  $selected_hosts = array_filter($form_state['values']['merge']);
945
+    $merged = array();
946
+    $errors = array();
947
+    $current_host_id = $form_state['storage']['current_host_id'];
948
+    $current_host = boincwork_host_get_info($current_host_id);
949
+    $selected_hosts = array_filter($form_state['values']['merge']);
950 950
 
951
-  foreach ($selected_hosts as $host_id) {
951
+    foreach ($selected_hosts as $host_id) {
952 952
     // Attempt to merge each host, noting the results
953 953
     $message = '';
954 954
     $old_host = boincwork_host_get_info($host_id);
955 955
     if (boincwork_host_merge($old_host, $current_host, $message)) {
956
-      $merged[$old_host->id] = $old_host->id;
957
-      $current_host = boincwork_host_get_info($current_host_id);
956
+        $merged[$old_host->id] = $old_host->id;
957
+        $current_host = boincwork_host_get_info($current_host_id);
958 958
     }
959 959
     else {
960
-      $errors[$old_host->id] = $message;
960
+        $errors[$old_host->id] = $message;
961
+    }
961 962
     }
962
-  }
963 963
 
964
-  if ($merged) {
964
+    if ($merged) {
965 965
     // Generate a natural language list of IDs that were merged
966 966
     $oxford_comma = ',';
967 967
     $conjunction = bts('and', array(), NULL, 'boinc:account-preference');
968 968
     $list = array_keys($merged);
969 969
     $last = array_pop($list);
970 970
     if ($list) {
971
-      if (count($merged) == 2) {
971
+        if (count($merged) == 2) {
972 972
         $oxford_comma = '';
973
-      }
974
-      $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
973
+        }
974
+        $list = implode(', ', $list) . $oxford_comma . ' ' . $conjunction . ' ' . $last;
975 975
     }
976 976
     else {
977
-      $list = $last;
977
+        $list = $last;
978 978
     }
979 979
     if (count($merged) == 1) {
980
-      drupal_set_message(bts(
980
+        drupal_set_message(bts(
981 981
         'Computer @old_id has been merged successfully into @id.',
982 982
         array(
983
-          '@old_id' => $list,
984
-          '@id' => $current_host_id
983
+            '@old_id' => $list,
984
+            '@id' => $current_host_id
985 985
         ),
986 986
         NULL, 'boinc:account-host-merge'));
987 987
     }
988 988
     else {
989
-      drupal_set_message(bts(
989
+        drupal_set_message(bts(
990 990
         'Computers @old_ids have been merged successfully into @id.',
991 991
         array(
992
-          '@old_ids' => $list,
993
-          '@id' => $current_host_id
992
+            '@old_ids' => $list,
993
+            '@id' => $current_host_id
994 994
         ),
995 995
         NULL, 'boinc:account-host-merge'));
996 996
     }
997
-  }
997
+    }
998 998
 
999
-  if ($errors) {
999
+    if ($errors) {
1000 1000
     // Report any hosts that failed to merge
1001 1001
     foreach ($errors as $id => $error) {
1002
-      drupal_set_message(
1002
+        drupal_set_message(
1003 1003
         bts('Computer @old_id failed to merge: @message',
1004
-          array(
1004
+            array(
1005 1005
             '@old_id' => $id,
1006 1006
             '@message' => $error,
1007
-          ),
1008
-          NULL, 'boinc:account-host-merge'),
1007
+            ),
1008
+            NULL, 'boinc:account-host-merge'),
1009 1009
         'warning'
1010
-      );
1010
+        );
1011
+    }
1011 1012
     }
1012
-  }
1013 1013
 
1014
-  drupal_goto("host/{$current_host_id}");
1014
+    drupal_goto("host/{$current_host_id}");
1015 1015
 }
1016 1016
 
1017 1017
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -1023,44 +1023,44 @@  discard block
 block discarded – undo
1023 1023
  */
1024 1024
 function boincwork_projectprefs_form(&$form_state, $venue) {
1025 1025
 
1026
-  global $user;
1027
-  $account = user_load($user->uid);
1026
+    global $user;
1027
+    $account = user_load($user->uid);
1028 1028
 
1029
-  $established = TRUE;
1029
+    $established = TRUE;
1030 1030
 
1031
-  // Get availability of special BOINC preferences
1032
-  require_boinc(array('app_types'));
1033
-  $app_types = get_app_types();
1031
+    // Get availability of special BOINC preferences
1032
+    require_boinc(array('app_types'));
1033
+    $app_types = get_app_types();
1034 1034
 
1035
-  // Load any existing preferences from BOINC account
1036
-  $prefs = boincwork_load_prefs('project', $venue);
1035
+    // Load any existing preferences from BOINC account
1036
+    $prefs = boincwork_load_prefs('project', $venue);
1037 1037
 
1038
-  // Take note if this is not an established preference set on the account
1039
-  if (isset($prefs['@attributes']['cleared'])) {
1038
+    // Take note if this is not an established preference set on the account
1039
+    if (isset($prefs['@attributes']['cleared'])) {
1040 1040
     $established = FALSE;
1041
-  }
1041
+    }
1042 1042
 
1043
-  // Extract modified tag if present
1044
-  $modified = NULL;
1045
-  if (isset($prefs['modified']['@value'])) {
1043
+    // Extract modified tag if present
1044
+    $modified = NULL;
1045
+    if (isset($prefs['modified']['@value'])) {
1046 1046
     $modified = $prefs['modified']['@value'];
1047
-  }
1047
+    }
1048 1048
 
1049
-  $venue_is_default = FALSE;
1050
-  if ($account->boincuser_default_pref_set) {
1049
+    $venue_is_default = FALSE;
1050
+    if ($account->boincuser_default_pref_set) {
1051 1051
     if ($account->boincuser_default_pref_set == $venue) {
1052
-      $venue_is_default = TRUE;
1052
+        $venue_is_default = TRUE;
1053 1053
     }
1054
-  }
1055
-  elseif (!$venue OR $venue == 'generic') {
1054
+    }
1055
+    elseif (!$venue OR $venue == 'generic') {
1056 1056
     $venue_is_default = TRUE;
1057
-  }
1058
-  else {
1057
+    }
1058
+    else {
1059 1059
     $venue_is_default = FALSE;
1060
-  }
1060
+    }
1061 1061
 
1062
-  // Define form defaults
1063
-  $default = array(
1062
+    // Define form defaults
1063
+    $default = array(
1064 1064
     'resource_share' => 100,
1065 1065
     'no_cpu' => 0,
1066 1066
     'no_cuda' => 0,
@@ -1069,344 +1069,344 @@  discard block
 block discarded – undo
1069 1069
     'no_apple_gpu' => 0,
1070 1070
     'default_venue' => $venue_is_default,
1071 1071
     'allow_beta_work' => $prefs['allow_beta_work'],
1072
-  );
1073
-  foreach ($default as $name => $value) {
1072
+    );
1073
+    foreach ($default as $name => $value) {
1074 1074
     if (isset($prefs[$name])) {
1075
-      if (is_array($prefs[$name])) {
1075
+        if (is_array($prefs[$name])) {
1076 1076
         if (isset($prefs[$name]['@value'])) {
1077
-          $default[$name] = $prefs[$name]['@value'];
1077
+            $default[$name] = $prefs[$name]['@value'];
1078
+        }
1078 1079
         }
1079
-      }
1080
-      else {
1080
+        else {
1081 1081
         $default[$name] = $prefs[$name];
1082
-      }
1082
+        }
1083
+    }
1083 1084
     }
1084
-  }
1085 1085
 
1086
-  // Standard option sets
1087
-  $form['boolean_options'] = array(
1086
+    // Standard option sets
1087
+    $form['boolean_options'] = array(
1088 1088
     '#type' => 'value',
1089 1089
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1090
-  );
1090
+    );
1091 1091
 
1092
-  // Identify preference sets that are established to distinguish what has been
1093
-  // saved to the database from what is just showing default values
1094
-  $form['#established'] = $established;
1092
+    // Identify preference sets that are established to distinguish what has been
1093
+    // saved to the database from what is just showing default values
1094
+    $form['#established'] = $established;
1095 1095
 
1096
-  // Top level form options
1097
-  $form['#tree'] = TRUE;
1096
+    // Top level form options
1097
+    $form['#tree'] = TRUE;
1098 1098
 
1099
-  // Hidden elements
1100
-  $form['modified'] = array(
1099
+    // Hidden elements
1100
+    $form['modified'] = array(
1101 1101
     '#type' => 'hidden',
1102 1102
     '#value' => $modified,
1103
-  );
1104
-  $form['venue'] = array(
1103
+    );
1104
+    $form['venue'] = array(
1105 1105
     '#type' => 'hidden',
1106 1106
     '#value' => $venue,
1107
-  );
1107
+    );
1108 1108
 
1109
-  $form['separator_top'] = array(
1109
+    $form['separator_top'] = array(
1110 1110
     '#value' => '<div class="separator"></div>'
1111
-  );
1111
+    );
1112 1112
 
1113
-  // Common project preferences
1114
-  $form['resource'] = array(
1113
+    // Common project preferences
1114
+    $form['resource'] = array(
1115 1115
     '#title' => bts('Resource settings', array(), NULL, 'boinc:account-preferences-project'),
1116 1116
     '#type' => 'fieldset',
1117 1117
     '#description' => null,
1118 1118
     '#collapsible' => TRUE,
1119 1119
     '#collapsed' => FALSE
1120
-  );
1121
-  $form['resource']['resource_share'] = array(
1120
+    );
1121
+    $form['resource']['resource_share'] = array(
1122 1122
     '#title' => bts('Resource share', array(), NULL, 'boinc:account-preferences-project'),
1123 1123
     '#type' => 'textfield',
1124 1124
     '#default_value' => $default['resource_share'],
1125 1125
     '#size' => 5,
1126 1126
     '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), NULL, 'boinc:account-preferences-project')
1127
-  );
1128
-  if ($app_types->count > 1) {
1127
+    );
1128
+    if ($app_types->count > 1) {
1129 1129
     if ($app_types->cpu) {
1130
-      $form['resource']['no_cpu'] = array(
1130
+        $form['resource']['no_cpu'] = array(
1131 1131
         '#title' => bts('Use CPU', array(), NULL, 'boinc:account-preferences-project'),
1132 1132
         '#type' => 'radios',
1133 1133
         '#options' => $form['boolean_options']['#value'],
1134 1134
         '#attributes' => array('class' => 'fancy'),
1135 1135
         '#default_value' => $default['no_cpu'] ? 0 : 1,
1136 1136
         '#description' => bts('Request CPU-only tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1137
-      );
1137
+        );
1138 1138
     }
1139 1139
     if ($app_types->cuda) {
1140
-      $form['resource']['no_cuda'] = array(
1140
+        $form['resource']['no_cuda'] = array(
1141 1141
         '#title' => bts('Use NVIDIA GPU', array(), NULL, 'boinc:account-preferences-project'),
1142 1142
         '#type' => 'radios',
1143 1143
         '#options' => $form['boolean_options']['#value'],
1144 1144
         '#attributes' => array('class' => 'fancy'),
1145 1145
         '#default_value' => $default['no_cuda'] ? 0 : 1,
1146 1146
         '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1147
-      );
1147
+        );
1148 1148
     }
1149 1149
     if ($app_types->ati) {
1150
-      $form['resource']['no_ati'] = array(
1150
+        $form['resource']['no_ati'] = array(
1151 1151
         '#title' => bts('Use AMD GPU', array(), NULL, 'boinc:account-preferences-project'),
1152 1152
         '#type' => 'radios',
1153 1153
         '#options' => $form['boolean_options']['#value'],
1154 1154
         '#attributes' => array('class' => 'fancy'),
1155 1155
         '#default_value' => $default['no_ati'] ? 0 : 1,
1156 1156
         '#description' => bts('Request AMD GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1157
-      );
1157
+        );
1158 1158
     }
1159 1159
     if ($app_types->intel_gpu) {
1160
-      $form['resource']['no_intel_gpu'] = array(
1160
+        $form['resource']['no_intel_gpu'] = array(
1161 1161
         '#title' => bts('Use INTEL GPU', array(), NULL, 'boinc:account-preferences-project'),
1162 1162
         '#type' => 'radios',
1163 1163
         '#options' => $form['boolean_options']['#value'],
1164 1164
         '#attributes' => array('class' => 'fancy'),
1165 1165
         '#default_value' => $default['no_intel_gpu'] ? 0 : 1,
1166 1166
         '#description' => bts('Request Intel GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1167
-      );
1167
+        );
1168 1168
     }
1169 1169
     if ($app_types->apple_gpu) {
1170
-      $form['resource']['no_apple_gpu'] = array(
1170
+        $form['resource']['no_apple_gpu'] = array(
1171 1171
         '#title' => bts('Use Apple GPU', array(), NULL, 'boinc:account-preferences-project'),
1172 1172
         '#type' => 'radios',
1173 1173
         '#options' => $form['boolean_options']['#value'],
1174 1174
         '#attributes' => array('class' => 'fancy'),
1175 1175
         '#default_value' => $default['no_apple_gpu'] ? 0 : 1,
1176 1176
         '#description' => bts('Request Apple GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1177
-      );
1177
+        );
1178
+    }
1178 1179
     }
1179
-  }
1180 1180
 
1181
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1181
+    if (variable_get('boinc_prefs_options_beta', FALSE)) {
1182 1182
     $form['beta'] = array(
1183
-      '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1184
-      '#type' => 'fieldset',
1185
-      '#description' => null,
1186
-      '#collapsible' => TRUE,
1187
-      '#collapsed' => FALSE
1183
+        '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1184
+        '#type' => 'fieldset',
1185
+        '#description' => null,
1186
+        '#collapsible' => TRUE,
1187
+        '#collapsed' => FALSE
1188 1188
     );
1189 1189
     $form['beta']['allow_beta_work'] = array(
1190
-      '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1191
-      '#type' => 'radios',
1192
-      '#options' => $form['boolean_options']['#value'],
1193
-      '#attributes' => array('class' => 'fancy'),
1194
-      '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
-      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1190
+        '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1191
+        '#type' => 'radios',
1192
+        '#options' => $form['boolean_options']['#value'],
1193
+        '#attributes' => array('class' => 'fancy'),
1194
+        '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
+        '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1196 1196
     );
1197
-  }
1197
+    }
1198 1198
 
1199
-  // Add project specific prefs to the form
1200
-  boincwork_add_project_specific_prefs($form, $prefs);
1199
+    // Add project specific prefs to the form
1200
+    boincwork_add_project_specific_prefs($form, $prefs);
1201 1201
 
1202
-  // Set whether to use this preference set by default for new computers
1203
-  $form['default_set'] = array(
1202
+    // Set whether to use this preference set by default for new computers
1203
+    $form['default_set'] = array(
1204 1204
     '#title' => bts('Default set', array(), NULL, 'boinc:account-preferences-project'),
1205 1205
     '#type' => 'fieldset',
1206 1206
     '#description' => null,
1207 1207
     '#collapsible' => TRUE,
1208 1208
     '#collapsed' => FALSE
1209
-  );
1210
-  $form['default_set']['default_venue'] = array(
1209
+    );
1210
+    $form['default_set']['default_venue'] = array(
1211 1211
     '#title' => bts('Set used for new computers', array(), NULL, 'boinc:account-preferences-project'),
1212 1212
     '#type' => 'radios',
1213 1213
     '#options' => $form['boolean_options']['#value'],
1214 1214
     '#attributes' => array('class' => 'fancy'),
1215 1215
     '#default_value' => $default['default_venue'] ? 1 : 0,
1216 1216
     '#description' => ''
1217
-  );
1217
+    );
1218 1218
 
1219
-  $form['prefs']['separator_bottom'] = array(
1219
+    $form['prefs']['separator_bottom'] = array(
1220 1220
     '#value' => '<div class="separator buttons"></div>'
1221
-  );
1221
+    );
1222 1222
 
1223
-  // Form control
1224
-  $form['prefs']['form control tabs prefix'] = array(
1223
+    // Form control
1224
+    $form['prefs']['form control tabs prefix'] = array(
1225 1225
     '#value' => '<ul class="form-control tab-list">'
1226
-  );
1227
-  $form['prefs']['submit'] = array(
1226
+    );
1227
+    $form['prefs']['submit'] = array(
1228 1228
     '#prefix' => '<li class="first tab">',
1229 1229
     '#type' => 'submit',
1230 1230
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1231 1231
     '#suffix' => '</li>'
1232
-  );
1233
-  $form['prefs']['form control tabs'] = array(
1232
+    );
1233
+    $form['prefs']['form control tabs'] = array(
1234 1234
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1235
-  );
1236
-  if ($venue AND $venue != 'generic') {
1235
+    );
1236
+    if ($venue AND $venue != 'generic') {
1237 1237
     global $base_path;
1238 1238
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
1239
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1239
+        l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1240 1240
         array(
1241
-          'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242
-          'attributes' => array(
1241
+            'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242
+            'attributes' => array(
1243 1243
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1244
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1245
-          )
1244
+                array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1245
+            )
1246 1246
         )
1247
-      ) . '</li>';
1248
-  }
1249
-  $form['prefs']['view control'] = array(
1250
-      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251
-  );
1252
-  $form['prefs']['form control tabs suffix'] = array(
1247
+        ) . '</li>';
1248
+    }
1249
+    $form['prefs']['view control'] = array(
1250
+        '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251
+    );
1252
+    $form['prefs']['form control tabs suffix'] = array(
1253 1253
     '#value' => '</ul>'
1254
-  );
1254
+    );
1255 1255
 
1256
-  return $form;
1256
+    return $form;
1257 1257
 }
1258 1258
 
1259 1259
 /**
1260 1260
  * Add project specific preferences to the project preferences form
1261 1261
  */
1262 1262
 function boincwork_add_project_specific_prefs(&$form, $prefs) {
1263
-  // Load project specific preferences from XML config
1264
-  $xml = boincwork_get_project_specific_config();
1263
+    // Load project specific preferences from XML config
1264
+    $xml = boincwork_get_project_specific_config();
1265 1265
 
1266
-  // Respect the order of the top level elements
1267
-  $ordered_array = array();
1268
-  $unordered_array = array();
1269
-  foreach ($xml['project_specific_preferences'] as $type => $element) {
1266
+    // Respect the order of the top level elements
1267
+    $ordered_array = array();
1268
+    $unordered_array = array();
1269
+    foreach ($xml['project_specific_preferences'] as $type => $element) {
1270 1270
     if (is_array($element) AND is_numeric(key($element))) {
1271
-      foreach ($element as $ordered_element) {
1271
+        foreach ($element as $ordered_element) {
1272 1272
         if (isset($ordered_element['@position'])) {
1273
-          $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
1273
+            $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
1274 1274
         }
1275 1275
         else {
1276
-          $unordered_array[] = array($type => $ordered_element);
1276
+            $unordered_array[] = array($type => $ordered_element);
1277
+        }
1277 1278
         }
1278
-      }
1279 1279
     }
1280 1280
     elseif (isset($element['@position'])) {
1281
-      $ordered_array[$element['@position']] = array($type => $element);
1281
+        $ordered_array[$element['@position']] = array($type => $element);
1282 1282
     }
1283 1283
     else {
1284
-      $unordered_array[] = array($type => $element);
1284
+        $unordered_array[] = array($type => $element);
1285 1285
     }
1286
-  }
1287
-  ksort($ordered_array);
1288
-  $primed_array = array_merge($ordered_array, $unordered_array);
1289
-  $xml = array('project_specific_preferences' => $primed_array);
1286
+    }
1287
+    ksort($ordered_array);
1288
+    $primed_array = array_merge($ordered_array, $unordered_array);
1289
+    $xml = array('project_specific_preferences' => $primed_array);
1290 1290
 
1291
-  foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1291
+    foreach ($xml['project_specific_preferences'] as $wrapped_element) {
1292 1292
     $type = key($wrapped_element);
1293 1293
     $element= reset($wrapped_element);
1294 1294
     boincwork_generate_prefs_element($form, $type, $element, $prefs['project_specific']);
1295
-  }
1295
+    }
1296 1296
 }
1297 1297
 
1298 1298
 /**
1299
-  * Validate the project preferences form.
1300
-  */
1299
+ * Validate the project preferences form.
1300
+ */
1301 1301
 function boincwork_projectprefs_form_validate($form, &$form_state) {
1302 1302
 
1303
-  // Verify all text user input values and notify form API of failures
1304
-  $validation_rules = array(
1303
+    // Verify all text user input values and notify form API of failures
1304
+    $validation_rules = array(
1305 1305
     'resource' => array(
1306
-      'resource_share' => array(
1306
+        'resource_share' => array(
1307 1307
         'datatype' => 'integer',
1308 1308
         'min' => 0
1309
-      ),
1309
+        ),
1310 1310
     ),
1311
-  );
1311
+    );
1312 1312
 
1313
-  // Add validation rules for project specific settings
1314
-  $validation_rules += boincwork_get_project_specific_config_validation_rules();
1313
+    // Add validation rules for project specific settings
1314
+    $validation_rules += boincwork_get_project_specific_config_validation_rules();
1315 1315
 
1316
-  // Perform validation
1317
-  boincwork_validate_form($validation_rules, $form_state['values']);
1316
+    // Perform validation
1317
+    boincwork_validate_form($validation_rules, $form_state['values']);
1318 1318
 
1319
-  // Check for app validation
1320
-  if (isset($validation_rules['apps'])) {
1319
+    // Check for app validation
1320
+    if (isset($validation_rules['apps'])) {
1321 1321
     if (isset($validation_rules['apps']['minimum selected'])
1322 1322
         AND $validation_rules['apps']['minimum selected'] > 0) {
1323
-      $apps_selected = 0;
1324
-      foreach ($validation_rules['apps']['list'] as $app) {
1323
+        $apps_selected = 0;
1324
+        foreach ($validation_rules['apps']['list'] as $app) {
1325 1325
         if ($form_state['values']['applications'][$app]) $apps_selected++;
1326
-      }
1327
-      if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1326
+        }
1327
+        if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1328 1328
         form_set_error(
1329
-          'applications',
1330
-          bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1329
+            'applications',
1330
+            bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1331 1331
         );
1332
-      }
1333
-      if ($apps_selected == count($validation_rules['apps']['list'])) {
1332
+        }
1333
+        if ($apps_selected == count($validation_rules['apps']['list'])) {
1334 1334
         foreach ($validation_rules['apps']['list'] as $app) {
1335
-          unset($form_state['values']['applications'][$app]);
1335
+            unset($form_state['values']['applications'][$app]);
1336 1336
         }
1337 1337
         $form_state['storage']['all apps selected'] = TRUE;
1338
-      }
1338
+        }
1339
+    }
1339 1340
     }
1340
-  }
1341 1341
 }
1342 1342
 
1343 1343
 /**
1344
-  * Handle post-validation submission of project preferences form.
1345
-  */
1344
+ * Handle post-validation submission of project preferences form.
1345
+ */
1346 1346
 function boincwork_projectprefs_form_submit($form, &$form_state) {
1347
-  global $user;
1348
-  global $site_name;
1347
+    global $user;
1348
+    global $site_name;
1349 1349
 
1350
-  require_boinc(array('app_types'));
1351
-  $app_types = get_app_types();
1350
+    require_boinc(array('app_types'));
1351
+    $app_types = get_app_types();
1352 1352
 
1353
-  $account = user_load($user->uid);
1354
-  $edit = $form_state['values'];
1355
-  $venue = $edit['venue'];
1353
+    $account = user_load($user->uid);
1354
+    $edit = $form_state['values'];
1355
+    $venue = $edit['venue'];
1356 1356
 
1357
-  // Load preferences from BOINC account
1358
-  $prefs = boincwork_load_prefs('project', $venue);
1357
+    // Load preferences from BOINC account
1358
+    $prefs = boincwork_load_prefs('project', $venue);
1359 1359
 
1360
-  // Resource preferences
1361
-  $prefs['resource_share'] = $edit['resource']['resource_share'];
1362
-  if ($app_types->count > 1) {
1360
+    // Resource preferences
1361
+    $prefs['resource_share'] = $edit['resource']['resource_share'];
1362
+    if ($app_types->count > 1) {
1363 1363
     if ($app_types->cpu) $prefs['no_cpu'] = ($edit['resource']['no_cpu']) ? 0 : 1;
1364 1364
     if ($app_types->cuda) $prefs['no_cuda'] = ($edit['resource']['no_cuda']) ? 0 : 1;
1365 1365
     if ($app_types->ati) $prefs['no_ati'] = ($edit['resource']['no_ati']) ? 0 : 1;
1366 1366
     if ($app_types->intel_gpu) $prefs['no_intel_gpu'] = ($edit['resource']['no_intel_gpu']) ? 0 : 1;
1367 1367
     if ($app_types->apple_gpu) $prefs['no_apple_gpu'] = ($edit['resource']['no_apple_gpu']) ? 0 : 1;
1368
-  }
1368
+    }
1369 1369
 
1370
-  // Beta preferences
1371
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1370
+    // Beta preferences
1371
+    if (variable_get('boinc_prefs_options_beta', FALSE)) {
1372 1372
     $prefs['allow_beta_work'] = ($edit['beta']['allow_beta_work']) ? 1 : 0;
1373
-  }
1373
+    }
1374 1374
 
1375
-  // Load project specific preferences from XML config
1376
-  $xml = boincwork_get_project_specific_config();
1377
-  $updated_prefs = array(
1375
+    // Load project specific preferences from XML config
1376
+    $xml = boincwork_get_project_specific_config();
1377
+    $updated_prefs = array(
1378 1378
     'project_specific' => boincwork_format_project_specific_prefs_data($edit)
1379
-  );
1380
-  $prefs = $updated_prefs + $prefs;
1379
+    );
1380
+    $prefs = $updated_prefs + $prefs;
1381 1381
 
1382
-  // Don't specify apps if all are selected
1383
-  if (isset($form_state['storage']['all apps selected'])) {
1382
+    // Don't specify apps if all are selected
1383
+    if (isset($form_state['storage']['all apps selected'])) {
1384 1384
     unset($prefs['project_specific']['app_id']);
1385 1385
     unset($form_state['storage']['all apps selected']);
1386
-  }
1386
+    }
1387 1387
 
1388
-  // If this is a new preference set, be sure to unset the "cleared" attribute
1389
-  if (isset($prefs['@attributes']['cleared'])) {
1388
+    // If this is a new preference set, be sure to unset the "cleared" attribute
1389
+    if (isset($prefs['@attributes']['cleared'])) {
1390 1390
     unset($prefs['@attributes']['cleared']);
1391
-  }
1391
+    }
1392 1392
 
1393
-  // Save preferences back to the BOINC account
1394
-  $result = boincwork_save_prefs($prefs, 'project', $venue);
1393
+    // Save preferences back to the BOINC account
1394
+    $result = boincwork_save_prefs($prefs, 'project', $venue);
1395 1395
 
1396
-  // Update the user's default preference set
1397
-  if ($edit['default_set']['default_venue']) {
1396
+    // Update the user's default preference set
1397
+    if ($edit['default_set']['default_venue']) {
1398 1398
     boincwork_set_default_venue($venue);
1399
-  }
1400
-  elseif ($venue == $account->boincuser_default_pref_set) {
1399
+    }
1400
+    elseif ($venue == $account->boincuser_default_pref_set) {
1401 1401
     // User has cleared out the default venue setting
1402 1402
     boincwork_set_default_venue();
1403
-  }
1403
+    }
1404 1404
 
1405
-  if (!$result) {
1405
+    if (!$result) {
1406 1406
     watchdog('boincwork', 'Error updating project prefs for user @id: @message', array('@id' => $user->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
1407 1407
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
1408
-  }
1409
-  elseif (!drupal_get_messages('status', FALSE)) {
1408
+    }
1409
+    elseif (!drupal_get_messages('status', FALSE)) {
1410 1410
     // Show this message if the set wasn't created automatically (in which case
1411 1411
     // there is a message tailored to that)
1412 1412
     drupal_set_message(t('Your preferences have been updated.
@@ -1414,53 +1414,53 @@  discard block
 block discarded – undo
1414 1414
         communicates with @project or you issue the "Update"
1415 1415
         command from the BOINC client.',
1416 1416
         array('@project' => $site_name)));
1417
-  }
1417
+    }
1418 1418
 }
1419 1419
 
1420 1420
 /**
1421 1421
  * The structure of the community preferences form
1422 1422
  */
1423 1423
 function communityprefs_form(&$form_state) {
1424
-  global $user;
1425
-  $account = user_load($user->uid);
1426
-  $form = array();
1427
-
1428
-  // Pull in some elements from the profile form
1429
-  $profile_form_state = array();
1430
-  $profile = new stdClass();
1431
-  $profile->type = 'profile';
1432
-  $profile->language = '';
1433
-  if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1424
+    global $user;
1425
+    $account = user_load($user->uid);
1426
+    $form = array();
1427
+
1428
+    // Pull in some elements from the profile form
1429
+    $profile_form_state = array();
1430
+    $profile = new stdClass();
1431
+    $profile->type = 'profile';
1432
+    $profile->language = '';
1433
+    if ($profile_nid = content_profile_profile_exists($profile, $account->uid)) {
1434 1434
     $profile_node = node_load($profile_nid);
1435 1435
     $form_state['storage']['profile_node'] = $profile_node;
1436 1436
     module_load_include('inc', 'node', 'node.pages');
1437 1437
     $profile_form = drupal_retrieve_form('profile_node_form', $profile_form_state, $profile_node);
1438 1438
     drupal_prepare_form('profile_node_form', $profile_form, $profile_form_state);
1439
-  }
1439
+    }
1440 1440
 
1441
-  // Standard option sets
1442
-  $form['boolean_options'] = array(
1441
+    // Standard option sets
1442
+    $form['boolean_options'] = array(
1443 1443
     '#type' => 'value',
1444 1444
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1445
-  );
1445
+    );
1446 1446
 
1447
-  $default = array(
1447
+    $default = array(
1448 1448
     'pm_send_notification' => '', // This is set already in pm_email_notify_user
1449 1449
     'friend_notification' => isset($account->friend_notification) ? $account->friend_notification : 0,
1450 1450
     'comments_per_page' => (isset($account->comments_per_page) AND $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451 1451
     'comments_order' => (isset($account->sort) AND $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1452
-  );
1452
+    );
1453 1453
 
1454
-  // General options
1455
-  $form['general'] = array(
1454
+    // General options
1455
+    $form['general'] = array(
1456 1456
     '#type' => 'fieldset',
1457 1457
     '#title' => bts('General settings', array(), NULL, 'boinc:account-preferences-community'),
1458 1458
     '#weight' => 0,
1459 1459
     '#collapsible' => TRUE,
1460 1460
     '#collapsed' => FALSE
1461
-  );
1462
-  // Add the BOINC user name (non-unique, user editable)
1463
-  $form['general']['boincuser_name'] = array(
1461
+    );
1462
+    // Add the BOINC user name (non-unique, user editable)
1463
+    $form['general']['boincuser_name'] = array(
1464 1464
     '#type' => 'textfield',
1465 1465
     '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1466 1466
     '#default_value' => $account->boincuser_name,
@@ -1468,252 +1468,252 @@  discard block
 block discarded – undo
1468 1468
     '#required' => TRUE,
1469 1469
     '#description' => '',
1470 1470
     '#size' => 40
1471
-  );
1472
-  // Time zone
1473
-  if (variable_get('configurable_timezones', 1)) {
1471
+    );
1472
+    // Time zone
1473
+    if (variable_get('configurable_timezones', 1)) {
1474 1474
     $zones = _system_zonelist();
1475 1475
     $form['general']['timezone'] = array(
1476
-      '#type' => 'select',
1477
-      '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
-      '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1479
-      '#options' => $zones,
1480
-      '#description' => '',
1476
+        '#type' => 'select',
1477
+        '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
+        '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1479
+        '#options' => $zones,
1480
+        '#description' => '',
1481 1481
     );
1482
-  }
1482
+    }
1483 1483
 
1484
-  // Notification options
1485
-  $form['notifications'] = array(
1484
+    // Notification options
1485
+    $form['notifications'] = array(
1486 1486
     '#type' => 'fieldset',
1487 1487
     '#title' => bts('Notification settings', array(), NULL, 'boinc:account-preferences-community'),
1488 1488
     '#weight' => 5,
1489 1489
     '#collapsible' => TRUE,
1490 1490
     '#collapsed' => FALSE
1491
-  );
1492
-  // Pull in private message notification handling and tweak the form
1493
-  $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
1494
-  $form['notifications']['pm_send_notifications'] = array_replace(
1491
+    );
1492
+    // Pull in private message notification handling and tweak the form
1493
+    $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
1494
+    $form['notifications']['pm_send_notifications'] = array_replace(
1495 1495
     $pm_notify['enable_pm_mail']['pm_send_notifications'],
1496 1496
     array(
1497
-      '#type' => 'radios',
1498
-      '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1499
-      '#description' => ' ',
1500
-      '#options' => $form['boolean_options']['#value'],
1501
-      '#attributes' => array('class' => 'fancy')
1497
+        '#type' => 'radios',
1498
+        '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1499
+        '#description' => ' ',
1500
+        '#options' => $form['boolean_options']['#value'],
1501
+        '#attributes' => array('class' => 'fancy')
1502 1502
     )
1503
-  );
1504
-  $form['notifications']['friend_notification'] = array(
1503
+    );
1504
+    $form['notifications']['friend_notification'] = array(
1505 1505
     '#type' => 'radios',
1506 1506
     '#title' => bts('Receive email notification for friend requests?', array(), NULL, 'boinc:account-preferences-community'),
1507 1507
     '#description' => ' ',
1508 1508
     '#options' => array(0 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1509 1509
     '#attributes' => array('class' => 'fancy'),
1510 1510
     '#default_value' => $default['friend_notification']
1511
-  );
1511
+    );
1512 1512
 
1513
-  // Internationalization options
1514
-  if (module_exists('internationalization')) {
1513
+    // Internationalization options
1514
+    if (module_exists('internationalization')) {
1515 1515
     $languages = language_list('enabled');
1516 1516
     $languages = $languages[1];
1517 1517
     $names = array();
1518 1518
     foreach ($languages as $langcode => $item) {
1519
-      $name = t($item->name);
1520
-      $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1519
+        $name = t($item->name);
1520
+        $names[check_plain($langcode)] = check_plain($name . ($item->native != $name ? ' ('. $item->native .')' : ''));
1521 1521
     }
1522 1522
     $form['locale'] = array(
1523
-      '#type' => 'fieldset',
1524
-      '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1525
-      '#weight' => 10,
1526
-      '#collapsible' => TRUE,
1527
-      '#collapsed' => FALSE,
1523
+        '#type' => 'fieldset',
1524
+        '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1525
+        '#weight' => 10,
1526
+        '#collapsible' => TRUE,
1527
+        '#collapsed' => FALSE,
1528 1528
     );
1529 1529
 
1530 1530
     // Get language negotiation settings.
1531 1531
     $mode = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
1532 1532
     $user_preferred_language = user_preferred_language($account);
1533 1533
     $form['locale']['language'] = array(
1534
-      '#type' => 'select',
1535
-      '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1536
-      '#default_value' => check_plain($user_preferred_language->language),
1537
-      '#options' => $names,
1538
-      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1534
+        '#type' => 'select',
1535
+        '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1536
+        '#default_value' => check_plain($user_preferred_language->language),
1537
+        '#options' => $names,
1538
+        '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1539 1539
     );
1540
-  }
1540
+    }
1541 1541
 
1542
-  // Avatar options
1543
-  $form['gravatar'] = array(
1542
+    // Avatar options
1543
+    $form['gravatar'] = array(
1544 1544
     '#type' => 'item',
1545 1545
     '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1546 1546
     '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), NULL, 'boinc:account-preferences-community'),
1547
-  );
1548
-  if (user_access('disable own gravatar', $account)) {
1547
+    );
1548
+    if (user_access('disable own gravatar', $account)) {
1549 1549
     $form['gravatar'] = array(
1550
-      '#type' => 'checkbox',
1551
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
-      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1553
-      '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554
-      '#disabled' => !empty($account->picture),
1555
-    );
1556
-  }
1557
-  $form['gravatar']['#weight'] = 15;
1558
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1559
-  // Upload an avatar (pulled from profile_node_form):
1560
-  if (!empty($profile_form['field_image'])) {
1550
+        '#type' => 'checkbox',
1551
+        '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
+        '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1553
+        '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554
+        '#disabled' => !empty($account->picture),
1555
+    );
1556
+    }
1557
+    $form['gravatar']['#weight'] = 15;
1558
+    $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1559
+    // Upload an avatar (pulled from profile_node_form):
1560
+    if (!empty($profile_form['field_image'])) {
1561 1561
     $form['field_image'] = $profile_form['field_image'];
1562
-  }
1563
-  else {
1562
+    }
1563
+    else {
1564 1564
     $form['field_image'] = array(
1565
-      '#value' => '<div class="form-item">'
1565
+        '#value' => '<div class="form-item">'
1566 1566
         . '<label class="placeholder">'
1567 1567
         . bts('This is not available until your profile is set up.', array(), NULL, 'boinc:account-preferences-community')
1568 1568
         . '</label>'
1569 1569
         . l(bts('Create a profile', array(), NULL, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1570 1570
         . '</div>',
1571 1571
     );
1572
-  }
1573
-  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1574
-  $form['field_image']['#weight'] = 20;
1575
-  $form['field_image']['#suffix'] = '</fieldset>';
1572
+    }
1573
+    $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1574
+    $form['field_image']['#weight'] = 20;
1575
+    $form['field_image']['#suffix'] = '</fieldset>';
1576 1576
 
1577
-  // Forum options
1578
-  $form['forums'] = array(
1577
+    // Forum options
1578
+    $form['forums'] = array(
1579 1579
     '#type' => 'fieldset',
1580 1580
     '#title' => bts('Forum settings', array(), NULL, 'boinc:account-preferences-community'),
1581 1581
     '#weight' => 25,
1582 1582
     '#collapsible' => TRUE,
1583 1583
     '#collapsed' => FALSE
1584
-  );
1585
-  $form['forums']['comments_per_page'] = array(
1584
+    );
1585
+    $form['forums']['comments_per_page'] = array(
1586 1586
     '#type' => 'select',
1587 1587
     '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), NULL, 'boinc:account-preferences-community'),
1588 1588
     '#options' => array(10 => 10, 20 => 20, 30 => 30, 50 => 50, 100 => 100),
1589 1589
     '#default_value' => $default['comments_per_page']
1590
-  );
1591
-  // Can't have a typical Drupal form suffix on a select box?
1592
-  $form['forums']['comments_per_page_suffix'] = array(
1590
+    );
1591
+    // Can't have a typical Drupal form suffix on a select box?
1592
+    $form['forums']['comments_per_page_suffix'] = array(
1593 1593
     '#value' => '<span>' . bts('comments per page', array(), NULL, 'boinc:account-preferences-community') . '</span>'
1594
-  );
1595
-  $form['forums']['comments_order'] = array(
1594
+    );
1595
+    $form['forums']['comments_order'] = array(
1596 1596
     '#type' => 'select',
1597 1597
     '#title' => bts('Sort comments in discussions', array(), NULL, 'boinc:account-preferences-community'),
1598 1598
     '#options' => array(1 => bts('Newest post first', array(), NULL, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), NULL, 'boinc:account-preferences-community')),
1599 1599
     '#default_value' => $default['comments_order']
1600
-  );
1601
-  // Signature (pulled from user_edit_form):
1602
-  if (variable_get('user_signatures', 0) && module_exists('comment')) {
1600
+    );
1601
+    // Signature (pulled from user_edit_form):
1602
+    if (variable_get('user_signatures', 0) && module_exists('comment')) {
1603 1603
     $form['forums']['signature'] = array(
1604
-      '#type' => 'textarea',
1605
-      '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
-      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1607
-      '#default_value' => $account->signature
1608
-      );
1604
+        '#type' => 'textarea',
1605
+        '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
+        '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1607
+        '#default_value' => $account->signature
1608
+        );
1609 1609
     // Prevent a "validation error" message when the user attempts to save with a default value they
1610 1610
     // do not have access to.
1611 1611
     if (!filter_access($account->signature_format) && empty($_POST)) {
1612
-      drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613
-      $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1612
+        drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613
+        $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1614 1614
     }
1615 1615
     $form['forums']['signature_format'] = filter_form($account->signature_format, NULL, array('signature_format'));
1616 1616
     // Optionally hide signatures from comments
1617 1617
     $form['forums']['hide_signatures'] = array(
1618
-      '#type' => 'radios',
1619
-      '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1620
-      '#description' => ' ',
1621
-      '#options' => $form['boolean_options']['#value'],
1622
-      '#attributes' => array('class' => 'fancy'),
1623
-      '#default_value' => isset($account->hide_signatures) ? $account->hide_signatures : 0,
1618
+        '#type' => 'radios',
1619
+        '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1620
+        '#description' => ' ',
1621
+        '#options' => $form['boolean_options']['#value'],
1622
+        '#attributes' => array('class' => 'fancy'),
1623
+        '#default_value' => isset($account->hide_signatures) ? $account->hide_signatures : 0,
1624 1624
     );
1625
-  }
1625
+    }
1626 1626
 
1627
-  //Bottom separator
1628
-  $form['separator_bottom'] = array(
1627
+    //Bottom separator
1628
+    $form['separator_bottom'] = array(
1629 1629
     '#value' => '<div class="separator buttons"></div>',
1630 1630
     '#weight' => 999,
1631
-  );
1631
+    );
1632 1632
 
1633
-  // Form control
1634
-  $form['form control tabs prefix'] = array(
1633
+    // Form control
1634
+    $form['form control tabs prefix'] = array(
1635 1635
     '#value' => '<ul class="form-control tab-list">',
1636 1636
     '#weight' => 1001,
1637
-  );
1638
-  $form['submit'] = array(
1637
+    );
1638
+    $form['submit'] = array(
1639 1639
     '#prefix' => '<li class="first tab">',
1640 1640
     '#type' => 'submit',
1641 1641
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1642 1642
     '#suffix' => '</li>',
1643 1643
     '#weight' => 1002,
1644
-  );
1645
-  $form['form control tabs'] = array(
1644
+    );
1645
+    $form['form control tabs'] = array(
1646 1646
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1647 1647
     '#weight' => 1003,
1648
-  );
1649
-  $form['form control tabs suffix'] = array(
1648
+    );
1649
+    $form['form control tabs suffix'] = array(
1650 1650
     '#value' => '</ul>',
1651 1651
     '#weight' => 1004,
1652
-  );
1653
-  return $form;
1652
+    );
1653
+    return $form;
1654 1654
 }
1655 1655
 
1656 1656
 /**
1657
-  * Handle validation submission of community preferences form.
1658
-  */
1657
+ * Handle validation submission of community preferences form.
1658
+ */
1659 1659
 function communityprefs_form_validate($form, &$form_state) {
1660
-  // require_boinc();
1661
-  global $user;
1662
-  $account = user_load($user->uid);
1663
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1664
-  $edit = $form_state['values'];
1660
+    // require_boinc();
1661
+    global $user;
1662
+    $account = user_load($user->uid);
1663
+    $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1664
+    $edit = $form_state['values'];
1665 1665
 
1666
-  if ($edit['boincuser_name'] != $boinc_user->name) {
1666
+    if ($edit['boincuser_name'] != $boinc_user->name) {
1667 1667
     $blacklist1 = preg_split('/\r\n|\r|\n/', variable_get('boinc_weboptions_blacklisted_usernames', "admin\nadministrator\nmoderator"));
1668 1668
     $blacklist2 = array();
1669 1669
     if (is_array($blacklist1)) {
1670
-      $blacklist2 = array_map('strtolower', $blacklist1);
1670
+        $blacklist2 = array_map('strtolower', $blacklist1);
1671 1671
     }
1672 1672
     if (in_array(strtolower($edit['boincuser_name']), $blacklist2)) {
1673
-      form_set_error('boincuser_name',
1673
+        form_set_error('boincuser_name',
1674 1674
         bts('You may not use username @blname, as that name is not allowed. Please choose another name.',
1675 1675
             array('@blname' => $edit['boincuser_name']),
1676 1676
             NULL, 'boinc:account-preferences-community'));
1677
-      return false;
1677
+        return false;
1678
+    }
1678 1679
     }
1679
-  }
1680 1680
 
1681
-  return true;
1681
+    return true;
1682 1682
 }
1683 1683
 
1684 1684
 /**
1685
-  * Handle post-validation submission of community preferences form.
1686
-  */
1685
+ * Handle post-validation submission of community preferences form.
1686
+ */
1687 1687
 function communityprefs_form_submit($form, &$form_state) {
1688
-  require_boinc('boinc_db');
1689
-  global $user;
1690
-  $account = user_load($user->uid);
1691
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1692
-  $edit = $form_state['values'];
1693
-  $profile_node = $form_state['storage']['profile_node'];
1694
-
1695
-  // Display name
1696
-  if ($edit['boincuser_name'] != $boinc_user->name) {
1688
+    require_boinc('boinc_db');
1689
+    global $user;
1690
+    $account = user_load($user->uid);
1691
+    $boinc_user = BoincUser::lookup_id($account->boincuser_id);
1692
+    $edit = $form_state['values'];
1693
+    $profile_node = $form_state['storage']['profile_node'];
1694
+
1695
+    // Display name
1696
+    if ($edit['boincuser_name'] != $boinc_user->name) {
1697 1697
     $boincuser_name = $edit['boincuser_name'];
1698 1698
     $result = $boinc_user->update(
1699 1699
         "name='{$boincuser_name}'"
1700 1700
     );
1701
-  }
1701
+    }
1702 1702
 
1703
-  // Private message settings
1704
-  pm_email_notify_user('submit', $edit, $user);
1703
+    // Private message settings
1704
+    pm_email_notify_user('submit', $edit, $user);
1705 1705
 
1706
-  // Avatar settings - only set if profile_node exists.
1707
-  if ($profile_node) {
1706
+    // Avatar settings - only set if profile_node exists.
1707
+    if ($profile_node) {
1708 1708
     if (!$edit['field_image']) $edit['field_image'] = array();
1709 1709
     $profile_node->field_image = $edit['field_image'];
1710 1710
     node_save($profile_node);
1711 1711
     // Flush this from the node cache or changes won't show up immediately!
1712 1712
     $profile_node = node_load($profile_node->nid, NULL, TRUE);
1713
-  }
1713
+    }
1714 1714
 
1715
-  // All other settings
1716
-  $settings = array(
1715
+    // All other settings
1716
+    $settings = array(
1717 1717
     'signature' => $edit['signature'],
1718 1718
     'signature_format' => $edit['signature_format'],
1719 1719
     'timezone' => $edit['timezone'],
@@ -1722,197 +1722,197 @@  discard block
 block discarded – undo
1722 1722
     'hide_signatures' => $edit['hide_signatures'],
1723 1723
     'sort' => $edit['comments_order'],
1724 1724
     'gravatar' => $edit['gravatar'],
1725
-  );
1726
-  if (module_exists('internationalization')) {
1725
+    );
1726
+    if (module_exists('internationalization')) {
1727 1727
     $settings['language'] = $edit['language'];
1728 1728
     global $language;
1729 1729
     if ($user->language != $edit['language']) {
1730
-      global $base_url;
1731
-      if ($edit['language'] != language_default('language')) {
1730
+        global $base_url;
1731
+        if ($edit['language'] != language_default('language')) {
1732 1732
         $form_state['redirect'] = $base_url . '/' . $edit['language'] . '/' . $_GET['q'];
1733
-      }
1734
-      else {
1733
+        }
1734
+        else {
1735 1735
         $form_state['redirect'] = $base_url . '/' . $_GET['q'];
1736
-      }
1736
+        }
1737
+    }
1737 1738
     }
1738
-  }
1739
-  user_save($user, $settings);
1739
+    user_save($user, $settings);
1740 1740
 
1741
-  drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1741
+    drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1742 1742
 
1743
-  // Form will not redirect if storage is set; not good if language changes
1744
-  unset($form_state['storage']);
1743
+    // Form will not redirect if storage is set; not good if language changes
1744
+    unset($form_state['storage']);
1745 1745
 }
1746 1746
 
1747 1747
 /**
1748 1748
  * The structure of the privacy preferences form
1749 1749
  */
1750 1750
 function boincwork_privacyprefs_form(&$form_state) {
1751
-  require_boinc(array('user', 'prefs', 'util', 'consent'));
1751
+    require_boinc(array('user', 'prefs', 'util', 'consent'));
1752 1752
 
1753
-  global $user;
1754
-  $account = user_load($user->uid);
1755
-  $boincuser = BoincUser::lookup_id($account->boincuser_id);
1753
+    global $user;
1754
+    $account = user_load($user->uid);
1755
+    $boincuser = BoincUser::lookup_id($account->boincuser_id);
1756 1756
 
1757
-  // Load preferences from BOINC account
1758
-  $prefs = boincwork_load_prefs('project');
1757
+    // Load preferences from BOINC account
1758
+    $prefs = boincwork_load_prefs('project');
1759 1759
 
1760
-  //if (!$prefs AND !$initialize_if_empty) return null;
1760
+    //if (!$prefs AND !$initialize_if_empty) return null;
1761 1761
 
1762
-  $privacy_consent_types = boincwork_load_privacyconsenttypes();
1762
+    $privacy_consent_types = boincwork_load_privacyconsenttypes();
1763 1763
 
1764
-  // Define form defaults
1765
-  $default = array(
1764
+    // Define form defaults
1765
+    $default = array(
1766 1766
     'privacy' => array(
1767
-      'send_email' => ($boincuser->send_email) ? 1 : 0,
1768
-      'show_hosts' => ($boincuser->show_hosts) ? 1 : 0
1767
+        'send_email' => ($boincuser->send_email) ? 1 : 0,
1768
+        'show_hosts' => ($boincuser->show_hosts) ? 1 : 0
1769 1769
     )
1770
-  );
1770
+    );
1771 1771
 
1772
-  // Standard option sets
1773
-  $form['boolean_options'] = array(
1772
+    // Standard option sets
1773
+    $form['boolean_options'] = array(
1774 1774
     '#type' => 'value',
1775 1775
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1776
-  );
1776
+    );
1777 1777
 
1778
-  $form['privacy'] = array(
1778
+    $form['privacy'] = array(
1779 1779
     '#title' => bts('Privacy settings', array(), NULL, 'boinc:account-preferences-privacy'),
1780 1780
     '#type' => 'fieldset',
1781 1781
     '#description' => null,
1782 1782
     '#collapsible' => TRUE,
1783 1783
     '#collapsed' => FALSE
1784
-  );
1785
-  $form['privacy']['send_email'] = array(
1784
+    );
1785
+    $form['privacy']['send_email'] = array(
1786 1786
     '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1787 1787
     '#type' => 'radios',
1788 1788
     '#options' => $form['boolean_options']['#value'],
1789 1789
     '#attributes' => array('class' => 'fancy'),
1790 1790
     '#default_value' => $default['privacy']['send_email']
1791
-  );
1792
-  $form['privacy']['show_hosts'] = array(
1791
+    );
1792
+    $form['privacy']['show_hosts'] = array(
1793 1793
     '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1794 1794
     '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), NULL, 'boinc:account-preferences-privacy'),
1795 1795
     '#type' => 'radios',
1796 1796
     '#options' => $form['boolean_options']['#value'],
1797 1797
     '#attributes' => array('class' => 'fancy'),
1798 1798
     '#default_value' => $default['privacy']['show_hosts']
1799
-  );
1799
+    );
1800 1800
 
1801
-  // Loop over privacy consent types and create form question for each
1802
-  // option that deals with privacy.
1803
-  foreach ($privacy_consent_types as $ct) {
1801
+    // Loop over privacy consent types and create form question for each
1802
+    // option that deals with privacy.
1803
+    foreach ($privacy_consent_types as $ct) {
1804 1804
 
1805 1805
     $currstate = (check_user_consent($boincuser, $ct['shortname'])) ? 1 : 0 ;
1806 1806
     // Set name to 'privacyconsent_SHORTNAME', which can be parsed
1807 1807
     // later in the submit function.
1808 1808
     $form['privacy']['privacyconsent_'.$ct['shortname']] = array(
1809
-      '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1810
-      '#type' => 'radios',
1811
-      '#options' => $form['boolean_options']['#value'],
1812
-      '#attributes' => array('class' => 'fancy'),
1813
-      '#default_value' => $currstate,
1809
+        '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1810
+        '#type' => 'radios',
1811
+        '#options' => $form['boolean_options']['#value'],
1812
+        '#attributes' => array('class' => 'fancy'),
1813
+        '#default_value' => $currstate,
1814 1814
     );
1815 1815
 
1816 1816
     // Add a description with link to the question 'Do you consent to
1817 1817
     // exporting your data...'.
1818 1818
     $mypatt = '/Do you consent to exporting your data/';
1819 1819
     if (preg_match($mypatt, $ct['description']) ) {
1820
-      $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821
-      array(
1820
+        $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821
+        array(
1822 1822
         '!privacy_policy_link' => l(
1823
-          bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1824
-          '/privacy'
1823
+            bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1824
+            '/privacy'
1825 1825
         )
1826
-      ),
1827
-      NULL, 'boinc:account-preferences-privacy');
1826
+        ),
1827
+        NULL, 'boinc:account-preferences-privacy');
1828
+    }
1828 1829
     }
1829
-  }
1830 1830
 
1831
-  // Ignore and block users
1832
-  if (module_exists('ignore_user')) {
1831
+    // Ignore and block users
1832
+    if (module_exists('ignore_user')) {
1833 1833
     $form['ignoreblock'] = array(
1834
-      '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1835
-      '#type' => 'fieldset',
1836
-      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
-      '#collapsible' => TRUE,
1838
-      '#collapsed' => FALSE
1834
+        '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1835
+        '#type' => 'fieldset',
1836
+        '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
+        '#collapsible' => TRUE,
1838
+        '#collapsed' => FALSE
1839 1839
     );
1840 1840
 
1841 1841
     // Table for ignored users
1842 1842
     $form['ignoreblock']['current_ignore_section'] = array(
1843
-      '#type' => 'item',
1844
-      '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1845
-      '#prefix' => '<h4>',
1846
-      '#suffix' => '</h4>',
1847
-      '#weight' => -20,
1843
+        '#type' => 'item',
1844
+        '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1845
+        '#prefix' => '<h4>',
1846
+        '#suffix' => '</h4>',
1847
+        '#weight' => -20,
1848 1848
     );
1849 1849
 
1850 1850
     $ignored_users = _ignore_user_ignored_users();
1851 1851
     foreach ($ignored_users as $ignored_user) {
1852
-      $form['ignoreblock']['username'][$ignored_user['iuid']] = array(
1852
+        $form['ignoreblock']['username'][$ignored_user['iuid']] = array(
1853 1853
         '#value' => $ignored_user['username'],
1854
-      );
1855
-      $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1854
+        );
1855
+        $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1856 1856
         '#value' => l(
1857
-          bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1858
-          'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859
-          array()
1857
+            bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1858
+            'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859
+            array()
1860 1860
         ),
1861
-      );
1861
+        );
1862 1862
     }
1863 1863
     $form['ignoreblock']['pager'] = array('#value' => theme('pager', NULL, 10, 0));
1864 1864
 
1865 1865
     // Sub-form to add user to ignore list
1866 1866
     $form['ignoreblock']['add_ignore_user_section'] = array(
1867
-      '#type' => 'item',
1868
-      '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1869
-      '#prefix' => '<h4>',
1870
-      '#suffix' => '</h4>',
1871
-      '#weight' => 10,
1867
+        '#type' => 'item',
1868
+        '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1869
+        '#prefix' => '<h4>',
1870
+        '#suffix' => '</h4>',
1871
+        '#weight' => 10,
1872 1872
     );
1873 1873
 
1874 1874
     $form['ignoreblock']['addusername_toignorelist'] = array(
1875
-      '#type' => 'textfield',
1876
-      '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
-      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1878
-      '#weight' => 11,
1879
-      '#size' => 50,
1880
-      '#autocomplete_path' => 'boincuser/autocomplete',
1875
+        '#type' => 'textfield',
1876
+        '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
+        '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1878
+        '#weight' => 11,
1879
+        '#size' => 50,
1880
+        '#autocomplete_path' => 'boincuser/autocomplete',
1881 1881
     );
1882 1882
 
1883 1883
     $form['ignoreblock']['addusername_submit'] = array(
1884
-      '#type' => 'submit',
1885
-      '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1886
-      '#submit' => array('_boincwork_ignore_list_form_submit'),
1887
-      '#weight' => 12,
1888
-      '#attributes' => array('class' => 'add_ignore_user'),
1884
+        '#type' => 'submit',
1885
+        '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1886
+        '#submit' => array('_boincwork_ignore_list_form_submit'),
1887
+        '#weight' => 12,
1888
+        '#attributes' => array('class' => 'add_ignore_user'),
1889 1889
     );
1890
-  }// endif module_exists
1890
+    }// endif module_exists
1891 1891
 
1892
-  $form['prefs']['separator_bottom'] = array(
1892
+    $form['prefs']['separator_bottom'] = array(
1893 1893
     '#value' => '<div class="separator buttons"></div>'
1894
-  );
1894
+    );
1895 1895
 
1896
-  // Form control
1897
-  $form['prefs']['form control tabs prefix'] = array(
1896
+    // Form control
1897
+    $form['prefs']['form control tabs prefix'] = array(
1898 1898
     '#value' => '<ul class="form-control tab-list">'
1899
-  );
1900
-  $form['prefs']['submit'] = array(
1899
+    );
1900
+    $form['prefs']['submit'] = array(
1901 1901
     '#prefix' => '<li class="first tab">',
1902 1902
     '#type' => 'submit',
1903 1903
     '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1904 1904
     '#validate' => array('boincwork_privacyprefs_form_validate'),
1905 1905
     '#submit' => array('boincwork_privacyprefs_form_submit'),
1906 1906
     '#suffix' => '</li>'
1907
-  );
1908
-  $form['prefs']['form control tabs'] = array(
1907
+    );
1908
+    $form['prefs']['form control tabs'] = array(
1909 1909
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1910
-  );
1911
-  $form['prefs']['form control tabs suffix'] = array(
1910
+    );
1911
+    $form['prefs']['form control tabs suffix'] = array(
1912 1912
     '#value' => '</ul>'
1913
-  );
1913
+    );
1914 1914
 
1915
-  return $form;
1915
+    return $form;
1916 1916
 }
1917 1917
 
1918 1918
 /**
@@ -1920,93 +1920,93 @@  discard block
 block discarded – undo
1920 1920
  */
1921 1921
 function theme_boincwork_privacyprefs_form($form) {
1922 1922
 
1923
-  $output = '';
1924
-  $output .= drupal_render($form['privacy']);
1923
+    $output = '';
1924
+    $output .= drupal_render($form['privacy']);
1925 1925
 
1926
-  $header = array(
1926
+    $header = array(
1927 1927
     bts('Username', array(), NULL, 'boinc:ignore-user-list'),
1928 1928
     bts('Operations', array(), NULL, 'boinc:ignore-user-list')
1929
-  );
1929
+    );
1930 1930
 
1931
-  $rows = array();
1932
-  if (isset($form['ignoreblock']['username']) && is_array($form['ignoreblock']['username'])) {
1931
+    $rows = array();
1932
+    if (isset($form['ignoreblock']['username']) && is_array($form['ignoreblock']['username'])) {
1933 1933
     foreach (element_children($form['ignoreblock']['username']) as $key) {
1934
-      $row = array();
1935
-      $row[] = drupal_render($form['ignoreblock']['username'][$key]);
1936
-      $row[] = drupal_render($form['ignoreblock']['delete'][$key]);
1937
-      $rows[] = $row;
1934
+        $row = array();
1935
+        $row[] = drupal_render($form['ignoreblock']['username'][$key]);
1936
+        $row[] = drupal_render($form['ignoreblock']['delete'][$key]);
1937
+        $rows[] = $row;
1938 1938
     }
1939
-  }
1940
-  else {
1939
+    }
1940
+    else {
1941 1941
     $rows[] = array(
1942
-      array(
1942
+        array(
1943 1943
         'data' => bts('You have not added any users to your Ignore List.', array(), NULL, 'boinc:ignore-user-list'),
1944 1944
         'colspan' => '2',
1945
-      )
1945
+        )
1946 1946
     );
1947
-  }
1947
+    }
1948 1948
 
1949
-  $attr = array('class' => 'ignore_user');
1950
-  $form['ignoreblock']['current_list']['ignored_users']['#value'] = theme('table', $header, $rows, $attr);
1951
-  $output .= drupal_render($form['current_list']);
1949
+    $attr = array('class' => 'ignore_user');
1950
+    $form['ignoreblock']['current_list']['ignored_users']['#value'] = theme('table', $header, $rows, $attr);
1951
+    $output .= drupal_render($form['current_list']);
1952 1952
 
1953
-  if ($form['pager']['#value']) {
1953
+    if ($form['pager']['#value']) {
1954 1954
     $output .= drupal_render($form['pager']);
1955
-  }
1955
+    }
1956 1956
 
1957
-  $output .= drupal_render($form);
1957
+    $output .= drupal_render($form);
1958 1958
 
1959
-  return $output;
1959
+    return $output;
1960 1960
 }
1961 1961
 
1962 1962
 /**
1963
-  * Validate the privacy preferences form.
1964
-  */
1963
+ * Validate the privacy preferences form.
1964
+ */
1965 1965
 function boincwork_privacyprefs_form_validate($form, &$form_state) {
1966
-  require_boinc('util');
1966
+    require_boinc('util');
1967 1967
 
1968
-  // Verify all non-boolean user input values and notify form API of failures
1969
-  // ... currently there are no non-boolean values!
1968
+    // Verify all non-boolean user input values and notify form API of failures
1969
+    // ... currently there are no non-boolean values!
1970 1970
 }
1971 1971
 
1972 1972
 /**
1973
-  * Handle post-validation submission of privacy preferences form.
1974
-  */
1973
+ * Handle post-validation submission of privacy preferences form.
1974
+ */
1975 1975
 function boincwork_privacyprefs_form_submit($form, &$form_state) {
1976
-  require_boinc(array('user', 'prefs', 'consent'));
1976
+    require_boinc(array('user', 'prefs', 'consent'));
1977 1977
 
1978
-  global $user;
1979
-  $account = user_load($user->uid);
1978
+    global $user;
1979
+    $account = user_load($user->uid);
1980 1980
 
1981
-  // Load BOINC account
1982
-  $boincuser = BoincUser::lookup_id($account->boincuser_id);
1981
+    // Load BOINC account
1982
+    $boincuser = BoincUser::lookup_id($account->boincuser_id);
1983 1983
 
1984
-  // Privacy preferences
1985
-  $boincuser->send_email = ($form_state['values']['send_email']) ? true : false;
1986
-  $boincuser->show_hosts = ($form_state['values']['show_hosts']) ? true : false;
1984
+    // Privacy preferences
1985
+    $boincuser->send_email = ($form_state['values']['send_email']) ? true : false;
1986
+    $boincuser->show_hosts = ($form_state['values']['show_hosts']) ? true : false;
1987 1987
 
1988
-  // Privacy consent options, extract the 'privacyconsent_SHORTNAME'
1989
-  // from values array, and loop over them; each is checked with
1990
-  // check_consent_type(). Also check the current state of the option
1991
-  // in the database. If the form value is a new state, then set it.
1992
-  $result = preg_grep("/^privacyconsent/", array_keys($form_state['values']));
1993
-  $privacyconsent_prefs = array_intersect_key($form_state['values'], array_flip($result));
1994
-  foreach ($privacyconsent_prefs as $name => $newstate) {
1988
+    // Privacy consent options, extract the 'privacyconsent_SHORTNAME'
1989
+    // from values array, and loop over them; each is checked with
1990
+    // check_consent_type(). Also check the current state of the option
1991
+    // in the database. If the form value is a new state, then set it.
1992
+    $result = preg_grep("/^privacyconsent/", array_keys($form_state['values']));
1993
+    $privacyconsent_prefs = array_intersect_key($form_state['values'], array_flip($result));
1994
+    foreach ($privacyconsent_prefs as $name => $newstate) {
1995 1995
     $subname = explode('_', $name)[1];
1996 1996
     $currstate = (check_user_consent($boincuser, $subname)) ? 1 : 0 ;
1997 1997
     list($checkct, $ctid) = check_consent_type($subname);
1998 1998
     if ($checkct && ($currstate != $newstate)) {
1999
-      consent_to_a_policy($boincuser, $ctid, $newstate, 0, 'Webform', time());
1999
+        consent_to_a_policy($boincuser, $ctid, $newstate, 0, 'Webform', time());
2000
+    }
2000 2001
     }
2001
-  }
2002 2002
 
2003
-  //project_prefs_update($boincuser, $main_prefs);
2003
+    //project_prefs_update($boincuser, $main_prefs);
2004 2004
 
2005
-  db_set_active('boinc_rw');
2006
-  db_query("UPDATE user SET send_email = '{$boincuser->send_email}', show_hosts = '{$boincuser->show_hosts}' WHERE id = '{$boincuser->id}'");
2007
-  db_set_active('default');
2005
+    db_set_active('boinc_rw');
2006
+    db_query("UPDATE user SET send_email = '{$boincuser->send_email}', show_hosts = '{$boincuser->show_hosts}' WHERE id = '{$boincuser->id}'");
2007
+    db_set_active('default');
2008 2008
 
2009
-  drupal_set_message(t('Your privacy preferences have been updated.'));
2009
+    drupal_set_message(t('Your privacy preferences have been updated.'));
2010 2010
 }
2011 2011
 
2012 2012
 /**
@@ -2014,14 +2014,14 @@  discard block
 block discarded – undo
2014 2014
  * ignore list.
2015 2015
  */
2016 2016
 function _boincwork_ignore_list_form_submit($form, $form_state) {
2017
-  boincwork_ignore_user_add_user_username($form_state['values']['addusername_toignorelist']);
2018
-  drupal_set_message(
2017
+    boincwork_ignore_user_add_user_username($form_state['values']['addusername_toignorelist']);
2018
+    drupal_set_message(
2019 2019
     bts('@username has been added to your ignore list. See your !privacy_preferences for more details.',
2020
-      array(
2020
+        array(
2021 2021
         '@username' => $form_state['values']['addusername_toignorelist'],
2022 2022
         '!privacy_preferences' => l(bts('privacy preferences', array(), NULL, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2023
-      ),
2024
-      NULL, 'boinc:ignore-user-add'),
2023
+        ),
2024
+        NULL, 'boinc:ignore-user-add'),
2025 2025
     'status');
2026 2026
 }
2027 2027
 
@@ -2030,37 +2030,37 @@  discard block
 block discarded – undo
2030 2030
  */
2031 2031
 function boincwork_selectapp_form(&$form_state, $apps, $current_app) {
2032 2032
 
2033
-  $form['selectapp'] = array(
2033
+    $form['selectapp'] = array(
2034 2034
     '#type' => 'select',
2035 2035
     '#attributes' => array(
2036
-      'class' => 'task-app-filter',
2037
-      'onchange' => 'this.form.submit();',
2036
+        'class' => 'task-app-filter',
2037
+        'onchange' => 'this.form.submit();',
2038 2038
     ),
2039 2039
     '#default_value' => $current_app,
2040 2040
     '#options' => $apps,
2041 2041
     '#post_render' => array('_boincwork_selectapp_form_callback'),
2042
-  );
2042
+    );
2043 2043
 
2044
-  // Class task-app-filter-submit for this form is used in
2045
-  // theming. CSS sets 'display:none' if javascript is present. Thus
2046
-  // only non-js users/browsers will see the Apply Filter button.
2047
-  $form['submit'] = array(
2044
+    // Class task-app-filter-submit for this form is used in
2045
+    // theming. CSS sets 'display:none' if javascript is present. Thus
2046
+    // only non-js users/browsers will see the Apply Filter button.
2047
+    $form['submit'] = array(
2048 2048
     '#type' => 'submit',
2049 2049
     '#value' => bts('Apply Filter', array(), NULL, 'boinc:form-save'),
2050 2050
     '#attributes' => array('class' => 'js-hide',),
2051
-  );
2051
+    );
2052 2052
 
2053
-  return $form;
2053
+    return $form;
2054 2054
 }
2055 2055
 
2056 2056
 /**
2057 2057
  * Submit function for select appliacation form.
2058 2058
  */
2059 2059
 function boincwork_selectapp_form_submit($form, &$form_state) {
2060
-  $myargs = arg();
2061
-  array_pop($myargs);
2062
-  $newpath = implode('/', $myargs ) . '/' . $form['selectapp']['#value'];
2063
-  $form_state['redirect'] = $newpath;
2060
+    $myargs = arg();
2061
+    array_pop($myargs);
2062
+    $newpath = implode('/', $myargs ) . '/' . $form['selectapp']['#value'];
2063
+    $form_state['redirect'] = $newpath;
2064 2064
 }
2065 2065
 
2066 2066
 /**
@@ -2070,7 +2070,7 @@  discard block
 block discarded – undo
2070 2070
  * 'title' for the Application drop down box.
2071 2071
  */
2072 2072
 function _boincwork_selectapp_form_callback($theContent, $theElement) {
2073
-  $disabled = '<option value="-1" disabled hidden';
2074
-  $newContent = preg_replace('/<option value="-1"/', $disabled, $theContent);
2075
-  return $newContent;
2073
+    $disabled = '<option value="-1" disabled hidden';
2074
+    $newContent = preg_replace('/<option value="-1"/', $disabled, $theContent);
2075
+    return $newContent;
2076 2076
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +269 added lines, -269 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
 /**
15 15
  * The structure of the general preferences form
16 16
  */
17
-function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = FALSE) {
17
+function boincwork_generalprefs_form(&$form_state, $venue, $prefs_preset = null, $advanced = false) {
18 18
   $form = array();
19 19
   $prefs = null;
20
-  $established = TRUE;
20
+  $established = true;
21 21
 
22 22
   // Enable AHAH form support for dynamically updating content based on preset
23 23
   ahah_helper_register($form, $form_state);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     // Take note if this is not an established preference set on the account
34 34
     if (isset($prefs['@attributes']['cleared'])) {
35
-      $established = FALSE;
35
+      $established = false;
36 36
     }
37 37
 
38 38
     // Determine if a preset is selected or if these are custom settings
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
           break;
71 71
       }// switch
72 72
   } else {
73
-      $form_state['storage']['wip'] = TRUE;
73
+      $form_state['storage']['wip'] = true;
74 74
       if ( !in_array($prefs_preset, array('standard','maximum','green','minimum','custom')) ) {
75 75
           if ($established) {
76 76
               $prefs_preset = 'custom';
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
   // Standard option sets
138 138
   $form['boolean_options'] = array(
139 139
     '#type' => 'value',
140
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
140
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
141 141
   );
142 142
   $form['hour_options'] = array(
143 143
     '#type' => 'value',
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     '#prefix' => '<div id="prefs-wrapper">', // This is our wrapper div.
159 159
     '#attributes' => array('class' => 'ahah-container'),
160 160
     '#suffix' => '</div>',
161
-    '#tree'   => TRUE
161
+    '#tree'   => true
162 162
   );
163 163
   //$form['prefs']['debug'] = array('#value' => '<pre>' . print_r($form_state, true) . '</pre>');
164 164
 
@@ -178,15 +178,15 @@  discard block
 block discarded – undo
178 178
 
179 179
   // Simplified selectors
180 180
   $form['prefs']['preset'] = array(
181
-      '#title' => bts('Presets', array(), NULL, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
181
+      '#title' => bts('Presets', array(), null, 'boinc:account-preferences-preset:-1:for a user to choose a computing or project preference preset.'),
182 182
     '#type' => 'radios',
183 183
     '#description' => ' ',
184 184
     '#options' => array(
185
-      'standard' => bts('Standard', array(), NULL, 'boinc:account-preferences-preset'),
186
-      'maximum' => bts('Maximum', array(), NULL, 'boinc:account-preferences-preset'),
187
-      'green' => bts('Green', array(), NULL, 'boinc:account-preferences-preset'),
188
-      'minimum' => bts('Minimum', array(), NULL, 'boinc:account-preferences-preset'),
189
-      'custom' => bts('Custom', array(), NULL, 'boinc:account-preferences-preset')
185
+      'standard' => bts('Standard', array(), null, 'boinc:account-preferences-preset'),
186
+      'maximum' => bts('Maximum', array(), null, 'boinc:account-preferences-preset'),
187
+      'green' => bts('Green', array(), null, 'boinc:account-preferences-preset'),
188
+      'minimum' => bts('Minimum', array(), null, 'boinc:account-preferences-preset'),
189
+      'custom' => bts('Custom', array(), null, 'boinc:account-preferences-preset')
190 190
     ),
191 191
     '#prefix' => '<div class="simple-form-controls">',
192 192
     '#suffix' => '</div>',
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
   );
200 200
   $form['prefs']['select preset'] = array(
201 201
     '#type'  => 'submit',
202
-    '#value' => bts('Update preset', array(), NULL, 'boinc:account-preferences-preset'),
202
+    '#value' => bts('Update preset', array(), null, 'boinc:account-preferences-preset'),
203 203
     '#submit' => array('ahah_helper_generic_submit'),
204 204
     // The 'no-js' class only displays this button if javascript is disabled
205 205
     '#attributes' => array('class' => 'no-js'),
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 
208 208
   // Advanced preferences
209 209
   $form['prefs']['advanced'] = array(
210
-    '#title' => bts('Advanced settings', array(), NULL, 'boinc:account-preferences-option'),
210
+    '#title' => bts('Advanced settings', array(), null, 'boinc:account-preferences-option'),
211 211
     '#type' => 'fieldset',
212 212
     '#description' => '',
213
-    '#collapsible' => TRUE,
213
+    '#collapsible' => true,
214 214
     '#collapsed' => !$advanced,
215 215
     '#attributes' => array('class' => 'advanced-settings'),
216 216
   );
@@ -226,62 +226,62 @@  discard block
 block discarded – undo
226 226
   );
227 227
 
228 228
   $form['prefs']['advanced']['processor'] = array(
229
-    '#title' => bts('Processor usage', array(), NULL, 'boinc:account-preferences-computing'),
229
+    '#title' => bts('Processor usage', array(), null, 'boinc:account-preferences-computing'),
230 230
     '#type' => 'fieldset',
231 231
     '#description' => '',
232
-    '#collapsible' => FALSE,
233
-    '#collapsed' => FALSE
232
+    '#collapsible' => false,
233
+    '#collapsed' => false
234 234
   );
235 235
   $form['prefs']['advanced']['processor']['run_on_batteries'] = array(
236
-    '#title' => bts('Suspend when computer is on battery?', array(), NULL, 'boinc:account-preferences-computing'),
236
+    '#title' => bts('Suspend when computer is on battery?', array(), null, 'boinc:account-preferences-computing'),
237 237
     '#type' => 'radios',
238
-    '#description' => bts('Suspends computing on portables when running on battery power.', array(), NULL, 'boinc:account-preferences-computing'),
238
+    '#description' => bts('Suspends computing on portables when running on battery power.', array(), null, 'boinc:account-preferences-computing'),
239 239
     '#options' => $form['boolean_options']['#value'],
240 240
     '#attributes' => array('class' => 'fancy'),
241 241
     '#default_value' => ($default['run_on_batteries']) ? 0 : 1 // intentional inversion of setting
242 242
   );
243 243
   $form['prefs']['advanced']['processor']['run_if_user_active'] = array(
244
-    '#title' => bts('Suspend when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
244
+    '#title' => bts('Suspend when computer is in use?', array(), null, 'boinc:account-preferences-computing'),
245 245
     '#type' => 'radios',
246
-    '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
246
+    '#description' => bts("Suspends computing and file transfers when you're using the computer.", array(), null, 'boinc:account-preferences-computing'),
247 247
     '#options' => $form['boolean_options']['#value'],
248 248
     '#attributes' => array('class' => 'fancy'),
249 249
     '#default_value' => ($default['run_if_user_active']) ? 0 : 1 // intentional inversion of setting
250 250
   );
251 251
   $form['prefs']['advanced']['processor']['run_gpu_if_user_active'] = array(
252
-    '#title' => bts('Suspend GPU computing when computer is in use?', array(), NULL, 'boinc:account-preferences-computing'),
252
+    '#title' => bts('Suspend GPU computing when computer is in use?', array(), null, 'boinc:account-preferences-computing'),
253 253
     '#type' => 'radios',
254
-    '#description' => bts("Suspends GPU computing when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing'),
254
+    '#description' => bts("Suspends GPU computing when you're using the computer.", array(), null, 'boinc:account-preferences-computing'),
255 255
     '#options' => $form['boolean_options']['#value'],
256 256
     '#attributes' => array('class' => 'fancy'),
257 257
     '#default_value' => ($default['run_gpu_if_user_active']) ? 0 : 1 // intentional inversion of setting
258 258
   );
259 259
   $form['prefs']['advanced']['processor']['idle_time_to_run'] = array(
260
-      '#title' => bts('"In use" means mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
260
+      '#title' => bts('"In use" means mouse/keyboard input in last', array(), null, 'boinc:account-preferences-computing'),
261 261
     '#type' => 'textfield',
262
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
262
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
263 263
     '#default_value' => $default['idle_time_to_run'],
264 264
     '#size' => 1,
265
-    '#description' => bts('This determines when the computer is considered "in use".', array(), NULL, 'boinc:account-preferences-computing')
265
+    '#description' => bts('This determines when the computer is considered "in use".', array(), null, 'boinc:account-preferences-computing')
266 266
   );
267 267
   $form['prefs']['advanced']['processor']['suspend_if_no_recent_input'] = array(
268
-    '#title' => bts('Suspend when no mouse/keyboard input in last', array(), NULL, 'boinc:account-preferences-computing'),
268
+    '#title' => bts('Suspend when no mouse/keyboard input in last', array(), null, 'boinc:account-preferences-computing'),
269 269
     '#type' => 'textfield',
270
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
270
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
271 271
     '#default_value' => $default['suspend_if_no_recent_input'],
272 272
     '#size' => 1,
273
-    '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), NULL, 'boinc:account-preferences-computing')
273
+    '#description' => bts('This allows some computers to enter low-power mode when not in use.', array(), null, 'boinc:account-preferences-computing')
274 274
   );
275 275
   $form['prefs']['advanced']['processor']['suspend_cpu_usage'] = array(
276
-    '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), NULL, 'boinc:account-preferences-computing'),
276
+    '#title' => bts('Suspend when non-BOINC CPU usage is above', array(), null, 'boinc:account-preferences-computing'),
277 277
     '#type' => 'textfield',
278 278
     '#field_suffix' => '%',
279 279
     '#default_value' => $default['suspend_cpu_usage'],
280 280
     '#size' => 1,
281
-    '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), NULL, 'boinc:account-preferences-computing'),
281
+    '#description' => bts('Suspend computing when your computer is busy running other programs.', array(), null, 'boinc:account-preferences-computing'),
282 282
   );
283 283
   $form['prefs']['advanced']['processor']['hour_label'] = array(
284
-    '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
284
+    '#value' => '<div class="form-item"><label>' . bts('Compute only between:', array(), null, 'boinc:account-preferences-computing') . '</label></div>'
285 285
   );
286 286
   $form['prefs']['advanced']['processor']['start_hour'] = array(
287 287
     '#type' => 'select',
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     '#default_value' => $default['start_hour']
290 290
   );
291 291
   $form['prefs']['advanced']['processor']['hour_delimiter'] = array(
292
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
292
+    '#value' => '<span>' . bts('and', array(), null, 'boinc:account-preference') . '</span>'
293 293
   );
294 294
   $form['prefs']['advanced']['processor']['end_hour'] = array(
295 295
     '#type' => 'select',
@@ -297,164 +297,164 @@  discard block
 block discarded – undo
297 297
     '#default_value' => $default['end_hour']
298 298
   );
299 299
   $form['prefs']['advanced']['processor']['hour_description'] = array(
300
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
300
+    '#value' => '<div class="form-item slim"><div class="description">' . bts('Compute only during a particular period each day.', array(), null, 'boinc:account-preferences-computing') . '</div></div>'
301 301
   );
302 302
   $form['prefs']['advanced']['processor']['leave_apps_in_memory'] = array(
303
-    '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), NULL, 'boinc:account-preferences-computing'),
303
+    '#title' => bts('Leave non-GPU tasks in memory while suspended?', array(), null, 'boinc:account-preferences-computing'),
304 304
     '#type' => 'radios',
305 305
     '#options' => $form['boolean_options']['#value'],
306 306
     '#attributes' => array('class' => 'fancy'),
307 307
     '#default_value' => $default['leave_apps_in_memory'],
308
-    '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), NULL, 'boinc:account-preferences-computing')
308
+    '#description' => bts('If "Yes", suspended tasks stay in memory, and resume with no work lost. If "No", suspended tasks are removed from memory, and resume from their last checkpoint.', array(), null, 'boinc:account-preferences-computing')
309 309
   );
310 310
   $form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes'] = array(
311
-    '#title' => bts('Switch between tasks every', array(), NULL, 'boinc:account-preferences-computing'),
311
+    '#title' => bts('Switch between tasks every', array(), null, 'boinc:account-preferences-computing'),
312 312
     '#type' => 'textfield',
313
-    '#field_suffix' => bts('minutes', array(), NULL, 'boinc:unit-of-time'),
313
+    '#field_suffix' => bts('minutes', array(), null, 'boinc:unit-of-time'),
314 314
     '#default_value' => $default['cpu_scheduling_period_minutes'],
315 315
     '#size' => 1,
316
-    '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), NULL, 'boinc:account-preferences-computing')
316
+    '#description' => bts('If you run several projects, BOINC may switch between them this often.', array(), null, 'boinc:account-preferences-computing')
317 317
   );
318 318
   $form['prefs']['advanced']['processor']['max_ncpus_pct'] = array(
319
-    '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
319
+    '#title' => bts('Use at most', array(), null, 'boinc:account-preferences-computing'),
320 320
     '#type' => 'textfield',
321
-    '#field_suffix' => bts('% of the processors', array(), NULL, 'boinc:account-preferences-computing'),
321
+    '#field_suffix' => bts('% of the processors', array(), null, 'boinc:account-preferences-computing'),
322 322
     '#default_value' => $default['max_ncpus_pct'],
323 323
     '#size' => 1,
324
-    '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), NULL, 'boinc:account-preferences-computing'),
324
+    '#description' => bts('Keep some CPUs free for other applications. Example: 75% means use 6 cores on an 8-core CPU.', array(), null, 'boinc:account-preferences-computing'),
325 325
   );
326 326
   $form['prefs']['advanced']['processor']['cpu_usage_limit'] = array(
327
-    '#title' => bts('Use at most', array(), NULL, 'boinc:account-preferences-computing'),
327
+    '#title' => bts('Use at most', array(), null, 'boinc:account-preferences-computing'),
328 328
     '#type' => 'textfield',
329
-    '#field_suffix' => bts('% of the CPU time', array(), NULL, 'boinc:account-preferences-computing'),
329
+    '#field_suffix' => bts('% of the CPU time', array(), null, 'boinc:account-preferences-computing'),
330 330
     '#default_value' => $default['cpu_usage_limit'],
331 331
     '#size' => 1,
332
-    '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), NULL, 'boinc:account-preferences-computing')
332
+    '#description' => bts('Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat.', array(), null, 'boinc:account-preferences-computing')
333 333
   );
334 334
 
335 335
   // Disk and memory preferences
336 336
   $form['prefs']['advanced']['storage'] = array(
337
-    '#title' => bts('Disk and memory usage', array(), NULL, 'boinc:account-preferences-computing'),
337
+    '#title' => bts('Disk and memory usage', array(), null, 'boinc:account-preferences-computing'),
338 338
     '#type' => 'fieldset',
339 339
     '#description' => '',
340
-    '#collapsible' => FALSE,
341
-    '#collapsed' => FALSE
340
+    '#collapsible' => false,
341
+    '#collapsed' => false
342 342
   );
343 343
   $form['prefs']['advanced']['storage']['disk_max_used_gb'] = array(
344
-    '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
344
+    '#title' => bts('Disk: use no more than', array(), null, 'boinc:account-preferences-computing'),
345 345
     '#type' => 'textfield',
346 346
     '#field_suffix' => 'GB',
347 347
     '#default_value' => $default['disk_max_used_gb'],
348 348
     '#size' => 1,
349
-    '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), NULL, 'boinc:account-preferences-computing'),
349
+    '#description' => bts('Limit the total amount of disk space used by BOINC.', array(), null, 'boinc:account-preferences-computing'),
350 350
   );
351 351
   $form['prefs']['advanced']['storage']['disk_min_free_gb'] = array(
352
-    '#title' => bts('Disk: leave at least', array(), NULL, 'boinc:account-preferences-computing'),
352
+    '#title' => bts('Disk: leave at least', array(), null, 'boinc:account-preferences-computing'),
353 353
     '#type' => 'textfield',
354 354
     '#field_suffix' => 'GB free',
355 355
     '#default_value' => $default['disk_min_free_gb'],
356 356
     '#size' => 1,
357
-    '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), NULL, 'boinc:account-preferences-computing'),
357
+    '#description' => bts('Limit disk usage to leave this much free space on the volume where BOINC stores data.', array(), null, 'boinc:account-preferences-computing'),
358 358
   );
359 359
   $form['prefs']['advanced']['storage']['disk_max_used_pct'] = array(
360
-    '#title' => bts('Disk: use no more than', array(), NULL, 'boinc:account-preferences-computing'),
360
+    '#title' => bts('Disk: use no more than', array(), null, 'boinc:account-preferences-computing'),
361 361
     '#type' => 'textfield',
362
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
362
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
363 363
     '#default_value' => $default['disk_max_used_pct'],
364 364
     '#size' => 1,
365
-    '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), NULL, 'boinc:account-preferences-computing')
365
+    '#description' => bts('Limit the percentage of disk space used by BOINC on the volume where it stores data.', array(), null, 'boinc:account-preferences-computing')
366 366
   );
367 367
   $form['prefs']['advanced']['storage']['disk_interval'] = array(
368
-    '#title' => bts('Request tasks to checkpoint at most every', array(), NULL, 'boinc:account-preferences-computing'),
368
+    '#title' => bts('Request tasks to checkpoint at most every', array(), null, 'boinc:account-preferences-computing'),
369 369
     '#type' => 'textfield',
370
-    '#field_suffix' => bts('seconds', array(), NULL, 'boinc:unit-of-time'),
370
+    '#field_suffix' => bts('seconds', array(), null, 'boinc:unit-of-time'),
371 371
     '#default_value' => $default['disk_interval'],
372 372
     '#size' => 1,
373
-    '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), NULL, 'boinc:account-preferences-computing')
373
+    '#description' => bts('This controls how often tasks save their state to disk, so that later they can be continued from that point.', array(), null, 'boinc:account-preferences-computing')
374 374
   );
375 375
   $form['prefs']['advanced']['storage']['vm_max_used_pct'] = array(
376
-    '#title' => bts('Page/swap file: use at most', array(), NULL, 'boinc:account-preferences-computing'),
376
+    '#title' => bts('Page/swap file: use at most', array(), null, 'boinc:account-preferences-computing'),
377 377
     '#type' => 'textfield',
378
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
378
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
379 379
     '#default_value' => $default['vm_max_used_pct'],
380 380
     '#size' => 1,
381
-    '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), NULL, 'boinc:account-preferences-computing')
381
+    '#description' => bts('Limit the swap space (page file) used by BOINC.', array(), null, 'boinc:account-preferences-computing')
382 382
   );
383 383
   $form['prefs']['advanced']['storage']['ram_max_used_busy_pct'] = array(
384
-    '#title' => bts('Memory: when computer is in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
384
+    '#title' => bts('Memory: when computer is in use, use at most', array(), null, 'boinc:account-preferences-computing'),
385 385
     '#type' => 'textfield',
386
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
386
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
387 387
     '#default_value' => $default['ram_max_used_busy_pct'],
388 388
     '#size' => 1,
389
-    '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), NULL, 'boinc:account-preferences-computing')
389
+    '#description' => bts("Limit the memory used by BOINC when you're using the computer.", array(), null, 'boinc:account-preferences-computing')
390 390
   );
391 391
   $form['prefs']['advanced']['storage']['ram_max_used_idle_pct'] = array(
392
-    '#title' => bts('Memory: when computer is not in use, use at most', array(), NULL, 'boinc:account-preferences-computing'),
392
+    '#title' => bts('Memory: when computer is not in use, use at most', array(), null, 'boinc:account-preferences-computing'),
393 393
     '#type' => 'textfield',
394
-    '#field_suffix' => bts('% of total', array(), NULL, 'boinc:account-preferences-computing'),
394
+    '#field_suffix' => bts('% of total', array(), null, 'boinc:account-preferences-computing'),
395 395
     '#default_value' => $default['ram_max_used_idle_pct'],
396 396
     '#size' => 1,
397
-    '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), NULL, 'boinc:account-preferences-computing')
397
+    '#description' => bts("Limit the memory used by BOINC when you're not using the computer.", array(), null, 'boinc:account-preferences-computing')
398 398
   );
399 399
 
400 400
   // Network preferences
401 401
   $form['prefs']['advanced']['network'] = array(
402
-    '#title' => bts('Network usage', array(), NULL, 'boinc:account-preferences-computing'),
402
+    '#title' => bts('Network usage', array(), null, 'boinc:account-preferences-computing'),
403 403
     '#type' => 'fieldset',
404 404
     '#description' => '',
405
-    '#collapsible' => FALSE,
406
-    '#collapsed' => FALSE
405
+    '#collapsible' => false,
406
+    '#collapsed' => false
407 407
   );
408 408
   $form['prefs']['advanced']['network']['work_buf_min_days'] = array(
409
-    '#title' => bts('Store at least', array(), NULL, 'boinc:account-preferences-computing'),
409
+    '#title' => bts('Store at least', array(), null, 'boinc:account-preferences-computing'),
410 410
     '#type' => 'textfield',
411
-    '#field_suffix' => bts('days of work', array(), NULL, 'boinc:account-preferences-computing'),
411
+    '#field_suffix' => bts('days of work', array(), null, 'boinc:account-preferences-computing'),
412 412
     '#default_value' => $default['work_buf_min_days'],
413 413
     '#size' => 1,
414
-    '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), NULL, 'boinc:account-preferences-computing')
414
+    '#description' => bts('Store at least enough tasks to keep the computer busy for this long.', array(), null, 'boinc:account-preferences-computing')
415 415
   );
416 416
   $form['prefs']['advanced']['network']['work_buf_additional_days'] = array(
417
-    '#title' => bts('Store up to an additional', array(), NULL, 'boinc:account-preferences-computing'),
417
+    '#title' => bts('Store up to an additional', array(), null, 'boinc:account-preferences-computing'),
418 418
     '#type' => 'textfield',
419
-    '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
419
+    '#field_suffix' => bts('days', array(), null, 'boinc:unit-of-time'),
420 420
     '#default_value' => $default['work_buf_additional_days'],
421 421
     '#size' => 1,
422
-    '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), NULL, 'boinc:account-preferences-computing')
422
+    '#description' => bts('Store additional tasks above the minimum level.  Determines how much work is requested when contacting a project.', array(), null, 'boinc:account-preferences-computing')
423 423
   );
424 424
   $form['prefs']['advanced']['network']['confirm_before_connecting'] = array(
425
-    '#title' => bts('Confirm before connecting to Internet?', array(), NULL, 'boinc:account-preferences-computing'),
425
+    '#title' => bts('Confirm before connecting to Internet?', array(), null, 'boinc:account-preferences-computing'),
426 426
     '#type' => 'radios',
427 427
     '#options' => $form['boolean_options']['#value'],
428 428
     '#attributes' => array('class' => 'fancy'),
429 429
     '#default_value' => $default['confirm_before_connecting'],
430
-    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
430
+    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), null, 'boinc:account-preferences-computing')
431 431
   );
432 432
   $form['prefs']['advanced']['network']['hangup_if_dialed'] = array(
433
-    '#title' => bts('Disconnect when done?', array(), NULL, 'boinc:account-preferences-computing'),
433
+    '#title' => bts('Disconnect when done?', array(), null, 'boinc:account-preferences-computing'),
434 434
     '#type' => 'radios',
435 435
     '#options' => $form['boolean_options']['#value'],
436 436
     '#attributes' => array('class' => 'fancy'),
437 437
     '#default_value' => $default['hangup_if_dialed'],
438
-    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), NULL, 'boinc:account-preferences-computing')
438
+    '#description' => bts('Useful only if you have a modem, ISDN or VPN connection.', array(), null, 'boinc:account-preferences-computing')
439 439
   );
440 440
   $form['prefs']['advanced']['network']['max_bytes_sec_down'] = array(
441
-    '#title' => bts('Limit download rate to', array(), NULL, 'boinc:account-preferences-computing'),
441
+    '#title' => bts('Limit download rate to', array(), null, 'boinc:account-preferences-computing'),
442 442
     '#type' => 'textfield',
443 443
     '#field_suffix' => 'Kbytes/sec',
444 444
     '#default_value' => $default['max_bytes_sec_down']/1000,
445 445
     '#size' => 1,
446
-    '#description' => bts('Limit the download rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
446
+    '#description' => bts('Limit the download rate of file transfers.', array(), null, 'boinc:account-preferences-computing')
447 447
   );
448 448
   $form['prefs']['advanced']['network']['max_bytes_sec_up'] = array(
449
-    '#title' => bts('Limit upload rate to', array(), NULL, 'boinc:account-preferences-computing'),
449
+    '#title' => bts('Limit upload rate to', array(), null, 'boinc:account-preferences-computing'),
450 450
     '#type' => 'textfield',
451 451
     '#field_suffix' => 'Kbytes/sec',
452 452
     '#default_value' => $default['max_bytes_sec_up']/1000,
453 453
     '#size' => 1,
454
-    '#description' => bts('Limit the upload rate of file transfers.', array(), NULL, 'boinc:account-preferences-computing')
454
+    '#description' => bts('Limit the upload rate of file transfers.', array(), null, 'boinc:account-preferences-computing')
455 455
   );
456 456
   $form['prefs']['advanced']['network']['hour_label'] = array(
457
-    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), NULL, 'boinc:account-preferences-computing') . '</label></div>'
457
+    '#value' => '<div class="form-item"><label>' . bts('Transfer files only between', array(), null, 'boinc:account-preferences-computing') . '</label></div>'
458 458
   );
459 459
   $form['prefs']['advanced']['network']['net_start_hour'] = array(
460 460
     '#type' => 'select',
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     '#default_value' => $default['net_start_hour']
463 463
   );
464 464
   $form['prefs']['advanced']['network']['hour_delimiter'] = array(
465
-    '#value' => '<span>' . bts('and', array(), NULL, 'boinc:account-preference') . '</span>'
465
+    '#value' => '<span>' . bts('and', array(), null, 'boinc:account-preference') . '</span>'
466 466
   );
467 467
   $form['prefs']['advanced']['network']['net_end_hour'] = array(
468 468
     '#type' => 'select',
@@ -470,10 +470,10 @@  discard block
 block discarded – undo
470 470
     '#default_value' => $default['net_end_hour']
471 471
   );
472 472
   $form['prefs']['advanced']['network']['hour_description'] = array(
473
-    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), NULL, 'boinc:account-preferences-computing') . '</div></div>'
473
+    '#value' => '<div class="form-item slim"><div class="description">' . bts('Transfer files only during a particular period each day.', array(), null, 'boinc:account-preferences-computing') . '</div></div>'
474 474
   );
475 475
   $form['prefs']['advanced']['network']['daily_xfer_limit_mb'] = array(
476
-    '#title' => bts('Limit usage to', array(), NULL, 'boinc:account-preferences-computing'),
476
+    '#title' => bts('Limit usage to', array(), null, 'boinc:account-preferences-computing'),
477 477
     '#type' => 'textfield',
478 478
     '#field_suffix' => 'Mbytes',
479 479
     '#default_value' => $default['daily_xfer_limit_mb'],
@@ -482,18 +482,18 @@  discard block
 block discarded – undo
482 482
   $form['prefs']['advanced']['network']['daily_xfer_period_days'] = array(
483 483
     '#field_prefix' => 'every',
484 484
     '#type' => 'textfield',
485
-    '#field_suffix' => bts('days', array(), NULL, 'boinc:unit-of-time'),
485
+    '#field_suffix' => bts('days', array(), null, 'boinc:unit-of-time'),
486 486
     '#default_value' => $default['daily_xfer_period_days'],
487 487
     '#size' => 1,
488
-    '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), NULL, 'boinc:account-preferences-computing'),
488
+    '#description' => bts('Example: BOINC should transfer at most 2000 MB of data every 30 days.', array(), null, 'boinc:account-preferences-computing'),
489 489
   );
490 490
   $form['prefs']['advanced']['network']['dont_verify_images'] = array(
491
-    '#title' => bts('Skip data verification for image files?', array(), NULL, 'boinc:account-preferences-computing'),
491
+    '#title' => bts('Skip data verification for image files?', array(), null, 'boinc:account-preferences-computing'),
492 492
     '#type' => 'radios',
493 493
     '#options' => $form['boolean_options']['#value'],
494 494
     '#attributes' => array('class' => 'fancy'),
495 495
     '#default_value' => $default['dont_verify_images'],
496
-    '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), NULL, 'boinc:account-preferences-computing')
496
+    '#description' => bts('Only select "Yes" if your Internet provider modifies image files. Skipping verification reduces the security of BOINC.', array(), null, 'boinc:account-preferences-computing')
497 497
   );
498 498
 
499 499
   // The "fancy radios" are made via javascript on document load. In order for
@@ -526,27 +526,27 @@  discard block
 block discarded – undo
526 526
   $form['prefs']['submit'] = array(
527 527
     '#prefix' => '<li class="first tab">',
528 528
     '#type' => 'submit',
529
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
529
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
530 530
     '#suffix' => '</li>'
531 531
   );
532 532
   $form['prefs']['form control tabs'] = array(
533
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
533
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), drupal_get_path_alias("account/prefs/computing/edit")) . '</li>'
534 534
   );
535
-  if ($venue AND $venue != 'generic') {
535
+  if ($venue and $venue != 'generic') {
536 536
     global $base_path;
537 537
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
538
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
538
+      l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/computing/clear/{$venue}",
539 539
         array(
540 540
           'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/computing/combined')),
541 541
           'attributes' => array(
542 542
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
543
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
543
+              array('@name' => $venue), null, 'boinc:account-preferences') . '\')'
544 544
           )
545 545
         )
546 546
       ) . '</li>';
547 547
   }
548 548
   $form['prefs']['view control'] = array(
549
-    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
549
+    '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/computing/combined') . '</li>'
550 550
   );
551 551
   $form['prefs']['form control tabs suffix'] = array(
552 552
     '#value' => '</ul>'
@@ -567,33 +567,33 @@  discard block
 block discarded – undo
567 567
   // Verify all non-boolean user input values and notify form API of failures
568 568
 
569 569
   // Processing preferences
570
-  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
571
-  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
572
-  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
573
-  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
574
-  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
575
-  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
576
-  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
577
-  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
570
+  if (!verify_numeric($values['processor']['idle_time_to_run'], 1, 9999)) form_set_error('idle_time_to_run', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['idle_time_to_run']['#title']} [x] {$form['prefs']['advanced']['processor']['idle_time_to_run']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
571
+  if (!verify_numeric($values['processor']['suspend_if_no_recent_input'], 0, 9999)) form_set_error('suspend_if_no_recent_input', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_if_no_recent_input']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
572
+  if (!verify_numeric($values['processor']['suspend_cpu_usage'], 0, 100)) form_set_error('suspend_cpu_usage', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#title']} [x] {$form['prefs']['advanced']['processor']['suspend_cpu_usage']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
573
+  if (!verify_numeric($values['processor']['start_hour'], 0, 23)) form_set_error('start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['start_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['start_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
574
+  if (!verify_numeric($values['processor']['end_hour'], 0, 23)) form_set_error('end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['end_hour']['#title']} [x] {$form['prefs']['advanced']['processor']['end_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
575
+  if (!verify_numeric($values['processor']['cpu_scheduling_period_minutes'], 1, 9999)) form_set_error('cpu_scheduling_period_minutes', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_scheduling_period_minutes']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
576
+  if (!verify_numeric($values['processor']['max_ncpus_pct'], 0, 100)) form_set_error('max_ncpus_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['max_ncpus_pct']['#title']} [x] {$form['prefs']['advanced']['processor']['max_ncpus_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
577
+  if (!verify_numeric($values['processor']['cpu_usage_limit'], 0, 100)) form_set_error('cpu_usage_limit', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['processor']['cpu_usage_limit']['#title']} [x] {$form['prefs']['advanced']['processor']['cpu_usage_limit']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
578 578
 
579 579
   // Storage preferences
580
-  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
581
-  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
582
-  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
583
-  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
584
-  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
585
-  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
586
-  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
580
+  if (!verify_numeric($values['storage']['disk_max_used_gb'], 0, 9999999)) form_set_error('disk_max_used_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_gb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
581
+  if (!verify_numeric($values['storage']['disk_min_free_gb'], 0.001, 9999999)) form_set_error('disk_min_free_gb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_min_free_gb']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_min_free_gb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
582
+  if (!verify_numeric($values['storage']['disk_max_used_pct'], 0, 100)) form_set_error('disk_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_max_used_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
583
+  if (!verify_numeric($values['storage']['disk_interval'], 0, 9999999)) form_set_error('disk_interval', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['disk_interval']['#title']} [x] {$form['prefs']['advanced']['storage']['disk_interval']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
584
+  if (!verify_numeric($values['storage']['vm_max_used_pct'], 0, 100)) form_set_error('vm_max_used_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['vm_max_used_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['vm_max_used_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
585
+  if (!verify_numeric($values['storage']['ram_max_used_busy_pct'], 0, 100)) form_set_error('ram_max_used_busy_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_busy_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
586
+  if (!verify_numeric($values['storage']['ram_max_used_idle_pct'], 0, 100)) form_set_error('ram_max_used_idle_pct', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#title']} [x] {$form['prefs']['advanced']['storage']['ram_max_used_idle_pct']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
587 587
 
588 588
   // Network preferences
589
-  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
590
-  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
591
-  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
592
-  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
593
-  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), NULL, 'boinc:account-prefrences-computing'));
594
-  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
595
-  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
596
-  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), NULL, 'boinc:account-preferences-computing'));
589
+  if (!verify_numeric($values['network']['work_buf_min_days'], 0, 10)) form_set_error('work_buf_min_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_min_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_min_days']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
590
+  if (!verify_numeric($values['network']['work_buf_additional_days'], 0, 10)) form_set_error('work_buf_additional_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['work_buf_additional_days']['#title']} [x] {$form['prefs']['advanced']['network']['work_buf_additional_days']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
591
+  if (!verify_numeric($values['network']['max_bytes_sec_down'], 0, 9999.999)) form_set_error('max_bytes_sec_down', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_down']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_down']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
592
+  if (!verify_numeric($values['network']['max_bytes_sec_up'], 0, 9999.999)) form_set_error('max_bytes_sec_up', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['max_bytes_sec_up']['#title']} [x] {$form['prefs']['advanced']['network']['max_bytes_sec_up']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
593
+  if (!verify_numeric($values['network']['net_start_hour'], 0, 23)) form_set_error('net_start_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_start_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_start_hour']['#field_suffix']}"), null, 'boinc:account-prefrences-computing'));
594
+  if (!verify_numeric($values['network']['net_end_hour'], 0, 23)) form_set_error('net_end_hour', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['net_end_hour']['#title']} [x] {$form['prefs']['advanced']['network']['net_end_hour']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
595
+  if (!verify_numeric($values['network']['daily_xfer_limit_mb'], 0, 9999999)) form_set_error('daily_xfer_limit_mb', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
596
+  if (!verify_numeric($values['network']['daily_xfer_period_days'], 0, 9999999)) form_set_error('daily_xfer_period_days', bts('Invalid setting for "%preference"', array('%preference' => "{$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#title']} [x] {$form['prefs']['advanced']['network']['daily_xfer_limit_mb']['#field_suffix']}"), null, 'boinc:account-preferences-computing'));
597 597
 }
598 598
 
599 599
 /**
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     unset($prefs['@attributes']['preset']);
654 654
   }
655 655
   // Save the preset selection (or lack thereof)
656
-  if (!$preset OR $preset == 'custom') {
656
+  if (!$preset or $preset == 'custom') {
657 657
     $prefs['preset'] = 'custom';
658 658
   }
659 659
   else {
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
     watchdog('boincwork', 'Error updating global prefs for user @id: @message', array('@id' => $account->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
673 673
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
674 674
   }
675
-  elseif (!drupal_get_messages('status', FALSE)) {
675
+  elseif (!drupal_get_messages('status', false)) {
676 676
     // Show this message if the set wasn't created automatically (in which case
677 677
     // there is a message tailored to that) {
678 678
     drupal_set_message(t('Your preferences have been updated.
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
   ));
707 707
   db_set_active('default');
708 708
   $current_host->task_count = boincwork_host_get_task_count($current_host->id);
709
-  $current_host->is_new = !$current_host->total_credit AND !$current_host->task_count;
709
+  $current_host->is_new = !$current_host->total_credit and !$current_host->task_count;
710 710
   // Get the list of all other hosts owned by this user for comparison
711 711
   db_set_active('boinc_ro');
712 712
   $all_other_hosts = db_query("
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
     // First, disqualify if hosts were active at the same time
723 723
     if (!$current_host->is_new) {
724 724
       $other_host->task_count = boincwork_host_get_task_count($other_host->id);
725
-      $other_host->is_new = !$other_host->total_credit AND !$other_host->task_count;
725
+      $other_host->is_new = !$other_host->total_credit and !$other_host->task_count;
726 726
       if (!$other_host->is_new) {
727 727
         // If both hosts being compared are not new, see if times overlap
728 728
         if (!times_disjoint($current_host, $other_host)) {
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 /**
756 756
  * Perform the database updates to merge the old host into the new host
757 757
  */
758
-function boincwork_host_merge($old_host, $new_host, &$message = NULL) {
758
+function boincwork_host_merge($old_host, $new_host, &$message = null) {
759 759
   // Decay the average credit of the two hosts
760 760
   require_boinc('credit');
761 761
   $now = time();
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
       WATCHDOG_WARNING
782 782
     );
783 783
     $message = 'Could not merge due to a circular merge error. The site administrators have been contacted about this issue, and will investigate further.';
784
-    return FALSE;
784
+    return false;
785 785
   }
786 786
 
787 787
   if ($new_host->userid==0) {
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
       WATCHDOG_WARNING
796 796
     );
797 797
     $message = 'Could not merge because the target host has userid=0. The site administrators have been contacted about this issue, and will investigate further.';
798
-    return FALSE;
798
+    return false;
799 799
   }
800 800
 
801 801
   // Move credit from the old host to the new host
@@ -811,10 +811,10 @@  discard block
 block discarded – undo
811 811
   );
812 812
   db_set_active('default');
813 813
   if (!$credit_updated) {
814
-    if ($message !== NULL) {
815
-      $message = bts('Could not update credit', array(), NULL, 'boinc:account-host-merge');
814
+    if ($message !== null) {
815
+      $message = bts('Could not update credit', array(), null, 'boinc:account-host-merge');
816 816
     }
817
-    return FALSE;
817
+    return false;
818 818
   }
819 819
 
820 820
   // Move results from the old host to the new host
@@ -827,10 +827,10 @@  discard block
 block discarded – undo
827 827
   );
828 828
   db_set_active('default');
829 829
   if (!$results_updated) {
830
-    if ($message !== NULL) {
831
-      $message = bts('Could not update results', array(), NULL, 'boinc:account-host-merge');
830
+    if ($message !== null) {
831
+      $message = bts('Could not update results', array(), null, 'boinc:account-host-merge');
832 832
     }
833
-    return FALSE;
833
+    return false;
834 834
   }
835 835
 
836 836
   // Retire the old host
@@ -847,13 +847,13 @@  discard block
 block discarded – undo
847 847
   );
848 848
   db_set_active('default');
849 849
   if (!$old_host_retired) {
850
-    if ($message !== NULL) {
851
-      $message = bts('Could not retire old computer', array(), NULL, 'boinc:account-host-merge');
850
+    if ($message !== null) {
851
+      $message = bts('Could not retire old computer', array(), null, 'boinc:account-host-merge');
852 852
     }
853
-    return FALSE;
853
+    return false;
854 854
   }
855 855
 
856
-  return TRUE;
856
+  return true;
857 857
 }
858 858
 
859 859
 /**
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
   $form['overview'] = array(
883 883
     '#value' => '<p>' . bts('Sometimes BOINC assigns separate identities to'
884 884
       . ' the same computer by mistake. You can correct this by merging old'
885
-      . ' identities with the newest one.', array(), NULL, 'boinc:account-host-merge') . '</p>'
885
+      . ' identities with the newest one.', array(), null, 'boinc:account-host-merge') . '</p>'
886 886
       . '<p>'
887 887
       . bts('Check the computers that are the same as @name'
888 888
       . ' (created on @date at @time with computer ID @id)',
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
           '@time' => date('G:i:s T', $current_host->create_time),
893 893
           '@id' => $current_host->id,
894 894
         ),
895
-        NULL, 'boinc:account-host-merge') . '</p>',
895
+        null, 'boinc:account-host-merge') . '</p>',
896 896
   );
897 897
 
898 898
   $options = array();
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
   $form['merge'] = array(
908 908
     '#title' => '',
909 909
     '#type' => 'tableselect',
910
-    '#header' => array(bts('Name', array(), NULL, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), NULL, 'boinc:host-details'), bts('Computer ID', array(), NULL, 'boinc:host-list')),
910
+    '#header' => array(bts('Name', array(), null, 'boinc:details:-1:name-of-the-host-or-task-or-workunit-etc-being-viewed-ignoreoverwrite'), bts('Created', array(), null, 'boinc:host-details'), bts('Computer ID', array(), null, 'boinc:host-list')),
911 911
     '#options' => $options,
912 912
   );
913 913
 
@@ -922,11 +922,11 @@  discard block
 block discarded – undo
922 922
   $form['prefs']['submit'] = array(
923 923
     '#prefix' => '<li class="first tab">',
924 924
     '#type' => 'submit',
925
-    '#value' => bts('Merge', array(), NULL, 'boinc:form-merge'),
925
+    '#value' => bts('Merge', array(), null, 'boinc:form-merge'),
926 926
     '#suffix' => '</li>'
927 927
   );
928 928
   $form['prefs']['form control tabs'] = array(
929
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
929
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "host/{$host_id}") . '</li>'
930 930
   );
931 931
 
932 932
   return $form;
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
   if ($merged) {
965 965
     // Generate a natural language list of IDs that were merged
966 966
     $oxford_comma = ',';
967
-    $conjunction = bts('and', array(), NULL, 'boinc:account-preference');
967
+    $conjunction = bts('and', array(), null, 'boinc:account-preference');
968 968
     $list = array_keys($merged);
969 969
     $last = array_pop($list);
970 970
     if ($list) {
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
           '@old_id' => $list,
984 984
           '@id' => $current_host_id
985 985
         ),
986
-        NULL, 'boinc:account-host-merge'));
986
+        null, 'boinc:account-host-merge'));
987 987
     }
988 988
     else {
989 989
       drupal_set_message(bts(
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
           '@old_ids' => $list,
993 993
           '@id' => $current_host_id
994 994
         ),
995
-        NULL, 'boinc:account-host-merge'));
995
+        null, 'boinc:account-host-merge'));
996 996
     }
997 997
   }
998 998
 
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
             '@old_id' => $id,
1006 1006
             '@message' => $error,
1007 1007
           ),
1008
-          NULL, 'boinc:account-host-merge'),
1008
+          null, 'boinc:account-host-merge'),
1009 1009
         'warning'
1010 1010
       );
1011 1011
     }
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
   global $user;
1027 1027
   $account = user_load($user->uid);
1028 1028
 
1029
-  $established = TRUE;
1029
+  $established = true;
1030 1030
 
1031 1031
   // Get availability of special BOINC preferences
1032 1032
   require_boinc(array('app_types'));
@@ -1037,26 +1037,26 @@  discard block
 block discarded – undo
1037 1037
 
1038 1038
   // Take note if this is not an established preference set on the account
1039 1039
   if (isset($prefs['@attributes']['cleared'])) {
1040
-    $established = FALSE;
1040
+    $established = false;
1041 1041
   }
1042 1042
 
1043 1043
   // Extract modified tag if present
1044
-  $modified = NULL;
1044
+  $modified = null;
1045 1045
   if (isset($prefs['modified']['@value'])) {
1046 1046
     $modified = $prefs['modified']['@value'];
1047 1047
   }
1048 1048
 
1049
-  $venue_is_default = FALSE;
1049
+  $venue_is_default = false;
1050 1050
   if ($account->boincuser_default_pref_set) {
1051 1051
     if ($account->boincuser_default_pref_set == $venue) {
1052
-      $venue_is_default = TRUE;
1052
+      $venue_is_default = true;
1053 1053
     }
1054 1054
   }
1055
-  elseif (!$venue OR $venue == 'generic') {
1056
-    $venue_is_default = TRUE;
1055
+  elseif (!$venue or $venue == 'generic') {
1056
+    $venue_is_default = true;
1057 1057
   }
1058 1058
   else {
1059
-    $venue_is_default = FALSE;
1059
+    $venue_is_default = false;
1060 1060
   }
1061 1061
 
1062 1062
   // Define form defaults
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
   // Standard option sets
1087 1087
   $form['boolean_options'] = array(
1088 1088
     '#type' => 'value',
1089
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1089
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1090 1090
   );
1091 1091
 
1092 1092
   // Identify preference sets that are established to distinguish what has been
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
   $form['#established'] = $established;
1095 1095
 
1096 1096
   // Top level form options
1097
-  $form['#tree'] = TRUE;
1097
+  $form['#tree'] = true;
1098 1098
 
1099 1099
   // Hidden elements
1100 1100
   $form['modified'] = array(
@@ -1112,87 +1112,87 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
   // Common project preferences
1114 1114
   $form['resource'] = array(
1115
-    '#title' => bts('Resource settings', array(), NULL, 'boinc:account-preferences-project'),
1115
+    '#title' => bts('Resource settings', array(), null, 'boinc:account-preferences-project'),
1116 1116
     '#type' => 'fieldset',
1117 1117
     '#description' => null,
1118
-    '#collapsible' => TRUE,
1119
-    '#collapsed' => FALSE
1118
+    '#collapsible' => true,
1119
+    '#collapsed' => false
1120 1120
   );
1121 1121
   $form['resource']['resource_share'] = array(
1122
-    '#title' => bts('Resource share', array(), NULL, 'boinc:account-preferences-project'),
1122
+    '#title' => bts('Resource share', array(), null, 'boinc:account-preferences-project'),
1123 1123
     '#type' => 'textfield',
1124 1124
     '#default_value' => $default['resource_share'],
1125 1125
     '#size' => 5,
1126
-    '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), NULL, 'boinc:account-preferences-project')
1126
+    '#description' => bts("Determines the proportion of your computer's resources allocated to this project. Example: if you participate in two BOINC projects with resource shares of 100 and 200, the first will get 1/3 of your resources and the second will get 2/3.", array(), null, 'boinc:account-preferences-project')
1127 1127
   );
1128 1128
   if ($app_types->count > 1) {
1129 1129
     if ($app_types->cpu) {
1130 1130
       $form['resource']['no_cpu'] = array(
1131
-        '#title' => bts('Use CPU', array(), NULL, 'boinc:account-preferences-project'),
1131
+        '#title' => bts('Use CPU', array(), null, 'boinc:account-preferences-project'),
1132 1132
         '#type' => 'radios',
1133 1133
         '#options' => $form['boolean_options']['#value'],
1134 1134
         '#attributes' => array('class' => 'fancy'),
1135 1135
         '#default_value' => $default['no_cpu'] ? 0 : 1,
1136
-        '#description' => bts('Request CPU-only tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1136
+        '#description' => bts('Request CPU-only tasks from this project.', array(), null, 'boinc:account-preferences-project')
1137 1137
       );
1138 1138
     }
1139 1139
     if ($app_types->cuda) {
1140 1140
       $form['resource']['no_cuda'] = array(
1141
-        '#title' => bts('Use NVIDIA GPU', array(), NULL, 'boinc:account-preferences-project'),
1141
+        '#title' => bts('Use NVIDIA GPU', array(), null, 'boinc:account-preferences-project'),
1142 1142
         '#type' => 'radios',
1143 1143
         '#options' => $form['boolean_options']['#value'],
1144 1144
         '#attributes' => array('class' => 'fancy'),
1145 1145
         '#default_value' => $default['no_cuda'] ? 0 : 1,
1146
-        '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1146
+        '#description' => bts('Request NVIDIA GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1147 1147
       );
1148 1148
     }
1149 1149
     if ($app_types->ati) {
1150 1150
       $form['resource']['no_ati'] = array(
1151
-        '#title' => bts('Use AMD GPU', array(), NULL, 'boinc:account-preferences-project'),
1151
+        '#title' => bts('Use AMD GPU', array(), null, 'boinc:account-preferences-project'),
1152 1152
         '#type' => 'radios',
1153 1153
         '#options' => $form['boolean_options']['#value'],
1154 1154
         '#attributes' => array('class' => 'fancy'),
1155 1155
         '#default_value' => $default['no_ati'] ? 0 : 1,
1156
-        '#description' => bts('Request AMD GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1156
+        '#description' => bts('Request AMD GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1157 1157
       );
1158 1158
     }
1159 1159
     if ($app_types->intel_gpu) {
1160 1160
       $form['resource']['no_intel_gpu'] = array(
1161
-        '#title' => bts('Use INTEL GPU', array(), NULL, 'boinc:account-preferences-project'),
1161
+        '#title' => bts('Use INTEL GPU', array(), null, 'boinc:account-preferences-project'),
1162 1162
         '#type' => 'radios',
1163 1163
         '#options' => $form['boolean_options']['#value'],
1164 1164
         '#attributes' => array('class' => 'fancy'),
1165 1165
         '#default_value' => $default['no_intel_gpu'] ? 0 : 1,
1166
-        '#description' => bts('Request Intel GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1166
+        '#description' => bts('Request Intel GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1167 1167
       );
1168 1168
     }
1169 1169
     if ($app_types->apple_gpu) {
1170 1170
       $form['resource']['no_apple_gpu'] = array(
1171
-        '#title' => bts('Use Apple GPU', array(), NULL, 'boinc:account-preferences-project'),
1171
+        '#title' => bts('Use Apple GPU', array(), null, 'boinc:account-preferences-project'),
1172 1172
         '#type' => 'radios',
1173 1173
         '#options' => $form['boolean_options']['#value'],
1174 1174
         '#attributes' => array('class' => 'fancy'),
1175 1175
         '#default_value' => $default['no_apple_gpu'] ? 0 : 1,
1176
-        '#description' => bts('Request Apple GPU tasks from this project.', array(), NULL, 'boinc:account-preferences-project')
1176
+        '#description' => bts('Request Apple GPU tasks from this project.', array(), null, 'boinc:account-preferences-project')
1177 1177
       );
1178 1178
     }
1179 1179
   }
1180 1180
 
1181
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1181
+  if (variable_get('boinc_prefs_options_beta', false)) {
1182 1182
     $form['beta'] = array(
1183
-      '#title' => bts('Beta settings', array(), NULL, 'boinc:account-preferences-project'),
1183
+      '#title' => bts('Beta settings', array(), null, 'boinc:account-preferences-project'),
1184 1184
       '#type' => 'fieldset',
1185 1185
       '#description' => null,
1186
-      '#collapsible' => TRUE,
1187
-      '#collapsed' => FALSE
1186
+      '#collapsible' => true,
1187
+      '#collapsed' => false
1188 1188
     );
1189 1189
     $form['beta']['allow_beta_work'] = array(
1190
-      '#title' => bts('Run test applications?', array(), NULL, 'boinc:account-preferences-project'),
1190
+      '#title' => bts('Run test applications?', array(), null, 'boinc:account-preferences-project'),
1191 1191
       '#type' => 'radios',
1192 1192
       '#options' => $form['boolean_options']['#value'],
1193 1193
       '#attributes' => array('class' => 'fancy'),
1194 1194
       '#default_value' => ($default['allow_beta_work']) ? 1 : 0,
1195
-      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), NULL, 'boinc:account-preferences-project')
1195
+      '#description' => bts('This helps us develop applications, but may cause jobs to fail on your computer', array(), null, 'boinc:account-preferences-project')
1196 1196
     );
1197 1197
   }
1198 1198
 
@@ -1201,14 +1201,14 @@  discard block
 block discarded – undo
1201 1201
 
1202 1202
   // Set whether to use this preference set by default for new computers
1203 1203
   $form['default_set'] = array(
1204
-    '#title' => bts('Default set', array(), NULL, 'boinc:account-preferences-project'),
1204
+    '#title' => bts('Default set', array(), null, 'boinc:account-preferences-project'),
1205 1205
     '#type' => 'fieldset',
1206 1206
     '#description' => null,
1207
-    '#collapsible' => TRUE,
1208
-    '#collapsed' => FALSE
1207
+    '#collapsible' => true,
1208
+    '#collapsed' => false
1209 1209
   );
1210 1210
   $form['default_set']['default_venue'] = array(
1211
-    '#title' => bts('Set used for new computers', array(), NULL, 'boinc:account-preferences-project'),
1211
+    '#title' => bts('Set used for new computers', array(), null, 'boinc:account-preferences-project'),
1212 1212
     '#type' => 'radios',
1213 1213
     '#options' => $form['boolean_options']['#value'],
1214 1214
     '#attributes' => array('class' => 'fancy'),
@@ -1227,27 +1227,27 @@  discard block
 block discarded – undo
1227 1227
   $form['prefs']['submit'] = array(
1228 1228
     '#prefix' => '<li class="first tab">',
1229 1229
     '#type' => 'submit',
1230
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1230
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1231 1231
     '#suffix' => '</li>'
1232 1232
   );
1233 1233
   $form['prefs']['form control tabs'] = array(
1234
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1234
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1235 1235
   );
1236
-  if ($venue AND $venue != 'generic') {
1236
+  if ($venue and $venue != 'generic') {
1237 1237
     global $base_path;
1238 1238
     $form['prefs']['form control tabs']['#value'] .= '<li class="tab">' .
1239
-      l(bts('Clear', array(), NULL, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1239
+      l(bts('Clear', array(), null, 'boinc:form-clear'), "account/prefs/project/clear/{$venue}",
1240 1240
         array(
1241 1241
           'query' => 'destination=' . urlencode(drupal_get_path_alias('account/prefs/project/combined')),
1242 1242
           'attributes' => array(
1243 1243
             'onclick' => 'return confirm(\'' . bts('This will remove all of your settings from the @name preference set. Are you sure?',
1244
-              array('@name' => $venue), NULL, 'boinc:account-preferences') . '\')'
1244
+              array('@name' => $venue), null, 'boinc:account-preferences') . '\')'
1245 1245
           )
1246 1246
         )
1247 1247
       ) . '</li>';
1248 1248
   }
1249 1249
   $form['prefs']['view control'] = array(
1250
-      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), NULL, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1250
+      '#value' => '<li class="first alt tab">' . l('(' . bts('Show comparison view', array(), null, 'boinc:account-preferences') . ')', 'account/prefs/project/combined') . '</li>'
1251 1251
   );
1252 1252
   $form['prefs']['form control tabs suffix'] = array(
1253 1253
     '#value' => '</ul>'
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
   $ordered_array = array();
1268 1268
   $unordered_array = array();
1269 1269
   foreach ($xml['project_specific_preferences'] as $type => $element) {
1270
-    if (is_array($element) AND is_numeric(key($element))) {
1270
+    if (is_array($element) and is_numeric(key($element))) {
1271 1271
       foreach ($element as $ordered_element) {
1272 1272
         if (isset($ordered_element['@position'])) {
1273 1273
           $ordered_array[$ordered_element['@position']] = array($type => $ordered_element);
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
   // Check for app validation
1320 1320
   if (isset($validation_rules['apps'])) {
1321 1321
     if (isset($validation_rules['apps']['minimum selected'])
1322
-        AND $validation_rules['apps']['minimum selected'] > 0) {
1322
+        and $validation_rules['apps']['minimum selected'] > 0) {
1323 1323
       $apps_selected = 0;
1324 1324
       foreach ($validation_rules['apps']['list'] as $app) {
1325 1325
         if ($form_state['values']['applications'][$app]) $apps_selected++;
@@ -1327,14 +1327,14 @@  discard block
 block discarded – undo
1327 1327
       if ($apps_selected < $validation_rules['apps']['minimum selected']) {
1328 1328
         form_set_error(
1329 1329
           'applications',
1330
-          bts('At least one application must be selected', array(), NULL, 'boinc:account-preferences-project')
1330
+          bts('At least one application must be selected', array(), null, 'boinc:account-preferences-project')
1331 1331
         );
1332 1332
       }
1333 1333
       if ($apps_selected == count($validation_rules['apps']['list'])) {
1334 1334
         foreach ($validation_rules['apps']['list'] as $app) {
1335 1335
           unset($form_state['values']['applications'][$app]);
1336 1336
         }
1337
-        $form_state['storage']['all apps selected'] = TRUE;
1337
+        $form_state['storage']['all apps selected'] = true;
1338 1338
       }
1339 1339
     }
1340 1340
   }
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
   }
1369 1369
 
1370 1370
   // Beta preferences
1371
-  if (variable_get('boinc_prefs_options_beta', FALSE)) {
1371
+  if (variable_get('boinc_prefs_options_beta', false)) {
1372 1372
     $prefs['allow_beta_work'] = ($edit['beta']['allow_beta_work']) ? 1 : 0;
1373 1373
   }
1374 1374
 
@@ -1406,7 +1406,7 @@  discard block
 block discarded – undo
1406 1406
     watchdog('boincwork', 'Error updating project prefs for user @id: @message', array('@id' => $user->id, '@message' => mysqli_error()), WATCHDOG_ERROR);
1407 1407
     drupal_set_message(t('Your changes could not be saved. Please contact support!'), 'error');
1408 1408
   }
1409
-  elseif (!drupal_get_messages('status', FALSE)) {
1409
+  elseif (!drupal_get_messages('status', false)) {
1410 1410
     // Show this message if the set wasn't created automatically (in which case
1411 1411
     // there is a message tailored to that)
1412 1412
     drupal_set_message(t('Your preferences have been updated.
@@ -1441,31 +1441,31 @@  discard block
 block discarded – undo
1441 1441
   // Standard option sets
1442 1442
   $form['boolean_options'] = array(
1443 1443
     '#type' => 'value',
1444
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1444
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1445 1445
   );
1446 1446
 
1447 1447
   $default = array(
1448 1448
     'pm_send_notification' => '', // This is set already in pm_email_notify_user
1449 1449
     'friend_notification' => isset($account->friend_notification) ? $account->friend_notification : 0,
1450
-    'comments_per_page' => (isset($account->comments_per_page) AND $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451
-    'comments_order' => (isset($account->sort) AND $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1450
+    'comments_per_page' => (isset($account->comments_per_page) and $account->comments_per_page) ? $account->comments_per_page : variable_get('comment_default_per_page_forum', 50),
1451
+    'comments_order' => (isset($account->sort) and $account->sort) ? $account->sort : variable_get('comment_default_order_forum', COMMENT_ORDER_OLDEST_FIRST),
1452 1452
   );
1453 1453
 
1454 1454
   // General options
1455 1455
   $form['general'] = array(
1456 1456
     '#type' => 'fieldset',
1457
-    '#title' => bts('General settings', array(), NULL, 'boinc:account-preferences-community'),
1457
+    '#title' => bts('General settings', array(), null, 'boinc:account-preferences-community'),
1458 1458
     '#weight' => 0,
1459
-    '#collapsible' => TRUE,
1460
-    '#collapsed' => FALSE
1459
+    '#collapsible' => true,
1460
+    '#collapsed' => false
1461 1461
   );
1462 1462
   // Add the BOINC user name (non-unique, user editable)
1463 1463
   $form['general']['boincuser_name'] = array(
1464 1464
     '#type' => 'textfield',
1465
-    '#title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
1465
+    '#title' => bts('Name', array(), null, 'boinc:user-or-team-name'),
1466 1466
     '#default_value' => $account->boincuser_name,
1467 1467
     '#maxlength' => USERNAME_MAX_LENGTH,
1468
-    '#required' => TRUE,
1468
+    '#required' => true,
1469 1469
     '#description' => '',
1470 1470
     '#size' => 40
1471 1471
   );
@@ -1474,8 +1474,8 @@  discard block
 block discarded – undo
1474 1474
     $zones = _system_zonelist();
1475 1475
     $form['general']['timezone'] = array(
1476 1476
       '#type' => 'select',
1477
-      '#title' => bts('Time zone', array(), NULL, 'boinc:account-preferences-community'),
1478
-      '#default_value' => ($account->timezone !== NULL) ? $account->timezone : variable_get('date_default_timezone', 0),
1477
+      '#title' => bts('Time zone', array(), null, 'boinc:account-preferences-community'),
1478
+      '#default_value' => ($account->timezone !== null) ? $account->timezone : variable_get('date_default_timezone', 0),
1479 1479
       '#options' => $zones,
1480 1480
       '#description' => '',
1481 1481
     );
@@ -1484,10 +1484,10 @@  discard block
 block discarded – undo
1484 1484
   // Notification options
1485 1485
   $form['notifications'] = array(
1486 1486
     '#type' => 'fieldset',
1487
-    '#title' => bts('Notification settings', array(), NULL, 'boinc:account-preferences-community'),
1487
+    '#title' => bts('Notification settings', array(), null, 'boinc:account-preferences-community'),
1488 1488
     '#weight' => 5,
1489
-    '#collapsible' => TRUE,
1490
-    '#collapsed' => FALSE
1489
+    '#collapsible' => true,
1490
+    '#collapsed' => false
1491 1491
   );
1492 1492
   // Pull in private message notification handling and tweak the form
1493 1493
   $pm_notify = pm_email_notify_user('form', $edit, $account, 'account');
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
     $pm_notify['enable_pm_mail']['pm_send_notifications'],
1496 1496
     array(
1497 1497
       '#type' => 'radios',
1498
-      '#title' => bts('Receive email notification for private messages?', array(), NULL, 'boinc:account-preferences-community'),
1498
+      '#title' => bts('Receive email notification for private messages?', array(), null, 'boinc:account-preferences-community'),
1499 1499
       '#description' => ' ',
1500 1500
       '#options' => $form['boolean_options']['#value'],
1501 1501
       '#attributes' => array('class' => 'fancy')
@@ -1503,9 +1503,9 @@  discard block
 block discarded – undo
1503 1503
   );
1504 1504
   $form['notifications']['friend_notification'] = array(
1505 1505
     '#type' => 'radios',
1506
-    '#title' => bts('Receive email notification for friend requests?', array(), NULL, 'boinc:account-preferences-community'),
1506
+    '#title' => bts('Receive email notification for friend requests?', array(), null, 'boinc:account-preferences-community'),
1507 1507
     '#description' => ' ',
1508
-    '#options' => array(0 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1508
+    '#options' => array(0 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), -1 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
1509 1509
     '#attributes' => array('class' => 'fancy'),
1510 1510
     '#default_value' => $default['friend_notification']
1511 1511
   );
@@ -1521,10 +1521,10 @@  discard block
 block discarded – undo
1521 1521
     }
1522 1522
     $form['locale'] = array(
1523 1523
       '#type' => 'fieldset',
1524
-      '#title' => bts('Language settings', array(), NULL, 'boinc:account-preferences-community'),
1524
+      '#title' => bts('Language settings', array(), null, 'boinc:account-preferences-community'),
1525 1525
       '#weight' => 10,
1526
-      '#collapsible' => TRUE,
1527
-      '#collapsed' => FALSE,
1526
+      '#collapsible' => true,
1527
+      '#collapsed' => false,
1528 1528
     );
1529 1529
 
1530 1530
     // Get language negotiation settings.
@@ -1532,30 +1532,30 @@  discard block
 block discarded – undo
1532 1532
     $user_preferred_language = user_preferred_language($account);
1533 1533
     $form['locale']['language'] = array(
1534 1534
       '#type' => 'select',
1535
-      '#title' => bts('Language', array(), NULL, 'boinc:account-preferences-community'),
1535
+      '#title' => bts('Language', array(), null, 'boinc:account-preferences-community'),
1536 1536
       '#default_value' => check_plain($user_preferred_language->language),
1537 1537
       '#options' => $names,
1538
-      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), NULL, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), NULL, 'boinc:account-preferences-community'),
1538
+      '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? bts("This account's default language for e-mails and preferred language for site presentation.", array(), null, 'boinc:account-preferences-community') : bts("This account's default language for e-mails.", array(), null, 'boinc:account-preferences-community'),
1539 1539
     );
1540 1540
   }
1541 1541
 
1542 1542
   // Avatar options
1543 1543
   $form['gravatar'] = array(
1544 1544
     '#type' => 'item',
1545
-    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1546
-    '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), NULL, 'boinc:account-preferences-community'),
1545
+    '#value' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, it will be used for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), null, 'boinc:account-preferences-community'),
1546
+    '#description' => bts('Your Gravatar will not be shown if you upload a user picture.', array(), null, 'boinc:account-preferences-community'),
1547 1547
   );
1548 1548
   if (user_access('disable own gravatar', $account)) {
1549 1549
     $form['gravatar'] = array(
1550 1550
       '#type' => 'checkbox',
1551
-      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), NULL, 'boinc:account-preferences-community'),
1552
-      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), NULL, 'boinc:account-preferences-community'),
1551
+      '#title' => bts('If you have a <a href="@gravatar-check">valid Gravatar</a> associated with your e-mail address, use it for your user picture.', array('@gravatar-check' => 'http://en.gravatar.com/site/check/' . $account->mail), null, 'boinc:account-preferences-community'),
1552
+      '#description' => bts('Gravatar will not be shown if an avatar is uploaded.', array(), null, 'boinc:account-preferences-community'),
1553 1553
       '#default_value' => isset($account->gravatar) ? $account->gravatar : 0,
1554 1554
       '#disabled' => !empty($account->picture),
1555 1555
     );
1556 1556
   }
1557 1557
   $form['gravatar']['#weight'] = 15;
1558
-  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), NULL, 'boinc:account-preferences-community') . '</a></legend>';
1558
+  $form['gravatar']['#prefix'] = '<fieldset class="collapsible"><legend><a href="#">' . bts('Avatar settings', array(), null, 'boinc:account-preferences-community') . '</a></legend>';
1559 1559
   // Upload an avatar (pulled from profile_node_form):
1560 1560
   if (!empty($profile_form['field_image'])) {
1561 1561
     $form['field_image'] = $profile_form['field_image'];
@@ -1564,46 +1564,46 @@  discard block
 block discarded – undo
1564 1564
     $form['field_image'] = array(
1565 1565
       '#value' => '<div class="form-item">'
1566 1566
         . '<label class="placeholder">'
1567
-        . bts('This is not available until your profile is set up.', array(), NULL, 'boinc:account-preferences-community')
1567
+        . bts('This is not available until your profile is set up.', array(), null, 'boinc:account-preferences-community')
1568 1568
         . '</label>'
1569
-        . l(bts('Create a profile', array(), NULL, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1569
+        . l(bts('Create a profile', array(), null, 'boinc:account-preferences-community'), 'account/profile/edit', array('attributes' => array('class' => 'form-link')))
1570 1570
         . '</div>',
1571 1571
     );
1572 1572
   }
1573
-  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), NULL, 'boinc:account-preferences-community');
1573
+  $form['field_image'][0]['#title'] = bts('Upload an avatar', array(), null, 'boinc:account-preferences-community');
1574 1574
   $form['field_image']['#weight'] = 20;
1575 1575
   $form['field_image']['#suffix'] = '</fieldset>';
1576 1576
 
1577 1577
   // Forum options
1578 1578
   $form['forums'] = array(
1579 1579
     '#type' => 'fieldset',
1580
-    '#title' => bts('Forum settings', array(), NULL, 'boinc:account-preferences-community'),
1580
+    '#title' => bts('Forum settings', array(), null, 'boinc:account-preferences-community'),
1581 1581
     '#weight' => 25,
1582
-    '#collapsible' => TRUE,
1583
-    '#collapsed' => FALSE
1582
+    '#collapsible' => true,
1583
+    '#collapsed' => false
1584 1584
   );
1585 1585
   $form['forums']['comments_per_page'] = array(
1586 1586
     '#type' => 'select',
1587
-    '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), NULL, 'boinc:account-preferences-community'),
1587
+    '#title' => bts('In discussion topics, show at most @comments_per_page', array('@comments_per_page' => ''), null, 'boinc:account-preferences-community'),
1588 1588
     '#options' => array(10 => 10, 20 => 20, 30 => 30, 50 => 50, 100 => 100),
1589 1589
     '#default_value' => $default['comments_per_page']
1590 1590
   );
1591 1591
   // Can't have a typical Drupal form suffix on a select box?
1592 1592
   $form['forums']['comments_per_page_suffix'] = array(
1593
-    '#value' => '<span>' . bts('comments per page', array(), NULL, 'boinc:account-preferences-community') . '</span>'
1593
+    '#value' => '<span>' . bts('comments per page', array(), null, 'boinc:account-preferences-community') . '</span>'
1594 1594
   );
1595 1595
   $form['forums']['comments_order'] = array(
1596 1596
     '#type' => 'select',
1597
-    '#title' => bts('Sort comments in discussions', array(), NULL, 'boinc:account-preferences-community'),
1598
-    '#options' => array(1 => bts('Newest post first', array(), NULL, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), NULL, 'boinc:account-preferences-community')),
1597
+    '#title' => bts('Sort comments in discussions', array(), null, 'boinc:account-preferences-community'),
1598
+    '#options' => array(1 => bts('Newest post first', array(), null, 'boinc:account-preferences-community'), 2 => bts('Oldest post first', array(), null, 'boinc:account-preferences-community')),
1599 1599
     '#default_value' => $default['comments_order']
1600 1600
   );
1601 1601
   // Signature (pulled from user_edit_form):
1602 1602
   if (variable_get('user_signatures', 0) && module_exists('comment')) {
1603 1603
     $form['forums']['signature'] = array(
1604 1604
       '#type' => 'textarea',
1605
-      '#title' => bts('Signature', array(), NULL, 'boinc:account-preferences-community'),
1606
-      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), NULL, 'boinc:account-preferences-community'),
1605
+      '#title' => bts('Signature', array(), null, 'boinc:account-preferences-community'),
1606
+      '#description' => bts('Your signature will be publicly displayed at the end of your comments.', array(), null, 'boinc:account-preferences-community'),
1607 1607
       '#default_value' => $account->signature
1608 1608
       );
1609 1609
     // Prevent a "validation error" message when the user attempts to save with a default value they
@@ -1612,11 +1612,11 @@  discard block
 block discarded – undo
1612 1612
       drupal_set_message(t("The signature input format has been set to a format you don't have access to. It will be changed to a format you have access to when you save this page."));
1613 1613
       $edit['signature_format'] = FILTER_FORMAT_DEFAULT;
1614 1614
     }
1615
-    $form['forums']['signature_format'] = filter_form($account->signature_format, NULL, array('signature_format'));
1615
+    $form['forums']['signature_format'] = filter_form($account->signature_format, null, array('signature_format'));
1616 1616
     // Optionally hide signatures from comments
1617 1617
     $form['forums']['hide_signatures'] = array(
1618 1618
       '#type' => 'radios',
1619
-      '#title' => bts('Hide signatures in forums', array(), NULL, 'boinc:account-preferences-community'),
1619
+      '#title' => bts('Hide signatures in forums', array(), null, 'boinc:account-preferences-community'),
1620 1620
       '#description' => ' ',
1621 1621
       '#options' => $form['boolean_options']['#value'],
1622 1622
       '#attributes' => array('class' => 'fancy'),
@@ -1638,12 +1638,12 @@  discard block
 block discarded – undo
1638 1638
   $form['submit'] = array(
1639 1639
     '#prefix' => '<li class="first tab">',
1640 1640
     '#type' => 'submit',
1641
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1641
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1642 1642
     '#suffix' => '</li>',
1643 1643
     '#weight' => 1002,
1644 1644
   );
1645 1645
   $form['form control tabs'] = array(
1646
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1646
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>',
1647 1647
     '#weight' => 1003,
1648 1648
   );
1649 1649
   $form['form control tabs suffix'] = array(
@@ -1673,7 +1673,7 @@  discard block
 block discarded – undo
1673 1673
       form_set_error('boincuser_name',
1674 1674
         bts('You may not use username @blname, as that name is not allowed. Please choose another name.',
1675 1675
             array('@blname' => $edit['boincuser_name']),
1676
-            NULL, 'boinc:account-preferences-community'));
1676
+            null, 'boinc:account-preferences-community'));
1677 1677
       return false;
1678 1678
     }
1679 1679
   }
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
     $profile_node->field_image = $edit['field_image'];
1710 1710
     node_save($profile_node);
1711 1711
     // Flush this from the node cache or changes won't show up immediately!
1712
-    $profile_node = node_load($profile_node->nid, NULL, TRUE);
1712
+    $profile_node = node_load($profile_node->nid, null, true);
1713 1713
   }
1714 1714
 
1715 1715
   // All other settings
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
   }
1739 1739
   user_save($user, $settings);
1740 1740
 
1741
-  drupal_set_message(bts('Your community preferences have been updated.', array(), NULL, 'boinc:account-preferences-community'));
1741
+  drupal_set_message(bts('Your community preferences have been updated.', array(), null, 'boinc:account-preferences-community'));
1742 1742
 
1743 1743
   // Form will not redirect if storage is set; not good if language changes
1744 1744
   unset($form_state['storage']);
@@ -1772,26 +1772,26 @@  discard block
 block discarded – undo
1772 1772
   // Standard option sets
1773 1773
   $form['boolean_options'] = array(
1774 1774
     '#type' => 'value',
1775
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1775
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes'))
1776 1776
   );
1777 1777
 
1778 1778
   $form['privacy'] = array(
1779
-    '#title' => bts('Privacy settings', array(), NULL, 'boinc:account-preferences-privacy'),
1779
+    '#title' => bts('Privacy settings', array(), null, 'boinc:account-preferences-privacy'),
1780 1780
     '#type' => 'fieldset',
1781 1781
     '#description' => null,
1782
-    '#collapsible' => TRUE,
1783
-    '#collapsed' => FALSE
1782
+    '#collapsible' => true,
1783
+    '#collapsed' => false
1784 1784
   );
1785 1785
   $form['privacy']['send_email'] = array(
1786
-    '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1786
+    '#title' => bts('Is it OK for @project and your team (if any) to email you?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:account-preferences-privacy'),
1787 1787
     '#type' => 'radios',
1788 1788
     '#options' => $form['boolean_options']['#value'],
1789 1789
     '#attributes' => array('class' => 'fancy'),
1790 1790
     '#default_value' => $default['privacy']['send_email']
1791 1791
   );
1792 1792
   $form['privacy']['show_hosts'] = array(
1793
-    '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'),
1794
-    '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), NULL, 'boinc:account-preferences-privacy'),
1793
+    '#title' => bts('Should @project show your computers on its website?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:account-preferences-privacy'),
1794
+    '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), null, 'boinc:account-preferences-privacy'),
1795 1795
     '#type' => 'radios',
1796 1796
     '#options' => $form['boolean_options']['#value'],
1797 1797
     '#attributes' => array('class' => 'fancy'),
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
     // Set name to 'privacyconsent_SHORTNAME', which can be parsed
1807 1807
     // later in the submit function.
1808 1808
     $form['privacy']['privacyconsent_'.$ct['shortname']] = array(
1809
-      '#title' => bts($ct['description'], array(), NULL, 'boinc:account-preferences-privacy'),
1809
+      '#title' => bts($ct['description'], array(), null, 'boinc:account-preferences-privacy'),
1810 1810
       '#type' => 'radios',
1811 1811
       '#options' => $form['boolean_options']['#value'],
1812 1812
       '#attributes' => array('class' => 'fancy'),
@@ -1820,28 +1820,28 @@  discard block
 block discarded – undo
1820 1820
       $form['privacy']['privacyconsent_'.$ct['shortname']]['#description'] = bts('See our !privacy_policy_link for the current list of statistics exports.',
1821 1821
       array(
1822 1822
         '!privacy_policy_link' => l(
1823
-          bts('privacy policy', array(), NULL, 'boinc:account-preferences-privacy'),
1823
+          bts('privacy policy', array(), null, 'boinc:account-preferences-privacy'),
1824 1824
           '/privacy'
1825 1825
         )
1826 1826
       ),
1827
-      NULL, 'boinc:account-preferences-privacy');
1827
+      null, 'boinc:account-preferences-privacy');
1828 1828
     }
1829 1829
   }
1830 1830
 
1831 1831
   // Ignore and block users
1832 1832
   if (module_exists('ignore_user')) {
1833 1833
     $form['ignoreblock'] = array(
1834
-      '#title' => bts('Ignore Users', array(), NULL, 'boinc:account-preferences-privacy'),
1834
+      '#title' => bts('Ignore Users', array(), null, 'boinc:account-preferences-privacy'),
1835 1835
       '#type' => 'fieldset',
1836
-      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), NULL, 'boinc:ignore-user-help'),
1837
-      '#collapsible' => TRUE,
1838
-      '#collapsed' => FALSE
1836
+      '#description' => bts('<p>You may ignore users in the forums and block users from sending you private messages.<p>', array(), null, 'boinc:ignore-user-help'),
1837
+      '#collapsible' => true,
1838
+      '#collapsed' => false
1839 1839
     );
1840 1840
 
1841 1841
     // Table for ignored users
1842 1842
     $form['ignoreblock']['current_ignore_section'] = array(
1843 1843
       '#type' => 'item',
1844
-      '#value' => bts('Current users on your Ignore List', array(), NULL, 'boinc:ignore-user-list'),
1844
+      '#value' => bts('Current users on your Ignore List', array(), null, 'boinc:ignore-user-list'),
1845 1845
       '#prefix' => '<h4>',
1846 1846
       '#suffix' => '</h4>',
1847 1847
       '#weight' => -20,
@@ -1854,18 +1854,18 @@  discard block
 block discarded – undo
1854 1854
       );
1855 1855
       $form['ignoreblock']['delete'][$ignored_user['iuid']] = array(
1856 1856
         '#value' => l(
1857
-          bts('delete', array(), NULL, 'boinc:ignore-user-delete-button'),
1857
+          bts('delete', array(), null, 'boinc:ignore-user-delete-button'),
1858 1858
           'account/prefs/privacy/ignore_user/remove/'. $ignored_user['iuid'],
1859 1859
           array()
1860 1860
         ),
1861 1861
       );
1862 1862
     }
1863
-    $form['ignoreblock']['pager'] = array('#value' => theme('pager', NULL, 10, 0));
1863
+    $form['ignoreblock']['pager'] = array('#value' => theme('pager', null, 10, 0));
1864 1864
 
1865 1865
     // Sub-form to add user to ignore list
1866 1866
     $form['ignoreblock']['add_ignore_user_section'] = array(
1867 1867
       '#type' => 'item',
1868
-      '#value' => bts('Add user to Ignore List', array(), NULL, 'boinc:ignore-user-add'),
1868
+      '#value' => bts('Add user to Ignore List', array(), null, 'boinc:ignore-user-add'),
1869 1869
       '#prefix' => '<h4>',
1870 1870
       '#suffix' => '</h4>',
1871 1871
       '#weight' => 10,
@@ -1873,8 +1873,8 @@  discard block
 block discarded – undo
1873 1873
 
1874 1874
     $form['ignoreblock']['addusername_toignorelist'] = array(
1875 1875
       '#type' => 'textfield',
1876
-      '#title' => bts('Username', array(), NULL, 'boinc:ignore-user-searchbox'),
1877
-      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), NULL, 'boinc:ignore-user-searchbox-help'),
1876
+      '#title' => bts('Username', array(), null, 'boinc:ignore-user-searchbox'),
1877
+      '#description' => bts('To lookup a username start typing in the search box. A list of usernames will appear as you type. The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.', array(), null, 'boinc:ignore-user-searchbox-help'),
1878 1878
       '#weight' => 11,
1879 1879
       '#size' => 50,
1880 1880
       '#autocomplete_path' => 'boincuser/autocomplete',
@@ -1882,7 +1882,7 @@  discard block
 block discarded – undo
1882 1882
 
1883 1883
     $form['ignoreblock']['addusername_submit'] = array(
1884 1884
       '#type' => 'submit',
1885
-      '#value' => bts('Ignore user', array(), NULL, 'boinc:ignore-user-add'),
1885
+      '#value' => bts('Ignore user', array(), null, 'boinc:ignore-user-add'),
1886 1886
       '#submit' => array('_boincwork_ignore_list_form_submit'),
1887 1887
       '#weight' => 12,
1888 1888
       '#attributes' => array('class' => 'add_ignore_user'),
@@ -1900,13 +1900,13 @@  discard block
 block discarded – undo
1900 1900
   $form['prefs']['submit'] = array(
1901 1901
     '#prefix' => '<li class="first tab">',
1902 1902
     '#type' => 'submit',
1903
-    '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
1903
+    '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
1904 1904
     '#validate' => array('boincwork_privacyprefs_form_validate'),
1905 1905
     '#submit' => array('boincwork_privacyprefs_form_submit'),
1906 1906
     '#suffix' => '</li>'
1907 1907
   );
1908 1908
   $form['prefs']['form control tabs'] = array(
1909
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1909
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>'
1910 1910
   );
1911 1911
   $form['prefs']['form control tabs suffix'] = array(
1912 1912
     '#value' => '</ul>'
@@ -1924,8 +1924,8 @@  discard block
 block discarded – undo
1924 1924
   $output .= drupal_render($form['privacy']);
1925 1925
 
1926 1926
   $header = array(
1927
-    bts('Username', array(), NULL, 'boinc:ignore-user-list'),
1928
-    bts('Operations', array(), NULL, 'boinc:ignore-user-list')
1927
+    bts('Username', array(), null, 'boinc:ignore-user-list'),
1928
+    bts('Operations', array(), null, 'boinc:ignore-user-list')
1929 1929
   );
1930 1930
 
1931 1931
   $rows = array();
@@ -1940,7 +1940,7 @@  discard block
 block discarded – undo
1940 1940
   else {
1941 1941
     $rows[] = array(
1942 1942
       array(
1943
-        'data' => bts('You have not added any users to your Ignore List.', array(), NULL, 'boinc:ignore-user-list'),
1943
+        'data' => bts('You have not added any users to your Ignore List.', array(), null, 'boinc:ignore-user-list'),
1944 1944
         'colspan' => '2',
1945 1945
       )
1946 1946
     );
@@ -2019,9 +2019,9 @@  discard block
 block discarded – undo
2019 2019
     bts('@username has been added to your ignore list. See your !privacy_preferences for more details.',
2020 2020
       array(
2021 2021
         '@username' => $form_state['values']['addusername_toignorelist'],
2022
-        '!privacy_preferences' => l(bts('privacy preferences', array(), NULL, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2022
+        '!privacy_preferences' => l(bts('privacy preferences', array(), null, 'boinc:ignore-user-add'), 'account/prefs/privacy'),
2023 2023
       ),
2024
-      NULL, 'boinc:ignore-user-add'),
2024
+      null, 'boinc:ignore-user-add'),
2025 2025
     'status');
2026 2026
 }
2027 2027
 
@@ -2046,7 +2046,7 @@  discard block
 block discarded – undo
2046 2046
   // only non-js users/browsers will see the Apply Filter button.
2047 2047
   $form['submit'] = array(
2048 2048
     '#type' => 'submit',
2049
-    '#value' => bts('Apply Filter', array(), NULL, 'boinc:form-save'),
2049
+    '#value' => bts('Apply Filter', array(), null, 'boinc:form-save'),
2050 2050
     '#attributes' => array('class' => 'js-hide',),
2051 2051
   );
2052 2052
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/includes/boincteam.forms.inc 4 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     '#suffix' => '</li>',
120 120
   );
121 121
   $form['form control tabs'] = array(
122
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
122
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']).'</li>'
123 123
   );
124 124
   
125 125
   return $form;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
   
164 164
   // Create the team in the BOINC db
165 165
   
166
-  require_boinc(array('user','team'));
166
+  require_boinc(array('user', 'team'));
167 167
   $boinc_team = make_team(
168 168
     $account->boincuser_id,
169 169
     $values['name'],
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
     'teaser' => $teaser,
200 200
     'uid' => $user->uid,
201 201
     'path' => null,
202
-    'status' => 1,  // published or not - always publish
202
+    'status' => 1, // published or not - always publish
203 203
     'promote' => 0,
204 204
     'created' => $created_time,
205
-    'comment' => 0,  // comments disabled
205
+    'comment' => 0, // comments disabled
206 206
     'moderate' => 0,
207 207
     'sticky' => 0,
208 208
     'format' => $input_format
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
   $node['og_private'] = 0;
230 230
   */
231 231
   
232
-  $node = (object) $node; // node_save requires an object form
232
+  $node = (object)$node; // node_save requires an object form
233 233
   
234 234
   /*
235 235
   $node->field_description[]['value'] = $boincteam->description;
@@ -379,12 +379,12 @@  discard block
 block discarded – undo
379 379
       '#suffix' => '</li>',
380 380
     );
381 381
     $form['form control tabs'] = array(
382
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
382
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)).'</li>'
383 383
     );
384 384
   }
385 385
   else {
386 386
     $form['description'] = array(
387
-      '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">',
387
+      '#prefix' => '<div class="form-item"><label>'.bts('Description', array(), NULL, 'boinc:team-description').':</label></div><div class="form-item">',
388 388
       '#value' => $default['description'],
389 389
       '#suffix' => '</div>',
390 390
     );
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     '#suffix' => '</li>',
541 541
   );
542 542
   $form['form control tabs'] = array(
543
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
543
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)).'</li>'
544 544
   );
545 545
   
546 546
   //$form['#redirect'] = "community/teams/{$team_id}";
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
   drupal_set_title($mytitle);
657 657
 
658 658
   $form['emailteam']['header'] = array(
659
-    '#value'              => '<h1>' . $mytitle . '</h1>',
659
+    '#value'              => '<h1>'.$mytitle.'</h1>',
660 660
     '#weight'             => '-10',
661 661
     '#prefix'             => "<div id='sendmessageteammembers-header'>",
662 662
     '#suffix'             => "</div>",
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
   }
779 779
 
780 780
   // Check body
781
-  if ( ($message['body'] === NULL || $message['body'] === '') ) {
781
+  if (($message['body'] === NULL || $message['body'] === '')) {
782 782
     form_set_error('body',
783 783
       bts('Not allowed to send an empty message.', array(), NULL, 'boinc:team-message-form')
784 784
     );
@@ -803,8 +803,8 @@  discard block
 block discarded – undo
803 803
   global $base_path;
804 804
 
805 805
   $suid = $form_state['values']['_senderuid'];
806
-  $account = user_load(array('uid' => $suid ));
807
-  $site_url = $base_url . $base_path . "messages/new/" . $suid;
806
+  $account = user_load(array('uid' => $suid));
807
+  $site_url = $base_url.$base_path."messages/new/".$suid;
808 808
 
809 809
   // Form is validated, now send to all team members. Lookup boinc
810 810
   // id of all team members, and then use user_load() to load user
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
   // emails removed.
816 816
   $member_emails = _boincteam_emails($boinc_id);
817 817
   // Remove sender's email address, unless selfsend is true.
818
-  if ( !$form_state['values']['selfsend'] ) {
818
+  if (!$form_state['values']['selfsend']) {
819 819
     $pos = array_search($account->mail, $member_emails);
820 820
     unset($member_emails[$pos]);
821 821
   }
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 
840 840
   $om = bts(
841 841
     'Sent your email message to !number team members.',
842
-    array( '!number' => count($member_emails) ),
842
+    array('!number' => count($member_emails)),
843 843
     'NULL',
844 844
     'boinc:team-message-sent'
845 845
   );
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -135,8 +135,7 @@  discard block
 block discarded – undo
135 135
   
136 136
   if (!$name) {
137 137
     form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
138
-  }
139
-  else {
138
+  } else {
140 139
     require_boinc('boinc_db');
141 140
     if (BoincTeam::lookup_name($name)) {
142 141
       form_set_error('name', bts('A team named "@name" already exists.',
@@ -177,8 +176,7 @@  discard block
 block discarded – undo
177 176
   if ($boinc_team) {
178 177
     $boinc_user = BoincUser::lookup_id($account->boincuser_id);
179 178
     user_join_team($boinc_team, $boinc_user);
180
-  }
181
-  else {
179
+  } else {
182 180
     drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
183 181
     rules_invoke_event('boincteam_create_team_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
184 182
     watchdog('BOINC team', 'BOINC teams cannot be created for an unknown
@@ -212,8 +210,7 @@  discard block
 block discarded – undo
212 210
   if (module_exists('pathauto')) {
213 211
     module_load_include('inc', 'pathauto', 'pathauto');
214 212
     $node['path'] = pathauto_cleanstring($values['name']);
215
-  }
216
-  else {
213
+  } else {
217 214
     drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
218 215
     rules_invoke_event('boincteam_create_team_nopathauto_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
219 216
     watchdog('BOINC team', 'BOINC teams require the Pathauto module. Teams
@@ -381,8 +378,7 @@  discard block
 block discarded – undo
381 378
     $form['form control tabs'] = array(
382 379
       '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
383 380
     );
384
-  }
385
-  else {
381
+  } else {
386 382
     $form['description'] = array(
387 383
       '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">',
388 384
       '#value' => $default['description'],
@@ -412,12 +408,10 @@  discard block
 block discarded – undo
412 408
   
413 409
   if ($form_state['storage']['is_boinc_wide']) {
414 410
     form_set_error('none', bts('This team is managed by the BOINC-wide teams system and cannot be updated here.', array(), NULL, 'boinc:team-create/edit'));
415
-  }
416
-  else {
411
+  } else {
417 412
     if (!$name) {
418 413
       form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
419
-    }
420
-    else {
414
+    } else {
421 415
       $team = node_load($form_state['storage']['team_id']);
422 416
       if ($name != $team->title) {
423 417
         // If changing the name ("title" in Drupal terms), check that the new name is available
@@ -559,8 +553,7 @@  discard block
 block discarded – undo
559 553
   
560 554
   if (!$values['username']) {
561 555
     form_set_error('username', bts('BOINC username is required.', array(), NULL, 'boinc:team-add-admin'));
562
-  }
563
-  else {
556
+  } else {
564 557
     // Load user account associated with username
565 558
     $account = boincuser_privatemsg_name_lookup($values['username']);
566 559
     // Validate the account
@@ -570,24 +563,21 @@  discard block
 block discarded – undo
570 563
           '@username' => $account->boincuser_name
571 564
         ),
572 565
       NULL, 'boinc:team-add-admin'));
573
-    }
574
-    elseif (boincteam_is_founder($team_id, $account->uid)) {
566
+    } elseif (boincteam_is_founder($team_id, $account->uid)) {
575 567
       form_set_error('username', bts('@user is the founder of @team! Team founder already have all admin privileges.',
576 568
         array(
577 569
           '@user' => $account->boincuser_name,
578 570
           '@team' => $team->title,
579 571
         ),
580 572
         NULL, 'boinc:team-add-admin'));
581
-    }
582
-    elseif (boincteam_is_admin($team_id, $account->uid)) {
573
+    } elseif (boincteam_is_admin($team_id, $account->uid)) {
583 574
       form_set_error('username', bts('@user is already an admin of @team.',
584 575
         array(
585 576
           '@user' => $account->boincuser_name,
586 577
           '@team' => $team->title,
587 578
         ),
588 579
         NULL, 'boinc:team-add-admin'));
589
-    }
590
-    else {
580
+    } else {
591 581
       $form_state['storage']['boincuser_id'] = $account->boincuser_id;
592 582
       $form_state['storage']['boincuser_name'] = $account->boincuser_name;
593 583
     }
@@ -645,8 +635,7 @@  discard block
 block discarded – undo
645 635
   if (isset($form_state['values'])) {
646 636
     $subject   = $form_state['values']['subject'];
647 637
     $body      = $form_state['values']['body'];
648
-  }
649
-  else {
638
+  } else {
650 639
     $subject   = '';
651 640
     $body      = '';
652 641
   }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -22,22 +22,22 @@  discard block
 block discarded – undo
22 22
     'website' => '',
23 23
     'type' => 0,
24 24
     'country' => 0,
25
-    'joinable' => TRUE,
25
+    'joinable' => true,
26 26
     'description' => '',
27 27
   );
28 28
   
29 29
   // Standard option sets
30 30
   $form['boolean_options'] = array(
31 31
     '#type' => 'value',
32
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
32
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
33 33
   );
34 34
   
35 35
   // Vocabulary based option sets
36 36
   $form['type_options'] = array(
37 37
     '#type' => 'value',
38
-    '#value' => array(0 => bts('Choose type', array(), NULL, 'boinc:form-choose'))
38
+    '#value' => array(0 => bts('Choose type', array(), null, 'boinc:form-choose'))
39 39
   );
40
-  $vocabs = taxonomy_get_vocabularies(NULL);
40
+  $vocabs = taxonomy_get_vocabularies(null);
41 41
   foreach ($vocabs as $vocab) {
42 42
     switch ($vocab->name) {
43 43
     case 'Teams':
@@ -59,40 +59,40 @@  discard block
 block discarded – undo
59 59
   
60 60
   // Form elements
61 61
   $form['name'] = array(
62
-    '#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
62
+    '#title' => bts('Team name', array(), null, 'boinc:team-create/edit'),
63 63
     '#type' => 'textfield',
64 64
     '#default_value' => $default['name'],
65 65
     '#size' => 34,
66
-    '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
66
+    '#description' => bts('Text only, no HTML tags', array(), null, 'boinc:team-form-help'),
67 67
   );
68 68
   $form['name_html'] = array(
69
-    '#title' => bts('Team name -- HTML version (optional)', array(), NULL, 'boinc:team-create/edit'),
69
+    '#title' => bts('Team name -- HTML version (optional)', array(), null, 'boinc:team-create/edit'),
70 70
     '#type' => 'textfield',
71 71
     '#default_value' => $default['name_html'],
72 72
     '#size' => 34,
73
-    '#description' => bts('You may use limited HTML tags', array(), NULL, 'boinc:team-form-help'),
73
+    '#description' => bts('You may use limited HTML tags', array(), null, 'boinc:team-form-help'),
74 74
   );
75 75
   $form['website'] = array(
76
-    '#title' => bts('Team website (optional)', array(), NULL, 'boinc:team-create/edit'),
76
+    '#title' => bts('Team website (optional)', array(), null, 'boinc:team-create/edit'),
77 77
     '#type' => 'textfield',
78 78
     '#default_value' => $default['website'],
79 79
     '#size' => 34,
80
-    '#description' => bts("Displayed on the team's page", array(), NULL, 'boinc:team-create/edit'),
80
+    '#description' => bts("Displayed on the team's page", array(), null, 'boinc:team-create/edit'),
81 81
   );
82 82
   $form['type'] = array(
83
-    '#title' => bts('Type of team', array(), NULL, 'boinc:team-create/edit'),
83
+    '#title' => bts('Type of team', array(), null, 'boinc:team-create/edit'),
84 84
     '#type' => 'select',
85 85
     '#options' => $form['type_options']['#value'],
86 86
     '#default_value' => $default['type'],
87 87
   );
88 88
   $form['country'] = array(
89
-    '#title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
89
+    '#title' => bts('Country', array(), null, 'boinc:country-of-origin'),
90 90
     '#type' => 'select',
91 91
     '#options' => $form['country_options']['#value'],
92 92
     '#default_value' => $default['country'],
93 93
   );
94 94
   $form['joinable'] = array(
95
-    '#title' => bts('Accept new members?', array(), NULL, 'boinc:team-create/edit'),
95
+    '#title' => bts('Accept new members?', array(), null, 'boinc:team-create/edit'),
96 96
     '#type' => 'radios',
97 97
     '#options' => $form['boolean_options']['#value'],
98 98
     '#attributes' => array('class' => 'fancy'),
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     '#size' => 34,
101 101
   );
102 102
   $form['description'] = array(
103
-    '#title' => bts('Description of team', array(), NULL, 'boinc:team-create/edit'),
103
+    '#title' => bts('Description of team', array(), null, 'boinc:team-create/edit'),
104 104
     '#type' => 'textarea',
105 105
     '#default_value' => $default['description'],
106 106
     '#size' => 5,
107
-    '#description' => NULL,
107
+    '#description' => null,
108 108
   );
109 109
   $form['format'] = filter_form();
110 110
   
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
   $form['submit'] = array(
116 116
     '#prefix' => '<li class="first tab">',
117 117
     '#type' => 'submit',
118
-    '#value' => bts('Save team', array(), NULL, 'boinc:team-form-save'),
118
+    '#value' => bts('Save team', array(), null, 'boinc:team-form-save'),
119 119
     '#suffix' => '</li>',
120 120
   );
121 121
   $form['form control tabs'] = array(
122
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
122
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), $_GET['q']) . '</li>'
123 123
   );
124 124
   
125 125
   return $form;
@@ -134,18 +134,18 @@  discard block
 block discarded – undo
134 134
   $name = $values['name'];
135 135
   
136 136
   if (!$name) {
137
-    form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
137
+    form_set_error('name', bts('Team name is required.', array(), null, 'boinc:team-create/edit'));
138 138
   }
139 139
   else {
140 140
     require_boinc('boinc_db');
141 141
     if (BoincTeam::lookup_name($name)) {
142 142
       form_set_error('name', bts('A team named "@name" already exists.',
143
-        array('@name' => $name), NULL, 'boinc:team-create/edit'));
143
+        array('@name' => $name), null, 'boinc:team-create/edit'));
144 144
     }
145 145
   }
146 146
   
147
-  if (!$values['type'] OR !isset($values['type_options'][$values['type']])) {
148
-    form_set_error('type', bts('Please select a team type.', array(), NULL, 'boinc:team-create/edit'));
147
+  if (!$values['type'] or !isset($values['type_options'][$values['type']])) {
148
+    form_set_error('type', bts('Please select a team type.', array(), null, 'boinc:team-create/edit'));
149 149
   }
150 150
 }
151 151
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     rules_invoke_event('boincteam_create_team_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
184 184
     watchdog('BOINC team', 'BOINC teams cannot be created for an unknown
185 185
       reason.', 'error');
186
-    return FALSE;
186
+    return false;
187 187
   }
188 188
   
189 189
   // Create the team node in Drupal
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
   $team = node_load($team_id);
265 265
   $boincteam = boincteam_load(boincteam_lookup_id($team_id));
266 266
   
267
-  $is_boinc_wide = ($boincteam->seti_id > 0) ? TRUE : FALSE;
267
+  $is_boinc_wide = ($boincteam->seti_id > 0) ? true : false;
268 268
   
269 269
   $form_state['storage']['team_id'] = $team_id;
270 270
   $form_state['storage']['is_boinc_wide'] = $is_boinc_wide;
@@ -282,15 +282,15 @@  discard block
 block discarded – undo
282 282
   // Standard option sets
283 283
   $form['boolean_options'] = array(
284 284
     '#type' => 'value',
285
-    '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
285
+    '#value' => array(1 => bts('yes', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), null, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
286 286
   );
287 287
   
288 288
   // Vocabulary based option sets
289 289
   $form['type_options'] = array(
290 290
     '#type' => 'value',
291
-    '#value' => array(0 => bts('Choose type', array(), NULL, 'boinc:form-choose'))
291
+    '#value' => array(0 => bts('Choose type', array(), null, 'boinc:form-choose'))
292 292
   );
293
-  $vocabs = taxonomy_get_vocabularies(NULL);
293
+  $vocabs = taxonomy_get_vocabularies(null);
294 294
   foreach ($vocabs as $vocab) {
295 295
     switch ($vocab->name) {
296 296
     case 'Teams':
@@ -312,45 +312,45 @@  discard block
 block discarded – undo
312 312
   
313 313
   // Form elements
314 314
   $form['name'] = array(
315
-    '#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
315
+    '#title' => bts('Team name', array(), null, 'boinc:team-create/edit'),
316 316
     '#type' => 'textfield',
317 317
     '#default_value' => $default['name'],
318 318
     '#size' => 34,
319
-    '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
319
+    '#description' => bts('Text only, no HTML tags', array(), null, 'boinc:team-form-help'),
320 320
     '#disabled' => $is_boinc_wide,
321 321
   );
322 322
   $form['name_html'] = array(
323
-    '#title' => bts('Team name -- HTML version (optional)', array(), NULL, 'boinc:team-create/edit'),
323
+    '#title' => bts('Team name -- HTML version (optional)', array(), null, 'boinc:team-create/edit'),
324 324
     '#type' => 'textfield',
325 325
     '#default_value' => $default['name_html'],
326 326
     '#size' => 34,
327
-    '#description' => bts('You may use limited HTML tags', array(), NULL, 'boinc:team-form-help'),
327
+    '#description' => bts('You may use limited HTML tags', array(), null, 'boinc:team-form-help'),
328 328
     '#disabled' => $is_boinc_wide,
329 329
   );
330 330
   $form['website'] = array(
331
-    '#title' => bts('Team website (optional)', array(), NULL, 'boinc:team-create/edit'),
331
+    '#title' => bts('Team website (optional)', array(), null, 'boinc:team-create/edit'),
332 332
     '#type' => 'textfield',
333 333
     '#default_value' => $default['website'],
334 334
     '#size' => 34,
335
-    '#description' => bts("Displayed on the team's page", array(), NULL, 'boinc:team-create/edit'),
335
+    '#description' => bts("Displayed on the team's page", array(), null, 'boinc:team-create/edit'),
336 336
     '#disabled' => $is_boinc_wide,
337 337
   );
338 338
   $form['type'] = array(
339
-    '#title' => bts('Type of team', array(), NULL, 'boinc:team-create/edit'),
339
+    '#title' => bts('Type of team', array(), null, 'boinc:team-create/edit'),
340 340
     '#type' => 'select',
341 341
     '#options' => $form['type_options']['#value'],
342 342
     '#default_value' => $default['type'],
343 343
     '#disabled' => $is_boinc_wide,
344 344
   );
345 345
   $form['country'] = array(
346
-    '#title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
346
+    '#title' => bts('Country', array(), null, 'boinc:country-of-origin'),
347 347
     '#type' => 'select',
348 348
     '#options' => $form['country_options']['#value'],
349 349
     '#default_value' => $default['country'],
350 350
     '#disabled' => $is_boinc_wide,
351 351
   );
352 352
   $form['joinable'] = array(
353
-    '#title' => bts('Accept new members?', array(), NULL, 'boinc:team-create/edit'),
353
+    '#title' => bts('Accept new members?', array(), null, 'boinc:team-create/edit'),
354 354
     '#type' => 'radios',
355 355
     '#options' => $form['boolean_options']['#value'],
356 356
     '#attributes' => array('class' => 'fancy'),
@@ -360,11 +360,11 @@  discard block
 block discarded – undo
360 360
   );
361 361
   if (!$is_boinc_wide) {
362 362
     $form['description'] = array(
363
-      '#title' => bts('Description of team', array(), NULL, 'boinc:team-create/edit'),
363
+      '#title' => bts('Description of team', array(), null, 'boinc:team-create/edit'),
364 364
       '#type' => 'textarea',
365 365
       '#default_value' => $default['description'],
366 366
       '#size' => 5,
367
-      '#description' => NULL,
367
+      '#description' => null,
368 368
     );
369 369
     $form['format'] = filter_form();
370 370
     
@@ -375,25 +375,25 @@  discard block
 block discarded – undo
375 375
     $form['submit'] = array(
376 376
       '#prefix' => '<li class="first tab">',
377 377
       '#type' => 'submit',
378
-      '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
378
+      '#value' => bts('Save changes', array(), null, 'boinc:form-save'),
379 379
       '#suffix' => '</li>',
380 380
     );
381 381
     $form['form control tabs'] = array(
382
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
382
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', true)) . '</li>'
383 383
     );
384 384
   }
385 385
   else {
386 386
     $form['description'] = array(
387
-      '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">',
387
+      '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), null, 'boinc:team-description') . ':</label></div><div class="form-item">',
388 388
       '#value' => $default['description'],
389 389
       '#suffix' => '</div>',
390 390
     );
391 391
     drupal_set_message(
392 392
       bts('This is a BOINC-wide team. Changes can be made at the !site.',
393
-        array('!site' => l(bts('BOINC-wide teams site', array(), NULL, 'boinc:link-to-BOINC-wide-teams-Website'),
393
+        array('!site' => l(bts('BOINC-wide teams site', array(), null, 'boinc:link-to-BOINC-wide-teams-Website'),
394 394
           'http://boinc.berkeley.edu/teams/'
395 395
         )),
396
-        NULL, 'boinc:team-edit-warning-message'),
396
+        null, 'boinc:team-edit-warning-message'),
397 397
       'warning');
398 398
   }
399 399
   
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
   $name = $values['name'];
412 412
   
413 413
   if ($form_state['storage']['is_boinc_wide']) {
414
-    form_set_error('none', bts('This team is managed by the BOINC-wide teams system and cannot be updated here.', array(), NULL, 'boinc:team-create/edit'));
414
+    form_set_error('none', bts('This team is managed by the BOINC-wide teams system and cannot be updated here.', array(), null, 'boinc:team-create/edit'));
415 415
   }
416 416
   else {
417 417
     if (!$name) {
418
-      form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
418
+      form_set_error('name', bts('Team name is required.', array(), null, 'boinc:team-create/edit'));
419 419
     }
420 420
     else {
421 421
       $team = node_load($form_state['storage']['team_id']);
@@ -424,13 +424,13 @@  discard block
 block discarded – undo
424 424
         require_boinc('boinc_db');
425 425
         if (BoincTeam::lookup_name($name)) {
426 426
           form_set_error('name', bts('A team named "@name" already exists.',
427
-            array('@name' => $name), NULL, 'boinc:team-create/edit'));
427
+            array('@name' => $name), null, 'boinc:team-create/edit'));
428 428
         }
429 429
       }
430 430
     }
431 431
   
432
-    if (!$values['type'] OR !isset($values['type_options'][$values['type']])) {
433
-      form_set_error('type', bts('Please select a team type.', array(), NULL, 'boinc:team-create/edit'));
432
+    if (!$values['type'] or !isset($values['type_options'][$values['type']])) {
433
+      form_set_error('type', bts('Please select a team type.', array(), null, 'boinc:team-create/edit'));
434 434
     }
435 435
   }
436 436
 }
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
   
522 522
   // Form elements
523 523
   $form['username'] = array(
524
-    '#title' => bts('Enter BOINC username', array(), NULL, 'boinc:team--add-admin'),
524
+    '#title' => bts('Enter BOINC username', array(), null, 'boinc:team--add-admin'),
525 525
     '#description' => bts('The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.'),
526 526
     '#type' => 'textfield',
527 527
     '#default_value' => $default['username'],
@@ -536,11 +536,11 @@  discard block
 block discarded – undo
536 536
   $form['submit'] = array(
537 537
     '#prefix' => '<li class="first tab">',
538 538
     '#type' => 'submit',
539
-    '#value' => bts('Add', array(), NULL, 'boinc:form-add'),
539
+    '#value' => bts('Add', array(), null, 'boinc:form-add'),
540 540
     '#suffix' => '</li>',
541 541
   );
542 542
   $form['form control tabs'] = array(
543
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
543
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', true)) . '</li>'
544 544
   );
545 545
   
546 546
   //$form['#redirect'] = "community/teams/{$team_id}";
@@ -558,18 +558,18 @@  discard block
 block discarded – undo
558 558
   $team = node_load($team_id);
559 559
   
560 560
   if (!$values['username']) {
561
-    form_set_error('username', bts('BOINC username is required.', array(), NULL, 'boinc:team-add-admin'));
561
+    form_set_error('username', bts('BOINC username is required.', array(), null, 'boinc:team-add-admin'));
562 562
   }
563 563
   else {
564 564
     // Load user account associated with username
565 565
     $account = boincuser_privatemsg_name_lookup($values['username']);
566 566
     // Validate the account
567
-    if ((!$account) OR ($account->team != $team_id)) {
567
+    if ((!$account) or ($account->team != $team_id)) {
568 568
       form_set_error('username', bts('There is no user on your team with name @username.',
569 569
         array(
570 570
           '@username' => $account->boincuser_name
571 571
         ),
572
-      NULL, 'boinc:team-add-admin'));
572
+      null, 'boinc:team-add-admin'));
573 573
     }
574 574
     elseif (boincteam_is_founder($team_id, $account->uid)) {
575 575
       form_set_error('username', bts('@user is the founder of @team! Team founder already have all admin privileges.',
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
           '@user' => $account->boincuser_name,
578 578
           '@team' => $team->title,
579 579
         ),
580
-        NULL, 'boinc:team-add-admin'));
580
+        null, 'boinc:team-add-admin'));
581 581
     }
582 582
     elseif (boincteam_is_admin($team_id, $account->uid)) {
583 583
       form_set_error('username', bts('@user is already an admin of @team.',
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
           '@user' => $account->boincuser_name,
586 586
           '@team' => $team->title,
587 587
         ),
588
-        NULL, 'boinc:team-add-admin'));
588
+        null, 'boinc:team-add-admin'));
589 589
     }
590 590
     else {
591 591
       $form_state['storage']['boincuser_id'] = $account->boincuser_id;
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
   }
653 653
 
654 654
   // Title
655
-  $mytitle = bts('Send E-mail To All Team Members', array(), NULL, 'boinc:team-message-form');
655
+  $mytitle = bts('Send E-mail To All Team Members', array(), null, 'boinc:team-message-form');
656 656
   drupal_set_title($mytitle);
657 657
 
658 658
   $form['emailteam']['header'] = array(
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
   );
664 664
 
665 665
   $form['emailteam']['instructions'] = array(
666
-    '#value'              => bts('This will send an email to all team members. If a team member has opt-ed out of notification e-mails, they will not receive your message. At the bottom of your message, there will be a link allowing team members to send you a Direct Message. This link is added automatically, you do not need to add it below in the Message box. Your email address will not be shown to the recipients.', array(), NULL, 'boinc:team-message-form'),
666
+    '#value'              => bts('This will send an email to all team members. If a team member has opt-ed out of notification e-mails, they will not receive your message. At the bottom of your message, there will be a link allowing team members to send you a Direct Message. This link is added automatically, you do not need to add it below in the Message box. Your email address will not be shown to the recipients.', array(), null, 'boinc:team-message-form'),
667 667
     '#weight'             => '-8',
668 668
     '#prefix'             => "<div id='sendmessageteammembers-instructions'>",
669 669
     '#suffix'             => "</div>",
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
   // Subject
673 673
   $form['emailteam']['subject'] = array(
674 674
     '#type'               => 'textfield',
675
-    '#title'              => bts('Subject', array(), NULL, 'boinc:team-message-form'),
675
+    '#title'              => bts('Subject', array(), null, 'boinc:team-message-form'),
676 676
     '#size'               => 50,
677 677
     '#maxlength'          => 255,
678 678
     '#default_value'      => $subject,
@@ -682,17 +682,17 @@  discard block
 block discarded – undo
682 682
   // Body
683 683
   $form['emailteam']['body'] = array(
684 684
     '#type'               => 'textarea',
685
-    '#title'              => bts('Message', array(), NULL, 'boinc:team-message-form'),
685
+    '#title'              => bts('Message', array(), null, 'boinc:team-message-form'),
686 686
     '#rows'               => 8,
687 687
     '#weight'             => 0,
688 688
     '#default_value'      => $body,
689
-    '#resizable'          => TRUE,
689
+    '#resizable'          => true,
690 690
   );
691 691
 
692 692
   // checkbox for 'sent to self'
693 693
   $form['emailteam']['selfsend'] = array(
694 694
     '#type'    => 'checkbox',
695
-    '#title'   => bts('Check this box if you wish to be sent a copy of your message to your email address.', array(), NULL, 'boinc:team-message-form'),
695
+    '#title'   => bts('Check this box if you wish to be sent a copy of your message to your email address.', array(), null, 'boinc:team-message-form'),
696 696
     '#weight'  => 10,
697 697
     '#prefix'  => '<div class="clearfix" id="confirm-checkbox">',
698 698
     '#suffix'  => '</div>',
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 
715 715
   $form['emailteam']['submit'] = array(
716 716
     '#type'               => 'submit',
717
-    '#value'              => bts('Send message', array(), NULL, 'boinc:form-submit'),
717
+    '#value'              => bts('Send message', array(), null, 'boinc:form-submit'),
718 718
     '#submit'             => array('boincteam_sendmessagetoteam_submit'),
719 719
     '#validate'           => array('boincteam_sendmessagetoteam_validate'),
720 720
     '#weight'             => 1001,
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
     '#suffix'             => '</li>'
723 723
   );
724 724
 
725
-  $title = bts('Cancel', array(), NULL, 'boinc:form-cancel');
725
+  $title = bts('Cancel', array(), null, 'boinc:form-cancel');
726 726
   $url = "community/teams/{$team_id}";
727 727
   $form['emailteam']['cancel'] = array(
728 728
     '#value'              => l($title, $url, array('attributes' => array('id' => 'edit-cancel'))),
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
   // Avoid subjects which only consist of a space as these can not be clicked.
764 764
   $message['subject'] = trim($message['subject']);
765 765
 
766
-  $trimed_body = trim(truncate_utf8(strip_tags($message['body']), 50, TRUE, TRUE));
766
+  $trimed_body = trim(truncate_utf8(strip_tags($message['body']), 50, true, true));
767 767
   if (empty($message['subject']) && !empty($trimed_body)) {
768 768
     $message['subject'] = $trimed_body;
769 769
     $form_state['values']['subject'] = $message['subject'];
@@ -773,21 +773,21 @@  discard block
 block discarded – undo
773 773
   $message['subject'] = trim($message['subject']);
774 774
   if (empty($message['subject'])) {
775 775
     form_set_error('subject',
776
-      bts('Not allowed to send a message without subject', array(), NULL, 'boinc:team-message-form')
776
+      bts('Not allowed to send a message without subject', array(), null, 'boinc:team-message-form')
777 777
     );
778 778
   }
779 779
 
780 780
   // Check body
781
-  if ( ($message['body'] === NULL || $message['body'] === '') ) {
781
+  if ( ($message['body'] === null || $message['body'] === '') ) {
782 782
     form_set_error('body',
783
-      bts('Not allowed to send an empty message.', array(), NULL, 'boinc:team-message-form')
783
+      bts('Not allowed to send an empty message.', array(), null, 'boinc:team-message-form')
784 784
     );
785 785
   }
786 786
 
787 787
   // Check team id
788 788
   if (empty($message['_team_id'])) {
789 789
     form_set_error('team_id',
790
-      bts('Error, no team_id supplied.', array(), NULL, 'boinc:team-message-form')
790
+      bts('Error, no team_id supplied.', array(), null, 'boinc:team-message-form')
791 791
     );
792 792
   }
793 793
 
Please login to merge, or discard this patch.
Indentation   +333 added lines, -333 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
  * The definition of the create team form
15 15
  */
16 16
 function boincteam_create_form(&$form_state) {
17
-  $form = array();
17
+    $form = array();
18 18
 
19
-  $default = array(
19
+    $default = array(
20 20
     'name' => '',
21 21
     'name_html' => '',
22 22
     'website' => '',
@@ -24,105 +24,105 @@  discard block
 block discarded – undo
24 24
     'country' => 0,
25 25
     'joinable' => TRUE,
26 26
     'description' => '',
27
-  );
27
+    );
28 28
 
29
-  // Standard option sets
30
-  $form['boolean_options'] = array(
29
+    // Standard option sets
30
+    $form['boolean_options'] = array(
31 31
     '#type' => 'value',
32 32
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
33
-  );
33
+    );
34 34
 
35
-  // Vocabulary based option sets
36
-  $form['type_options'] = array(
35
+    // Vocabulary based option sets
36
+    $form['type_options'] = array(
37 37
     '#type' => 'value',
38 38
     '#value' => array(0 => bts('Choose type', array(), NULL, 'boinc:form-choose'))
39
-  );
40
-  $vocabs = taxonomy_get_vocabularies(NULL);
41
-  foreach ($vocabs as $vocab) {
39
+    );
40
+    $vocabs = taxonomy_get_vocabularies(NULL);
41
+    foreach ($vocabs as $vocab) {
42 42
     switch ($vocab->name) {
43 43
     case 'Teams':
44 44
       $team_types = taxonomy_get_tree($vocab->vid);
45
-      if (module_exists('internationalization')) {
45
+        if (module_exists('internationalization')) {
46 46
         $team_types = i18ntaxonomy_localize_terms($team_types);
47
-      }
48
-      foreach ($team_types as $team_type) {
47
+        }
48
+        foreach ($team_types as $team_type) {
49 49
         $form['type_options']['#value'][$team_type->tid] = $team_type->name;
50
-      }
51
-      break;
50
+        }
51
+        break;
52 52
     default:
53 53
     }
54
-  }
55
-  $form['country_options'] = array(
54
+    }
55
+    $form['country_options'] = array(
56 56
     '#type' => 'value',
57 57
     '#value' => boinccore_get_country_list(),
58
-  );
58
+    );
59 59
 
60
-  // Form elements
61
-  $form['name'] = array(
60
+    // Form elements
61
+    $form['name'] = array(
62 62
     '#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
63 63
     '#type' => 'textfield',
64 64
     '#default_value' => $default['name'],
65 65
     '#size' => 34,
66 66
     '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
67
-  );
68
-  $form['name_html'] = array(
67
+    );
68
+    $form['name_html'] = array(
69 69
     '#title' => bts('Team name -- HTML version (optional)', array(), NULL, 'boinc:team-create/edit'),
70 70
     '#type' => 'textfield',
71 71
     '#default_value' => $default['name_html'],
72 72
     '#size' => 34,
73 73
     '#description' => bts('You may use limited HTML tags', array(), NULL, 'boinc:team-form-help'),
74
-  );
75
-  $form['website'] = array(
74
+    );
75
+    $form['website'] = array(
76 76
     '#title' => bts('Team website (optional)', array(), NULL, 'boinc:team-create/edit'),
77 77
     '#type' => 'textfield',
78 78
     '#default_value' => $default['website'],
79 79
     '#size' => 34,
80 80
     '#description' => bts("Displayed on the team's page", array(), NULL, 'boinc:team-create/edit'),
81
-  );
82
-  $form['type'] = array(
81
+    );
82
+    $form['type'] = array(
83 83
     '#title' => bts('Type of team', array(), NULL, 'boinc:team-create/edit'),
84 84
     '#type' => 'select',
85 85
     '#options' => $form['type_options']['#value'],
86 86
     '#default_value' => $default['type'],
87
-  );
88
-  $form['country'] = array(
87
+    );
88
+    $form['country'] = array(
89 89
     '#title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
90 90
     '#type' => 'select',
91 91
     '#options' => $form['country_options']['#value'],
92 92
     '#default_value' => $default['country'],
93
-  );
94
-  $form['joinable'] = array(
93
+    );
94
+    $form['joinable'] = array(
95 95
     '#title' => bts('Accept new members?', array(), NULL, 'boinc:team-create/edit'),
96 96
     '#type' => 'radios',
97 97
     '#options' => $form['boolean_options']['#value'],
98 98
     '#attributes' => array('class' => 'fancy'),
99 99
     '#default_value' => $default['joinable'],
100 100
     '#size' => 34,
101
-  );
102
-  $form['description'] = array(
101
+    );
102
+    $form['description'] = array(
103 103
     '#title' => bts('Description of team', array(), NULL, 'boinc:team-create/edit'),
104 104
     '#type' => 'textarea',
105 105
     '#default_value' => $default['description'],
106 106
     '#size' => 5,
107 107
     '#description' => NULL,
108
-  );
109
-  $form['format'] = filter_form();
108
+    );
109
+    $form['format'] = filter_form();
110 110
 
111
-  // Form control
112
-  $form['form control tabs prefix'] = array(
111
+    // Form control
112
+    $form['form control tabs prefix'] = array(
113 113
     '#value' => '<ul class="form-control tab-list">'
114
-  );
115
-  $form['submit'] = array(
114
+    );
115
+    $form['submit'] = array(
116 116
     '#prefix' => '<li class="first tab">',
117 117
     '#type' => 'submit',
118 118
     '#value' => bts('Save team', array(), NULL, 'boinc:team-form-save'),
119 119
     '#suffix' => '</li>',
120
-  );
121
-  $form['form control tabs'] = array(
120
+    );
121
+    $form['form control tabs'] = array(
122 122
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), $_GET['q']) . '</li>'
123
-  );
123
+    );
124 124
 
125
-  return $form;
125
+    return $form;
126 126
 }
127 127
 
128 128
 /**
@@ -130,41 +130,41 @@  discard block
 block discarded – undo
130 130
  */
131 131
 function boincteam_create_form_validate($form, &$form_state) {
132 132
 
133
-  $values = $form_state['values'];
134
-  $name = $values['name'];
133
+    $values = $form_state['values'];
134
+    $name = $values['name'];
135 135
 
136
-  if (!$name) {
136
+    if (!$name) {
137 137
     form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
138
-  }
139
-  else {
138
+    }
139
+    else {
140 140
     require_boinc('boinc_db');
141 141
     if (BoincTeam::lookup_name($name)) {
142
-      form_set_error('name', bts('A team named "@name" already exists.',
142
+        form_set_error('name', bts('A team named "@name" already exists.',
143 143
         array('@name' => $name), NULL, 'boinc:team-create/edit'));
144 144
     }
145
-  }
145
+    }
146 146
 
147
-  if (!$values['type'] OR !isset($values['type_options'][$values['type']])) {
147
+    if (!$values['type'] OR !isset($values['type_options'][$values['type']])) {
148 148
     form_set_error('type', bts('Please select a team type.', array(), NULL, 'boinc:team-create/edit'));
149
-  }
149
+    }
150 150
 }
151 151
 
152 152
 /**
153 153
  * The create team submit handler
154 154
  */
155 155
 function boincteam_create_form_submit($form, &$form_state) {
156
-  global $user;
157
-  $account = user_load($user->uid);
158
-  $values = $form_state['values'];
159
-  //drupal_set_message('<pre>' . print_r($values,true) . '</pre>');
156
+    global $user;
157
+    $account = user_load($user->uid);
158
+    $values = $form_state['values'];
159
+    //drupal_set_message('<pre>' . print_r($values,true) . '</pre>');
160 160
 
161
-  $input_format = !empty($values['format']) ? $values['format'] : 4;
162
-  $values['description'] = check_markup($values['description'], $input_format);
161
+    $input_format = !empty($values['format']) ? $values['format'] : 4;
162
+    $values['description'] = check_markup($values['description'], $input_format);
163 163
 
164
-  // Create the team in the BOINC db
164
+    // Create the team in the BOINC db
165 165
 
166
-  require_boinc(array('user','team'));
167
-  $boinc_team = make_team(
166
+    require_boinc(array('user','team'));
167
+    $boinc_team = make_team(
168 168
     $account->boincuser_id,
169 169
     $values['name'],
170 170
     $values['website'],
@@ -172,27 +172,27 @@  discard block
 block discarded – undo
172 172
     $values['name_html'],
173 173
     $values['description'],
174 174
     $values['country']
175
-  );
175
+    );
176 176
 
177
-  if ($boinc_team) {
177
+    if ($boinc_team) {
178 178
     $boinc_user = BoincUser::lookup_id($account->boincuser_id);
179 179
     user_join_team($boinc_team, $boinc_user);
180
-  }
181
-  else {
180
+    }
181
+    else {
182 182
     drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
183 183
     rules_invoke_event('boincteam_create_team_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
184 184
     watchdog('BOINC team', 'BOINC teams cannot be created for an unknown
185 185
       reason.', 'error');
186 186
     return FALSE;
187
-  }
187
+    }
188 188
 
189
-  // Create the team node in Drupal
189
+    // Create the team node in Drupal
190 190
 
191
-  $teaser = node_teaser($values['description']);
192
-  $created_time = time();
193
-  $input_format = variable_get('filter_default_format', 1);
191
+    $teaser = node_teaser($values['description']);
192
+    $created_time = time();
193
+    $input_format = variable_get('filter_default_format', 1);
194 194
 
195
-  $node = array(
195
+    $node = array(
196 196
     'type' => 'team',
197 197
     'title' => $values['name'],
198 198
     'body' => $values['description'],
@@ -206,21 +206,21 @@  discard block
 block discarded – undo
206 206
     'moderate' => 0,
207 207
     'sticky' => 0,
208 208
     'format' => $input_format
209
-  );
209
+    );
210 210
 
211
-  // Use pathauto function, if available, to clean up the path
212
-  if (module_exists('pathauto')) {
211
+    // Use pathauto function, if available, to clean up the path
212
+    if (module_exists('pathauto')) {
213 213
     module_load_include('inc', 'pathauto', 'pathauto');
214 214
     $node['path'] = pathauto_cleanstring($values['name']);
215
-  }
216
-  else {
215
+    }
216
+    else {
217 217
     drupal_set_message(t('Teams cannot be created at this time. The @project administrators have been notified.', array('@project' => PROJECT)));
218 218
     rules_invoke_event('boincteam_create_team_nopathauto_error', $values['name'], variable_get('boinc_admin_mailing_list_subject_tag', ''));
219 219
     watchdog('BOINC team', 'BOINC teams require the Pathauto module. Teams
220 220
       cannot be created.', 'error');
221
-  }
221
+    }
222 222
 
223
-  /*
223
+    /*
224 224
   // Add special organic group properties
225 225
   $node['og_description'] = strip_tags($boincteam->description);
226 226
   $node['og_selective'] = OG_OPEN;
@@ -229,26 +229,26 @@  discard block
 block discarded – undo
229 229
   $node['og_private'] = 0;
230 230
   */
231 231
 
232
-  $node = (object) $node; // node_save requires an object form
232
+    $node = (object) $node; // node_save requires an object form
233 233
 
234
-  /*
234
+    /*
235 235
   $node->field_description[]['value'] = $boincteam->description;
236 236
   $node->field_url[]['value'] = $boincteam->url;
237 237
   $node->field_country[]['value'] = $boincteam->country;
238 238
   */
239 239
 
240
-  $node->taxonomy[] = taxonomy_get_term($values['type']);
240
+    $node->taxonomy[] = taxonomy_get_term($values['type']);
241 241
 
242
-  // Save the team node
243
-  node_save($node);
242
+    // Save the team node
243
+    node_save($node);
244 244
 
245
-  // Save the team IDs to a BOINC <--> Drupal reference table.
246
-  db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boinc_team->id, $node->nid);
245
+    // Save the team IDs to a BOINC <--> Drupal reference table.
246
+    db_query('INSERT INTO {boincteam} (team_id, nid) VALUES (%d, %d)', $boinc_team->id, $node->nid);
247 247
 
248
-  drupal_set_message(t('Team "@name" has been created.',
248
+    drupal_set_message(t('Team "@name" has been created.',
249 249
     array('@name' => $values['name'])));
250 250
 
251
-  $form_state['redirect'] = "community/teams/{$node->nid}";
251
+    $form_state['redirect'] = "community/teams/{$node->nid}";
252 252
 }
253 253
 
254 254
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -259,17 +259,17 @@  discard block
 block discarded – undo
259 259
  * The definition of the edit team form
260 260
  */
261 261
 function boincteam_edit_form(&$form_state, $team_id) {
262
-  $form = array();
262
+    $form = array();
263 263
 
264
-  $team = node_load($team_id);
265
-  $boincteam = boincteam_load(boincteam_lookup_id($team_id));
264
+    $team = node_load($team_id);
265
+    $boincteam = boincteam_load(boincteam_lookup_id($team_id));
266 266
 
267
-  $is_boinc_wide = ($boincteam->seti_id > 0) ? TRUE : FALSE;
267
+    $is_boinc_wide = ($boincteam->seti_id > 0) ? TRUE : FALSE;
268 268
 
269
-  $form_state['storage']['team_id'] = $team_id;
270
-  $form_state['storage']['is_boinc_wide'] = $is_boinc_wide;
269
+    $form_state['storage']['team_id'] = $team_id;
270
+    $form_state['storage']['is_boinc_wide'] = $is_boinc_wide;
271 271
 
272
-  $default = array(
272
+    $default = array(
273 273
     'name' => $boincteam->name,
274 274
     'name_html' => $boincteam->name_html,
275 275
     'website' => $boincteam->url,
@@ -277,79 +277,79 @@  discard block
 block discarded – undo
277 277
     'country' => $boincteam->country,
278 278
     'joinable' => $boincteam->joinable,
279 279
     'description' => $boincteam->description,
280
-  );
280
+    );
281 281
 
282
-  // Standard option sets
283
-  $form['boolean_options'] = array(
282
+    // Standard option sets
283
+    $form['boolean_options'] = array(
284 284
     '#type' => 'value',
285 285
     '#value' => array(1 => bts('yes', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-no'), 0 => bts('no', array(), NULL, 'boinc:form-yes-no:-1:binary-form-option-pairs-with-yes')),
286
-  );
286
+    );
287 287
 
288
-  // Vocabulary based option sets
289
-  $form['type_options'] = array(
288
+    // Vocabulary based option sets
289
+    $form['type_options'] = array(
290 290
     '#type' => 'value',
291 291
     '#value' => array(0 => bts('Choose type', array(), NULL, 'boinc:form-choose'))
292
-  );
293
-  $vocabs = taxonomy_get_vocabularies(NULL);
294
-  foreach ($vocabs as $vocab) {
292
+    );
293
+    $vocabs = taxonomy_get_vocabularies(NULL);
294
+    foreach ($vocabs as $vocab) {
295 295
     switch ($vocab->name) {
296 296
     case 'Teams':
297 297
       $team_types = taxonomy_get_tree($vocab->vid);
298
-      if (module_exists('internationalization')) {
298
+        if (module_exists('internationalization')) {
299 299
         $team_types = i18ntaxonomy_localize_terms($team_types);
300
-      }
301
-      foreach ($team_types as $team_type) {
300
+        }
301
+        foreach ($team_types as $team_type) {
302 302
         $form['type_options']['#value'][$team_type->tid] = $team_type->name;
303
-      }
304
-      break;
303
+        }
304
+        break;
305 305
     default:
306 306
     }
307
-  }
308
-  $form['country_options'] = array(
307
+    }
308
+    $form['country_options'] = array(
309 309
     '#type' => 'value',
310 310
     '#value' => boinccore_get_country_list(),
311
-  );
311
+    );
312 312
 
313
-  // Form elements
314
-  $form['name'] = array(
313
+    // Form elements
314
+    $form['name'] = array(
315 315
     '#title' => bts('Team name', array(), NULL, 'boinc:team-create/edit'),
316 316
     '#type' => 'textfield',
317 317
     '#default_value' => $default['name'],
318 318
     '#size' => 34,
319 319
     '#description' => bts('Text only, no HTML tags', array(), NULL, 'boinc:team-form-help'),
320 320
     '#disabled' => $is_boinc_wide,
321
-  );
322
-  $form['name_html'] = array(
321
+    );
322
+    $form['name_html'] = array(
323 323
     '#title' => bts('Team name -- HTML version (optional)', array(), NULL, 'boinc:team-create/edit'),
324 324
     '#type' => 'textfield',
325 325
     '#default_value' => $default['name_html'],
326 326
     '#size' => 34,
327 327
     '#description' => bts('You may use limited HTML tags', array(), NULL, 'boinc:team-form-help'),
328 328
     '#disabled' => $is_boinc_wide,
329
-  );
330
-  $form['website'] = array(
329
+    );
330
+    $form['website'] = array(
331 331
     '#title' => bts('Team website (optional)', array(), NULL, 'boinc:team-create/edit'),
332 332
     '#type' => 'textfield',
333 333
     '#default_value' => $default['website'],
334 334
     '#size' => 34,
335 335
     '#description' => bts("Displayed on the team's page", array(), NULL, 'boinc:team-create/edit'),
336 336
     '#disabled' => $is_boinc_wide,
337
-  );
338
-  $form['type'] = array(
337
+    );
338
+    $form['type'] = array(
339 339
     '#title' => bts('Type of team', array(), NULL, 'boinc:team-create/edit'),
340 340
     '#type' => 'select',
341 341
     '#options' => $form['type_options']['#value'],
342 342
     '#default_value' => $default['type'],
343 343
     '#disabled' => $is_boinc_wide,
344
-  );
345
-  $form['country'] = array(
344
+    );
345
+    $form['country'] = array(
346 346
     '#title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
347 347
     '#type' => 'select',
348 348
     '#options' => $form['country_options']['#value'],
349 349
     '#default_value' => $default['country'],
350 350
     '#disabled' => $is_boinc_wide,
351
-  );
352
-  $form['joinable'] = array(
351
+    );
352
+    $form['joinable'] = array(
353 353
     '#title' => bts('Accept new members?', array(), NULL, 'boinc:team-create/edit'),
354 354
     '#type' => 'radios',
355 355
     '#options' => $form['boolean_options']['#value'],
@@ -357,49 +357,49 @@  discard block
 block discarded – undo
357 357
     '#default_value' => $default['joinable'],
358 358
     '#size' => 34,
359 359
     '#disabled' => $is_boinc_wide,
360
-  );
361
-  if (!$is_boinc_wide) {
360
+    );
361
+    if (!$is_boinc_wide) {
362 362
     $form['description'] = array(
363
-      '#title' => bts('Description of team', array(), NULL, 'boinc:team-create/edit'),
364
-      '#type' => 'textarea',
365
-      '#default_value' => $default['description'],
366
-      '#size' => 5,
367
-      '#description' => NULL,
363
+        '#title' => bts('Description of team', array(), NULL, 'boinc:team-create/edit'),
364
+        '#type' => 'textarea',
365
+        '#default_value' => $default['description'],
366
+        '#size' => 5,
367
+        '#description' => NULL,
368 368
     );
369 369
     $form['format'] = filter_form();
370 370
 
371 371
     // Form control
372 372
     $form['form control tabs prefix'] = array(
373
-      '#value' => '<ul class="form-control tab-list">'
373
+        '#value' => '<ul class="form-control tab-list">'
374 374
     );
375 375
     $form['submit'] = array(
376
-      '#prefix' => '<li class="first tab">',
377
-      '#type' => 'submit',
378
-      '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
379
-      '#suffix' => '</li>',
376
+        '#prefix' => '<li class="first tab">',
377
+        '#type' => 'submit',
378
+        '#value' => bts('Save changes', array(), NULL, 'boinc:form-save'),
379
+        '#suffix' => '</li>',
380 380
     );
381 381
     $form['form control tabs'] = array(
382
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
382
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
383 383
     );
384
-  }
385
-  else {
384
+    }
385
+    else {
386 386
     $form['description'] = array(
387
-      '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">',
388
-      '#value' => $default['description'],
389
-      '#suffix' => '</div>',
387
+        '#prefix' => '<div class="form-item"><label>' . bts('Description', array(), NULL, 'boinc:team-description') . ':</label></div><div class="form-item">',
388
+        '#value' => $default['description'],
389
+        '#suffix' => '</div>',
390 390
     );
391 391
     drupal_set_message(
392
-      bts('This is a BOINC-wide team. Changes can be made at the !site.',
392
+        bts('This is a BOINC-wide team. Changes can be made at the !site.',
393 393
         array('!site' => l(bts('BOINC-wide teams site', array(), NULL, 'boinc:link-to-BOINC-wide-teams-Website'),
394
-          'http://boinc.berkeley.edu/teams/'
394
+            'http://boinc.berkeley.edu/teams/'
395 395
         )),
396 396
         NULL, 'boinc:team-edit-warning-message'),
397
-      'warning');
398
-  }
397
+        'warning');
398
+    }
399 399
 
400
-  $form['#redirect'] = "community/teams/{$team_id}";
400
+    $form['#redirect'] = "community/teams/{$team_id}";
401 401
 
402
-  return $form;
402
+    return $form;
403 403
 }
404 404
 
405 405
 /**
@@ -407,32 +407,32 @@  discard block
 block discarded – undo
407 407
  */
408 408
 function boincteam_edit_form_validate($form, &$form_state) {
409 409
 
410
-  $values = $form_state['values'];
411
-  $name = $values['name'];
410
+    $values = $form_state['values'];
411
+    $name = $values['name'];
412 412
 
413
-  if ($form_state['storage']['is_boinc_wide']) {
413
+    if ($form_state['storage']['is_boinc_wide']) {
414 414
     form_set_error('none', bts('This team is managed by the BOINC-wide teams system and cannot be updated here.', array(), NULL, 'boinc:team-create/edit'));
415
-  }
416
-  else {
415
+    }
416
+    else {
417 417
     if (!$name) {
418
-      form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
418
+        form_set_error('name', bts('Team name is required.', array(), NULL, 'boinc:team-create/edit'));
419 419
     }
420 420
     else {
421
-      $team = node_load($form_state['storage']['team_id']);
422
-      if ($name != $team->title) {
421
+        $team = node_load($form_state['storage']['team_id']);
422
+        if ($name != $team->title) {
423 423
         // If changing the name ("title" in Drupal terms), check that the new name is available
424 424
         require_boinc('boinc_db');
425 425
         if (BoincTeam::lookup_name($name)) {
426
-          form_set_error('name', bts('A team named "@name" already exists.',
426
+            form_set_error('name', bts('A team named "@name" already exists.',
427 427
             array('@name' => $name), NULL, 'boinc:team-create/edit'));
428 428
         }
429
-      }
429
+        }
430 430
     }
431 431
 
432 432
     if (!$values['type'] OR !isset($values['type_options'][$values['type']])) {
433
-      form_set_error('type', bts('Please select a team type.', array(), NULL, 'boinc:team-create/edit'));
433
+        form_set_error('type', bts('Please select a team type.', array(), NULL, 'boinc:team-create/edit'));
434
+    }
434 435
     }
435
-  }
436 436
 }
437 437
 
438 438
 /**
@@ -440,18 +440,18 @@  discard block
 block discarded – undo
440 440
  */
441 441
 function boincteam_edit_form_submit($form, &$form_state) {
442 442
 
443
-  $team_id = $form_state['storage']['team_id'];
444
-  $values = $form_state['values'];
443
+    $team_id = $form_state['storage']['team_id'];
444
+    $values = $form_state['values'];
445 445
 
446
-  $team = node_load($team_id);
447
-  $boincteam_id = boincteam_lookup_id($team_id);
446
+    $team = node_load($team_id);
447
+    $boincteam_id = boincteam_lookup_id($team_id);
448 448
 
449
-  $input_format = !empty($values['format']) ? $values['format'] : 4;
450
-  $values['description'] = check_markup($values['description'], $input_format);
449
+    $input_format = !empty($values['format']) ? $values['format'] : 4;
450
+    $values['description'] = check_markup($values['description'], $input_format);
451 451
 
452
-  // Update the team in the BOINC db
453
-  db_set_active('boinc_rw');
454
-  db_query("
452
+    // Update the team in the BOINC db
453
+    db_set_active('boinc_rw');
454
+    db_query("
455 455
     UPDATE {team} SET
456 456
       name = '%s',
457 457
       name_lc = '%s',
@@ -471,32 +471,32 @@  discard block
 block discarded – undo
471 471
     $values['country'],
472 472
     $values['joinable'],
473 473
     $boincteam_id
474
-  );
475
-  db_set_active('default');
474
+    );
475
+    db_set_active('default');
476 476
 
477
-  // Update the team node in Drupal
477
+    // Update the team node in Drupal
478 478
 
479
-  $team->title = $values['name'];
480
-  $team->body = $values['description'];
481
-  $team->teaser = node_teaser($values['description']);
479
+    $team->title = $values['name'];
480
+    $team->body = $values['description'];
481
+    $team->teaser = node_teaser($values['description']);
482 482
 
483
-  /*
483
+    /*
484 484
   $node->field_description[]['value'] = $boincteam->description;
485 485
   $node->field_url[]['value'] = $boincteam->url;
486 486
   $node->field_country[]['value'] = $boincteam->country;
487 487
   */
488 488
 
489
-  // Replace any existing taxonomy with the new one
490
-  $team->taxonomy = array(taxonomy_get_term($values['type']));
489
+    // Replace any existing taxonomy with the new one
490
+    $team->taxonomy = array(taxonomy_get_term($values['type']));
491 491
 
492
-  // Save the team node
493
-  node_save($team);
492
+    // Save the team node
493
+    node_save($team);
494 494
 
495
-  drupal_set_message(t('Details for "@team" have been updated.',
495
+    drupal_set_message(t('Details for "@team" have been updated.',
496 496
     array('@team' => $values['name'])));
497 497
 
498
-  // The storage variable quietly kills redirection for some reason... unset it
499
-  unset($form_state['storage']);
498
+    // The storage variable quietly kills redirection for some reason... unset it
499
+    unset($form_state['storage']);
500 500
 }
501 501
 
502 502
 
@@ -508,44 +508,44 @@  discard block
 block discarded – undo
508 508
  * The definition of the add team admin form
509 509
  */
510 510
 function boincteam_add_admin_form(&$form_state, $team_id) {
511
-  $form = array();
511
+    $form = array();
512 512
 
513
-  $team = node_load($team_id);
514
-  $boincteam = boincteam_load(boincteam_lookup_id($team_id));
513
+    $team = node_load($team_id);
514
+    $boincteam = boincteam_load(boincteam_lookup_id($team_id));
515 515
 
516
-  $form_state['storage']['team_id'] = $team_id;
516
+    $form_state['storage']['team_id'] = $team_id;
517 517
 
518
-  $default = array(
518
+    $default = array(
519 519
     'username' => '',
520
-  );
520
+    );
521 521
 
522
-  // Form elements
523
-  $form['username'] = array(
522
+    // Form elements
523
+    $form['username'] = array(
524 524
     '#title' => bts('Enter BOINC username', array(), NULL, 'boinc:team--add-admin'),
525 525
     '#description' => bts('The number appearing in the suffix is the BOINC id. You can find a user\'s BOINC id on their user profile page.'),
526 526
     '#type' => 'textfield',
527 527
     '#default_value' => $default['username'],
528 528
     '#size' => 34,
529 529
     '#autocomplete_path' => "community/teams/${team_id}/user-name-autocomplete",
530
-  );
530
+    );
531 531
 
532
-  // Form control
533
-  $form['form control tabs prefix'] = array(
532
+    // Form control
533
+    $form['form control tabs prefix'] = array(
534 534
     '#value' => '<ul class="form-control tab-list">'
535
-  );
536
-  $form['submit'] = array(
535
+    );
536
+    $form['submit'] = array(
537 537
     '#prefix' => '<li class="first tab">',
538 538
     '#type' => 'submit',
539 539
     '#value' => bts('Add', array(), NULL, 'boinc:form-add'),
540 540
     '#suffix' => '</li>',
541
-  );
542
-  $form['form control tabs'] = array(
541
+    );
542
+    $form['form control tabs'] = array(
543 543
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), strstr($_GET['q'], '/edit', TRUE)) . '</li>'
544
-  );
544
+    );
545 545
 
546
-  //$form['#redirect'] = "community/teams/{$team_id}";
546
+    //$form['#redirect'] = "community/teams/{$team_id}";
547 547
 
548
-  return $form;
548
+    return $form;
549 549
 }
550 550
 
551 551
 /**
@@ -553,45 +553,45 @@  discard block
 block discarded – undo
553 553
  */
554 554
 function boincteam_add_admin_form_validate($form, &$form_state) {
555 555
 
556
-  $team_id = $form_state['storage']['team_id'];
557
-  $values = $form_state['values'];
558
-  $team = node_load($team_id);
556
+    $team_id = $form_state['storage']['team_id'];
557
+    $values = $form_state['values'];
558
+    $team = node_load($team_id);
559 559
 
560
-  if (!$values['username']) {
560
+    if (!$values['username']) {
561 561
     form_set_error('username', bts('BOINC username is required.', array(), NULL, 'boinc:team-add-admin'));
562
-  }
563
-  else {
562
+    }
563
+    else {
564 564
     // Load user account associated with username
565 565
     $account = boincuser_privatemsg_name_lookup($values['username']);
566 566
     // Validate the account
567 567
     if ((!$account) OR ($account->team != $team_id)) {
568
-      form_set_error('username', bts('There is no user on your team with name @username.',
568
+        form_set_error('username', bts('There is no user on your team with name @username.',
569 569
         array(
570
-          '@username' => $account->boincuser_name
570
+            '@username' => $account->boincuser_name
571 571
         ),
572
-      NULL, 'boinc:team-add-admin'));
572
+        NULL, 'boinc:team-add-admin'));
573 573
     }
574 574
     elseif (boincteam_is_founder($team_id, $account->uid)) {
575
-      form_set_error('username', bts('@user is the founder of @team! Team founder already have all admin privileges.',
575
+        form_set_error('username', bts('@user is the founder of @team! Team founder already have all admin privileges.',
576 576
         array(
577
-          '@user' => $account->boincuser_name,
578
-          '@team' => $team->title,
577
+            '@user' => $account->boincuser_name,
578
+            '@team' => $team->title,
579 579
         ),
580 580
         NULL, 'boinc:team-add-admin'));
581 581
     }
582 582
     elseif (boincteam_is_admin($team_id, $account->uid)) {
583
-      form_set_error('username', bts('@user is already an admin of @team.',
583
+        form_set_error('username', bts('@user is already an admin of @team.',
584 584
         array(
585
-          '@user' => $account->boincuser_name,
586
-          '@team' => $team->title,
585
+            '@user' => $account->boincuser_name,
586
+            '@team' => $team->title,
587 587
         ),
588 588
         NULL, 'boinc:team-add-admin'));
589 589
     }
590 590
     else {
591
-      $form_state['storage']['boincuser_id'] = $account->boincuser_id;
592
-      $form_state['storage']['boincuser_name'] = $account->boincuser_name;
591
+        $form_state['storage']['boincuser_id'] = $account->boincuser_id;
592
+        $form_state['storage']['boincuser_name'] = $account->boincuser_name;
593
+    }
593 594
     }
594
-  }
595 595
 }
596 596
 
597 597
 /**
@@ -599,17 +599,17 @@  discard block
 block discarded – undo
599 599
  */
600 600
 function boincteam_add_admin_form_submit($form, &$form_state) {
601 601
 
602
-  $team_id = $form_state['storage']['team_id'];
603
-  $boincuser_id = $form_state['storage']['boincuser_id'];
604
-  $user_name = $form_state['storage']['boincuser_name'];
605
-  $values = $form_state['values'];
602
+    $team_id = $form_state['storage']['team_id'];
603
+    $boincuser_id = $form_state['storage']['boincuser_id'];
604
+    $user_name = $form_state['storage']['boincuser_name'];
605
+    $values = $form_state['values'];
606 606
 
607
-  $team = node_load($team_id);
608
-  $boincteam_id = boincteam_lookup_id($team_id);
607
+    $team = node_load($team_id);
608
+    $boincteam_id = boincteam_lookup_id($team_id);
609 609
 
610
-  // Update the team in the BOINC db
611
-  db_set_active('boinc_rw');
612
-  db_query("
610
+    // Update the team in the BOINC db
611
+    db_set_active('boinc_rw');
612
+    db_query("
613 613
     INSERT INTO {team_admin} SET
614 614
       teamid = '%d',
615 615
       userid = '%d',
@@ -617,17 +617,17 @@  discard block
 block discarded – undo
617 617
     $boincteam_id,
618 618
     $boincuser_id,
619 619
     time()
620
-  );
621
-  db_set_active('default');
620
+    );
621
+    db_set_active('default');
622 622
 
623
-  // Could assign a role in Drupal here, as needed
623
+    // Could assign a role in Drupal here, as needed
624 624
 
625 625
 
626
-  drupal_set_message(t('@user has been added as an admin.',
626
+    drupal_set_message(t('@user has been added as an admin.',
627 627
     array('@user' => $user_name)));
628 628
 
629
-  // The storage variable quietly kills redirection for some reason... unset it
630
-  unset($form_state['storage']);
629
+    // The storage variable quietly kills redirection for some reason... unset it
630
+    unset($form_state['storage']);
631 631
 }
632 632
 
633 633
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -639,80 +639,80 @@  discard block
 block discarded – undo
639 639
  * Send all team members an email message function
640 640
  */
641 641
 function boincteam_sendmessagetoteam(&$form_state, $team_id) {
642
-  global $user;
643
-  $form = array();
642
+    global $user;
643
+    $form = array();
644 644
 
645
-  if (isset($form_state['values'])) {
645
+    if (isset($form_state['values'])) {
646 646
     $subject   = $form_state['values']['subject'];
647 647
     $body      = $form_state['values']['body'];
648
-  }
649
-  else {
648
+    }
649
+    else {
650 650
     $subject   = '';
651 651
     $body      = '';
652
-  }
652
+    }
653 653
 
654
-  // Title
655
-  $mytitle = bts('Send E-mail To All Team Members', array(), NULL, 'boinc:team-message-form');
656
-  drupal_set_title($mytitle);
654
+    // Title
655
+    $mytitle = bts('Send E-mail To All Team Members', array(), NULL, 'boinc:team-message-form');
656
+    drupal_set_title($mytitle);
657 657
 
658
-  $form['emailteam']['header'] = array(
658
+    $form['emailteam']['header'] = array(
659 659
     '#value'              => '<h1>' . $mytitle . '</h1>',
660 660
     '#weight'             => '-10',
661 661
     '#prefix'             => "<div id='sendmessageteammembers-header'>",
662 662
     '#suffix'             => "</div>",
663
-  );
663
+    );
664 664
 
665
-  $form['emailteam']['instructions'] = array(
665
+    $form['emailteam']['instructions'] = array(
666 666
     '#value'              => bts('This will send an email to all team members. If a team member has opt-ed out of notification e-mails, they will not receive your message. At the bottom of your message, there will be a link allowing team members to send you a Direct Message. This link is added automatically, you do not need to add it below in the Message box. Your email address will not be shown to the recipients.', array(), NULL, 'boinc:team-message-form'),
667 667
     '#weight'             => '-8',
668 668
     '#prefix'             => "<div id='sendmessageteammembers-instructions'>",
669 669
     '#suffix'             => "</div>",
670
-  );
670
+    );
671 671
 
672
-  // Subject
673
-  $form['emailteam']['subject'] = array(
672
+    // Subject
673
+    $form['emailteam']['subject'] = array(
674 674
     '#type'               => 'textfield',
675 675
     '#title'              => bts('Subject', array(), NULL, 'boinc:team-message-form'),
676 676
     '#size'               => 50,
677 677
     '#maxlength'          => 255,
678 678
     '#default_value'      => $subject,
679 679
     '#weight'             => -5,
680
-  );
680
+    );
681 681
 
682
-  // Body
683
-  $form['emailteam']['body'] = array(
682
+    // Body
683
+    $form['emailteam']['body'] = array(
684 684
     '#type'               => 'textarea',
685 685
     '#title'              => bts('Message', array(), NULL, 'boinc:team-message-form'),
686 686
     '#rows'               => 8,
687 687
     '#weight'             => 0,
688 688
     '#default_value'      => $body,
689 689
     '#resizable'          => TRUE,
690
-  );
690
+    );
691 691
 
692
-  // checkbox for 'sent to self'
693
-  $form['emailteam']['selfsend'] = array(
692
+    // checkbox for 'sent to self'
693
+    $form['emailteam']['selfsend'] = array(
694 694
     '#type'    => 'checkbox',
695 695
     '#title'   => bts('Check this box if you wish to be sent a copy of your message to your email address.', array(), NULL, 'boinc:team-message-form'),
696 696
     '#weight'  => 10,
697 697
     '#prefix'  => '<div class="clearfix" id="confirm-checkbox">',
698 698
     '#suffix'  => '</div>',
699
-  );
699
+    );
700 700
 
701
-  // Add a captcha to form
702
-  if (module_exists('captcha')) {
701
+    // Add a captcha to form
702
+    if (module_exists('captcha')) {
703 703
     $form['register_captcha'] = array(
704 704
         '#type' => 'captcha',
705 705
         '#weight' => 1000,
706 706
     );
707
-  }
707
+    }
708 708
 
709
-  // form buttons
710
-  $form['emailteam']['form control tabs prefix'] = array(
709
+    // form buttons
710
+    $form['emailteam']['form control tabs prefix'] = array(
711 711
     '#value'  => '<ul class="form-control tab-list">',
712 712
     '#weight' => 1000,
713
-  );
713
+    );
714 714
 
715
-  $form['emailteam']['submit'] = array(
715
+    $form['emailteam']['submit'] = array(
716 716
     '#type'               => 'submit',
717 717
     '#value'              => bts('Send message', array(), NULL, 'boinc:form-submit'),
718 718
     '#submit'             => array('boincteam_sendmessagetoteam_submit'),
@@ -720,133 +720,133 @@  discard block
 block discarded – undo
720 720
     '#weight'             => 1001,
721 721
     '#prefix'             => '<li class="first tab">',
722 722
     '#suffix'             => '</li>'
723
-  );
723
+    );
724 724
 
725
-  $title = bts('Cancel', array(), NULL, 'boinc:form-cancel');
726
-  $url = "community/teams/{$team_id}";
727
-  $form['emailteam']['cancel'] = array(
725
+    $title = bts('Cancel', array(), NULL, 'boinc:form-cancel');
726
+    $url = "community/teams/{$team_id}";
727
+    $form['emailteam']['cancel'] = array(
728 728
     '#value'              => l($title, $url, array('attributes' => array('id' => 'edit-cancel'))),
729 729
     '#weight'             => 1005,
730 730
     '#prefix'             => '<li class="tab">',
731 731
     '#suffix'             => '</li>'
732
-  );
732
+    );
733 733
 
734
-  $form['emailteam']['form control tabs suffix'] = array(
734
+    $form['emailteam']['form control tabs suffix'] = array(
735 735
     '#value'  => '</ul>',
736 736
     '#weight' => 1010,
737
-  );
737
+    );
738 738
 
739
-  // Add team id information to form_state
740
-  $form['_team_id'] = array(
739
+    // Add team id information to form_state
740
+    $form['_team_id'] = array(
741 741
     '#type'  => 'value',
742 742
     '#value' => $team_id,
743
-  );
743
+    );
744 744
 
745
-  // Add sender user object to form_state
746
-  $form['_senderuid'] = array(
745
+    // Add sender user object to form_state
746
+    $form['_senderuid'] = array(
747 747
     '#type'  => 'value',
748 748
     '#value' => $user->uid,
749
-  );
749
+    );
750 750
 
751
-  // redirect after sending message
752
-  $form['#redirect'] = "community/teams/{$team_id}";
751
+    // redirect after sending message
752
+    $form['#redirect'] = "community/teams/{$team_id}";
753 753
 
754
-  return $form;
754
+    return $form;
755 755
 }
756 756
 
757 757
 /**
758 758
  * Send all team members validation handler
759 759
  */
760 760
 function boincteam_sendmessagetoteam_validate($form, &$form_state) {
761
-  $message = $form_state['values'];
762
-  $message['timestamp'] = time();
763
-  // Avoid subjects which only consist of a space as these can not be clicked.
764
-  $message['subject'] = trim($message['subject']);
761
+    $message = $form_state['values'];
762
+    $message['timestamp'] = time();
763
+    // Avoid subjects which only consist of a space as these can not be clicked.
764
+    $message['subject'] = trim($message['subject']);
765 765
 
766
-  $trimed_body = trim(truncate_utf8(strip_tags($message['body']), 50, TRUE, TRUE));
767
-  if (empty($message['subject']) && !empty($trimed_body)) {
766
+    $trimed_body = trim(truncate_utf8(strip_tags($message['body']), 50, TRUE, TRUE));
767
+    if (empty($message['subject']) && !empty($trimed_body)) {
768 768
     $message['subject'] = $trimed_body;
769 769
     $form_state['values']['subject'] = $message['subject'];
770
-  }
770
+    }
771 771
 
772
-  // Check subject line
773
-  $message['subject'] = trim($message['subject']);
774
-  if (empty($message['subject'])) {
772
+    // Check subject line
773
+    $message['subject'] = trim($message['subject']);
774
+    if (empty($message['subject'])) {
775 775
     form_set_error('subject',
776
-      bts('Not allowed to send a message without subject', array(), NULL, 'boinc:team-message-form')
776
+        bts('Not allowed to send a message without subject', array(), NULL, 'boinc:team-message-form')
777 777
     );
778
-  }
778
+    }
779 779
 
780
-  // Check body
781
-  if ( ($message['body'] === NULL || $message['body'] === '') ) {
780
+    // Check body
781
+    if ( ($message['body'] === NULL || $message['body'] === '') ) {
782 782
     form_set_error('body',
783
-      bts('Not allowed to send an empty message.', array(), NULL, 'boinc:team-message-form')
783
+        bts('Not allowed to send an empty message.', array(), NULL, 'boinc:team-message-form')
784 784
     );
785
-  }
785
+    }
786 786
 
787
-  // Check team id
788
-  if (empty($message['_team_id'])) {
787
+    // Check team id
788
+    if (empty($message['_team_id'])) {
789 789
     form_set_error('team_id',
790
-      bts('Error, no team_id supplied.', array(), NULL, 'boinc:team-message-form')
790
+        bts('Error, no team_id supplied.', array(), NULL, 'boinc:team-message-form')
791 791
     );
792
-  }
792
+    }
793 793
 
794
-  $form_state['validated_built_message'] = $message;
794
+    $form_state['validated_built_message'] = $message;
795 795
 }
796 796
 
797 797
 /**
798 798
  * Send all team members submit handler
799 799
  */
800 800
 function boincteam_sendmessagetoteam_submit($form, &$form_state) {
801
-  module_load_include('inc', 'rules', 'modules/system.rules');
802
-  global $base_url;
803
-  global $base_path;
804
-
805
-  $suid = $form_state['values']['_senderuid'];
806
-  $account = user_load(array('uid' => $suid ));
807
-  $site_url = $base_url . $base_path . "messages/new/" . $suid;
808
-
809
-  // Form is validated, now send to all team members. Lookup boinc
810
-  // id of all team members, and then use user_load() to load user
811
-  // object. Send message using email.
812
-  //
813
-  $boinc_id = boincteam_lookup_id($form_state['values']['_team_id']);
814
-  // Email addresses, with those who have opt-ed out of notification
815
-  // emails removed.
816
-  $member_emails = _boincteam_emails($boinc_id);
817
-  // Remove sender's email address, unless selfsend is true.
818
-  if ( !$form_state['values']['selfsend'] ) {
801
+    module_load_include('inc', 'rules', 'modules/system.rules');
802
+    global $base_url;
803
+    global $base_path;
804
+
805
+    $suid = $form_state['values']['_senderuid'];
806
+    $account = user_load(array('uid' => $suid ));
807
+    $site_url = $base_url . $base_path . "messages/new/" . $suid;
808
+
809
+    // Form is validated, now send to all team members. Lookup boinc
810
+    // id of all team members, and then use user_load() to load user
811
+    // object. Send message using email.
812
+    //
813
+    $boinc_id = boincteam_lookup_id($form_state['values']['_team_id']);
814
+    // Email addresses, with those who have opt-ed out of notification
815
+    // emails removed.
816
+    $member_emails = _boincteam_emails($boinc_id);
817
+    // Remove sender's email address, unless selfsend is true.
818
+    if ( !$form_state['values']['selfsend'] ) {
819 819
     $pos = array_search($account->mail, $member_emails);
820 820
     unset($member_emails[$pos]);
821
-  }
821
+    }
822 822
 
823
-  // Add link at bottom of body
824
-  $mybody = $form_state['validated_built_message']['body'];
825
-  $mybody .= "\n\n"
826
-      . "To reply to the sender using a Direct Message (DM), please use this link:\n"
827
-      . "${site_url}";
823
+    // Add link at bottom of body
824
+    $mybody = $form_state['validated_built_message']['body'];
825
+    $mybody .= "\n\n"
826
+        . "To reply to the sender using a Direct Message (DM), please use this link:\n"
827
+        . "${site_url}";
828 828
 
829
-  // Transform HTML body into plain text
830
-  $mybody = drupal_html_to_text($mybody);
829
+    // Transform HTML body into plain text
830
+    $mybody = drupal_html_to_text($mybody);
831 831
 
832
-  $emailsettings = array(
832
+    $emailsettings = array(
833 833
     'from'    => '',
834 834
     'to'      => "webmaster@{$base_url}",
835 835
     'boincteam_headers' => array(
836
-      'Bcc'     => implode(', ', $member_emails),
836
+        'Bcc'     => implode(', ', $member_emails),
837 837
     ),
838 838
     'subject' => $form_state['validated_built_message']['subject'],
839 839
     'message' => $mybody,
840
-  );
841
-  rules_action_mail($emailsettings);
840
+    );
841
+    rules_action_mail($emailsettings);
842 842
 
843
-  $om = bts(
843
+    $om = bts(
844 844
     'Sent your email message to !number team members.',
845 845
     array( '!number' => count($member_emails) ),
846 846
     'NULL',
847 847
     'boinc:team-message-sent'
848
-  );
849
-  drupal_set_message($om, 'info');
848
+    );
849
+    drupal_set_message($om, 'info');
850 850
 
851
-  $form_state['redirect'] = "community/teams/{$form_state['values']['_team_id']}";
851
+    $form_state['redirect'] = "community/teams/{$form_state['values']['_team_id']}";
852 852
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/includes/boincuser.forms.inc 4 patches
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
   // Call our custom authentication function to check for an existing BOINC user
36 36
   if (!boincuser_login_authenticate($form_state['values'])) {
37 37
     // Authentication failed; set an error accordingly
38
-    form_set_error('name', bts('Sorry, unrecognized email address or password.', array(), NULL, 'boinc:forgot-password') . ' ' . l(bts('Have you forgotten your password?', array(), NULL, 'boinc:forgot-password'), 'user/password'));
38
+    form_set_error('name', bts('Sorry, unrecognized email address or password.', array(), NULL, 'boinc:forgot-password').' '.l(bts('Have you forgotten your password?', array(), NULL, 'boinc:forgot-password'), 'user/password'));
39 39
   }
40 40
 }
41 41
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
   } else {
85 85
     // Create a Drupal user from the BOINC user
86 86
     if ($user = boincuser_register_make_drupal_user($boinc_user)) {
87
-      watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit'));
87
+      watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'.$user->uid.'/edit'));
88 88
     }
89 89
   }
90 90
 }
@@ -394,14 +394,14 @@  discard block
 block discarded – undo
394 394
     // set email address lower-case
395 395
     $edit['mail'] = strtolower($edit['mail']);
396 396
 
397
-    $boinc_user_already_exists = ( BoincUser::lookup_email_addr($edit['mail']) || BoincUser::lookup_prev_email_addr($edit['mail']) );
397
+    $boinc_user_already_exists = (BoincUser::lookup_email_addr($edit['mail']) || BoincUser::lookup_prev_email_addr($edit['mail']));
398 398
     if ($boinc_user_already_exists) {
399 399
       form_set_error('mail', bts('A BOINC account already exists for @email.', array('@email' => $edit['mail']), NULL, 'boinc:add-new-user'));
400 400
     }
401 401
 
402 402
     // Check email has not been changed in last X days (default X=7).
403
-    $duration = 86400 * 7;
404
-    if ( (($boinc_user->email_addr_change_time + $duration) > time()) and (!(user_access('administer users'))) ) {
403
+    $duration = 86400*7;
404
+    if ((($boinc_user->email_addr_change_time + $duration) > time()) and (!(user_access('administer users')))) {
405 405
       form_set_error('email_addr_change_time',
406 406
         bts('Your email address was changed within the past seven (7) days. You must wait until !futuredate to change your email again. If you need to reverse this change, please look for an email sent to !prev_email_addr.',
407 407
         array(
@@ -422,11 +422,11 @@  discard block
 block discarded – undo
422 422
       unset($_SESSION['reset_pass']);
423 423
     }
424 424
     else {
425
-      $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
425
+      $given_hash = md5($edit['current_pass'].strtolower($account->mail));
426 426
       if (!$edit['current_pass']) {
427 427
         form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), NULL, 'boinc:account-credentials-change'));
428 428
       }
429
-      elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
429
+      elseif ((!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash)) {
430 430
         form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:account-credentials-change'));
431 431
       }
432 432
 
@@ -489,29 +489,29 @@  discard block
 block discarded – undo
489 489
   $project_domain = $headers['Host'];
490 490
   $form['heading'] = array(
491 491
     '#type' => 'markup',
492
-    '#value' => '<h3>' . bts("If you forgot your account's email address, or you can't receive email there:", array(), NULL, 'boinc:authenticator-login-page') . '</h3>'
492
+    '#value' => '<h3>'.bts("If you forgot your account's email address, or you can't receive email there:", array(), NULL, 'boinc:authenticator-login-page').'</h3>'
493 493
   );
494 494
   $form['instructions'] = array(
495 495
     '#type' => 'markup',
496
-    '#value' => '' .
497
-      '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), NULL, 'boinc:authenticator-login-page') .
498
-      '  <ul>' .
499
-      '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), NULL, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), NULL, 'boinc:authenticator-login-page') . '</li>' .
500
-      '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), NULL, 'boinc:authenticator-login-page') . '</li>' .
501
-      '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:", array(), NULL, 'boinc:authenticator-login-page') .
502
-      '      <pre>' .
503
-      '&lt;account&gt;' . "\n" .
504
-      "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;" . "\n" .
505
-      '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;' . "\n" .
506
-      "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;" . "\n" .
507
-      '  ...' . "\n" .
508
-      '&lt;/account&gt;' .
509
-      '      </pre>' .
510
-      '    </li>' .
511
-      '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), NULL, 'boinc:authenticator-login-page') . '</li>' .
512
-      '    <li>' . bts('Paste the string into the field below, and click OK.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
513
-      '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
514
-      '  </ul>' .
496
+    '#value' => ''.
497
+      '<p>'.bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), NULL, 'boinc:authenticator-login-page').
498
+      '  <ul>'.
499
+      '    <li>'.bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), NULL, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), NULL, 'boinc:authenticator-login-page').'</li>'.
500
+      '    <li>'.bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), NULL, 'boinc:authenticator-login-page').'</li>'.
501
+      '    <li>'.bts("Open the file in a text editor like Notepad. You'll see something like:", array(), NULL, 'boinc:authenticator-login-page').
502
+      '      <pre>'.
503
+      '&lt;account&gt;'."\n".
504
+      "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;"."\n".
505
+      '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;'."\n".
506
+      "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;"."\n".
507
+      '  ...'."\n".
508
+      '&lt;/account&gt;'.
509
+      '      </pre>'.
510
+      '    </li>'.
511
+      '    <li>'.bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), NULL, 'boinc:authenticator-login-page').'</li>'.
512
+      '    <li>'.bts('Paste the string into the field below, and click OK.', array(), NULL, 'boinc:authenticator-login-page').'</li>'.
513
+      '    <li>'.bts('You will now be logged in to your account; update the email and password of your account.', array(), NULL, 'boinc:authenticator-login-page').'</li>'.
514
+      '  </ul>'.
515 515
       '</p>'
516 516
   );
517 517
   $form['authenticator'] = array(
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     '#weight' => 1002,
537 537
   );
538 538
   $form['form control tabs'] = array(
539
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/password') . '</li>',
539
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/password').'</li>',
540 540
     '#weight' => 1003,
541 541
   );
542 542
   $form['form control tabs suffix'] = array(
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     '#weight' => 1002,
600 600
   );
601 601
   $form['form control tabs'] = array(
602
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
602
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}").'</li>',
603 603
     '#weight' => 1003,
604 604
   );
605 605
   $form['form control tabs suffix'] = array(
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
     '#weight' => 1002,
651 651
   );
652 652
   $form['form control tabs'] = array(
653
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
653
+    '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}").'</li>',
654 654
     '#weight' => 1003,
655 655
   );
656 656
   $form['form control tabs suffix'] = array(
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
   $uid = $form_state['storage']['ban_user_uid'];
668 668
   $reason = $form_state['values']['reason'];
669 669
   $duration = $form_state['values']['duration'];
670
-  if ($duration) $duration = $duration * 24*60*60;
670
+  if ($duration) $duration = $duration*24*60*60;
671 671
   boincuser_moderate_user_ban($uid, $reason, $duration);
672 672
 }
673 673
 
@@ -694,10 +694,10 @@  discard block
 block discarded – undo
694 694
     drupal_goto();
695 695
   }
696 696
 
697
-  drupal_set_message( bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), NULL, 'boinc:termsofuse-form'), 'warning' );
697
+  drupal_set_message(bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), NULL, 'boinc:termsofuse-form'), 'warning');
698 698
 
699 699
   $form = array();
700
-  drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
700
+  drupal_add_js(drupal_get_path('module', 'boincuser').'/boincuser.js');
701 701
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
702 702
 
703 703
   // Fieldset to hold all of the form as a container
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 
711 711
   $form['termsofuse']['title1'] = array(
712 712
     '#weight' => -12,
713
-    '#value' => '<h2>' . bts( variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:termsofuse-form' ) . '</h2>',
713
+    '#value' => '<h2>'.bts(variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:termsofuse-form').'</h2>',
714 714
     '#prefix' => '<div id="register-title1">',
715 715
     '#suffix' => '</div>',
716 716
   );
@@ -745,12 +745,12 @@  discard block
 block discarded – undo
745 745
     '#suffix' => '</li>',
746 746
   );
747 747
   $form['form control tabs'] = array(
748
-    '#value' => '<li class="tab">' . l(bts('NO - LOGOUT', array(), NULL, 'boinc:form-cancel'), '/logout') . '</li>',
748
+    '#value' => '<li class="tab">'.l(bts('NO - LOGOUT', array(), NULL, 'boinc:form-cancel'), '/logout').'</li>',
749 749
   );
750 750
   if (module_exists('boincuser_delete')) {
751
-    $deletelink = '/user/' . $user->uid . '/delete';
751
+    $deletelink = '/user/'.$user->uid.'/delete';
752 752
     $form['deleteaccount'] = array(
753
-      '#value' => '<li class="tab">' . l(bts('NO - DELETE ACCOUNT', array(), NULL, 'boinc:form-delete-user'), $deletelink) . '</li>',
753
+      '#value' => '<li class="tab">'.l(bts('NO - DELETE ACCOUNT', array(), NULL, 'boinc:form-delete-user'), $deletelink).'</li>',
754 754
     );
755 755
   }
756 756
 
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
   $form['buttons']['submit']['#suffix'] = '</li>';
844 844
   $form['buttons']['submit']['#weight'] = 1002;
845 845
   $form['buttons']['cancel'] = array(
846
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/info/edit') . '</li>',
846
+      '#value' => '<li class="tab">'.l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/info/edit').'</li>',
847 847
       '#weight' => 1005,
848 848
   );
849 849
   $form['buttons']['form control tabs suffix'] = array(
@@ -887,7 +887,7 @@  discard block
 block discarded – undo
887 887
 
888 888
   // Set new password based on previous email address and entered
889 889
   // password.
890
-  $new_passwd_hash = password_hash( md5($form_state['values']['pass'].$pem), PASSWORD_DEFAULT);
890
+  $new_passwd_hash = password_hash(md5($form_state['values']['pass'].$pem), PASSWORD_DEFAULT);
891 891
 
892 892
   $boinc_user->update("email_addr='${pem}', previous_email_addr='', email_addr_change_time=0, passwd_hash='${new_passwd_hash}'");
893 893
 
Please login to merge, or discard this patch.
Indentation   +429 added lines, -429 removed lines patch added patch discarded remove patch
@@ -15,59 +15,59 @@  discard block
 block discarded – undo
15 15
  * Form validation handler for login
16 16
  */
17 17
 function boincuser_login_validate($form, &$form_state) {
18
-  /* // SAMPLE: To try validation with Drupal first...
18
+    /* // SAMPLE: To try validation with Drupal first...
19 19
   global $user;
20 20
   if (!empty($user->uid)) {
21 21
     // Authentication with Drupal was successful
22 22
     return;
23 23
   }*/
24 24
 
25
-  // Set name for logging purposes
26
-  $form_state['values']['name'] = $form_state['values']['email'];
25
+    // Set name for logging purposes
26
+    $form_state['values']['name'] = $form_state['values']['email'];
27 27
 
28
-  // Bypass BOINC validation if passed the name of user 1
29
-  $user_1 = user_load(1);
30
-  if ($form_state['values']['email'] == $user_1->name) {
28
+    // Bypass BOINC validation if passed the name of user 1
29
+    $user_1 = user_load(1);
30
+    if ($form_state['values']['email'] == $user_1->name) {
31 31
     user_authenticate($form_state['values']);
32 32
     return;
33
-  }
33
+    }
34 34
 
35
-  // Call our custom authentication function to check for an existing BOINC user
36
-  if (!boincuser_login_authenticate($form_state['values'])) {
35
+    // Call our custom authentication function to check for an existing BOINC user
36
+    if (!boincuser_login_authenticate($form_state['values'])) {
37 37
     // Authentication failed; set an error accordingly
38 38
     form_set_error('name', bts('Sorry, unrecognized email address or password.', array(), NULL, 'boinc:forgot-password') . ' ' . l(bts('Have you forgotten your password?', array(), NULL, 'boinc:forgot-password'), 'user/password'));
39
-  }
39
+    }
40 40
 }
41 41
 
42 42
 /**
43 43
  * Custom authentication function to check BOINC account information
44 44
  */
45 45
 function boincuser_login_authenticate($form_values) {
46
-  global $boincuser_authenticated;
47
-  $lower_email_addr = strtolower($form_values['email']);
48
-  $passwd = $form_values['pass'];
49
-  $passwd_hash = md5($passwd.$lower_email_addr);
46
+    global $boincuser_authenticated;
47
+    $lower_email_addr = strtolower($form_values['email']);
48
+    $passwd = $form_values['pass'];
49
+    $passwd_hash = md5($passwd.$lower_email_addr);
50 50
 
51
-  // Include BOINC user library
52
-  require_boinc('boinc_db');
53
-  require_boinc('user_util');
51
+    // Include BOINC user library
52
+    require_boinc('boinc_db');
53
+    require_boinc('user_util');
54 54
 
55
-  // Get the BOINC user and check credentials
56
-  $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
57
-  if (!$boinc_user) return false;
55
+    // Get the BOINC user and check credentials
56
+    $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
57
+    if (!$boinc_user) return false;
58 58
 
59
-  if (!check_passwd_hash($boinc_user, $passwd_hash)) {
59
+    if (!check_passwd_hash($boinc_user, $passwd_hash)) {
60 60
     return false;
61
-  }
61
+    }
62 62
 
63
-  // BOINC authentication successful; log in and synchronize accounts
64
-  boincuser_login_register($boinc_user);
65
-  // Write session, update timestamp, run user 'login' hook.
66
-  user_authenticate_finalize($form_values);
67
-  // Use a global variable to save the fact that we did authentication.
68
-  $boincuser_authenticated = true;
63
+    // BOINC authentication successful; log in and synchronize accounts
64
+    boincuser_login_register($boinc_user);
65
+    // Write session, update timestamp, run user 'login' hook.
66
+    user_authenticate_finalize($form_values);
67
+    // Use a global variable to save the fact that we did authentication.
68
+    $boincuser_authenticated = true;
69 69
 
70
-  return true;
70
+    return true;
71 71
 }
72 72
 
73 73
 /**
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
  * Drupal accounts
76 76
  */
77 77
 function boincuser_login_register($boinc_user) {
78
-  global $user;
79
-  require_boinc('boinc_db');
80
-  // If a Drupal account already exists, log in
81
-  $existing_user = user_load(array('mail' => $boinc_user->email_addr));
82
-  if (!empty($existing_user->uid)) {
78
+    global $user;
79
+    require_boinc('boinc_db');
80
+    // If a Drupal account already exists, log in
81
+    $existing_user = user_load(array('mail' => $boinc_user->email_addr));
82
+    if (!empty($existing_user->uid)) {
83 83
     $user = $existing_user;
84
-  } else {
84
+    } else {
85 85
     // Create a Drupal user from the BOINC user
86 86
     if ($user = boincuser_register_make_drupal_user($boinc_user)) {
87
-      watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit'));
87
+        watchdog('user', 'New external user: %email using module %module.', array('%email' => $email_addr, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/'. $user->uid .'/edit'));
88
+    }
88 89
     }
89
-  }
90 90
 }
91 91
 
92 92
 
@@ -98,113 +98,113 @@  discard block
 block discarded – undo
98 98
  * New user registration validation handler.
99 99
  */
100 100
 function boincuser_register_validate($form, &$form_state) {
101
-  // Include BOINC database objects library
102
-  require_boinc('boinc_db');
101
+    // Include BOINC database objects library
102
+    require_boinc('boinc_db');
103 103
 
104
-  // Check terms of use agreement
105
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
106
-  if (!empty($termsofuse)) {
104
+    // Check terms of use agreement
105
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
106
+    if (!empty($termsofuse)) {
107 107
     if (!$form_state['values']['termsofuse']['agreeTOU']) {
108
-      form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', NULL, 'boinc:register-new-user'));
109
-      return false;
108
+        form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', NULL, 'boinc:register-new-user'));
109
+        return false;
110
+    }
110 111
     }
111
-  }
112 112
 
113
-  // Lower-case the email address
114
-  $lower_email_addr = strtolower($form_state['values']['mail']);
115
-  $tmp_user = BoincUser::lookup_prev_email_addr($lower_email_addr);
116
-  if ($tmp_user) {
113
+    // Lower-case the email address
114
+    $lower_email_addr = strtolower($form_state['values']['mail']);
115
+    $tmp_user = BoincUser::lookup_prev_email_addr($lower_email_addr);
116
+    if ($tmp_user) {
117 117
     // User already exists
118 118
     rules_invoke_event('boincuser_change_email_error', $lower_email_addr, variable_get('boinc_admin_mailing_list_subject_tag', ''));
119 119
     form_set_error('mail',
120
-      bts('An account already exists for @email. The @project administrators have been notified.',
120
+        bts('An account already exists for @email. The @project administrators have been notified.',
121 121
         array(
122
-          '@email' => $lower_email_addr,
123
-          '@project' => variable_get('site_name', 'Drupal-BOINC')
122
+            '@email' => $lower_email_addr,
123
+            '@project' => variable_get('site_name', 'Drupal-BOINC')
124 124
         ), NULL, 'boinc:register-new-user')
125 125
     );
126
-  }
126
+    }
127 127
 
128
-  // Check for an existing BOINC user
129
-  // This is somewhat redundent as Drupal will also check if the email
130
-  // is a duplicate. However, in the case where there is no Drupal
131
-  // account, but a BOINC account exists with this email, the check
132
-  // will fail.
133
-  $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
134
-  if ($boinc_user) {
128
+    // Check for an existing BOINC user
129
+    // This is somewhat redundent as Drupal will also check if the email
130
+    // is a duplicate. However, in the case where there is no Drupal
131
+    // account, but a BOINC account exists with this email, the check
132
+    // will fail.
133
+    $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
134
+    if ($boinc_user) {
135 135
     // User already exists
136 136
     form_set_error('mail', bts('An account already exists for @email. Log in or request password assistance to access your @project account.', array('@email' => $lower_email_addr, '@project' => PROJECT), NULL, 'boinc:add-new-user'));
137 137
     return false;
138
-  }
138
+    }
139 139
 
140
-  // Check Drupal name is not a duplicate, and create a proper drupal
141
-  // name from the boinc username.
142
-  $form_state['values']['name'] = create_proper_drupalname($form_state['values']['boincuser_name']);
140
+    // Check Drupal name is not a duplicate, and create a proper drupal
141
+    // name from the boinc username.
142
+    $form_state['values']['name'] = create_proper_drupalname($form_state['values']['boincuser_name']);
143 143
 
144
-  return true;
144
+    return true;
145 145
 }
146 146
 
147 147
 /**
148 148
  * Create BOINC account
149 149
  */
150 150
 function boincuser_register_make_user($params) {
151
-  // Include BOINC user library
152
-  require_boinc('user_util');
153
-  // Create the BOINC user
154
-  $boinc_user = make_user($params['email_addr'], $params['name'], $params['passwd_hash'], $params['country'], $params['postal_code']);
155
-  return $boinc_user;
151
+    // Include BOINC user library
152
+    require_boinc('user_util');
153
+    // Create the BOINC user
154
+    $boinc_user = make_user($params['email_addr'], $params['name'], $params['passwd_hash'], $params['country'], $params['postal_code']);
155
+    return $boinc_user;
156 156
 }
157 157
 
158 158
 /**
159 159
  * Create Drupal account from existing BOINC account
160 160
  */
161 161
 function boincuser_register_make_drupal_user($boinc_user) {
162
-  $account = null;
163
-  if (is_numeric($boinc_user)) {
162
+    $account = null;
163
+    if (is_numeric($boinc_user)) {
164 164
     $boinc_user = boincuser_load($boinc_user);
165
-  }
166
-  if ($boinc_user) {
165
+    }
166
+    if ($boinc_user) {
167 167
     $account = boincuser_create_drupal_user($boinc_user);
168 168
     if ($account) {
169
-      boincuser_create_drupal_profile($account, $boinc_user);
169
+        boincuser_create_drupal_profile($account, $boinc_user);
170
+    }
170 171
     }
171
-  }
172
-  return $account;
172
+    return $account;
173 173
 }
174 174
 
175 175
 function boincuser_create_drupal_user($boinc_user) {
176
-  require_boinc('forum_db');
177
-  BoincForumPrefs::lookup($boinc_user);
178
-  $account = NULL;
179
-  $module = 'boincuser';
176
+    require_boinc('forum_db');
177
+    BoincForumPrefs::lookup($boinc_user);
178
+    $account = NULL;
179
+    $module = 'boincuser';
180 180
 
181
-  // Verify that this account has not already been imported
182
-  $already_imported = db_result(db_query('
181
+    // Verify that this account has not already been imported
182
+    $already_imported = db_result(db_query('
183 183
     SELECT COUNT(*) FROM {boincuser} WHERE boinc_id = %d',
184 184
     $boinc_user->id)
185
-  );
186
-  if ($already_imported) {
185
+    );
186
+    if ($already_imported) {
187 187
     return NULL;
188
-  }
188
+    }
189 189
 
190
-  // Email is limited to 64 characters...
191
-  $boinc_email = substr($boinc_user->email_addr, 0, 64);
190
+    // Email is limited to 64 characters...
191
+    $boinc_email = substr($boinc_user->email_addr, 0, 64);
192 192
 
193
-  // Email should be unique
194
-  $already_imported = db_result(db_query("
193
+    // Email should be unique
194
+    $already_imported = db_result(db_query("
195 195
     SELECT COUNT(*) FROM {users} WHERE mail = '%s'",
196 196
     $boinc_email)
197
-  );
198
-  if ($already_imported) {
197
+    );
198
+    if ($already_imported) {
199 199
     drupal_set_message(t('An account for @email already exists', array('@email' => $boinc_email)), 'warning');
200 200
     watchdog('boincimport', 'An account for @email already exists', array('@email' => $boinc_email), WATCHDOG_WARNING);
201 201
     return NULL;
202
-  }
202
+    }
203 203
 
204
-  // Make sure name is unique
205
-  $unique_name = create_proper_drupalname($boinc_user->name);
204
+    // Make sure name is unique
205
+    $unique_name = create_proper_drupalname($boinc_user->name);
206 206
 
207
-  $userinfo = array(
207
+    $userinfo = array(
208 208
     'name' => $unique_name,
209 209
     'pass' => $boinc_user->passwd_hash,
210 210
     'mail' => $boinc_email,
@@ -214,126 +214,126 @@  discard block
 block discarded – undo
214 214
     'status' => 1,
215 215
     "authname_{$module}" => $boinc_email,
216 216
     'access' => time()
217
-  );
217
+    );
218 218
 
219
-  $in_penalty = ($boinc_user->prefs->banished_until > time());
219
+    $in_penalty = ($boinc_user->prefs->banished_until > time());
220 220
 
221
-  // Add user to community member role (if no current penalty)
222
-  if (!$in_penalty) {
221
+    // Add user to community member role (if no current penalty)
222
+    if (!$in_penalty) {
223 223
     $community_role = array_search('community member', user_roles(true));
224 224
     $userinfo['roles'] = array(
225
-      $community_role => ''
225
+        $community_role => ''
226 226
     );
227
-  }
227
+    }
228 228
 
229
-  // Mark account as imported so a BOINC account is not created on Insert (i.e. user_save)
230
-  $_SESSION['importedUser'] = true;
231
-  $account = user_save('', $userinfo);
229
+    // Mark account as imported so a BOINC account is not created on Insert (i.e. user_save)
230
+    $_SESSION['importedUser'] = true;
231
+    $account = user_save('', $userinfo);
232 232
 
233
-  // Drupal overrides the original registration date, so update to the correct date
234
-  $account = user_save($account, array('created' => $userinfo['created']));
233
+    // Drupal overrides the original registration date, so update to the correct date
234
+    $account = user_save($account, array('created' => $userinfo['created']));
235 235
 
236
-  // Terminate if an error occured during user_save().
237
-  if (!$account) {
236
+    // Terminate if an error occured during user_save().
237
+    if (!$account) {
238 238
     drupal_set_message(t("Error saving user account."), 'error');
239 239
     return NULL;
240
-  }
240
+    }
241 241
 
242
-  // Cross reference the Drupal and BOINC accounts
243
-  boincuser_account_cross_reference($account->uid, $boinc_user->id);
242
+    // Cross reference the Drupal and BOINC accounts
243
+    boincuser_account_cross_reference($account->uid, $boinc_user->id);
244 244
 
245
-  if ($in_penalty) {
245
+    if ($in_penalty) {
246 246
     // Import the timestamp of when the penalty period will be over
247 247
     $boincuser_record = array(
248
-      'uid' => $account->uid,
249
-      'penalty_expiration' => $boinc_user->prefs->banished_until,
248
+        'uid' => $account->uid,
249
+        'penalty_expiration' => $boinc_user->prefs->banished_until,
250 250
     );
251 251
     drupal_write_record('boincuser', $boincuser_record, 'uid');
252
-  }
252
+    }
253 253
 
254
-  return $account;
254
+    return $account;
255 255
 }
256 256
 
257 257
 function boincuser_create_drupal_profile($account, $boinc_user) {
258 258
 
259
-  require_boinc('forum_db');
260
-  BoincForumPrefs::lookup($boinc_user);
259
+    require_boinc('forum_db');
260
+    BoincForumPrefs::lookup($boinc_user);
261 261
 
262
-  $image_dir = boinc_get_path('user_image');
262
+    $image_dir = boinc_get_path('user_image');
263 263
 
264
-  // Automatically create a content profile
265
-  $now = time();
266
-  $profile_background = null;
267
-  $profile_opinions = null;
268
-  $profile_image = null;
269
-  $avatar_image = null;
270
-  $profile_approved = NULL;
264
+    // Automatically create a content profile
265
+    $now = time();
266
+    $profile_background = null;
267
+    $profile_opinions = null;
268
+    $profile_image = null;
269
+    $avatar_image = null;
270
+    $profile_approved = NULL;
271 271
 
272
-  // Load the BOINC profile, if available
273
-  if ($boinc_user->has_profile) {
272
+    // Load the BOINC profile, if available
273
+    if ($boinc_user->has_profile) {
274 274
     $boinc_profile = BoincProfile::lookup("userid={$boinc_user->id}");
275 275
     $profile_background = $boinc_profile->response1;
276 276
     $profile_opinions = $boinc_profile->response2;
277 277
     if ($boinc_profile->has_picture) {
278
-      // Load picture; load validators; determine where to store it in Drupal
279
-      $image_path = "{$image_dir}/{$boinc_user->id}.jpg";
280
-      $profile_image = get_cck_image_object($image_path, 'field_profile_image', 'profile', TRUE);
281
-      // If the user does not have a different image as an avatar, use this one
282
-      if (!$boinc_user->prefs->avatar) {
278
+        // Load picture; load validators; determine where to store it in Drupal
279
+        $image_path = "{$image_dir}/{$boinc_user->id}.jpg";
280
+        $profile_image = get_cck_image_object($image_path, 'field_profile_image', 'profile', TRUE);
281
+        // If the user does not have a different image as an avatar, use this one
282
+        if (!$boinc_user->prefs->avatar) {
283 283
         $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', TRUE);
284
-      }
284
+        }
285 285
     }
286 286
     if ($boinc_user->prefs->avatar) {
287
-      $image_path = "{$image_dir}/{$boinc_user->id}_avatar.jpg";
288
-      $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', TRUE);
287
+        $image_path = "{$image_dir}/{$boinc_user->id}_avatar.jpg";
288
+        $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', TRUE);
289 289
     }
290 290
     $profile_approved = $boinc_profile->verification ? TRUE : FALSE;
291
-  }
292
-  $default_input_format = db_result(db_query("
291
+    }
292
+    $default_input_format = db_result(db_query("
293 293
     SELECT format FROM {filter_formats} WHERE name = '%s'", 'Rich text'));
294
-  if (!$default_input_format) $default_input_format = 1;
295
-
296
-  // Populate the profile object
297
-  $profile_node = new stdClass();
298
-  $profile_node->title = $boinc_user->name;
299
-  $profile_node->uid = $account->uid;
300
-  $profile_node->body = '';
301
-  $profile_node->type = 'profile';
302
-  $profile_node->created = $now;
303
-  $profile_node->changed = $now;
304
-  $profile_node->status = 1;
305
-  $profile_node->promote = 0;
306
-  $profile_node->sticky = 0;
307
-  $profile_node->format = $default_input_format;
308
-  $profile_node->name = $account->name; // Set to link profile to account uid!
309
-  $profile_node->field_country[]['value'] = $boinc_user->country;
310
-  $profile_node->field_zip[]['value'] = $boinc_user->postal_code;
311
-  $profile_node->field_url[]['value'] = $boinc_user->url;
312
-  $profile_node->field_background[]['value'] = $profile_background;
313
-  $profile_node->field_opinions[]['value'] = $profile_opinions;
314
-  $profile_node->field_image[] = $avatar_image;
315
-  $profile_node->field_profile_image[] = $profile_image;
316
-
317
-  // Save the profile object to the database
318
-  // This will automatically set the author uid if node->name has been set
319
-  $profile_node = node_submit($profile_node);
320
-  node_save($profile_node);
321
-
322
-  // Mark profile as approved if it has already been vetted somehow
323
-  if ($profile_approved OR !$boinc_user->has_profile) {
294
+    if (!$default_input_format) $default_input_format = 1;
295
+
296
+    // Populate the profile object
297
+    $profile_node = new stdClass();
298
+    $profile_node->title = $boinc_user->name;
299
+    $profile_node->uid = $account->uid;
300
+    $profile_node->body = '';
301
+    $profile_node->type = 'profile';
302
+    $profile_node->created = $now;
303
+    $profile_node->changed = $now;
304
+    $profile_node->status = 1;
305
+    $profile_node->promote = 0;
306
+    $profile_node->sticky = 0;
307
+    $profile_node->format = $default_input_format;
308
+    $profile_node->name = $account->name; // Set to link profile to account uid!
309
+    $profile_node->field_country[]['value'] = $boinc_user->country;
310
+    $profile_node->field_zip[]['value'] = $boinc_user->postal_code;
311
+    $profile_node->field_url[]['value'] = $boinc_user->url;
312
+    $profile_node->field_background[]['value'] = $profile_background;
313
+    $profile_node->field_opinions[]['value'] = $profile_opinions;
314
+    $profile_node->field_image[] = $avatar_image;
315
+    $profile_node->field_profile_image[] = $profile_image;
316
+
317
+    // Save the profile object to the database
318
+    // This will automatically set the author uid if node->name has been set
319
+    $profile_node = node_submit($profile_node);
320
+    node_save($profile_node);
321
+
322
+    // Mark profile as approved if it has already been vetted somehow
323
+    if ($profile_approved OR !$boinc_user->has_profile) {
324 324
     $profile_node->moderate = 0;
325 325
     node_save($profile_node);
326
-  }
326
+    }
327 327
 
328
-  return;
328
+    return;
329 329
 }
330 330
 
331 331
 function boincuser_account_cross_reference($uid, $boinc_id) {
332 332
     // Cross reference Drupal account with BOINC
333 333
     $reference = db_query("INSERT INTO {boincuser} SET uid=%d, boinc_id=%d", $uid, $boinc_id);
334 334
     if (!$reference) {
335
-      drupal_set_message(t("Error connecting BOINC account."), 'error');
336
-      return false;
335
+        drupal_set_message(t("Error connecting BOINC account."), 'error');
336
+        return false;
337 337
     }
338 338
     return true;
339 339
 }
@@ -342,35 +342,35 @@  discard block
 block discarded – undo
342 342
  * Convert any BOINC forum thread subscriptions to Drupal flag subscriptions
343 343
  */
344 344
 function boincuser_pull_subscriptions($account = NULL) {
345
-  if (!$account) {
345
+    if (!$account) {
346 346
     global $user;
347 347
     $account = user_load($user->id);
348
-  }
349
-  elseif (is_numeric($account)) {
348
+    }
349
+    elseif (is_numeric($account)) {
350 350
     $account = user_load($account);
351
-  }
351
+    }
352 352
 
353
-  // Get any subscriptions for this user
354
-  db_set_active('boinc_rw');
355
-  $subscriptions = db_query('
353
+    // Get any subscriptions for this user
354
+    db_set_active('boinc_rw');
355
+    $subscriptions = db_query('
356 356
     SELECT threadid FROM {subscriptions}
357 357
     WHERE userid = %d', $account->boincuser_id);
358
-  db_set_active('default');
358
+    db_set_active('default');
359 359
 
360
-  $flag = flag_get_flag('subscriptions') or die('no "subscriptions" flag defined');
361
-  $count = 0;
362
-  while ($thread_id = db_result($subscriptions)) {
360
+    $flag = flag_get_flag('subscriptions') or die('no "subscriptions" flag defined');
361
+    $count = 0;
362
+    while ($thread_id = db_result($subscriptions)) {
363 363
     // For each BOINC thread ID subscribed, look up the corresponding node ID
364 364
     $nid = db_result(db_query('
365 365
       SELECT nid FROM {boincimport_temp_topic}
366 366
       WHERE topic_id = %d', $thread_id));
367 367
     // Flag this node for the user
368 368
     if ($nid > 0) {
369
-      $flag->flag('flag', $nid, $account);
370
-      $count++;
369
+        $flag->flag('flag', $nid, $account);
370
+        $count++;
371
+    }
371 372
     }
372
-  }
373
-  return $count;
373
+    return $count;
374 374
 }
375 375
 
376 376
 
@@ -382,12 +382,12 @@  discard block
 block discarded – undo
382 382
  * User account update validation handler.
383 383
  */
384 384
 function boincuser_account_validate($edit, $account) {
385
-  // Include BOINC database objects library, load BOINC account data
386
-  require_boinc('boinc_db');
387
-  $boinc_user = BoincUser::lookup_email_addr($account->mail);
388
-  $changing_email = ($edit['mail'] AND $edit['mail'] != $account->mail) ? true : false;
389
-  $changing_pass = ($edit['pass']) ? true : false;
390
-  if ($changing_email) {
385
+    // Include BOINC database objects library, load BOINC account data
386
+    require_boinc('boinc_db');
387
+    $boinc_user = BoincUser::lookup_email_addr($account->mail);
388
+    $changing_email = ($edit['mail'] AND $edit['mail'] != $account->mail) ? true : false;
389
+    $changing_pass = ($edit['pass']) ? true : false;
390
+    if ($changing_email) {
391 391
     // E-mail address is set to change; check for an existing BOINC user
392 392
     // Check previous email addresses as well, this user's current
393 393
     // email cannot be the same as another user's previous email
@@ -398,50 +398,50 @@  discard block
 block discarded – undo
398 398
 
399 399
     $boinc_user_already_exists = ( BoincUser::lookup_email_addr($edit['mail']) || BoincUser::lookup_prev_email_addr($edit['mail']) );
400 400
     if ($boinc_user_already_exists) {
401
-      form_set_error('mail', bts('A BOINC account already exists for @email.', array('@email' => $edit['mail']), NULL, 'boinc:add-new-user'));
401
+        form_set_error('mail', bts('A BOINC account already exists for @email.', array('@email' => $edit['mail']), NULL, 'boinc:add-new-user'));
402 402
     }
403 403
 
404 404
     // Check email has not been changed in last X days (default X=7).
405 405
     $duration = 86400 * 7;
406 406
     if ( (($boinc_user->email_addr_change_time + $duration) > time()) and (!(user_access('administer users'))) ) {
407
-      form_set_error('email_addr_change_time',
407
+        form_set_error('email_addr_change_time',
408 408
         bts('Your email address was changed within the past seven (7) days. You must wait until !futuredate to change your email again. If you need to reverse this change, please look for an email sent to !prev_email_addr.',
409 409
         array(
410
-          '!futuredate' => date('F j, Y \a\t H:i T', $boinc_user->email_addr_change_time + $duration),
411
-          '!prev_email_addr' => $boinc_user->previous_email_addr,
410
+            '!futuredate' => date('F j, Y \a\t H:i T', $boinc_user->email_addr_change_time + $duration),
411
+            '!prev_email_addr' => $boinc_user->previous_email_addr,
412 412
         ),
413 413
         NULL, 'boinc:account-credentials-change')
414
-      );
414
+        );
415
+    }
415 416
     }
416
-  }
417 417
 
418
-  // If user is changing email or password, require that the current
419
-  // password has been given as well.
420
-  if (($changing_email OR $changing_pass) AND !user_access('administer users')) {
418
+    // If user is changing email or password, require that the current
419
+    // password has been given as well.
420
+    if (($changing_email OR $changing_pass) AND !user_access('administer users')) {
421 421
     // If changing email or password, require current password
422 422
     // (except in cases where password is being reset)
423 423
     if (isset($_SESSION['reset_pass'])) {
424
-      unset($_SESSION['reset_pass']);
424
+        unset($_SESSION['reset_pass']);
425 425
     }
426 426
     else {
427
-      $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
428
-      if (!$edit['current_pass']) {
427
+        $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
428
+        if (!$edit['current_pass']) {
429 429
         form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), NULL, 'boinc:account-credentials-change'));
430
-      }
431
-      elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
430
+        }
431
+        elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
432 432
         form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:account-credentials-change'));
433
-      }
433
+        }
434 434
 
435 435
     }
436
-  }
436
+    }
437 437
 
438
-  // If an admin tries to change the email and NOT the password, show
439
-  // error message. BOINC requires both to be changed together.
440
-  if ($changing_email AND !$changing_pass AND user_access('administer users')) {
438
+    // If an admin tries to change the email and NOT the password, show
439
+    // error message. BOINC requires both to be changed together.
440
+    if ($changing_email AND !$changing_pass AND user_access('administer users')) {
441 441
     form_set_error('pass', bts('If changing a user\'s email, you must also change the password simultaneously.', array(), NULL, 'boinc:account-credentials-change'));
442
-  }
442
+    }
443 443
 
444
-  // Expansion required to allow account key in place of passwd...?
444
+    // Expansion required to allow account key in place of passwd...?
445 445
 
446 446
 }
447 447
 
@@ -454,12 +454,12 @@  discard block
 block discarded – undo
454 454
  * Password request validation handler.
455 455
  */
456 456
 function boincuser_request_pass_validate($form, &$form_state) {
457
-  $edit = $form_state['values'];
458
-  // The Drupal submit function expects a "name" field, even though
459
-  // it contains an email address and we will not allow a user name
460
-  if (!$edit['name']) form_set_error('name', bts('Please enter your email address', array(), NULL, 'boinc:forgot-password'));
461
-  elseif (!valid_email_address($edit['name'])) form_set_error('name', bts('@email is not a well formed email address, please verify', array('@email' => $edit['name']), NULL, 'boinc:forgot-password'));
462
-  else {
457
+    $edit = $form_state['values'];
458
+    // The Drupal submit function expects a "name" field, even though
459
+    // it contains an email address and we will not allow a user name
460
+    if (!$edit['name']) form_set_error('name', bts('Please enter your email address', array(), NULL, 'boinc:forgot-password'));
461
+    elseif (!valid_email_address($edit['name'])) form_set_error('name', bts('@email is not a well formed email address, please verify', array('@email' => $edit['name']), NULL, 'boinc:forgot-password'));
462
+    else {
463 463
     // set email addrress to lower case
464 464
     $lower_email_addr = strtolower($edit['name']);
465 465
 
@@ -469,110 +469,110 @@  discard block
 block discarded – undo
469 469
     require_boinc('boinc_db');
470 470
     $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
471 471
     if ($boinc_user) {
472
-      // If the user is in BOINC but not Drupal, bring them over...
473
-      boincuser_register_make_drupal_user($boinc_user);
472
+        // If the user is in BOINC but not Drupal, bring them over...
473
+        boincuser_register_make_drupal_user($boinc_user);
474 474
     } else {
475
-      // If there is no existing BOINC user either, show an error
476
-      form_set_error('name', bts('No account exists for @email -- please create an account using a BOINC client -- !instructions',
477
-      array(
478
-          '@email' => $edit['name'],
479
-          '!instructions' => l(bts('Instructions', array(), NULL, 'boinc:forgot-password'), 'join')
480
-      ), NULL, 'boinc:forgot-password'));
481
-    }
482
-  }
475
+        // If there is no existing BOINC user either, show an error
476
+        form_set_error('name', bts('No account exists for @email -- please create an account using a BOINC client -- !instructions',
477
+        array(
478
+            '@email' => $edit['name'],
479
+            '!instructions' => l(bts('Instructions', array(), NULL, 'boinc:forgot-password'), 'join')
480
+        ), NULL, 'boinc:forgot-password'));
481
+    }
482
+    }
483 483
 }
484 484
 
485 485
 /**
486 486
  * The definition of the authenticator login form.
487 487
  */
488 488
 function boincuser_authloginform() {
489
-  $headers = apache_request_headers();
490
-  $project_name = variable_get('site_name', 'Drupal-BOINC');
491
-  $project_domain = $headers['Host'];
492
-  $form['heading'] = array(
489
+    $headers = apache_request_headers();
490
+    $project_name = variable_get('site_name', 'Drupal-BOINC');
491
+    $project_domain = $headers['Host'];
492
+    $form['heading'] = array(
493 493
     '#type' => 'markup',
494 494
     '#value' => '<h3>' . bts("If you forgot your account's email address, or you can't receive email there:", array(), NULL, 'boinc:authenticator-login-page') . '</h3>'
495
-  );
496
-  $form['instructions'] = array(
495
+    );
496
+    $form['instructions'] = array(
497 497
     '#type' => 'markup',
498 498
     '#value' => '' .
499
-      '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), NULL, 'boinc:authenticator-login-page') .
500
-      '  <ul>' .
501
-      '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), NULL, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), NULL, 'boinc:authenticator-login-page') . '</li>' .
502
-      '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), NULL, 'boinc:authenticator-login-page') . '</li>' .
503
-      '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:", array(), NULL, 'boinc:authenticator-login-page') .
504
-      '      <pre>' .
505
-      '&lt;account&gt;' . "\n" .
506
-      "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;" . "\n" .
507
-      '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;' . "\n" .
508
-      "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;" . "\n" .
509
-      '  ...' . "\n" .
510
-      '&lt;/account&gt;' .
511
-      '      </pre>' .
512
-      '    </li>' .
513
-      '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), NULL, 'boinc:authenticator-login-page') . '</li>' .
514
-      '    <li>' . bts('Paste the string into the field below, and click OK.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
515
-      '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
516
-      '  </ul>' .
517
-      '</p>'
518
-  );
519
-  $form['authenticator'] = array(
499
+        '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), NULL, 'boinc:authenticator-login-page') .
500
+        '  <ul>' .
501
+        '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), NULL, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), NULL, 'boinc:authenticator-login-page') . '</li>' .
502
+        '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), NULL, 'boinc:authenticator-login-page') . '</li>' .
503
+        '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:", array(), NULL, 'boinc:authenticator-login-page') .
504
+        '      <pre>' .
505
+        '&lt;account&gt;' . "\n" .
506
+        "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;" . "\n" .
507
+        '  &lt;authenticator&gt;8b8496fdd26df7dc0423ecd43c09a56b&lt;/authenticator&gt;' . "\n" .
508
+        "  &lt;project_name&gt;{$project_name}&lt;/project_name&gt;" . "\n" .
509
+        '  ...' . "\n" .
510
+        '&lt;/account&gt;' .
511
+        '      </pre>' .
512
+        '    </li>' .
513
+        '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), NULL, 'boinc:authenticator-login-page') . '</li>' .
514
+        '    <li>' . bts('Paste the string into the field below, and click OK.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
515
+        '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
516
+        '  </ul>' .
517
+        '</p>'
518
+    );
519
+    $form['authenticator'] = array(
520 520
     '#title' => bts('Log in with authenticator', array(), NULL, 'boinc:authenticator-login-page'),
521 521
     '#type' => 'textfield',
522 522
     '#size' => 60,
523 523
     '#maxlength' => 32,
524 524
     '#required' => TRUE,
525 525
     '#description' => null
526
-  );
526
+    );
527 527
 
528
-  // Form control
529
-  $form['form control tabs prefix'] = array(
528
+    // Form control
529
+    $form['form control tabs prefix'] = array(
530 530
     '#value' => '<ul class="form-control tab-list">',
531 531
     '#weight' => 1001,
532
-  );
533
-  $form['submit'] = array(
532
+    );
533
+    $form['submit'] = array(
534 534
     '#prefix' => '<li class="first tab">',
535 535
     '#type' => 'submit',
536 536
     '#value' => bts('OK', array(), NULL, 'boinc:form-ok'),
537 537
     '#suffix' => '</li>',
538 538
     '#weight' => 1002,
539
-  );
540
-  $form['form control tabs'] = array(
539
+    );
540
+    $form['form control tabs'] = array(
541 541
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/password') . '</li>',
542 542
     '#weight' => 1003,
543
-  );
544
-  $form['form control tabs suffix'] = array(
543
+    );
544
+    $form['form control tabs suffix'] = array(
545 545
     '#value' => '</ul>',
546 546
     '#weight' => 1004,
547
-  );
548
-  return $form;
547
+    );
548
+    return $form;
549 549
 }
550 550
 
551 551
 /**
552 552
  * The authenticator login validation handler
553 553
  */
554 554
 function boincuser_authloginform_validate($form, &$form_state) {
555
-  $authenticator = $form_state['values']['authenticator'];
556
-  if (strlen($authenticator) != 32) {
555
+    $authenticator = $form_state['values']['authenticator'];
556
+    if (strlen($authenticator) != 32) {
557 557
     // We notify the form API that this field has failed validation.
558 558
     form_set_error('authenticator', bts('That authenticator is not valid.', array(), NULL, 'boinc:authenticator-login-page'));
559
-  } else {
559
+    } else {
560 560
     require_boinc('boinc_db');
561 561
     $boinc_user = BoincUser::lookup("authenticator='".addslashes($authenticator)."'");
562 562
     if (!$boinc_user) form_set_error('authenticator', bts('There is no account with that authenticator.', array(), NULL, 'boinc:authenticator-login-page'));
563
-  }
563
+    }
564 564
 }
565 565
 
566 566
 /**
567 567
  * The authenticator login submit handler
568 568
  */
569 569
 function boincuser_authloginform_submit($form, &$form_state) {
570
-  global $user;
571
-  $authenticator = $form_state['values']['authenticator'];
572
-  require_boinc('boinc_db');
573
-  $boinc_user = BoincUser::lookup("authenticator='".addslashes($authenticator)."'");
574
-  if (!$user = user_load(get_drupal_id($boinc_user->id))) drupal_set_message(t('An unresolved error occurred while logging into this account.'));
575
-  else $form_state['redirect'] = 'account/info/edit';
570
+    global $user;
571
+    $authenticator = $form_state['values']['authenticator'];
572
+    require_boinc('boinc_db');
573
+    $boinc_user = BoincUser::lookup("authenticator='".addslashes($authenticator)."'");
574
+    if (!$user = user_load(get_drupal_id($boinc_user->id))) drupal_set_message(t('An unresolved error occurred while logging into this account.'));
575
+    else $form_state['redirect'] = 'account/info/edit';
576 576
 }
577 577
 
578 578
 
@@ -580,44 +580,44 @@  discard block
 block discarded – undo
580 580
  * The definition of the moderator reject user profile form.
581 581
  */
582 582
 function boincuser_moderate_profile_reject_form(&$form_state, $uid) {
583
-  $form_state['storage']['reject_profile_uid'] = $uid;
584
-  $form['reason'] = array(
583
+    $form_state['storage']['reject_profile_uid'] = $uid;
584
+    $form['reason'] = array(
585 585
     '#title' => bts('Reason for rejecting this profile', array(), NULL, 'boinc:moderate-user'),
586 586
     '#type' => 'textarea',
587 587
     '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of the problem and how to fix it.', array(), NULL, 'boinc:moderate-user'),
588 588
     '#default_value' => '',
589
-  );
589
+    );
590 590
 
591
-  // Form control
592
-  $form['form control tabs prefix'] = array(
591
+    // Form control
592
+    $form['form control tabs prefix'] = array(
593 593
     '#value' => '<ul class="form-control tab-list">',
594 594
     '#weight' => 1001,
595
-  );
596
-  $form['submit'] = array(
595
+    );
596
+    $form['submit'] = array(
597 597
     '#prefix' => '<li class="first tab">',
598 598
     '#type' => 'submit',
599 599
     '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
600 600
     '#suffix' => '</li>',
601 601
     '#weight' => 1002,
602
-  );
603
-  $form['form control tabs'] = array(
602
+    );
603
+    $form['form control tabs'] = array(
604 604
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
605 605
     '#weight' => 1003,
606
-  );
607
-  $form['form control tabs suffix'] = array(
606
+    );
607
+    $form['form control tabs suffix'] = array(
608 608
     '#value' => '</ul>',
609 609
     '#weight' => 1004,
610
-  );
611
-  return $form;
610
+    );
611
+    return $form;
612 612
 }
613 613
 
614 614
 /**
615 615
  * The moderator reject user profile submit handler
616 616
  */
617 617
 function boincuser_moderate_profile_reject_form_submit($form, &$form_state) {
618
-  $uid = $form_state['storage']['reject_profile_uid'];
619
-  $reason = $form_state['values']['reason'];
620
-  boincuser_moderate_profile_reject($uid, $reason);
618
+    $uid = $form_state['storage']['reject_profile_uid'];
619
+    $reason = $form_state['values']['reason'];
620
+    boincuser_moderate_profile_reject($uid, $reason);
621 621
 }
622 622
 
623 623
 
@@ -625,52 +625,52 @@  discard block
 block discarded – undo
625 625
  * The definition of the ban user form.
626 626
  */
627 627
 function boincuser_moderate_user_ban_form(&$form_state, $uid) {
628
-  $form_state['storage']['ban_user_uid'] = $uid;
629
-  $form['reason'] = array(
628
+    $form_state['storage']['ban_user_uid'] = $uid;
629
+    $form['reason'] = array(
630 630
     '#title' => bts('Reason for banning this user', array(), NULL, 'boinc:moderate-user'),
631 631
     '#type' => 'textarea',
632 632
     '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of why the user is being banned.', array(), NULL, 'boinc:moderate-user'),
633 633
     '#default_value' => '',
634
-  );
635
-  $form['duration'] = array(
634
+    );
635
+    $form['duration'] = array(
636 636
     '#title' => bts('Duration of the ban', array(), NULL, 'boinc:moderate-user'),
637 637
     '#type' => 'textfield',
638 638
     '#description' => bts('The number of days until the ban expires. Set to 0 to ban permanently.', array(), NULL, 'boinc:moderate-user'),
639 639
     '#default_value' => '',
640
-  );
640
+    );
641 641
 
642
-  // Form control
643
-  $form['form control tabs prefix'] = array(
642
+    // Form control
643
+    $form['form control tabs prefix'] = array(
644 644
     '#value' => '<ul class="form-control tab-list">',
645 645
     '#weight' => 1001,
646
-  );
647
-  $form['submit'] = array(
646
+    );
647
+    $form['submit'] = array(
648 648
     '#prefix' => '<li class="first tab">',
649 649
     '#type' => 'submit',
650 650
     '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
651 651
     '#suffix' => '</li>',
652 652
     '#weight' => 1002,
653
-  );
654
-  $form['form control tabs'] = array(
653
+    );
654
+    $form['form control tabs'] = array(
655 655
     '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
656 656
     '#weight' => 1003,
657
-  );
658
-  $form['form control tabs suffix'] = array(
657
+    );
658
+    $form['form control tabs suffix'] = array(
659 659
     '#value' => '</ul>',
660 660
     '#weight' => 1004,
661
-  );
662
-  return $form;
661
+    );
662
+    return $form;
663 663
 }
664 664
 
665 665
 /**
666 666
  * The ban user submit handler
667 667
  */
668 668
 function boincuser_moderate_user_ban_form_submit($form, &$form_state) {
669
-  $uid = $form_state['storage']['ban_user_uid'];
670
-  $reason = $form_state['values']['reason'];
671
-  $duration = $form_state['values']['duration'];
672
-  if ($duration) $duration = $duration * 24*60*60;
673
-  boincuser_moderate_user_ban($uid, $reason, $duration);
669
+    $uid = $form_state['storage']['ban_user_uid'];
670
+    $reason = $form_state['values']['reason'];
671
+    $duration = $form_state['values']['duration'];
672
+    if ($duration) $duration = $duration * 24*60*60;
673
+    boincuser_moderate_user_ban($uid, $reason, $duration);
674 674
 }
675 675
 
676 676
 
@@ -678,10 +678,10 @@  discard block
 block discarded – undo
678 678
  * Hack to fix submission of the flag friend unfriend form
679 679
  */
680 680
 function boincuser_fix_unfriend_form_submit($form, &$form_state) {
681
-  // Leaving action as "unfriend" causes problems
682
-  if ($form_state['values']['action'] == 'unfriend') {
681
+    // Leaving action as "unfriend" causes problems
682
+    if ($form_state['values']['action'] == 'unfriend') {
683 683
     $form_state['values']['action'] = 'unflag';
684
-  }
684
+    }
685 685
 }
686 686
 
687 687
 /*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
@@ -689,102 +689,102 @@  discard block
 block discarded – undo
689 689
  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
690 690
 
691 691
 function boincuser_termsofuse_form() {
692
-  global $user;
692
+    global $user;
693 693
 
694
-  // If user has already signed terms of use, and got to this form in error, send them to site home.
695
-  if (boincuser_check_termsofuse($user)) {
694
+    // If user has already signed terms of use, and got to this form in error, send them to site home.
695
+    if (boincuser_check_termsofuse($user)) {
696 696
     drupal_goto();
697
-  }
697
+    }
698 698
 
699
-  drupal_set_message( bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), NULL, 'boinc:termsofuse-form'), 'warning' );
699
+    drupal_set_message( bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), NULL, 'boinc:termsofuse-form'), 'warning' );
700 700
 
701
-  $form = array();
702
-  drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
703
-  $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
701
+    $form = array();
702
+    drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
703
+    $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
704 704
 
705
-  // Fieldset to hold all of the form as a container
706
-  $form['termsofuse'] = array(
705
+    // Fieldset to hold all of the form as a container
706
+    $form['termsofuse'] = array(
707 707
     '#type'   => 'fieldset',
708 708
     '#prefix' => '<div id="termsofuse-wrapper">', // This is our wrapper div.
709 709
     '#suffix' => '</div>',
710 710
     '#tree'   => TRUE,
711
-  );
711
+    );
712 712
 
713
-  $form['termsofuse']['title1'] = array(
713
+    $form['termsofuse']['title1'] = array(
714 714
     '#weight' => -12,
715 715
     '#value' => '<h2>' . bts( variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:termsofuse-form' ) . '</h2>',
716 716
     '#prefix' => '<div id="register-title1">',
717 717
     '#suffix' => '</div>',
718
-  );
718
+    );
719 719
 
720
-  // Terms of use section
721
-  $form['termsofuse']['body'] = array(
720
+    // Terms of use section
721
+    $form['termsofuse']['body'] = array(
722 722
     '#weight' => -10,
723 723
     '#value' => bts($termsofuse, array(), NULL, 'project:termsofuse-form'),
724 724
     '#prefix' => '<div id="register-termsofuse">',
725 725
     '#suffix' => '</div>',
726
-  );
726
+    );
727 727
 
728
-  $form['termsofuse']['agreeTOU'] = array(
728
+    $form['termsofuse']['agreeTOU'] = array(
729 729
     '#type'   => 'checkbox',
730 730
     '#title'  => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), NULL, 'project:termsofuse-form'),
731 731
     '#weight' => -8,
732 732
     '#prefix' => '<div id="register-checkbox">',
733 733
     '#suffix' => '</div>',
734
-  );
734
+    );
735 735
 
736
-  $form['termsofuse']['spacer'] = array(
736
+    $form['termsofuse']['spacer'] = array(
737 737
     '#prefix' => '<div class="clearfix" id="register-title2">',
738 738
     '#value'  => '&nbsp;',
739 739
     '#suffix' => '</div>',
740
-  );
740
+    );
741 741
 
742
-  // Form Control
743
-  $form['submit'] = array(
742
+    // Form Control
743
+    $form['submit'] = array(
744 744
     '#prefix' => '<p><p><p><li class="first tab" id="register-submit">',
745 745
     '#type' => 'submit',
746 746
     '#value' => bts('Yes', array(), NULL, 'boinc:form-submit'),
747 747
     '#suffix' => '</li>',
748
-  );
749
-  $form['form control tabs'] = array(
748
+    );
749
+    $form['form control tabs'] = array(
750 750
     '#value' => '<li class="tab">' . l(bts('NO - LOGOUT', array(), NULL, 'boinc:form-cancel'), '/logout') . '</li>',
751
-  );
752
-  if (module_exists('boincuser_delete')) {
751
+    );
752
+    if (module_exists('boincuser_delete')) {
753 753
     $deletelink = '/user/' . $user->uid . '/delete';
754 754
     $form['deleteaccount'] = array(
755
-      '#value' => '<li class="tab">' . l(bts('NO - DELETE ACCOUNT', array(), NULL, 'boinc:form-delete-user'), $deletelink) . '</li>',
755
+        '#value' => '<li class="tab">' . l(bts('NO - DELETE ACCOUNT', array(), NULL, 'boinc:form-delete-user'), $deletelink) . '</li>',
756 756
     );
757
-  }
757
+    }
758 758
 
759
-  // Set form redirect
760
-  $form['#redirect'] = $_REQUEST['destination'];
759
+    // Set form redirect
760
+    $form['#redirect'] = $_REQUEST['destination'];
761 761
 
762
-  // Add the current user's data into the form
763
-  $form['#account'] = $user;
762
+    // Add the current user's data into the form
763
+    $form['#account'] = $user;
764 764
 
765
-  return $form;
765
+    return $form;
766 766
 }
767 767
 
768 768
 function boincuser_termsofuse_form_validate($form, &$form_state) {
769
-  // Check TOU agreement
770
-  if (!$form_state['values']['termsofuse']['agreeTOU']) {
769
+    // Check TOU agreement
770
+    if (!$form_state['values']['termsofuse']['agreeTOU']) {
771 771
     form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', array(), NULL, 'boinc:termsofuse-form'));
772
-  }
772
+    }
773 773
 }
774 774
 
775 775
 function boincuser_termsofuse_form_submit($form, &$form_state) {
776
-  $user = $form['#account'];
777
-  if (!boincuser_consentto_termsofuse($user)) {
776
+    $user = $form['#account'];
777
+    if (!boincuser_consentto_termsofuse($user)) {
778 778
     form_set_error('termsofuse',
779
-      bts('There was an error in agreeing to the terms of use. The @project administrators have been notified.',
779
+        bts('There was an error in agreeing to the terms of use. The @project administrators have been notified.',
780 780
         array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:termsofuse-form')
781 781
     );
782
-  }
782
+    }
783 783
 
784
-  // Delete session messages
785
-  if ($_SESSION['messages']['warning']) {
784
+    // Delete session messages
785
+    if ($_SESSION['messages']['warning']) {
786 786
     unset($_SESSION['messages']['warning']);
787
-  }
787
+    }
788 788
 }
789 789
 
790 790
 /**
@@ -793,89 +793,89 @@  discard block
 block discarded – undo
793 793
  * removed after used.
794 794
  */
795 795
 function boincuser_revertemail(&$form_state, $token) {
796
-  require_boinc('token');
797
-  require_boinc('util');
796
+    require_boinc('token');
797
+    require_boinc('util');
798 798
 
799
-  global $user;
800
-  $form = array();
799
+    global $user;
800
+    $form = array();
801 801
 
802
-  // drupal JS for dynamic password validation
803
-  _user_password_dynamic_validation();
802
+    // drupal JS for dynamic password validation
803
+    _user_password_dynamic_validation();
804 804
 
805
-  // check BOINC user exists
806
-  $account = user_load(array('uid' => $user->uid));
807
-  $uid = $user->uid;
808
-  $boincid = $account->boincuser_id;
809
-  // check $token is valid
810
-  if (!is_valid_token($boincid, $token, 'E')) {
805
+    // check BOINC user exists
806
+    $account = user_load(array('uid' => $user->uid));
807
+    $uid = $user->uid;
808
+    $boincid = $account->boincuser_id;
809
+    // check $token is valid
810
+    if (!is_valid_token($boincid, $token, 'E')) {
811 811
     drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your email address.',
812 812
     array(
813
-      '!link' => l(bts('changing', array(), NULL, 'boinc:revert-email-change'), "/account/info/edit"),
813
+        '!link' => l(bts('changing', array(), NULL, 'boinc:revert-email-change'), "/account/info/edit"),
814 814
     ),
815 815
     NULL, 'boinc:revert-email-change'), 'error');
816 816
     drupal_goto();
817
-  }
817
+    }
818 818
 
819
-  // Attach account and token to this form.
820
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
821
-  $form['_token'] = array('#type' => 'value', '#value' => $token);
819
+    // Attach account and token to this form.
820
+    $form['_account'] = array('#type' => 'value', '#value' => $account);
821
+    $form['_token'] = array('#type' => 'value', '#value' => $token);
822 822
 
823
-  // Instructions
824
-  $form['main']['instructions1'] = array(
823
+    // Instructions
824
+    $form['main']['instructions1'] = array(
825 825
     '#value' => '<p>'.
826 826
     bts('In order to change your email back to your previous email address, <strong>!prev_email</strong>, you must also change your password.',
827
-      array(
827
+        array(
828 828
         '!prev_email' => $account->boincuser_previous_email_addr,
829
-      ),
830
-      NULL, 'boinc:revert-email-change').
829
+        ),
830
+        NULL, 'boinc:revert-email-change').
831 831
     '</p>',
832
-  );
832
+    );
833 833
 
834
-  $form['main']['pass'] = array(
834
+    $form['main']['pass'] = array(
835 835
     '#type' => 'password_confirm',
836 836
     '#description' => 'Enter a new password in both fields',
837 837
     '#size' => 17,
838
-  );
839
-
840
-  // Wrap action buttons for styling consistency
841
-  $form['buttons']['form control tabs prefix'] = array(
842
-      '#value' => '<ul class="form-control tab-list">',
843
-      '#weight' => 1001,
844
-  );
845
-  $form['buttons']['submit']['#type'] = 'submit';
846
-  $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
847
-  $form['buttons']['submit']['#value'] = bts('Submit', array(), NULL, 'boinc:form-submit');
848
-  $form['buttons']['submit']['#suffix'] = '</li>';
849
-  $form['buttons']['submit']['#weight'] = 1002;
850
-  $form['buttons']['cancel'] = array(
851
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/info/edit') . '</li>',
852
-      '#weight' => 1005,
853
-  );
854
-  $form['buttons']['form control tabs suffix'] = array(
855
-      '#value' => '</ul>',
856
-      '#weight' => 1010,
857
-  );
858
-
859
-  return $form;
838
+    );
839
+
840
+    // Wrap action buttons for styling consistency
841
+    $form['buttons']['form control tabs prefix'] = array(
842
+        '#value' => '<ul class="form-control tab-list">',
843
+        '#weight' => 1001,
844
+    );
845
+    $form['buttons']['submit']['#type'] = 'submit';
846
+    $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
847
+    $form['buttons']['submit']['#value'] = bts('Submit', array(), NULL, 'boinc:form-submit');
848
+    $form['buttons']['submit']['#suffix'] = '</li>';
849
+    $form['buttons']['submit']['#weight'] = 1002;
850
+    $form['buttons']['cancel'] = array(
851
+        '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/info/edit') . '</li>',
852
+        '#weight' => 1005,
853
+    );
854
+    $form['buttons']['form control tabs suffix'] = array(
855
+        '#value' => '</ul>',
856
+        '#weight' => 1010,
857
+    );
858
+
859
+    return $form;
860 860
 }
861 861
 
862 862
 /**
863 863
  * Validation handler for revertemail form
864 864
  */
865 865
 function boincuser_revertemail_validate($form, &$form_state) {
866
-  // Load account and boincuser
867
-  $account = $form_state['values']['_account'];
868
-  $boinc_user = BoincUser::lookup_id_nocache($account->boincuser_id);
866
+    // Load account and boincuser
867
+    $account = $form_state['values']['_account'];
868
+    $boinc_user = BoincUser::lookup_id_nocache($account->boincuser_id);
869 869
 
870
-  if (BoincUser::lookup_email_addr($boinc_user->previous_email_addr)) {
870
+    if (BoincUser::lookup_email_addr($boinc_user->previous_email_addr)) {
871 871
     rules_invoke_event('boincuser_revert_email_error', $boinc_user->previous_email_addr, variable_get('boinc_admin_mailing_list_subject_tag', ''));
872 872
     form_set_error('mail',
873
-      bts('An account already exists for @email. Previous email address cannot be used because another account is using it as their email address. The @project administrators have been notified.',
873
+        bts('An account already exists for @email. Previous email address cannot be used because another account is using it as their email address. The @project administrators have been notified.',
874 874
         array(
875
-          '@email' => $boinc_user->previous_email_addr,
876
-          '@project' => variable_get('site_name', 'Drupal-BOINC'),
875
+            '@email' => $boinc_user->previous_email_addr,
876
+            '@project' => variable_get('site_name', 'Drupal-BOINC'),
877 877
         ), NULL, 'boinc:add-new-user'));
878
-  }
878
+    }
879 879
 
880 880
 }
881 881
 
@@ -883,25 +883,25 @@  discard block
 block discarded – undo
883 883
  * Submit handler for revertemail form
884 884
  */
885 885
 function boincuser_revertemail_submit($form, &$form_state) {
886
-  require_boinc('password_compat/password');
886
+    require_boinc('password_compat/password');
887 887
 
888
-  // Load account and boincuser
889
-  $account = $form_state['values']['_account'];
890
-  $boinc_user = BoincUser::lookup_id_nocache($account->boincuser_id);
888
+    // Load account and boincuser
889
+    $account = $form_state['values']['_account'];
890
+    $boinc_user = BoincUser::lookup_id_nocache($account->boincuser_id);
891 891
 
892
-  $pem = strtolower($boinc_user->previous_email_addr);
892
+    $pem = strtolower($boinc_user->previous_email_addr);
893 893
 
894
-  // Set new password based on previous email address and entered
895
-  // password.
896
-  $new_passwd_hash = password_hash( md5($form_state['values']['pass'].$pem), PASSWORD_DEFAULT);
894
+    // Set new password based on previous email address and entered
895
+    // password.
896
+    $new_passwd_hash = password_hash( md5($form_state['values']['pass'].$pem), PASSWORD_DEFAULT);
897 897
 
898
-  $boinc_user->update("email_addr='${pem}', previous_email_addr='', email_addr_change_time=0, passwd_hash='${new_passwd_hash}'");
898
+    $boinc_user->update("email_addr='${pem}', previous_email_addr='', email_addr_change_time=0, passwd_hash='${new_passwd_hash}'");
899 899
 
900
-  // Set email in drupal database to previous email
901
-  user_save($account, array('mail' => $pem));
900
+    // Set email in drupal database to previous email
901
+    user_save($account, array('mail' => $pem));
902 902
 
903
-  // delete the token
904
-  $result = delete_token($account->boincuser_id, $form_state['values']['_token'], 'E');
903
+    // delete the token
904
+    $result = delete_token($account->boincuser_id, $form_state['values']['_token'], 'E');
905 905
 
906
-  drupal_goto('account');
906
+    drupal_goto('account');
907 907
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -345,8 +345,7 @@  discard block
 block discarded – undo
345 345
   if (!$account) {
346 346
     global $user;
347 347
     $account = user_load($user->id);
348
-  }
349
-  elseif (is_numeric($account)) {
348
+  } elseif (is_numeric($account)) {
350 349
     $account = user_load($account);
351 350
   }
352 351
 
@@ -422,13 +421,11 @@  discard block
 block discarded – undo
422 421
     // (except in cases where password is being reset)
423 422
     if (isset($_SESSION['reset_pass'])) {
424 423
       unset($_SESSION['reset_pass']);
425
-    }
426
-    else {
424
+    } else {
427 425
       $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
428 426
       if (!$edit['current_pass']) {
429 427
         form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), NULL, 'boinc:account-credentials-change'));
430
-      }
431
-      elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
428
+      } elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
432 429
         form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:account-credentials-change'));
433 430
       }
434 431
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
   // Call our custom authentication function to check for an existing BOINC user
36 36
   if (!boincuser_login_authenticate($form_state['values'])) {
37 37
     // Authentication failed; set an error accordingly
38
-    form_set_error('name', bts('Sorry, unrecognized email address or password.', array(), NULL, 'boinc:forgot-password') . ' ' . l(bts('Have you forgotten your password?', array(), NULL, 'boinc:forgot-password'), 'user/password'));
38
+    form_set_error('name', bts('Sorry, unrecognized email address or password.', array(), null, 'boinc:forgot-password') . ' ' . l(bts('Have you forgotten your password?', array(), null, 'boinc:forgot-password'), 'user/password'));
39 39
   }
40 40
 }
41 41
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
   $termsofuse = variable_get('boinc_weboptions_termsofuse', '');
106 106
   if (!empty($termsofuse)) {
107 107
     if (!$form_state['values']['termsofuse']['agreeTOU']) {
108
-      form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', NULL, 'boinc:register-new-user'));
108
+      form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', null, 'boinc:register-new-user'));
109 109
       return false;
110 110
     }
111 111
   }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         array(
122 122
           '@email' => $lower_email_addr,
123 123
           '@project' => variable_get('site_name', 'Drupal-BOINC')
124
-        ), NULL, 'boinc:register-new-user')
124
+        ), null, 'boinc:register-new-user')
125 125
     );
126 126
   }
127 127
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
   $boinc_user = BoincUser::lookup_email_addr($lower_email_addr);
134 134
   if ($boinc_user) {
135 135
     // User already exists
136
-    form_set_error('mail', bts('An account already exists for @email. Log in or request password assistance to access your @project account.', array('@email' => $lower_email_addr, '@project' => PROJECT), NULL, 'boinc:add-new-user'));
136
+    form_set_error('mail', bts('An account already exists for @email. Log in or request password assistance to access your @project account.', array('@email' => $lower_email_addr, '@project' => PROJECT), null, 'boinc:add-new-user'));
137 137
     return false;
138 138
   }
139 139
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 function boincuser_create_drupal_user($boinc_user) {
176 176
   require_boinc('forum_db');
177 177
   BoincForumPrefs::lookup($boinc_user);
178
-  $account = NULL;
178
+  $account = null;
179 179
   $module = 'boincuser';
180 180
 
181 181
   // Verify that this account has not already been imported
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     $boinc_user->id)
185 185
   );
186 186
   if ($already_imported) {
187
-    return NULL;
187
+    return null;
188 188
   }
189 189
 
190 190
   // Email is limited to 64 characters...
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
   if ($already_imported) {
199 199
     drupal_set_message(t('An account for @email already exists', array('@email' => $boinc_email)), 'warning');
200 200
     watchdog('boincimport', 'An account for @email already exists', array('@email' => $boinc_email), WATCHDOG_WARNING);
201
-    return NULL;
201
+    return null;
202 202
   }
203 203
 
204 204
   // Make sure name is unique
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
   // Terminate if an error occured during user_save().
237 237
   if (!$account) {
238 238
     drupal_set_message(t("Error saving user account."), 'error');
239
-    return NULL;
239
+    return null;
240 240
   }
241 241
 
242 242
   // Cross reference the Drupal and BOINC accounts
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
   $profile_opinions = null;
268 268
   $profile_image = null;
269 269
   $avatar_image = null;
270
-  $profile_approved = NULL;
270
+  $profile_approved = null;
271 271
 
272 272
   // Load the BOINC profile, if available
273 273
   if ($boinc_user->has_profile) {
@@ -277,17 +277,17 @@  discard block
 block discarded – undo
277 277
     if ($boinc_profile->has_picture) {
278 278
       // Load picture; load validators; determine where to store it in Drupal
279 279
       $image_path = "{$image_dir}/{$boinc_user->id}.jpg";
280
-      $profile_image = get_cck_image_object($image_path, 'field_profile_image', 'profile', TRUE);
280
+      $profile_image = get_cck_image_object($image_path, 'field_profile_image', 'profile', true);
281 281
       // If the user does not have a different image as an avatar, use this one
282 282
       if (!$boinc_user->prefs->avatar) {
283
-        $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', TRUE);
283
+        $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', true);
284 284
       }
285 285
     }
286 286
     if ($boinc_user->prefs->avatar) {
287 287
       $image_path = "{$image_dir}/{$boinc_user->id}_avatar.jpg";
288
-      $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', TRUE);
288
+      $avatar_image = get_cck_image_object($image_path, 'field_image', 'profile', true);
289 289
     }
290
-    $profile_approved = $boinc_profile->verification ? TRUE : FALSE;
290
+    $profile_approved = $boinc_profile->verification ? true : false;
291 291
   }
292 292
   $default_input_format = db_result(db_query("
293 293
     SELECT format FROM {filter_formats} WHERE name = '%s'", 'Rich text'));
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
   node_save($profile_node);
321 321
 
322 322
   // Mark profile as approved if it has already been vetted somehow
323
-  if ($profile_approved OR !$boinc_user->has_profile) {
323
+  if ($profile_approved or !$boinc_user->has_profile) {
324 324
     $profile_node->moderate = 0;
325 325
     node_save($profile_node);
326 326
   }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 /**
342 342
  * Convert any BOINC forum thread subscriptions to Drupal flag subscriptions
343 343
  */
344
-function boincuser_pull_subscriptions($account = NULL) {
344
+function boincuser_pull_subscriptions($account = null) {
345 345
   if (!$account) {
346 346
     global $user;
347 347
     $account = user_load($user->id);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
   // Include BOINC database objects library, load BOINC account data
386 386
   require_boinc('boinc_db');
387 387
   $boinc_user = BoincUser::lookup_email_addr($account->mail);
388
-  $changing_email = ($edit['mail'] AND $edit['mail'] != $account->mail) ? true : false;
388
+  $changing_email = ($edit['mail'] and $edit['mail'] != $account->mail) ? true : false;
389 389
   $changing_pass = ($edit['pass']) ? true : false;
390 390
   if ($changing_email) {
391 391
     // E-mail address is set to change; check for an existing BOINC user
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 
399 399
     $boinc_user_already_exists = ( BoincUser::lookup_email_addr($edit['mail']) || BoincUser::lookup_prev_email_addr($edit['mail']) );
400 400
     if ($boinc_user_already_exists) {
401
-      form_set_error('mail', bts('A BOINC account already exists for @email.', array('@email' => $edit['mail']), NULL, 'boinc:add-new-user'));
401
+      form_set_error('mail', bts('A BOINC account already exists for @email.', array('@email' => $edit['mail']), null, 'boinc:add-new-user'));
402 402
     }
403 403
 
404 404
     // Check email has not been changed in last X days (default X=7).
@@ -410,14 +410,14 @@  discard block
 block discarded – undo
410 410
           '!futuredate' => date('F j, Y \a\t H:i T', $boinc_user->email_addr_change_time + $duration),
411 411
           '!prev_email_addr' => $boinc_user->previous_email_addr,
412 412
         ),
413
-        NULL, 'boinc:account-credentials-change')
413
+        null, 'boinc:account-credentials-change')
414 414
       );
415 415
     }
416 416
   }
417 417
 
418 418
   // If user is changing email or password, require that the current
419 419
   // password has been given as well.
420
-  if (($changing_email OR $changing_pass) AND !user_access('administer users')) {
420
+  if (($changing_email or $changing_pass) and !user_access('administer users')) {
421 421
     // If changing email or password, require current password
422 422
     // (except in cases where password is being reset)
423 423
     if (isset($_SESSION['reset_pass'])) {
@@ -426,10 +426,10 @@  discard block
 block discarded – undo
426 426
     else {
427 427
       $given_hash = md5($edit['current_pass'] . strtolower($account->mail));
428 428
       if (!$edit['current_pass']) {
429
-        form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), NULL, 'boinc:account-credentials-change'));
429
+        form_set_error('current_pass', bts('Authentication is required when changing E-mail address or setting new password.', array(), null, 'boinc:account-credentials-change'));
430 430
       }
431 431
       elseif ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) {
432
-        form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:account-credentials-change'));
432
+        form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), null, 'boinc:account-credentials-change'));
433 433
       }
434 434
 
435 435
     }
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
 
438 438
   // If an admin tries to change the email and NOT the password, show
439 439
   // error message. BOINC requires both to be changed together.
440
-  if ($changing_email AND !$changing_pass AND user_access('administer users')) {
441
-    form_set_error('pass', bts('If changing a user\'s email, you must also change the password simultaneously.', array(), NULL, 'boinc:account-credentials-change'));
440
+  if ($changing_email and !$changing_pass and user_access('administer users')) {
441
+    form_set_error('pass', bts('If changing a user\'s email, you must also change the password simultaneously.', array(), null, 'boinc:account-credentials-change'));
442 442
   }
443 443
 
444 444
   // Expansion required to allow account key in place of passwd...?
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
   $edit = $form_state['values'];
458 458
   // The Drupal submit function expects a "name" field, even though
459 459
   // it contains an email address and we will not allow a user name
460
-  if (!$edit['name']) form_set_error('name', bts('Please enter your email address', array(), NULL, 'boinc:forgot-password'));
461
-  elseif (!valid_email_address($edit['name'])) form_set_error('name', bts('@email is not a well formed email address, please verify', array('@email' => $edit['name']), NULL, 'boinc:forgot-password'));
460
+  if (!$edit['name']) form_set_error('name', bts('Please enter your email address', array(), null, 'boinc:forgot-password'));
461
+  elseif (!valid_email_address($edit['name'])) form_set_error('name', bts('@email is not a well formed email address, please verify', array('@email' => $edit['name']), null, 'boinc:forgot-password'));
462 462
   else {
463 463
     // set email addrress to lower case
464 464
     $lower_email_addr = strtolower($edit['name']);
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
       form_set_error('name', bts('No account exists for @email -- please create an account using a BOINC client -- !instructions',
477 477
       array(
478 478
           '@email' => $edit['name'],
479
-          '!instructions' => l(bts('Instructions', array(), NULL, 'boinc:forgot-password'), 'join')
480
-      ), NULL, 'boinc:forgot-password'));
479
+          '!instructions' => l(bts('Instructions', array(), null, 'boinc:forgot-password'), 'join')
480
+      ), null, 'boinc:forgot-password'));
481 481
     }
482 482
   }
483 483
 }
@@ -491,16 +491,16 @@  discard block
 block discarded – undo
491 491
   $project_domain = $headers['Host'];
492 492
   $form['heading'] = array(
493 493
     '#type' => 'markup',
494
-    '#value' => '<h3>' . bts("If you forgot your account's email address, or you can't receive email there:", array(), NULL, 'boinc:authenticator-login-page') . '</h3>'
494
+    '#value' => '<h3>' . bts("If you forgot your account's email address, or you can't receive email there:", array(), null, 'boinc:authenticator-login-page') . '</h3>'
495 495
   );
496 496
   $form['instructions'] = array(
497 497
     '#type' => 'markup',
498 498
     '#value' => '' .
499
-      '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), NULL, 'boinc:authenticator-login-page') .
499
+      '<p>' . bts("If you have run BOINC under the account, you can still access it. Here's how:", array(), null, 'boinc:authenticator-login-page') .
500 500
       '  <ul>' .
501
-      '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), NULL, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), NULL, 'boinc:authenticator-login-page') . '</li>' .
502
-      '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), NULL, 'boinc:authenticator-login-page') . '</li>' .
503
-      '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:", array(), NULL, 'boinc:authenticator-login-page') .
501
+      '    <li>' . bts('Go to the BOINC data directory on your computer (see !boinc_wiki for help finding this).', array('!boinc_wiki' => l(bts('BOINC documentation', array(), null, 'boinc:authenticator-login-page'), 'http://boinc.berkeley.edu/wiki/BOINC_Data_directory')), null, 'boinc:authenticator-login-page') . '</li>' .
502
+      '    <li>' . bts('Find your account file for this project; it will have a name like %file (where the project URL is %url).', array('%file' => "account_{$project_domain}.xml", '%url' => "http://{$project_domain}"), null, 'boinc:authenticator-login-page') . '</li>' .
503
+      '    <li>' . bts("Open the file in a text editor like Notepad. You'll see something like:", array(), null, 'boinc:authenticator-login-page') .
504 504
       '      <pre>' .
505 505
       '&lt;account&gt;' . "\n" .
506 506
       "  &lt;master_url&gt;http://{$project_domain}/&lt;/master_url&gt;" . "\n" .
@@ -510,18 +510,18 @@  discard block
 block discarded – undo
510 510
       '&lt;/account&gt;' .
511 511
       '      </pre>' .
512 512
       '    </li>' .
513
-      '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), NULL, 'boinc:authenticator-login-page') . '</li>' .
514
-      '    <li>' . bts('Paste the string into the field below, and click OK.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
515
-      '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.', array(), NULL, 'boinc:authenticator-login-page') . '</li>' .
513
+      '    <li>' . bts('Select and Copy the string between &lt;authenticator&gt; and &lt;/authenticator&gt; (%auth in the above example).', array('%auth' => '8b8496fdd26df7dc0423ecd43c09a56b'), null, 'boinc:authenticator-login-page') . '</li>' .
514
+      '    <li>' . bts('Paste the string into the field below, and click OK.', array(), null, 'boinc:authenticator-login-page') . '</li>' .
515
+      '    <li>' . bts('You will now be logged in to your account; update the email and password of your account.', array(), null, 'boinc:authenticator-login-page') . '</li>' .
516 516
       '  </ul>' .
517 517
       '</p>'
518 518
   );
519 519
   $form['authenticator'] = array(
520
-    '#title' => bts('Log in with authenticator', array(), NULL, 'boinc:authenticator-login-page'),
520
+    '#title' => bts('Log in with authenticator', array(), null, 'boinc:authenticator-login-page'),
521 521
     '#type' => 'textfield',
522 522
     '#size' => 60,
523 523
     '#maxlength' => 32,
524
-    '#required' => TRUE,
524
+    '#required' => true,
525 525
     '#description' => null
526 526
   );
527 527
 
@@ -533,12 +533,12 @@  discard block
 block discarded – undo
533 533
   $form['submit'] = array(
534 534
     '#prefix' => '<li class="first tab">',
535 535
     '#type' => 'submit',
536
-    '#value' => bts('OK', array(), NULL, 'boinc:form-ok'),
536
+    '#value' => bts('OK', array(), null, 'boinc:form-ok'),
537 537
     '#suffix' => '</li>',
538 538
     '#weight' => 1002,
539 539
   );
540 540
   $form['form control tabs'] = array(
541
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/password') . '</li>',
541
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), 'user/password') . '</li>',
542 542
     '#weight' => 1003,
543 543
   );
544 544
   $form['form control tabs suffix'] = array(
@@ -555,11 +555,11 @@  discard block
 block discarded – undo
555 555
   $authenticator = $form_state['values']['authenticator'];
556 556
   if (strlen($authenticator) != 32) {
557 557
     // We notify the form API that this field has failed validation.
558
-    form_set_error('authenticator', bts('That authenticator is not valid.', array(), NULL, 'boinc:authenticator-login-page'));
558
+    form_set_error('authenticator', bts('That authenticator is not valid.', array(), null, 'boinc:authenticator-login-page'));
559 559
   } else {
560 560
     require_boinc('boinc_db');
561 561
     $boinc_user = BoincUser::lookup("authenticator='".addslashes($authenticator)."'");
562
-    if (!$boinc_user) form_set_error('authenticator', bts('There is no account with that authenticator.', array(), NULL, 'boinc:authenticator-login-page'));
562
+    if (!$boinc_user) form_set_error('authenticator', bts('There is no account with that authenticator.', array(), null, 'boinc:authenticator-login-page'));
563 563
   }
564 564
 }
565 565
 
@@ -582,9 +582,9 @@  discard block
 block discarded – undo
582 582
 function boincuser_moderate_profile_reject_form(&$form_state, $uid) {
583 583
   $form_state['storage']['reject_profile_uid'] = $uid;
584 584
   $form['reason'] = array(
585
-    '#title' => bts('Reason for rejecting this profile', array(), NULL, 'boinc:moderate-user'),
585
+    '#title' => bts('Reason for rejecting this profile', array(), null, 'boinc:moderate-user'),
586 586
     '#type' => 'textarea',
587
-    '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of the problem and how to fix it.', array(), NULL, 'boinc:moderate-user'),
587
+    '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of the problem and how to fix it.', array(), null, 'boinc:moderate-user'),
588 588
     '#default_value' => '',
589 589
   );
590 590
 
@@ -596,12 +596,12 @@  discard block
 block discarded – undo
596 596
   $form['submit'] = array(
597 597
     '#prefix' => '<li class="first tab">',
598 598
     '#type' => 'submit',
599
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
599
+    '#value' => bts('Submit', array(), null, 'boinc:form-submit'),
600 600
     '#suffix' => '</li>',
601 601
     '#weight' => 1002,
602 602
   );
603 603
   $form['form control tabs'] = array(
604
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
604
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
605 605
     '#weight' => 1003,
606 606
   );
607 607
   $form['form control tabs suffix'] = array(
@@ -627,15 +627,15 @@  discard block
 block discarded – undo
627 627
 function boincuser_moderate_user_ban_form(&$form_state, $uid) {
628 628
   $form_state['storage']['ban_user_uid'] = $uid;
629 629
   $form['reason'] = array(
630
-    '#title' => bts('Reason for banning this user', array(), NULL, 'boinc:moderate-user'),
630
+    '#title' => bts('Reason for banning this user', array(), null, 'boinc:moderate-user'),
631 631
     '#type' => 'textarea',
632
-    '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of why the user is being banned.', array(), NULL, 'boinc:moderate-user'),
632
+    '#description' => bts('This reason will be included in an email to the user. Please write a brief explanation of why the user is being banned.', array(), null, 'boinc:moderate-user'),
633 633
     '#default_value' => '',
634 634
   );
635 635
   $form['duration'] = array(
636
-    '#title' => bts('Duration of the ban', array(), NULL, 'boinc:moderate-user'),
636
+    '#title' => bts('Duration of the ban', array(), null, 'boinc:moderate-user'),
637 637
     '#type' => 'textfield',
638
-    '#description' => bts('The number of days until the ban expires. Set to 0 to ban permanently.', array(), NULL, 'boinc:moderate-user'),
638
+    '#description' => bts('The number of days until the ban expires. Set to 0 to ban permanently.', array(), null, 'boinc:moderate-user'),
639 639
     '#default_value' => '',
640 640
   );
641 641
 
@@ -647,12 +647,12 @@  discard block
 block discarded – undo
647 647
   $form['submit'] = array(
648 648
     '#prefix' => '<li class="first tab">',
649 649
     '#type' => 'submit',
650
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
650
+    '#value' => bts('Submit', array(), null, 'boinc:form-submit'),
651 651
     '#suffix' => '</li>',
652 652
     '#weight' => 1002,
653 653
   );
654 654
   $form['form control tabs'] = array(
655
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
655
+    '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), "account/{$uid}") . '</li>',
656 656
     '#weight' => 1003,
657 657
   );
658 658
   $form['form control tabs suffix'] = array(
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
     drupal_goto();
697 697
   }
698 698
 
699
-  drupal_set_message( bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), NULL, 'boinc:termsofuse-form'), 'warning' );
699
+  drupal_set_message( bts('WARNING: You have not agreed to our terms of use. Please agree to the terms of use before continuing.', array(), null, 'boinc:termsofuse-form'), 'warning' );
700 700
 
701 701
   $form = array();
702 702
   drupal_add_js(drupal_get_path('module', 'boincuser') . '/boincuser.js');
@@ -707,12 +707,12 @@  discard block
 block discarded – undo
707 707
     '#type'   => 'fieldset',
708 708
     '#prefix' => '<div id="termsofuse-wrapper">', // This is our wrapper div.
709 709
     '#suffix' => '</div>',
710
-    '#tree'   => TRUE,
710
+    '#tree'   => true,
711 711
   );
712 712
 
713 713
   $form['termsofuse']['title1'] = array(
714 714
     '#weight' => -12,
715
-    '#value' => '<h2>' . bts( variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), NULL, 'project:termsofuse-form' ) . '</h2>',
715
+    '#value' => '<h2>' . bts( variable_get('boinc_weboptions_registrationtitle', 'Please read and acknowledge our terms of use'), array(), null, 'project:termsofuse-form' ) . '</h2>',
716 716
     '#prefix' => '<div id="register-title1">',
717 717
     '#suffix' => '</div>',
718 718
   );
@@ -720,14 +720,14 @@  discard block
 block discarded – undo
720 720
   // Terms of use section
721 721
   $form['termsofuse']['body'] = array(
722 722
     '#weight' => -10,
723
-    '#value' => bts($termsofuse, array(), NULL, 'project:termsofuse-form'),
723
+    '#value' => bts($termsofuse, array(), null, 'project:termsofuse-form'),
724 724
     '#prefix' => '<div id="register-termsofuse">',
725 725
     '#suffix' => '</div>',
726 726
   );
727 727
 
728 728
   $form['termsofuse']['agreeTOU'] = array(
729 729
     '#type'   => 'checkbox',
730
-    '#title'  => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), NULL, 'project:termsofuse-form'),
730
+    '#title'  => bts(variable_get('boinc_weboptions_agreequestion', 'Do you agree with the above terms of use?'), array(), null, 'project:termsofuse-form'),
731 731
     '#weight' => -8,
732 732
     '#prefix' => '<div id="register-checkbox">',
733 733
     '#suffix' => '</div>',
@@ -743,16 +743,16 @@  discard block
 block discarded – undo
743 743
   $form['submit'] = array(
744 744
     '#prefix' => '<p><p><p><li class="first tab" id="register-submit">',
745 745
     '#type' => 'submit',
746
-    '#value' => bts('Yes', array(), NULL, 'boinc:form-submit'),
746
+    '#value' => bts('Yes', array(), null, 'boinc:form-submit'),
747 747
     '#suffix' => '</li>',
748 748
   );
749 749
   $form['form control tabs'] = array(
750
-    '#value' => '<li class="tab">' . l(bts('NO - LOGOUT', array(), NULL, 'boinc:form-cancel'), '/logout') . '</li>',
750
+    '#value' => '<li class="tab">' . l(bts('NO - LOGOUT', array(), null, 'boinc:form-cancel'), '/logout') . '</li>',
751 751
   );
752 752
   if (module_exists('boincuser_delete')) {
753 753
     $deletelink = '/user/' . $user->uid . '/delete';
754 754
     $form['deleteaccount'] = array(
755
-      '#value' => '<li class="tab">' . l(bts('NO - DELETE ACCOUNT', array(), NULL, 'boinc:form-delete-user'), $deletelink) . '</li>',
755
+      '#value' => '<li class="tab">' . l(bts('NO - DELETE ACCOUNT', array(), null, 'boinc:form-delete-user'), $deletelink) . '</li>',
756 756
     );
757 757
   }
758 758
 
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 function boincuser_termsofuse_form_validate($form, &$form_state) {
769 769
   // Check TOU agreement
770 770
   if (!$form_state['values']['termsofuse']['agreeTOU']) {
771
-    form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', array(), NULL, 'boinc:termsofuse-form'));
771
+    form_set_error('termsofuse', bts('ERROR: You must acknowledge our terms of use by clicking the checkbox before registering for an account.', array(), null, 'boinc:termsofuse-form'));
772 772
   }
773 773
 }
774 774
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
   if (!boincuser_consentto_termsofuse($user)) {
778 778
     form_set_error('termsofuse',
779 779
       bts('There was an error in agreeing to the terms of use. The @project administrators have been notified.',
780
-        array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:termsofuse-form')
780
+        array('@project' => variable_get('site_name', 'Drupal-BOINC')), null, 'boinc:termsofuse-form')
781 781
     );
782 782
   }
783 783
 
@@ -810,9 +810,9 @@  discard block
 block discarded – undo
810 810
   if (!is_valid_token($boincid, $token, 'E')) {
811 811
     drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your email address.',
812 812
     array(
813
-      '!link' => l(bts('changing', array(), NULL, 'boinc:revert-email-change'), "/account/info/edit"),
813
+      '!link' => l(bts('changing', array(), null, 'boinc:revert-email-change'), "/account/info/edit"),
814 814
     ),
815
-    NULL, 'boinc:revert-email-change'), 'error');
815
+    null, 'boinc:revert-email-change'), 'error');
816 816
     drupal_goto();
817 817
   }
818 818
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
       array(
828 828
         '!prev_email' => $account->boincuser_previous_email_addr,
829 829
       ),
830
-      NULL, 'boinc:revert-email-change').
830
+      null, 'boinc:revert-email-change').
831 831
     '</p>',
832 832
   );
833 833
 
@@ -844,11 +844,11 @@  discard block
 block discarded – undo
844 844
   );
845 845
   $form['buttons']['submit']['#type'] = 'submit';
846 846
   $form['buttons']['submit']['#prefix'] = '<li class="first tab">';
847
-  $form['buttons']['submit']['#value'] = bts('Submit', array(), NULL, 'boinc:form-submit');
847
+  $form['buttons']['submit']['#value'] = bts('Submit', array(), null, 'boinc:form-submit');
848 848
   $form['buttons']['submit']['#suffix'] = '</li>';
849 849
   $form['buttons']['submit']['#weight'] = 1002;
850 850
   $form['buttons']['cancel'] = array(
851
-      '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), 'user/info/edit') . '</li>',
851
+      '#value' => '<li class="tab">' . l(bts('Cancel', array(), null, 'boinc:form-cancel'), 'user/info/edit') . '</li>',
852 852
       '#weight' => 1005,
853 853
   );
854 854
   $form['buttons']['form control tabs suffix'] = array(
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
         array(
875 875
           '@email' => $boinc_user->previous_email_addr,
876 876
           '@project' => variable_get('site_name', 'Drupal-BOINC'),
877
-        ), NULL, 'boinc:add-new-user'));
877
+        ), null, 'boinc:add-new-user'));
878 878
   }
879 879
 
880 880
 }
Please login to merge, or discard this patch.
all/features/work_and_host_stats/work_and_host_stats.views_default.inc 2 patches
Upper-Lower-Casing   +233 added lines, -233 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $view->base_table = 'result';
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
     'name' => array(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
       'hide_empty' => 0,
76 76
       'empty_zero' => 0,
77 77
       'hide_alter_empty' => 1,
78
-      'set_precision' => FALSE,
78
+      'set_precision' => false,
79 79
       'precision' => 0,
80 80
       'decimal' => '.',
81 81
       'separator' => '',
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
       'hide_empty' => 0,
117 117
       'empty_zero' => 0,
118 118
       'hide_alter_empty' => 1,
119
-      'set_precision' => FALSE,
119
+      'set_precision' => false,
120 120
       'precision' => 0,
121 121
       'decimal' => '.',
122 122
       'separator' => '',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
       'hide_empty' => 0,
158 158
       'empty_zero' => 0,
159 159
       'hide_alter_empty' => 1,
160
-      'set_precision' => FALSE,
160
+      'set_precision' => false,
161 161
       'precision' => 0,
162 162
       'decimal' => '.',
163 163
       'separator' => '',
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
       'empty' => '',
361 361
       'hide_empty' => 0,
362 362
       'empty_zero' => 0,
363
-      'set_precision' => FALSE,
363
+      'set_precision' => false,
364 364
       'precision' => 0,
365 365
       'decimal' => '.',
366 366
       'separator' => '',
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
       'empty' => '',
396 396
       'hide_empty' => 0,
397 397
       'empty_zero' => 0,
398
-      'set_precision' => FALSE,
398
+      'set_precision' => false,
399 399
       'precision' => 0,
400 400
       'decimal' => '.',
401 401
       'separator' => '',
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
       'empty' => '',
431 431
       'hide_empty' => 0,
432 432
       'empty_zero' => 0,
433
-      'set_precision' => FALSE,
433
+      'set_precision' => false,
434 434
       'precision' => 0,
435 435
       'decimal' => '.',
436 436
       'separator' => '',
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
       'empty' => '',
466 466
       'hide_empty' => 0,
467 467
       'empty_zero' => 0,
468
-      'set_precision' => FALSE,
468
+      'set_precision' => false,
469 469
       'precision' => 0,
470 470
       'decimal' => '.',
471 471
       'separator' => '',
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
       'empty' => '',
501 501
       'hide_empty' => 0,
502 502
       'empty_zero' => 0,
503
-      'set_precision' => FALSE,
503
+      'set_precision' => false,
504 504
       'precision' => 0,
505 505
       'decimal' => '.',
506 506
       'separator' => '',
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
       'hide_empty' => 0,
698 698
       'empty_zero' => 0,
699 699
       'hide_alter_empty' => 1,
700
-      'set_precision' => FALSE,
700
+      'set_precision' => false,
701 701
       'precision' => 0,
702 702
       'decimal' => '.',
703 703
       'separator' => '',
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
       'empty' => '',
736 736
       'hide_empty' => 0,
737 737
       'empty_zero' => 0,
738
-      'set_precision' => FALSE,
738
+      'set_precision' => false,
739 739
       'precision' => 0,
740 740
       'decimal' => '.',
741 741
       'separator' => '',
@@ -1024,9 +1024,9 @@  discard block
 block discarded – undo
1024 1024
         'max' => '',
1025 1025
       ),
1026 1026
       'group' => '0',
1027
-      'exposed' => FALSE,
1027
+      'exposed' => false,
1028 1028
       'expose' => array(
1029
-        'operator' => FALSE,
1029
+        'operator' => false,
1030 1030
         'label' => '',
1031 1031
       ),
1032 1032
       'id' => 'server_state',
@@ -1045,9 +1045,9 @@  discard block
 block discarded – undo
1045 1045
         'max' => '',
1046 1046
       ),
1047 1047
       'group' => '0',
1048
-      'exposed' => FALSE,
1048
+      'exposed' => false,
1049 1049
       'expose' => array(
1050
-        'operator' => FALSE,
1050
+        'operator' => false,
1051 1051
         'label' => '',
1052 1052
       ),
1053 1053
       'id' => 'outcome',
@@ -1066,9 +1066,9 @@  discard block
 block discarded – undo
1066 1066
         'max' => '7',
1067 1067
       ),
1068 1068
       'group' => '0',
1069
-      'exposed' => FALSE,
1069
+      'exposed' => false,
1070 1070
       'expose' => array(
1071
-        'operator' => FALSE,
1071
+        'operator' => false,
1072 1072
         'label' => '',
1073 1073
       ),
1074 1074
       'id' => 'outcome_1',
@@ -1087,9 +1087,9 @@  discard block
 block discarded – undo
1087 1087
         'max' => '',
1088 1088
       ),
1089 1089
       'group' => '0',
1090
-      'exposed' => FALSE,
1090
+      'exposed' => false,
1091 1091
       'expose' => array(
1092
-        'operator' => FALSE,
1092
+        'operator' => false,
1093 1093
         'label' => '',
1094 1094
       ),
1095 1095
       'id' => 'outcome_2',
@@ -1126,9 +1126,9 @@  discard block
 block discarded – undo
1126 1126
         'max' => '',
1127 1127
       ),
1128 1128
       'group' => '0',
1129
-      'exposed' => FALSE,
1129
+      'exposed' => false,
1130 1130
       'expose' => array(
1131
-        'operator' => FALSE,
1131
+        'operator' => false,
1132 1132
         'label' => '',
1133 1133
       ),
1134 1134
       'id' => 'server_state',
@@ -1165,9 +1165,9 @@  discard block
 block discarded – undo
1165 1165
         'max' => '',
1166 1166
       ),
1167 1167
       'group' => '0',
1168
-      'exposed' => FALSE,
1168
+      'exposed' => false,
1169 1169
       'expose' => array(
1170
-        'operator' => FALSE,
1170
+        'operator' => false,
1171 1171
         'label' => '',
1172 1172
       ),
1173 1173
       'id' => 'server_state',
@@ -1191,9 +1191,9 @@  discard block
 block discarded – undo
1191 1191
         'max' => '',
1192 1192
       ),
1193 1193
       'group' => '0',
1194
-      'exposed' => FALSE,
1194
+      'exposed' => false,
1195 1195
       'expose' => array(
1196
-        'operator' => FALSE,
1196
+        'operator' => false,
1197 1197
         'label' => '',
1198 1198
       ),
1199 1199
       'id' => 'outcome',
@@ -1217,9 +1217,9 @@  discard block
 block discarded – undo
1217 1217
         'max' => '',
1218 1218
       ),
1219 1219
       'group' => '0',
1220
-      'exposed' => FALSE,
1220
+      'exposed' => false,
1221 1221
       'expose' => array(
1222
-        'operator' => FALSE,
1222
+        'operator' => false,
1223 1223
         'label' => '',
1224 1224
       ),
1225 1225
       'id' => 'outcome_1',
@@ -1243,9 +1243,9 @@  discard block
 block discarded – undo
1243 1243
         'max' => '',
1244 1244
       ),
1245 1245
       'group' => '0',
1246
-      'exposed' => FALSE,
1246
+      'exposed' => false,
1247 1247
       'expose' => array(
1248
-        'operator' => FALSE,
1248
+        'operator' => false,
1249 1249
         'label' => '',
1250 1250
       ),
1251 1251
       'id' => 'validate_state',
@@ -1269,9 +1269,9 @@  discard block
 block discarded – undo
1269 1269
         'max' => '',
1270 1270
       ),
1271 1271
       'group' => '0',
1272
-      'exposed' => FALSE,
1272
+      'exposed' => false,
1273 1273
       'expose' => array(
1274
-        'operator' => FALSE,
1274
+        'operator' => false,
1275 1275
         'label' => '',
1276 1276
       ),
1277 1277
       'id' => 'validate_state_1',
@@ -1295,9 +1295,9 @@  discard block
 block discarded – undo
1295 1295
         'max' => '',
1296 1296
       ),
1297 1297
       'group' => '0',
1298
-      'exposed' => FALSE,
1298
+      'exposed' => false,
1299 1299
       'expose' => array(
1300
-        'operator' => FALSE,
1300
+        'operator' => false,
1301 1301
         'label' => '',
1302 1302
       ),
1303 1303
       'id' => 'validate_state_2',
@@ -1344,9 +1344,9 @@  discard block
 block discarded – undo
1344 1344
         'max' => '',
1345 1345
       ),
1346 1346
       'group' => '0',
1347
-      'exposed' => FALSE,
1347
+      'exposed' => false,
1348 1348
       'expose' => array(
1349
-        'operator' => FALSE,
1349
+        'operator' => false,
1350 1350
         'label' => '',
1351 1351
       ),
1352 1352
       'id' => 'server_state',
@@ -1365,9 +1365,9 @@  discard block
 block discarded – undo
1365 1365
         'max' => '',
1366 1366
       ),
1367 1367
       'group' => '0',
1368
-      'exposed' => FALSE,
1368
+      'exposed' => false,
1369 1369
       'expose' => array(
1370
-        'operator' => FALSE,
1370
+        'operator' => false,
1371 1371
         'label' => '',
1372 1372
       ),
1373 1373
       'id' => 'outcome',
@@ -1386,9 +1386,9 @@  discard block
 block discarded – undo
1386 1386
         'max' => '',
1387 1387
       ),
1388 1388
       'group' => '0',
1389
-      'exposed' => FALSE,
1389
+      'exposed' => false,
1390 1390
       'expose' => array(
1391
-        'operator' => FALSE,
1391
+        'operator' => false,
1392 1392
         'label' => '',
1393 1393
       ),
1394 1394
       'id' => 'validate_state',
@@ -1407,9 +1407,9 @@  discard block
 block discarded – undo
1407 1407
         'max' => '4',
1408 1408
       ),
1409 1409
       'group' => '0',
1410
-      'exposed' => FALSE,
1410
+      'exposed' => false,
1411 1411
       'expose' => array(
1412
-        'operator' => FALSE,
1412
+        'operator' => false,
1413 1413
         'label' => '',
1414 1414
       ),
1415 1415
       'id' => 'validate_state_1',
@@ -1428,9 +1428,9 @@  discard block
 block discarded – undo
1428 1428
         'max' => '',
1429 1429
       ),
1430 1430
       'group' => '0',
1431
-      'exposed' => FALSE,
1431
+      'exposed' => false,
1432 1432
       'expose' => array(
1433
-        'operator' => FALSE,
1433
+        'operator' => false,
1434 1434
         'label' => '',
1435 1435
       ),
1436 1436
       'id' => 'validate_state_2',
@@ -1467,9 +1467,9 @@  discard block
 block discarded – undo
1467 1467
         'max' => '',
1468 1468
       ),
1469 1469
       'group' => '0',
1470
-      'exposed' => FALSE,
1470
+      'exposed' => false,
1471 1471
       'expose' => array(
1472
-        'operator' => FALSE,
1472
+        'operator' => false,
1473 1473
         'label' => '',
1474 1474
       ),
1475 1475
       'id' => 'server_state',
@@ -1488,9 +1488,9 @@  discard block
 block discarded – undo
1488 1488
         'max' => '',
1489 1489
       ),
1490 1490
       'group' => '0',
1491
-      'exposed' => FALSE,
1491
+      'exposed' => false,
1492 1492
       'expose' => array(
1493
-        'operator' => FALSE,
1493
+        'operator' => false,
1494 1494
         'label' => '',
1495 1495
       ),
1496 1496
       'id' => 'outcome',
@@ -1509,9 +1509,9 @@  discard block
 block discarded – undo
1509 1509
         'max' => '',
1510 1510
       ),
1511 1511
       'group' => '0',
1512
-      'exposed' => FALSE,
1512
+      'exposed' => false,
1513 1513
       'expose' => array(
1514
-        'operator' => FALSE,
1514
+        'operator' => false,
1515 1515
         'label' => '',
1516 1516
       ),
1517 1517
       'id' => 'validate_state',
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
   $view->base_table = 'host';
1550 1550
   $view->core = 0;
1551 1551
   $view->api_version = '2';
1552
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
1552
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
1553 1553
   $handler = $view->new_display('default', 'Defaults', 'default');
1554 1554
   $handler->override_option('fields', array(
1555 1555
     'userid' => array(
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
       'empty' => '',
1576 1576
       'hide_empty' => 0,
1577 1577
       'empty_zero' => 0,
1578
-      'set_precision' => FALSE,
1578
+      'set_precision' => false,
1579 1579
       'precision' => 0,
1580 1580
       'decimal' => '.',
1581 1581
       'separator' => '',
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
       'empty' => '',
1849 1849
       'hide_empty' => 0,
1850 1850
       'empty_zero' => 0,
1851
-      'set_precision' => FALSE,
1851
+      'set_precision' => false,
1852 1852
       'precision' => 0,
1853 1853
       'decimal' => '.',
1854 1854
       'separator' => '',
@@ -2467,7 +2467,7 @@  discard block
 block discarded – undo
2467 2467
       'empty' => '',
2468 2468
       'hide_empty' => 0,
2469 2469
       'empty_zero' => 0,
2470
-      'set_precision' => FALSE,
2470
+      'set_precision' => false,
2471 2471
       'precision' => 0,
2472 2472
       'decimal' => '.',
2473 2473
       'separator' => '',
@@ -2502,7 +2502,7 @@  discard block
 block discarded – undo
2502 2502
       'empty' => '',
2503 2503
       'hide_empty' => 0,
2504 2504
       'empty_zero' => 0,
2505
-      'set_precision' => FALSE,
2505
+      'set_precision' => false,
2506 2506
       'precision' => 0,
2507 2507
       'decimal' => '.',
2508 2508
       'separator' => '',
@@ -2601,7 +2601,7 @@  discard block
 block discarded – undo
2601 2601
       'empty' => '',
2602 2602
       'hide_empty' => 0,
2603 2603
       'empty_zero' => 0,
2604
-      'set_precision' => FALSE,
2604
+      'set_precision' => false,
2605 2605
       'precision' => 0,
2606 2606
       'decimal' => '.',
2607 2607
       'separator' => '',
@@ -2636,7 +2636,7 @@  discard block
 block discarded – undo
2636 2636
       'empty' => '',
2637 2637
       'hide_empty' => 0,
2638 2638
       'empty_zero' => 0,
2639
-      'set_precision' => FALSE,
2639
+      'set_precision' => false,
2640 2640
       'precision' => 0,
2641 2641
       'decimal' => '.',
2642 2642
       'separator' => '',
@@ -2671,7 +2671,7 @@  discard block
 block discarded – undo
2671 2671
       'empty' => '',
2672 2672
       'hide_empty' => 0,
2673 2673
       'empty_zero' => 0,
2674
-      'set_precision' => FALSE,
2674
+      'set_precision' => false,
2675 2675
       'precision' => 0,
2676 2676
       'decimal' => '.',
2677 2677
       'separator' => '',
@@ -3167,7 +3167,7 @@  discard block
 block discarded – undo
3167 3167
       'hide_empty' => 0,
3168 3168
       'empty_zero' => 0,
3169 3169
       'hide_alter_empty' => 1,
3170
-      'set_precision' => FALSE,
3170
+      'set_precision' => false,
3171 3171
       'precision' => 0,
3172 3172
       'decimal' => '.',
3173 3173
       'separator' => '',
@@ -3284,7 +3284,7 @@  discard block
 block discarded – undo
3284 3284
       'empty' => '',
3285 3285
       'hide_empty' => 0,
3286 3286
       'empty_zero' => 0,
3287
-      'set_precision' => FALSE,
3287
+      'set_precision' => false,
3288 3288
       'precision' => 0,
3289 3289
       'decimal' => '.',
3290 3290
       'separator' => '',
@@ -3455,7 +3455,7 @@  discard block
 block discarded – undo
3455 3455
       'empty' => '',
3456 3456
       'hide_empty' => 0,
3457 3457
       'empty_zero' => 0,
3458
-      'set_precision' => FALSE,
3458
+      'set_precision' => false,
3459 3459
       'precision' => 0,
3460 3460
       'decimal' => '.',
3461 3461
       'separator' => '',
@@ -3963,7 +3963,7 @@  discard block
 block discarded – undo
3963 3963
   $view->base_table = 'host';
3964 3964
   $view->core = 6;
3965 3965
   $view->api_version = '2';
3966
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
3966
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
3967 3967
   $handler = $view->new_display('default', 'Defaults', 'default');
3968 3968
   $handler->override_option('relationships', array(
3969 3969
     'app_version_id' => array(
@@ -4155,7 +4155,7 @@  discard block
 block discarded – undo
4155 4155
       'hide_empty' => 0,
4156 4156
       'empty_zero' => 0,
4157 4157
       'hide_alter_empty' => 0,
4158
-      'set_precision' => FALSE,
4158
+      'set_precision' => false,
4159 4159
       'precision' => 0,
4160 4160
       'decimal' => '.',
4161 4161
       'separator' => '',
@@ -4196,7 +4196,7 @@  discard block
 block discarded – undo
4196 4196
       'hide_empty' => 0,
4197 4197
       'empty_zero' => 0,
4198 4198
       'hide_alter_empty' => 0,
4199
-      'set_precision' => FALSE,
4199
+      'set_precision' => false,
4200 4200
       'precision' => 0,
4201 4201
       'decimal' => '.',
4202 4202
       'separator' => '',
@@ -4237,7 +4237,7 @@  discard block
 block discarded – undo
4237 4237
       'hide_empty' => 0,
4238 4238
       'empty_zero' => 0,
4239 4239
       'hide_alter_empty' => 0,
4240
-      'set_precision' => FALSE,
4240
+      'set_precision' => false,
4241 4241
       'precision' => 0,
4242 4242
       'decimal' => '.',
4243 4243
       'separator' => '',
@@ -4278,7 +4278,7 @@  discard block
 block discarded – undo
4278 4278
       'hide_empty' => 0,
4279 4279
       'empty_zero' => 0,
4280 4280
       'hide_alter_empty' => 0,
4281
-      'set_precision' => FALSE,
4281
+      'set_precision' => false,
4282 4282
       'precision' => 0,
4283 4283
       'decimal' => '.',
4284 4284
       'separator' => '',
@@ -4320,7 +4320,7 @@  discard block
 block discarded – undo
4320 4320
       'empty_zero' => 0,
4321 4321
       'hide_alter_empty' => 1,
4322 4322
       'exclude' => 0,
4323
-      'set_precision' => FALSE,
4323
+      'set_precision' => false,
4324 4324
       'precision' => 0,
4325 4325
       'decimal' => '.',
4326 4326
       'separator' => ',',
@@ -4645,7 +4645,7 @@  discard block
 block discarded – undo
4645 4645
       'hide_empty' => 0,
4646 4646
       'empty_zero' => 0,
4647 4647
       'hide_alter_empty' => 0,
4648
-      'set_precision' => FALSE,
4648
+      'set_precision' => false,
4649 4649
       'precision' => 0,
4650 4650
       'decimal' => '.',
4651 4651
       'separator' => '',
@@ -4686,7 +4686,7 @@  discard block
 block discarded – undo
4686 4686
       'hide_empty' => 0,
4687 4687
       'empty_zero' => 0,
4688 4688
       'hide_alter_empty' => 0,
4689
-      'set_precision' => FALSE,
4689
+      'set_precision' => false,
4690 4690
       'precision' => 0,
4691 4691
       'decimal' => '.',
4692 4692
       'separator' => '',
@@ -4727,7 +4727,7 @@  discard block
 block discarded – undo
4727 4727
       'hide_empty' => 0,
4728 4728
       'empty_zero' => 0,
4729 4729
       'hide_alter_empty' => 0,
4730
-      'set_precision' => FALSE,
4730
+      'set_precision' => false,
4731 4731
       'precision' => 0,
4732 4732
       'decimal' => '.',
4733 4733
       'separator' => '',
@@ -4768,7 +4768,7 @@  discard block
 block discarded – undo
4768 4768
       'hide_empty' => 0,
4769 4769
       'empty_zero' => 0,
4770 4770
       'hide_alter_empty' => 0,
4771
-      'set_precision' => FALSE,
4771
+      'set_precision' => false,
4772 4772
       'precision' => 0,
4773 4773
       'decimal' => '.',
4774 4774
       'separator' => '',
@@ -4810,7 +4810,7 @@  discard block
 block discarded – undo
4810 4810
       'empty_zero' => 0,
4811 4811
       'hide_alter_empty' => 1,
4812 4812
       'exclude' => 0,
4813
-      'set_precision' => FALSE,
4813
+      'set_precision' => false,
4814 4814
       'precision' => 0,
4815 4815
       'decimal' => '.',
4816 4816
       'separator' => ',',
@@ -4893,7 +4893,7 @@  discard block
 block discarded – undo
4893 4893
   $view->base_table = 'host';
4894 4894
   $view->core = 0;
4895 4895
   $view->api_version = '2';
4896
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
4896
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
4897 4897
   $handler = $view->new_display('default', 'Defaults', 'default');
4898 4898
   $handler->override_option('relationships', array(
4899 4899
     'userid' => array(
@@ -4929,7 +4929,7 @@  discard block
 block discarded – undo
4929 4929
       'empty' => '',
4930 4930
       'hide_empty' => 0,
4931 4931
       'empty_zero' => 0,
4932
-      'set_precision' => FALSE,
4932
+      'set_precision' => false,
4933 4933
       'precision' => 0,
4934 4934
       'decimal' => '.',
4935 4935
       'separator' => '',
@@ -5520,9 +5520,9 @@  discard block
 block discarded – undo
5520 5520
         'max' => '',
5521 5521
       ),
5522 5522
       'group' => '0',
5523
-      'exposed' => FALSE,
5523
+      'exposed' => false,
5524 5524
       'expose' => array(
5525
-        'operator' => FALSE,
5525
+        'operator' => false,
5526 5526
         'label' => '',
5527 5527
       ),
5528 5528
       'id' => 'show_hosts',
@@ -5643,9 +5643,9 @@  discard block
 block discarded – undo
5643 5643
         'max' => '',
5644 5644
       ),
5645 5645
       'group' => '0',
5646
-      'exposed' => FALSE,
5646
+      'exposed' => false,
5647 5647
       'expose' => array(
5648
-        'operator' => FALSE,
5648
+        'operator' => false,
5649 5649
         'label' => '',
5650 5650
       ),
5651 5651
       'id' => 'rpc_time',
@@ -5661,9 +5661,9 @@  discard block
 block discarded – undo
5661 5661
         'max' => '',
5662 5662
       ),
5663 5663
       'group' => '0',
5664
-      'exposed' => FALSE,
5664
+      'exposed' => false,
5665 5665
       'expose' => array(
5666
-        'operator' => FALSE,
5666
+        'operator' => false,
5667 5667
         'label' => '',
5668 5668
       ),
5669 5669
       'id' => 'show_hosts',
@@ -5731,7 +5731,7 @@  discard block
 block discarded – undo
5731 5731
       'hide_empty' => 0,
5732 5732
       'empty_zero' => 0,
5733 5733
       'hide_alter_empty' => 1,
5734
-      'set_precision' => FALSE,
5734
+      'set_precision' => false,
5735 5735
       'precision' => 0,
5736 5736
       'decimal' => '.',
5737 5737
       'separator' => ',',
@@ -5810,7 +5810,7 @@  discard block
 block discarded – undo
5810 5810
       'hide_empty' => 0,
5811 5811
       'empty_zero' => 0,
5812 5812
       'hide_alter_empty' => 1,
5813
-      'set_precision' => FALSE,
5813
+      'set_precision' => false,
5814 5814
       'precision' => 0,
5815 5815
       'decimal' => '.',
5816 5816
       'separator' => ',',
@@ -5854,7 +5854,7 @@  discard block
 block discarded – undo
5854 5854
       'empty' => '',
5855 5855
       'hide_empty' => 0,
5856 5856
       'empty_zero' => 0,
5857
-      'set_precision' => FALSE,
5857
+      'set_precision' => false,
5858 5858
       'precision' => 0,
5859 5859
       'decimal' => '.',
5860 5860
       'separator' => '',
@@ -6386,9 +6386,9 @@  discard block
 block discarded – undo
6386 6386
         'max' => '',
6387 6387
       ),
6388 6388
       'group' => '0',
6389
-      'exposed' => FALSE,
6389
+      'exposed' => false,
6390 6390
       'expose' => array(
6391
-        'operator' => FALSE,
6391
+        'operator' => false,
6392 6392
         'label' => '',
6393 6393
       ),
6394 6394
       'id' => 'total_credit',
@@ -6546,7 +6546,7 @@  discard block
 block discarded – undo
6546 6546
       'hide_empty' => 0,
6547 6547
       'empty_zero' => 0,
6548 6548
       'hide_alter_empty' => 1,
6549
-      'set_precision' => FALSE,
6549
+      'set_precision' => false,
6550 6550
       'precision' => 0,
6551 6551
       'decimal' => '.',
6552 6552
       'separator' => '',
@@ -6625,7 +6625,7 @@  discard block
 block discarded – undo
6625 6625
       'hide_empty' => 0,
6626 6626
       'empty_zero' => 0,
6627 6627
       'hide_alter_empty' => 1,
6628
-      'set_precision' => FALSE,
6628
+      'set_precision' => false,
6629 6629
       'precision' => 0,
6630 6630
       'decimal' => '.',
6631 6631
       'separator' => '',
@@ -6701,7 +6701,7 @@  discard block
 block discarded – undo
6701 6701
       'hide_empty' => 0,
6702 6702
       'empty_zero' => 0,
6703 6703
       'hide_alter_empty' => 1,
6704
-      'set_precision' => FALSE,
6704
+      'set_precision' => false,
6705 6705
       'precision' => 0,
6706 6706
       'decimal' => '.',
6707 6707
       'separator' => '',
@@ -7258,9 +7258,9 @@  discard block
 block discarded – undo
7258 7258
         'max' => '',
7259 7259
       ),
7260 7260
       'group' => '0',
7261
-      'exposed' => FALSE,
7261
+      'exposed' => false,
7262 7262
       'expose' => array(
7263
-        'operator' => FALSE,
7263
+        'operator' => false,
7264 7264
         'label' => '',
7265 7265
       ),
7266 7266
       'id' => 'show_hosts',
@@ -7276,9 +7276,9 @@  discard block
 block discarded – undo
7276 7276
         'max' => '',
7277 7277
       ),
7278 7278
       'group' => '0',
7279
-      'exposed' => FALSE,
7279
+      'exposed' => false,
7280 7280
       'expose' => array(
7281
-        'operator' => FALSE,
7281
+        'operator' => false,
7282 7282
         'label' => '',
7283 7283
       ),
7284 7284
       'id' => 'total_credit',
@@ -7405,15 +7405,15 @@  discard block
 block discarded – undo
7405 7405
     'weight' => 0,
7406 7406
   ));
7407 7407
   $handler->override_option('allow', array(
7408
-    'use_pager' => FALSE,
7409
-    'items_per_page' => FALSE,
7410
-    'offset' => FALSE,
7411
-    'link_to_view' => FALSE,
7412
-    'more_link' => FALSE,
7413
-    'path_override' => FALSE,
7414
-    'title_override' => FALSE,
7415
-    'exposed_form' => FALSE,
7416
-    'fields_override' => FALSE,
7408
+    'use_pager' => false,
7409
+    'items_per_page' => false,
7410
+    'offset' => false,
7411
+    'link_to_view' => false,
7412
+    'more_link' => false,
7413
+    'path_override' => false,
7414
+    'title_override' => false,
7415
+    'exposed_form' => false,
7416
+    'fields_override' => false,
7417 7417
   ));
7418 7418
   $handler->override_option('argument_input', array());
7419 7419
   $handler->override_option('link_to_view', 0);
@@ -7429,7 +7429,7 @@  discard block
 block discarded – undo
7429 7429
   $view->base_table = 'result';
7430 7430
   $view->core = 0;
7431 7431
   $view->api_version = '2';
7432
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
7432
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
7433 7433
   $handler = $view->new_display('default', 'Defaults', 'default');
7434 7434
   $handler->override_option('fields', array(
7435 7435
     'name' => array(
@@ -7490,7 +7490,7 @@  discard block
 block discarded – undo
7490 7490
       'hide_empty' => 0,
7491 7491
       'empty_zero' => 0,
7492 7492
       'hide_alter_empty' => 1,
7493
-      'set_precision' => FALSE,
7493
+      'set_precision' => false,
7494 7494
       'precision' => 0,
7495 7495
       'decimal' => '.',
7496 7496
       'separator' => '',
@@ -7528,7 +7528,7 @@  discard block
 block discarded – undo
7528 7528
       'empty' => '',
7529 7529
       'hide_empty' => 0,
7530 7530
       'empty_zero' => 0,
7531
-      'set_precision' => FALSE,
7531
+      'set_precision' => false,
7532 7532
       'precision' => 0,
7533 7533
       'decimal' => '.',
7534 7534
       'separator' => '',
@@ -7728,7 +7728,7 @@  discard block
 block discarded – undo
7728 7728
       'empty' => '',
7729 7729
       'hide_empty' => 0,
7730 7730
       'empty_zero' => 0,
7731
-      'set_precision' => FALSE,
7731
+      'set_precision' => false,
7732 7732
       'precision' => 0,
7733 7733
       'decimal' => '.',
7734 7734
       'separator' => '',
@@ -7763,7 +7763,7 @@  discard block
 block discarded – undo
7763 7763
       'empty' => '',
7764 7764
       'hide_empty' => 0,
7765 7765
       'empty_zero' => 0,
7766
-      'set_precision' => FALSE,
7766
+      'set_precision' => false,
7767 7767
       'precision' => 0,
7768 7768
       'decimal' => '.',
7769 7769
       'separator' => '',
@@ -7798,7 +7798,7 @@  discard block
 block discarded – undo
7798 7798
       'empty' => '',
7799 7799
       'hide_empty' => 0,
7800 7800
       'empty_zero' => 0,
7801
-      'set_precision' => FALSE,
7801
+      'set_precision' => false,
7802 7802
       'precision' => 0,
7803 7803
       'decimal' => '.',
7804 7804
       'separator' => '',
@@ -7833,7 +7833,7 @@  discard block
 block discarded – undo
7833 7833
       'empty' => '',
7834 7834
       'hide_empty' => 0,
7835 7835
       'empty_zero' => 0,
7836
-      'set_precision' => FALSE,
7836
+      'set_precision' => false,
7837 7837
       'precision' => 0,
7838 7838
       'decimal' => '.',
7839 7839
       'separator' => '',
@@ -7868,7 +7868,7 @@  discard block
 block discarded – undo
7868 7868
       'empty' => '',
7869 7869
       'hide_empty' => 0,
7870 7870
       'empty_zero' => 0,
7871
-      'set_precision' => FALSE,
7871
+      'set_precision' => false,
7872 7872
       'precision' => 0,
7873 7873
       'decimal' => '.',
7874 7874
       'separator' => '',
@@ -8071,7 +8071,7 @@  discard block
 block discarded – undo
8071 8071
       'hide_empty' => 0,
8072 8072
       'empty_zero' => 0,
8073 8073
       'hide_alter_empty' => 1,
8074
-      'set_precision' => FALSE,
8074
+      'set_precision' => false,
8075 8075
       'precision' => 0,
8076 8076
       'decimal' => '.',
8077 8077
       'separator' => '',
@@ -8109,7 +8109,7 @@  discard block
 block discarded – undo
8109 8109
       'empty' => '',
8110 8110
       'hide_empty' => 0,
8111 8111
       'empty_zero' => 0,
8112
-      'set_precision' => FALSE,
8112
+      'set_precision' => false,
8113 8113
       'precision' => 0,
8114 8114
       'decimal' => '.',
8115 8115
       'separator' => '',
@@ -8348,9 +8348,9 @@  discard block
 block discarded – undo
8348 8348
         'max' => '',
8349 8349
       ),
8350 8350
       'group' => '0',
8351
-      'exposed' => FALSE,
8351
+      'exposed' => false,
8352 8352
       'expose' => array(
8353
-        'operator' => FALSE,
8353
+        'operator' => false,
8354 8354
         'label' => '',
8355 8355
       ),
8356 8356
       'id' => 'server_state',
@@ -8369,9 +8369,9 @@  discard block
 block discarded – undo
8369 8369
         'max' => '',
8370 8370
       ),
8371 8371
       'group' => '0',
8372
-      'exposed' => FALSE,
8372
+      'exposed' => false,
8373 8373
       'expose' => array(
8374
-        'operator' => FALSE,
8374
+        'operator' => false,
8375 8375
         'label' => '',
8376 8376
       ),
8377 8377
       'id' => 'outcome',
@@ -8390,9 +8390,9 @@  discard block
 block discarded – undo
8390 8390
         'max' => '7',
8391 8391
       ),
8392 8392
       'group' => '0',
8393
-      'exposed' => FALSE,
8393
+      'exposed' => false,
8394 8394
       'expose' => array(
8395
-        'operator' => FALSE,
8395
+        'operator' => false,
8396 8396
         'label' => '',
8397 8397
       ),
8398 8398
       'id' => 'outcome_1',
@@ -8411,9 +8411,9 @@  discard block
 block discarded – undo
8411 8411
         'max' => '',
8412 8412
       ),
8413 8413
       'group' => '0',
8414
-      'exposed' => FALSE,
8414
+      'exposed' => false,
8415 8415
       'expose' => array(
8416
-        'operator' => FALSE,
8416
+        'operator' => false,
8417 8417
         'label' => '',
8418 8418
       ),
8419 8419
       'id' => 'outcome_2',
@@ -8450,9 +8450,9 @@  discard block
 block discarded – undo
8450 8450
         'max' => '',
8451 8451
       ),
8452 8452
       'group' => '0',
8453
-      'exposed' => FALSE,
8453
+      'exposed' => false,
8454 8454
       'expose' => array(
8455
-        'operator' => FALSE,
8455
+        'operator' => false,
8456 8456
         'label' => '',
8457 8457
       ),
8458 8458
       'id' => 'server_state',
@@ -8489,9 +8489,9 @@  discard block
 block discarded – undo
8489 8489
         'max' => '',
8490 8490
       ),
8491 8491
       'group' => '0',
8492
-      'exposed' => FALSE,
8492
+      'exposed' => false,
8493 8493
       'expose' => array(
8494
-        'operator' => FALSE,
8494
+        'operator' => false,
8495 8495
         'label' => '',
8496 8496
       ),
8497 8497
       'id' => 'server_state',
@@ -8515,9 +8515,9 @@  discard block
 block discarded – undo
8515 8515
         'max' => '',
8516 8516
       ),
8517 8517
       'group' => '0',
8518
-      'exposed' => FALSE,
8518
+      'exposed' => false,
8519 8519
       'expose' => array(
8520
-        'operator' => FALSE,
8520
+        'operator' => false,
8521 8521
         'label' => '',
8522 8522
       ),
8523 8523
       'id' => 'outcome',
@@ -8541,9 +8541,9 @@  discard block
 block discarded – undo
8541 8541
         'max' => '',
8542 8542
       ),
8543 8543
       'group' => '0',
8544
-      'exposed' => FALSE,
8544
+      'exposed' => false,
8545 8545
       'expose' => array(
8546
-        'operator' => FALSE,
8546
+        'operator' => false,
8547 8547
         'label' => '',
8548 8548
       ),
8549 8549
       'id' => 'outcome_1',
@@ -8567,9 +8567,9 @@  discard block
 block discarded – undo
8567 8567
         'max' => '',
8568 8568
       ),
8569 8569
       'group' => '0',
8570
-      'exposed' => FALSE,
8570
+      'exposed' => false,
8571 8571
       'expose' => array(
8572
-        'operator' => FALSE,
8572
+        'operator' => false,
8573 8573
         'label' => '',
8574 8574
       ),
8575 8575
       'id' => 'validate_state',
@@ -8593,9 +8593,9 @@  discard block
 block discarded – undo
8593 8593
         'max' => '',
8594 8594
       ),
8595 8595
       'group' => '0',
8596
-      'exposed' => FALSE,
8596
+      'exposed' => false,
8597 8597
       'expose' => array(
8598
-        'operator' => FALSE,
8598
+        'operator' => false,
8599 8599
         'label' => '',
8600 8600
       ),
8601 8601
       'id' => 'validate_state_1',
@@ -8619,9 +8619,9 @@  discard block
 block discarded – undo
8619 8619
         'max' => '',
8620 8620
       ),
8621 8621
       'group' => '0',
8622
-      'exposed' => FALSE,
8622
+      'exposed' => false,
8623 8623
       'expose' => array(
8624
-        'operator' => FALSE,
8624
+        'operator' => false,
8625 8625
         'label' => '',
8626 8626
       ),
8627 8627
       'id' => 'validate_state_2',
@@ -8668,9 +8668,9 @@  discard block
 block discarded – undo
8668 8668
         'max' => '',
8669 8669
       ),
8670 8670
       'group' => '0',
8671
-      'exposed' => FALSE,
8671
+      'exposed' => false,
8672 8672
       'expose' => array(
8673
-        'operator' => FALSE,
8673
+        'operator' => false,
8674 8674
         'label' => '',
8675 8675
       ),
8676 8676
       'id' => 'server_state',
@@ -8689,9 +8689,9 @@  discard block
 block discarded – undo
8689 8689
         'max' => '',
8690 8690
       ),
8691 8691
       'group' => '0',
8692
-      'exposed' => FALSE,
8692
+      'exposed' => false,
8693 8693
       'expose' => array(
8694
-        'operator' => FALSE,
8694
+        'operator' => false,
8695 8695
         'label' => '',
8696 8696
       ),
8697 8697
       'id' => 'outcome',
@@ -8710,9 +8710,9 @@  discard block
 block discarded – undo
8710 8710
         'max' => '',
8711 8711
       ),
8712 8712
       'group' => '0',
8713
-      'exposed' => FALSE,
8713
+      'exposed' => false,
8714 8714
       'expose' => array(
8715
-        'operator' => FALSE,
8715
+        'operator' => false,
8716 8716
         'label' => '',
8717 8717
       ),
8718 8718
       'id' => 'validate_state',
@@ -8731,9 +8731,9 @@  discard block
 block discarded – undo
8731 8731
         'max' => '4',
8732 8732
       ),
8733 8733
       'group' => '0',
8734
-      'exposed' => FALSE,
8734
+      'exposed' => false,
8735 8735
       'expose' => array(
8736
-        'operator' => FALSE,
8736
+        'operator' => false,
8737 8737
         'label' => '',
8738 8738
       ),
8739 8739
       'id' => 'validate_state_1',
@@ -8752,9 +8752,9 @@  discard block
 block discarded – undo
8752 8752
         'max' => '',
8753 8753
       ),
8754 8754
       'group' => '0',
8755
-      'exposed' => FALSE,
8755
+      'exposed' => false,
8756 8756
       'expose' => array(
8757
-        'operator' => FALSE,
8757
+        'operator' => false,
8758 8758
         'label' => '',
8759 8759
       ),
8760 8760
       'id' => 'validate_state_2',
@@ -8791,9 +8791,9 @@  discard block
 block discarded – undo
8791 8791
         'max' => '',
8792 8792
       ),
8793 8793
       'group' => '0',
8794
-      'exposed' => FALSE,
8794
+      'exposed' => false,
8795 8795
       'expose' => array(
8796
-        'operator' => FALSE,
8796
+        'operator' => false,
8797 8797
         'label' => '',
8798 8798
       ),
8799 8799
       'id' => 'server_state',
@@ -8812,9 +8812,9 @@  discard block
 block discarded – undo
8812 8812
         'max' => '',
8813 8813
       ),
8814 8814
       'group' => '0',
8815
-      'exposed' => FALSE,
8815
+      'exposed' => false,
8816 8816
       'expose' => array(
8817
-        'operator' => FALSE,
8817
+        'operator' => false,
8818 8818
         'label' => '',
8819 8819
       ),
8820 8820
       'id' => 'outcome',
@@ -8833,9 +8833,9 @@  discard block
 block discarded – undo
8833 8833
         'max' => '',
8834 8834
       ),
8835 8835
       'group' => '0',
8836
-      'exposed' => FALSE,
8836
+      'exposed' => false,
8837 8837
       'expose' => array(
8838
-        'operator' => FALSE,
8838
+        'operator' => false,
8839 8839
         'label' => '',
8840 8840
       ),
8841 8841
       'id' => 'validate_state',
@@ -8873,7 +8873,7 @@  discard block
 block discarded – undo
8873 8873
   $view->base_table = 'result';
8874 8874
   $view->core = 0;
8875 8875
   $view->api_version = '2';
8876
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
8876
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
8877 8877
   $handler = $view->new_display('default', 'Defaults', 'default');
8878 8878
   $handler->override_option('fields', array(
8879 8879
     'name' => array(
@@ -8928,7 +8928,7 @@  discard block
 block discarded – undo
8928 8928
       'empty' => '',
8929 8929
       'hide_empty' => 0,
8930 8930
       'empty_zero' => 0,
8931
-      'set_precision' => FALSE,
8931
+      'set_precision' => false,
8932 8932
       'precision' => 0,
8933 8933
       'decimal' => '.',
8934 8934
       'separator' => '',
@@ -9245,7 +9245,7 @@  discard block
 block discarded – undo
9245 9245
       'hide_empty' => 0,
9246 9246
       'empty_zero' => 0,
9247 9247
       'hide_alter_empty' => 1,
9248
-      'set_precision' => FALSE,
9248
+      'set_precision' => false,
9249 9249
       'precision' => 0,
9250 9250
       'decimal' => '.',
9251 9251
       'separator' => '',
@@ -9324,7 +9324,7 @@  discard block
 block discarded – undo
9324 9324
       'hide_empty' => 0,
9325 9325
       'empty_zero' => 0,
9326 9326
       'hide_alter_empty' => 1,
9327
-      'set_precision' => FALSE,
9327
+      'set_precision' => false,
9328 9328
       'precision' => 0,
9329 9329
       'decimal' => '.',
9330 9330
       'separator' => '',
@@ -9403,7 +9403,7 @@  discard block
 block discarded – undo
9403 9403
       'hide_empty' => 0,
9404 9404
       'empty_zero' => 0,
9405 9405
       'hide_alter_empty' => 1,
9406
-      'set_precision' => FALSE,
9406
+      'set_precision' => false,
9407 9407
       'precision' => 0,
9408 9408
       'decimal' => '.',
9409 9409
       'separator' => '',
@@ -9482,7 +9482,7 @@  discard block
 block discarded – undo
9482 9482
       'hide_empty' => 0,
9483 9483
       'empty_zero' => 0,
9484 9484
       'hide_alter_empty' => 1,
9485
-      'set_precision' => FALSE,
9485
+      'set_precision' => false,
9486 9486
       'precision' => 0,
9487 9487
       'decimal' => '.',
9488 9488
       'separator' => '',
@@ -9556,7 +9556,7 @@  discard block
 block discarded – undo
9556 9556
       'empty' => '',
9557 9557
       'hide_empty' => 0,
9558 9558
       'empty_zero' => 0,
9559
-      'set_precision' => FALSE,
9559
+      'set_precision' => false,
9560 9560
       'precision' => 0,
9561 9561
       'decimal' => '.',
9562 9562
       'separator' => '',
@@ -9664,7 +9664,7 @@  discard block
 block discarded – undo
9664 9664
       'hide_empty' => 0,
9665 9665
       'empty_zero' => 0,
9666 9666
       'hide_alter_empty' => 1,
9667
-      'set_precision' => FALSE,
9667
+      'set_precision' => false,
9668 9668
       'precision' => 0,
9669 9669
       'decimal' => '.',
9670 9670
       'separator' => ',',
@@ -9705,7 +9705,7 @@  discard block
 block discarded – undo
9705 9705
       'hide_empty' => 0,
9706 9706
       'empty_zero' => 0,
9707 9707
       'hide_alter_empty' => 1,
9708
-      'set_precision' => FALSE,
9708
+      'set_precision' => false,
9709 9709
       'precision' => 0,
9710 9710
       'decimal' => '.',
9711 9711
       'separator' => ',',
@@ -9746,7 +9746,7 @@  discard block
 block discarded – undo
9746 9746
       'hide_empty' => 0,
9747 9747
       'empty_zero' => 0,
9748 9748
       'hide_alter_empty' => 1,
9749
-      'set_precision' => FALSE,
9749
+      'set_precision' => false,
9750 9750
       'precision' => 0,
9751 9751
       'decimal' => '.',
9752 9752
       'separator' => ',',
@@ -9787,7 +9787,7 @@  discard block
 block discarded – undo
9787 9787
       'hide_empty' => 0,
9788 9788
       'empty_zero' => 0,
9789 9789
       'hide_alter_empty' => 1,
9790
-      'set_precision' => FALSE,
9790
+      'set_precision' => false,
9791 9791
       'precision' => 0,
9792 9792
       'decimal' => '.',
9793 9793
       'separator' => '',
@@ -9907,7 +9907,7 @@  discard block
 block discarded – undo
9907 9907
       'hide_empty' => 0,
9908 9908
       'empty_zero' => 0,
9909 9909
       'hide_alter_empty' => 1,
9910
-      'set_precision' => FALSE,
9910
+      'set_precision' => false,
9911 9911
       'precision' => 0,
9912 9912
       'decimal' => '.',
9913 9913
       'separator' => ',',
@@ -9948,7 +9948,7 @@  discard block
 block discarded – undo
9948 9948
       'hide_empty' => 0,
9949 9949
       'empty_zero' => 0,
9950 9950
       'hide_alter_empty' => 1,
9951
-      'set_precision' => FALSE,
9951
+      'set_precision' => false,
9952 9952
       'precision' => 0,
9953 9953
       'decimal' => '.',
9954 9954
       'separator' => '',
@@ -10129,7 +10129,7 @@  discard block
 block discarded – undo
10129 10129
   $view->base_table = 'user';
10130 10130
   $view->core = 6;
10131 10131
   $view->api_version = '2';
10132
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10132
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
10133 10133
   $handler = $view->new_display('default', 'Defaults', 'default');
10134 10134
   $handler->override_option('fields', array(
10135 10135
     'rownumber' => array(
@@ -10190,7 +10190,7 @@  discard block
 block discarded – undo
10190 10190
       'hide_empty' => 0,
10191 10191
       'empty_zero' => 0,
10192 10192
       'hide_alter_empty' => 1,
10193
-      'set_precision' => FALSE,
10193
+      'set_precision' => false,
10194 10194
       'precision' => 0,
10195 10195
       'decimal' => '.',
10196 10196
       'separator' => '',
@@ -10438,9 +10438,9 @@  discard block
 block discarded – undo
10438 10438
         'max' => '',
10439 10439
       ),
10440 10440
       'group' => '0',
10441
-      'exposed' => FALSE,
10441
+      'exposed' => false,
10442 10442
       'expose' => array(
10443
-        'operator' => FALSE,
10443
+        'operator' => false,
10444 10444
         'label' => '',
10445 10445
       ),
10446 10446
       'id' => 'total_credit',
@@ -10584,7 +10584,7 @@  discard block
 block discarded – undo
10584 10584
       'hide_empty' => 0,
10585 10585
       'empty_zero' => 0,
10586 10586
       'hide_alter_empty' => 1,
10587
-      'set_precision' => FALSE,
10587
+      'set_precision' => false,
10588 10588
       'precision' => 0,
10589 10589
       'decimal' => '.',
10590 10590
       'separator' => '',
@@ -10891,15 +10891,15 @@  discard block
 block discarded – undo
10891 10891
     'weight' => 0,
10892 10892
   ));
10893 10893
   $handler->override_option('allow', array(
10894
-    'use_pager' => FALSE,
10895
-    'items_per_page' => FALSE,
10896
-    'offset' => FALSE,
10897
-    'link_to_view' => FALSE,
10898
-    'more_link' => FALSE,
10899
-    'path_override' => FALSE,
10900
-    'title_override' => FALSE,
10901
-    'exposed_form' => FALSE,
10902
-    'fields_override' => FALSE,
10894
+    'use_pager' => false,
10895
+    'items_per_page' => false,
10896
+    'offset' => false,
10897
+    'link_to_view' => false,
10898
+    'more_link' => false,
10899
+    'path_override' => false,
10900
+    'title_override' => false,
10901
+    'exposed_form' => false,
10902
+    'fields_override' => false,
10903 10903
   ));
10904 10904
   $handler->override_option('argument_input', array());
10905 10905
   $handler->override_option('link_to_view', 0);
@@ -10915,7 +10915,7 @@  discard block
 block discarded – undo
10915 10915
   $view->base_table = 'workunit';
10916 10916
   $view->core = 0;
10917 10917
   $view->api_version = '2';
10918
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10918
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
10919 10919
   $handler = $view->new_display('default', 'Defaults', 'default');
10920 10920
   $handler->override_option('relationships', array(
10921 10921
     'appid' => array(
@@ -11115,7 +11115,7 @@  discard block
 block discarded – undo
11115 11115
       'empty' => '',
11116 11116
       'hide_empty' => 0,
11117 11117
       'empty_zero' => 0,
11118
-      'set_precision' => FALSE,
11118
+      'set_precision' => false,
11119 11119
       'precision' => 0,
11120 11120
       'decimal' => '.',
11121 11121
       'separator' => '',
@@ -11253,7 +11253,7 @@  discard block
 block discarded – undo
11253 11253
       'empty' => '',
11254 11254
       'hide_empty' => 0,
11255 11255
       'empty_zero' => 0,
11256
-      'set_precision' => FALSE,
11256
+      'set_precision' => false,
11257 11257
       'precision' => 0,
11258 11258
       'decimal' => '.',
11259 11259
       'separator' => '',
@@ -11288,7 +11288,7 @@  discard block
 block discarded – undo
11288 11288
       'empty' => '',
11289 11289
       'hide_empty' => 0,
11290 11290
       'empty_zero' => 0,
11291
-      'set_precision' => FALSE,
11291
+      'set_precision' => false,
11292 11292
       'precision' => 0,
11293 11293
       'decimal' => '.',
11294 11294
       'separator' => '',
@@ -11323,7 +11323,7 @@  discard block
 block discarded – undo
11323 11323
       'empty' => '',
11324 11324
       'hide_empty' => 0,
11325 11325
       'empty_zero' => 0,
11326
-      'set_precision' => FALSE,
11326
+      'set_precision' => false,
11327 11327
       'precision' => 0,
11328 11328
       'decimal' => '.',
11329 11329
       'separator' => '',
@@ -11358,7 +11358,7 @@  discard block
 block discarded – undo
11358 11358
       'empty' => '',
11359 11359
       'hide_empty' => 0,
11360 11360
       'empty_zero' => 0,
11361
-      'set_precision' => FALSE,
11361
+      'set_precision' => false,
11362 11362
       'precision' => 0,
11363 11363
       'decimal' => '.',
11364 11364
       'separator' => '',
@@ -11393,7 +11393,7 @@  discard block
 block discarded – undo
11393 11393
       'empty' => '',
11394 11394
       'hide_empty' => 0,
11395 11395
       'empty_zero' => 0,
11396
-      'set_precision' => FALSE,
11396
+      'set_precision' => false,
11397 11397
       'precision' => 0,
11398 11398
       'decimal' => '.',
11399 11399
       'separator' => '',
@@ -11428,7 +11428,7 @@  discard block
 block discarded – undo
11428 11428
       'empty' => '',
11429 11429
       'hide_empty' => 0,
11430 11430
       'empty_zero' => 0,
11431
-      'set_precision' => FALSE,
11431
+      'set_precision' => false,
11432 11432
       'precision' => 0,
11433 11433
       'decimal' => '.',
11434 11434
       'separator' => '',
@@ -11463,7 +11463,7 @@  discard block
 block discarded – undo
11463 11463
       'empty' => '',
11464 11464
       'hide_empty' => 0,
11465 11465
       'empty_zero' => 0,
11466
-      'set_precision' => FALSE,
11466
+      'set_precision' => false,
11467 11467
       'precision' => 0,
11468 11468
       'decimal' => '.',
11469 11469
       'separator' => '',
@@ -11650,7 +11650,7 @@  discard block
 block discarded – undo
11650 11650
       'empty' => '',
11651 11651
       'hide_empty' => 0,
11652 11652
       'empty_zero' => 0,
11653
-      'set_precision' => FALSE,
11653
+      'set_precision' => false,
11654 11654
       'precision' => 0,
11655 11655
       'decimal' => '.',
11656 11656
       'separator' => ',',
@@ -11784,7 +11784,7 @@  discard block
 block discarded – undo
11784 11784
   $view->base_table = 'result';
11785 11785
   $view->core = 6;
11786 11786
   $view->api_version = '2';
11787
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
11787
+  $view->disabled = false; /* Edit this to true to make a default view disabled initially */
11788 11788
   $handler = $view->new_display('default', 'Defaults', 'default');
11789 11789
   $handler->override_option('fields', array(
11790 11790
     'name' => array(
@@ -11845,7 +11845,7 @@  discard block
 block discarded – undo
11845 11845
       'hide_empty' => 0,
11846 11846
       'empty_zero' => 0,
11847 11847
       'hide_alter_empty' => 1,
11848
-      'set_precision' => FALSE,
11848
+      'set_precision' => false,
11849 11849
       'precision' => 0,
11850 11850
       'decimal' => '.',
11851 11851
       'separator' => '',
@@ -11886,7 +11886,7 @@  discard block
 block discarded – undo
11886 11886
       'hide_empty' => 0,
11887 11887
       'empty_zero' => 0,
11888 11888
       'hide_alter_empty' => 1,
11889
-      'set_precision' => FALSE,
11889
+      'set_precision' => false,
11890 11890
       'precision' => 0,
11891 11891
       'decimal' => '.',
11892 11892
       'separator' => '',
@@ -12089,7 +12089,7 @@  discard block
 block discarded – undo
12089 12089
       'empty' => '',
12090 12090
       'hide_empty' => 0,
12091 12091
       'empty_zero' => 0,
12092
-      'set_precision' => FALSE,
12092
+      'set_precision' => false,
12093 12093
       'precision' => 0,
12094 12094
       'decimal' => '.',
12095 12095
       'separator' => '',
@@ -12124,7 +12124,7 @@  discard block
 block discarded – undo
12124 12124
       'empty' => '',
12125 12125
       'hide_empty' => 0,
12126 12126
       'empty_zero' => 0,
12127
-      'set_precision' => FALSE,
12127
+      'set_precision' => false,
12128 12128
       'precision' => 0,
12129 12129
       'decimal' => '.',
12130 12130
       'separator' => '',
@@ -12159,7 +12159,7 @@  discard block
 block discarded – undo
12159 12159
       'empty' => '',
12160 12160
       'hide_empty' => 0,
12161 12161
       'empty_zero' => 0,
12162
-      'set_precision' => FALSE,
12162
+      'set_precision' => false,
12163 12163
       'precision' => 0,
12164 12164
       'decimal' => '.',
12165 12165
       'separator' => '',
@@ -12194,7 +12194,7 @@  discard block
 block discarded – undo
12194 12194
       'empty' => '',
12195 12195
       'hide_empty' => 0,
12196 12196
       'empty_zero' => 0,
12197
-      'set_precision' => FALSE,
12197
+      'set_precision' => false,
12198 12198
       'precision' => 0,
12199 12199
       'decimal' => '.',
12200 12200
       'separator' => '',
@@ -12229,7 +12229,7 @@  discard block
 block discarded – undo
12229 12229
       'empty' => '',
12230 12230
       'hide_empty' => 0,
12231 12231
       'empty_zero' => 0,
12232
-      'set_precision' => FALSE,
12232
+      'set_precision' => false,
12233 12233
       'precision' => 0,
12234 12234
       'decimal' => '.',
12235 12235
       'separator' => '',
@@ -12432,7 +12432,7 @@  discard block
 block discarded – undo
12432 12432
       'hide_empty' => 0,
12433 12433
       'empty_zero' => 0,
12434 12434
       'hide_alter_empty' => 1,
12435
-      'set_precision' => FALSE,
12435
+      'set_precision' => false,
12436 12436
       'precision' => 0,
12437 12437
       'decimal' => '.',
12438 12438
       'separator' => '',
@@ -12470,7 +12470,7 @@  discard block
 block discarded – undo
12470 12470
       'empty' => '',
12471 12471
       'hide_empty' => 0,
12472 12472
       'empty_zero' => 0,
12473
-      'set_precision' => FALSE,
12473
+      'set_precision' => false,
12474 12474
       'precision' => 0,
12475 12475
       'decimal' => '.',
12476 12476
       'separator' => '',
@@ -12737,9 +12737,9 @@  discard block
 block discarded – undo
12737 12737
         'max' => '',
12738 12738
       ),
12739 12739
       'group' => '0',
12740
-      'exposed' => FALSE,
12740
+      'exposed' => false,
12741 12741
       'expose' => array(
12742
-        'operator' => FALSE,
12742
+        'operator' => false,
12743 12743
         'label' => '',
12744 12744
       ),
12745 12745
       'id' => 'server_state',
@@ -12758,9 +12758,9 @@  discard block
 block discarded – undo
12758 12758
         'max' => '',
12759 12759
       ),
12760 12760
       'group' => '0',
12761
-      'exposed' => FALSE,
12761
+      'exposed' => false,
12762 12762
       'expose' => array(
12763
-        'operator' => FALSE,
12763
+        'operator' => false,
12764 12764
         'label' => '',
12765 12765
       ),
12766 12766
       'id' => 'outcome',
@@ -12779,9 +12779,9 @@  discard block
 block discarded – undo
12779 12779
         'max' => '7',
12780 12780
       ),
12781 12781
       'group' => '0',
12782
-      'exposed' => FALSE,
12782
+      'exposed' => false,
12783 12783
       'expose' => array(
12784
-        'operator' => FALSE,
12784
+        'operator' => false,
12785 12785
         'label' => '',
12786 12786
       ),
12787 12787
       'id' => 'outcome_1',
@@ -12800,9 +12800,9 @@  discard block
 block discarded – undo
12800 12800
         'max' => '',
12801 12801
       ),
12802 12802
       'group' => '0',
12803
-      'exposed' => FALSE,
12803
+      'exposed' => false,
12804 12804
       'expose' => array(
12805
-        'operator' => FALSE,
12805
+        'operator' => false,
12806 12806
         'label' => '',
12807 12807
       ),
12808 12808
       'id' => 'outcome_2',
@@ -12839,9 +12839,9 @@  discard block
 block discarded – undo
12839 12839
         'max' => '',
12840 12840
       ),
12841 12841
       'group' => '0',
12842
-      'exposed' => FALSE,
12842
+      'exposed' => false,
12843 12843
       'expose' => array(
12844
-        'operator' => FALSE,
12844
+        'operator' => false,
12845 12845
         'label' => '',
12846 12846
       ),
12847 12847
       'id' => 'server_state',
@@ -12878,9 +12878,9 @@  discard block
 block discarded – undo
12878 12878
         'max' => '',
12879 12879
       ),
12880 12880
       'group' => '0',
12881
-      'exposed' => FALSE,
12881
+      'exposed' => false,
12882 12882
       'expose' => array(
12883
-        'operator' => FALSE,
12883
+        'operator' => false,
12884 12884
         'label' => '',
12885 12885
       ),
12886 12886
       'id' => 'server_state',
@@ -12904,9 +12904,9 @@  discard block
 block discarded – undo
12904 12904
         'max' => '',
12905 12905
       ),
12906 12906
       'group' => '0',
12907
-      'exposed' => FALSE,
12907
+      'exposed' => false,
12908 12908
       'expose' => array(
12909
-        'operator' => FALSE,
12909
+        'operator' => false,
12910 12910
         'label' => '',
12911 12911
       ),
12912 12912
       'id' => 'outcome',
@@ -12930,9 +12930,9 @@  discard block
 block discarded – undo
12930 12930
         'max' => '',
12931 12931
       ),
12932 12932
       'group' => '0',
12933
-      'exposed' => FALSE,
12933
+      'exposed' => false,
12934 12934
       'expose' => array(
12935
-        'operator' => FALSE,
12935
+        'operator' => false,
12936 12936
         'label' => '',
12937 12937
       ),
12938 12938
       'id' => 'outcome_1',
@@ -12956,9 +12956,9 @@  discard block
 block discarded – undo
12956 12956
         'max' => '',
12957 12957
       ),
12958 12958
       'group' => '0',
12959
-      'exposed' => FALSE,
12959
+      'exposed' => false,
12960 12960
       'expose' => array(
12961
-        'operator' => FALSE,
12961
+        'operator' => false,
12962 12962
         'label' => '',
12963 12963
       ),
12964 12964
       'id' => 'validate_state',
@@ -12982,9 +12982,9 @@  discard block
 block discarded – undo
12982 12982
         'max' => '',
12983 12983
       ),
12984 12984
       'group' => '0',
12985
-      'exposed' => FALSE,
12985
+      'exposed' => false,
12986 12986
       'expose' => array(
12987
-        'operator' => FALSE,
12987
+        'operator' => false,
12988 12988
         'label' => '',
12989 12989
       ),
12990 12990
       'id' => 'validate_state_1',
@@ -13008,9 +13008,9 @@  discard block
 block discarded – undo
13008 13008
         'max' => '',
13009 13009
       ),
13010 13010
       'group' => '0',
13011
-      'exposed' => FALSE,
13011
+      'exposed' => false,
13012 13012
       'expose' => array(
13013
-        'operator' => FALSE,
13013
+        'operator' => false,
13014 13014
         'label' => '',
13015 13015
       ),
13016 13016
       'id' => 'validate_state_2',
@@ -13057,9 +13057,9 @@  discard block
 block discarded – undo
13057 13057
         'max' => '',
13058 13058
       ),
13059 13059
       'group' => '0',
13060
-      'exposed' => FALSE,
13060
+      'exposed' => false,
13061 13061
       'expose' => array(
13062
-        'operator' => FALSE,
13062
+        'operator' => false,
13063 13063
         'label' => '',
13064 13064
       ),
13065 13065
       'id' => 'server_state',
@@ -13078,9 +13078,9 @@  discard block
 block discarded – undo
13078 13078
         'max' => '',
13079 13079
       ),
13080 13080
       'group' => '0',
13081
-      'exposed' => FALSE,
13081
+      'exposed' => false,
13082 13082
       'expose' => array(
13083
-        'operator' => FALSE,
13083
+        'operator' => false,
13084 13084
         'label' => '',
13085 13085
       ),
13086 13086
       'id' => 'outcome',
@@ -13099,9 +13099,9 @@  discard block
 block discarded – undo
13099 13099
         'max' => '',
13100 13100
       ),
13101 13101
       'group' => '0',
13102
-      'exposed' => FALSE,
13102
+      'exposed' => false,
13103 13103
       'expose' => array(
13104
-        'operator' => FALSE,
13104
+        'operator' => false,
13105 13105
         'label' => '',
13106 13106
       ),
13107 13107
       'id' => 'validate_state',
@@ -13120,9 +13120,9 @@  discard block
 block discarded – undo
13120 13120
         'max' => '4',
13121 13121
       ),
13122 13122
       'group' => '0',
13123
-      'exposed' => FALSE,
13123
+      'exposed' => false,
13124 13124
       'expose' => array(
13125
-        'operator' => FALSE,
13125
+        'operator' => false,
13126 13126
         'label' => '',
13127 13127
       ),
13128 13128
       'id' => 'validate_state_1',
@@ -13141,9 +13141,9 @@  discard block
 block discarded – undo
13141 13141
         'max' => '',
13142 13142
       ),
13143 13143
       'group' => '0',
13144
-      'exposed' => FALSE,
13144
+      'exposed' => false,
13145 13145
       'expose' => array(
13146
-        'operator' => FALSE,
13146
+        'operator' => false,
13147 13147
         'label' => '',
13148 13148
       ),
13149 13149
       'id' => 'validate_state_2',
@@ -13180,9 +13180,9 @@  discard block
 block discarded – undo
13180 13180
         'max' => '',
13181 13181
       ),
13182 13182
       'group' => '0',
13183
-      'exposed' => FALSE,
13183
+      'exposed' => false,
13184 13184
       'expose' => array(
13185
-        'operator' => FALSE,
13185
+        'operator' => false,
13186 13186
         'label' => '',
13187 13187
       ),
13188 13188
       'id' => 'server_state',
@@ -13201,9 +13201,9 @@  discard block
 block discarded – undo
13201 13201
         'max' => '',
13202 13202
       ),
13203 13203
       'group' => '0',
13204
-      'exposed' => FALSE,
13204
+      'exposed' => false,
13205 13205
       'expose' => array(
13206
-        'operator' => FALSE,
13206
+        'operator' => false,
13207 13207
         'label' => '',
13208 13208
       ),
13209 13209
       'id' => 'outcome',
@@ -13222,9 +13222,9 @@  discard block
 block discarded – undo
13222 13222
         'max' => '',
13223 13223
       ),
13224 13224
       'group' => '0',
13225
-      'exposed' => FALSE,
13225
+      'exposed' => false,
13226 13226
       'expose' => array(
13227
-        'operator' => FALSE,
13227
+        'operator' => false,
13228 13228
         'label' => '',
13229 13229
       ),
13230 13230
       'id' => 'validate_state',
Please login to merge, or discard this patch.
Indentation   +6324 added lines, -6324 removed lines patch added patch discarded remove patch
@@ -4,22 +4,22 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function work_and_host_stats_views_default_views() {
7
-  $views = array();
7
+    $views = array();
8 8
 
9
-  // Exported view: boinc_account_tasks_all
10
-  $view = new view;
11
-  $view->name = 'boinc_account_tasks_all';
12
-  $view->description = 'A list of all tasks for a user';
13
-  $view->tag = '';
14
-  $view->base_table = 'result';
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: boinc_account_tasks_all
10
+    $view = new view;
11
+    $view->name = 'boinc_account_tasks_all';
12
+    $view->description = 'A list of all tasks for a user';
13
+    $view->tag = '';
14
+    $view->base_table = 'result';
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
     'name' => array(
21
-      'label' => 'Name',
22
-      'alter' => array(
21
+        'label' => 'Name',
22
+        'alter' => array(
23 23
         'alter_text' => 0,
24 24
         'text' => '',
25 25
         'make_link' => 0,
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
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
-      'exclude' => 1,
47
-      'id' => 'name',
48
-      'table' => 'result',
49
-      'field' => 'name',
50
-      'relationship' => 'none',
41
+        ),
42
+        'empty' => '',
43
+        'hide_empty' => 0,
44
+        'empty_zero' => 0,
45
+        'hide_alter_empty' => 1,
46
+        'exclude' => 1,
47
+        'id' => 'name',
48
+        'table' => 'result',
49
+        'field' => 'name',
50
+        'relationship' => 'none',
51 51
     ),
52 52
     'id' => array(
53
-      'label' => 'Task ID',
54
-      'alter' => array(
53
+        'label' => 'Task ID',
54
+        'alter' => array(
55 55
         'alter_text' => 0,
56 56
         'text' => '',
57 57
         'make_link' => 0,
@@ -70,29 +70,29 @@  discard block
 block discarded – undo
70 70
         'ellipsis' => 1,
71 71
         'html' => 0,
72 72
         'strip_tags' => 0,
73
-      ),
74
-      'empty' => '',
75
-      'hide_empty' => 0,
76
-      'empty_zero' => 0,
77
-      'hide_alter_empty' => 1,
78
-      'set_precision' => FALSE,
79
-      'precision' => 0,
80
-      'decimal' => '.',
81
-      'separator' => '',
82
-      'format_plural' => 0,
83
-      'format_plural_singular' => '1',
84
-      'format_plural_plural' => '@count',
85
-      'prefix' => '',
86
-      'suffix' => '',
87
-      'exclude' => 0,
88
-      'id' => 'id',
89
-      'table' => 'result',
90
-      'field' => 'id',
91
-      'relationship' => 'none',
73
+        ),
74
+        'empty' => '',
75
+        'hide_empty' => 0,
76
+        'empty_zero' => 0,
77
+        'hide_alter_empty' => 1,
78
+        'set_precision' => FALSE,
79
+        'precision' => 0,
80
+        'decimal' => '.',
81
+        'separator' => '',
82
+        'format_plural' => 0,
83
+        'format_plural_singular' => '1',
84
+        'format_plural_plural' => '@count',
85
+        'prefix' => '',
86
+        'suffix' => '',
87
+        'exclude' => 0,
88
+        'id' => 'id',
89
+        'table' => 'result',
90
+        'field' => 'id',
91
+        'relationship' => 'none',
92 92
     ),
93 93
     'workunitid' => array(
94
-      'label' => 'Workunit ID',
95
-      'alter' => array(
94
+        'label' => 'Workunit ID',
95
+        'alter' => array(
96 96
         'alter_text' => 0,
97 97
         'text' => '',
98 98
         'make_link' => 1,
@@ -111,29 +111,29 @@  discard block
 block discarded – undo
111 111
         'ellipsis' => 1,
112 112
         'html' => 0,
113 113
         'strip_tags' => 0,
114
-      ),
115
-      'empty' => '',
116
-      'hide_empty' => 0,
117
-      'empty_zero' => 0,
118
-      'hide_alter_empty' => 1,
119
-      'set_precision' => FALSE,
120
-      'precision' => 0,
121
-      'decimal' => '.',
122
-      'separator' => '',
123
-      'format_plural' => 0,
124
-      'format_plural_singular' => '1',
125
-      'format_plural_plural' => '@count',
126
-      'prefix' => '',
127
-      'suffix' => '',
128
-      'exclude' => 0,
129
-      'id' => 'workunitid',
130
-      'table' => 'result',
131
-      'field' => 'workunitid',
132
-      'relationship' => 'none',
114
+        ),
115
+        'empty' => '',
116
+        'hide_empty' => 0,
117
+        'empty_zero' => 0,
118
+        'hide_alter_empty' => 1,
119
+        'set_precision' => FALSE,
120
+        'precision' => 0,
121
+        'decimal' => '.',
122
+        'separator' => '',
123
+        'format_plural' => 0,
124
+        'format_plural_singular' => '1',
125
+        'format_plural_plural' => '@count',
126
+        'prefix' => '',
127
+        'suffix' => '',
128
+        'exclude' => 0,
129
+        'id' => 'workunitid',
130
+        'table' => 'result',
131
+        'field' => 'workunitid',
132
+        'relationship' => 'none',
133 133
     ),
134 134
     'hostid' => array(
135
-      'label' => 'Computer',
136
-      'alter' => array(
135
+        'label' => 'Computer',
136
+        'alter' => array(
137 137
         'alter_text' => 0,
138 138
         'text' => '',
139 139
         'make_link' => 1,
@@ -152,29 +152,29 @@  discard block
 block discarded – undo
152 152
         'ellipsis' => 1,
153 153
         'html' => 0,
154 154
         'strip_tags' => 0,
155
-      ),
156
-      'empty' => '',
157
-      'hide_empty' => 0,
158
-      'empty_zero' => 0,
159
-      'hide_alter_empty' => 1,
160
-      'set_precision' => FALSE,
161
-      'precision' => 0,
162
-      'decimal' => '.',
163
-      'separator' => '',
164
-      'format_plural' => 0,
165
-      'format_plural_singular' => '1',
166
-      'format_plural_plural' => '@count',
167
-      'prefix' => '',
168
-      'suffix' => '',
169
-      'exclude' => 0,
170
-      'id' => 'hostid',
171
-      'table' => 'result',
172
-      'field' => 'hostid',
173
-      'relationship' => 'none',
155
+        ),
156
+        'empty' => '',
157
+        'hide_empty' => 0,
158
+        'empty_zero' => 0,
159
+        'hide_alter_empty' => 1,
160
+        'set_precision' => FALSE,
161
+        'precision' => 0,
162
+        'decimal' => '.',
163
+        'separator' => '',
164
+        'format_plural' => 0,
165
+        'format_plural_singular' => '1',
166
+        'format_plural_plural' => '@count',
167
+        'prefix' => '',
168
+        'suffix' => '',
169
+        'exclude' => 0,
170
+        'id' => 'hostid',
171
+        'table' => 'result',
172
+        'field' => 'hostid',
173
+        'relationship' => 'none',
174 174
     ),
175 175
     'sent_time' => array(
176
-      'label' => 'Sent',
177
-      'alter' => array(
176
+        'label' => 'Sent',
177
+        'alter' => array(
178 178
         'alter_text' => 0,
179 179
         'text' => '',
180 180
         'make_link' => 0,
@@ -191,21 +191,21 @@  discard block
 block discarded – undo
191 191
         'ellipsis' => 1,
192 192
         'html' => 0,
193 193
         'strip_tags' => 0,
194
-      ),
195
-      'empty' => '',
196
-      'hide_empty' => 0,
197
-      'empty_zero' => 0,
198
-      'date_format' => 'custom',
199
-      'custom_date_format' => 'j M Y G:i:s T',
200
-      'exclude' => 1,
201
-      'id' => 'sent_time',
202
-      'table' => 'result',
203
-      'field' => 'sent_time',
204
-      'relationship' => 'none',
194
+        ),
195
+        'empty' => '',
196
+        'hide_empty' => 0,
197
+        'empty_zero' => 0,
198
+        'date_format' => 'custom',
199
+        'custom_date_format' => 'j M Y G:i:s T',
200
+        'exclude' => 1,
201
+        'id' => 'sent_time',
202
+        'table' => 'result',
203
+        'field' => 'sent_time',
204
+        'relationship' => 'none',
205 205
     ),
206 206
     'received_time' => array(
207
-      'label' => 'Received time',
208
-      'alter' => array(
207
+        'label' => 'Received time',
208
+        'alter' => array(
209 209
         'alter_text' => 0,
210 210
         'text' => '',
211 211
         'make_link' => 0,
@@ -222,21 +222,21 @@  discard block
 block discarded – undo
222 222
         'ellipsis' => 1,
223 223
         'html' => 0,
224 224
         'strip_tags' => 0,
225
-      ),
226
-      'empty' => '',
227
-      'hide_empty' => 0,
228
-      'empty_zero' => 0,
229
-      'date_format' => 'small',
230
-      'custom_date_format' => '',
231
-      'exclude' => 1,
232
-      'id' => 'received_time',
233
-      'table' => 'result',
234
-      'field' => 'received_time',
235
-      'relationship' => 'none',
225
+        ),
226
+        'empty' => '',
227
+        'hide_empty' => 0,
228
+        'empty_zero' => 0,
229
+        'date_format' => 'small',
230
+        'custom_date_format' => '',
231
+        'exclude' => 1,
232
+        'id' => 'received_time',
233
+        'table' => 'result',
234
+        'field' => 'received_time',
235
+        'relationship' => 'none',
236 236
     ),
237 237
     'report_deadline' => array(
238
-      'label' => 'Report deadline',
239
-      'alter' => array(
238
+        'label' => 'Report deadline',
239
+        'alter' => array(
240 240
         'alter_text' => 0,
241 241
         'text' => '',
242 242
         'make_link' => 0,
@@ -253,21 +253,21 @@  discard block
 block discarded – undo
253 253
         'ellipsis' => 1,
254 254
         'html' => 0,
255 255
         'strip_tags' => 0,
256
-      ),
257
-      'empty' => '',
258
-      'hide_empty' => 0,
259
-      'empty_zero' => 0,
260
-      'date_format' => 'small',
261
-      'custom_date_format' => '',
262
-      'exclude' => 1,
263
-      'id' => 'report_deadline',
264
-      'table' => 'result',
265
-      'field' => 'report_deadline',
266
-      'relationship' => 'none',
256
+        ),
257
+        'empty' => '',
258
+        'hide_empty' => 0,
259
+        'empty_zero' => 0,
260
+        'date_format' => 'small',
261
+        'custom_date_format' => '',
262
+        'exclude' => 1,
263
+        'id' => 'report_deadline',
264
+        'table' => 'result',
265
+        'field' => 'report_deadline',
266
+        'relationship' => 'none',
267 267
     ),
268 268
     'phpcode_3' => array(
269
-      'label' => 'Sent',
270
-      'alter' => array(
269
+        'label' => 'Sent',
270
+        'alter' => array(
271 271
         'alter_text' => 0,
272 272
         'text' => '',
273 273
         'make_link' => 0,
@@ -286,24 +286,24 @@  discard block
 block discarded – undo
286 286
         'ellipsis' => 1,
287 287
         'html' => 0,
288 288
         'strip_tags' => 0,
289
-      ),
290
-      'empty' => '',
291
-      'hide_empty' => 0,
292
-      'empty_zero' => 0,
293
-      'hide_alter_empty' => 1,
294
-      'value' => '<?php
289
+        ),
290
+        'empty' => '',
291
+        'hide_empty' => 0,
292
+        'empty_zero' => 0,
293
+        'hide_alter_empty' => 1,
294
+        'value' => '<?php
295 295
   require_boinc(\'util\');
296 296
   echo date(\'j M Y G:i:s T\', $data->result_sent_time);
297 297
 ?>',
298
-      'exclude' => 0,
299
-      'id' => 'phpcode_3',
300
-      'table' => 'customfield',
301
-      'field' => 'phpcode',
302
-      'relationship' => 'none',
298
+        'exclude' => 0,
299
+        'id' => 'phpcode_3',
300
+        'table' => 'customfield',
301
+        'field' => 'phpcode',
302
+        'relationship' => 'none',
303 303
     ),
304 304
     'phpcode' => array(
305
-      'label' => 'Time reported or deadline',
306
-      'alter' => array(
305
+        'label' => 'Time reported or deadline',
306
+        'alter' => array(
307 307
         'alter_text' => 0,
308 308
         'text' => '',
309 309
         'make_link' => 0,
@@ -322,24 +322,24 @@  discard block
 block discarded – undo
322 322
         'ellipsis' => 1,
323 323
         'html' => 0,
324 324
         'strip_tags' => 0,
325
-      ),
326
-      'empty' => '',
327
-      'hide_empty' => 0,
328
-      'empty_zero' => 0,
329
-      'hide_alter_empty' => 1,
330
-      'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
331
-      'exclude' => 0,
332
-      'id' => 'phpcode',
333
-      'table' => 'customfield',
334
-      'field' => 'phpcode',
335
-      'override' => array(
325
+        ),
326
+        'empty' => '',
327
+        'hide_empty' => 0,
328
+        'empty_zero' => 0,
329
+        'hide_alter_empty' => 1,
330
+        'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
331
+        'exclude' => 0,
332
+        'id' => 'phpcode',
333
+        'table' => 'customfield',
334
+        'field' => 'phpcode',
335
+        'override' => array(
336 336
         'button' => 'Override',
337
-      ),
338
-      'relationship' => 'none',
337
+        ),
338
+        'relationship' => 'none',
339 339
     ),
340 340
     'server_state' => array(
341
-      'label' => 'Server state',
342
-      'alter' => array(
341
+        'label' => 'Server state',
342
+        'alter' => array(
343 343
         'alter_text' => 0,
344 344
         'text' => '',
345 345
         'make_link' => 0,
@@ -356,25 +356,25 @@  discard block
 block discarded – undo
356 356
         'ellipsis' => 1,
357 357
         'html' => 0,
358 358
         'strip_tags' => 0,
359
-      ),
360
-      'empty' => '',
361
-      'hide_empty' => 0,
362
-      'empty_zero' => 0,
363
-      'set_precision' => FALSE,
364
-      'precision' => 0,
365
-      'decimal' => '.',
366
-      'separator' => '',
367
-      'prefix' => '',
368
-      'suffix' => '',
369
-      'exclude' => 1,
370
-      'id' => 'server_state',
371
-      'table' => 'result',
372
-      'field' => 'server_state',
373
-      'relationship' => 'none',
359
+        ),
360
+        'empty' => '',
361
+        'hide_empty' => 0,
362
+        'empty_zero' => 0,
363
+        'set_precision' => FALSE,
364
+        'precision' => 0,
365
+        'decimal' => '.',
366
+        'separator' => '',
367
+        'prefix' => '',
368
+        'suffix' => '',
369
+        'exclude' => 1,
370
+        'id' => 'server_state',
371
+        'table' => 'result',
372
+        'field' => 'server_state',
373
+        'relationship' => 'none',
374 374
     ),
375 375
     'outcome' => array(
376
-      'label' => 'Outcome',
377
-      'alter' => array(
376
+        'label' => 'Outcome',
377
+        'alter' => array(
378 378
         'alter_text' => 0,
379 379
         'text' => '',
380 380
         'make_link' => 0,
@@ -391,25 +391,25 @@  discard block
 block discarded – undo
391 391
         'ellipsis' => 1,
392 392
         'html' => 0,
393 393
         'strip_tags' => 0,
394
-      ),
395
-      'empty' => '',
396
-      'hide_empty' => 0,
397
-      'empty_zero' => 0,
398
-      'set_precision' => FALSE,
399
-      'precision' => 0,
400
-      'decimal' => '.',
401
-      'separator' => '',
402
-      'prefix' => '',
403
-      'suffix' => '',
404
-      'exclude' => 1,
405
-      'id' => 'outcome',
406
-      'table' => 'result',
407
-      'field' => 'outcome',
408
-      'relationship' => 'none',
394
+        ),
395
+        'empty' => '',
396
+        'hide_empty' => 0,
397
+        'empty_zero' => 0,
398
+        'set_precision' => FALSE,
399
+        'precision' => 0,
400
+        'decimal' => '.',
401
+        'separator' => '',
402
+        'prefix' => '',
403
+        'suffix' => '',
404
+        'exclude' => 1,
405
+        'id' => 'outcome',
406
+        'table' => 'result',
407
+        'field' => 'outcome',
408
+        'relationship' => 'none',
409 409
     ),
410 410
     'client_state' => array(
411
-      'label' => 'Client state',
412
-      'alter' => array(
411
+        'label' => 'Client state',
412
+        'alter' => array(
413 413
         'alter_text' => 0,
414 414
         'text' => '',
415 415
         'make_link' => 0,
@@ -426,25 +426,25 @@  discard block
 block discarded – undo
426 426
         'ellipsis' => 1,
427 427
         'html' => 0,
428 428
         'strip_tags' => 0,
429
-      ),
430
-      'empty' => '',
431
-      'hide_empty' => 0,
432
-      'empty_zero' => 0,
433
-      'set_precision' => FALSE,
434
-      'precision' => 0,
435
-      'decimal' => '.',
436
-      'separator' => '',
437
-      'prefix' => '',
438
-      'suffix' => '',
439
-      'exclude' => 1,
440
-      'id' => 'client_state',
441
-      'table' => 'result',
442
-      'field' => 'client_state',
443
-      'relationship' => 'none',
429
+        ),
430
+        'empty' => '',
431
+        'hide_empty' => 0,
432
+        'empty_zero' => 0,
433
+        'set_precision' => FALSE,
434
+        'precision' => 0,
435
+        'decimal' => '.',
436
+        'separator' => '',
437
+        'prefix' => '',
438
+        'suffix' => '',
439
+        'exclude' => 1,
440
+        'id' => 'client_state',
441
+        'table' => 'result',
442
+        'field' => 'client_state',
443
+        'relationship' => 'none',
444 444
     ),
445 445
     'validate_state' => array(
446
-      'label' => 'Validation state',
447
-      'alter' => array(
446
+        'label' => 'Validation state',
447
+        'alter' => array(
448 448
         'alter_text' => 0,
449 449
         'text' => '',
450 450
         'make_link' => 0,
@@ -461,25 +461,25 @@  discard block
 block discarded – undo
461 461
         'ellipsis' => 1,
462 462
         'html' => 0,
463 463
         'strip_tags' => 0,
464
-      ),
465
-      'empty' => '',
466
-      'hide_empty' => 0,
467
-      'empty_zero' => 0,
468
-      'set_precision' => FALSE,
469
-      'precision' => 0,
470
-      'decimal' => '.',
471
-      'separator' => '',
472
-      'prefix' => '',
473
-      'suffix' => '',
474
-      'exclude' => 1,
475
-      'id' => 'validate_state',
476
-      'table' => 'result',
477
-      'field' => 'validate_state',
478
-      'relationship' => 'none',
464
+        ),
465
+        'empty' => '',
466
+        'hide_empty' => 0,
467
+        'empty_zero' => 0,
468
+        'set_precision' => FALSE,
469
+        'precision' => 0,
470
+        'decimal' => '.',
471
+        'separator' => '',
472
+        'prefix' => '',
473
+        'suffix' => '',
474
+        'exclude' => 1,
475
+        'id' => 'validate_state',
476
+        'table' => 'result',
477
+        'field' => 'validate_state',
478
+        'relationship' => 'none',
479 479
     ),
480 480
     'exit_status' => array(
481
-      'label' => 'Exit status',
482
-      'alter' => array(
481
+        'label' => 'Exit status',
482
+        'alter' => array(
483 483
         'alter_text' => 0,
484 484
         'text' => '',
485 485
         'make_link' => 0,
@@ -496,25 +496,25 @@  discard block
 block discarded – undo
496 496
         'ellipsis' => 1,
497 497
         'html' => 0,
498 498
         'strip_tags' => 0,
499
-      ),
500
-      'empty' => '',
501
-      'hide_empty' => 0,
502
-      'empty_zero' => 0,
503
-      'set_precision' => FALSE,
504
-      'precision' => 0,
505
-      'decimal' => '.',
506
-      'separator' => '',
507
-      'prefix' => '',
508
-      'suffix' => '',
509
-      'exclude' => 1,
510
-      'id' => 'exit_status',
511
-      'table' => 'result',
512
-      'field' => 'exit_status',
513
-      'relationship' => 'none',
499
+        ),
500
+        'empty' => '',
501
+        'hide_empty' => 0,
502
+        'empty_zero' => 0,
503
+        'set_precision' => FALSE,
504
+        'precision' => 0,
505
+        'decimal' => '.',
506
+        'separator' => '',
507
+        'prefix' => '',
508
+        'suffix' => '',
509
+        'exclude' => 1,
510
+        'id' => 'exit_status',
511
+        'table' => 'result',
512
+        'field' => 'exit_status',
513
+        'relationship' => 'none',
514 514
     ),
515 515
     'phpcode_1' => array(
516
-      'label' => 'Status',
517
-      'alter' => array(
516
+        'label' => 'Status',
517
+        'alter' => array(
518 518
         'alter_text' => 0,
519 519
         'text' => '',
520 520
         'make_link' => 0,
@@ -531,11 +531,11 @@  discard block
 block discarded – undo
531 531
         'ellipsis' => 1,
532 532
         'html' => 0,
533 533
         'strip_tags' => 0,
534
-      ),
535
-      'empty' => '',
536
-      'hide_empty' => 0,
537
-      'empty_zero' => 0,
538
-      'value' => '<?php
534
+        ),
535
+        'empty' => '',
536
+        'hide_empty' => 0,
537
+        'empty_zero' => 0,
538
+        'value' => '<?php
539 539
   require_boinc(\'result\');
540 540
   $result = new stdClass();
541 541
   $result->server_state = $data->result_server_state;
@@ -545,18 +545,18 @@  discard block
 block discarded – undo
545 545
   $result->exit_status = $data->result_exit_status;
546 546
   return state_string($result);
547 547
 ?>',
548
-      'exclude' => 0,
549
-      'id' => 'phpcode_1',
550
-      'table' => 'customfield',
551
-      'field' => 'phpcode',
552
-      'override' => array(
548
+        'exclude' => 0,
549
+        'id' => 'phpcode_1',
550
+        'table' => 'customfield',
551
+        'field' => 'phpcode',
552
+        'override' => array(
553 553
         'button' => 'Override',
554
-      ),
555
-      'relationship' => 'none',
554
+        ),
555
+        'relationship' => 'none',
556 556
     ),
557 557
     'elapsed_time' => array(
558
-      'label' => 'Run time',
559
-      'alter' => array(
558
+        'label' => 'Run time',
559
+        'alter' => array(
560 560
         'alter_text' => 0,
561 561
         'text' => '',
562 562
         'make_link' => 0,
@@ -575,29 +575,29 @@  discard block
 block discarded – undo
575 575
         'ellipsis' => 1,
576 576
         'html' => 0,
577 577
         'strip_tags' => 0,
578
-      ),
579
-      'empty' => '',
580
-      'hide_empty' => 0,
581
-      'empty_zero' => 0,
582
-      'hide_alter_empty' => 1,
583
-      'set_precision' => 1,
584
-      'precision' => '2',
585
-      'decimal' => '.',
586
-      'separator' => ',',
587
-      'format_plural' => 0,
588
-      'format_plural_singular' => '1',
589
-      'format_plural_plural' => '@count',
590
-      'prefix' => '',
591
-      'suffix' => '',
592
-      'exclude' => 0,
593
-      'id' => 'elapsed_time',
594
-      'table' => 'result',
595
-      'field' => 'elapsed_time',
596
-      'relationship' => 'none',
578
+        ),
579
+        'empty' => '',
580
+        'hide_empty' => 0,
581
+        'empty_zero' => 0,
582
+        'hide_alter_empty' => 1,
583
+        'set_precision' => 1,
584
+        'precision' => '2',
585
+        'decimal' => '.',
586
+        'separator' => ',',
587
+        'format_plural' => 0,
588
+        'format_plural_singular' => '1',
589
+        'format_plural_plural' => '@count',
590
+        'prefix' => '',
591
+        'suffix' => '',
592
+        'exclude' => 0,
593
+        'id' => 'elapsed_time',
594
+        'table' => 'result',
595
+        'field' => 'elapsed_time',
596
+        'relationship' => 'none',
597 597
     ),
598 598
     'cpu_time' => array(
599
-      'label' => 'CPU time',
600
-      'alter' => array(
599
+        'label' => 'CPU time',
600
+        'alter' => array(
601 601
         'alter_text' => 0,
602 602
         'text' => '',
603 603
         'make_link' => 0,
@@ -616,29 +616,29 @@  discard block
 block discarded – undo
616 616
         'ellipsis' => 1,
617 617
         'html' => 0,
618 618
         'strip_tags' => 0,
619
-      ),
620
-      'empty' => '',
621
-      'hide_empty' => 0,
622
-      'empty_zero' => 0,
623
-      'hide_alter_empty' => 1,
624
-      'set_precision' => 1,
625
-      'precision' => '2',
626
-      'decimal' => '.',
627
-      'separator' => ',',
628
-      'format_plural' => 0,
629
-      'format_plural_singular' => '1',
630
-      'format_plural_plural' => '@count',
631
-      'prefix' => '',
632
-      'suffix' => '',
633
-      'exclude' => 0,
634
-      'id' => 'cpu_time',
635
-      'table' => 'result',
636
-      'field' => 'cpu_time',
637
-      'relationship' => 'none',
619
+        ),
620
+        'empty' => '',
621
+        'hide_empty' => 0,
622
+        'empty_zero' => 0,
623
+        'hide_alter_empty' => 1,
624
+        'set_precision' => 1,
625
+        'precision' => '2',
626
+        'decimal' => '.',
627
+        'separator' => ',',
628
+        'format_plural' => 0,
629
+        'format_plural_singular' => '1',
630
+        'format_plural_plural' => '@count',
631
+        'prefix' => '',
632
+        'suffix' => '',
633
+        'exclude' => 0,
634
+        'id' => 'cpu_time',
635
+        'table' => 'result',
636
+        'field' => 'cpu_time',
637
+        'relationship' => 'none',
638 638
     ),
639 639
     'granted_credit' => array(
640
-      'label' => 'Granted credit',
641
-      'alter' => array(
640
+        'label' => 'Granted credit',
641
+        'alter' => array(
642 642
         'alter_text' => 0,
643 643
         'text' => '',
644 644
         'make_link' => 0,
@@ -655,25 +655,25 @@  discard block
 block discarded – undo
655 655
         'ellipsis' => 1,
656 656
         'html' => 0,
657 657
         'strip_tags' => 0,
658
-      ),
659
-      'empty' => '',
660
-      'hide_empty' => 0,
661
-      'empty_zero' => 0,
662
-      'set_precision' => 1,
663
-      'precision' => '2',
664
-      'decimal' => '.',
665
-      'separator' => ',',
666
-      'prefix' => '',
667
-      'suffix' => '',
668
-      'exclude' => 0,
669
-      'id' => 'granted_credit',
670
-      'table' => 'result',
671
-      'field' => 'granted_credit',
672
-      'relationship' => 'none',
658
+        ),
659
+        'empty' => '',
660
+        'hide_empty' => 0,
661
+        'empty_zero' => 0,
662
+        'set_precision' => 1,
663
+        'precision' => '2',
664
+        'decimal' => '.',
665
+        'separator' => ',',
666
+        'prefix' => '',
667
+        'suffix' => '',
668
+        'exclude' => 0,
669
+        'id' => 'granted_credit',
670
+        'table' => 'result',
671
+        'field' => 'granted_credit',
672
+        'relationship' => 'none',
673 673
     ),
674 674
     'appid' => array(
675
-      'label' => 'Application ID',
676
-      'alter' => array(
675
+        'label' => 'Application ID',
676
+        'alter' => array(
677 677
         'alter_text' => 0,
678 678
         'text' => '',
679 679
         'make_link' => 0,
@@ -692,29 +692,29 @@  discard block
 block discarded – undo
692 692
         'ellipsis' => 1,
693 693
         'html' => 0,
694 694
         'strip_tags' => 0,
695
-      ),
696
-      'empty' => '',
697
-      'hide_empty' => 0,
698
-      'empty_zero' => 0,
699
-      'hide_alter_empty' => 1,
700
-      'set_precision' => FALSE,
701
-      'precision' => 0,
702
-      'decimal' => '.',
703
-      'separator' => '',
704
-      'format_plural' => 0,
705
-      'format_plural_singular' => '1',
706
-      'format_plural_plural' => '@count',
707
-      'prefix' => '',
708
-      'suffix' => '',
709
-      'exclude' => 1,
710
-      'id' => 'appid',
711
-      'table' => 'result',
712
-      'field' => 'appid',
713
-      'relationship' => 'none',
695
+        ),
696
+        'empty' => '',
697
+        'hide_empty' => 0,
698
+        'empty_zero' => 0,
699
+        'hide_alter_empty' => 1,
700
+        'set_precision' => FALSE,
701
+        'precision' => 0,
702
+        'decimal' => '.',
703
+        'separator' => '',
704
+        'format_plural' => 0,
705
+        'format_plural_singular' => '1',
706
+        'format_plural_plural' => '@count',
707
+        'prefix' => '',
708
+        'suffix' => '',
709
+        'exclude' => 1,
710
+        'id' => 'appid',
711
+        'table' => 'result',
712
+        'field' => 'appid',
713
+        'relationship' => 'none',
714 714
     ),
715 715
     'app_version_id' => array(
716
-      'label' => 'Application version',
717
-      'alter' => array(
716
+        'label' => 'Application version',
717
+        'alter' => array(
718 718
         'alter_text' => 0,
719 719
         'text' => '',
720 720
         'make_link' => 0,
@@ -731,25 +731,25 @@  discard block
 block discarded – undo
731 731
         'ellipsis' => 1,
732 732
         'html' => 0,
733 733
         'strip_tags' => 0,
734
-      ),
735
-      'empty' => '',
736
-      'hide_empty' => 0,
737
-      'empty_zero' => 0,
738
-      'set_precision' => FALSE,
739
-      'precision' => 0,
740
-      'decimal' => '.',
741
-      'separator' => '',
742
-      'prefix' => '',
743
-      'suffix' => '',
744
-      'exclude' => 1,
745
-      'id' => 'app_version_id',
746
-      'table' => 'result',
747
-      'field' => 'app_version_id',
748
-      'relationship' => 'none',
734
+        ),
735
+        'empty' => '',
736
+        'hide_empty' => 0,
737
+        'empty_zero' => 0,
738
+        'set_precision' => FALSE,
739
+        'precision' => 0,
740
+        'decimal' => '.',
741
+        'separator' => '',
742
+        'prefix' => '',
743
+        'suffix' => '',
744
+        'exclude' => 1,
745
+        'id' => 'app_version_id',
746
+        'table' => 'result',
747
+        'field' => 'app_version_id',
748
+        'relationship' => 'none',
749 749
     ),
750 750
     'phpcode_2' => array(
751
-      'label' => 'Application',
752
-      'alter' => array(
751
+        'label' => 'Application',
752
+        'alter' => array(
753 753
         'alter_text' => 0,
754 754
         'text' => '',
755 755
         'make_link' => 0,
@@ -768,48 +768,48 @@  discard block
 block discarded – undo
768 768
         'ellipsis' => 1,
769 769
         'html' => 0,
770 770
         'strip_tags' => 0,
771
-      ),
772
-      'empty' => '',
773
-      'hide_empty' => 0,
774
-      'empty_zero' => 0,
775
-      'hide_alter_empty' => 1,
776
-      'value' => '<?php
771
+        ),
772
+        'empty' => '',
773
+        'hide_empty' => 0,
774
+        'empty_zero' => 0,
775
+        'hide_alter_empty' => 1,
776
+        'value' => '<?php
777 777
   require_boinc(\'result\');
778 778
   $result = new stdClass();
779 779
   $result->appid = $data->result_appid;
780 780
   $result->app_version_id = $data->result_app_version_id;
781 781
   return app_version_string($result);
782 782
 ?>',
783
-      'exclude' => 0,
784
-      'id' => 'phpcode_2',
785
-      'table' => 'customfield',
786
-      'field' => 'phpcode',
787
-      'override' => array(
783
+        'exclude' => 0,
784
+        'id' => 'phpcode_2',
785
+        'table' => 'customfield',
786
+        'field' => 'phpcode',
787
+        'override' => array(
788 788
         'button' => 'Override',
789
-      ),
790
-      'relationship' => 'none',
789
+        ),
790
+        'relationship' => 'none',
791 791
     ),
792
-  ));
793
-  $handler->override_option('arguments', array(
792
+    ));
793
+    $handler->override_option('arguments', array(
794 794
     'userid' => array(
795
-      'default_action' => 'default',
796
-      'style_plugin' => 'default_summary',
797
-      'style_options' => array(),
798
-      'wildcard' => 'all',
799
-      'wildcard_substitution' => 'All',
800
-      'title' => '',
801
-      'breadcrumb' => '',
802
-      'default_argument_type' => 'current_user',
803
-      'default_argument' => '',
804
-      'validate_type' => 'php',
805
-      'validate_fail' => 'empty',
806
-      'break_phrase' => 0,
807
-      'not' => 0,
808
-      'id' => 'userid',
809
-      'table' => 'result',
810
-      'field' => 'userid',
811
-      'validate_user_argument_type' => 'uid',
812
-      'validate_user_roles' => array(
795
+        'default_action' => 'default',
796
+        'style_plugin' => 'default_summary',
797
+        'style_options' => array(),
798
+        'wildcard' => 'all',
799
+        'wildcard_substitution' => 'All',
800
+        'title' => '',
801
+        'breadcrumb' => '',
802
+        'default_argument_type' => 'current_user',
803
+        'default_argument' => '',
804
+        'validate_type' => 'php',
805
+        'validate_fail' => 'empty',
806
+        'break_phrase' => 0,
807
+        'not' => 0,
808
+        'id' => 'userid',
809
+        'table' => 'result',
810
+        'field' => 'userid',
811
+        'validate_user_argument_type' => 'uid',
812
+        'validate_user_roles' => array(
813 813
         2 => 0,
814 814
         3519698132 => 0,
815 815
         1110965548 => 0,
@@ -818,10 +818,10 @@  discard block
 block discarded – undo
818 818
         268174006 => 0,
819 819
         1271379760 => 0,
820 820
         933038561 => 0,
821
-      ),
822
-      'me_redirect' => 0,
823
-      'me_validate_user_argument_type' => 'uid',
824
-      'me_validate_user_roles' => array(
821
+        ),
822
+        'me_redirect' => 0,
823
+        'me_validate_user_argument_type' => 'uid',
824
+        'me_validate_user_roles' => array(
825 825
         2 => 0,
826 826
         3519698132 => 0,
827 827
         1110965548 => 0,
@@ -830,20 +830,20 @@  discard block
 block discarded – undo
830 830
         268174006 => 0,
831 831
         1271379760 => 0,
832 832
         933038561 => 0,
833
-      ),
834
-      'relationship' => 'none',
835
-      'default_options_div_prefix' => '',
836
-      'default_taxonomy_tid_term_page' => 0,
837
-      'default_taxonomy_tid_node' => 0,
838
-      'default_taxonomy_tid_limit' => 0,
839
-      'default_taxonomy_tid_vids' => array(
833
+        ),
834
+        'relationship' => 'none',
835
+        'default_options_div_prefix' => '',
836
+        'default_taxonomy_tid_term_page' => 0,
837
+        'default_taxonomy_tid_node' => 0,
838
+        'default_taxonomy_tid_limit' => 0,
839
+        'default_taxonomy_tid_vids' => array(
840 840
         1 => 0,
841 841
         2 => 0,
842
-      ),
843
-      'default_argument_user' => 0,
844
-      'default_argument_fixed' => '',
845
-      'default_argument_php' => '',
846
-      'validate_argument_node_type' => array(
842
+        ),
843
+        'default_argument_user' => 0,
844
+        'default_argument_fixed' => '',
845
+        'default_argument_php' => '',
846
+        'validate_argument_node_type' => array(
847 847
         'page' => 0,
848 848
         'news' => 0,
849 849
         'team' => 0,
@@ -852,709 +852,709 @@  discard block
 block discarded – undo
852 852
         'forum' => 0,
853 853
         'panel' => 0,
854 854
         'story' => 0,
855
-      ),
856
-      'validate_argument_node_access' => 0,
857
-      'validate_argument_nid_type' => 'nid',
858
-      'validate_argument_vocabulary' => array(
855
+        ),
856
+        'validate_argument_node_access' => 0,
857
+        'validate_argument_nid_type' => 'nid',
858
+        'validate_argument_vocabulary' => array(
859 859
         1 => 0,
860 860
         2 => 0,
861
-      ),
862
-      'validate_argument_type' => 'tid',
863
-      'validate_argument_transform' => 0,
864
-      'validate_user_restrict_roles' => 0,
865
-      'validate_argument_node_flag_name' => '*relationship*',
866
-      'validate_argument_node_flag_test' => 'flaggable',
867
-      'validate_argument_node_flag_id_type' => 'id',
868
-      'validate_argument_user_flag_name' => '*relationship*',
869
-      'validate_argument_user_flag_test' => 'flaggable',
870
-      'validate_argument_user_flag_id_type' => 'id',
871
-      'validate_argument_php' => 'return is_current_boinc_user($argument);',
872
-      'me_validate_user_restrict_roles' => 0,
873
-      'override' => array(
861
+        ),
862
+        'validate_argument_type' => 'tid',
863
+        'validate_argument_transform' => 0,
864
+        'validate_user_restrict_roles' => 0,
865
+        'validate_argument_node_flag_name' => '*relationship*',
866
+        'validate_argument_node_flag_test' => 'flaggable',
867
+        'validate_argument_node_flag_id_type' => 'id',
868
+        'validate_argument_user_flag_name' => '*relationship*',
869
+        'validate_argument_user_flag_test' => 'flaggable',
870
+        'validate_argument_user_flag_id_type' => 'id',
871
+        'validate_argument_php' => 'return is_current_boinc_user($argument);',
872
+        'me_validate_user_restrict_roles' => 0,
873
+        'override' => array(
874 874
         'button' => 'Override',
875
-      ),
875
+        ),
876 876
     ),
877
-  ));
878
-  $handler->override_option('access', array(
877
+    ));
878
+    $handler->override_option('access', array(
879 879
     'type' => 'none',
880
-  ));
881
-  $handler->override_option('cache', array(
880
+    ));
881
+    $handler->override_option('cache', array(
882 882
     'type' => 'none',
883
-  ));
884
-  $handler->override_option('empty', '<?php
883
+    ));
884
+    $handler->override_option('empty', '<?php
885 885
   if (!user_is_logged_in()) {
886 886
     drupal_goto(\'user/login\', drupal_get_destination());
887 887
   }
888 888
 ?>');
889
-  $handler->override_option('empty_format', '3');
890
-  $handler->override_option('items_per_page', 20);
891
-  $handler->override_option('use_pager', '1');
892
-  $handler->override_option('style_plugin', 'table');
893
-  $handler->override_option('style_options', array(
889
+    $handler->override_option('empty_format', '3');
890
+    $handler->override_option('items_per_page', 20);
891
+    $handler->override_option('use_pager', '1');
892
+    $handler->override_option('style_plugin', 'table');
893
+    $handler->override_option('style_options', array(
894 894
     'grouping' => '',
895 895
     'override' => 1,
896 896
     'sticky' => 1,
897 897
     'order' => 'desc',
898 898
     'summary' => '',
899 899
     'columns' => array(
900
-      'id' => 'id',
901
-      'workunitid' => 'workunitid',
902
-      'hostid' => 'hostid',
903
-      'sent_time' => 'sent_time',
904
-      'received_time' => 'received_time',
905
-      'report_deadline' => 'report_deadline',
906
-      'phpcode_3' => 'phpcode_3',
907
-      'phpcode' => 'phpcode',
908
-      'server_state' => 'server_state',
909
-      'outcome' => 'outcome',
910
-      'client_state' => 'client_state',
911
-      'validate_state' => 'validate_state',
912
-      'exit_status' => 'exit_status',
913
-      'phpcode_1' => 'phpcode_1',
914
-      'elapsed_time' => 'elapsed_time',
915
-      'cpu_time' => 'cpu_time',
916
-      'claimed_credit_1' => 'claimed_credit_1',
917
-      'granted_credit' => 'granted_credit',
918
-      'app_version_id' => 'app_version_id',
919
-      'phpcode_2' => 'phpcode_2',
900
+        'id' => 'id',
901
+        'workunitid' => 'workunitid',
902
+        'hostid' => 'hostid',
903
+        'sent_time' => 'sent_time',
904
+        'received_time' => 'received_time',
905
+        'report_deadline' => 'report_deadline',
906
+        'phpcode_3' => 'phpcode_3',
907
+        'phpcode' => 'phpcode',
908
+        'server_state' => 'server_state',
909
+        'outcome' => 'outcome',
910
+        'client_state' => 'client_state',
911
+        'validate_state' => 'validate_state',
912
+        'exit_status' => 'exit_status',
913
+        'phpcode_1' => 'phpcode_1',
914
+        'elapsed_time' => 'elapsed_time',
915
+        'cpu_time' => 'cpu_time',
916
+        'claimed_credit_1' => 'claimed_credit_1',
917
+        'granted_credit' => 'granted_credit',
918
+        'app_version_id' => 'app_version_id',
919
+        'phpcode_2' => 'phpcode_2',
920 920
     ),
921 921
     'info' => array(
922
-      'id' => array(
922
+        'id' => array(
923 923
         'sortable' => 1,
924 924
         'separator' => '',
925
-      ),
926
-      'workunitid' => array(
925
+        ),
926
+        'workunitid' => array(
927 927
         'sortable' => 1,
928 928
         'separator' => '',
929
-      ),
930
-      'hostid' => array(
929
+        ),
930
+        'hostid' => array(
931 931
         'sortable' => 1,
932 932
         'separator' => '',
933
-      ),
934
-      'sent_time' => array(
933
+        ),
934
+        'sent_time' => array(
935 935
         'sortable' => 1,
936 936
         'separator' => '',
937
-      ),
938
-      'received_time' => array(
937
+        ),
938
+        'received_time' => array(
939 939
         'sortable' => 1,
940 940
         'separator' => '',
941
-      ),
942
-      'report_deadline' => array(
941
+        ),
942
+        'report_deadline' => array(
943 943
         'sortable' => 1,
944 944
         'separator' => '',
945
-      ),
946
-      'phpcode_3' => array(
945
+        ),
946
+        'phpcode_3' => array(
947 947
         'separator' => '',
948
-      ),
949
-      'phpcode' => array(
948
+        ),
949
+        'phpcode' => array(
950 950
         'separator' => '',
951
-      ),
952
-      'server_state' => array(
951
+        ),
952
+        'server_state' => array(
953 953
         'sortable' => 0,
954 954
         'separator' => '',
955
-      ),
956
-      'outcome' => array(
955
+        ),
956
+        'outcome' => array(
957 957
         'sortable' => 0,
958 958
         'separator' => '',
959
-      ),
960
-      'client_state' => array(
959
+        ),
960
+        'client_state' => array(
961 961
         'sortable' => 0,
962 962
         'separator' => '',
963
-      ),
964
-      'validate_state' => array(
963
+        ),
964
+        'validate_state' => array(
965 965
         'sortable' => 0,
966 966
         'separator' => '',
967
-      ),
968
-      'exit_status' => array(
967
+        ),
968
+        'exit_status' => array(
969 969
         'sortable' => 0,
970 970
         'separator' => '',
971
-      ),
972
-      'phpcode_1' => array(
971
+        ),
972
+        'phpcode_1' => array(
973 973
         'separator' => '',
974
-      ),
975
-      'elapsed_time' => array(
974
+        ),
975
+        'elapsed_time' => array(
976 976
         'sortable' => 1,
977 977
         'separator' => '',
978
-      ),
979
-      'cpu_time' => array(
978
+        ),
979
+        'cpu_time' => array(
980 980
         'sortable' => 1,
981 981
         'separator' => '',
982
-      ),
983
-      'claimed_credit_1' => array(
982
+        ),
983
+        'claimed_credit_1' => array(
984 984
         'sortable' => 1,
985 985
         'separator' => '',
986
-      ),
987
-      'granted_credit' => array(
986
+        ),
987
+        'granted_credit' => array(
988 988
         'sortable' => 1,
989 989
         'separator' => '',
990
-      ),
991
-      'app_version_id' => array(
990
+        ),
991
+        'app_version_id' => array(
992 992
         'sortable' => 1,
993 993
         'separator' => '',
994
-      ),
995
-      'phpcode_2' => array(
994
+        ),
995
+        'phpcode_2' => array(
996 996
         'separator' => '',
997
-      ),
997
+        ),
998 998
     ),
999 999
     'default' => 'id',
1000
-  ));
1001
-  $handler = $view->new_display('page', 'All tasks', 'page_1');
1002
-  $handler->override_option('path', 'account/tasks/all');
1003
-  $handler->override_option('menu', array(
1000
+    ));
1001
+    $handler = $view->new_display('page', 'All tasks', 'page_1');
1002
+    $handler->override_option('path', 'account/tasks/all');
1003
+    $handler->override_option('menu', array(
1004 1004
     'type' => 'default tab',
1005 1005
     'title' => 'All tasks',
1006 1006
     'description' => 'Show all tasks associated with the account',
1007 1007
     'weight' => '0',
1008 1008
     'name' => 'navigation',
1009
-  ));
1010
-  $handler->override_option('tab_options', array(
1009
+    ));
1010
+    $handler->override_option('tab_options', array(
1011 1011
     'type' => 'normal',
1012 1012
     'title' => 'Tasks',
1013 1013
     'description' => 'Show all tasks',
1014 1014
     'weight' => '0',
1015 1015
     'name' => 'navigation',
1016
-  ));
1017
-  $handler = $view->new_display('page', 'Error', 'page_2');
1018
-  $handler->override_option('filters', array(
1016
+    ));
1017
+    $handler = $view->new_display('page', 'Error', 'page_2');
1018
+    $handler->override_option('filters', array(
1019 1019
     'server_state' => array(
1020
-      'operator' => '=',
1021
-      'value' => array(
1020
+        'operator' => '=',
1021
+        'value' => array(
1022 1022
         'value' => '5',
1023 1023
         'min' => '',
1024 1024
         'max' => '',
1025
-      ),
1026
-      'group' => '0',
1027
-      'exposed' => FALSE,
1028
-      'expose' => array(
1025
+        ),
1026
+        'group' => '0',
1027
+        'exposed' => FALSE,
1028
+        'expose' => array(
1029 1029
         'operator' => FALSE,
1030 1030
         'label' => '',
1031
-      ),
1032
-      'id' => 'server_state',
1033
-      'table' => 'result',
1034
-      'field' => 'server_state',
1035
-      'override' => array(
1031
+        ),
1032
+        'id' => 'server_state',
1033
+        'table' => 'result',
1034
+        'field' => 'server_state',
1035
+        'override' => array(
1036 1036
         'button' => 'Use default',
1037
-      ),
1038
-      'relationship' => 'none',
1037
+        ),
1038
+        'relationship' => 'none',
1039 1039
     ),
1040 1040
     'outcome' => array(
1041
-      'operator' => '>=',
1042
-      'value' => array(
1041
+        'operator' => '>=',
1042
+        'value' => array(
1043 1043
         'value' => '3',
1044 1044
         'min' => '',
1045 1045
         'max' => '',
1046
-      ),
1047
-      'group' => '0',
1048
-      'exposed' => FALSE,
1049
-      'expose' => array(
1046
+        ),
1047
+        'group' => '0',
1048
+        'exposed' => FALSE,
1049
+        'expose' => array(
1050 1050
         'operator' => FALSE,
1051 1051
         'label' => '',
1052
-      ),
1053
-      'id' => 'outcome',
1054
-      'table' => 'result',
1055
-      'field' => 'outcome',
1056
-      'override' => array(
1052
+        ),
1053
+        'id' => 'outcome',
1054
+        'table' => 'result',
1055
+        'field' => 'outcome',
1056
+        'override' => array(
1057 1057
         'button' => 'Use default',
1058
-      ),
1059
-      'relationship' => 'none',
1058
+        ),
1059
+        'relationship' => 'none',
1060 1060
     ),
1061 1061
     'outcome_1' => array(
1062
-      'operator' => 'not between',
1063
-      'value' => array(
1062
+        'operator' => 'not between',
1063
+        'value' => array(
1064 1064
         'value' => '',
1065 1065
         'min' => '4',
1066 1066
         'max' => '7',
1067
-      ),
1068
-      'group' => '0',
1069
-      'exposed' => FALSE,
1070
-      'expose' => array(
1067
+        ),
1068
+        'group' => '0',
1069
+        'exposed' => FALSE,
1070
+        'expose' => array(
1071 1071
         'operator' => FALSE,
1072 1072
         'label' => '',
1073
-      ),
1074
-      'id' => 'outcome_1',
1075
-      'table' => 'result',
1076
-      'field' => 'outcome',
1077
-      'override' => array(
1073
+        ),
1074
+        'id' => 'outcome_1',
1075
+        'table' => 'result',
1076
+        'field' => 'outcome',
1077
+        'override' => array(
1078 1078
         'button' => 'Use default',
1079
-      ),
1080
-      'relationship' => 'none',
1079
+        ),
1080
+        'relationship' => 'none',
1081 1081
     ),
1082 1082
     'outcome_2' => array(
1083
-      'operator' => '<=',
1084
-      'value' => array(
1083
+        'operator' => '<=',
1084
+        'value' => array(
1085 1085
         'value' => '7',
1086 1086
         'min' => '',
1087 1087
         'max' => '',
1088
-      ),
1089
-      'group' => '0',
1090
-      'exposed' => FALSE,
1091
-      'expose' => array(
1088
+        ),
1089
+        'group' => '0',
1090
+        'exposed' => FALSE,
1091
+        'expose' => array(
1092 1092
         'operator' => FALSE,
1093 1093
         'label' => '',
1094
-      ),
1095
-      'id' => 'outcome_2',
1096
-      'table' => 'result',
1097
-      'field' => 'outcome',
1098
-      'override' => array(
1094
+        ),
1095
+        'id' => 'outcome_2',
1096
+        'table' => 'result',
1097
+        'field' => 'outcome',
1098
+        'override' => array(
1099 1099
         'button' => 'Use default',
1100
-      ),
1101
-      'relationship' => 'none',
1100
+        ),
1101
+        'relationship' => 'none',
1102 1102
     ),
1103
-  ));
1104
-  $handler->override_option('path', 'account/tasks/error');
1105
-  $handler->override_option('menu', array(
1103
+    ));
1104
+    $handler->override_option('path', 'account/tasks/error');
1105
+    $handler->override_option('menu', array(
1106 1106
     'type' => 'tab',
1107 1107
     'title' => 'Error',
1108 1108
     'description' => 'Show tasks with errors associated with the account',
1109 1109
     'weight' => '5',
1110 1110
     'name' => 'navigation',
1111
-  ));
1112
-  $handler->override_option('tab_options', array(
1111
+    ));
1112
+    $handler->override_option('tab_options', array(
1113 1113
     'type' => 'none',
1114 1114
     'title' => '',
1115 1115
     'description' => '',
1116 1116
     'weight' => 0,
1117 1117
     'name' => 'navigation',
1118
-  ));
1119
-  $handler = $view->new_display('page', 'In progress', 'page_3');
1120
-  $handler->override_option('filters', array(
1118
+    ));
1119
+    $handler = $view->new_display('page', 'In progress', 'page_3');
1120
+    $handler->override_option('filters', array(
1121 1121
     'server_state' => array(
1122
-      'operator' => '=',
1123
-      'value' => array(
1122
+        'operator' => '=',
1123
+        'value' => array(
1124 1124
         'value' => '4',
1125 1125
         'min' => '',
1126 1126
         'max' => '',
1127
-      ),
1128
-      'group' => '0',
1129
-      'exposed' => FALSE,
1130
-      'expose' => array(
1127
+        ),
1128
+        'group' => '0',
1129
+        'exposed' => FALSE,
1130
+        'expose' => array(
1131 1131
         'operator' => FALSE,
1132 1132
         'label' => '',
1133
-      ),
1134
-      'id' => 'server_state',
1135
-      'table' => 'result',
1136
-      'field' => 'server_state',
1137
-      'override' => array(
1133
+        ),
1134
+        'id' => 'server_state',
1135
+        'table' => 'result',
1136
+        'field' => 'server_state',
1137
+        'override' => array(
1138 1138
         'button' => 'Use default',
1139
-      ),
1140
-      'relationship' => 'none',
1139
+        ),
1140
+        'relationship' => 'none',
1141 1141
     ),
1142
-  ));
1143
-  $handler->override_option('path', 'account/tasks/active');
1144
-  $handler->override_option('menu', array(
1142
+    ));
1143
+    $handler->override_option('path', 'account/tasks/active');
1144
+    $handler->override_option('menu', array(
1145 1145
     'type' => 'tab',
1146 1146
     'title' => 'In progress',
1147 1147
     'description' => 'Show tasks in progress associated with the account',
1148 1148
     'weight' => '1',
1149 1149
     'name' => 'navigation',
1150
-  ));
1151
-  $handler->override_option('tab_options', array(
1150
+    ));
1151
+    $handler->override_option('tab_options', array(
1152 1152
     'type' => 'none',
1153 1153
     'title' => '',
1154 1154
     'description' => '',
1155 1155
     'weight' => 0,
1156 1156
     'name' => 'navigation',
1157
-  ));
1158
-  $handler = $view->new_display('page', 'Invalidated', 'page_4');
1159
-  $handler->override_option('filters', array(
1157
+    ));
1158
+    $handler = $view->new_display('page', 'Invalidated', 'page_4');
1159
+    $handler->override_option('filters', array(
1160 1160
     'server_state' => array(
1161
-      'operator' => '=',
1162
-      'value' => array(
1161
+        'operator' => '=',
1162
+        'value' => array(
1163 1163
         'value' => '5',
1164 1164
         'min' => '',
1165 1165
         'max' => '',
1166
-      ),
1167
-      'group' => '0',
1168
-      'exposed' => FALSE,
1169
-      'expose' => array(
1166
+        ),
1167
+        'group' => '0',
1168
+        'exposed' => FALSE,
1169
+        'expose' => array(
1170 1170
         'operator' => FALSE,
1171 1171
         'label' => '',
1172
-      ),
1173
-      'id' => 'server_state',
1174
-      'table' => 'result',
1175
-      'field' => 'server_state',
1176
-      'override' => array(
1172
+        ),
1173
+        'id' => 'server_state',
1174
+        'table' => 'result',
1175
+        'field' => 'server_state',
1176
+        'override' => array(
1177 1177
         'button' => 'Use default',
1178
-      ),
1179
-      'relationship' => 'none',
1178
+        ),
1179
+        'relationship' => 'none',
1180 1180
     ),
1181 1181
     'views_or_begin_2' => array(
1182
-      'id' => 'views_or_begin_2',
1183
-      'table' => 'views_or',
1184
-      'field' => 'views_or_begin',
1182
+        'id' => 'views_or_begin_2',
1183
+        'table' => 'views_or',
1184
+        'field' => 'views_or_begin',
1185 1185
     ),
1186 1186
     'outcome' => array(
1187
-      'operator' => '=',
1188
-      'value' => array(
1187
+        'operator' => '=',
1188
+        'value' => array(
1189 1189
         'value' => '6',
1190 1190
         'min' => '',
1191 1191
         'max' => '',
1192
-      ),
1193
-      'group' => '0',
1194
-      'exposed' => FALSE,
1195
-      'expose' => array(
1192
+        ),
1193
+        'group' => '0',
1194
+        'exposed' => FALSE,
1195
+        'expose' => array(
1196 1196
         'operator' => FALSE,
1197 1197
         'label' => '',
1198
-      ),
1199
-      'id' => 'outcome',
1200
-      'table' => 'result',
1201
-      'field' => 'outcome',
1202
-      'override' => array(
1198
+        ),
1199
+        'id' => 'outcome',
1200
+        'table' => 'result',
1201
+        'field' => 'outcome',
1202
+        'override' => array(
1203 1203
         'button' => 'Use default',
1204
-      ),
1205
-      'relationship' => 'none',
1204
+        ),
1205
+        'relationship' => 'none',
1206 1206
     ),
1207 1207
     'views_or_next_5' => array(
1208
-      'id' => 'views_or_next_5',
1209
-      'table' => 'views_or',
1210
-      'field' => 'views_or_next',
1208
+        'id' => 'views_or_next_5',
1209
+        'table' => 'views_or',
1210
+        'field' => 'views_or_next',
1211 1211
     ),
1212 1212
     'outcome_1' => array(
1213
-      'operator' => '=',
1214
-      'value' => array(
1213
+        'operator' => '=',
1214
+        'value' => array(
1215 1215
         'value' => '1',
1216 1216
         'min' => '',
1217 1217
         'max' => '',
1218
-      ),
1219
-      'group' => '0',
1220
-      'exposed' => FALSE,
1221
-      'expose' => array(
1218
+        ),
1219
+        'group' => '0',
1220
+        'exposed' => FALSE,
1221
+        'expose' => array(
1222 1222
         'operator' => FALSE,
1223 1223
         'label' => '',
1224
-      ),
1225
-      'id' => 'outcome_1',
1226
-      'table' => 'result',
1227
-      'field' => 'outcome',
1228
-      'override' => array(
1224
+        ),
1225
+        'id' => 'outcome_1',
1226
+        'table' => 'result',
1227
+        'field' => 'outcome',
1228
+        'override' => array(
1229 1229
         'button' => 'Use default',
1230
-      ),
1231
-      'relationship' => 'none',
1230
+        ),
1231
+        'relationship' => 'none',
1232 1232
     ),
1233 1233
     'views_or_begin_3' => array(
1234
-      'id' => 'views_or_begin_3',
1235
-      'table' => 'views_or',
1236
-      'field' => 'views_or_begin',
1234
+        'id' => 'views_or_begin_3',
1235
+        'table' => 'views_or',
1236
+        'field' => 'views_or_begin',
1237 1237
     ),
1238 1238
     'validate_state' => array(
1239
-      'operator' => '=',
1240
-      'value' => array(
1239
+        'operator' => '=',
1240
+        'value' => array(
1241 1241
         'value' => '2',
1242 1242
         'min' => '',
1243 1243
         'max' => '',
1244
-      ),
1245
-      'group' => '0',
1246
-      'exposed' => FALSE,
1247
-      'expose' => array(
1244
+        ),
1245
+        'group' => '0',
1246
+        'exposed' => FALSE,
1247
+        'expose' => array(
1248 1248
         'operator' => FALSE,
1249 1249
         'label' => '',
1250
-      ),
1251
-      'id' => 'validate_state',
1252
-      'table' => 'result',
1253
-      'field' => 'validate_state',
1254
-      'override' => array(
1250
+        ),
1251
+        'id' => 'validate_state',
1252
+        'table' => 'result',
1253
+        'field' => 'validate_state',
1254
+        'override' => array(
1255 1255
         'button' => 'Use default',
1256
-      ),
1257
-      'relationship' => 'none',
1256
+        ),
1257
+        'relationship' => 'none',
1258 1258
     ),
1259 1259
     'views_or_next_3' => array(
1260
-      'id' => 'views_or_next_3',
1261
-      'table' => 'views_or',
1262
-      'field' => 'views_or_next',
1260
+        'id' => 'views_or_next_3',
1261
+        'table' => 'views_or',
1262
+        'field' => 'views_or_next',
1263 1263
     ),
1264 1264
     'validate_state_1' => array(
1265
-      'operator' => '=',
1266
-      'value' => array(
1265
+        'operator' => '=',
1266
+        'value' => array(
1267 1267
         'value' => '3',
1268 1268
         'min' => '',
1269 1269
         'max' => '',
1270
-      ),
1271
-      'group' => '0',
1272
-      'exposed' => FALSE,
1273
-      'expose' => array(
1270
+        ),
1271
+        'group' => '0',
1272
+        'exposed' => FALSE,
1273
+        'expose' => array(
1274 1274
         'operator' => FALSE,
1275 1275
         'label' => '',
1276
-      ),
1277
-      'id' => 'validate_state_1',
1278
-      'table' => 'result',
1279
-      'field' => 'validate_state',
1280
-      'override' => array(
1276
+        ),
1277
+        'id' => 'validate_state_1',
1278
+        'table' => 'result',
1279
+        'field' => 'validate_state',
1280
+        'override' => array(
1281 1281
         'button' => 'Use default',
1282
-      ),
1283
-      'relationship' => 'none',
1282
+        ),
1283
+        'relationship' => 'none',
1284 1284
     ),
1285 1285
     'views_or_next_4' => array(
1286
-      'id' => 'views_or_next_4',
1287
-      'table' => 'views_or',
1288
-      'field' => 'views_or_next',
1286
+        'id' => 'views_or_next_4',
1287
+        'table' => 'views_or',
1288
+        'field' => 'views_or_next',
1289 1289
     ),
1290 1290
     'validate_state_2' => array(
1291
-      'operator' => '=',
1292
-      'value' => array(
1291
+        'operator' => '=',
1292
+        'value' => array(
1293 1293
         'value' => '5',
1294 1294
         'min' => '',
1295 1295
         'max' => '',
1296
-      ),
1297
-      'group' => '0',
1298
-      'exposed' => FALSE,
1299
-      'expose' => array(
1296
+        ),
1297
+        'group' => '0',
1298
+        'exposed' => FALSE,
1299
+        'expose' => array(
1300 1300
         'operator' => FALSE,
1301 1301
         'label' => '',
1302
-      ),
1303
-      'id' => 'validate_state_2',
1304
-      'table' => 'result',
1305
-      'field' => 'validate_state',
1306
-      'override' => array(
1302
+        ),
1303
+        'id' => 'validate_state_2',
1304
+        'table' => 'result',
1305
+        'field' => 'validate_state',
1306
+        'override' => array(
1307 1307
         'button' => 'Use default',
1308
-      ),
1309
-      'relationship' => 'none',
1308
+        ),
1309
+        'relationship' => 'none',
1310 1310
     ),
1311 1311
     'views_or_end_3' => array(
1312
-      'id' => 'views_or_end_3',
1313
-      'table' => 'views_or',
1314
-      'field' => 'views_or_end',
1312
+        'id' => 'views_or_end_3',
1313
+        'table' => 'views_or',
1314
+        'field' => 'views_or_end',
1315 1315
     ),
1316 1316
     'views_or_end_2' => array(
1317
-      'id' => 'views_or_end_2',
1318
-      'table' => 'views_or',
1319
-      'field' => 'views_or_end',
1317
+        'id' => 'views_or_end_2',
1318
+        'table' => 'views_or',
1319
+        'field' => 'views_or_end',
1320 1320
     ),
1321
-  ));
1322
-  $handler->override_option('path', 'account/tasks/invalid');
1323
-  $handler->override_option('menu', array(
1321
+    ));
1322
+    $handler->override_option('path', 'account/tasks/invalid');
1323
+    $handler->override_option('menu', array(
1324 1324
     'type' => 'tab',
1325 1325
     'title' => 'Invalid',
1326 1326
     'description' => 'Show invalidated tasks associated with the account',
1327 1327
     'weight' => '4',
1328 1328
     'name' => 'navigation',
1329
-  ));
1330
-  $handler->override_option('tab_options', array(
1329
+    ));
1330
+    $handler->override_option('tab_options', array(
1331 1331
     'type' => 'none',
1332 1332
     'title' => '',
1333 1333
     'description' => '',
1334 1334
     'weight' => 0,
1335 1335
     'name' => 'navigation',
1336
-  ));
1337
-  $handler = $view->new_display('page', 'Pending', 'page_5');
1338
-  $handler->override_option('filters', array(
1336
+    ));
1337
+    $handler = $view->new_display('page', 'Pending', 'page_5');
1338
+    $handler->override_option('filters', array(
1339 1339
     'server_state' => array(
1340
-      'operator' => '=',
1341
-      'value' => array(
1340
+        'operator' => '=',
1341
+        'value' => array(
1342 1342
         'value' => '5',
1343 1343
         'min' => '',
1344 1344
         'max' => '',
1345
-      ),
1346
-      'group' => '0',
1347
-      'exposed' => FALSE,
1348
-      'expose' => array(
1345
+        ),
1346
+        'group' => '0',
1347
+        'exposed' => FALSE,
1348
+        'expose' => array(
1349 1349
         'operator' => FALSE,
1350 1350
         'label' => '',
1351
-      ),
1352
-      'id' => 'server_state',
1353
-      'table' => 'result',
1354
-      'field' => 'server_state',
1355
-      'override' => array(
1351
+        ),
1352
+        'id' => 'server_state',
1353
+        'table' => 'result',
1354
+        'field' => 'server_state',
1355
+        'override' => array(
1356 1356
         'button' => 'Use default',
1357
-      ),
1358
-      'relationship' => 'none',
1357
+        ),
1358
+        'relationship' => 'none',
1359 1359
     ),
1360 1360
     'outcome' => array(
1361
-      'operator' => '=',
1362
-      'value' => array(
1361
+        'operator' => '=',
1362
+        'value' => array(
1363 1363
         'value' => '1',
1364 1364
         'min' => '',
1365 1365
         'max' => '',
1366
-      ),
1367
-      'group' => '0',
1368
-      'exposed' => FALSE,
1369
-      'expose' => array(
1366
+        ),
1367
+        'group' => '0',
1368
+        'exposed' => FALSE,
1369
+        'expose' => array(
1370 1370
         'operator' => FALSE,
1371 1371
         'label' => '',
1372
-      ),
1373
-      'id' => 'outcome',
1374
-      'table' => 'result',
1375
-      'field' => 'outcome',
1376
-      'override' => array(
1372
+        ),
1373
+        'id' => 'outcome',
1374
+        'table' => 'result',
1375
+        'field' => 'outcome',
1376
+        'override' => array(
1377 1377
         'button' => 'Use default',
1378
-      ),
1379
-      'relationship' => 'none',
1378
+        ),
1379
+        'relationship' => 'none',
1380 1380
     ),
1381 1381
     'validate_state' => array(
1382
-      'operator' => '>=',
1383
-      'value' => array(
1382
+        'operator' => '>=',
1383
+        'value' => array(
1384 1384
         'value' => '0',
1385 1385
         'min' => '',
1386 1386
         'max' => '',
1387
-      ),
1388
-      'group' => '0',
1389
-      'exposed' => FALSE,
1390
-      'expose' => array(
1387
+        ),
1388
+        'group' => '0',
1389
+        'exposed' => FALSE,
1390
+        'expose' => array(
1391 1391
         'operator' => FALSE,
1392 1392
         'label' => '',
1393
-      ),
1394
-      'id' => 'validate_state',
1395
-      'table' => 'result',
1396
-      'field' => 'validate_state',
1397
-      'override' => array(
1393
+        ),
1394
+        'id' => 'validate_state',
1395
+        'table' => 'result',
1396
+        'field' => 'validate_state',
1397
+        'override' => array(
1398 1398
         'button' => 'Use default',
1399
-      ),
1400
-      'relationship' => 'none',
1399
+        ),
1400
+        'relationship' => 'none',
1401 1401
     ),
1402 1402
     'validate_state_1' => array(
1403
-      'operator' => 'not between',
1404
-      'value' => array(
1403
+        'operator' => 'not between',
1404
+        'value' => array(
1405 1405
         'value' => '',
1406 1406
         'min' => '0',
1407 1407
         'max' => '4',
1408
-      ),
1409
-      'group' => '0',
1410
-      'exposed' => FALSE,
1411
-      'expose' => array(
1408
+        ),
1409
+        'group' => '0',
1410
+        'exposed' => FALSE,
1411
+        'expose' => array(
1412 1412
         'operator' => FALSE,
1413 1413
         'label' => '',
1414
-      ),
1415
-      'id' => 'validate_state_1',
1416
-      'table' => 'result',
1417
-      'field' => 'validate_state',
1418
-      'override' => array(
1414
+        ),
1415
+        'id' => 'validate_state_1',
1416
+        'table' => 'result',
1417
+        'field' => 'validate_state',
1418
+        'override' => array(
1419 1419
         'button' => 'Use default',
1420
-      ),
1421
-      'relationship' => 'none',
1420
+        ),
1421
+        'relationship' => 'none',
1422 1422
     ),
1423 1423
     'validate_state_2' => array(
1424
-      'operator' => '<=',
1425
-      'value' => array(
1424
+        'operator' => '<=',
1425
+        'value' => array(
1426 1426
         'value' => '4',
1427 1427
         'min' => '',
1428 1428
         'max' => '',
1429
-      ),
1430
-      'group' => '0',
1431
-      'exposed' => FALSE,
1432
-      'expose' => array(
1429
+        ),
1430
+        'group' => '0',
1431
+        'exposed' => FALSE,
1432
+        'expose' => array(
1433 1433
         'operator' => FALSE,
1434 1434
         'label' => '',
1435
-      ),
1436
-      'id' => 'validate_state_2',
1437
-      'table' => 'result',
1438
-      'field' => 'validate_state',
1439
-      'override' => array(
1435
+        ),
1436
+        'id' => 'validate_state_2',
1437
+        'table' => 'result',
1438
+        'field' => 'validate_state',
1439
+        'override' => array(
1440 1440
         'button' => 'Use default',
1441
-      ),
1442
-      'relationship' => 'none',
1441
+        ),
1442
+        'relationship' => 'none',
1443 1443
     ),
1444
-  ));
1445
-  $handler->override_option('path', 'account/tasks/pending');
1446
-  $handler->override_option('menu', array(
1444
+    ));
1445
+    $handler->override_option('path', 'account/tasks/pending');
1446
+    $handler->override_option('menu', array(
1447 1447
     'type' => 'tab',
1448 1448
     'title' => 'Pending',
1449 1449
     'description' => 'Show tasks associated with the account with results pending',
1450 1450
     'weight' => '2',
1451 1451
     'name' => 'navigation',
1452
-  ));
1453
-  $handler->override_option('tab_options', array(
1452
+    ));
1453
+    $handler->override_option('tab_options', array(
1454 1454
     'type' => 'none',
1455 1455
     'title' => '',
1456 1456
     'description' => '',
1457 1457
     'weight' => 0,
1458 1458
     'name' => 'navigation',
1459
-  ));
1460
-  $handler = $view->new_display('page', 'Validated', 'page_6');
1461
-  $handler->override_option('filters', array(
1459
+    ));
1460
+    $handler = $view->new_display('page', 'Validated', 'page_6');
1461
+    $handler->override_option('filters', array(
1462 1462
     'server_state' => array(
1463
-      'operator' => '=',
1464
-      'value' => array(
1463
+        'operator' => '=',
1464
+        'value' => array(
1465 1465
         'value' => '5',
1466 1466
         'min' => '',
1467 1467
         'max' => '',
1468
-      ),
1469
-      'group' => '0',
1470
-      'exposed' => FALSE,
1471
-      'expose' => array(
1468
+        ),
1469
+        'group' => '0',
1470
+        'exposed' => FALSE,
1471
+        'expose' => array(
1472 1472
         'operator' => FALSE,
1473 1473
         'label' => '',
1474
-      ),
1475
-      'id' => 'server_state',
1476
-      'table' => 'result',
1477
-      'field' => 'server_state',
1478
-      'override' => array(
1474
+        ),
1475
+        'id' => 'server_state',
1476
+        'table' => 'result',
1477
+        'field' => 'server_state',
1478
+        'override' => array(
1479 1479
         'button' => 'Use default',
1480
-      ),
1481
-      'relationship' => 'none',
1480
+        ),
1481
+        'relationship' => 'none',
1482 1482
     ),
1483 1483
     'outcome' => array(
1484
-      'operator' => '=',
1485
-      'value' => array(
1484
+        'operator' => '=',
1485
+        'value' => array(
1486 1486
         'value' => '1',
1487 1487
         'min' => '',
1488 1488
         'max' => '',
1489
-      ),
1490
-      'group' => '0',
1491
-      'exposed' => FALSE,
1492
-      'expose' => array(
1489
+        ),
1490
+        'group' => '0',
1491
+        'exposed' => FALSE,
1492
+        'expose' => array(
1493 1493
         'operator' => FALSE,
1494 1494
         'label' => '',
1495
-      ),
1496
-      'id' => 'outcome',
1497
-      'table' => 'result',
1498
-      'field' => 'outcome',
1499
-      'override' => array(
1495
+        ),
1496
+        'id' => 'outcome',
1497
+        'table' => 'result',
1498
+        'field' => 'outcome',
1499
+        'override' => array(
1500 1500
         'button' => 'Use default',
1501
-      ),
1502
-      'relationship' => 'none',
1501
+        ),
1502
+        'relationship' => 'none',
1503 1503
     ),
1504 1504
     'validate_state' => array(
1505
-      'operator' => '=',
1506
-      'value' => array(
1505
+        'operator' => '=',
1506
+        'value' => array(
1507 1507
         'value' => '1',
1508 1508
         'min' => '',
1509 1509
         'max' => '',
1510
-      ),
1511
-      'group' => '0',
1512
-      'exposed' => FALSE,
1513
-      'expose' => array(
1510
+        ),
1511
+        'group' => '0',
1512
+        'exposed' => FALSE,
1513
+        'expose' => array(
1514 1514
         'operator' => FALSE,
1515 1515
         'label' => '',
1516
-      ),
1517
-      'id' => 'validate_state',
1518
-      'table' => 'result',
1519
-      'field' => 'validate_state',
1520
-      'override' => array(
1516
+        ),
1517
+        'id' => 'validate_state',
1518
+        'table' => 'result',
1519
+        'field' => 'validate_state',
1520
+        'override' => array(
1521 1521
         'button' => 'Use default',
1522
-      ),
1523
-      'relationship' => 'none',
1522
+        ),
1523
+        'relationship' => 'none',
1524 1524
     ),
1525
-  ));
1526
-  $handler->override_option('path', 'account/tasks/valid');
1527
-  $handler->override_option('menu', array(
1525
+    ));
1526
+    $handler->override_option('path', 'account/tasks/valid');
1527
+    $handler->override_option('menu', array(
1528 1528
     'type' => 'tab',
1529 1529
     'title' => 'Valid',
1530 1530
     'description' => 'Show validated tasks associated with the account',
1531 1531
     'weight' => '3',
1532 1532
     'name' => 'navigation',
1533
-  ));
1534
-  $handler->override_option('tab_options', array(
1533
+    ));
1534
+    $handler->override_option('tab_options', array(
1535 1535
     'type' => 'none',
1536 1536
     'title' => '',
1537 1537
     'description' => '',
1538 1538
     'weight' => 0,
1539 1539
     'name' => 'navigation',
1540
-  ));
1540
+    ));
1541 1541
 
1542
-  $views[$view->name] = $view;
1542
+    $views[$view->name] = $view;
1543 1543
 
1544
-  // Exported view: boinc_host
1545
-  $view = new view;
1546
-  $view->name = 'boinc_host';
1547
-  $view->description = 'Details for a specific host';
1548
-  $view->tag = '';
1549
-  $view->base_table = 'host';
1550
-  $view->core = 0;
1551
-  $view->api_version = '2';
1552
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
1553
-  $handler = $view->new_display('default', 'Defaults', 'default');
1554
-  $handler->override_option('fields', array(
1544
+    // Exported view: boinc_host
1545
+    $view = new view;
1546
+    $view->name = 'boinc_host';
1547
+    $view->description = 'Details for a specific host';
1548
+    $view->tag = '';
1549
+    $view->base_table = 'host';
1550
+    $view->core = 0;
1551
+    $view->api_version = '2';
1552
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
1553
+    $handler = $view->new_display('default', 'Defaults', 'default');
1554
+    $handler->override_option('fields', array(
1555 1555
     'userid' => array(
1556
-      'label' => 'User ID',
1557
-      'alter' => array(
1556
+        'label' => 'User ID',
1557
+        'alter' => array(
1558 1558
         'alter_text' => 0,
1559 1559
         'text' => '',
1560 1560
         'make_link' => 0,
@@ -1571,25 +1571,25 @@  discard block
 block discarded – undo
1571 1571
         'ellipsis' => 1,
1572 1572
         'html' => 0,
1573 1573
         'strip_tags' => 0,
1574
-      ),
1575
-      'empty' => '',
1576
-      'hide_empty' => 0,
1577
-      'empty_zero' => 0,
1578
-      'set_precision' => FALSE,
1579
-      'precision' => 0,
1580
-      'decimal' => '.',
1581
-      'separator' => '',
1582
-      'prefix' => '',
1583
-      'suffix' => '',
1584
-      'exclude' => 1,
1585
-      'id' => 'userid',
1586
-      'table' => 'host',
1587
-      'field' => 'userid',
1588
-      'relationship' => 'none',
1574
+        ),
1575
+        'empty' => '',
1576
+        'hide_empty' => 0,
1577
+        'empty_zero' => 0,
1578
+        'set_precision' => FALSE,
1579
+        'precision' => 0,
1580
+        'decimal' => '.',
1581
+        'separator' => '',
1582
+        'prefix' => '',
1583
+        'suffix' => '',
1584
+        'exclude' => 1,
1585
+        'id' => 'userid',
1586
+        'table' => 'host',
1587
+        'field' => 'userid',
1588
+        'relationship' => 'none',
1589 1589
     ),
1590 1590
     'last_ip_addr' => array(
1591
-      'label' => 'Last IP address',
1592
-      'alter' => array(
1591
+        'label' => 'Last IP address',
1592
+        'alter' => array(
1593 1593
         'alter_text' => 0,
1594 1594
         'text' => '',
1595 1595
         'make_link' => 0,
@@ -1606,19 +1606,19 @@  discard block
 block discarded – undo
1606 1606
         'ellipsis' => 1,
1607 1607
         'html' => 0,
1608 1608
         'strip_tags' => 0,
1609
-      ),
1610
-      'empty' => '',
1611
-      'hide_empty' => 0,
1612
-      'empty_zero' => 0,
1613
-      'exclude' => 1,
1614
-      'id' => 'last_ip_addr',
1615
-      'table' => 'host',
1616
-      'field' => 'last_ip_addr',
1617
-      'relationship' => 'none',
1609
+        ),
1610
+        'empty' => '',
1611
+        'hide_empty' => 0,
1612
+        'empty_zero' => 0,
1613
+        'exclude' => 1,
1614
+        'id' => 'last_ip_addr',
1615
+        'table' => 'host',
1616
+        'field' => 'last_ip_addr',
1617
+        'relationship' => 'none',
1618 1618
     ),
1619 1619
     'nsame_ip_addr' => array(
1620
-      'label' => 'Same IP address count',
1621
-      'alter' => array(
1620
+        'label' => 'Same IP address count',
1621
+        'alter' => array(
1622 1622
         'alter_text' => 0,
1623 1623
         'text' => '',
1624 1624
         'make_link' => 0,
@@ -1635,19 +1635,19 @@  discard block
 block discarded – undo
1635 1635
         'ellipsis' => 1,
1636 1636
         'html' => 0,
1637 1637
         'strip_tags' => 0,
1638
-      ),
1639
-      'empty' => '',
1640
-      'hide_empty' => 0,
1641
-      'empty_zero' => 0,
1642
-      'exclude' => 1,
1643
-      'id' => 'nsame_ip_addr',
1644
-      'table' => 'host',
1645
-      'field' => 'nsame_ip_addr',
1646
-      'relationship' => 'none',
1638
+        ),
1639
+        'empty' => '',
1640
+        'hide_empty' => 0,
1641
+        'empty_zero' => 0,
1642
+        'exclude' => 1,
1643
+        'id' => 'nsame_ip_addr',
1644
+        'table' => 'host',
1645
+        'field' => 'nsame_ip_addr',
1646
+        'relationship' => 'none',
1647 1647
     ),
1648 1648
     'external_ip_addr' => array(
1649
-      'label' => 'External IP address',
1650
-      'alter' => array(
1649
+        'label' => 'External IP address',
1650
+        'alter' => array(
1651 1651
         'alter_text' => 0,
1652 1652
         'text' => '',
1653 1653
         'make_link' => 0,
@@ -1664,19 +1664,19 @@  discard block
 block discarded – undo
1664 1664
         'ellipsis' => 1,
1665 1665
         'html' => 0,
1666 1666
         'strip_tags' => 0,
1667
-      ),
1668
-      'empty' => '',
1669
-      'hide_empty' => 0,
1670
-      'empty_zero' => 0,
1671
-      'exclude' => 1,
1672
-      'id' => 'external_ip_addr',
1673
-      'table' => 'host',
1674
-      'field' => 'external_ip_addr',
1675
-      'relationship' => 'none',
1667
+        ),
1668
+        'empty' => '',
1669
+        'hide_empty' => 0,
1670
+        'empty_zero' => 0,
1671
+        'exclude' => 1,
1672
+        'id' => 'external_ip_addr',
1673
+        'table' => 'host',
1674
+        'field' => 'external_ip_addr',
1675
+        'relationship' => 'none',
1676 1676
     ),
1677 1677
     'phpcode_26' => array(
1678
-      'label' => 'IP address',
1679
-      'alter' => array(
1678
+        'label' => 'IP address',
1679
+        'alter' => array(
1680 1680
         'alter_text' => 0,
1681 1681
         'text' => '',
1682 1682
         'make_link' => 0,
@@ -1695,12 +1695,12 @@  discard block
 block discarded – undo
1695 1695
         'ellipsis' => 1,
1696 1696
         'html' => 0,
1697 1697
         'strip_tags' => 0,
1698
-      ),
1699
-      'empty' => '',
1700
-      'hide_empty' => 1,
1701
-      'empty_zero' => 0,
1702
-      'hide_alter_empty' => 1,
1703
-      'value' => '<?php
1698
+        ),
1699
+        'empty' => '',
1700
+        'hide_empty' => 1,
1701
+        'empty_zero' => 0,
1702
+        'hide_alter_empty' => 1,
1703
+        'value' => '<?php
1704 1704
   if (is_current_boinc_user($data->host_userid)) {
1705 1705
     $showIP = arg(2);
1706 1706
     if ($showIP) {
@@ -1719,15 +1719,15 @@  discard block
 block discarded – undo
1719 1719
     }
1720 1720
   }
1721 1721
 ?>',
1722
-      'exclude' => 0,
1723
-      'id' => 'phpcode_26',
1724
-      'table' => 'customfield',
1725
-      'field' => 'phpcode',
1726
-      'relationship' => 'none',
1722
+        'exclude' => 0,
1723
+        'id' => 'phpcode_26',
1724
+        'table' => 'customfield',
1725
+        'field' => 'phpcode',
1726
+        'relationship' => 'none',
1727 1727
     ),
1728 1728
     'phpcode_28' => array(
1729
-      'label' => 'External IP address',
1730
-      'alter' => array(
1729
+        'label' => 'External IP address',
1730
+        'alter' => array(
1731 1731
         'alter_text' => 0,
1732 1732
         'text' => '',
1733 1733
         'make_link' => 0,
@@ -1744,11 +1744,11 @@  discard block
 block discarded – undo
1744 1744
         'ellipsis' => 1,
1745 1745
         'html' => 0,
1746 1746
         'strip_tags' => 0,
1747
-      ),
1748
-      'empty' => '',
1749
-      'hide_empty' => 1,
1750
-      'empty_zero' => 0,
1751
-      'value' => '<?php
1747
+        ),
1748
+        'empty' => '',
1749
+        'hide_empty' => 1,
1750
+        'empty_zero' => 0,
1751
+        'value' => '<?php
1752 1752
   if (is_current_boinc_user($data->host_userid)) {
1753 1753
     $showIP = arg(2);
1754 1754
     if ($showIP) {
@@ -1756,15 +1756,15 @@  discard block
 block discarded – undo
1756 1756
     }
1757 1757
   }
1758 1758
 ?>',
1759
-      'exclude' => 0,
1760
-      'id' => 'phpcode_28',
1761
-      'table' => 'customfield',
1762
-      'field' => 'phpcode',
1763
-      'relationship' => 'none',
1759
+        'exclude' => 0,
1760
+        'id' => 'phpcode_28',
1761
+        'table' => 'customfield',
1762
+        'field' => 'phpcode',
1763
+        'relationship' => 'none',
1764 1764
     ),
1765 1765
     'domain_name' => array(
1766
-      'label' => 'Domain name',
1767
-      'alter' => array(
1766
+        'label' => 'Domain name',
1767
+        'alter' => array(
1768 1768
         'alter_text' => 0,
1769 1769
         'text' => '',
1770 1770
         'make_link' => 0,
@@ -1781,19 +1781,19 @@  discard block
 block discarded – undo
1781 1781
         'ellipsis' => 1,
1782 1782
         'html' => 0,
1783 1783
         'strip_tags' => 0,
1784
-      ),
1785
-      'empty' => '',
1786
-      'hide_empty' => 0,
1787
-      'empty_zero' => 0,
1788
-      'exclude' => 1,
1789
-      'id' => 'domain_name',
1790
-      'table' => 'host',
1791
-      'field' => 'domain_name',
1792
-      'relationship' => 'none',
1784
+        ),
1785
+        'empty' => '',
1786
+        'hide_empty' => 0,
1787
+        'empty_zero' => 0,
1788
+        'exclude' => 1,
1789
+        'id' => 'domain_name',
1790
+        'table' => 'host',
1791
+        'field' => 'domain_name',
1792
+        'relationship' => 'none',
1793 1793
     ),
1794 1794
     'phpcode_3' => array(
1795
-      'label' => 'Domain name',
1796
-      'alter' => array(
1795
+        'label' => 'Domain name',
1796
+        'alter' => array(
1797 1797
         'alter_text' => 0,
1798 1798
         'text' => '',
1799 1799
         'make_link' => 0,
@@ -1810,24 +1810,24 @@  discard block
 block discarded – undo
1810 1810
         'ellipsis' => 1,
1811 1811
         'html' => 0,
1812 1812
         'strip_tags' => 0,
1813
-      ),
1814
-      'empty' => '',
1815
-      'hide_empty' => 1,
1816
-      'empty_zero' => 0,
1817
-      'value' => '<?php
1813
+        ),
1814
+        'empty' => '',
1815
+        'hide_empty' => 1,
1816
+        'empty_zero' => 0,
1817
+        'value' => '<?php
1818 1818
   if (is_current_boinc_user($data->host_userid)) {
1819 1819
     echo $data->host_domain_name;
1820 1820
   }
1821 1821
 ?>',
1822
-      'exclude' => 0,
1823
-      'id' => 'phpcode_3',
1824
-      'table' => 'customfield',
1825
-      'field' => 'phpcode',
1826
-      'relationship' => 'none',
1822
+        'exclude' => 0,
1823
+        'id' => 'phpcode_3',
1824
+        'table' => 'customfield',
1825
+        'field' => 'phpcode',
1826
+        'relationship' => 'none',
1827 1827
     ),
1828 1828
     'timezone' => array(
1829
-      'label' => 'Timezone',
1830
-      'alter' => array(
1829
+        'label' => 'Timezone',
1830
+        'alter' => array(
1831 1831
         'alter_text' => 0,
1832 1832
         'text' => '',
1833 1833
         'make_link' => 0,
@@ -1844,25 +1844,25 @@  discard block
 block discarded – undo
1844 1844
         'ellipsis' => 1,
1845 1845
         'html' => 0,
1846 1846
         'strip_tags' => 0,
1847
-      ),
1848
-      'empty' => '',
1849
-      'hide_empty' => 0,
1850
-      'empty_zero' => 0,
1851
-      'set_precision' => FALSE,
1852
-      'precision' => 0,
1853
-      'decimal' => '.',
1854
-      'separator' => '',
1855
-      'prefix' => '',
1856
-      'suffix' => '',
1857
-      'exclude' => 1,
1858
-      'id' => 'timezone',
1859
-      'table' => 'host',
1860
-      'field' => 'timezone',
1861
-      'relationship' => 'none',
1847
+        ),
1848
+        'empty' => '',
1849
+        'hide_empty' => 0,
1850
+        'empty_zero' => 0,
1851
+        'set_precision' => FALSE,
1852
+        'precision' => 0,
1853
+        'decimal' => '.',
1854
+        'separator' => '',
1855
+        'prefix' => '',
1856
+        'suffix' => '',
1857
+        'exclude' => 1,
1858
+        'id' => 'timezone',
1859
+        'table' => 'host',
1860
+        'field' => 'timezone',
1861
+        'relationship' => 'none',
1862 1862
     ),
1863 1863
     'phpcode_4' => array(
1864
-      'label' => 'Local standard time',
1865
-      'alter' => array(
1864
+        'label' => 'Local standard time',
1865
+        'alter' => array(
1866 1866
         'alter_text' => 0,
1867 1867
         'text' => '',
1868 1868
         'make_link' => 0,
@@ -1881,25 +1881,25 @@  discard block
 block discarded – undo
1881 1881
         'ellipsis' => 1,
1882 1882
         'html' => 0,
1883 1883
         'strip_tags' => 0,
1884
-      ),
1885
-      'empty' => '',
1886
-      'hide_empty' => 1,
1887
-      'empty_zero' => 0,
1888
-      'hide_alter_empty' => 1,
1889
-      'value' => '<?php
1884
+        ),
1885
+        'empty' => '',
1886
+        'hide_empty' => 1,
1887
+        'empty_zero' => 0,
1888
+        'hide_alter_empty' => 1,
1889
+        'value' => '<?php
1890 1890
   if (is_current_boinc_user($data->host_userid)) {
1891 1891
     echo \'UTC \' . ($data->host_timezone > 0 ? \'+\' : \'\') . $data->host_timezone / 3600 . \' \' . bts(\'hours\', array(), NULL, \'boinc:unit-of-time\');
1892 1892
   }
1893 1893
 ?>',
1894
-      'exclude' => 0,
1895
-      'id' => 'phpcode_4',
1896
-      'table' => 'customfield',
1897
-      'field' => 'phpcode',
1898
-      'relationship' => 'none',
1894
+        'exclude' => 0,
1895
+        'id' => 'phpcode_4',
1896
+        'table' => 'customfield',
1897
+        'field' => 'phpcode',
1898
+        'relationship' => 'none',
1899 1899
     ),
1900 1900
     'phpcode_5' => array(
1901
-      'label' => 'Name',
1902
-      'alter' => array(
1901
+        'label' => 'Name',
1902
+        'alter' => array(
1903 1903
         'alter_text' => 0,
1904 1904
         'text' => '',
1905 1905
         'make_link' => 0,
@@ -1916,24 +1916,24 @@  discard block
 block discarded – undo
1916 1916
         'ellipsis' => 1,
1917 1917
         'html' => 0,
1918 1918
         'strip_tags' => 0,
1919
-      ),
1920
-      'empty' => '',
1921
-      'hide_empty' => 1,
1922
-      'empty_zero' => 0,
1923
-      'value' => '<?php
1919
+        ),
1920
+        'empty' => '',
1921
+        'hide_empty' => 1,
1922
+        'empty_zero' => 0,
1923
+        'value' => '<?php
1924 1924
   if (is_current_boinc_user($data->host_userid)) {
1925 1925
     echo $data->host_domain_name;
1926 1926
   }
1927 1927
 ?>',
1928
-      'exclude' => 0,
1929
-      'id' => 'phpcode_5',
1930
-      'table' => 'customfield',
1931
-      'field' => 'phpcode',
1932
-      'relationship' => 'none',
1928
+        'exclude' => 0,
1929
+        'id' => 'phpcode_5',
1930
+        'table' => 'customfield',
1931
+        'field' => 'phpcode',
1932
+        'relationship' => 'none',
1933 1933
     ),
1934 1934
     'phpcode_29' => array(
1935
-      'label' => 'Owner',
1936
-      'alter' => array(
1935
+        'label' => 'Owner',
1936
+        'alter' => array(
1937 1937
         'alter_text' => 0,
1938 1938
         'text' => '',
1939 1939
         'make_link' => 0,
@@ -1952,12 +1952,12 @@  discard block
 block discarded – undo
1952 1952
         'ellipsis' => 1,
1953 1953
         'html' => 0,
1954 1954
         'strip_tags' => 0,
1955
-      ),
1956
-      'empty' => '',
1957
-      'hide_empty' => 1,
1958
-      'empty_zero' => 0,
1959
-      'hide_alter_empty' => 1,
1960
-      'value' => '<?php
1955
+        ),
1956
+        'empty' => '',
1957
+        'hide_empty' => 1,
1958
+        'empty_zero' => 0,
1959
+        'hide_alter_empty' => 1,
1960
+        'value' => '<?php
1961 1961
   if (!is_current_boinc_user($data->host_userid)) {
1962 1962
     require_boinc(\'boinc_db\');
1963 1963
     $owner = BoincUser::lookup_id($data->host_userid);
@@ -1966,15 +1966,15 @@  discard block
 block discarded – undo
1966 1966
     echo ($owner->show_hosts) ? $profile_link : bts(\'Anonymous\', array(), NULL, \'boinc:anonymous-user\');
1967 1967
   }
1968 1968
 ?>',
1969
-      'exclude' => 0,
1970
-      'id' => 'phpcode_29',
1971
-      'table' => 'customfield',
1972
-      'field' => 'phpcode',
1973
-      'relationship' => 'none',
1969
+        'exclude' => 0,
1970
+        'id' => 'phpcode_29',
1971
+        'table' => 'customfield',
1972
+        'field' => 'phpcode',
1973
+        'relationship' => 'none',
1974 1974
     ),
1975 1975
     'create_time' => array(
1976
-      'label' => 'Created',
1977
-      'alter' => array(
1976
+        'label' => 'Created',
1977
+        'alter' => array(
1978 1978
         'alter_text' => 0,
1979 1979
         'text' => '',
1980 1980
         'make_link' => 0,
@@ -1993,22 +1993,22 @@  discard block
 block discarded – undo
1993 1993
         'ellipsis' => 1,
1994 1994
         'html' => 0,
1995 1995
         'strip_tags' => 0,
1996
-      ),
1997
-      'empty' => '',
1998
-      'hide_empty' => 0,
1999
-      'empty_zero' => 0,
2000
-      'hide_alter_empty' => 1,
2001
-      'date_format' => 'custom',
2002
-      'custom_date_format' => 'j M Y G:i:s T',
2003
-      'exclude' => 1,
2004
-      'id' => 'create_time',
2005
-      'table' => 'host',
2006
-      'field' => 'create_time',
2007
-      'relationship' => 'none',
1996
+        ),
1997
+        'empty' => '',
1998
+        'hide_empty' => 0,
1999
+        'empty_zero' => 0,
2000
+        'hide_alter_empty' => 1,
2001
+        'date_format' => 'custom',
2002
+        'custom_date_format' => 'j M Y G:i:s T',
2003
+        'exclude' => 1,
2004
+        'id' => 'create_time',
2005
+        'table' => 'host',
2006
+        'field' => 'create_time',
2007
+        'relationship' => 'none',
2008 2008
     ),
2009 2009
     'phpcode_6' => array(
2010
-      'label' => 'Created',
2011
-      'alter' => array(
2010
+        'label' => 'Created',
2011
+        'alter' => array(
2012 2012
         'alter_text' => 0,
2013 2013
         'text' => '',
2014 2014
         'make_link' => 0,
@@ -2027,23 +2027,23 @@  discard block
 block discarded – undo
2027 2027
         'ellipsis' => 1,
2028 2028
         'html' => 0,
2029 2029
         'strip_tags' => 0,
2030
-      ),
2031
-      'empty' => '',
2032
-      'hide_empty' => 0,
2033
-      'empty_zero' => 0,
2034
-      'hide_alter_empty' => 1,
2035
-      'value' => '<?php
2030
+        ),
2031
+        'empty' => '',
2032
+        'hide_empty' => 0,
2033
+        'empty_zero' => 0,
2034
+        'hide_alter_empty' => 1,
2035
+        'value' => '<?php
2036 2036
   echo date(\'j M Y G:i:s T\', $data->host_create_time);
2037 2037
 ?>',
2038
-      'exclude' => 0,
2039
-      'id' => 'phpcode_6',
2040
-      'table' => 'customfield',
2041
-      'field' => 'phpcode',
2042
-      'relationship' => 'none',
2038
+        'exclude' => 0,
2039
+        'id' => 'phpcode_6',
2040
+        'table' => 'customfield',
2041
+        'field' => 'phpcode',
2042
+        'relationship' => 'none',
2043 2043
     ),
2044 2044
     'total_credit' => array(
2045
-      'label' => 'Total credit',
2046
-      'alter' => array(
2045
+        'label' => 'Total credit',
2046
+        'alter' => array(
2047 2047
         'alter_text' => 0,
2048 2048
         'text' => '',
2049 2049
         'make_link' => 0,
@@ -2062,29 +2062,29 @@  discard block
 block discarded – undo
2062 2062
         'ellipsis' => 1,
2063 2063
         'html' => 0,
2064 2064
         'strip_tags' => 0,
2065
-      ),
2066
-      'empty' => '0',
2067
-      'hide_empty' => 0,
2068
-      'empty_zero' => 0,
2069
-      'hide_alter_empty' => 0,
2070
-      'set_precision' => 1,
2071
-      'precision' => '0',
2072
-      'decimal' => '.',
2073
-      'separator' => ',',
2074
-      'format_plural' => 0,
2075
-      'format_plural_singular' => '1',
2076
-      'format_plural_plural' => '@count',
2077
-      'prefix' => '',
2078
-      'suffix' => '',
2079
-      'exclude' => 0,
2080
-      'id' => 'total_credit',
2081
-      'table' => 'host',
2082
-      'field' => 'total_credit',
2083
-      'relationship' => 'none',
2065
+        ),
2066
+        'empty' => '0',
2067
+        'hide_empty' => 0,
2068
+        'empty_zero' => 0,
2069
+        'hide_alter_empty' => 0,
2070
+        'set_precision' => 1,
2071
+        'precision' => '0',
2072
+        'decimal' => '.',
2073
+        'separator' => ',',
2074
+        'format_plural' => 0,
2075
+        'format_plural_singular' => '1',
2076
+        'format_plural_plural' => '@count',
2077
+        'prefix' => '',
2078
+        'suffix' => '',
2079
+        'exclude' => 0,
2080
+        'id' => 'total_credit',
2081
+        'table' => 'host',
2082
+        'field' => 'total_credit',
2083
+        'relationship' => 'none',
2084 2084
     ),
2085 2085
     'expavg_credit' => array(
2086
-      'label' => 'Average credit',
2087
-      'alter' => array(
2086
+        'label' => 'Average credit',
2087
+        'alter' => array(
2088 2088
         'alter_text' => 0,
2089 2089
         'text' => '',
2090 2090
         'make_link' => 0,
@@ -2101,25 +2101,25 @@  discard block
 block discarded – undo
2101 2101
         'ellipsis' => 1,
2102 2102
         'html' => 0,
2103 2103
         'strip_tags' => 0,
2104
-      ),
2105
-      'empty' => '',
2106
-      'hide_empty' => 0,
2107
-      'empty_zero' => 0,
2108
-      'set_precision' => 1,
2109
-      'precision' => '2',
2110
-      'decimal' => '.',
2111
-      'separator' => ',',
2112
-      'prefix' => '',
2113
-      'suffix' => '',
2114
-      'exclude' => 0,
2115
-      'id' => 'expavg_credit',
2116
-      'table' => 'host',
2117
-      'field' => 'expavg_credit',
2118
-      'relationship' => 'none',
2104
+        ),
2105
+        'empty' => '',
2106
+        'hide_empty' => 0,
2107
+        'empty_zero' => 0,
2108
+        'set_precision' => 1,
2109
+        'precision' => '2',
2110
+        'decimal' => '.',
2111
+        'separator' => ',',
2112
+        'prefix' => '',
2113
+        'suffix' => '',
2114
+        'exclude' => 0,
2115
+        'id' => 'expavg_credit',
2116
+        'table' => 'host',
2117
+        'field' => 'expavg_credit',
2118
+        'relationship' => 'none',
2119 2119
     ),
2120 2120
     'host_cpid' => array(
2121
-      'label' => 'Cross project ID',
2122
-      'alter' => array(
2121
+        'label' => 'Cross project ID',
2122
+        'alter' => array(
2123 2123
         'alter_text' => 0,
2124 2124
         'text' => '',
2125 2125
         'make_link' => 0,
@@ -2138,20 +2138,20 @@  discard block
 block discarded – undo
2138 2138
         'ellipsis' => 1,
2139 2139
         'html' => 0,
2140 2140
         'strip_tags' => 0,
2141
-      ),
2142
-      'empty' => '',
2143
-      'hide_empty' => 0,
2144
-      'empty_zero' => 0,
2145
-      'hide_alter_empty' => 1,
2146
-      'exclude' => 1,
2147
-      'id' => 'host_cpid',
2148
-      'table' => 'host',
2149
-      'field' => 'host_cpid',
2150
-      'relationship' => 'none',
2141
+        ),
2142
+        'empty' => '',
2143
+        'hide_empty' => 0,
2144
+        'empty_zero' => 0,
2145
+        'hide_alter_empty' => 1,
2146
+        'exclude' => 1,
2147
+        'id' => 'host_cpid',
2148
+        'table' => 'host',
2149
+        'field' => 'host_cpid',
2150
+        'relationship' => 'none',
2151 2151
     ),
2152 2152
     'phpcode_7' => array(
2153
-      'label' => 'Cross project credit',
2154
-      'alter' => array(
2153
+        'label' => 'Cross project credit',
2154
+        'alter' => array(
2155 2155
         'alter_text' => 0,
2156 2156
         'text' => '',
2157 2157
         'make_link' => 0,
@@ -2168,11 +2168,11 @@  discard block
 block discarded – undo
2168 2168
         'ellipsis' => 1,
2169 2169
         'html' => 0,
2170 2170
         'strip_tags' => 0,
2171
-      ),
2172
-      'empty' => '',
2173
-      'hide_empty' => 1,
2174
-      'empty_zero' => 0,
2175
-      'value' => '<?php
2171
+        ),
2172
+        'empty' => '',
2173
+        'hide_empty' => 1,
2174
+        'empty_zero' => 0,
2175
+        'value' => '<?php
2176 2176
   require_boinc(\'util\');
2177 2177
   $owner = BoincUser::lookup_id($data->host_userid);
2178 2178
   if ($owner->show_hosts) {
@@ -2189,15 +2189,15 @@  discard block
 block discarded – undo
2189 2189
     echo $x;
2190 2190
   }
2191 2191
 ?>',
2192
-      'exclude' => 0,
2193
-      'id' => 'phpcode_7',
2194
-      'table' => 'customfield',
2195
-      'field' => 'phpcode',
2196
-      'relationship' => 'none',
2192
+        'exclude' => 0,
2193
+        'id' => 'phpcode_7',
2194
+        'table' => 'customfield',
2195
+        'field' => 'phpcode',
2196
+        'relationship' => 'none',
2197 2197
     ),
2198 2198
     'serialnum' => array(
2199
-      'label' => 'Serial Number',
2200
-      'alter' => array(
2199
+        'label' => 'Serial Number',
2200
+        'alter' => array(
2201 2201
         'alter_text' => 0,
2202 2202
         'text' => '',
2203 2203
         'make_link' => 0,
@@ -2214,19 +2214,19 @@  discard block
 block discarded – undo
2214 2214
         'ellipsis' => 1,
2215 2215
         'html' => 0,
2216 2216
         'strip_tags' => 0,
2217
-      ),
2218
-      'empty' => '',
2219
-      'hide_empty' => 0,
2220
-      'empty_zero' => 0,
2221
-      'exclude' => 1,
2222
-      'id' => 'serialnum',
2223
-      'table' => 'host',
2224
-      'field' => 'serialnum',
2225
-      'relationship' => 'none',
2217
+        ),
2218
+        'empty' => '',
2219
+        'hide_empty' => 0,
2220
+        'empty_zero' => 0,
2221
+        'exclude' => 1,
2222
+        'id' => 'serialnum',
2223
+        'table' => 'host',
2224
+        'field' => 'serialnum',
2225
+        'relationship' => 'none',
2226 2226
     ),
2227 2227
     'p_vendor' => array(
2228
-      'label' => 'CPU',
2229
-      'alter' => array(
2228
+        'label' => 'CPU',
2229
+        'alter' => array(
2230 2230
         'alter_text' => 0,
2231 2231
         'text' => '',
2232 2232
         'make_link' => 0,
@@ -2243,19 +2243,19 @@  discard block
 block discarded – undo
2243 2243
         'ellipsis' => 1,
2244 2244
         'html' => 0,
2245 2245
         'strip_tags' => 0,
2246
-      ),
2247
-      'empty' => '',
2248
-      'hide_empty' => 0,
2249
-      'empty_zero' => 0,
2250
-      'exclude' => 1,
2251
-      'id' => 'p_vendor',
2252
-      'table' => 'host',
2253
-      'field' => 'p_vendor',
2254
-      'relationship' => 'none',
2246
+        ),
2247
+        'empty' => '',
2248
+        'hide_empty' => 0,
2249
+        'empty_zero' => 0,
2250
+        'exclude' => 1,
2251
+        'id' => 'p_vendor',
2252
+        'table' => 'host',
2253
+        'field' => 'p_vendor',
2254
+        'relationship' => 'none',
2255 2255
     ),
2256 2256
     'p_model' => array(
2257
-      'label' => 'CPU type',
2258
-      'alter' => array(
2257
+        'label' => 'CPU type',
2258
+        'alter' => array(
2259 2259
         'alter_text' => 1,
2260 2260
         'text' => '[p_vendor] [p_model]',
2261 2261
         'make_link' => 0,
@@ -2274,20 +2274,20 @@  discard block
 block discarded – undo
2274 2274
         'ellipsis' => 1,
2275 2275
         'html' => 0,
2276 2276
         'strip_tags' => 0,
2277
-      ),
2278
-      'empty' => '',
2279
-      'hide_empty' => 0,
2280
-      'empty_zero' => 0,
2281
-      'hide_alter_empty' => 1,
2282
-      'exclude' => 0,
2283
-      'id' => 'p_model',
2284
-      'table' => 'host',
2285
-      'field' => 'p_model',
2286
-      'relationship' => 'none',
2277
+        ),
2278
+        'empty' => '',
2279
+        'hide_empty' => 0,
2280
+        'empty_zero' => 0,
2281
+        'hide_alter_empty' => 1,
2282
+        'exclude' => 0,
2283
+        'id' => 'p_model',
2284
+        'table' => 'host',
2285
+        'field' => 'p_model',
2286
+        'relationship' => 'none',
2287 2287
     ),
2288 2288
     'p_ncpus' => array(
2289
-      'label' => 'Number of processors',
2290
-      'alter' => array(
2289
+        'label' => 'Number of processors',
2290
+        'alter' => array(
2291 2291
         'alter_text' => 0,
2292 2292
         'text' => '',
2293 2293
         'make_link' => 0,
@@ -2304,19 +2304,19 @@  discard block
 block discarded – undo
2304 2304
         'ellipsis' => 1,
2305 2305
         'html' => 0,
2306 2306
         'strip_tags' => 0,
2307
-      ),
2308
-      'empty' => '',
2309
-      'hide_empty' => 0,
2310
-      'empty_zero' => 0,
2311
-      'exclude' => 0,
2312
-      'id' => 'p_ncpus',
2313
-      'table' => 'host',
2314
-      'field' => 'p_ncpus',
2315
-      'relationship' => 'none',
2307
+        ),
2308
+        'empty' => '',
2309
+        'hide_empty' => 0,
2310
+        'empty_zero' => 0,
2311
+        'exclude' => 0,
2312
+        'id' => 'p_ncpus',
2313
+        'table' => 'host',
2314
+        'field' => 'p_ncpus',
2315
+        'relationship' => 'none',
2316 2316
     ),
2317 2317
     'phpcode_1' => array(
2318
-      'label' => 'Coprocessors',
2319
-      'alter' => array(
2318
+        'label' => 'Coprocessors',
2319
+        'alter' => array(
2320 2320
         'alter_text' => 0,
2321 2321
         'text' => '',
2322 2322
         'make_link' => 0,
@@ -2333,25 +2333,25 @@  discard block
 block discarded – undo
2333 2333
         'ellipsis' => 1,
2334 2334
         'html' => 0,
2335 2335
         'strip_tags' => 0,
2336
-      ),
2337
-      'empty' => '',
2338
-      'hide_empty' => 1,
2339
-      'empty_zero' => 0,
2340
-      'value' => '<?php
2336
+        ),
2337
+        'empty' => '',
2338
+        'hide_empty' => 1,
2339
+        'empty_zero' => 0,
2340
+        'value' => '<?php
2341 2341
   if ($data->host_serialnum) {
2342 2342
     require_boinc(\'host\');
2343 2343
     echo gpu_desc(parse_serialnum($data->host_serialnum));
2344 2344
   }
2345 2345
 ?>',
2346
-      'exclude' => 0,
2347
-      'id' => 'phpcode_1',
2348
-      'table' => 'customfield',
2349
-      'field' => 'phpcode',
2350
-      'relationship' => 'none',
2346
+        'exclude' => 0,
2347
+        'id' => 'phpcode_1',
2348
+        'table' => 'customfield',
2349
+        'field' => 'phpcode',
2350
+        'relationship' => 'none',
2351 2351
     ),
2352 2352
     'os_name' => array(
2353
-      'label' => 'Operating system',
2354
-      'alter' => array(
2353
+        'label' => 'Operating system',
2354
+        'alter' => array(
2355 2355
         'alter_text' => 0,
2356 2356
         'text' => '',
2357 2357
         'make_link' => 0,
@@ -2368,19 +2368,19 @@  discard block
 block discarded – undo
2368 2368
         'ellipsis' => 1,
2369 2369
         'html' => 0,
2370 2370
         'strip_tags' => 0,
2371
-      ),
2372
-      'empty' => '',
2373
-      'hide_empty' => 0,
2374
-      'empty_zero' => 0,
2375
-      'exclude' => 1,
2376
-      'id' => 'os_name',
2377
-      'table' => 'host',
2378
-      'field' => 'os_name',
2379
-      'relationship' => 'none',
2371
+        ),
2372
+        'empty' => '',
2373
+        'hide_empty' => 0,
2374
+        'empty_zero' => 0,
2375
+        'exclude' => 1,
2376
+        'id' => 'os_name',
2377
+        'table' => 'host',
2378
+        'field' => 'os_name',
2379
+        'relationship' => 'none',
2380 2380
     ),
2381 2381
     'os_version' => array(
2382
-      'label' => 'Operating system',
2383
-      'alter' => array(
2382
+        'label' => 'Operating system',
2383
+        'alter' => array(
2384 2384
         'alter_text' => 1,
2385 2385
         'text' => '[os_name] [os_version]',
2386 2386
         'make_link' => 0,
@@ -2399,20 +2399,20 @@  discard block
 block discarded – undo
2399 2399
         'ellipsis' => 1,
2400 2400
         'html' => 0,
2401 2401
         'strip_tags' => 0,
2402
-      ),
2403
-      'empty' => '',
2404
-      'hide_empty' => 0,
2405
-      'empty_zero' => 0,
2406
-      'hide_alter_empty' => 1,
2407
-      'exclude' => 0,
2408
-      'id' => 'os_version',
2409
-      'table' => 'host',
2410
-      'field' => 'os_version',
2411
-      'relationship' => 'none',
2402
+        ),
2403
+        'empty' => '',
2404
+        'hide_empty' => 0,
2405
+        'empty_zero' => 0,
2406
+        'hide_alter_empty' => 1,
2407
+        'exclude' => 0,
2408
+        'id' => 'os_version',
2409
+        'table' => 'host',
2410
+        'field' => 'os_version',
2411
+        'relationship' => 'none',
2412 2412
     ),
2413 2413
     'phpcode' => array(
2414
-      'label' => 'BOINC client version',
2415
-      'alter' => array(
2414
+        'label' => 'BOINC client version',
2415
+        'alter' => array(
2416 2416
         'alter_text' => 0,
2417 2417
         'text' => '',
2418 2418
         'make_link' => 0,
@@ -2429,24 +2429,24 @@  discard block
 block discarded – undo
2429 2429
         'ellipsis' => 1,
2430 2430
         'html' => 0,
2431 2431
         'strip_tags' => 0,
2432
-      ),
2433
-      'empty' => '',
2434
-      'hide_empty' => 1,
2435
-      'empty_zero' => 0,
2436
-      'value' => '<?php
2432
+        ),
2433
+        'empty' => '',
2434
+        'hide_empty' => 1,
2435
+        'empty_zero' => 0,
2436
+        'value' => '<?php
2437 2437
   require_boinc(\'host\');
2438 2438
   $version = boinc_version(parse_serialnum($data->host_serialnum));
2439 2439
   if ($version) echo $version;
2440 2440
 ?>',
2441
-      'exclude' => 0,
2442
-      'id' => 'phpcode',
2443
-      'table' => 'customfield',
2444
-      'field' => 'phpcode',
2445
-      'relationship' => 'none',
2441
+        'exclude' => 0,
2442
+        'id' => 'phpcode',
2443
+        'table' => 'customfield',
2444
+        'field' => 'phpcode',
2445
+        'relationship' => 'none',
2446 2446
     ),
2447 2447
     'm_nbytes' => array(
2448
-      'label' => 'Memory',
2449
-      'alter' => array(
2448
+        'label' => 'Memory',
2449
+        'alter' => array(
2450 2450
         'alter_text' => 0,
2451 2451
         'text' => '',
2452 2452
         'make_link' => 0,
@@ -2463,25 +2463,25 @@  discard block
 block discarded – undo
2463 2463
         'ellipsis' => 1,
2464 2464
         'html' => 0,
2465 2465
         'strip_tags' => 0,
2466
-      ),
2467
-      'empty' => '',
2468
-      'hide_empty' => 0,
2469
-      'empty_zero' => 0,
2470
-      'set_precision' => FALSE,
2471
-      'precision' => 0,
2472
-      'decimal' => '.',
2473
-      'separator' => '',
2474
-      'prefix' => '',
2475
-      'suffix' => '',
2476
-      'exclude' => 1,
2477
-      'id' => 'm_nbytes',
2478
-      'table' => 'host',
2479
-      'field' => 'm_nbytes',
2480
-      'relationship' => 'none',
2466
+        ),
2467
+        'empty' => '',
2468
+        'hide_empty' => 0,
2469
+        'empty_zero' => 0,
2470
+        'set_precision' => FALSE,
2471
+        'precision' => 0,
2472
+        'decimal' => '.',
2473
+        'separator' => '',
2474
+        'prefix' => '',
2475
+        'suffix' => '',
2476
+        'exclude' => 1,
2477
+        'id' => 'm_nbytes',
2478
+        'table' => 'host',
2479
+        'field' => 'm_nbytes',
2480
+        'relationship' => 'none',
2481 2481
     ),
2482 2482
     'm_cache' => array(
2483
-      'label' => 'Cache',
2484
-      'alter' => array(
2483
+        'label' => 'Cache',
2484
+        'alter' => array(
2485 2485
         'alter_text' => 0,
2486 2486
         'text' => '',
2487 2487
         'make_link' => 0,
@@ -2498,25 +2498,25 @@  discard block
 block discarded – undo
2498 2498
         'ellipsis' => 1,
2499 2499
         'html' => 0,
2500 2500
         'strip_tags' => 0,
2501
-      ),
2502
-      'empty' => '',
2503
-      'hide_empty' => 0,
2504
-      'empty_zero' => 0,
2505
-      'set_precision' => FALSE,
2506
-      'precision' => 0,
2507
-      'decimal' => '.',
2508
-      'separator' => '',
2509
-      'prefix' => '',
2510
-      'suffix' => '',
2511
-      'exclude' => 1,
2512
-      'id' => 'm_cache',
2513
-      'table' => 'host',
2514
-      'field' => 'm_cache',
2515
-      'relationship' => 'none',
2501
+        ),
2502
+        'empty' => '',
2503
+        'hide_empty' => 0,
2504
+        'empty_zero' => 0,
2505
+        'set_precision' => FALSE,
2506
+        'precision' => 0,
2507
+        'decimal' => '.',
2508
+        'separator' => '',
2509
+        'prefix' => '',
2510
+        'suffix' => '',
2511
+        'exclude' => 1,
2512
+        'id' => 'm_cache',
2513
+        'table' => 'host',
2514
+        'field' => 'm_cache',
2515
+        'relationship' => 'none',
2516 2516
     ),
2517 2517
     'phpcode_8' => array(
2518
-      'label' => 'Memory',
2519
-      'alter' => array(
2518
+        'label' => 'Memory',
2519
+        'alter' => array(
2520 2520
         'alter_text' => 0,
2521 2521
         'text' => '',
2522 2522
         'make_link' => 0,
@@ -2533,22 +2533,22 @@  discard block
 block discarded – undo
2533 2533
         'ellipsis' => 1,
2534 2534
         'html' => 0,
2535 2535
         'strip_tags' => 0,
2536
-      ),
2537
-      'empty' => '',
2538
-      'hide_empty' => 0,
2539
-      'empty_zero' => 0,
2540
-      'value' => '<?php
2536
+        ),
2537
+        'empty' => '',
2538
+        'hide_empty' => 0,
2539
+        'empty_zero' => 0,
2540
+        'value' => '<?php
2541 2541
   echo round($data->host_m_nbytes/(1024*1024), 2) . \' MiB\';
2542 2542
 ?>',
2543
-      'exclude' => 0,
2544
-      'id' => 'phpcode_8',
2545
-      'table' => 'customfield',
2546
-      'field' => 'phpcode',
2547
-      'relationship' => 'none',
2543
+        'exclude' => 0,
2544
+        'id' => 'phpcode_8',
2545
+        'table' => 'customfield',
2546
+        'field' => 'phpcode',
2547
+        'relationship' => 'none',
2548 2548
     ),
2549 2549
     'phpcode_9' => array(
2550
-      'label' => 'Cache',
2551
-      'alter' => array(
2550
+        'label' => 'Cache',
2551
+        'alter' => array(
2552 2552
         'alter_text' => 0,
2553 2553
         'text' => '',
2554 2554
         'make_link' => 0,
@@ -2565,22 +2565,22 @@  discard block
 block discarded – undo
2565 2565
         'ellipsis' => 1,
2566 2566
         'html' => 0,
2567 2567
         'strip_tags' => 0,
2568
-      ),
2569
-      'empty' => '',
2570
-      'hide_empty' => 0,
2571
-      'empty_zero' => 0,
2572
-      'value' => '<?php
2568
+        ),
2569
+        'empty' => '',
2570
+        'hide_empty' => 0,
2571
+        'empty_zero' => 0,
2572
+        'value' => '<?php
2573 2573
   echo round($data->host_m_cache/(1024), 2) . \' KiB\';
2574 2574
 ?>',
2575
-      'exclude' => 0,
2576
-      'id' => 'phpcode_9',
2577
-      'table' => 'customfield',
2578
-      'field' => 'phpcode',
2579
-      'relationship' => 'none',
2575
+        'exclude' => 0,
2576
+        'id' => 'phpcode_9',
2577
+        'table' => 'customfield',
2578
+        'field' => 'phpcode',
2579
+        'relationship' => 'none',
2580 2580
     ),
2581 2581
     'm_swap' => array(
2582
-      'label' => 'Swap space',
2583
-      'alter' => array(
2582
+        'label' => 'Swap space',
2583
+        'alter' => array(
2584 2584
         'alter_text' => 0,
2585 2585
         'text' => '',
2586 2586
         'make_link' => 0,
@@ -2597,25 +2597,25 @@  discard block
 block discarded – undo
2597 2597
         'ellipsis' => 1,
2598 2598
         'html' => 0,
2599 2599
         'strip_tags' => 0,
2600
-      ),
2601
-      'empty' => '',
2602
-      'hide_empty' => 0,
2603
-      'empty_zero' => 0,
2604
-      'set_precision' => FALSE,
2605
-      'precision' => 0,
2606
-      'decimal' => '.',
2607
-      'separator' => '',
2608
-      'prefix' => '',
2609
-      'suffix' => '',
2610
-      'exclude' => 1,
2611
-      'id' => 'm_swap',
2612
-      'table' => 'host',
2613
-      'field' => 'm_swap',
2614
-      'relationship' => 'none',
2600
+        ),
2601
+        'empty' => '',
2602
+        'hide_empty' => 0,
2603
+        'empty_zero' => 0,
2604
+        'set_precision' => FALSE,
2605
+        'precision' => 0,
2606
+        'decimal' => '.',
2607
+        'separator' => '',
2608
+        'prefix' => '',
2609
+        'suffix' => '',
2610
+        'exclude' => 1,
2611
+        'id' => 'm_swap',
2612
+        'table' => 'host',
2613
+        'field' => 'm_swap',
2614
+        'relationship' => 'none',
2615 2615
     ),
2616 2616
     'd_total' => array(
2617
-      'label' => 'Total disk space',
2618
-      'alter' => array(
2617
+        'label' => 'Total disk space',
2618
+        'alter' => array(
2619 2619
         'alter_text' => 0,
2620 2620
         'text' => '',
2621 2621
         'make_link' => 0,
@@ -2632,25 +2632,25 @@  discard block
 block discarded – undo
2632 2632
         'ellipsis' => 1,
2633 2633
         'html' => 0,
2634 2634
         'strip_tags' => 0,
2635
-      ),
2636
-      'empty' => '',
2637
-      'hide_empty' => 0,
2638
-      'empty_zero' => 0,
2639
-      'set_precision' => FALSE,
2640
-      'precision' => 0,
2641
-      'decimal' => '.',
2642
-      'separator' => '',
2643
-      'prefix' => '',
2644
-      'suffix' => '',
2645
-      'exclude' => 1,
2646
-      'id' => 'd_total',
2647
-      'table' => 'host',
2648
-      'field' => 'd_total',
2649
-      'relationship' => 'none',
2635
+        ),
2636
+        'empty' => '',
2637
+        'hide_empty' => 0,
2638
+        'empty_zero' => 0,
2639
+        'set_precision' => FALSE,
2640
+        'precision' => 0,
2641
+        'decimal' => '.',
2642
+        'separator' => '',
2643
+        'prefix' => '',
2644
+        'suffix' => '',
2645
+        'exclude' => 1,
2646
+        'id' => 'd_total',
2647
+        'table' => 'host',
2648
+        'field' => 'd_total',
2649
+        'relationship' => 'none',
2650 2650
     ),
2651 2651
     'd_free' => array(
2652
-      'label' => 'Free disk space',
2653
-      'alter' => array(
2652
+        'label' => 'Free disk space',
2653
+        'alter' => array(
2654 2654
         'alter_text' => 0,
2655 2655
         'text' => '',
2656 2656
         'make_link' => 0,
@@ -2667,25 +2667,25 @@  discard block
 block discarded – undo
2667 2667
         'ellipsis' => 1,
2668 2668
         'html' => 0,
2669 2669
         'strip_tags' => 0,
2670
-      ),
2671
-      'empty' => '',
2672
-      'hide_empty' => 0,
2673
-      'empty_zero' => 0,
2674
-      'set_precision' => FALSE,
2675
-      'precision' => 0,
2676
-      'decimal' => '.',
2677
-      'separator' => '',
2678
-      'prefix' => '',
2679
-      'suffix' => '',
2680
-      'exclude' => 1,
2681
-      'id' => 'd_free',
2682
-      'table' => 'host',
2683
-      'field' => 'd_free',
2684
-      'relationship' => 'none',
2670
+        ),
2671
+        'empty' => '',
2672
+        'hide_empty' => 0,
2673
+        'empty_zero' => 0,
2674
+        'set_precision' => FALSE,
2675
+        'precision' => 0,
2676
+        'decimal' => '.',
2677
+        'separator' => '',
2678
+        'prefix' => '',
2679
+        'suffix' => '',
2680
+        'exclude' => 1,
2681
+        'id' => 'd_free',
2682
+        'table' => 'host',
2683
+        'field' => 'd_free',
2684
+        'relationship' => 'none',
2685 2685
     ),
2686 2686
     'phpcode_10' => array(
2687
-      'label' => 'Swap space',
2688
-      'alter' => array(
2687
+        'label' => 'Swap space',
2688
+        'alter' => array(
2689 2689
         'alter_text' => 0,
2690 2690
         'text' => '',
2691 2691
         'make_link' => 0,
@@ -2702,24 +2702,24 @@  discard block
 block discarded – undo
2702 2702
         'ellipsis' => 1,
2703 2703
         'html' => 0,
2704 2704
         'strip_tags' => 0,
2705
-      ),
2706
-      'empty' => '',
2707
-      'hide_empty' => 1,
2708
-      'empty_zero' => 0,
2709
-      'value' => '<?php
2705
+        ),
2706
+        'empty' => '',
2707
+        'hide_empty' => 1,
2708
+        'empty_zero' => 0,
2709
+        'value' => '<?php
2710 2710
   if (is_current_boinc_user($data->host_userid)) {
2711 2711
     echo round($data->host_m_swap/(1024*1024), 2) . \' MiB\';
2712 2712
   }
2713 2713
 ?>',
2714
-      'exclude' => 0,
2715
-      'id' => 'phpcode_10',
2716
-      'table' => 'customfield',
2717
-      'field' => 'phpcode',
2718
-      'relationship' => 'none',
2714
+        'exclude' => 0,
2715
+        'id' => 'phpcode_10',
2716
+        'table' => 'customfield',
2717
+        'field' => 'phpcode',
2718
+        'relationship' => 'none',
2719 2719
     ),
2720 2720
     'phpcode_11' => array(
2721
-      'label' => 'Total disk space',
2722
-      'alter' => array(
2721
+        'label' => 'Total disk space',
2722
+        'alter' => array(
2723 2723
         'alter_text' => 0,
2724 2724
         'text' => '',
2725 2725
         'make_link' => 0,
@@ -2736,24 +2736,24 @@  discard block
 block discarded – undo
2736 2736
         'ellipsis' => 1,
2737 2737
         'html' => 0,
2738 2738
         'strip_tags' => 0,
2739
-      ),
2740
-      'empty' => '',
2741
-      'hide_empty' => 1,
2742
-      'empty_zero' => 0,
2743
-      'value' => '<?php
2739
+        ),
2740
+        'empty' => '',
2741
+        'hide_empty' => 1,
2742
+        'empty_zero' => 0,
2743
+        'value' => '<?php
2744 2744
   if (is_current_boinc_user($data->host_userid)) {
2745 2745
     echo round($data->host_d_total/(1024*1024*1024), 2) . \' GiB\';
2746 2746
   }
2747 2747
 ?>',
2748
-      'exclude' => 0,
2749
-      'id' => 'phpcode_11',
2750
-      'table' => 'customfield',
2751
-      'field' => 'phpcode',
2752
-      'relationship' => 'none',
2748
+        'exclude' => 0,
2749
+        'id' => 'phpcode_11',
2750
+        'table' => 'customfield',
2751
+        'field' => 'phpcode',
2752
+        'relationship' => 'none',
2753 2753
     ),
2754 2754
     'phpcode_12' => array(
2755
-      'label' => 'Free disk space',
2756
-      'alter' => array(
2755
+        'label' => 'Free disk space',
2756
+        'alter' => array(
2757 2757
         'alter_text' => 0,
2758 2758
         'text' => '',
2759 2759
         'make_link' => 0,
@@ -2770,24 +2770,24 @@  discard block
 block discarded – undo
2770 2770
         'ellipsis' => 1,
2771 2771
         'html' => 0,
2772 2772
         'strip_tags' => 0,
2773
-      ),
2774
-      'empty' => '',
2775
-      'hide_empty' => 1,
2776
-      'empty_zero' => 0,
2777
-      'value' => '<?php
2773
+        ),
2774
+        'empty' => '',
2775
+        'hide_empty' => 1,
2776
+        'empty_zero' => 0,
2777
+        'value' => '<?php
2778 2778
   if (is_current_boinc_user($data->host_userid)) {
2779 2779
     echo round($data->host_d_free/(1024*1024*1024), 2) . \' GiB\';
2780 2780
   }
2781 2781
 ?>',
2782
-      'exclude' => 0,
2783
-      'id' => 'phpcode_12',
2784
-      'table' => 'customfield',
2785
-      'field' => 'phpcode',
2786
-      'relationship' => 'none',
2782
+        'exclude' => 0,
2783
+        'id' => 'phpcode_12',
2784
+        'table' => 'customfield',
2785
+        'field' => 'phpcode',
2786
+        'relationship' => 'none',
2787 2787
     ),
2788 2788
     'n_bwdown' => array(
2789
-      'label' => 'Average download rate',
2790
-      'alter' => array(
2789
+        'label' => 'Average download rate',
2790
+        'alter' => array(
2791 2791
         'alter_text' => 0,
2792 2792
         'text' => '',
2793 2793
         'make_link' => 0,
@@ -2804,25 +2804,25 @@  discard block
 block discarded – undo
2804 2804
         'ellipsis' => 1,
2805 2805
         'html' => 0,
2806 2806
         'strip_tags' => 0,
2807
-      ),
2808
-      'empty' => '',
2809
-      'hide_empty' => 0,
2810
-      'empty_zero' => 0,
2811
-      'set_precision' => 0,
2812
-      'precision' => '0',
2813
-      'decimal' => '.',
2814
-      'separator' => '',
2815
-      'prefix' => '',
2816
-      'suffix' => '',
2817
-      'exclude' => 1,
2818
-      'id' => 'n_bwdown',
2819
-      'table' => 'host',
2820
-      'field' => 'n_bwdown',
2821
-      'relationship' => 'none',
2807
+        ),
2808
+        'empty' => '',
2809
+        'hide_empty' => 0,
2810
+        'empty_zero' => 0,
2811
+        'set_precision' => 0,
2812
+        'precision' => '0',
2813
+        'decimal' => '.',
2814
+        'separator' => '',
2815
+        'prefix' => '',
2816
+        'suffix' => '',
2817
+        'exclude' => 1,
2818
+        'id' => 'n_bwdown',
2819
+        'table' => 'host',
2820
+        'field' => 'n_bwdown',
2821
+        'relationship' => 'none',
2822 2822
     ),
2823 2823
     'avg_turnaround' => array(
2824
-      'label' => 'Average turnaround time',
2825
-      'alter' => array(
2824
+        'label' => 'Average turnaround time',
2825
+        'alter' => array(
2826 2826
         'alter_text' => 0,
2827 2827
         'text' => '',
2828 2828
         'make_link' => 0,
@@ -2839,25 +2839,25 @@  discard block
 block discarded – undo
2839 2839
         'ellipsis' => 1,
2840 2840
         'html' => 0,
2841 2841
         'strip_tags' => 0,
2842
-      ),
2843
-      'empty' => '',
2844
-      'hide_empty' => 0,
2845
-      'empty_zero' => 0,
2846
-      'set_precision' => 0,
2847
-      'precision' => '0',
2848
-      'decimal' => '.',
2849
-      'separator' => '',
2850
-      'prefix' => '',
2851
-      'suffix' => '',
2852
-      'exclude' => 1,
2853
-      'id' => 'avg_turnaround',
2854
-      'table' => 'host',
2855
-      'field' => 'avg_turnaround',
2856
-      'relationship' => 'none',
2842
+        ),
2843
+        'empty' => '',
2844
+        'hide_empty' => 0,
2845
+        'empty_zero' => 0,
2846
+        'set_precision' => 0,
2847
+        'precision' => '0',
2848
+        'decimal' => '.',
2849
+        'separator' => '',
2850
+        'prefix' => '',
2851
+        'suffix' => '',
2852
+        'exclude' => 1,
2853
+        'id' => 'avg_turnaround',
2854
+        'table' => 'host',
2855
+        'field' => 'avg_turnaround',
2856
+        'relationship' => 'none',
2857 2857
     ),
2858 2858
     'n_bwup' => array(
2859
-      'label' => 'Average upload rate',
2860
-      'alter' => array(
2859
+        'label' => 'Average upload rate',
2860
+        'alter' => array(
2861 2861
         'alter_text' => 0,
2862 2862
         'text' => '',
2863 2863
         'make_link' => 0,
@@ -2874,25 +2874,25 @@  discard block
 block discarded – undo
2874 2874
         'ellipsis' => 1,
2875 2875
         'html' => 0,
2876 2876
         'strip_tags' => 0,
2877
-      ),
2878
-      'empty' => '',
2879
-      'hide_empty' => 0,
2880
-      'empty_zero' => 0,
2881
-      'set_precision' => 0,
2882
-      'precision' => '0',
2883
-      'decimal' => '.',
2884
-      'separator' => '',
2885
-      'prefix' => '',
2886
-      'suffix' => '',
2887
-      'exclude' => 1,
2888
-      'id' => 'n_bwup',
2889
-      'table' => 'host',
2890
-      'field' => 'n_bwup',
2891
-      'relationship' => 'none',
2877
+        ),
2878
+        'empty' => '',
2879
+        'hide_empty' => 0,
2880
+        'empty_zero' => 0,
2881
+        'set_precision' => 0,
2882
+        'precision' => '0',
2883
+        'decimal' => '.',
2884
+        'separator' => '',
2885
+        'prefix' => '',
2886
+        'suffix' => '',
2887
+        'exclude' => 1,
2888
+        'id' => 'n_bwup',
2889
+        'table' => 'host',
2890
+        'field' => 'n_bwup',
2891
+        'relationship' => 'none',
2892 2892
     ),
2893 2893
     'p_fpops' => array(
2894
-      'label' => 'Measured floating point speed',
2895
-      'alter' => array(
2894
+        'label' => 'Measured floating point speed',
2895
+        'alter' => array(
2896 2896
         'alter_text' => 0,
2897 2897
         'text' => '',
2898 2898
         'make_link' => 0,
@@ -2909,25 +2909,25 @@  discard block
 block discarded – undo
2909 2909
         'ellipsis' => 1,
2910 2910
         'html' => 0,
2911 2911
         'strip_tags' => 0,
2912
-      ),
2913
-      'empty' => '',
2914
-      'hide_empty' => 0,
2915
-      'empty_zero' => 0,
2916
-      'set_precision' => 0,
2917
-      'precision' => '0',
2918
-      'decimal' => '.',
2919
-      'separator' => '',
2920
-      'prefix' => '',
2921
-      'suffix' => '',
2922
-      'exclude' => 1,
2923
-      'id' => 'p_fpops',
2924
-      'table' => 'host',
2925
-      'field' => 'p_fpops',
2926
-      'relationship' => 'none',
2912
+        ),
2913
+        'empty' => '',
2914
+        'hide_empty' => 0,
2915
+        'empty_zero' => 0,
2916
+        'set_precision' => 0,
2917
+        'precision' => '0',
2918
+        'decimal' => '.',
2919
+        'separator' => '',
2920
+        'prefix' => '',
2921
+        'suffix' => '',
2922
+        'exclude' => 1,
2923
+        'id' => 'p_fpops',
2924
+        'table' => 'host',
2925
+        'field' => 'p_fpops',
2926
+        'relationship' => 'none',
2927 2927
     ),
2928 2928
     'p_iops' => array(
2929
-      'label' => 'Measured integer speed',
2930
-      'alter' => array(
2929
+        'label' => 'Measured integer speed',
2930
+        'alter' => array(
2931 2931
         'alter_text' => 0,
2932 2932
         'text' => '',
2933 2933
         'make_link' => 0,
@@ -2944,25 +2944,25 @@  discard block
 block discarded – undo
2944 2944
         'ellipsis' => 1,
2945 2945
         'html' => 0,
2946 2946
         'strip_tags' => 0,
2947
-      ),
2948
-      'empty' => '',
2949
-      'hide_empty' => 0,
2950
-      'empty_zero' => 0,
2951
-      'set_precision' => 0,
2952
-      'precision' => '0',
2953
-      'decimal' => '.',
2954
-      'separator' => '',
2955
-      'prefix' => '',
2956
-      'suffix' => '',
2957
-      'exclude' => 1,
2958
-      'id' => 'p_iops',
2959
-      'table' => 'host',
2960
-      'field' => 'p_iops',
2961
-      'relationship' => 'none',
2947
+        ),
2948
+        'empty' => '',
2949
+        'hide_empty' => 0,
2950
+        'empty_zero' => 0,
2951
+        'set_precision' => 0,
2952
+        'precision' => '0',
2953
+        'decimal' => '.',
2954
+        'separator' => '',
2955
+        'prefix' => '',
2956
+        'suffix' => '',
2957
+        'exclude' => 1,
2958
+        'id' => 'p_iops',
2959
+        'table' => 'host',
2960
+        'field' => 'p_iops',
2961
+        'relationship' => 'none',
2962 2962
     ),
2963 2963
     'phpcode_13' => array(
2964
-      'label' => 'Measured floating point speed',
2965
-      'alter' => array(
2964
+        'label' => 'Measured floating point speed',
2965
+        'alter' => array(
2966 2966
         'alter_text' => 0,
2967 2967
         'text' => '',
2968 2968
         'make_link' => 0,
@@ -2981,25 +2981,25 @@  discard block
 block discarded – undo
2981 2981
         'ellipsis' => 1,
2982 2982
         'html' => 0,
2983 2983
         'strip_tags' => 0,
2984
-      ),
2985
-      'empty' => '',
2986
-      'hide_empty' => 0,
2987
-      'empty_zero' => 0,
2988
-      'hide_alter_empty' => 1,
2989
-      'value' => '<?php
2984
+        ),
2985
+        'empty' => '',
2986
+        'hide_empty' => 0,
2987
+        'empty_zero' => 0,
2988
+        'hide_alter_empty' => 1,
2989
+        'value' => '<?php
2990 2990
   echo bts(\'@count million ops/sec\',
2991 2991
     array(\'@count\' => round($data->host_p_fpops/(1000*1000), 2)),
2992 2992
     NULL, \'boinc:host-details\');
2993 2993
 ?>',
2994
-      'exclude' => 0,
2995
-      'id' => 'phpcode_13',
2996
-      'table' => 'customfield',
2997
-      'field' => 'phpcode',
2998
-      'relationship' => 'none',
2994
+        'exclude' => 0,
2995
+        'id' => 'phpcode_13',
2996
+        'table' => 'customfield',
2997
+        'field' => 'phpcode',
2998
+        'relationship' => 'none',
2999 2999
     ),
3000 3000
     'phpcode_14' => array(
3001
-      'label' => 'Measured integer speed',
3002
-      'alter' => array(
3001
+        'label' => 'Measured integer speed',
3002
+        'alter' => array(
3003 3003
         'alter_text' => 0,
3004 3004
         'text' => '',
3005 3005
         'make_link' => 0,
@@ -3018,25 +3018,25 @@  discard block
 block discarded – undo
3018 3018
         'ellipsis' => 1,
3019 3019
         'html' => 0,
3020 3020
         'strip_tags' => 0,
3021
-      ),
3022
-      'empty' => '',
3023
-      'hide_empty' => 0,
3024
-      'empty_zero' => 0,
3025
-      'hide_alter_empty' => 1,
3026
-      'value' => '<?php
3021
+        ),
3022
+        'empty' => '',
3023
+        'hide_empty' => 0,
3024
+        'empty_zero' => 0,
3025
+        'hide_alter_empty' => 1,
3026
+        'value' => '<?php
3027 3027
   echo bts(\'@count million ops/sec\',
3028 3028
     array(\'@count\' => round($data->host_p_iops/(1000*1000), 2)),
3029 3029
     NULL, \'boinc:host-details\');
3030 3030
 ?>',
3031
-      'exclude' => 0,
3032
-      'id' => 'phpcode_14',
3033
-      'table' => 'customfield',
3034
-      'field' => 'phpcode',
3035
-      'relationship' => 'none',
3031
+        'exclude' => 0,
3032
+        'id' => 'phpcode_14',
3033
+        'table' => 'customfield',
3034
+        'field' => 'phpcode',
3035
+        'relationship' => 'none',
3036 3036
     ),
3037 3037
     'phpcode_15' => array(
3038
-      'label' => 'Average upload rate',
3039
-      'alter' => array(
3038
+        'label' => 'Average upload rate',
3039
+        'alter' => array(
3040 3040
         'alter_text' => 0,
3041 3041
         'text' => '',
3042 3042
         'make_link' => 0,
@@ -3055,24 +3055,24 @@  discard block
 block discarded – undo
3055 3055
         'ellipsis' => 1,
3056 3056
         'html' => 0,
3057 3057
         'strip_tags' => 0,
3058
-      ),
3059
-      'empty' => '',
3060
-      'hide_empty' => 0,
3061
-      'empty_zero' => 0,
3062
-      'hide_alter_empty' => 1,
3063
-      'value' => '<?php
3058
+        ),
3059
+        'empty' => '',
3060
+        'hide_empty' => 0,
3061
+        'empty_zero' => 0,
3062
+        'hide_alter_empty' => 1,
3063
+        'value' => '<?php
3064 3064
   $rate = round($data->host_n_bwup/(1024), 2);
3065 3065
   echo ($rate > 0) ? bts(\'@rate KiB/sec\', array(\'@rate\' => $rate), NULL, \'boinc:host-details\') : bts(\'Unknown\', array(), NULL, \'boinc:host-details\');
3066 3066
 ?>',
3067
-      'exclude' => 0,
3068
-      'id' => 'phpcode_15',
3069
-      'table' => 'customfield',
3070
-      'field' => 'phpcode',
3071
-      'relationship' => 'none',
3067
+        'exclude' => 0,
3068
+        'id' => 'phpcode_15',
3069
+        'table' => 'customfield',
3070
+        'field' => 'phpcode',
3071
+        'relationship' => 'none',
3072 3072
     ),
3073 3073
     'phpcode_16' => array(
3074
-      'label' => 'Average download rate',
3075
-      'alter' => array(
3074
+        'label' => 'Average download rate',
3075
+        'alter' => array(
3076 3076
         'alter_text' => 0,
3077 3077
         'text' => '',
3078 3078
         'make_link' => 0,
@@ -3091,24 +3091,24 @@  discard block
 block discarded – undo
3091 3091
         'ellipsis' => 1,
3092 3092
         'html' => 0,
3093 3093
         'strip_tags' => 0,
3094
-      ),
3095
-      'empty' => '',
3096
-      'hide_empty' => 0,
3097
-      'empty_zero' => 0,
3098
-      'hide_alter_empty' => 1,
3099
-      'value' => '<?php
3094
+        ),
3095
+        'empty' => '',
3096
+        'hide_empty' => 0,
3097
+        'empty_zero' => 0,
3098
+        'hide_alter_empty' => 1,
3099
+        'value' => '<?php
3100 3100
   $rate = round($data->host_n_bwdown/(1024), 2);
3101 3101
   echo ($rate > 0) ? bts(\'@rate KiB/sec\', array(\'@rate\' => $rate), NULL, \'boinc:host-details\') : bts(\'Unknown\', array(), NULL, \'boinc:host-details\');
3102 3102
 ?>',
3103
-      'exclude' => 0,
3104
-      'id' => 'phpcode_16',
3105
-      'table' => 'customfield',
3106
-      'field' => 'phpcode',
3107
-      'relationship' => 'none',
3103
+        'exclude' => 0,
3104
+        'id' => 'phpcode_16',
3105
+        'table' => 'customfield',
3106
+        'field' => 'phpcode',
3107
+        'relationship' => 'none',
3108 3108
     ),
3109 3109
     'phpcode_17' => array(
3110
-      'label' => 'Average turnaround time',
3111
-      'alter' => array(
3110
+        'label' => 'Average turnaround time',
3111
+        'alter' => array(
3112 3112
         'alter_text' => 0,
3113 3113
         'text' => '',
3114 3114
         'make_link' => 0,
@@ -3127,23 +3127,23 @@  discard block
 block discarded – undo
3127 3127
         'ellipsis' => 1,
3128 3128
         'html' => 0,
3129 3129
         'strip_tags' => 0,
3130
-      ),
3131
-      'empty' => '',
3132
-      'hide_empty' => 0,
3133
-      'empty_zero' => 0,
3134
-      'hide_alter_empty' => 1,
3135
-      'value' => '<?php
3130
+        ),
3131
+        'empty' => '',
3132
+        'hide_empty' => 0,
3133
+        'empty_zero' => 0,
3134
+        'hide_alter_empty' => 1,
3135
+        'value' => '<?php
3136 3136
   echo bts(\'@count days\', array(\'@count\' => round($data->host_avg_turnaround/(60*60*24), 2)), NULL, \'boinc:host-details\');
3137 3137
 ?>',
3138
-      'exclude' => 0,
3139
-      'id' => 'phpcode_17',
3140
-      'table' => 'customfield',
3141
-      'field' => 'phpcode',
3142
-      'relationship' => 'none',
3138
+        'exclude' => 0,
3139
+        'id' => 'phpcode_17',
3140
+        'table' => 'customfield',
3141
+        'field' => 'phpcode',
3142
+        'relationship' => 'none',
3143 3143
     ),
3144 3144
     'max_results_day' => array(
3145
-      'label' => 'Maximum daily WU quota per CPU',
3146
-      'alter' => array(
3145
+        'label' => 'Maximum daily WU quota per CPU',
3146
+        'alter' => array(
3147 3147
         'alter_text' => 0,
3148 3148
         'text' => '',
3149 3149
         'make_link' => 0,
@@ -3162,29 +3162,29 @@  discard block
 block discarded – undo
3162 3162
         'ellipsis' => 1,
3163 3163
         'html' => 0,
3164 3164
         'strip_tags' => 0,
3165
-      ),
3166
-      'empty' => '',
3167
-      'hide_empty' => 0,
3168
-      'empty_zero' => 0,
3169
-      'hide_alter_empty' => 1,
3170
-      'set_precision' => FALSE,
3171
-      'precision' => 0,
3172
-      'decimal' => '.',
3173
-      'separator' => '',
3174
-      'format_plural' => 0,
3175
-      'format_plural_singular' => '1',
3176
-      'format_plural_plural' => '@count',
3177
-      'prefix' => '',
3178
-      'suffix' => '/day',
3179
-      'exclude' => 1,
3180
-      'id' => 'max_results_day',
3181
-      'table' => 'host',
3182
-      'field' => 'max_results_day',
3183
-      'relationship' => 'none',
3165
+        ),
3166
+        'empty' => '',
3167
+        'hide_empty' => 0,
3168
+        'empty_zero' => 0,
3169
+        'hide_alter_empty' => 1,
3170
+        'set_precision' => FALSE,
3171
+        'precision' => 0,
3172
+        'decimal' => '.',
3173
+        'separator' => '',
3174
+        'format_plural' => 0,
3175
+        'format_plural_singular' => '1',
3176
+        'format_plural_plural' => '@count',
3177
+        'prefix' => '',
3178
+        'suffix' => '/day',
3179
+        'exclude' => 1,
3180
+        'id' => 'max_results_day',
3181
+        'table' => 'host',
3182
+        'field' => 'max_results_day',
3183
+        'relationship' => 'none',
3184 3184
     ),
3185 3185
     'nothing' => array(
3186
-      'label' => 'Application details',
3187
-      'alter' => array(
3186
+        'label' => 'Application details',
3187
+        'alter' => array(
3188 3188
         'text' => 'Show',
3189 3189
         'make_link' => 1,
3190 3190
         'path' => 'host/!1/apps',
@@ -3202,23 +3202,23 @@  discard block
 block discarded – undo
3202 3202
         'ellipsis' => 1,
3203 3203
         'html' => 0,
3204 3204
         'strip_tags' => 0,
3205
-      ),
3206
-      'empty' => '',
3207
-      'hide_empty' => 0,
3208
-      'empty_zero' => 0,
3209
-      'hide_alter_empty' => 1,
3210
-      'exclude' => 0,
3211
-      'id' => 'nothing',
3212
-      'table' => 'views',
3213
-      'field' => 'nothing',
3214
-      'override' => array(
3205
+        ),
3206
+        'empty' => '',
3207
+        'hide_empty' => 0,
3208
+        'empty_zero' => 0,
3209
+        'hide_alter_empty' => 1,
3210
+        'exclude' => 0,
3211
+        'id' => 'nothing',
3212
+        'table' => 'views',
3213
+        'field' => 'nothing',
3214
+        'override' => array(
3215 3215
         'button' => 'Override',
3216
-      ),
3217
-      'relationship' => 'none',
3216
+        ),
3217
+        'relationship' => 'none',
3218 3218
     ),
3219 3219
     'phpcode_18' => array(
3220
-      'label' => 'Tasks',
3221
-      'alter' => array(
3220
+        'label' => 'Tasks',
3221
+        'alter' => array(
3222 3222
         'alter_text' => 0,
3223 3223
         'text' => '',
3224 3224
         'make_link' => 0,
@@ -3237,12 +3237,12 @@  discard block
 block discarded – undo
3237 3237
         'ellipsis' => 1,
3238 3238
         'html' => 0,
3239 3239
         'strip_tags' => 0,
3240
-      ),
3241
-      'empty' => '0',
3242
-      'hide_empty' => 0,
3243
-      'empty_zero' => 0,
3244
-      'hide_alter_empty' => 0,
3245
-      'value' => '<?php
3240
+        ),
3241
+        'empty' => '0',
3242
+        'hide_empty' => 0,
3243
+        'empty_zero' => 0,
3244
+        'hide_alter_empty' => 0,
3245
+        'value' => '<?php
3246 3246
   //require_boint(\'util\');
3247 3247
   //$config = get_config();
3248 3248
   //if (parse_bool($config, "show_results")) {
@@ -3255,15 +3255,15 @@  discard block
 block discarded – undo
3255 3255
     }
3256 3256
   //}
3257 3257
 ?>',
3258
-      'exclude' => 0,
3259
-      'id' => 'phpcode_18',
3260
-      'table' => 'customfield',
3261
-      'field' => 'phpcode',
3262
-      'relationship' => 'none',
3258
+        'exclude' => 0,
3259
+        'id' => 'phpcode_18',
3260
+        'table' => 'customfield',
3261
+        'field' => 'phpcode',
3262
+        'relationship' => 'none',
3263 3263
     ),
3264 3264
     'rpc_seqno' => array(
3265
-      'label' => 'Number of times client has contacted server',
3266
-      'alter' => array(
3265
+        'label' => 'Number of times client has contacted server',
3266
+        'alter' => array(
3267 3267
         'alter_text' => 0,
3268 3268
         'text' => '',
3269 3269
         'make_link' => 0,
@@ -3280,25 +3280,25 @@  discard block
 block discarded – undo
3280 3280
         'ellipsis' => 1,
3281 3281
         'html' => 0,
3282 3282
         'strip_tags' => 0,
3283
-      ),
3284
-      'empty' => '',
3285
-      'hide_empty' => 0,
3286
-      'empty_zero' => 0,
3287
-      'set_precision' => FALSE,
3288
-      'precision' => 0,
3289
-      'decimal' => '.',
3290
-      'separator' => '',
3291
-      'prefix' => '',
3292
-      'suffix' => '',
3293
-      'exclude' => 1,
3294
-      'id' => 'rpc_seqno',
3295
-      'table' => 'host',
3296
-      'field' => 'rpc_seqno',
3297
-      'relationship' => 'none',
3283
+        ),
3284
+        'empty' => '',
3285
+        'hide_empty' => 0,
3286
+        'empty_zero' => 0,
3287
+        'set_precision' => FALSE,
3288
+        'precision' => 0,
3289
+        'decimal' => '.',
3290
+        'separator' => '',
3291
+        'prefix' => '',
3292
+        'suffix' => '',
3293
+        'exclude' => 1,
3294
+        'id' => 'rpc_seqno',
3295
+        'table' => 'host',
3296
+        'field' => 'rpc_seqno',
3297
+        'relationship' => 'none',
3298 3298
     ),
3299 3299
     'phpcode_2' => array(
3300
-      'label' => 'Number of times client has contacted server',
3301
-      'alter' => array(
3300
+        'label' => 'Number of times client has contacted server',
3301
+        'alter' => array(
3302 3302
         'alter_text' => 0,
3303 3303
         'text' => '',
3304 3304
         'make_link' => 0,
@@ -3317,23 +3317,23 @@  discard block
 block discarded – undo
3317 3317
         'ellipsis' => 1,
3318 3318
         'html' => 0,
3319 3319
         'strip_tags' => 0,
3320
-      ),
3321
-      'empty' => '0',
3322
-      'hide_empty' => 0,
3323
-      'empty_zero' => 0,
3324
-      'hide_alter_empty' => 0,
3325
-      'value' => '<?php
3320
+        ),
3321
+        'empty' => '0',
3322
+        'hide_empty' => 0,
3323
+        'empty_zero' => 0,
3324
+        'hide_alter_empty' => 0,
3325
+        'value' => '<?php
3326 3326
   echo $data->host_rpc_seqno;
3327 3327
 ?>',
3328
-      'exclude' => 0,
3329
-      'id' => 'phpcode_2',
3330
-      'table' => 'customfield',
3331
-      'field' => 'phpcode',
3332
-      'relationship' => 'none',
3328
+        'exclude' => 0,
3329
+        'id' => 'phpcode_2',
3330
+        'table' => 'customfield',
3331
+        'field' => 'phpcode',
3332
+        'relationship' => 'none',
3333 3333
     ),
3334 3334
     'on_frac' => array(
3335
-      'label' => '% of time BOINC client is running',
3336
-      'alter' => array(
3335
+        'label' => '% of time BOINC client is running',
3336
+        'alter' => array(
3337 3337
         'alter_text' => 0,
3338 3338
         'text' => '',
3339 3339
         'make_link' => 0,
@@ -3350,25 +3350,25 @@  discard block
 block discarded – undo
3350 3350
         'ellipsis' => 1,
3351 3351
         'html' => 0,
3352 3352
         'strip_tags' => 0,
3353
-      ),
3354
-      'empty' => '',
3355
-      'hide_empty' => 0,
3356
-      'empty_zero' => 0,
3357
-      'set_precision' => 0,
3358
-      'precision' => '0',
3359
-      'decimal' => '.',
3360
-      'separator' => '',
3361
-      'prefix' => '',
3362
-      'suffix' => '',
3363
-      'exclude' => 1,
3364
-      'id' => 'on_frac',
3365
-      'table' => 'host',
3366
-      'field' => 'on_frac',
3367
-      'relationship' => 'none',
3353
+        ),
3354
+        'empty' => '',
3355
+        'hide_empty' => 0,
3356
+        'empty_zero' => 0,
3357
+        'set_precision' => 0,
3358
+        'precision' => '0',
3359
+        'decimal' => '.',
3360
+        'separator' => '',
3361
+        'prefix' => '',
3362
+        'suffix' => '',
3363
+        'exclude' => 1,
3364
+        'id' => 'on_frac',
3365
+        'table' => 'host',
3366
+        'field' => 'on_frac',
3367
+        'relationship' => 'none',
3368 3368
     ),
3369 3369
     'rpc_time_1' => array(
3370
-      'label' => 'Last contact',
3371
-      'alter' => array(
3370
+        'label' => 'Last contact',
3371
+        'alter' => array(
3372 3372
         'alter_text' => 0,
3373 3373
         'text' => '',
3374 3374
         'make_link' => 0,
@@ -3385,21 +3385,21 @@  discard block
 block discarded – undo
3385 3385
         'ellipsis' => 1,
3386 3386
         'html' => 0,
3387 3387
         'strip_tags' => 0,
3388
-      ),
3389
-      'empty' => '',
3390
-      'hide_empty' => 0,
3391
-      'empty_zero' => 0,
3392
-      'date_format' => 'small',
3393
-      'custom_date_format' => '',
3394
-      'exclude' => 1,
3395
-      'id' => 'rpc_time_1',
3396
-      'table' => 'host',
3397
-      'field' => 'rpc_time',
3398
-      'relationship' => 'none',
3388
+        ),
3389
+        'empty' => '',
3390
+        'hide_empty' => 0,
3391
+        'empty_zero' => 0,
3392
+        'date_format' => 'small',
3393
+        'custom_date_format' => '',
3394
+        'exclude' => 1,
3395
+        'id' => 'rpc_time_1',
3396
+        'table' => 'host',
3397
+        'field' => 'rpc_time',
3398
+        'relationship' => 'none',
3399 3399
     ),
3400 3400
     'cpu_efficiency' => array(
3401
-      'label' => 'Average CPU efficiency',
3402
-      'alter' => array(
3401
+        'label' => 'Average CPU efficiency',
3402
+        'alter' => array(
3403 3403
         'alter_text' => 0,
3404 3404
         'text' => '',
3405 3405
         'make_link' => 0,
@@ -3416,25 +3416,25 @@  discard block
 block discarded – undo
3416 3416
         'ellipsis' => 1,
3417 3417
         'html' => 0,
3418 3418
         'strip_tags' => 0,
3419
-      ),
3420
-      'empty' => '',
3421
-      'hide_empty' => 0,
3422
-      'empty_zero' => 0,
3423
-      'set_precision' => 0,
3424
-      'precision' => '0',
3425
-      'decimal' => '.',
3426
-      'separator' => '',
3427
-      'prefix' => '',
3428
-      'suffix' => '',
3429
-      'exclude' => 1,
3430
-      'id' => 'cpu_efficiency',
3431
-      'table' => 'host',
3432
-      'field' => 'cpu_efficiency',
3433
-      'relationship' => 'none',
3419
+        ),
3420
+        'empty' => '',
3421
+        'hide_empty' => 0,
3422
+        'empty_zero' => 0,
3423
+        'set_precision' => 0,
3424
+        'precision' => '0',
3425
+        'decimal' => '.',
3426
+        'separator' => '',
3427
+        'prefix' => '',
3428
+        'suffix' => '',
3429
+        'exclude' => 1,
3430
+        'id' => 'cpu_efficiency',
3431
+        'table' => 'host',
3432
+        'field' => 'cpu_efficiency',
3433
+        'relationship' => 'none',
3434 3434
     ),
3435 3435
     'duration_correction_factor' => array(
3436
-      'label' => 'Task duration correction factor',
3437
-      'alter' => array(
3436
+        'label' => 'Task duration correction factor',
3437
+        'alter' => array(
3438 3438
         'alter_text' => 0,
3439 3439
         'text' => '',
3440 3440
         'make_link' => 0,
@@ -3451,25 +3451,25 @@  discard block
 block discarded – undo
3451 3451
         'ellipsis' => 1,
3452 3452
         'html' => 0,
3453 3453
         'strip_tags' => 0,
3454
-      ),
3455
-      'empty' => '',
3456
-      'hide_empty' => 0,
3457
-      'empty_zero' => 0,
3458
-      'set_precision' => FALSE,
3459
-      'precision' => 0,
3460
-      'decimal' => '.',
3461
-      'separator' => '',
3462
-      'prefix' => '',
3463
-      'suffix' => '',
3464
-      'exclude' => 1,
3465
-      'id' => 'duration_correction_factor',
3466
-      'table' => 'host',
3467
-      'field' => 'duration_correction_factor',
3468
-      'relationship' => 'none',
3454
+        ),
3455
+        'empty' => '',
3456
+        'hide_empty' => 0,
3457
+        'empty_zero' => 0,
3458
+        'set_precision' => FALSE,
3459
+        'precision' => 0,
3460
+        'decimal' => '.',
3461
+        'separator' => '',
3462
+        'prefix' => '',
3463
+        'suffix' => '',
3464
+        'exclude' => 1,
3465
+        'id' => 'duration_correction_factor',
3466
+        'table' => 'host',
3467
+        'field' => 'duration_correction_factor',
3468
+        'relationship' => 'none',
3469 3469
     ),
3470 3470
     'connected_frac' => array(
3471
-      'label' => 'While BOINC running, % of time host has an Internet connection',
3472
-      'alter' => array(
3471
+        'label' => 'While BOINC running, % of time host has an Internet connection',
3472
+        'alter' => array(
3473 3473
         'alter_text' => 0,
3474 3474
         'text' => '',
3475 3475
         'make_link' => 0,
@@ -3486,25 +3486,25 @@  discard block
 block discarded – undo
3486 3486
         'ellipsis' => 1,
3487 3487
         'html' => 0,
3488 3488
         'strip_tags' => 0,
3489
-      ),
3490
-      'empty' => '',
3491
-      'hide_empty' => 0,
3492
-      'empty_zero' => 0,
3493
-      'set_precision' => 0,
3494
-      'precision' => '0',
3495
-      'decimal' => '.',
3496
-      'separator' => '',
3497
-      'prefix' => '',
3498
-      'suffix' => '',
3499
-      'exclude' => 1,
3500
-      'id' => 'connected_frac',
3501
-      'table' => 'host',
3502
-      'field' => 'connected_frac',
3503
-      'relationship' => 'none',
3489
+        ),
3490
+        'empty' => '',
3491
+        'hide_empty' => 0,
3492
+        'empty_zero' => 0,
3493
+        'set_precision' => 0,
3494
+        'precision' => '0',
3495
+        'decimal' => '.',
3496
+        'separator' => '',
3497
+        'prefix' => '',
3498
+        'suffix' => '',
3499
+        'exclude' => 1,
3500
+        'id' => 'connected_frac',
3501
+        'table' => 'host',
3502
+        'field' => 'connected_frac',
3503
+        'relationship' => 'none',
3504 3504
     ),
3505 3505
     'active_frac' => array(
3506
-      'label' => 'While BOINC running, % of time work is allowed',
3507
-      'alter' => array(
3506
+        'label' => 'While BOINC running, % of time work is allowed',
3507
+        'alter' => array(
3508 3508
         'alter_text' => 0,
3509 3509
         'text' => '',
3510 3510
         'make_link' => 0,
@@ -3521,25 +3521,25 @@  discard block
 block discarded – undo
3521 3521
         'ellipsis' => 1,
3522 3522
         'html' => 0,
3523 3523
         'strip_tags' => 0,
3524
-      ),
3525
-      'empty' => '',
3526
-      'hide_empty' => 0,
3527
-      'empty_zero' => 0,
3528
-      'set_precision' => 0,
3529
-      'precision' => '0',
3530
-      'decimal' => '.',
3531
-      'separator' => '',
3532
-      'prefix' => '',
3533
-      'suffix' => '',
3534
-      'exclude' => 1,
3535
-      'id' => 'active_frac',
3536
-      'table' => 'host',
3537
-      'field' => 'active_frac',
3538
-      'relationship' => 'none',
3524
+        ),
3525
+        'empty' => '',
3526
+        'hide_empty' => 0,
3527
+        'empty_zero' => 0,
3528
+        'set_precision' => 0,
3529
+        'precision' => '0',
3530
+        'decimal' => '.',
3531
+        'separator' => '',
3532
+        'prefix' => '',
3533
+        'suffix' => '',
3534
+        'exclude' => 1,
3535
+        'id' => 'active_frac',
3536
+        'table' => 'host',
3537
+        'field' => 'active_frac',
3538
+        'relationship' => 'none',
3539 3539
     ),
3540 3540
     'phpcode_19' => array(
3541
-      'label' => 'Last time contacted server',
3542
-      'alter' => array(
3541
+        'label' => 'Last time contacted server',
3542
+        'alter' => array(
3543 3543
         'alter_text' => 0,
3544 3544
         'text' => '',
3545 3545
         'make_link' => 0,
@@ -3558,23 +3558,23 @@  discard block
 block discarded – undo
3558 3558
         'ellipsis' => 1,
3559 3559
         'html' => 0,
3560 3560
         'strip_tags' => 0,
3561
-      ),
3562
-      'empty' => '',
3563
-      'hide_empty' => 1,
3564
-      'empty_zero' => 0,
3565
-      'hide_alter_empty' => 1,
3566
-      'value' => '<?php
3561
+        ),
3562
+        'empty' => '',
3563
+        'hide_empty' => 1,
3564
+        'empty_zero' => 0,
3565
+        'hide_alter_empty' => 1,
3566
+        'value' => '<?php
3567 3567
   echo boincwork_host_last_contact($data->host_rpc_time, $data->id);
3568 3568
 ?>',
3569
-      'exclude' => 0,
3570
-      'id' => 'phpcode_19',
3571
-      'table' => 'customfield',
3572
-      'field' => 'phpcode',
3573
-      'relationship' => 'none',
3569
+        'exclude' => 0,
3570
+        'id' => 'phpcode_19',
3571
+        'table' => 'customfield',
3572
+        'field' => 'phpcode',
3573
+        'relationship' => 'none',
3574 3574
     ),
3575 3575
     'phpcode_20' => array(
3576
-      'label' => '% of time BOINC client is running',
3577
-      'alter' => array(
3576
+        'label' => '% of time BOINC client is running',
3577
+        'alter' => array(
3578 3578
         'alter_text' => 0,
3579 3579
         'text' => '',
3580 3580
         'make_link' => 0,
@@ -3591,24 +3591,24 @@  discard block
 block discarded – undo
3591 3591
         'ellipsis' => 1,
3592 3592
         'html' => 0,
3593 3593
         'strip_tags' => 0,
3594
-      ),
3595
-      'empty' => '',
3596
-      'hide_empty' => 1,
3597
-      'empty_zero' => 0,
3598
-      'value' => '<?php
3594
+        ),
3595
+        'empty' => '',
3596
+        'hide_empty' => 1,
3597
+        'empty_zero' => 0,
3598
+        'value' => '<?php
3599 3599
   if (is_current_boinc_user($data->host_userid)) {
3600 3600
     echo ($data->host_on_frac * 100) . \' %\';
3601 3601
   }
3602 3602
 ?>',
3603
-      'exclude' => 0,
3604
-      'id' => 'phpcode_20',
3605
-      'table' => 'customfield',
3606
-      'field' => 'phpcode',
3607
-      'relationship' => 'none',
3603
+        'exclude' => 0,
3604
+        'id' => 'phpcode_20',
3605
+        'table' => 'customfield',
3606
+        'field' => 'phpcode',
3607
+        'relationship' => 'none',
3608 3608
     ),
3609 3609
     'phpcode_21' => array(
3610
-      'label' => 'While BOINC running, % of time host has an Internet connection',
3611
-      'alter' => array(
3610
+        'label' => 'While BOINC running, % of time host has an Internet connection',
3611
+        'alter' => array(
3612 3612
         'alter_text' => 0,
3613 3613
         'text' => '',
3614 3614
         'make_link' => 0,
@@ -3625,26 +3625,26 @@  discard block
 block discarded – undo
3625 3625
         'ellipsis' => 1,
3626 3626
         'html' => 0,
3627 3627
         'strip_tags' => 0,
3628
-      ),
3629
-      'empty' => '',
3630
-      'hide_empty' => 1,
3631
-      'empty_zero' => 0,
3632
-      'value' => '<?php
3628
+        ),
3629
+        'empty' => '',
3630
+        'hide_empty' => 1,
3631
+        'empty_zero' => 0,
3632
+        'value' => '<?php
3633 3633
   if (is_current_boinc_user($data->host_userid)) {
3634 3634
     if ($data->host_connected_frac > 0) {
3635 3635
       echo ($data->host_connected_frac * 100) . \' %\';
3636 3636
     }
3637 3637
   }
3638 3638
 ?>',
3639
-      'exclude' => 0,
3640
-      'id' => 'phpcode_21',
3641
-      'table' => 'customfield',
3642
-      'field' => 'phpcode',
3643
-      'relationship' => 'none',
3639
+        'exclude' => 0,
3640
+        'id' => 'phpcode_21',
3641
+        'table' => 'customfield',
3642
+        'field' => 'phpcode',
3643
+        'relationship' => 'none',
3644 3644
     ),
3645 3645
     'phpcode_22' => array(
3646
-      'label' => 'While BOINC running, % of time work is allowed',
3647
-      'alter' => array(
3646
+        'label' => 'While BOINC running, % of time work is allowed',
3647
+        'alter' => array(
3648 3648
         'alter_text' => 0,
3649 3649
         'text' => '',
3650 3650
         'make_link' => 0,
@@ -3663,25 +3663,25 @@  discard block
 block discarded – undo
3663 3663
         'ellipsis' => 1,
3664 3664
         'html' => 0,
3665 3665
         'strip_tags' => 0,
3666
-      ),
3667
-      'empty' => '',
3668
-      'hide_empty' => 1,
3669
-      'empty_zero' => 0,
3670
-      'hide_alter_empty' => 1,
3671
-      'value' => '<?php
3666
+        ),
3667
+        'empty' => '',
3668
+        'hide_empty' => 1,
3669
+        'empty_zero' => 0,
3670
+        'hide_alter_empty' => 1,
3671
+        'value' => '<?php
3672 3672
   if (is_current_boinc_user($data->host_userid)) {
3673 3673
     echo ($data->host_active_frac * 100) . \' %\';
3674 3674
   }
3675 3675
 ?>',
3676
-      'exclude' => 0,
3677
-      'id' => 'phpcode_22',
3678
-      'table' => 'customfield',
3679
-      'field' => 'phpcode',
3680
-      'relationship' => 'none',
3676
+        'exclude' => 0,
3677
+        'id' => 'phpcode_22',
3678
+        'table' => 'customfield',
3679
+        'field' => 'phpcode',
3680
+        'relationship' => 'none',
3681 3681
     ),
3682 3682
     'phpcode_27' => array(
3683
-      'label' => 'Average CPU efficiency',
3684
-      'alter' => array(
3683
+        'label' => 'Average CPU efficiency',
3684
+        'alter' => array(
3685 3685
         'alter_text' => 0,
3686 3686
         'text' => '',
3687 3687
         'make_link' => 0,
@@ -3698,26 +3698,26 @@  discard block
 block discarded – undo
3698 3698
         'ellipsis' => 1,
3699 3699
         'html' => 0,
3700 3700
         'strip_tags' => 0,
3701
-      ),
3702
-      'empty' => '',
3703
-      'hide_empty' => 1,
3704
-      'empty_zero' => 0,
3705
-      'value' => '<?php
3701
+        ),
3702
+        'empty' => '',
3703
+        'hide_empty' => 1,
3704
+        'empty_zero' => 0,
3705
+        'value' => '<?php
3706 3706
   if (is_current_boinc_user($data->host_userid)) {
3707 3707
     if ($data->host_cpu_efficiency) {
3708 3708
       echo $data->host_cpu_efficiency;
3709 3709
     }
3710 3710
   }
3711 3711
 ?>',
3712
-      'exclude' => 0,
3713
-      'id' => 'phpcode_27',
3714
-      'table' => 'customfield',
3715
-      'field' => 'phpcode',
3716
-      'relationship' => 'none',
3712
+        'exclude' => 0,
3713
+        'id' => 'phpcode_27',
3714
+        'table' => 'customfield',
3715
+        'field' => 'phpcode',
3716
+        'relationship' => 'none',
3717 3717
     ),
3718 3718
     'phpcode_23' => array(
3719
-      'label' => 'Task duration correction factor',
3720
-      'alter' => array(
3719
+        'label' => 'Task duration correction factor',
3720
+        'alter' => array(
3721 3721
         'alter_text' => 0,
3722 3722
         'text' => '',
3723 3723
         'make_link' => 0,
@@ -3734,26 +3734,26 @@  discard block
 block discarded – undo
3734 3734
         'ellipsis' => 1,
3735 3735
         'html' => 0,
3736 3736
         'strip_tags' => 0,
3737
-      ),
3738
-      'empty' => '',
3739
-      'hide_empty' => 1,
3740
-      'empty_zero' => 0,
3741
-      'value' => '<?php
3737
+        ),
3738
+        'empty' => '',
3739
+        'hide_empty' => 1,
3740
+        'empty_zero' => 0,
3741
+        'value' => '<?php
3742 3742
   if (is_current_boinc_user($data->host_userid)) {
3743 3743
     if ($data->host_duration_correction_factor) {
3744 3744
       echo $data->host_duration_correction_factor;
3745 3745
     }
3746 3746
   }
3747 3747
 ?>',
3748
-      'exclude' => 0,
3749
-      'id' => 'phpcode_23',
3750
-      'table' => 'customfield',
3751
-      'field' => 'phpcode',
3752
-      'relationship' => 'none',
3748
+        'exclude' => 0,
3749
+        'id' => 'phpcode_23',
3750
+        'table' => 'customfield',
3751
+        'field' => 'phpcode',
3752
+        'relationship' => 'none',
3753 3753
     ),
3754 3754
     'phpcode_24' => array(
3755
-      'label' => 'Location',
3756
-      'alter' => array(
3755
+        'label' => 'Location',
3756
+        'alter' => array(
3757 3757
         'alter_text' => 0,
3758 3758
         'text' => '',
3759 3759
         'make_link' => 0,
@@ -3772,25 +3772,25 @@  discard block
 block discarded – undo
3772 3772
         'ellipsis' => 1,
3773 3773
         'html' => 0,
3774 3774
         'strip_tags' => 0,
3775
-      ),
3776
-      'empty' => '',
3777
-      'hide_empty' => 1,
3778
-      'empty_zero' => 0,
3779
-      'hide_alter_empty' => 1,
3780
-      'value' => '<?php
3775
+        ),
3776
+        'empty' => '',
3777
+        'hide_empty' => 1,
3778
+        'empty_zero' => 0,
3779
+        'hide_alter_empty' => 1,
3780
+        'value' => '<?php
3781 3781
   if (is_current_boinc_user($data->host_userid)) {
3782 3782
     echo boincwork_host_venue_selector($data->id);
3783 3783
   }
3784 3784
 ?>',
3785
-      'exclude' => 0,
3786
-      'id' => 'phpcode_24',
3787
-      'table' => 'customfield',
3788
-      'field' => 'phpcode',
3789
-      'relationship' => 'none',
3785
+        'exclude' => 0,
3786
+        'id' => 'phpcode_24',
3787
+        'table' => 'customfield',
3788
+        'field' => 'phpcode',
3789
+        'relationship' => 'none',
3790 3790
     ),
3791 3791
     'phpcode_25' => array(
3792
-      'label' => 'Actions ',
3793
-      'alter' => array(
3792
+        'label' => 'Actions ',
3793
+        'alter' => array(
3794 3794
         'alter_text' => 0,
3795 3795
         'text' => '',
3796 3796
         'make_link' => 0,
@@ -3809,48 +3809,48 @@  discard block
 block discarded – undo
3809 3809
         'ellipsis' => 1,
3810 3810
         'html' => 0,
3811 3811
         'strip_tags' => 0,
3812
-      ),
3813
-      'empty' => '',
3814
-      'hide_empty' => 1,
3815
-      'empty_zero' => 0,
3816
-      'hide_alter_empty' => 1,
3817
-      'value' => '<?php
3812
+        ),
3813
+        'empty' => '',
3814
+        'hide_empty' => 1,
3815
+        'empty_zero' => 0,
3816
+        'hide_alter_empty' => 1,
3817
+        'value' => '<?php
3818 3818
   echo boincwork_host_action_links($data->id);
3819 3819
 ?>',
3820
-      'exclude' => 0,
3821
-      'id' => 'phpcode_25',
3822
-      'table' => 'customfield',
3823
-      'field' => 'phpcode',
3824
-      'relationship' => 'none',
3825
-    ),
3826
-  ));
3827
-  $handler->override_option('arguments', array(
3820
+        'exclude' => 0,
3821
+        'id' => 'phpcode_25',
3822
+        'table' => 'customfield',
3823
+        'field' => 'phpcode',
3824
+        'relationship' => 'none',
3825
+    ),
3826
+    ));
3827
+    $handler->override_option('arguments', array(
3828 3828
     'id' => array(
3829
-      'default_action' => 'not found',
3830
-      'style_plugin' => 'default_summary',
3831
-      'style_options' => array(),
3832
-      'wildcard' => 'all',
3833
-      'wildcard_substitution' => 'All',
3834
-      'title' => 'Computer %1',
3835
-      'breadcrumb' => '',
3836
-      'default_argument_type' => 'fixed',
3837
-      'default_argument' => '',
3838
-      'validate_type' => 'numeric',
3839
-      'validate_fail' => 'not found',
3840
-      'id' => 'id',
3841
-      'table' => 'host',
3842
-      'field' => 'id',
3843
-      'validate_user_argument_type' => 'uid',
3844
-      'validate_user_roles' => array(
3829
+        'default_action' => 'not found',
3830
+        'style_plugin' => 'default_summary',
3831
+        'style_options' => array(),
3832
+        'wildcard' => 'all',
3833
+        'wildcard_substitution' => 'All',
3834
+        'title' => 'Computer %1',
3835
+        'breadcrumb' => '',
3836
+        'default_argument_type' => 'fixed',
3837
+        'default_argument' => '',
3838
+        'validate_type' => 'numeric',
3839
+        'validate_fail' => 'not found',
3840
+        'id' => 'id',
3841
+        'table' => 'host',
3842
+        'field' => 'id',
3843
+        'validate_user_argument_type' => 'uid',
3844
+        'validate_user_roles' => array(
3845 3845
         2 => 0,
3846 3846
         3 => 0,
3847
-      ),
3848
-      'relationship' => 'none',
3849
-      'default_options_div_prefix' => '',
3850
-      'default_argument_fixed' => '',
3851
-      'default_argument_user' => 0,
3852
-      'default_argument_php' => '',
3853
-      'validate_argument_node_type' => array(
3847
+        ),
3848
+        'relationship' => 'none',
3849
+        'default_options_div_prefix' => '',
3850
+        'default_argument_fixed' => '',
3851
+        'default_argument_user' => 0,
3852
+        'default_argument_php' => '',
3853
+        'validate_argument_node_type' => array(
3854 3854
         'forum' => 0,
3855 3855
         'job_post' => 0,
3856 3856
         'news' => 0,
@@ -3858,44 +3858,44 @@  discard block
 block discarded – undo
3858 3858
         'profile' => 0,
3859 3859
         'story' => 0,
3860 3860
         'team' => 0,
3861
-      ),
3862
-      'validate_argument_node_access' => 0,
3863
-      'validate_argument_nid_type' => 'nid',
3864
-      'validate_argument_vocabulary' => array(
3861
+        ),
3862
+        'validate_argument_node_access' => 0,
3863
+        'validate_argument_nid_type' => 'nid',
3864
+        'validate_argument_vocabulary' => array(
3865 3865
         1 => 0,
3866
-      ),
3867
-      'validate_argument_type' => 'tid',
3868
-      'validate_argument_transform' => 0,
3869
-      'validate_user_restrict_roles' => 0,
3870
-      'validate_argument_php' => '',
3866
+        ),
3867
+        'validate_argument_type' => 'tid',
3868
+        'validate_argument_transform' => 0,
3869
+        'validate_user_restrict_roles' => 0,
3870
+        'validate_argument_php' => '',
3871 3871
     ),
3872 3872
     'null' => array(
3873
-      'default_action' => 'default',
3874
-      'style_plugin' => 'default_summary',
3875
-      'style_options' => array(),
3876
-      'wildcard' => 'all',
3877
-      'wildcard_substitution' => 'All',
3878
-      'title' => '',
3879
-      'breadcrumb' => '',
3880
-      'default_argument_type' => 'fixed',
3881
-      'default_argument' => '',
3882
-      'validate_type' => 'none',
3883
-      'validate_fail' => 'not found',
3884
-      'must_not_be' => 0,
3885
-      'id' => 'null',
3886
-      'table' => 'views',
3887
-      'field' => 'null',
3888
-      'validate_user_argument_type' => 'uid',
3889
-      'validate_user_roles' => array(
3873
+        'default_action' => 'default',
3874
+        'style_plugin' => 'default_summary',
3875
+        'style_options' => array(),
3876
+        'wildcard' => 'all',
3877
+        'wildcard_substitution' => 'All',
3878
+        'title' => '',
3879
+        'breadcrumb' => '',
3880
+        'default_argument_type' => 'fixed',
3881
+        'default_argument' => '',
3882
+        'validate_type' => 'none',
3883
+        'validate_fail' => 'not found',
3884
+        'must_not_be' => 0,
3885
+        'id' => 'null',
3886
+        'table' => 'views',
3887
+        'field' => 'null',
3888
+        'validate_user_argument_type' => 'uid',
3889
+        'validate_user_roles' => array(
3890 3890
         2 => 0,
3891 3891
         3 => 0,
3892
-      ),
3893
-      'relationship' => 'none',
3894
-      'default_options_div_prefix' => '',
3895
-      'default_argument_fixed' => '0',
3896
-      'default_argument_user' => 0,
3897
-      'default_argument_php' => '',
3898
-      'validate_argument_node_type' => array(
3892
+        ),
3893
+        'relationship' => 'none',
3894
+        'default_options_div_prefix' => '',
3895
+        'default_argument_fixed' => '0',
3896
+        'default_argument_user' => 0,
3897
+        'default_argument_php' => '',
3898
+        'validate_argument_node_type' => array(
3899 3899
         'forum' => 0,
3900 3900
         'job_post' => 0,
3901 3901
         'news' => 0,
@@ -3903,98 +3903,98 @@  discard block
 block discarded – undo
3903 3903
         'profile' => 0,
3904 3904
         'story' => 0,
3905 3905
         'team' => 0,
3906
-      ),
3907
-      'validate_argument_node_access' => 0,
3908
-      'validate_argument_nid_type' => 'nid',
3909
-      'validate_argument_vocabulary' => array(
3906
+        ),
3907
+        'validate_argument_node_access' => 0,
3908
+        'validate_argument_nid_type' => 'nid',
3909
+        'validate_argument_vocabulary' => array(
3910 3910
         1 => 0,
3911
-      ),
3912
-      'validate_argument_type' => 'tid',
3913
-      'validate_argument_transform' => 0,
3914
-      'validate_user_restrict_roles' => 0,
3915
-      'validate_argument_php' => '',
3916
-    ),
3917
-  ));
3918
-  $handler->override_option('access', array(
3911
+        ),
3912
+        'validate_argument_type' => 'tid',
3913
+        'validate_argument_transform' => 0,
3914
+        'validate_user_restrict_roles' => 0,
3915
+        'validate_argument_php' => '',
3916
+    ),
3917
+    ));
3918
+    $handler->override_option('access', array(
3919 3919
     'type' => 'none',
3920
-  ));
3921
-  $handler->override_option('cache', array(
3920
+    ));
3921
+    $handler->override_option('cache', array(
3922 3922
     'type' => 'none',
3923
-  ));
3924
-  $handler->override_option('items_per_page', 0);
3925
-  $handler->override_option('distinct', 0);
3926
-  $handler->override_option('style_plugin', 'grid');
3927
-  $handler->override_option('style_options', array(
3923
+    ));
3924
+    $handler->override_option('items_per_page', 0);
3925
+    $handler->override_option('distinct', 0);
3926
+    $handler->override_option('style_plugin', 'grid');
3927
+    $handler->override_option('style_options', array(
3928 3928
     'grouping' => '',
3929 3929
     'columns' => '2',
3930 3930
     'alignment' => 'vertical',
3931 3931
     'fill_single_line' => 1,
3932
-  ));
3933
-  $handler->override_option('row_options', array(
3932
+    ));
3933
+    $handler->override_option('row_options', array(
3934 3934
     'inline' => array(),
3935 3935
     'separator' => '',
3936 3936
     'hide_empty' => 0,
3937
-  ));
3938
-  $handler = $view->new_display('page', 'Page', 'page_1');
3939
-  $handler->override_option('row_options', array());
3940
-  $handler->override_option('path', 'host');
3941
-  $handler->override_option('menu', array(
3937
+    ));
3938
+    $handler = $view->new_display('page', 'Page', 'page_1');
3939
+    $handler->override_option('row_options', array());
3940
+    $handler->override_option('path', 'host');
3941
+    $handler->override_option('menu', array(
3942 3942
     'type' => 'none',
3943 3943
     'title' => 'All computers',
3944 3944
     'description' => 'Show all computers associated with the account',
3945 3945
     'weight' => '1',
3946 3946
     'name' => 'navigation',
3947
-  ));
3948
-  $handler->override_option('tab_options', array(
3947
+    ));
3948
+    $handler->override_option('tab_options', array(
3949 3949
     'type' => 'none',
3950 3950
     'title' => '',
3951 3951
     'description' => '',
3952 3952
     'weight' => 0,
3953 3953
     'name' => 'navigation',
3954
-  ));
3954
+    ));
3955 3955
 
3956
-  $views[$view->name] = $view;
3956
+    $views[$view->name] = $view;
3957 3957
 
3958
-  // Exported view: boinc_host_apps
3959
-  $view = new view;
3960
-  $view->name = 'boinc_host_apps';
3961
-  $view->description = '';
3962
-  $view->tag = '';
3963
-  $view->base_table = 'host';
3964
-  $view->core = 6;
3965
-  $view->api_version = '2';
3966
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
3967
-  $handler = $view->new_display('default', 'Defaults', 'default');
3968
-  $handler->override_option('relationships', array(
3958
+    // Exported view: boinc_host_apps
3959
+    $view = new view;
3960
+    $view->name = 'boinc_host_apps';
3961
+    $view->description = '';
3962
+    $view->tag = '';
3963
+    $view->base_table = 'host';
3964
+    $view->core = 6;
3965
+    $view->api_version = '2';
3966
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
3967
+    $handler = $view->new_display('default', 'Defaults', 'default');
3968
+    $handler->override_option('relationships', array(
3969 3969
     'app_version_id' => array(
3970
-      'label' => 'App version',
3971
-      'required' => 1,
3972
-      'id' => 'app_version_id',
3973
-      'table' => 'host_app_version',
3974
-      'field' => 'app_version_id',
3975
-      'relationship' => 'none',
3970
+        'label' => 'App version',
3971
+        'required' => 1,
3972
+        'id' => 'app_version_id',
3973
+        'table' => 'host_app_version',
3974
+        'field' => 'app_version_id',
3975
+        'relationship' => 'none',
3976 3976
     ),
3977 3977
     'appid' => array(
3978
-      'label' => 'App ID',
3979
-      'required' => 1,
3980
-      'id' => 'appid',
3981
-      'table' => 'app_version',
3982
-      'field' => 'appid',
3983
-      'relationship' => 'app_version_id',
3978
+        'label' => 'App ID',
3979
+        'required' => 1,
3980
+        'id' => 'appid',
3981
+        'table' => 'app_version',
3982
+        'field' => 'appid',
3983
+        'relationship' => 'app_version_id',
3984 3984
     ),
3985 3985
     'platformid' => array(
3986
-      'label' => 'Platform ID',
3987
-      'required' => 1,
3988
-      'id' => 'platformid',
3989
-      'table' => 'app_version',
3990
-      'field' => 'platformid',
3991
-      'relationship' => 'app_version_id',
3992
-    ),
3993
-  ));
3994
-  $handler->override_option('fields', array(
3986
+        'label' => 'Platform ID',
3987
+        'required' => 1,
3988
+        'id' => 'platformid',
3989
+        'table' => 'app_version',
3990
+        'field' => 'platformid',
3991
+        'relationship' => 'app_version_id',
3992
+    ),
3993
+    ));
3994
+    $handler->override_option('fields', array(
3995 3995
     'user_friendly_name' => array(
3996
-      'label' => '',
3997
-      'alter' => array(
3996
+        'label' => '',
3997
+        'alter' => array(
3998 3998
         'alter_text' => 0,
3999 3999
         'text' => '',
4000 4000
         'make_link' => 0,
@@ -4013,20 +4013,20 @@  discard block
 block discarded – undo
4013 4013
         'ellipsis' => 1,
4014 4014
         'html' => 0,
4015 4015
         'strip_tags' => 0,
4016
-      ),
4017
-      'empty' => '',
4018
-      'hide_empty' => 0,
4019
-      'empty_zero' => 0,
4020
-      'hide_alter_empty' => 1,
4021
-      'exclude' => 0,
4022
-      'id' => 'user_friendly_name',
4023
-      'table' => 'app',
4024
-      'field' => 'user_friendly_name',
4025
-      'relationship' => 'appid',
4016
+        ),
4017
+        'empty' => '',
4018
+        'hide_empty' => 0,
4019
+        'empty_zero' => 0,
4020
+        'hide_alter_empty' => 1,
4021
+        'exclude' => 0,
4022
+        'id' => 'user_friendly_name',
4023
+        'table' => 'app',
4024
+        'field' => 'user_friendly_name',
4025
+        'relationship' => 'appid',
4026 4026
     ),
4027 4027
     'version_num' => array(
4028
-      'label' => '',
4029
-      'alter' => array(
4028
+        'label' => '',
4029
+        'alter' => array(
4030 4030
         'alter_text' => 0,
4031 4031
         'text' => '',
4032 4032
         'make_link' => 0,
@@ -4045,29 +4045,29 @@  discard block
 block discarded – undo
4045 4045
         'ellipsis' => 1,
4046 4046
         'html' => 0,
4047 4047
         'strip_tags' => 0,
4048
-      ),
4049
-      'empty' => '',
4050
-      'hide_empty' => 0,
4051
-      'empty_zero' => 0,
4052
-      'hide_alter_empty' => 1,
4053
-      'exclude' => 0,
4054
-      'set_precision' => 0,
4055
-      'precision' => '2',
4056
-      'decimal' => '.',
4057
-      'separator' => '',
4058
-      'format_plural' => 0,
4059
-      'format_plural_singular' => '1',
4060
-      'format_plural_plural' => '@count',
4061
-      'prefix' => '',
4062
-      'suffix' => '',
4063
-      'id' => 'version_num',
4064
-      'table' => 'app_version',
4065
-      'field' => 'version_num',
4066
-      'relationship' => 'app_version_id',
4048
+        ),
4049
+        'empty' => '',
4050
+        'hide_empty' => 0,
4051
+        'empty_zero' => 0,
4052
+        'hide_alter_empty' => 1,
4053
+        'exclude' => 0,
4054
+        'set_precision' => 0,
4055
+        'precision' => '2',
4056
+        'decimal' => '.',
4057
+        'separator' => '',
4058
+        'format_plural' => 0,
4059
+        'format_plural_singular' => '1',
4060
+        'format_plural_plural' => '@count',
4061
+        'prefix' => '',
4062
+        'suffix' => '',
4063
+        'id' => 'version_num',
4064
+        'table' => 'app_version',
4065
+        'field' => 'version_num',
4066
+        'relationship' => 'app_version_id',
4067 4067
     ),
4068 4068
     'name' => array(
4069
-      'label' => '',
4070
-      'alter' => array(
4069
+        'label' => '',
4070
+        'alter' => array(
4071 4071
         'alter_text' => 0,
4072 4072
         'text' => '',
4073 4073
         'make_link' => 0,
@@ -4086,20 +4086,20 @@  discard block
 block discarded – undo
4086 4086
         'ellipsis' => 1,
4087 4087
         'html' => 0,
4088 4088
         'strip_tags' => 0,
4089
-      ),
4090
-      'empty' => '',
4091
-      'hide_empty' => 0,
4092
-      'empty_zero' => 0,
4093
-      'hide_alter_empty' => 1,
4094
-      'exclude' => 0,
4095
-      'id' => 'name',
4096
-      'table' => 'platform',
4097
-      'field' => 'name',
4098
-      'relationship' => 'platformid',
4089
+        ),
4090
+        'empty' => '',
4091
+        'hide_empty' => 0,
4092
+        'empty_zero' => 0,
4093
+        'hide_alter_empty' => 1,
4094
+        'exclude' => 0,
4095
+        'id' => 'name',
4096
+        'table' => 'platform',
4097
+        'field' => 'name',
4098
+        'relationship' => 'platformid',
4099 4099
     ),
4100 4100
     'plan_class' => array(
4101
-      'label' => '',
4102
-      'alter' => array(
4101
+        'label' => '',
4102
+        'alter' => array(
4103 4103
         'alter_text' => 1,
4104 4104
         'text' => '([plan_class])',
4105 4105
         'make_link' => 0,
@@ -4118,20 +4118,20 @@  discard block
 block discarded – undo
4118 4118
         'ellipsis' => 1,
4119 4119
         'html' => 0,
4120 4120
         'strip_tags' => 0,
4121
-      ),
4122
-      'empty' => '',
4123
-      'hide_empty' => 0,
4124
-      'empty_zero' => 0,
4125
-      'hide_alter_empty' => 1,
4126
-      'exclude' => 0,
4127
-      'id' => 'plan_class',
4128
-      'table' => 'app_version',
4129
-      'field' => 'plan_class',
4130
-      'relationship' => 'app_version_id',
4121
+        ),
4122
+        'empty' => '',
4123
+        'hide_empty' => 0,
4124
+        'empty_zero' => 0,
4125
+        'hide_alter_empty' => 1,
4126
+        'exclude' => 0,
4127
+        'id' => 'plan_class',
4128
+        'table' => 'app_version',
4129
+        'field' => 'plan_class',
4130
+        'relationship' => 'app_version_id',
4131 4131
     ),
4132 4132
     'et_n' => array(
4133
-      'label' => 'Number of tasks completed',
4134
-      'alter' => array(
4133
+        'label' => 'Number of tasks completed',
4134
+        'alter' => array(
4135 4135
         'alter_text' => 0,
4136 4136
         'text' => '',
4137 4137
         'make_link' => 0,
@@ -4150,29 +4150,29 @@  discard block
 block discarded – undo
4150 4150
         'ellipsis' => 1,
4151 4151
         'html' => 0,
4152 4152
         'strip_tags' => 0,
4153
-      ),
4154
-      'empty' => '',
4155
-      'hide_empty' => 0,
4156
-      'empty_zero' => 0,
4157
-      'hide_alter_empty' => 0,
4158
-      'set_precision' => FALSE,
4159
-      'precision' => 0,
4160
-      'decimal' => '.',
4161
-      'separator' => '',
4162
-      'format_plural' => 0,
4163
-      'format_plural_singular' => '1',
4164
-      'format_plural_plural' => '@count',
4165
-      'prefix' => '',
4166
-      'suffix' => '',
4167
-      'exclude' => 0,
4168
-      'id' => 'et_n',
4169
-      'table' => 'host_app_version',
4170
-      'field' => 'et_n',
4171
-      'relationship' => 'none',
4153
+        ),
4154
+        'empty' => '',
4155
+        'hide_empty' => 0,
4156
+        'empty_zero' => 0,
4157
+        'hide_alter_empty' => 0,
4158
+        'set_precision' => FALSE,
4159
+        'precision' => 0,
4160
+        'decimal' => '.',
4161
+        'separator' => '',
4162
+        'format_plural' => 0,
4163
+        'format_plural_singular' => '1',
4164
+        'format_plural_plural' => '@count',
4165
+        'prefix' => '',
4166
+        'suffix' => '',
4167
+        'exclude' => 0,
4168
+        'id' => 'et_n',
4169
+        'table' => 'host_app_version',
4170
+        'field' => 'et_n',
4171
+        'relationship' => 'none',
4172 4172
     ),
4173 4173
     'max_jobs_per_day' => array(
4174
-      'label' => 'Max tasks per day',
4175
-      'alter' => array(
4174
+        'label' => 'Max tasks per day',
4175
+        'alter' => array(
4176 4176
         'alter_text' => 0,
4177 4177
         'text' => '',
4178 4178
         'make_link' => 0,
@@ -4191,29 +4191,29 @@  discard block
 block discarded – undo
4191 4191
         'ellipsis' => 1,
4192 4192
         'html' => 0,
4193 4193
         'strip_tags' => 0,
4194
-      ),
4195
-      'empty' => '',
4196
-      'hide_empty' => 0,
4197
-      'empty_zero' => 0,
4198
-      'hide_alter_empty' => 0,
4199
-      'set_precision' => FALSE,
4200
-      'precision' => 0,
4201
-      'decimal' => '.',
4202
-      'separator' => '',
4203
-      'format_plural' => 0,
4204
-      'format_plural_singular' => '1',
4205
-      'format_plural_plural' => '@count',
4206
-      'prefix' => '',
4207
-      'suffix' => '',
4208
-      'exclude' => 0,
4209
-      'id' => 'max_jobs_per_day',
4210
-      'table' => 'host_app_version',
4211
-      'field' => 'max_jobs_per_day',
4212
-      'relationship' => 'none',
4194
+        ),
4195
+        'empty' => '',
4196
+        'hide_empty' => 0,
4197
+        'empty_zero' => 0,
4198
+        'hide_alter_empty' => 0,
4199
+        'set_precision' => FALSE,
4200
+        'precision' => 0,
4201
+        'decimal' => '.',
4202
+        'separator' => '',
4203
+        'format_plural' => 0,
4204
+        'format_plural_singular' => '1',
4205
+        'format_plural_plural' => '@count',
4206
+        'prefix' => '',
4207
+        'suffix' => '',
4208
+        'exclude' => 0,
4209
+        'id' => 'max_jobs_per_day',
4210
+        'table' => 'host_app_version',
4211
+        'field' => 'max_jobs_per_day',
4212
+        'relationship' => 'none',
4213 4213
     ),
4214 4214
     'n_jobs_today' => array(
4215
-      'label' => 'Number of tasks today',
4216
-      'alter' => array(
4215
+        'label' => 'Number of tasks today',
4216
+        'alter' => array(
4217 4217
         'alter_text' => 0,
4218 4218
         'text' => '',
4219 4219
         'make_link' => 0,
@@ -4232,29 +4232,29 @@  discard block
 block discarded – undo
4232 4232
         'ellipsis' => 1,
4233 4233
         'html' => 0,
4234 4234
         'strip_tags' => 0,
4235
-      ),
4236
-      'empty' => '',
4237
-      'hide_empty' => 0,
4238
-      'empty_zero' => 0,
4239
-      'hide_alter_empty' => 0,
4240
-      'set_precision' => FALSE,
4241
-      'precision' => 0,
4242
-      'decimal' => '.',
4243
-      'separator' => '',
4244
-      'format_plural' => 0,
4245
-      'format_plural_singular' => '1',
4246
-      'format_plural_plural' => '@count',
4247
-      'prefix' => '',
4248
-      'suffix' => '',
4249
-      'exclude' => 0,
4250
-      'id' => 'n_jobs_today',
4251
-      'table' => 'host_app_version',
4252
-      'field' => 'n_jobs_today',
4253
-      'relationship' => 'none',
4235
+        ),
4236
+        'empty' => '',
4237
+        'hide_empty' => 0,
4238
+        'empty_zero' => 0,
4239
+        'hide_alter_empty' => 0,
4240
+        'set_precision' => FALSE,
4241
+        'precision' => 0,
4242
+        'decimal' => '.',
4243
+        'separator' => '',
4244
+        'format_plural' => 0,
4245
+        'format_plural_singular' => '1',
4246
+        'format_plural_plural' => '@count',
4247
+        'prefix' => '',
4248
+        'suffix' => '',
4249
+        'exclude' => 0,
4250
+        'id' => 'n_jobs_today',
4251
+        'table' => 'host_app_version',
4252
+        'field' => 'n_jobs_today',
4253
+        'relationship' => 'none',
4254 4254
     ),
4255 4255
     'consecutive_valid' => array(
4256
-      'label' => 'Consecutive valid tasks',
4257
-      'alter' => array(
4256
+        'label' => 'Consecutive valid tasks',
4257
+        'alter' => array(
4258 4258
         'alter_text' => 0,
4259 4259
         'text' => '',
4260 4260
         'make_link' => 0,
@@ -4273,29 +4273,29 @@  discard block
 block discarded – undo
4273 4273
         'ellipsis' => 1,
4274 4274
         'html' => 0,
4275 4275
         'strip_tags' => 0,
4276
-      ),
4277
-      'empty' => '',
4278
-      'hide_empty' => 0,
4279
-      'empty_zero' => 0,
4280
-      'hide_alter_empty' => 0,
4281
-      'set_precision' => FALSE,
4282
-      'precision' => 0,
4283
-      'decimal' => '.',
4284
-      'separator' => '',
4285
-      'format_plural' => 0,
4286
-      'format_plural_singular' => '1',
4287
-      'format_plural_plural' => '@count',
4288
-      'prefix' => '',
4289
-      'suffix' => '',
4290
-      'exclude' => 0,
4291
-      'id' => 'consecutive_valid',
4292
-      'table' => 'host_app_version',
4293
-      'field' => 'consecutive_valid',
4294
-      'relationship' => 'none',
4276
+        ),
4277
+        'empty' => '',
4278
+        'hide_empty' => 0,
4279
+        'empty_zero' => 0,
4280
+        'hide_alter_empty' => 0,
4281
+        'set_precision' => FALSE,
4282
+        'precision' => 0,
4283
+        'decimal' => '.',
4284
+        'separator' => '',
4285
+        'format_plural' => 0,
4286
+        'format_plural_singular' => '1',
4287
+        'format_plural_plural' => '@count',
4288
+        'prefix' => '',
4289
+        'suffix' => '',
4290
+        'exclude' => 0,
4291
+        'id' => 'consecutive_valid',
4292
+        'table' => 'host_app_version',
4293
+        'field' => 'consecutive_valid',
4294
+        'relationship' => 'none',
4295 4295
     ),
4296 4296
     'et_avg' => array(
4297
-      'label' => 'Average processing rate',
4298
-      'alter' => array(
4297
+        'label' => 'Average processing rate',
4298
+        'alter' => array(
4299 4299
         'alter_text' => 0,
4300 4300
         'text' => '',
4301 4301
         'make_link' => 0,
@@ -4314,29 +4314,29 @@  discard block
 block discarded – undo
4314 4314
         'ellipsis' => 1,
4315 4315
         'html' => 0,
4316 4316
         'strip_tags' => 0,
4317
-      ),
4318
-      'empty' => '',
4319
-      'hide_empty' => 0,
4320
-      'empty_zero' => 0,
4321
-      'hide_alter_empty' => 1,
4322
-      'exclude' => 0,
4323
-      'set_precision' => FALSE,
4324
-      'precision' => 0,
4325
-      'decimal' => '.',
4326
-      'separator' => ',',
4327
-      'format_plural' => 0,
4328
-      'format_plural_singular' => '1',
4329
-      'format_plural_plural' => '@count',
4330
-      'prefix' => '',
4331
-      'suffix' => '',
4332
-      'id' => 'et_avg',
4333
-      'table' => 'host_app_version',
4334
-      'field' => 'et_avg',
4335
-      'relationship' => 'none',
4317
+        ),
4318
+        'empty' => '',
4319
+        'hide_empty' => 0,
4320
+        'empty_zero' => 0,
4321
+        'hide_alter_empty' => 1,
4322
+        'exclude' => 0,
4323
+        'set_precision' => FALSE,
4324
+        'precision' => 0,
4325
+        'decimal' => '.',
4326
+        'separator' => ',',
4327
+        'format_plural' => 0,
4328
+        'format_plural_singular' => '1',
4329
+        'format_plural_plural' => '@count',
4330
+        'prefix' => '',
4331
+        'suffix' => '',
4332
+        'id' => 'et_avg',
4333
+        'table' => 'host_app_version',
4334
+        'field' => 'et_avg',
4335
+        'relationship' => 'none',
4336 4336
     ),
4337 4337
     'turnaround_avg' => array(
4338
-      'label' => 'Average turnaround time',
4339
-      'alter' => array(
4338
+        'label' => 'Average turnaround time',
4339
+        'alter' => array(
4340 4340
         'alter_text' => 0,
4341 4341
         'text' => '',
4342 4342
         'make_link' => 0,
@@ -4355,45 +4355,45 @@  discard block
 block discarded – undo
4355 4355
         'ellipsis' => 1,
4356 4356
         'html' => 0,
4357 4357
         'strip_tags' => 0,
4358
-      ),
4359
-      'empty' => '',
4360
-      'hide_empty' => 0,
4361
-      'empty_zero' => 0,
4362
-      'hide_alter_empty' => 1,
4363
-      'exclude' => 0,
4364
-      'set_precision' => 0,
4365
-      'precision' => '2',
4366
-      'decimal' => '.',
4367
-      'separator' => '',
4368
-      'format_plural' => 0,
4369
-      'format_plural_singular' => '1',
4370
-      'format_plural_plural' => '@count',
4371
-      'prefix' => '',
4372
-      'suffix' => '',
4373
-      'id' => 'turnaround_avg',
4374
-      'table' => 'host_app_version',
4375
-      'field' => 'turnaround_avg',
4376
-      'relationship' => 'none',
4358
+        ),
4359
+        'empty' => '',
4360
+        'hide_empty' => 0,
4361
+        'empty_zero' => 0,
4362
+        'hide_alter_empty' => 1,
4363
+        'exclude' => 0,
4364
+        'set_precision' => 0,
4365
+        'precision' => '2',
4366
+        'decimal' => '.',
4367
+        'separator' => '',
4368
+        'format_plural' => 0,
4369
+        'format_plural_singular' => '1',
4370
+        'format_plural_plural' => '@count',
4371
+        'prefix' => '',
4372
+        'suffix' => '',
4373
+        'id' => 'turnaround_avg',
4374
+        'table' => 'host_app_version',
4375
+        'field' => 'turnaround_avg',
4376
+        'relationship' => 'none',
4377 4377
     ),
4378
-  ));
4379
-  $handler->override_option('arguments', array(
4378
+    ));
4379
+    $handler->override_option('arguments', array(
4380 4380
     'host_id' => array(
4381
-      'default_action' => 'not found',
4382
-      'style_plugin' => 'default_summary',
4383
-      'style_options' => array(),
4384
-      'wildcard' => 'all',
4385
-      'wildcard_substitution' => 'All',
4386
-      'title' => '',
4387
-      'breadcrumb' => '',
4388
-      'default_argument_type' => 'fixed',
4389
-      'default_argument' => '',
4390
-      'validate_type' => 'numeric',
4391
-      'validate_fail' => 'not found',
4392
-      'id' => 'host_id',
4393
-      'table' => 'host_app_version',
4394
-      'field' => 'host_id',
4395
-      'validate_user_argument_type' => 'uid',
4396
-      'validate_user_roles' => array(
4381
+        'default_action' => 'not found',
4382
+        'style_plugin' => 'default_summary',
4383
+        'style_options' => array(),
4384
+        'wildcard' => 'all',
4385
+        'wildcard_substitution' => 'All',
4386
+        'title' => '',
4387
+        'breadcrumb' => '',
4388
+        'default_argument_type' => 'fixed',
4389
+        'default_argument' => '',
4390
+        'validate_type' => 'numeric',
4391
+        'validate_fail' => 'not found',
4392
+        'id' => 'host_id',
4393
+        'table' => 'host_app_version',
4394
+        'field' => 'host_id',
4395
+        'validate_user_argument_type' => 'uid',
4396
+        'validate_user_roles' => array(
4397 4397
         2 => 0,
4398 4398
         3519698132 => 0,
4399 4399
         1110965548 => 0,
@@ -4401,10 +4401,10 @@  discard block
 block discarded – undo
4401 4401
         1257454314 => 0,
4402 4402
         1271379760 => 0,
4403 4403
         933038561 => 0,
4404
-      ),
4405
-      'me_redirect' => 0,
4406
-      'me_validate_user_argument_type' => 'uid',
4407
-      'me_validate_user_roles' => array(
4404
+        ),
4405
+        'me_redirect' => 0,
4406
+        'me_validate_user_argument_type' => 'uid',
4407
+        'me_validate_user_roles' => array(
4408 4408
         2 => 0,
4409 4409
         3519698132 => 0,
4410 4410
         1110965548 => 0,
@@ -4412,20 +4412,20 @@  discard block
 block discarded – undo
4412 4412
         1257454314 => 0,
4413 4413
         1271379760 => 0,
4414 4414
         933038561 => 0,
4415
-      ),
4416
-      'relationship' => 'none',
4417
-      'default_options_div_prefix' => '',
4418
-      'default_taxonomy_tid_term_page' => 0,
4419
-      'default_taxonomy_tid_node' => 0,
4420
-      'default_taxonomy_tid_limit' => 0,
4421
-      'default_taxonomy_tid_vids' => array(
4415
+        ),
4416
+        'relationship' => 'none',
4417
+        'default_options_div_prefix' => '',
4418
+        'default_taxonomy_tid_term_page' => 0,
4419
+        'default_taxonomy_tid_node' => 0,
4420
+        'default_taxonomy_tid_limit' => 0,
4421
+        'default_taxonomy_tid_vids' => array(
4422 4422
         1 => 0,
4423 4423
         2 => 0,
4424
-      ),
4425
-      'default_argument_user' => 0,
4426
-      'default_argument_fixed' => '',
4427
-      'default_argument_php' => '',
4428
-      'validate_argument_node_type' => array(
4424
+        ),
4425
+        'default_argument_user' => 0,
4426
+        'default_argument_fixed' => '',
4427
+        'default_argument_php' => '',
4428
+        'validate_argument_node_type' => array(
4429 4429
         'page' => 0,
4430 4430
         'news' => 0,
4431 4431
         'team' => 0,
@@ -4434,51 +4434,51 @@  discard block
 block discarded – undo
4434 4434
         'forum' => 0,
4435 4435
         'panel' => 0,
4436 4436
         'story' => 0,
4437
-      ),
4438
-      'validate_argument_node_access' => 0,
4439
-      'validate_argument_nid_type' => 'nid',
4440
-      'validate_argument_vocabulary' => array(
4437
+        ),
4438
+        'validate_argument_node_access' => 0,
4439
+        'validate_argument_nid_type' => 'nid',
4440
+        'validate_argument_vocabulary' => array(
4441 4441
         1 => 0,
4442 4442
         2 => 0,
4443
-      ),
4444
-      'validate_argument_type' => 'tid',
4445
-      'validate_argument_transform' => 0,
4446
-      'validate_user_restrict_roles' => 0,
4447
-      'validate_argument_node_flag_name' => '*relationship*',
4448
-      'validate_argument_node_flag_test' => 'flaggable',
4449
-      'validate_argument_node_flag_id_type' => 'id',
4450
-      'validate_argument_user_flag_name' => '*relationship*',
4451
-      'validate_argument_user_flag_test' => 'flaggable',
4452
-      'validate_argument_user_flag_id_type' => 'id',
4453
-      'validate_argument_php' => '',
4454
-      'me_validate_user_restrict_roles' => 0,
4455
-    ),
4456
-  ));
4457
-  $handler->override_option('access', array(
4443
+        ),
4444
+        'validate_argument_type' => 'tid',
4445
+        'validate_argument_transform' => 0,
4446
+        'validate_user_restrict_roles' => 0,
4447
+        'validate_argument_node_flag_name' => '*relationship*',
4448
+        'validate_argument_node_flag_test' => 'flaggable',
4449
+        'validate_argument_node_flag_id_type' => 'id',
4450
+        'validate_argument_user_flag_name' => '*relationship*',
4451
+        'validate_argument_user_flag_test' => 'flaggable',
4452
+        'validate_argument_user_flag_id_type' => 'id',
4453
+        'validate_argument_php' => '',
4454
+        'me_validate_user_restrict_roles' => 0,
4455
+    ),
4456
+    ));
4457
+    $handler->override_option('access', array(
4458 4458
     'type' => 'none',
4459
-  ));
4460
-  $handler->override_option('cache', array(
4459
+    ));
4460
+    $handler->override_option('cache', array(
4461 4461
     'type' => 'none',
4462
-  ));
4463
-  $handler->override_option('use_pager', '1');
4464
-  $handler->override_option('style_options', array(
4462
+    ));
4463
+    $handler->override_option('use_pager', '1');
4464
+    $handler->override_option('style_options', array(
4465 4465
     'grouping' => '',
4466
-  ));
4467
-  $handler->override_option('row_options', array(
4466
+    ));
4467
+    $handler->override_option('row_options', array(
4468 4468
     'inline' => array(
4469
-      'user_friendly_name' => 'user_friendly_name',
4470
-      'version_num' => 'version_num',
4471
-      'name' => 'name',
4472
-      'plan_class' => 'plan_class',
4469
+        'user_friendly_name' => 'user_friendly_name',
4470
+        'version_num' => 'version_num',
4471
+        'name' => 'name',
4472
+        'plan_class' => 'plan_class',
4473 4473
     ),
4474 4474
     'separator' => ' ',
4475 4475
     'hide_empty' => 0,
4476
-  ));
4477
-  $handler = $view->new_display('page', 'Page', 'page_1');
4478
-  $handler->override_option('fields', array(
4476
+    ));
4477
+    $handler = $view->new_display('page', 'Page', 'page_1');
4478
+    $handler->override_option('fields', array(
4479 4479
     'user_friendly_name' => array(
4480
-      'label' => '',
4481
-      'alter' => array(
4480
+        'label' => '',
4481
+        'alter' => array(
4482 4482
         'alter_text' => 1,
4483 4483
         'text' => '<b>[user_friendly_name]',
4484 4484
         'make_link' => 0,
@@ -4497,23 +4497,23 @@  discard block
 block discarded – undo
4497 4497
         'ellipsis' => 1,
4498 4498
         'html' => 0,
4499 4499
         'strip_tags' => 0,
4500
-      ),
4501
-      'empty' => '',
4502
-      'hide_empty' => 0,
4503
-      'empty_zero' => 0,
4504
-      'hide_alter_empty' => 1,
4505
-      'exclude' => 0,
4506
-      'id' => 'user_friendly_name',
4507
-      'table' => 'app',
4508
-      'field' => 'user_friendly_name',
4509
-      'relationship' => 'appid',
4510
-      'override' => array(
4500
+        ),
4501
+        'empty' => '',
4502
+        'hide_empty' => 0,
4503
+        'empty_zero' => 0,
4504
+        'hide_alter_empty' => 1,
4505
+        'exclude' => 0,
4506
+        'id' => 'user_friendly_name',
4507
+        'table' => 'app',
4508
+        'field' => 'user_friendly_name',
4509
+        'relationship' => 'appid',
4510
+        'override' => array(
4511 4511
         'button' => 'Use default',
4512
-      ),
4512
+        ),
4513 4513
     ),
4514 4514
     'version_num' => array(
4515
-      'label' => '',
4516
-      'alter' => array(
4515
+        'label' => '',
4516
+        'alter' => array(
4517 4517
         'alter_text' => 0,
4518 4518
         'text' => '',
4519 4519
         'make_link' => 0,
@@ -4532,29 +4532,29 @@  discard block
 block discarded – undo
4532 4532
         'ellipsis' => 1,
4533 4533
         'html' => 0,
4534 4534
         'strip_tags' => 0,
4535
-      ),
4536
-      'empty' => '',
4537
-      'hide_empty' => 0,
4538
-      'empty_zero' => 0,
4539
-      'hide_alter_empty' => 1,
4540
-      'exclude' => 0,
4541
-      'set_precision' => 0,
4542
-      'precision' => '2',
4543
-      'decimal' => '.',
4544
-      'separator' => '',
4545
-      'format_plural' => 0,
4546
-      'format_plural_singular' => '1',
4547
-      'format_plural_plural' => '@count',
4548
-      'prefix' => '',
4549
-      'suffix' => '',
4550
-      'id' => 'version_num',
4551
-      'table' => 'app_version',
4552
-      'field' => 'version_num',
4553
-      'relationship' => 'app_version_id',
4535
+        ),
4536
+        'empty' => '',
4537
+        'hide_empty' => 0,
4538
+        'empty_zero' => 0,
4539
+        'hide_alter_empty' => 1,
4540
+        'exclude' => 0,
4541
+        'set_precision' => 0,
4542
+        'precision' => '2',
4543
+        'decimal' => '.',
4544
+        'separator' => '',
4545
+        'format_plural' => 0,
4546
+        'format_plural_singular' => '1',
4547
+        'format_plural_plural' => '@count',
4548
+        'prefix' => '',
4549
+        'suffix' => '',
4550
+        'id' => 'version_num',
4551
+        'table' => 'app_version',
4552
+        'field' => 'version_num',
4553
+        'relationship' => 'app_version_id',
4554 4554
     ),
4555 4555
     'name' => array(
4556
-      'label' => '',
4557
-      'alter' => array(
4556
+        'label' => '',
4557
+        'alter' => array(
4558 4558
         'alter_text' => 0,
4559 4559
         'text' => '',
4560 4560
         'make_link' => 0,
@@ -4573,20 +4573,20 @@  discard block
 block discarded – undo
4573 4573
         'ellipsis' => 1,
4574 4574
         'html' => 0,
4575 4575
         'strip_tags' => 0,
4576
-      ),
4577
-      'empty' => '',
4578
-      'hide_empty' => 0,
4579
-      'empty_zero' => 0,
4580
-      'hide_alter_empty' => 1,
4581
-      'exclude' => 0,
4582
-      'id' => 'name',
4583
-      'table' => 'platform',
4584
-      'field' => 'name',
4585
-      'relationship' => 'platformid',
4576
+        ),
4577
+        'empty' => '',
4578
+        'hide_empty' => 0,
4579
+        'empty_zero' => 0,
4580
+        'hide_alter_empty' => 1,
4581
+        'exclude' => 0,
4582
+        'id' => 'name',
4583
+        'table' => 'platform',
4584
+        'field' => 'name',
4585
+        'relationship' => 'platformid',
4586 4586
     ),
4587 4587
     'plan_class' => array(
4588
-      'label' => '',
4589
-      'alter' => array(
4588
+        'label' => '',
4589
+        'alter' => array(
4590 4590
         'alter_text' => 1,
4591 4591
         'text' => '([plan_class])</b>',
4592 4592
         'make_link' => 0,
@@ -4605,23 +4605,23 @@  discard block
 block discarded – undo
4605 4605
         'ellipsis' => 1,
4606 4606
         'html' => 0,
4607 4607
         'strip_tags' => 0,
4608
-      ),
4609
-      'empty' => '',
4610
-      'hide_empty' => 0,
4611
-      'empty_zero' => 0,
4612
-      'hide_alter_empty' => 0,
4613
-      'exclude' => 0,
4614
-      'id' => 'plan_class',
4615
-      'table' => 'app_version',
4616
-      'field' => 'plan_class',
4617
-      'relationship' => 'app_version_id',
4618
-      'override' => array(
4608
+        ),
4609
+        'empty' => '',
4610
+        'hide_empty' => 0,
4611
+        'empty_zero' => 0,
4612
+        'hide_alter_empty' => 0,
4613
+        'exclude' => 0,
4614
+        'id' => 'plan_class',
4615
+        'table' => 'app_version',
4616
+        'field' => 'plan_class',
4617
+        'relationship' => 'app_version_id',
4618
+        'override' => array(
4619 4619
         'button' => 'Use default',
4620
-      ),
4620
+        ),
4621 4621
     ),
4622 4622
     'et_n' => array(
4623
-      'label' => 'Number of tasks completed',
4624
-      'alter' => array(
4623
+        'label' => 'Number of tasks completed',
4624
+        'alter' => array(
4625 4625
         'alter_text' => 0,
4626 4626
         'text' => '',
4627 4627
         'make_link' => 0,
@@ -4640,29 +4640,29 @@  discard block
 block discarded – undo
4640 4640
         'ellipsis' => 1,
4641 4641
         'html' => 0,
4642 4642
         'strip_tags' => 0,
4643
-      ),
4644
-      'empty' => '',
4645
-      'hide_empty' => 0,
4646
-      'empty_zero' => 0,
4647
-      'hide_alter_empty' => 0,
4648
-      'set_precision' => FALSE,
4649
-      'precision' => 0,
4650
-      'decimal' => '.',
4651
-      'separator' => '',
4652
-      'format_plural' => 0,
4653
-      'format_plural_singular' => '1',
4654
-      'format_plural_plural' => '@count',
4655
-      'prefix' => '',
4656
-      'suffix' => '',
4657
-      'exclude' => 0,
4658
-      'id' => 'et_n',
4659
-      'table' => 'host_app_version',
4660
-      'field' => 'et_n',
4661
-      'relationship' => 'none',
4643
+        ),
4644
+        'empty' => '',
4645
+        'hide_empty' => 0,
4646
+        'empty_zero' => 0,
4647
+        'hide_alter_empty' => 0,
4648
+        'set_precision' => FALSE,
4649
+        'precision' => 0,
4650
+        'decimal' => '.',
4651
+        'separator' => '',
4652
+        'format_plural' => 0,
4653
+        'format_plural_singular' => '1',
4654
+        'format_plural_plural' => '@count',
4655
+        'prefix' => '',
4656
+        'suffix' => '',
4657
+        'exclude' => 0,
4658
+        'id' => 'et_n',
4659
+        'table' => 'host_app_version',
4660
+        'field' => 'et_n',
4661
+        'relationship' => 'none',
4662 4662
     ),
4663 4663
     'max_jobs_per_day' => array(
4664
-      'label' => 'Max tasks per day',
4665
-      'alter' => array(
4664
+        'label' => 'Max tasks per day',
4665
+        'alter' => array(
4666 4666
         'alter_text' => 0,
4667 4667
         'text' => '',
4668 4668
         'make_link' => 0,
@@ -4681,29 +4681,29 @@  discard block
 block discarded – undo
4681 4681
         'ellipsis' => 1,
4682 4682
         'html' => 0,
4683 4683
         'strip_tags' => 0,
4684
-      ),
4685
-      'empty' => '',
4686
-      'hide_empty' => 0,
4687
-      'empty_zero' => 0,
4688
-      'hide_alter_empty' => 0,
4689
-      'set_precision' => FALSE,
4690
-      'precision' => 0,
4691
-      'decimal' => '.',
4692
-      'separator' => '',
4693
-      'format_plural' => 0,
4694
-      'format_plural_singular' => '1',
4695
-      'format_plural_plural' => '@count',
4696
-      'prefix' => '',
4697
-      'suffix' => '',
4698
-      'exclude' => 0,
4699
-      'id' => 'max_jobs_per_day',
4700
-      'table' => 'host_app_version',
4701
-      'field' => 'max_jobs_per_day',
4702
-      'relationship' => 'none',
4684
+        ),
4685
+        'empty' => '',
4686
+        'hide_empty' => 0,
4687
+        'empty_zero' => 0,
4688
+        'hide_alter_empty' => 0,
4689
+        'set_precision' => FALSE,
4690
+        'precision' => 0,
4691
+        'decimal' => '.',
4692
+        'separator' => '',
4693
+        'format_plural' => 0,
4694
+        'format_plural_singular' => '1',
4695
+        'format_plural_plural' => '@count',
4696
+        'prefix' => '',
4697
+        'suffix' => '',
4698
+        'exclude' => 0,
4699
+        'id' => 'max_jobs_per_day',
4700
+        'table' => 'host_app_version',
4701
+        'field' => 'max_jobs_per_day',
4702
+        'relationship' => 'none',
4703 4703
     ),
4704 4704
     'n_jobs_today' => array(
4705
-      'label' => 'Number of tasks today',
4706
-      'alter' => array(
4705
+        'label' => 'Number of tasks today',
4706
+        'alter' => array(
4707 4707
         'alter_text' => 0,
4708 4708
         'text' => '',
4709 4709
         'make_link' => 0,
@@ -4722,29 +4722,29 @@  discard block
 block discarded – undo
4722 4722
         'ellipsis' => 1,
4723 4723
         'html' => 0,
4724 4724
         'strip_tags' => 0,
4725
-      ),
4726
-      'empty' => '',
4727
-      'hide_empty' => 0,
4728
-      'empty_zero' => 0,
4729
-      'hide_alter_empty' => 0,
4730
-      'set_precision' => FALSE,
4731
-      'precision' => 0,
4732
-      'decimal' => '.',
4733
-      'separator' => '',
4734
-      'format_plural' => 0,
4735
-      'format_plural_singular' => '1',
4736
-      'format_plural_plural' => '@count',
4737
-      'prefix' => '',
4738
-      'suffix' => '',
4739
-      'exclude' => 0,
4740
-      'id' => 'n_jobs_today',
4741
-      'table' => 'host_app_version',
4742
-      'field' => 'n_jobs_today',
4743
-      'relationship' => 'none',
4725
+        ),
4726
+        'empty' => '',
4727
+        'hide_empty' => 0,
4728
+        'empty_zero' => 0,
4729
+        'hide_alter_empty' => 0,
4730
+        'set_precision' => FALSE,
4731
+        'precision' => 0,
4732
+        'decimal' => '.',
4733
+        'separator' => '',
4734
+        'format_plural' => 0,
4735
+        'format_plural_singular' => '1',
4736
+        'format_plural_plural' => '@count',
4737
+        'prefix' => '',
4738
+        'suffix' => '',
4739
+        'exclude' => 0,
4740
+        'id' => 'n_jobs_today',
4741
+        'table' => 'host_app_version',
4742
+        'field' => 'n_jobs_today',
4743
+        'relationship' => 'none',
4744 4744
     ),
4745 4745
     'consecutive_valid' => array(
4746
-      'label' => 'Consecutive valid tasks',
4747
-      'alter' => array(
4746
+        'label' => 'Consecutive valid tasks',
4747
+        'alter' => array(
4748 4748
         'alter_text' => 0,
4749 4749
         'text' => '',
4750 4750
         'make_link' => 0,
@@ -4763,29 +4763,29 @@  discard block
 block discarded – undo
4763 4763
         'ellipsis' => 1,
4764 4764
         'html' => 0,
4765 4765
         'strip_tags' => 0,
4766
-      ),
4767
-      'empty' => '',
4768
-      'hide_empty' => 0,
4769
-      'empty_zero' => 0,
4770
-      'hide_alter_empty' => 0,
4771
-      'set_precision' => FALSE,
4772
-      'precision' => 0,
4773
-      'decimal' => '.',
4774
-      'separator' => '',
4775
-      'format_plural' => 0,
4776
-      'format_plural_singular' => '1',
4777
-      'format_plural_plural' => '@count',
4778
-      'prefix' => '',
4779
-      'suffix' => '',
4780
-      'exclude' => 0,
4781
-      'id' => 'consecutive_valid',
4782
-      'table' => 'host_app_version',
4783
-      'field' => 'consecutive_valid',
4784
-      'relationship' => 'none',
4766
+        ),
4767
+        'empty' => '',
4768
+        'hide_empty' => 0,
4769
+        'empty_zero' => 0,
4770
+        'hide_alter_empty' => 0,
4771
+        'set_precision' => FALSE,
4772
+        'precision' => 0,
4773
+        'decimal' => '.',
4774
+        'separator' => '',
4775
+        'format_plural' => 0,
4776
+        'format_plural_singular' => '1',
4777
+        'format_plural_plural' => '@count',
4778
+        'prefix' => '',
4779
+        'suffix' => '',
4780
+        'exclude' => 0,
4781
+        'id' => 'consecutive_valid',
4782
+        'table' => 'host_app_version',
4783
+        'field' => 'consecutive_valid',
4784
+        'relationship' => 'none',
4785 4785
     ),
4786 4786
     'et_avg' => array(
4787
-      'label' => 'Average processing rate',
4788
-      'alter' => array(
4787
+        'label' => 'Average processing rate',
4788
+        'alter' => array(
4789 4789
         'alter_text' => 0,
4790 4790
         'text' => '',
4791 4791
         'make_link' => 0,
@@ -4804,29 +4804,29 @@  discard block
 block discarded – undo
4804 4804
         'ellipsis' => 1,
4805 4805
         'html' => 0,
4806 4806
         'strip_tags' => 0,
4807
-      ),
4808
-      'empty' => '',
4809
-      'hide_empty' => 0,
4810
-      'empty_zero' => 0,
4811
-      'hide_alter_empty' => 1,
4812
-      'exclude' => 0,
4813
-      'set_precision' => FALSE,
4814
-      'precision' => 0,
4815
-      'decimal' => '.',
4816
-      'separator' => ',',
4817
-      'format_plural' => 0,
4818
-      'format_plural_singular' => '1',
4819
-      'format_plural_plural' => '@count',
4820
-      'prefix' => '',
4821
-      'suffix' => '',
4822
-      'id' => 'et_avg',
4823
-      'table' => 'host_app_version',
4824
-      'field' => 'et_avg',
4825
-      'relationship' => 'none',
4807
+        ),
4808
+        'empty' => '',
4809
+        'hide_empty' => 0,
4810
+        'empty_zero' => 0,
4811
+        'hide_alter_empty' => 1,
4812
+        'exclude' => 0,
4813
+        'set_precision' => FALSE,
4814
+        'precision' => 0,
4815
+        'decimal' => '.',
4816
+        'separator' => ',',
4817
+        'format_plural' => 0,
4818
+        'format_plural_singular' => '1',
4819
+        'format_plural_plural' => '@count',
4820
+        'prefix' => '',
4821
+        'suffix' => '',
4822
+        'id' => 'et_avg',
4823
+        'table' => 'host_app_version',
4824
+        'field' => 'et_avg',
4825
+        'relationship' => 'none',
4826 4826
     ),
4827 4827
     'turnaround_avg' => array(
4828
-      'label' => 'Average turnaround time',
4829
-      'alter' => array(
4828
+        'label' => 'Average turnaround time',
4829
+        'alter' => array(
4830 4830
         'alter_text' => 0,
4831 4831
         'text' => '',
4832 4832
         'make_link' => 0,
@@ -4845,67 +4845,67 @@  discard block
 block discarded – undo
4845 4845
         'ellipsis' => 1,
4846 4846
         'html' => 0,
4847 4847
         'strip_tags' => 0,
4848
-      ),
4849
-      'empty' => '',
4850
-      'hide_empty' => 0,
4851
-      'empty_zero' => 0,
4852
-      'hide_alter_empty' => 1,
4853
-      'exclude' => 0,
4854
-      'set_precision' => 0,
4855
-      'precision' => '2',
4856
-      'decimal' => '.',
4857
-      'separator' => '',
4858
-      'format_plural' => 0,
4859
-      'format_plural_singular' => '1',
4860
-      'format_plural_plural' => '@count',
4861
-      'prefix' => '',
4862
-      'suffix' => '',
4863
-      'id' => 'turnaround_avg',
4864
-      'table' => 'host_app_version',
4865
-      'field' => 'turnaround_avg',
4866
-      'relationship' => 'none',
4848
+        ),
4849
+        'empty' => '',
4850
+        'hide_empty' => 0,
4851
+        'empty_zero' => 0,
4852
+        'hide_alter_empty' => 1,
4853
+        'exclude' => 0,
4854
+        'set_precision' => 0,
4855
+        'precision' => '2',
4856
+        'decimal' => '.',
4857
+        'separator' => '',
4858
+        'format_plural' => 0,
4859
+        'format_plural_singular' => '1',
4860
+        'format_plural_plural' => '@count',
4861
+        'prefix' => '',
4862
+        'suffix' => '',
4863
+        'id' => 'turnaround_avg',
4864
+        'table' => 'host_app_version',
4865
+        'field' => 'turnaround_avg',
4866
+        'relationship' => 'none',
4867 4867
     ),
4868
-  ));
4869
-  $handler->override_option('title', 'Application details');
4870
-  $handler->override_option('path', 'host/%/apps');
4871
-  $handler->override_option('menu', array(
4868
+    ));
4869
+    $handler->override_option('title', 'Application details');
4870
+    $handler->override_option('path', 'host/%/apps');
4871
+    $handler->override_option('menu', array(
4872 4872
     'type' => 'none',
4873 4873
     'title' => '',
4874 4874
     'description' => '',
4875 4875
     'weight' => 0,
4876 4876
     'name' => 'primary-links',
4877
-  ));
4878
-  $handler->override_option('tab_options', array(
4877
+    ));
4878
+    $handler->override_option('tab_options', array(
4879 4879
     'type' => 'none',
4880 4880
     'title' => '',
4881 4881
     'description' => '',
4882 4882
     'weight' => 0,
4883 4883
     'name' => 'navigation',
4884
-  ));
4884
+    ));
4885 4885
 
4886
-  $views[$view->name] = $view;
4886
+    $views[$view->name] = $view;
4887 4887
 
4888
-  // Exported view: boinc_host_list
4889
-  $view = new view;
4890
-  $view->name = 'boinc_host_list';
4891
-  $view->description = 'A list of computers associated with a given user';
4892
-  $view->tag = '';
4893
-  $view->base_table = 'host';
4894
-  $view->core = 0;
4895
-  $view->api_version = '2';
4896
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
4897
-  $handler = $view->new_display('default', 'Defaults', 'default');
4898
-  $handler->override_option('relationships', array(
4888
+    // Exported view: boinc_host_list
4889
+    $view = new view;
4890
+    $view->name = 'boinc_host_list';
4891
+    $view->description = 'A list of computers associated with a given user';
4892
+    $view->tag = '';
4893
+    $view->base_table = 'host';
4894
+    $view->core = 0;
4895
+    $view->api_version = '2';
4896
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
4897
+    $handler = $view->new_display('default', 'Defaults', 'default');
4898
+    $handler->override_option('relationships', array(
4899 4899
     'userid' => array(
4900
-      'id' => 'userid',
4901
-      'table' => 'host',
4902
-      'field' => 'userid',
4900
+        'id' => 'userid',
4901
+        'table' => 'host',
4902
+        'field' => 'userid',
4903 4903
     ),
4904
-  ));
4905
-  $handler->override_option('fields', array(
4904
+    ));
4905
+    $handler->override_option('fields', array(
4906 4906
     'id' => array(
4907
-      'label' => 'Computer ID',
4908
-      'alter' => array(
4907
+        'label' => 'Computer ID',
4908
+        'alter' => array(
4909 4909
         'alter_text' => 0,
4910 4910
         'text' => 'ID: [id]
4911 4911
 <a href="">Details</a> | <a href="">Tasks</a>
@@ -4925,25 +4925,25 @@  discard block
 block discarded – undo
4925 4925
         'ellipsis' => 1,
4926 4926
         'html' => 0,
4927 4927
         'strip_tags' => 0,
4928
-      ),
4929
-      'empty' => '',
4930
-      'hide_empty' => 0,
4931
-      'empty_zero' => 0,
4932
-      'set_precision' => FALSE,
4933
-      'precision' => 0,
4934
-      'decimal' => '.',
4935
-      'separator' => '',
4936
-      'prefix' => 'ID: ',
4937
-      'suffix' => '',
4938
-      'exclude' => 0,
4939
-      'id' => 'id',
4940
-      'table' => 'host',
4941
-      'field' => 'id',
4942
-      'relationship' => 'none',
4928
+        ),
4929
+        'empty' => '',
4930
+        'hide_empty' => 0,
4931
+        'empty_zero' => 0,
4932
+        'set_precision' => FALSE,
4933
+        'precision' => 0,
4934
+        'decimal' => '.',
4935
+        'separator' => '',
4936
+        'prefix' => 'ID: ',
4937
+        'suffix' => '',
4938
+        'exclude' => 0,
4939
+        'id' => 'id',
4940
+        'table' => 'host',
4941
+        'field' => 'id',
4942
+        'relationship' => 'none',
4943 4943
     ),
4944 4944
     'phpcode_3' => array(
4945
-      'label' => 'Computer links',
4946
-      'alter' => array(
4945
+        'label' => 'Computer links',
4946
+        'alter' => array(
4947 4947
         'alter_text' => 0,
4948 4948
         'text' => '',
4949 4949
         'make_link' => 0,
@@ -4962,23 +4962,23 @@  discard block
 block discarded – undo
4962 4962
         'ellipsis' => 1,
4963 4963
         'html' => 0,
4964 4964
         'strip_tags' => 0,
4965
-      ),
4966
-      'empty' => '',
4967
-      'hide_empty' => 0,
4968
-      'empty_zero' => 0,
4969
-      'hide_alter_empty' => 1,
4970
-      'value' => '<?php
4965
+        ),
4966
+        'empty' => '',
4967
+        'hide_empty' => 0,
4968
+        'empty_zero' => 0,
4969
+        'hide_alter_empty' => 1,
4970
+        'value' => '<?php
4971 4971
   echo l(bts(\'Details\', array(), NULL, \'boinc:host-details\'), "host/{$data->id}") . \'&nbsp;|&nbsp;\' . l(bts(\'Tasks\', array(), NULL, \'boinc:host-tasks-link\'), "host/{$data->id}/tasks/0/0");
4972 4972
 ?>',
4973
-      'exclude' => 0,
4974
-      'id' => 'phpcode_3',
4975
-      'table' => 'customfield',
4976
-      'field' => 'phpcode',
4977
-      'relationship' => 'none',
4973
+        'exclude' => 0,
4974
+        'id' => 'phpcode_3',
4975
+        'table' => 'customfield',
4976
+        'field' => 'phpcode',
4977
+        'relationship' => 'none',
4978 4978
     ),
4979 4979
     'host_cpid' => array(
4980
-      'label' => 'Cross project ID',
4981
-      'alter' => array(
4980
+        'label' => 'Cross project ID',
4981
+        'alter' => array(
4982 4982
         'alter_text' => 0,
4983 4983
         'text' => '',
4984 4984
         'make_link' => 0,
@@ -4995,19 +4995,19 @@  discard block
 block discarded – undo
4995 4995
         'ellipsis' => 1,
4996 4996
         'html' => 0,
4997 4997
         'strip_tags' => 0,
4998
-      ),
4999
-      'empty' => '',
5000
-      'hide_empty' => 0,
5001
-      'empty_zero' => 0,
5002
-      'exclude' => 1,
5003
-      'id' => 'host_cpid',
5004
-      'table' => 'host',
5005
-      'field' => 'host_cpid',
5006
-      'relationship' => 'none',
4998
+        ),
4999
+        'empty' => '',
5000
+        'hide_empty' => 0,
5001
+        'empty_zero' => 0,
5002
+        'exclude' => 1,
5003
+        'id' => 'host_cpid',
5004
+        'table' => 'host',
5005
+        'field' => 'host_cpid',
5006
+        'relationship' => 'none',
5007 5007
     ),
5008 5008
     'phpcode_4' => array(
5009
-      'label' => 'Cross-project statistics',
5010
-      'alter' => array(
5009
+        'label' => 'Cross-project statistics',
5010
+        'alter' => array(
5011 5011
         'alter_text' => 0,
5012 5012
         'text' => '',
5013 5013
         'make_link' => 0,
@@ -5024,11 +5024,11 @@  discard block
 block discarded – undo
5024 5024
         'ellipsis' => 1,
5025 5025
         'html' => 0,
5026 5026
         'strip_tags' => 0,
5027
-      ),
5028
-      'empty' => '',
5029
-      'hide_empty' => 0,
5030
-      'empty_zero' => 0,
5031
-      'value' => '<?php
5027
+        ),
5028
+        'empty' => '',
5029
+        'hide_empty' => 0,
5030
+        'empty_zero' => 0,
5031
+        'value' => '<?php
5032 5032
   require_boinc(\'stats_sites\');
5033 5033
   global $host_sites;
5034 5034
   $x = "";
@@ -5041,15 +5041,15 @@  discard block
 block discarded – undo
5041 5041
   }
5042 5042
   echo "Cross-project stats: {$x}";
5043 5043
 ?>',
5044
-      'exclude' => 0,
5045
-      'id' => 'phpcode_4',
5046
-      'table' => 'customfield',
5047
-      'field' => 'phpcode',
5048
-      'relationship' => 'none',
5044
+        'exclude' => 0,
5045
+        'id' => 'phpcode_4',
5046
+        'table' => 'customfield',
5047
+        'field' => 'phpcode',
5048
+        'relationship' => 'none',
5049 5049
     ),
5050 5050
     'rownumber' => array(
5051
-      'label' => 'Rank',
5052
-      'alter' => array(
5051
+        'label' => 'Rank',
5052
+        'alter' => array(
5053 5053
         'alter_text' => 0,
5054 5054
         'text' => '',
5055 5055
         'make_link' => 0,
@@ -5066,19 +5066,19 @@  discard block
 block discarded – undo
5066 5066
         'ellipsis' => 1,
5067 5067
         'html' => 0,
5068 5068
         'strip_tags' => 0,
5069
-      ),
5070
-      'empty' => '',
5071
-      'hide_empty' => 0,
5072
-      'empty_zero' => 0,
5073
-      'exclude' => 0,
5074
-      'id' => 'rownumber',
5075
-      'table' => 'customfield',
5076
-      'field' => 'rownumber',
5077
-      'relationship' => 'none',
5069
+        ),
5070
+        'empty' => '',
5071
+        'hide_empty' => 0,
5072
+        'empty_zero' => 0,
5073
+        'exclude' => 0,
5074
+        'id' => 'rownumber',
5075
+        'table' => 'customfield',
5076
+        'field' => 'rownumber',
5077
+        'relationship' => 'none',
5078 5078
     ),
5079 5079
     'expavg_credit' => array(
5080
-      'label' => 'Avg. credit',
5081
-      'alter' => array(
5080
+        'label' => 'Avg. credit',
5081
+        'alter' => array(
5082 5082
         'alter_text' => 0,
5083 5083
         'text' => '',
5084 5084
         'make_link' => 0,
@@ -5095,25 +5095,25 @@  discard block
 block discarded – undo
5095 5095
         'ellipsis' => 1,
5096 5096
         'html' => 0,
5097 5097
         'strip_tags' => 0,
5098
-      ),
5099
-      'empty' => '',
5100
-      'hide_empty' => 0,
5101
-      'empty_zero' => 0,
5102
-      'set_precision' => 1,
5103
-      'precision' => '2',
5104
-      'decimal' => '.',
5105
-      'separator' => ',',
5106
-      'prefix' => '',
5107
-      'suffix' => '',
5108
-      'exclude' => 0,
5109
-      'id' => 'expavg_credit',
5110
-      'table' => 'host',
5111
-      'field' => 'expavg_credit',
5112
-      'relationship' => 'none',
5098
+        ),
5099
+        'empty' => '',
5100
+        'hide_empty' => 0,
5101
+        'empty_zero' => 0,
5102
+        'set_precision' => 1,
5103
+        'precision' => '2',
5104
+        'decimal' => '.',
5105
+        'separator' => ',',
5106
+        'prefix' => '',
5107
+        'suffix' => '',
5108
+        'exclude' => 0,
5109
+        'id' => 'expavg_credit',
5110
+        'table' => 'host',
5111
+        'field' => 'expavg_credit',
5112
+        'relationship' => 'none',
5113 5113
     ),
5114 5114
     'total_credit' => array(
5115
-      'label' => 'Total credit',
5116
-      'alter' => array(
5115
+        'label' => 'Total credit',
5116
+        'alter' => array(
5117 5117
         'alter_text' => 0,
5118 5118
         'text' => '',
5119 5119
         'make_link' => 0,
@@ -5132,29 +5132,29 @@  discard block
 block discarded – undo
5132 5132
         'ellipsis' => 1,
5133 5133
         'html' => 0,
5134 5134
         'strip_tags' => 0,
5135
-      ),
5136
-      'empty' => '',
5137
-      'hide_empty' => 0,
5138
-      'empty_zero' => 0,
5139
-      'hide_alter_empty' => 1,
5140
-      'set_precision' => 1,
5141
-      'precision' => '0',
5142
-      'decimal' => '.',
5143
-      'separator' => ',',
5144
-      'format_plural' => 0,
5145
-      'format_plural_singular' => '1',
5146
-      'format_plural_plural' => '@count',
5147
-      'prefix' => '',
5148
-      'suffix' => '',
5149
-      'exclude' => 0,
5150
-      'id' => 'total_credit',
5151
-      'table' => 'host',
5152
-      'field' => 'total_credit',
5153
-      'relationship' => 'none',
5135
+        ),
5136
+        'empty' => '',
5137
+        'hide_empty' => 0,
5138
+        'empty_zero' => 0,
5139
+        'hide_alter_empty' => 1,
5140
+        'set_precision' => 1,
5141
+        'precision' => '0',
5142
+        'decimal' => '.',
5143
+        'separator' => ',',
5144
+        'format_plural' => 0,
5145
+        'format_plural_singular' => '1',
5146
+        'format_plural_plural' => '@count',
5147
+        'prefix' => '',
5148
+        'suffix' => '',
5149
+        'exclude' => 0,
5150
+        'id' => 'total_credit',
5151
+        'table' => 'host',
5152
+        'field' => 'total_credit',
5153
+        'relationship' => 'none',
5154 5154
     ),
5155 5155
     'serialnum' => array(
5156
-      'label' => 'Serial Number',
5157
-      'alter' => array(
5156
+        'label' => 'Serial Number',
5157
+        'alter' => array(
5158 5158
         'alter_text' => 0,
5159 5159
         'text' => '',
5160 5160
         'make_link' => 0,
@@ -5171,19 +5171,19 @@  discard block
 block discarded – undo
5171 5171
         'ellipsis' => 1,
5172 5172
         'html' => 0,
5173 5173
         'strip_tags' => 0,
5174
-      ),
5175
-      'empty' => '',
5176
-      'hide_empty' => 0,
5177
-      'empty_zero' => 0,
5178
-      'exclude' => 1,
5179
-      'id' => 'serialnum',
5180
-      'table' => 'host',
5181
-      'field' => 'serialnum',
5182
-      'relationship' => 'none',
5174
+        ),
5175
+        'empty' => '',
5176
+        'hide_empty' => 0,
5177
+        'empty_zero' => 0,
5178
+        'exclude' => 1,
5179
+        'id' => 'serialnum',
5180
+        'table' => 'host',
5181
+        'field' => 'serialnum',
5182
+        'relationship' => 'none',
5183 5183
     ),
5184 5184
     'phpcode' => array(
5185
-      'label' => 'BOINC version',
5186
-      'alter' => array(
5185
+        'label' => 'BOINC version',
5186
+        'alter' => array(
5187 5187
         'alter_text' => 0,
5188 5188
         'text' => '',
5189 5189
         'make_link' => 0,
@@ -5200,23 +5200,23 @@  discard block
 block discarded – undo
5200 5200
         'ellipsis' => 1,
5201 5201
         'html' => 0,
5202 5202
         'strip_tags' => 0,
5203
-      ),
5204
-      'empty' => '',
5205
-      'hide_empty' => 0,
5206
-      'empty_zero' => 0,
5207
-      'value' => '<?php
5203
+        ),
5204
+        'empty' => '',
5205
+        'hide_empty' => 0,
5206
+        'empty_zero' => 0,
5207
+        'value' => '<?php
5208 5208
   require_boinc(\'host\');
5209 5209
   echo boinc_version(parse_serialnum($data->host_serialnum));
5210 5210
 ?>',
5211
-      'exclude' => 0,
5212
-      'id' => 'phpcode',
5213
-      'table' => 'customfield',
5214
-      'field' => 'phpcode',
5215
-      'relationship' => 'none',
5211
+        'exclude' => 0,
5212
+        'id' => 'phpcode',
5213
+        'table' => 'customfield',
5214
+        'field' => 'phpcode',
5215
+        'relationship' => 'none',
5216 5216
     ),
5217 5217
     'p_vendor' => array(
5218
-      'label' => 'CPU',
5219
-      'alter' => array(
5218
+        'label' => 'CPU',
5219
+        'alter' => array(
5220 5220
         'alter_text' => 0,
5221 5221
         'text' => '',
5222 5222
         'make_link' => 0,
@@ -5233,22 +5233,22 @@  discard block
 block discarded – undo
5233 5233
         'ellipsis' => 1,
5234 5234
         'html' => 0,
5235 5235
         'strip_tags' => 0,
5236
-      ),
5237
-      'empty' => '',
5238
-      'hide_empty' => 0,
5239
-      'empty_zero' => 0,
5240
-      'exclude' => 0,
5241
-      'id' => 'p_vendor',
5242
-      'table' => 'host',
5243
-      'field' => 'p_vendor',
5244
-      'relationship' => 'none',
5245
-      'override' => array(
5236
+        ),
5237
+        'empty' => '',
5238
+        'hide_empty' => 0,
5239
+        'empty_zero' => 0,
5240
+        'exclude' => 0,
5241
+        'id' => 'p_vendor',
5242
+        'table' => 'host',
5243
+        'field' => 'p_vendor',
5244
+        'relationship' => 'none',
5245
+        'override' => array(
5246 5246
         'button' => 'Override',
5247
-      ),
5247
+        ),
5248 5248
     ),
5249 5249
     'p_model' => array(
5250
-      'label' => 'CPU model',
5251
-      'alter' => array(
5250
+        'label' => 'CPU model',
5251
+        'alter' => array(
5252 5252
         'alter_text' => 0,
5253 5253
         'text' => '',
5254 5254
         'make_link' => 0,
@@ -5265,19 +5265,19 @@  discard block
 block discarded – undo
5265 5265
         'ellipsis' => 1,
5266 5266
         'html' => 0,
5267 5267
         'strip_tags' => 0,
5268
-      ),
5269
-      'empty' => '',
5270
-      'hide_empty' => 0,
5271
-      'empty_zero' => 0,
5272
-      'exclude' => 0,
5273
-      'id' => 'p_model',
5274
-      'table' => 'host',
5275
-      'field' => 'p_model',
5276
-      'relationship' => 'none',
5268
+        ),
5269
+        'empty' => '',
5270
+        'hide_empty' => 0,
5271
+        'empty_zero' => 0,
5272
+        'exclude' => 0,
5273
+        'id' => 'p_model',
5274
+        'table' => 'host',
5275
+        'field' => 'p_model',
5276
+        'relationship' => 'none',
5277 5277
     ),
5278 5278
     'p_ncpus' => array(
5279
-      'label' => 'Number of CPUs',
5280
-      'alter' => array(
5279
+        'label' => 'Number of CPUs',
5280
+        'alter' => array(
5281 5281
         'alter_text' => 1,
5282 5282
         'text' => '([p_ncpus] processors)',
5283 5283
         'make_link' => 0,
@@ -5294,19 +5294,19 @@  discard block
 block discarded – undo
5294 5294
         'ellipsis' => 1,
5295 5295
         'html' => 0,
5296 5296
         'strip_tags' => 0,
5297
-      ),
5298
-      'empty' => '',
5299
-      'hide_empty' => 0,
5300
-      'empty_zero' => 0,
5301
-      'exclude' => 0,
5302
-      'id' => 'p_ncpus',
5303
-      'table' => 'host',
5304
-      'field' => 'p_ncpus',
5305
-      'relationship' => 'none',
5297
+        ),
5298
+        'empty' => '',
5299
+        'hide_empty' => 0,
5300
+        'empty_zero' => 0,
5301
+        'exclude' => 0,
5302
+        'id' => 'p_ncpus',
5303
+        'table' => 'host',
5304
+        'field' => 'p_ncpus',
5305
+        'relationship' => 'none',
5306 5306
     ),
5307 5307
     'phpcode_1' => array(
5308
-      'label' => 'GPU',
5309
-      'alter' => array(
5308
+        'label' => 'GPU',
5309
+        'alter' => array(
5310 5310
         'alter_text' => 0,
5311 5311
         'text' => '',
5312 5312
         'make_link' => 0,
@@ -5323,23 +5323,23 @@  discard block
 block discarded – undo
5323 5323
         'ellipsis' => 1,
5324 5324
         'html' => 0,
5325 5325
         'strip_tags' => 0,
5326
-      ),
5327
-      'empty' => '',
5328
-      'hide_empty' => 0,
5329
-      'empty_zero' => 0,
5330
-      'value' => '<?php
5326
+        ),
5327
+        'empty' => '',
5328
+        'hide_empty' => 0,
5329
+        'empty_zero' => 0,
5330
+        'value' => '<?php
5331 5331
   require_boinc(\'host\');
5332 5332
   echo gpu_desc(parse_serialnum($data->host_serialnum));
5333 5333
 ?>',
5334
-      'exclude' => 0,
5335
-      'id' => 'phpcode_1',
5336
-      'table' => 'customfield',
5337
-      'field' => 'phpcode',
5338
-      'relationship' => 'none',
5334
+        'exclude' => 0,
5335
+        'id' => 'phpcode_1',
5336
+        'table' => 'customfield',
5337
+        'field' => 'phpcode',
5338
+        'relationship' => 'none',
5339 5339
     ),
5340 5340
     'os_name' => array(
5341
-      'label' => 'Operating system',
5342
-      'alter' => array(
5341
+        'label' => 'Operating system',
5342
+        'alter' => array(
5343 5343
         'alter_text' => 0,
5344 5344
         'text' => '',
5345 5345
         'make_link' => 0,
@@ -5356,19 +5356,19 @@  discard block
 block discarded – undo
5356 5356
         'ellipsis' => 1,
5357 5357
         'html' => 0,
5358 5358
         'strip_tags' => 0,
5359
-      ),
5360
-      'empty' => '',
5361
-      'hide_empty' => 0,
5362
-      'empty_zero' => 0,
5363
-      'exclude' => 0,
5364
-      'id' => 'os_name',
5365
-      'table' => 'host',
5366
-      'field' => 'os_name',
5367
-      'relationship' => 'none',
5359
+        ),
5360
+        'empty' => '',
5361
+        'hide_empty' => 0,
5362
+        'empty_zero' => 0,
5363
+        'exclude' => 0,
5364
+        'id' => 'os_name',
5365
+        'table' => 'host',
5366
+        'field' => 'os_name',
5367
+        'relationship' => 'none',
5368 5368
     ),
5369 5369
     'os_version' => array(
5370
-      'label' => 'Operating system version',
5371
-      'alter' => array(
5370
+        'label' => 'Operating system version',
5371
+        'alter' => array(
5372 5372
         'alter_text' => 0,
5373 5373
         'text' => '',
5374 5374
         'make_link' => 0,
@@ -5385,19 +5385,19 @@  discard block
 block discarded – undo
5385 5385
         'ellipsis' => 1,
5386 5386
         'html' => 0,
5387 5387
         'strip_tags' => 0,
5388
-      ),
5389
-      'empty' => '',
5390
-      'hide_empty' => 0,
5391
-      'empty_zero' => 0,
5392
-      'exclude' => 0,
5393
-      'id' => 'os_version',
5394
-      'table' => 'host',
5395
-      'field' => 'os_version',
5396
-      'relationship' => 'none',
5388
+        ),
5389
+        'empty' => '',
5390
+        'hide_empty' => 0,
5391
+        'empty_zero' => 0,
5392
+        'exclude' => 0,
5393
+        'id' => 'os_version',
5394
+        'table' => 'host',
5395
+        'field' => 'os_version',
5396
+        'relationship' => 'none',
5397 5397
     ),
5398 5398
     'rpc_time' => array(
5399
-      'label' => 'Last contact',
5400
-      'alter' => array(
5399
+        'label' => 'Last contact',
5400
+        'alter' => array(
5401 5401
         'alter_text' => 0,
5402 5402
         'text' => '',
5403 5403
         'make_link' => 0,
@@ -5416,22 +5416,22 @@  discard block
 block discarded – undo
5416 5416
         'ellipsis' => 1,
5417 5417
         'html' => 0,
5418 5418
         'strip_tags' => 0,
5419
-      ),
5420
-      'empty' => '',
5421
-      'hide_empty' => 0,
5422
-      'empty_zero' => 0,
5423
-      'hide_alter_empty' => 1,
5424
-      'date_format' => 'custom',
5425
-      'custom_date_format' => 'j M Y G:i:s T',
5426
-      'exclude' => 1,
5427
-      'id' => 'rpc_time',
5428
-      'table' => 'host',
5429
-      'field' => 'rpc_time',
5430
-      'relationship' => 'none',
5419
+        ),
5420
+        'empty' => '',
5421
+        'hide_empty' => 0,
5422
+        'empty_zero' => 0,
5423
+        'hide_alter_empty' => 1,
5424
+        'date_format' => 'custom',
5425
+        'custom_date_format' => 'j M Y G:i:s T',
5426
+        'exclude' => 1,
5427
+        'id' => 'rpc_time',
5428
+        'table' => 'host',
5429
+        'field' => 'rpc_time',
5430
+        'relationship' => 'none',
5431 5431
     ),
5432 5432
     'phpcode_2' => array(
5433
-      'label' => 'Last contact',
5434
-      'alter' => array(
5433
+        'label' => 'Last contact',
5434
+        'alter' => array(
5435 5435
         'alter_text' => 0,
5436 5436
         'text' => '',
5437 5437
         'make_link' => 0,
@@ -5450,48 +5450,48 @@  discard block
 block discarded – undo
5450 5450
         'ellipsis' => 1,
5451 5451
         'html' => 0,
5452 5452
         'strip_tags' => 0,
5453
-      ),
5454
-      'empty' => '',
5455
-      'hide_empty' => 0,
5456
-      'empty_zero' => 0,
5457
-      'hide_alter_empty' => 1,
5458
-      'value' => '<?php
5453
+        ),
5454
+        'empty' => '',
5455
+        'hide_empty' => 0,
5456
+        'empty_zero' => 0,
5457
+        'hide_alter_empty' => 1,
5458
+        'value' => '<?php
5459 5459
   echo boincwork_host_last_contact($data->host_rpc_time, $data->id);
5460 5460
 ?>',
5461
-      'exclude' => 0,
5462
-      'id' => 'phpcode_2',
5463
-      'table' => 'customfield',
5464
-      'field' => 'phpcode',
5465
-      'relationship' => 'none',
5466
-    ),
5467
-  ));
5468
-  $handler->override_option('arguments', array(
5461
+        'exclude' => 0,
5462
+        'id' => 'phpcode_2',
5463
+        'table' => 'customfield',
5464
+        'field' => 'phpcode',
5465
+        'relationship' => 'none',
5466
+    ),
5467
+    ));
5468
+    $handler->override_option('arguments', array(
5469 5469
     'userid' => array(
5470
-      'default_action' => 'not found',
5471
-      'style_plugin' => 'default_summary',
5472
-      'style_options' => array(),
5473
-      'wildcard' => 'all',
5474
-      'wildcard_substitution' => 'All',
5475
-      'title' => '',
5476
-      'breadcrumb' => '',
5477
-      'default_argument_type' => 'fixed',
5478
-      'default_argument' => '',
5479
-      'validate_type' => 'numeric',
5480
-      'validate_fail' => 'not found',
5481
-      'id' => 'userid',
5482
-      'table' => 'host',
5483
-      'field' => 'userid',
5484
-      'validate_user_argument_type' => 'uid',
5485
-      'validate_user_roles' => array(
5470
+        'default_action' => 'not found',
5471
+        'style_plugin' => 'default_summary',
5472
+        'style_options' => array(),
5473
+        'wildcard' => 'all',
5474
+        'wildcard_substitution' => 'All',
5475
+        'title' => '',
5476
+        'breadcrumb' => '',
5477
+        'default_argument_type' => 'fixed',
5478
+        'default_argument' => '',
5479
+        'validate_type' => 'numeric',
5480
+        'validate_fail' => 'not found',
5481
+        'id' => 'userid',
5482
+        'table' => 'host',
5483
+        'field' => 'userid',
5484
+        'validate_user_argument_type' => 'uid',
5485
+        'validate_user_roles' => array(
5486 5486
         2 => 0,
5487 5487
         3 => 0,
5488
-      ),
5489
-      'relationship' => 'none',
5490
-      'default_options_div_prefix' => '',
5491
-      'default_argument_fixed' => '',
5492
-      'default_argument_user' => 0,
5493
-      'default_argument_php' => '',
5494
-      'validate_argument_node_type' => array(
5488
+        ),
5489
+        'relationship' => 'none',
5490
+        'default_options_div_prefix' => '',
5491
+        'default_argument_fixed' => '',
5492
+        'default_argument_user' => 0,
5493
+        'default_argument_php' => '',
5494
+        'validate_argument_node_type' => array(
5495 5495
         'forum' => 0,
5496 5496
         'job_post' => 0,
5497 5497
         'news' => 0,
@@ -5499,215 +5499,215 @@  discard block
 block discarded – undo
5499 5499
         'profile' => 0,
5500 5500
         'story' => 0,
5501 5501
         'team' => 0,
5502
-      ),
5503
-      'validate_argument_node_access' => 0,
5504
-      'validate_argument_nid_type' => 'nid',
5505
-      'validate_argument_vocabulary' => array(
5502
+        ),
5503
+        'validate_argument_node_access' => 0,
5504
+        'validate_argument_nid_type' => 'nid',
5505
+        'validate_argument_vocabulary' => array(
5506 5506
         1 => 0,
5507
-      ),
5508
-      'validate_argument_type' => 'tid',
5509
-      'validate_argument_transform' => 0,
5510
-      'validate_user_restrict_roles' => 0,
5511
-      'validate_argument_php' => '',
5512
-    ),
5513
-  ));
5514
-  $handler->override_option('filters', array(
5507
+        ),
5508
+        'validate_argument_type' => 'tid',
5509
+        'validate_argument_transform' => 0,
5510
+        'validate_user_restrict_roles' => 0,
5511
+        'validate_argument_php' => '',
5512
+    ),
5513
+    ));
5514
+    $handler->override_option('filters', array(
5515 5515
     'show_hosts' => array(
5516
-      'operator' => '=',
5517
-      'value' => array(
5516
+        'operator' => '=',
5517
+        'value' => array(
5518 5518
         'value' => '1',
5519 5519
         'min' => '',
5520 5520
         'max' => '',
5521
-      ),
5522
-      'group' => '0',
5523
-      'exposed' => FALSE,
5524
-      'expose' => array(
5521
+        ),
5522
+        'group' => '0',
5523
+        'exposed' => FALSE,
5524
+        'expose' => array(
5525 5525
         'operator' => FALSE,
5526 5526
         'label' => '',
5527
-      ),
5528
-      'id' => 'show_hosts',
5529
-      'table' => 'user',
5530
-      'field' => 'show_hosts',
5531
-      'relationship' => 'userid',
5532
-    ),
5533
-  ));
5534
-  $handler->override_option('access', array(
5527
+        ),
5528
+        'id' => 'show_hosts',
5529
+        'table' => 'user',
5530
+        'field' => 'show_hosts',
5531
+        'relationship' => 'userid',
5532
+    ),
5533
+    ));
5534
+    $handler->override_option('access', array(
5535 5535
     'type' => 'none',
5536
-  ));
5537
-  $handler->override_option('cache', array(
5536
+    ));
5537
+    $handler->override_option('cache', array(
5538 5538
     'type' => 'none',
5539
-  ));
5540
-  $handler->override_option('empty_format', '1');
5541
-  $handler->override_option('items_per_page', 20);
5542
-  $handler->override_option('use_pager', '1');
5543
-  $handler->override_option('style_plugin', 'table');
5544
-  $handler->override_option('style_options', array(
5539
+    ));
5540
+    $handler->override_option('empty_format', '1');
5541
+    $handler->override_option('items_per_page', 20);
5542
+    $handler->override_option('use_pager', '1');
5543
+    $handler->override_option('style_plugin', 'table');
5544
+    $handler->override_option('style_options', array(
5545 5545
     'grouping' => '',
5546 5546
     'override' => 1,
5547 5547
     'sticky' => 1,
5548 5548
     'order' => 'desc',
5549 5549
     'summary' => '',
5550 5550
     'columns' => array(
5551
-      'id' => 'id',
5552
-      'phpcode_3' => 'id',
5553
-      'host_cpid' => 'host_cpid',
5554
-      'phpcode_4' => 'id',
5555
-      'rownumber' => 'rownumber',
5556
-      'expavg_credit' => 'expavg_credit',
5557
-      'total_credit' => 'total_credit',
5558
-      'serialnum' => 'serialnum',
5559
-      'phpcode' => 'phpcode',
5560
-      'p_vendor' => 'p_vendor',
5561
-      'p_model' => 'p_vendor',
5562
-      'p_ncpus' => 'p_vendor',
5563
-      'phpcode_1' => 'phpcode_1',
5564
-      'os_name' => 'os_name',
5565
-      'os_version' => 'os_name',
5566
-      'rpc_time' => 'rpc_time',
5567
-      'phpcode_2' => 'phpcode_2',
5551
+        'id' => 'id',
5552
+        'phpcode_3' => 'id',
5553
+        'host_cpid' => 'host_cpid',
5554
+        'phpcode_4' => 'id',
5555
+        'rownumber' => 'rownumber',
5556
+        'expavg_credit' => 'expavg_credit',
5557
+        'total_credit' => 'total_credit',
5558
+        'serialnum' => 'serialnum',
5559
+        'phpcode' => 'phpcode',
5560
+        'p_vendor' => 'p_vendor',
5561
+        'p_model' => 'p_vendor',
5562
+        'p_ncpus' => 'p_vendor',
5563
+        'phpcode_1' => 'phpcode_1',
5564
+        'os_name' => 'os_name',
5565
+        'os_version' => 'os_name',
5566
+        'rpc_time' => 'rpc_time',
5567
+        'phpcode_2' => 'phpcode_2',
5568 5568
     ),
5569 5569
     'info' => array(
5570
-      'id' => array(
5570
+        'id' => array(
5571 5571
         'sortable' => 1,
5572 5572
         'separator' => '<br/>',
5573
-      ),
5574
-      'phpcode_3' => array(
5573
+        ),
5574
+        'phpcode_3' => array(
5575 5575
         'separator' => '',
5576
-      ),
5577
-      'host_cpid' => array(
5576
+        ),
5577
+        'host_cpid' => array(
5578 5578
         'sortable' => 0,
5579 5579
         'separator' => '',
5580
-      ),
5581
-      'phpcode_4' => array(
5580
+        ),
5581
+        'phpcode_4' => array(
5582 5582
         'separator' => '',
5583
-      ),
5584
-      'rownumber' => array(
5583
+        ),
5584
+        'rownumber' => array(
5585 5585
         'separator' => '',
5586
-      ),
5587
-      'expavg_credit' => array(
5586
+        ),
5587
+        'expavg_credit' => array(
5588 5588
         'sortable' => 1,
5589 5589
         'separator' => '',
5590
-      ),
5591
-      'total_credit' => array(
5590
+        ),
5591
+        'total_credit' => array(
5592 5592
         'sortable' => 1,
5593 5593
         'separator' => '',
5594
-      ),
5595
-      'serialnum' => array(
5594
+        ),
5595
+        'serialnum' => array(
5596 5596
         'sortable' => 0,
5597 5597
         'separator' => '',
5598
-      ),
5599
-      'phpcode' => array(
5598
+        ),
5599
+        'phpcode' => array(
5600 5600
         'separator' => '',
5601
-      ),
5602
-      'p_vendor' => array(
5601
+        ),
5602
+        'p_vendor' => array(
5603 5603
         'sortable' => 1,
5604 5604
         'separator' => '<br/>',
5605
-      ),
5606
-      'p_model' => array(
5605
+        ),
5606
+        'p_model' => array(
5607 5607
         'sortable' => 0,
5608 5608
         'separator' => '',
5609
-      ),
5610
-      'p_ncpus' => array(
5609
+        ),
5610
+        'p_ncpus' => array(
5611 5611
         'sortable' => 0,
5612 5612
         'separator' => '',
5613
-      ),
5614
-      'phpcode_1' => array(
5613
+        ),
5614
+        'phpcode_1' => array(
5615 5615
         'separator' => '',
5616
-      ),
5617
-      'os_name' => array(
5616
+        ),
5617
+        'os_name' => array(
5618 5618
         'sortable' => 1,
5619 5619
         'separator' => '<br/>',
5620
-      ),
5621
-      'os_version' => array(
5620
+        ),
5621
+        'os_version' => array(
5622 5622
         'sortable' => 0,
5623 5623
         'separator' => '',
5624
-      ),
5625
-      'rpc_time' => array(
5624
+        ),
5625
+        'rpc_time' => array(
5626 5626
         'sortable' => 1,
5627 5627
         'separator' => '',
5628
-      ),
5629
-      'phpcode_2' => array(
5628
+        ),
5629
+        'phpcode_2' => array(
5630 5630
         'separator' => '',
5631
-      ),
5631
+        ),
5632 5632
     ),
5633 5633
     'default' => 'rpc_time',
5634
-  ));
5635
-  $handler = $view->new_display('page', 'User active hosts', 'page_1');
5636
-  $handler->override_option('filters', array(
5634
+    ));
5635
+    $handler = $view->new_display('page', 'User active hosts', 'page_1');
5636
+    $handler->override_option('filters', array(
5637 5637
     'rpc_time' => array(
5638
-      'operator' => '>',
5639
-      'value' => array(
5638
+        'operator' => '>',
5639
+        'value' => array(
5640 5640
         'type' => 'offset',
5641 5641
         'value' => '-30 days',
5642 5642
         'min' => '',
5643 5643
         'max' => '',
5644
-      ),
5645
-      'group' => '0',
5646
-      'exposed' => FALSE,
5647
-      'expose' => array(
5644
+        ),
5645
+        'group' => '0',
5646
+        'exposed' => FALSE,
5647
+        'expose' => array(
5648 5648
         'operator' => FALSE,
5649 5649
         'label' => '',
5650
-      ),
5651
-      'id' => 'rpc_time',
5652
-      'table' => 'host',
5653
-      'field' => 'rpc_time',
5654
-      'relationship' => 'none',
5650
+        ),
5651
+        'id' => 'rpc_time',
5652
+        'table' => 'host',
5653
+        'field' => 'rpc_time',
5654
+        'relationship' => 'none',
5655 5655
     ),
5656 5656
     'show_hosts' => array(
5657
-      'operator' => '=',
5658
-      'value' => array(
5657
+        'operator' => '=',
5658
+        'value' => array(
5659 5659
         'value' => '1',
5660 5660
         'min' => '',
5661 5661
         'max' => '',
5662
-      ),
5663
-      'group' => '0',
5664
-      'exposed' => FALSE,
5665
-      'expose' => array(
5662
+        ),
5663
+        'group' => '0',
5664
+        'exposed' => FALSE,
5665
+        'expose' => array(
5666 5666
         'operator' => FALSE,
5667 5667
         'label' => '',
5668
-      ),
5669
-      'id' => 'show_hosts',
5670
-      'table' => 'user',
5671
-      'field' => 'show_hosts',
5672
-      'relationship' => 'userid',
5673
-    ),
5674
-  ));
5675
-  $handler->override_option('path', 'account/%/computers/active');
5676
-  $handler->override_option('menu', array(
5668
+        ),
5669
+        'id' => 'show_hosts',
5670
+        'table' => 'user',
5671
+        'field' => 'show_hosts',
5672
+        'relationship' => 'userid',
5673
+    ),
5674
+    ));
5675
+    $handler->override_option('path', 'account/%/computers/active');
5676
+    $handler->override_option('menu', array(
5677 5677
     'type' => 'default tab',
5678 5678
     'title' => 'Active in past 30 days',
5679 5679
     'description' => 'Show only computers that have been active in the past month',
5680 5680
     'weight' => '0',
5681 5681
     'name' => 'navigation',
5682
-  ));
5683
-  $handler->override_option('tab_options', array(
5682
+    ));
5683
+    $handler->override_option('tab_options', array(
5684 5684
     'type' => 'tab',
5685 5685
     'title' => 'Computers',
5686 5686
     'description' => 'Show the computers associated with this user',
5687 5687
     'weight' => '0',
5688 5688
     'name' => 'secondary-links',
5689
-  ));
5690
-  $handler = $view->new_display('page', 'User all hosts', 'page_2');
5691
-  $handler->override_option('path', 'account/%/computers/all');
5692
-  $handler->override_option('menu', array(
5689
+    ));
5690
+    $handler = $view->new_display('page', 'User all hosts', 'page_2');
5691
+    $handler->override_option('path', 'account/%/computers/all');
5692
+    $handler->override_option('menu', array(
5693 5693
     'type' => 'tab',
5694 5694
     'title' => 'All computers',
5695 5695
     'description' => 'Show all computers associated with the account',
5696 5696
     'weight' => '1',
5697 5697
     'name' => 'navigation',
5698
-  ));
5699
-  $handler->override_option('tab_options', array(
5698
+    ));
5699
+    $handler->override_option('tab_options', array(
5700 5700
     'type' => 'none',
5701 5701
     'title' => '',
5702 5702
     'description' => '',
5703 5703
     'weight' => 0,
5704 5704
     'name' => 'navigation',
5705
-  ));
5706
-  $handler = $view->new_display('page', 'Top hosts', 'page_3');
5707
-  $handler->override_option('fields', array(
5705
+    ));
5706
+    $handler = $view->new_display('page', 'Top hosts', 'page_3');
5707
+    $handler->override_option('fields', array(
5708 5708
     'id_1' => array(
5709
-      'label' => 'Id',
5710
-      'alter' => array(
5709
+        'label' => 'Id',
5710
+        'alter' => array(
5711 5711
         'alter_text' => 0,
5712 5712
         'text' => '',
5713 5713
         'make_link' => 0,
@@ -5726,32 +5726,32 @@  discard block
 block discarded – undo
5726 5726
         'ellipsis' => 1,
5727 5727
         'html' => 0,
5728 5728
         'strip_tags' => 0,
5729
-      ),
5730
-      'empty' => '',
5731
-      'hide_empty' => 0,
5732
-      'empty_zero' => 0,
5733
-      'hide_alter_empty' => 1,
5734
-      'set_precision' => FALSE,
5735
-      'precision' => 0,
5736
-      'decimal' => '.',
5737
-      'separator' => ',',
5738
-      'format_plural' => 0,
5739
-      'format_plural_singular' => '1',
5740
-      'format_plural_plural' => '@count',
5741
-      'prefix' => '',
5742
-      'suffix' => '',
5743
-      'exclude' => 1,
5744
-      'id' => 'id_1',
5745
-      'table' => 'user',
5746
-      'field' => 'id',
5747
-      'relationship' => 'userid',
5748
-      'override' => array(
5729
+        ),
5730
+        'empty' => '',
5731
+        'hide_empty' => 0,
5732
+        'empty_zero' => 0,
5733
+        'hide_alter_empty' => 1,
5734
+        'set_precision' => FALSE,
5735
+        'precision' => 0,
5736
+        'decimal' => '.',
5737
+        'separator' => ',',
5738
+        'format_plural' => 0,
5739
+        'format_plural_singular' => '1',
5740
+        'format_plural_plural' => '@count',
5741
+        'prefix' => '',
5742
+        'suffix' => '',
5743
+        'exclude' => 1,
5744
+        'id' => 'id_1',
5745
+        'table' => 'user',
5746
+        'field' => 'id',
5747
+        'relationship' => 'userid',
5748
+        'override' => array(
5749 5749
         'button' => 'Use default',
5750
-      ),
5750
+        ),
5751 5751
     ),
5752 5752
     'name' => array(
5753
-      'label' => 'Name',
5754
-      'alter' => array(
5753
+        'label' => 'Name',
5754
+        'alter' => array(
5755 5755
         'alter_text' => 0,
5756 5756
         'text' => '',
5757 5757
         'make_link' => 0,
@@ -5770,23 +5770,23 @@  discard block
 block discarded – undo
5770 5770
         'ellipsis' => 1,
5771 5771
         'html' => 0,
5772 5772
         'strip_tags' => 0,
5773
-      ),
5774
-      'empty' => '',
5775
-      'hide_empty' => 0,
5776
-      'empty_zero' => 0,
5777
-      'hide_alter_empty' => 1,
5778
-      'exclude' => 1,
5779
-      'id' => 'name',
5780
-      'table' => 'user',
5781
-      'field' => 'name',
5782
-      'relationship' => 'userid',
5783
-      'override' => array(
5773
+        ),
5774
+        'empty' => '',
5775
+        'hide_empty' => 0,
5776
+        'empty_zero' => 0,
5777
+        'hide_alter_empty' => 1,
5778
+        'exclude' => 1,
5779
+        'id' => 'name',
5780
+        'table' => 'user',
5781
+        'field' => 'name',
5782
+        'relationship' => 'userid',
5783
+        'override' => array(
5784 5784
         'button' => 'Use default',
5785
-      ),
5785
+        ),
5786 5786
     ),
5787 5787
     'show_hosts' => array(
5788
-      'label' => 'Show Hosts',
5789
-      'alter' => array(
5788
+        'label' => 'Show Hosts',
5789
+        'alter' => array(
5790 5790
         'alter_text' => 0,
5791 5791
         'text' => '',
5792 5792
         'make_link' => 0,
@@ -5805,32 +5805,32 @@  discard block
 block discarded – undo
5805 5805
         'ellipsis' => 1,
5806 5806
         'html' => 0,
5807 5807
         'strip_tags' => 0,
5808
-      ),
5809
-      'empty' => '',
5810
-      'hide_empty' => 0,
5811
-      'empty_zero' => 0,
5812
-      'hide_alter_empty' => 1,
5813
-      'set_precision' => FALSE,
5814
-      'precision' => 0,
5815
-      'decimal' => '.',
5816
-      'separator' => ',',
5817
-      'format_plural' => 0,
5818
-      'format_plural_singular' => '1',
5819
-      'format_plural_plural' => '@count',
5820
-      'prefix' => '',
5821
-      'suffix' => '',
5822
-      'exclude' => 1,
5823
-      'id' => 'show_hosts',
5824
-      'table' => 'user',
5825
-      'field' => 'show_hosts',
5826
-      'relationship' => 'userid',
5827
-      'override' => array(
5808
+        ),
5809
+        'empty' => '',
5810
+        'hide_empty' => 0,
5811
+        'empty_zero' => 0,
5812
+        'hide_alter_empty' => 1,
5813
+        'set_precision' => FALSE,
5814
+        'precision' => 0,
5815
+        'decimal' => '.',
5816
+        'separator' => ',',
5817
+        'format_plural' => 0,
5818
+        'format_plural_singular' => '1',
5819
+        'format_plural_plural' => '@count',
5820
+        'prefix' => '',
5821
+        'suffix' => '',
5822
+        'exclude' => 1,
5823
+        'id' => 'show_hosts',
5824
+        'table' => 'user',
5825
+        'field' => 'show_hosts',
5826
+        'relationship' => 'userid',
5827
+        'override' => array(
5828 5828
         'button' => 'Use default',
5829
-      ),
5829
+        ),
5830 5830
     ),
5831 5831
     'id' => array(
5832
-      'label' => 'Computer ID',
5833
-      'alter' => array(
5832
+        'label' => 'Computer ID',
5833
+        'alter' => array(
5834 5834
         'alter_text' => 0,
5835 5835
         'text' => 'ID: [id]
5836 5836
 <a href="">Details</a> | <a href="">Tasks</a>
@@ -5850,25 +5850,25 @@  discard block
 block discarded – undo
5850 5850
         'ellipsis' => 1,
5851 5851
         'html' => 0,
5852 5852
         'strip_tags' => 0,
5853
-      ),
5854
-      'empty' => '',
5855
-      'hide_empty' => 0,
5856
-      'empty_zero' => 0,
5857
-      'set_precision' => FALSE,
5858
-      'precision' => 0,
5859
-      'decimal' => '.',
5860
-      'separator' => '',
5861
-      'prefix' => 'ID: ',
5862
-      'suffix' => '',
5863
-      'exclude' => 0,
5864
-      'id' => 'id',
5865
-      'table' => 'host',
5866
-      'field' => 'id',
5867
-      'relationship' => 'none',
5853
+        ),
5854
+        'empty' => '',
5855
+        'hide_empty' => 0,
5856
+        'empty_zero' => 0,
5857
+        'set_precision' => FALSE,
5858
+        'precision' => 0,
5859
+        'decimal' => '.',
5860
+        'separator' => '',
5861
+        'prefix' => 'ID: ',
5862
+        'suffix' => '',
5863
+        'exclude' => 0,
5864
+        'id' => 'id',
5865
+        'table' => 'host',
5866
+        'field' => 'id',
5867
+        'relationship' => 'none',
5868 5868
     ),
5869 5869
     'phpcode_3' => array(
5870
-      'label' => 'Computer links',
5871
-      'alter' => array(
5870
+        'label' => 'Computer links',
5871
+        'alter' => array(
5872 5872
         'alter_text' => 0,
5873 5873
         'text' => '',
5874 5874
         'make_link' => 0,
@@ -5887,26 +5887,26 @@  discard block
 block discarded – undo
5887 5887
         'ellipsis' => 1,
5888 5888
         'html' => 0,
5889 5889
         'strip_tags' => 0,
5890
-      ),
5891
-      'empty' => '',
5892
-      'hide_empty' => 0,
5893
-      'empty_zero' => 0,
5894
-      'hide_alter_empty' => 1,
5895
-      'value' => '<?php
5890
+        ),
5891
+        'empty' => '',
5892
+        'hide_empty' => 0,
5893
+        'empty_zero' => 0,
5894
+        'hide_alter_empty' => 1,
5895
+        'value' => '<?php
5896 5896
   echo l(bts(\'Details\', array(), NULL, \'boinc:host-details\'), "host/{$data->id}") . \'&nbsp;|&nbsp;\' . l(bts(\'Tasks\', array(), NULL, \'boinc:host-tasks-link\'), "host/{$data->id}/tasks/0/0");
5897 5897
 ?>',
5898
-      'exclude' => 0,
5899
-      'id' => 'phpcode_3',
5900
-      'table' => 'customfield',
5901
-      'field' => 'phpcode',
5902
-      'relationship' => 'none',
5903
-      'override' => array(
5898
+        'exclude' => 0,
5899
+        'id' => 'phpcode_3',
5900
+        'table' => 'customfield',
5901
+        'field' => 'phpcode',
5902
+        'relationship' => 'none',
5903
+        'override' => array(
5904 5904
         'button' => 'Use default',
5905
-      ),
5905
+        ),
5906 5906
     ),
5907 5907
     'host_cpid' => array(
5908
-      'label' => 'Cross project ID',
5909
-      'alter' => array(
5908
+        'label' => 'Cross project ID',
5909
+        'alter' => array(
5910 5910
         'alter_text' => 0,
5911 5911
         'text' => '',
5912 5912
         'make_link' => 0,
@@ -5923,19 +5923,19 @@  discard block
 block discarded – undo
5923 5923
         'ellipsis' => 1,
5924 5924
         'html' => 0,
5925 5925
         'strip_tags' => 0,
5926
-      ),
5927
-      'empty' => '',
5928
-      'hide_empty' => 0,
5929
-      'empty_zero' => 0,
5930
-      'exclude' => 1,
5931
-      'id' => 'host_cpid',
5932
-      'table' => 'host',
5933
-      'field' => 'host_cpid',
5934
-      'relationship' => 'none',
5926
+        ),
5927
+        'empty' => '',
5928
+        'hide_empty' => 0,
5929
+        'empty_zero' => 0,
5930
+        'exclude' => 1,
5931
+        'id' => 'host_cpid',
5932
+        'table' => 'host',
5933
+        'field' => 'host_cpid',
5934
+        'relationship' => 'none',
5935 5935
     ),
5936 5936
     'phpcode_4' => array(
5937
-      'label' => 'Cross-project statistics',
5938
-      'alter' => array(
5937
+        'label' => 'Cross-project statistics',
5938
+        'alter' => array(
5939 5939
         'alter_text' => 0,
5940 5940
         'text' => '',
5941 5941
         'make_link' => 0,
@@ -5954,12 +5954,12 @@  discard block
 block discarded – undo
5954 5954
         'ellipsis' => 1,
5955 5955
         'html' => 0,
5956 5956
         'strip_tags' => 0,
5957
-      ),
5958
-      'empty' => '',
5959
-      'hide_empty' => 0,
5960
-      'empty_zero' => 0,
5961
-      'hide_alter_empty' => 1,
5962
-      'value' => '<?php
5957
+        ),
5958
+        'empty' => '',
5959
+        'hide_empty' => 0,
5960
+        'empty_zero' => 0,
5961
+        'hide_alter_empty' => 1,
5962
+        'value' => '<?php
5963 5963
   require_boinc(\'stats_sites\');
5964 5964
   global $host_sites;
5965 5965
   $x = "";
@@ -5972,18 +5972,18 @@  discard block
 block discarded – undo
5972 5972
   }
5973 5973
   echo "Cross-project stats: {$x}";
5974 5974
 ?>',
5975
-      'exclude' => 0,
5976
-      'id' => 'phpcode_4',
5977
-      'table' => 'customfield',
5978
-      'field' => 'phpcode',
5979
-      'relationship' => 'none',
5980
-      'override' => array(
5975
+        'exclude' => 0,
5976
+        'id' => 'phpcode_4',
5977
+        'table' => 'customfield',
5978
+        'field' => 'phpcode',
5979
+        'relationship' => 'none',
5980
+        'override' => array(
5981 5981
         'button' => 'Use default',
5982
-      ),
5982
+        ),
5983 5983
     ),
5984 5984
     'rownumber' => array(
5985
-      'label' => 'Rank',
5986
-      'alter' => array(
5985
+        'label' => 'Rank',
5986
+        'alter' => array(
5987 5987
         'alter_text' => 0,
5988 5988
         'text' => '',
5989 5989
         'make_link' => 0,
@@ -6000,19 +6000,19 @@  discard block
 block discarded – undo
6000 6000
         'ellipsis' => 1,
6001 6001
         'html' => 0,
6002 6002
         'strip_tags' => 0,
6003
-      ),
6004
-      'empty' => '',
6005
-      'hide_empty' => 0,
6006
-      'empty_zero' => 0,
6007
-      'exclude' => 0,
6008
-      'id' => 'rownumber',
6009
-      'table' => 'customfield',
6010
-      'field' => 'rownumber',
6011
-      'relationship' => 'none',
6003
+        ),
6004
+        'empty' => '',
6005
+        'hide_empty' => 0,
6006
+        'empty_zero' => 0,
6007
+        'exclude' => 0,
6008
+        'id' => 'rownumber',
6009
+        'table' => 'customfield',
6010
+        'field' => 'rownumber',
6011
+        'relationship' => 'none',
6012 6012
     ),
6013 6013
     'phpcode_5' => array(
6014
-      'label' => 'Owner',
6015
-      'alter' => array(
6014
+        'label' => 'Owner',
6015
+        'alter' => array(
6016 6016
         'alter_text' => 0,
6017 6017
         'text' => '',
6018 6018
         'make_link' => 0,
@@ -6031,12 +6031,12 @@  discard block
 block discarded – undo
6031 6031
         'ellipsis' => 1,
6032 6032
         'html' => 0,
6033 6033
         'strip_tags' => 0,
6034
-      ),
6035
-      'empty' => '',
6036
-      'hide_empty' => 0,
6037
-      'empty_zero' => 0,
6038
-      'hide_alter_empty' => 1,
6039
-      'value' => '<?php
6034
+        ),
6035
+        'empty' => '',
6036
+        'hide_empty' => 0,
6037
+        'empty_zero' => 0,
6038
+        'hide_alter_empty' => 1,
6039
+        'value' => '<?php
6040 6040
 $uid = get_drupal_id($data->user_host_id);
6041 6041
 if ($data->user_host_show_hosts) {
6042 6042
   echo l($data->user_host_name, "account/{$uid}");
@@ -6044,18 +6044,18 @@  discard block
 block discarded – undo
6044 6044
 else {
6045 6045
   echo bts(\'Anonymous\', array(), NULL, \'boinc:anonymous-user\');
6046 6046
 }',
6047
-      'exclude' => 0,
6048
-      'id' => 'phpcode_5',
6049
-      'table' => 'customfield',
6050
-      'field' => 'phpcode',
6051
-      'override' => array(
6047
+        'exclude' => 0,
6048
+        'id' => 'phpcode_5',
6049
+        'table' => 'customfield',
6050
+        'field' => 'phpcode',
6051
+        'override' => array(
6052 6052
         'button' => 'Use default',
6053
-      ),
6054
-      'relationship' => 'none',
6053
+        ),
6054
+        'relationship' => 'none',
6055 6055
     ),
6056 6056
     'expavg_credit' => array(
6057
-      'label' => 'Avg. credit',
6058
-      'alter' => array(
6057
+        'label' => 'Avg. credit',
6058
+        'alter' => array(
6059 6059
         'alter_text' => 0,
6060 6060
         'text' => '',
6061 6061
         'make_link' => 0,
@@ -6072,25 +6072,25 @@  discard block
 block discarded – undo
6072 6072
         'ellipsis' => 1,
6073 6073
         'html' => 0,
6074 6074
         'strip_tags' => 0,
6075
-      ),
6076
-      'empty' => '',
6077
-      'hide_empty' => 0,
6078
-      'empty_zero' => 0,
6079
-      'set_precision' => 1,
6080
-      'precision' => '2',
6081
-      'decimal' => '.',
6082
-      'separator' => ',',
6083
-      'prefix' => '',
6084
-      'suffix' => '',
6085
-      'exclude' => 0,
6086
-      'id' => 'expavg_credit',
6087
-      'table' => 'host',
6088
-      'field' => 'expavg_credit',
6089
-      'relationship' => 'none',
6075
+        ),
6076
+        'empty' => '',
6077
+        'hide_empty' => 0,
6078
+        'empty_zero' => 0,
6079
+        'set_precision' => 1,
6080
+        'precision' => '2',
6081
+        'decimal' => '.',
6082
+        'separator' => ',',
6083
+        'prefix' => '',
6084
+        'suffix' => '',
6085
+        'exclude' => 0,
6086
+        'id' => 'expavg_credit',
6087
+        'table' => 'host',
6088
+        'field' => 'expavg_credit',
6089
+        'relationship' => 'none',
6090 6090
     ),
6091 6091
     'total_credit' => array(
6092
-      'label' => 'Total credit',
6093
-      'alter' => array(
6092
+        'label' => 'Total credit',
6093
+        'alter' => array(
6094 6094
         'alter_text' => 0,
6095 6095
         'text' => '',
6096 6096
         'make_link' => 0,
@@ -6109,32 +6109,32 @@  discard block
 block discarded – undo
6109 6109
         'ellipsis' => 1,
6110 6110
         'html' => 0,
6111 6111
         'strip_tags' => 0,
6112
-      ),
6113
-      'empty' => '',
6114
-      'hide_empty' => 0,
6115
-      'empty_zero' => 0,
6116
-      'hide_alter_empty' => 1,
6117
-      'set_precision' => 1,
6118
-      'precision' => '0',
6119
-      'decimal' => '.',
6120
-      'separator' => ',',
6121
-      'format_plural' => 0,
6122
-      'format_plural_singular' => '1',
6123
-      'format_plural_plural' => '@count',
6124
-      'prefix' => '',
6125
-      'suffix' => '',
6126
-      'exclude' => 0,
6127
-      'id' => 'total_credit',
6128
-      'table' => 'host',
6129
-      'field' => 'total_credit',
6130
-      'relationship' => 'none',
6131
-      'override' => array(
6112
+        ),
6113
+        'empty' => '',
6114
+        'hide_empty' => 0,
6115
+        'empty_zero' => 0,
6116
+        'hide_alter_empty' => 1,
6117
+        'set_precision' => 1,
6118
+        'precision' => '0',
6119
+        'decimal' => '.',
6120
+        'separator' => ',',
6121
+        'format_plural' => 0,
6122
+        'format_plural_singular' => '1',
6123
+        'format_plural_plural' => '@count',
6124
+        'prefix' => '',
6125
+        'suffix' => '',
6126
+        'exclude' => 0,
6127
+        'id' => 'total_credit',
6128
+        'table' => 'host',
6129
+        'field' => 'total_credit',
6130
+        'relationship' => 'none',
6131
+        'override' => array(
6132 6132
         'button' => 'Use default',
6133
-      ),
6133
+        ),
6134 6134
     ),
6135 6135
     'serialnum' => array(
6136
-      'label' => 'Serial Number',
6137
-      'alter' => array(
6136
+        'label' => 'Serial Number',
6137
+        'alter' => array(
6138 6138
         'alter_text' => 0,
6139 6139
         'text' => '',
6140 6140
         'make_link' => 0,
@@ -6151,19 +6151,19 @@  discard block
 block discarded – undo
6151 6151
         'ellipsis' => 1,
6152 6152
         'html' => 0,
6153 6153
         'strip_tags' => 0,
6154
-      ),
6155
-      'empty' => '',
6156
-      'hide_empty' => 0,
6157
-      'empty_zero' => 0,
6158
-      'exclude' => 1,
6159
-      'id' => 'serialnum',
6160
-      'table' => 'host',
6161
-      'field' => 'serialnum',
6162
-      'relationship' => 'none',
6154
+        ),
6155
+        'empty' => '',
6156
+        'hide_empty' => 0,
6157
+        'empty_zero' => 0,
6158
+        'exclude' => 1,
6159
+        'id' => 'serialnum',
6160
+        'table' => 'host',
6161
+        'field' => 'serialnum',
6162
+        'relationship' => 'none',
6163 6163
     ),
6164 6164
     'phpcode' => array(
6165
-      'label' => 'BOINC version',
6166
-      'alter' => array(
6165
+        'label' => 'BOINC version',
6166
+        'alter' => array(
6167 6167
         'alter_text' => 0,
6168 6168
         'text' => '',
6169 6169
         'make_link' => 0,
@@ -6180,23 +6180,23 @@  discard block
 block discarded – undo
6180 6180
         'ellipsis' => 1,
6181 6181
         'html' => 0,
6182 6182
         'strip_tags' => 0,
6183
-      ),
6184
-      'empty' => '',
6185
-      'hide_empty' => 0,
6186
-      'empty_zero' => 0,
6187
-      'value' => '<?php
6183
+        ),
6184
+        'empty' => '',
6185
+        'hide_empty' => 0,
6186
+        'empty_zero' => 0,
6187
+        'value' => '<?php
6188 6188
   require_boinc(\'host\');
6189 6189
   echo boinc_version(parse_serialnum($data->host_serialnum));
6190 6190
 ?>',
6191
-      'exclude' => 0,
6192
-      'id' => 'phpcode',
6193
-      'table' => 'customfield',
6194
-      'field' => 'phpcode',
6195
-      'relationship' => 'none',
6191
+        'exclude' => 0,
6192
+        'id' => 'phpcode',
6193
+        'table' => 'customfield',
6194
+        'field' => 'phpcode',
6195
+        'relationship' => 'none',
6196 6196
     ),
6197 6197
     'p_vendor' => array(
6198
-      'label' => 'CPU',
6199
-      'alter' => array(
6198
+        'label' => 'CPU',
6199
+        'alter' => array(
6200 6200
         'alter_text' => 0,
6201 6201
         'text' => '',
6202 6202
         'make_link' => 0,
@@ -6213,22 +6213,22 @@  discard block
 block discarded – undo
6213 6213
         'ellipsis' => 1,
6214 6214
         'html' => 0,
6215 6215
         'strip_tags' => 0,
6216
-      ),
6217
-      'empty' => '',
6218
-      'hide_empty' => 0,
6219
-      'empty_zero' => 0,
6220
-      'exclude' => 0,
6221
-      'id' => 'p_vendor',
6222
-      'table' => 'host',
6223
-      'field' => 'p_vendor',
6224
-      'relationship' => 'none',
6225
-      'override' => array(
6216
+        ),
6217
+        'empty' => '',
6218
+        'hide_empty' => 0,
6219
+        'empty_zero' => 0,
6220
+        'exclude' => 0,
6221
+        'id' => 'p_vendor',
6222
+        'table' => 'host',
6223
+        'field' => 'p_vendor',
6224
+        'relationship' => 'none',
6225
+        'override' => array(
6226 6226
         'button' => 'Override',
6227
-      ),
6227
+        ),
6228 6228
     ),
6229 6229
     'p_model' => array(
6230
-      'label' => 'CPU model',
6231
-      'alter' => array(
6230
+        'label' => 'CPU model',
6231
+        'alter' => array(
6232 6232
         'alter_text' => 0,
6233 6233
         'text' => '',
6234 6234
         'make_link' => 0,
@@ -6245,19 +6245,19 @@  discard block
 block discarded – undo
6245 6245
         'ellipsis' => 1,
6246 6246
         'html' => 0,
6247 6247
         'strip_tags' => 0,
6248
-      ),
6249
-      'empty' => '',
6250
-      'hide_empty' => 0,
6251
-      'empty_zero' => 0,
6252
-      'exclude' => 0,
6253
-      'id' => 'p_model',
6254
-      'table' => 'host',
6255
-      'field' => 'p_model',
6256
-      'relationship' => 'none',
6248
+        ),
6249
+        'empty' => '',
6250
+        'hide_empty' => 0,
6251
+        'empty_zero' => 0,
6252
+        'exclude' => 0,
6253
+        'id' => 'p_model',
6254
+        'table' => 'host',
6255
+        'field' => 'p_model',
6256
+        'relationship' => 'none',
6257 6257
     ),
6258 6258
     'p_ncpus' => array(
6259
-      'label' => 'Number of CPUs',
6260
-      'alter' => array(
6259
+        'label' => 'Number of CPUs',
6260
+        'alter' => array(
6261 6261
         'alter_text' => 1,
6262 6262
         'text' => '([p_ncpus] processors)',
6263 6263
         'make_link' => 0,
@@ -6274,19 +6274,19 @@  discard block
 block discarded – undo
6274 6274
         'ellipsis' => 1,
6275 6275
         'html' => 0,
6276 6276
         'strip_tags' => 0,
6277
-      ),
6278
-      'empty' => '',
6279
-      'hide_empty' => 0,
6280
-      'empty_zero' => 0,
6281
-      'exclude' => 0,
6282
-      'id' => 'p_ncpus',
6283
-      'table' => 'host',
6284
-      'field' => 'p_ncpus',
6285
-      'relationship' => 'none',
6277
+        ),
6278
+        'empty' => '',
6279
+        'hide_empty' => 0,
6280
+        'empty_zero' => 0,
6281
+        'exclude' => 0,
6282
+        'id' => 'p_ncpus',
6283
+        'table' => 'host',
6284
+        'field' => 'p_ncpus',
6285
+        'relationship' => 'none',
6286 6286
     ),
6287 6287
     'phpcode_1' => array(
6288
-      'label' => 'GPU',
6289
-      'alter' => array(
6288
+        'label' => 'GPU',
6289
+        'alter' => array(
6290 6290
         'alter_text' => 0,
6291 6291
         'text' => '',
6292 6292
         'make_link' => 0,
@@ -6303,23 +6303,23 @@  discard block
 block discarded – undo
6303 6303
         'ellipsis' => 1,
6304 6304
         'html' => 0,
6305 6305
         'strip_tags' => 0,
6306
-      ),
6307
-      'empty' => '',
6308
-      'hide_empty' => 0,
6309
-      'empty_zero' => 0,
6310
-      'value' => '<?php
6306
+        ),
6307
+        'empty' => '',
6308
+        'hide_empty' => 0,
6309
+        'empty_zero' => 0,
6310
+        'value' => '<?php
6311 6311
   require_boinc(\'host\');
6312 6312
   echo gpu_desc(parse_serialnum($data->host_serialnum));
6313 6313
 ?>',
6314
-      'exclude' => 0,
6315
-      'id' => 'phpcode_1',
6316
-      'table' => 'customfield',
6317
-      'field' => 'phpcode',
6318
-      'relationship' => 'none',
6314
+        'exclude' => 0,
6315
+        'id' => 'phpcode_1',
6316
+        'table' => 'customfield',
6317
+        'field' => 'phpcode',
6318
+        'relationship' => 'none',
6319 6319
     ),
6320 6320
     'os_name' => array(
6321
-      'label' => 'Operating system',
6322
-      'alter' => array(
6321
+        'label' => 'Operating system',
6322
+        'alter' => array(
6323 6323
         'alter_text' => 0,
6324 6324
         'text' => '',
6325 6325
         'make_link' => 0,
@@ -6336,19 +6336,19 @@  discard block
 block discarded – undo
6336 6336
         'ellipsis' => 1,
6337 6337
         'html' => 0,
6338 6338
         'strip_tags' => 0,
6339
-      ),
6340
-      'empty' => '',
6341
-      'hide_empty' => 0,
6342
-      'empty_zero' => 0,
6343
-      'exclude' => 0,
6344
-      'id' => 'os_name',
6345
-      'table' => 'host',
6346
-      'field' => 'os_name',
6347
-      'relationship' => 'none',
6339
+        ),
6340
+        'empty' => '',
6341
+        'hide_empty' => 0,
6342
+        'empty_zero' => 0,
6343
+        'exclude' => 0,
6344
+        'id' => 'os_name',
6345
+        'table' => 'host',
6346
+        'field' => 'os_name',
6347
+        'relationship' => 'none',
6348 6348
     ),
6349 6349
     'os_version' => array(
6350
-      'label' => 'Operating system version',
6351
-      'alter' => array(
6350
+        'label' => 'Operating system version',
6351
+        'alter' => array(
6352 6352
         'alter_text' => 0,
6353 6353
         'text' => '',
6354 6354
         'make_link' => 0,
@@ -6365,164 +6365,164 @@  discard block
 block discarded – undo
6365 6365
         'ellipsis' => 1,
6366 6366
         'html' => 0,
6367 6367
         'strip_tags' => 0,
6368
-      ),
6369
-      'empty' => '',
6370
-      'hide_empty' => 0,
6371
-      'empty_zero' => 0,
6372
-      'exclude' => 0,
6373
-      'id' => 'os_version',
6374
-      'table' => 'host',
6375
-      'field' => 'os_version',
6376
-      'relationship' => 'none',
6368
+        ),
6369
+        'empty' => '',
6370
+        'hide_empty' => 0,
6371
+        'empty_zero' => 0,
6372
+        'exclude' => 0,
6373
+        'id' => 'os_version',
6374
+        'table' => 'host',
6375
+        'field' => 'os_version',
6376
+        'relationship' => 'none',
6377 6377
     ),
6378
-  ));
6379
-  $handler->override_option('arguments', array());
6380
-  $handler->override_option('filters', array(
6378
+    ));
6379
+    $handler->override_option('arguments', array());
6380
+    $handler->override_option('filters', array(
6381 6381
     'total_credit' => array(
6382
-      'operator' => '>=',
6383
-      'value' => array(
6382
+        'operator' => '>=',
6383
+        'value' => array(
6384 6384
         'value' => '1',
6385 6385
         'min' => '',
6386 6386
         'max' => '',
6387
-      ),
6388
-      'group' => '0',
6389
-      'exposed' => FALSE,
6390
-      'expose' => array(
6387
+        ),
6388
+        'group' => '0',
6389
+        'exposed' => FALSE,
6390
+        'expose' => array(
6391 6391
         'operator' => FALSE,
6392 6392
         'label' => '',
6393
-      ),
6394
-      'id' => 'total_credit',
6395
-      'table' => 'host',
6396
-      'field' => 'total_credit',
6397
-      'override' => array(
6393
+        ),
6394
+        'id' => 'total_credit',
6395
+        'table' => 'host',
6396
+        'field' => 'total_credit',
6397
+        'override' => array(
6398 6398
         'button' => 'Use default',
6399
-      ),
6400
-      'relationship' => 'none',
6399
+        ),
6400
+        'relationship' => 'none',
6401 6401
     ),
6402
-  ));
6403
-  $handler->override_option('items_per_page', 50);
6404
-  $handler->override_option('use_pager', '0');
6405
-  $handler->override_option('style_options', array(
6402
+    ));
6403
+    $handler->override_option('items_per_page', 50);
6404
+    $handler->override_option('use_pager', '0');
6405
+    $handler->override_option('style_options', array(
6406 6406
     'grouping' => '',
6407 6407
     'override' => 1,
6408 6408
     'sticky' => 1,
6409 6409
     'order' => 'desc',
6410 6410
     'summary' => '',
6411 6411
     'columns' => array(
6412
-      'id_1' => 'id_1',
6413
-      'name' => 'name',
6414
-      'show_hosts' => 'show_hosts',
6415
-      'id' => 'id',
6416
-      'phpcode_3' => 'id',
6417
-      'host_cpid' => 'host_cpid',
6418
-      'phpcode_4' => 'id',
6419
-      'rownumber' => 'rownumber',
6420
-      'phpcode_5' => 'phpcode_5',
6421
-      'expavg_credit' => 'expavg_credit',
6422
-      'total_credit' => 'total_credit',
6423
-      'serialnum' => 'serialnum',
6424
-      'phpcode' => 'phpcode',
6425
-      'p_vendor' => 'p_vendor',
6426
-      'p_model' => 'p_vendor',
6427
-      'p_ncpus' => 'p_vendor',
6428
-      'phpcode_1' => 'phpcode_1',
6429
-      'os_name' => 'os_name',
6430
-      'os_version' => 'os_name',
6412
+        'id_1' => 'id_1',
6413
+        'name' => 'name',
6414
+        'show_hosts' => 'show_hosts',
6415
+        'id' => 'id',
6416
+        'phpcode_3' => 'id',
6417
+        'host_cpid' => 'host_cpid',
6418
+        'phpcode_4' => 'id',
6419
+        'rownumber' => 'rownumber',
6420
+        'phpcode_5' => 'phpcode_5',
6421
+        'expavg_credit' => 'expavg_credit',
6422
+        'total_credit' => 'total_credit',
6423
+        'serialnum' => 'serialnum',
6424
+        'phpcode' => 'phpcode',
6425
+        'p_vendor' => 'p_vendor',
6426
+        'p_model' => 'p_vendor',
6427
+        'p_ncpus' => 'p_vendor',
6428
+        'phpcode_1' => 'phpcode_1',
6429
+        'os_name' => 'os_name',
6430
+        'os_version' => 'os_name',
6431 6431
     ),
6432 6432
     'info' => array(
6433
-      'id_1' => array(
6433
+        'id_1' => array(
6434 6434
         'sortable' => 0,
6435 6435
         'separator' => '',
6436
-      ),
6437
-      'name' => array(
6436
+        ),
6437
+        'name' => array(
6438 6438
         'sortable' => 0,
6439 6439
         'separator' => '',
6440
-      ),
6441
-      'show_hosts' => array(
6440
+        ),
6441
+        'show_hosts' => array(
6442 6442
         'sortable' => 0,
6443 6443
         'separator' => '',
6444
-      ),
6445
-      'id' => array(
6444
+        ),
6445
+        'id' => array(
6446 6446
         'sortable' => 0,
6447 6447
         'separator' => '<br/>',
6448
-      ),
6449
-      'phpcode_3' => array(
6448
+        ),
6449
+        'phpcode_3' => array(
6450 6450
         'separator' => '',
6451
-      ),
6452
-      'host_cpid' => array(
6451
+        ),
6452
+        'host_cpid' => array(
6453 6453
         'sortable' => 0,
6454 6454
         'separator' => '',
6455
-      ),
6456
-      'phpcode_4' => array(
6455
+        ),
6456
+        'phpcode_4' => array(
6457 6457
         'separator' => '',
6458
-      ),
6459
-      'rownumber' => array(
6458
+        ),
6459
+        'rownumber' => array(
6460 6460
         'separator' => '',
6461
-      ),
6462
-      'phpcode_5' => array(
6461
+        ),
6462
+        'phpcode_5' => array(
6463 6463
         'separator' => '',
6464
-      ),
6465
-      'expavg_credit' => array(
6464
+        ),
6465
+        'expavg_credit' => array(
6466 6466
         'sortable' => 1,
6467 6467
         'separator' => '',
6468
-      ),
6469
-      'total_credit' => array(
6468
+        ),
6469
+        'total_credit' => array(
6470 6470
         'sortable' => 1,
6471 6471
         'separator' => '',
6472
-      ),
6473
-      'serialnum' => array(
6472
+        ),
6473
+        'serialnum' => array(
6474 6474
         'sortable' => 0,
6475 6475
         'separator' => '',
6476
-      ),
6477
-      'phpcode' => array(
6476
+        ),
6477
+        'phpcode' => array(
6478 6478
         'separator' => '',
6479
-      ),
6480
-      'p_vendor' => array(
6479
+        ),
6480
+        'p_vendor' => array(
6481 6481
         'sortable' => 0,
6482 6482
         'separator' => '<br/>',
6483
-      ),
6484
-      'p_model' => array(
6483
+        ),
6484
+        'p_model' => array(
6485 6485
         'sortable' => 0,
6486 6486
         'separator' => '',
6487
-      ),
6488
-      'p_ncpus' => array(
6487
+        ),
6488
+        'p_ncpus' => array(
6489 6489
         'sortable' => 0,
6490 6490
         'separator' => '',
6491
-      ),
6492
-      'phpcode_1' => array(
6491
+        ),
6492
+        'phpcode_1' => array(
6493 6493
         'separator' => '',
6494
-      ),
6495
-      'os_name' => array(
6494
+        ),
6495
+        'os_name' => array(
6496 6496
         'sortable' => 0,
6497 6497
         'separator' => '<br/>',
6498
-      ),
6499
-      'os_version' => array(
6498
+        ),
6499
+        'os_version' => array(
6500 6500
         'sortable' => 0,
6501 6501
         'separator' => '',
6502
-      ),
6502
+        ),
6503 6503
     ),
6504 6504
     'default' => 'expavg_credit',
6505
-  ));
6506
-  $handler->override_option('path', 'community/stats/hosts');
6507
-  $handler->override_option('menu', array(
6505
+    ));
6506
+    $handler->override_option('path', 'community/stats/hosts');
6507
+    $handler->override_option('menu', array(
6508 6508
     'type' => 'tab',
6509 6509
     'title' => 'Top Computers',
6510 6510
     'description' => '',
6511 6511
     'weight' => '10',
6512 6512
     'name' => 'primary-links',
6513
-  ));
6514
-  $handler->override_option('tab_options', array(
6513
+    ));
6514
+    $handler->override_option('tab_options', array(
6515 6515
     'type' => 'none',
6516 6516
     'title' => '',
6517 6517
     'description' => '',
6518 6518
     'weight' => 0,
6519 6519
     'name' => 'navigation',
6520
-  ));
6521
-  $handler = $view->new_display('panel_pane', 'Top hosts pane', 'panel_pane_1');
6522
-  $handler->override_option('fields', array(
6520
+    ));
6521
+    $handler = $view->new_display('panel_pane', 'Top hosts pane', 'panel_pane_1');
6522
+    $handler->override_option('fields', array(
6523 6523
     'id_1' => array(
6524
-      'label' => 'Id',
6525
-      'alter' => array(
6524
+        'label' => 'Id',
6525
+        'alter' => array(
6526 6526
         'alter_text' => 0,
6527 6527
         'text' => '',
6528 6528
         'make_link' => 0,
@@ -6541,32 +6541,32 @@  discard block
 block discarded – undo
6541 6541
         'ellipsis' => 1,
6542 6542
         'html' => 0,
6543 6543
         'strip_tags' => 0,
6544
-      ),
6545
-      'empty' => '',
6546
-      'hide_empty' => 0,
6547
-      'empty_zero' => 0,
6548
-      'hide_alter_empty' => 1,
6549
-      'set_precision' => FALSE,
6550
-      'precision' => 0,
6551
-      'decimal' => '.',
6552
-      'separator' => '',
6553
-      'format_plural' => 0,
6554
-      'format_plural_singular' => '1',
6555
-      'format_plural_plural' => '@count',
6556
-      'prefix' => '',
6557
-      'suffix' => '',
6558
-      'exclude' => 1,
6559
-      'id' => 'id_1',
6560
-      'table' => 'user',
6561
-      'field' => 'id',
6562
-      'relationship' => 'userid',
6563
-      'override' => array(
6544
+        ),
6545
+        'empty' => '',
6546
+        'hide_empty' => 0,
6547
+        'empty_zero' => 0,
6548
+        'hide_alter_empty' => 1,
6549
+        'set_precision' => FALSE,
6550
+        'precision' => 0,
6551
+        'decimal' => '.',
6552
+        'separator' => '',
6553
+        'format_plural' => 0,
6554
+        'format_plural_singular' => '1',
6555
+        'format_plural_plural' => '@count',
6556
+        'prefix' => '',
6557
+        'suffix' => '',
6558
+        'exclude' => 1,
6559
+        'id' => 'id_1',
6560
+        'table' => 'user',
6561
+        'field' => 'id',
6562
+        'relationship' => 'userid',
6563
+        'override' => array(
6564 6564
         'button' => 'Use default',
6565
-      ),
6565
+        ),
6566 6566
     ),
6567 6567
     'name' => array(
6568
-      'label' => 'Name',
6569
-      'alter' => array(
6568
+        'label' => 'Name',
6569
+        'alter' => array(
6570 6570
         'alter_text' => 0,
6571 6571
         'text' => '',
6572 6572
         'make_link' => 0,
@@ -6585,23 +6585,23 @@  discard block
 block discarded – undo
6585 6585
         'ellipsis' => 1,
6586 6586
         'html' => 0,
6587 6587
         'strip_tags' => 0,
6588
-      ),
6589
-      'empty' => '',
6590
-      'hide_empty' => 0,
6591
-      'empty_zero' => 0,
6592
-      'hide_alter_empty' => 1,
6593
-      'exclude' => 1,
6594
-      'id' => 'name',
6595
-      'table' => 'user',
6596
-      'field' => 'name',
6597
-      'relationship' => 'userid',
6598
-      'override' => array(
6588
+        ),
6589
+        'empty' => '',
6590
+        'hide_empty' => 0,
6591
+        'empty_zero' => 0,
6592
+        'hide_alter_empty' => 1,
6593
+        'exclude' => 1,
6594
+        'id' => 'name',
6595
+        'table' => 'user',
6596
+        'field' => 'name',
6597
+        'relationship' => 'userid',
6598
+        'override' => array(
6599 6599
         'button' => 'Use default',
6600
-      ),
6600
+        ),
6601 6601
     ),
6602 6602
     'show_hosts' => array(
6603
-      'label' => 'Show Hosts',
6604
-      'alter' => array(
6603
+        'label' => 'Show Hosts',
6604
+        'alter' => array(
6605 6605
         'alter_text' => 0,
6606 6606
         'text' => '',
6607 6607
         'make_link' => 0,
@@ -6620,32 +6620,32 @@  discard block
 block discarded – undo
6620 6620
         'ellipsis' => 1,
6621 6621
         'html' => 0,
6622 6622
         'strip_tags' => 0,
6623
-      ),
6624
-      'empty' => '',
6625
-      'hide_empty' => 0,
6626
-      'empty_zero' => 0,
6627
-      'hide_alter_empty' => 1,
6628
-      'set_precision' => FALSE,
6629
-      'precision' => 0,
6630
-      'decimal' => '.',
6631
-      'separator' => '',
6632
-      'format_plural' => 0,
6633
-      'format_plural_singular' => '1',
6634
-      'format_plural_plural' => '@count',
6635
-      'prefix' => '',
6636
-      'suffix' => '',
6637
-      'exclude' => 1,
6638
-      'id' => 'show_hosts',
6639
-      'table' => 'user',
6640
-      'field' => 'show_hosts',
6641
-      'relationship' => 'userid',
6642
-      'override' => array(
6623
+        ),
6624
+        'empty' => '',
6625
+        'hide_empty' => 0,
6626
+        'empty_zero' => 0,
6627
+        'hide_alter_empty' => 1,
6628
+        'set_precision' => FALSE,
6629
+        'precision' => 0,
6630
+        'decimal' => '.',
6631
+        'separator' => '',
6632
+        'format_plural' => 0,
6633
+        'format_plural_singular' => '1',
6634
+        'format_plural_plural' => '@count',
6635
+        'prefix' => '',
6636
+        'suffix' => '',
6637
+        'exclude' => 1,
6638
+        'id' => 'show_hosts',
6639
+        'table' => 'user',
6640
+        'field' => 'show_hosts',
6641
+        'relationship' => 'userid',
6642
+        'override' => array(
6643 6643
         'button' => 'Use default',
6644
-      ),
6644
+        ),
6645 6645
     ),
6646 6646
     'rownumber' => array(
6647
-      'label' => 'Rank',
6648
-      'alter' => array(
6647
+        'label' => 'Rank',
6648
+        'alter' => array(
6649 6649
         'alter_text' => 0,
6650 6650
         'text' => '',
6651 6651
         'make_link' => 0,
@@ -6662,19 +6662,19 @@  discard block
 block discarded – undo
6662 6662
         'ellipsis' => 1,
6663 6663
         'html' => 0,
6664 6664
         'strip_tags' => 0,
6665
-      ),
6666
-      'empty' => '',
6667
-      'hide_empty' => 0,
6668
-      'empty_zero' => 0,
6669
-      'exclude' => 0,
6670
-      'id' => 'rownumber',
6671
-      'table' => 'customfield',
6672
-      'field' => 'rownumber',
6673
-      'relationship' => 'none',
6665
+        ),
6666
+        'empty' => '',
6667
+        'hide_empty' => 0,
6668
+        'empty_zero' => 0,
6669
+        'exclude' => 0,
6670
+        'id' => 'rownumber',
6671
+        'table' => 'customfield',
6672
+        'field' => 'rownumber',
6673
+        'relationship' => 'none',
6674 6674
     ),
6675 6675
     'id' => array(
6676
-      'label' => 'Computer ID',
6677
-      'alter' => array(
6676
+        'label' => 'Computer ID',
6677
+        'alter' => array(
6678 6678
         'alter_text' => 0,
6679 6679
         'text' => 'ID: [id]
6680 6680
 <a href="">Details</a> | <a href="">Tasks</a>
@@ -6696,32 +6696,32 @@  discard block
 block discarded – undo
6696 6696
         'ellipsis' => 1,
6697 6697
         'html' => 0,
6698 6698
         'strip_tags' => 0,
6699
-      ),
6700
-      'empty' => '',
6701
-      'hide_empty' => 0,
6702
-      'empty_zero' => 0,
6703
-      'hide_alter_empty' => 1,
6704
-      'set_precision' => FALSE,
6705
-      'precision' => 0,
6706
-      'decimal' => '.',
6707
-      'separator' => '',
6708
-      'format_plural' => 0,
6709
-      'format_plural_singular' => '1',
6710
-      'format_plural_plural' => '@count',
6711
-      'prefix' => '',
6712
-      'suffix' => '',
6713
-      'exclude' => 0,
6714
-      'id' => 'id',
6715
-      'table' => 'host',
6716
-      'field' => 'id',
6717
-      'relationship' => 'none',
6718
-      'override' => array(
6699
+        ),
6700
+        'empty' => '',
6701
+        'hide_empty' => 0,
6702
+        'empty_zero' => 0,
6703
+        'hide_alter_empty' => 1,
6704
+        'set_precision' => FALSE,
6705
+        'precision' => 0,
6706
+        'decimal' => '.',
6707
+        'separator' => '',
6708
+        'format_plural' => 0,
6709
+        'format_plural_singular' => '1',
6710
+        'format_plural_plural' => '@count',
6711
+        'prefix' => '',
6712
+        'suffix' => '',
6713
+        'exclude' => 0,
6714
+        'id' => 'id',
6715
+        'table' => 'host',
6716
+        'field' => 'id',
6717
+        'relationship' => 'none',
6718
+        'override' => array(
6719 6719
         'button' => 'Use default',
6720
-      ),
6720
+        ),
6721 6721
     ),
6722 6722
     'phpcode_3' => array(
6723
-      'label' => 'Computer links',
6724
-      'alter' => array(
6723
+        'label' => 'Computer links',
6724
+        'alter' => array(
6725 6725
         'alter_text' => 0,
6726 6726
         'text' => '',
6727 6727
         'make_link' => 0,
@@ -6740,26 +6740,26 @@  discard block
 block discarded – undo
6740 6740
         'ellipsis' => 1,
6741 6741
         'html' => 0,
6742 6742
         'strip_tags' => 0,
6743
-      ),
6744
-      'empty' => '',
6745
-      'hide_empty' => 0,
6746
-      'empty_zero' => 0,
6747
-      'hide_alter_empty' => 1,
6748
-      'value' => '<?php
6743
+        ),
6744
+        'empty' => '',
6745
+        'hide_empty' => 0,
6746
+        'empty_zero' => 0,
6747
+        'hide_alter_empty' => 1,
6748
+        'value' => '<?php
6749 6749
   echo l(bts(\'Details\', array(), NULL, \'boinc:host-details\'), "host/{$data->id}") . \'&nbsp;|&nbsp;\' . l(bts(\'Tasks\', array(), NULL, \'boinc:host-tasks-link\'), "host/{$data->id}/tasks/0/0");
6750 6750
 ?>',
6751
-      'exclude' => 1,
6752
-      'id' => 'phpcode_3',
6753
-      'table' => 'customfield',
6754
-      'field' => 'phpcode',
6755
-      'relationship' => 'none',
6756
-      'override' => array(
6751
+        'exclude' => 1,
6752
+        'id' => 'phpcode_3',
6753
+        'table' => 'customfield',
6754
+        'field' => 'phpcode',
6755
+        'relationship' => 'none',
6756
+        'override' => array(
6757 6757
         'button' => 'Use default',
6758
-      ),
6758
+        ),
6759 6759
     ),
6760 6760
     'host_cpid' => array(
6761
-      'label' => 'Cross project ID',
6762
-      'alter' => array(
6761
+        'label' => 'Cross project ID',
6762
+        'alter' => array(
6763 6763
         'alter_text' => 0,
6764 6764
         'text' => '',
6765 6765
         'make_link' => 0,
@@ -6776,19 +6776,19 @@  discard block
 block discarded – undo
6776 6776
         'ellipsis' => 1,
6777 6777
         'html' => 0,
6778 6778
         'strip_tags' => 0,
6779
-      ),
6780
-      'empty' => '',
6781
-      'hide_empty' => 0,
6782
-      'empty_zero' => 0,
6783
-      'exclude' => 1,
6784
-      'id' => 'host_cpid',
6785
-      'table' => 'host',
6786
-      'field' => 'host_cpid',
6787
-      'relationship' => 'none',
6779
+        ),
6780
+        'empty' => '',
6781
+        'hide_empty' => 0,
6782
+        'empty_zero' => 0,
6783
+        'exclude' => 1,
6784
+        'id' => 'host_cpid',
6785
+        'table' => 'host',
6786
+        'field' => 'host_cpid',
6787
+        'relationship' => 'none',
6788 6788
     ),
6789 6789
     'phpcode_4' => array(
6790
-      'label' => 'Cross-project statistics',
6791
-      'alter' => array(
6790
+        'label' => 'Cross-project statistics',
6791
+        'alter' => array(
6792 6792
         'alter_text' => 0,
6793 6793
         'text' => '',
6794 6794
         'make_link' => 0,
@@ -6807,12 +6807,12 @@  discard block
 block discarded – undo
6807 6807
         'ellipsis' => 1,
6808 6808
         'html' => 0,
6809 6809
         'strip_tags' => 0,
6810
-      ),
6811
-      'empty' => '',
6812
-      'hide_empty' => 0,
6813
-      'empty_zero' => 0,
6814
-      'hide_alter_empty' => 1,
6815
-      'value' => '<?php
6810
+        ),
6811
+        'empty' => '',
6812
+        'hide_empty' => 0,
6813
+        'empty_zero' => 0,
6814
+        'hide_alter_empty' => 1,
6815
+        'value' => '<?php
6816 6816
   require_boinc(\'stats_sites\');
6817 6817
   global $host_sites;
6818 6818
   $x = "";
@@ -6825,18 +6825,18 @@  discard block
 block discarded – undo
6825 6825
   }
6826 6826
   echo "Cross-project stats: {$x}";
6827 6827
 ?>',
6828
-      'exclude' => 1,
6829
-      'id' => 'phpcode_4',
6830
-      'table' => 'customfield',
6831
-      'field' => 'phpcode',
6832
-      'relationship' => 'none',
6833
-      'override' => array(
6828
+        'exclude' => 1,
6829
+        'id' => 'phpcode_4',
6830
+        'table' => 'customfield',
6831
+        'field' => 'phpcode',
6832
+        'relationship' => 'none',
6833
+        'override' => array(
6834 6834
         'button' => 'Use default',
6835
-      ),
6835
+        ),
6836 6836
     ),
6837 6837
     'phpcode_5' => array(
6838
-      'label' => 'Owner',
6839
-      'alter' => array(
6838
+        'label' => 'Owner',
6839
+        'alter' => array(
6840 6840
         'alter_text' => 0,
6841 6841
         'text' => '',
6842 6842
         'make_link' => 0,
@@ -6855,12 +6855,12 @@  discard block
 block discarded – undo
6855 6855
         'ellipsis' => 1,
6856 6856
         'html' => 0,
6857 6857
         'strip_tags' => 0,
6858
-      ),
6859
-      'empty' => '',
6860
-      'hide_empty' => 0,
6861
-      'empty_zero' => 0,
6862
-      'hide_alter_empty' => 1,
6863
-      'value' => '<?php
6858
+        ),
6859
+        'empty' => '',
6860
+        'hide_empty' => 0,
6861
+        'empty_zero' => 0,
6862
+        'hide_alter_empty' => 1,
6863
+        'value' => '<?php
6864 6864
 $uid = get_drupal_id($data->user_host_id);
6865 6865
 if ($data->user_host_show_hosts) {
6866 6866
   echo l($data->user_host_name, "account/{$uid}");
@@ -6868,18 +6868,18 @@  discard block
 block discarded – undo
6868 6868
 else {
6869 6869
   echo bts(\'Anonymous\', array(), NULL, \'boinc:anonymous-user\');
6870 6870
 }',
6871
-      'exclude' => 0,
6872
-      'id' => 'phpcode_5',
6873
-      'table' => 'customfield',
6874
-      'field' => 'phpcode',
6875
-      'override' => array(
6871
+        'exclude' => 0,
6872
+        'id' => 'phpcode_5',
6873
+        'table' => 'customfield',
6874
+        'field' => 'phpcode',
6875
+        'override' => array(
6876 6876
         'button' => 'Use default',
6877
-      ),
6878
-      'relationship' => 'none',
6877
+        ),
6878
+        'relationship' => 'none',
6879 6879
     ),
6880 6880
     'expavg_credit' => array(
6881
-      'label' => 'Recent average credit',
6882
-      'alter' => array(
6881
+        'label' => 'Recent average credit',
6882
+        'alter' => array(
6883 6883
         'alter_text' => 0,
6884 6884
         'text' => '',
6885 6885
         'make_link' => 0,
@@ -6898,32 +6898,32 @@  discard block
 block discarded – undo
6898 6898
         'ellipsis' => 1,
6899 6899
         'html' => 0,
6900 6900
         'strip_tags' => 0,
6901
-      ),
6902
-      'empty' => '',
6903
-      'hide_empty' => 0,
6904
-      'empty_zero' => 0,
6905
-      'hide_alter_empty' => 1,
6906
-      'set_precision' => 1,
6907
-      'precision' => '2',
6908
-      'decimal' => '.',
6909
-      'separator' => ',',
6910
-      'format_plural' => 0,
6911
-      'format_plural_singular' => '1',
6912
-      'format_plural_plural' => '@count',
6913
-      'prefix' => '',
6914
-      'suffix' => '',
6915
-      'exclude' => 0,
6916
-      'id' => 'expavg_credit',
6917
-      'table' => 'host',
6918
-      'field' => 'expavg_credit',
6919
-      'relationship' => 'none',
6920
-      'override' => array(
6901
+        ),
6902
+        'empty' => '',
6903
+        'hide_empty' => 0,
6904
+        'empty_zero' => 0,
6905
+        'hide_alter_empty' => 1,
6906
+        'set_precision' => 1,
6907
+        'precision' => '2',
6908
+        'decimal' => '.',
6909
+        'separator' => ',',
6910
+        'format_plural' => 0,
6911
+        'format_plural_singular' => '1',
6912
+        'format_plural_plural' => '@count',
6913
+        'prefix' => '',
6914
+        'suffix' => '',
6915
+        'exclude' => 0,
6916
+        'id' => 'expavg_credit',
6917
+        'table' => 'host',
6918
+        'field' => 'expavg_credit',
6919
+        'relationship' => 'none',
6920
+        'override' => array(
6921 6921
         'button' => 'Use default',
6922
-      ),
6922
+        ),
6923 6923
     ),
6924 6924
     'total_credit' => array(
6925
-      'label' => 'Total credit',
6926
-      'alter' => array(
6925
+        'label' => 'Total credit',
6926
+        'alter' => array(
6927 6927
         'alter_text' => 0,
6928 6928
         'text' => '',
6929 6929
         'make_link' => 0,
@@ -6942,32 +6942,32 @@  discard block
 block discarded – undo
6942 6942
         'ellipsis' => 1,
6943 6943
         'html' => 0,
6944 6944
         'strip_tags' => 0,
6945
-      ),
6946
-      'empty' => '',
6947
-      'hide_empty' => 0,
6948
-      'empty_zero' => 0,
6949
-      'hide_alter_empty' => 1,
6950
-      'set_precision' => 1,
6951
-      'precision' => '0',
6952
-      'decimal' => '.',
6953
-      'separator' => ',',
6954
-      'format_plural' => 0,
6955
-      'format_plural_singular' => '1',
6956
-      'format_plural_plural' => '@count',
6957
-      'prefix' => '',
6958
-      'suffix' => '',
6959
-      'exclude' => 0,
6960
-      'id' => 'total_credit',
6961
-      'table' => 'host',
6962
-      'field' => 'total_credit',
6963
-      'relationship' => 'none',
6964
-      'override' => array(
6945
+        ),
6946
+        'empty' => '',
6947
+        'hide_empty' => 0,
6948
+        'empty_zero' => 0,
6949
+        'hide_alter_empty' => 1,
6950
+        'set_precision' => 1,
6951
+        'precision' => '0',
6952
+        'decimal' => '.',
6953
+        'separator' => ',',
6954
+        'format_plural' => 0,
6955
+        'format_plural_singular' => '1',
6956
+        'format_plural_plural' => '@count',
6957
+        'prefix' => '',
6958
+        'suffix' => '',
6959
+        'exclude' => 0,
6960
+        'id' => 'total_credit',
6961
+        'table' => 'host',
6962
+        'field' => 'total_credit',
6963
+        'relationship' => 'none',
6964
+        'override' => array(
6965 6965
         'button' => 'Use default',
6966
-      ),
6966
+        ),
6967 6967
     ),
6968 6968
     'serialnum' => array(
6969
-      'label' => 'Serial Number',
6970
-      'alter' => array(
6969
+        'label' => 'Serial Number',
6970
+        'alter' => array(
6971 6971
         'alter_text' => 0,
6972 6972
         'text' => '',
6973 6973
         'make_link' => 0,
@@ -6984,19 +6984,19 @@  discard block
 block discarded – undo
6984 6984
         'ellipsis' => 1,
6985 6985
         'html' => 0,
6986 6986
         'strip_tags' => 0,
6987
-      ),
6988
-      'empty' => '',
6989
-      'hide_empty' => 0,
6990
-      'empty_zero' => 0,
6991
-      'exclude' => 1,
6992
-      'id' => 'serialnum',
6993
-      'table' => 'host',
6994
-      'field' => 'serialnum',
6995
-      'relationship' => 'none',
6987
+        ),
6988
+        'empty' => '',
6989
+        'hide_empty' => 0,
6990
+        'empty_zero' => 0,
6991
+        'exclude' => 1,
6992
+        'id' => 'serialnum',
6993
+        'table' => 'host',
6994
+        'field' => 'serialnum',
6995
+        'relationship' => 'none',
6996 6996
     ),
6997 6997
     'phpcode' => array(
6998
-      'label' => 'BOINC version',
6999
-      'alter' => array(
6998
+        'label' => 'BOINC version',
6999
+        'alter' => array(
7000 7000
         'alter_text' => 0,
7001 7001
         'text' => '',
7002 7002
         'make_link' => 0,
@@ -7015,27 +7015,27 @@  discard block
 block discarded – undo
7015 7015
         'ellipsis' => 1,
7016 7016
         'html' => 0,
7017 7017
         'strip_tags' => 0,
7018
-      ),
7019
-      'empty' => '',
7020
-      'hide_empty' => 0,
7021
-      'empty_zero' => 0,
7022
-      'hide_alter_empty' => 1,
7023
-      'value' => '<?php
7018
+        ),
7019
+        'empty' => '',
7020
+        'hide_empty' => 0,
7021
+        'empty_zero' => 0,
7022
+        'hide_alter_empty' => 1,
7023
+        'value' => '<?php
7024 7024
   require_boinc(\'host\');
7025 7025
   echo boinc_version(parse_serialnum($data->host_serialnum));
7026 7026
 ?>',
7027
-      'exclude' => 1,
7028
-      'id' => 'phpcode',
7029
-      'table' => 'customfield',
7030
-      'field' => 'phpcode',
7031
-      'relationship' => 'none',
7032
-      'override' => array(
7027
+        'exclude' => 1,
7028
+        'id' => 'phpcode',
7029
+        'table' => 'customfield',
7030
+        'field' => 'phpcode',
7031
+        'relationship' => 'none',
7032
+        'override' => array(
7033 7033
         'button' => 'Use default',
7034
-      ),
7034
+        ),
7035 7035
     ),
7036 7036
     'p_vendor' => array(
7037
-      'label' => 'CPU',
7038
-      'alter' => array(
7037
+        'label' => 'CPU',
7038
+        'alter' => array(
7039 7039
         'alter_text' => 0,
7040 7040
         'text' => '',
7041 7041
         'make_link' => 0,
@@ -7054,23 +7054,23 @@  discard block
 block discarded – undo
7054 7054
         'ellipsis' => 1,
7055 7055
         'html' => 0,
7056 7056
         'strip_tags' => 0,
7057
-      ),
7058
-      'empty' => '',
7059
-      'hide_empty' => 0,
7060
-      'empty_zero' => 0,
7061
-      'hide_alter_empty' => 1,
7062
-      'exclude' => 1,
7063
-      'id' => 'p_vendor',
7064
-      'table' => 'host',
7065
-      'field' => 'p_vendor',
7066
-      'relationship' => 'none',
7067
-      'override' => array(
7057
+        ),
7058
+        'empty' => '',
7059
+        'hide_empty' => 0,
7060
+        'empty_zero' => 0,
7061
+        'hide_alter_empty' => 1,
7062
+        'exclude' => 1,
7063
+        'id' => 'p_vendor',
7064
+        'table' => 'host',
7065
+        'field' => 'p_vendor',
7066
+        'relationship' => 'none',
7067
+        'override' => array(
7068 7068
         'button' => 'Use default',
7069
-      ),
7069
+        ),
7070 7070
     ),
7071 7071
     'p_model' => array(
7072
-      'label' => 'CPU model',
7073
-      'alter' => array(
7072
+        'label' => 'CPU model',
7073
+        'alter' => array(
7074 7074
         'alter_text' => 0,
7075 7075
         'text' => '',
7076 7076
         'make_link' => 0,
@@ -7089,23 +7089,23 @@  discard block
 block discarded – undo
7089 7089
         'ellipsis' => 1,
7090 7090
         'html' => 0,
7091 7091
         'strip_tags' => 0,
7092
-      ),
7093
-      'empty' => '',
7094
-      'hide_empty' => 0,
7095
-      'empty_zero' => 0,
7096
-      'hide_alter_empty' => 1,
7097
-      'exclude' => 1,
7098
-      'id' => 'p_model',
7099
-      'table' => 'host',
7100
-      'field' => 'p_model',
7101
-      'relationship' => 'none',
7102
-      'override' => array(
7092
+        ),
7093
+        'empty' => '',
7094
+        'hide_empty' => 0,
7095
+        'empty_zero' => 0,
7096
+        'hide_alter_empty' => 1,
7097
+        'exclude' => 1,
7098
+        'id' => 'p_model',
7099
+        'table' => 'host',
7100
+        'field' => 'p_model',
7101
+        'relationship' => 'none',
7102
+        'override' => array(
7103 7103
         'button' => 'Use default',
7104
-      ),
7104
+        ),
7105 7105
     ),
7106 7106
     'p_ncpus' => array(
7107
-      'label' => 'Number of CPUs',
7108
-      'alter' => array(
7107
+        'label' => 'Number of CPUs',
7108
+        'alter' => array(
7109 7109
         'alter_text' => 1,
7110 7110
         'text' => '([p_ncpus] processors)',
7111 7111
         'make_link' => 0,
@@ -7124,23 +7124,23 @@  discard block
 block discarded – undo
7124 7124
         'ellipsis' => 1,
7125 7125
         'html' => 0,
7126 7126
         'strip_tags' => 0,
7127
-      ),
7128
-      'empty' => '',
7129
-      'hide_empty' => 0,
7130
-      'empty_zero' => 0,
7131
-      'hide_alter_empty' => 1,
7132
-      'exclude' => 1,
7133
-      'id' => 'p_ncpus',
7134
-      'table' => 'host',
7135
-      'field' => 'p_ncpus',
7136
-      'relationship' => 'none',
7137
-      'override' => array(
7127
+        ),
7128
+        'empty' => '',
7129
+        'hide_empty' => 0,
7130
+        'empty_zero' => 0,
7131
+        'hide_alter_empty' => 1,
7132
+        'exclude' => 1,
7133
+        'id' => 'p_ncpus',
7134
+        'table' => 'host',
7135
+        'field' => 'p_ncpus',
7136
+        'relationship' => 'none',
7137
+        'override' => array(
7138 7138
         'button' => 'Use default',
7139
-      ),
7139
+        ),
7140 7140
     ),
7141 7141
     'phpcode_1' => array(
7142
-      'label' => 'GPU',
7143
-      'alter' => array(
7142
+        'label' => 'GPU',
7143
+        'alter' => array(
7144 7144
         'alter_text' => 0,
7145 7145
         'text' => '',
7146 7146
         'make_link' => 0,
@@ -7159,27 +7159,27 @@  discard block
 block discarded – undo
7159 7159
         'ellipsis' => 1,
7160 7160
         'html' => 0,
7161 7161
         'strip_tags' => 0,
7162
-      ),
7163
-      'empty' => '',
7164
-      'hide_empty' => 0,
7165
-      'empty_zero' => 0,
7166
-      'hide_alter_empty' => 1,
7167
-      'value' => '<?php
7162
+        ),
7163
+        'empty' => '',
7164
+        'hide_empty' => 0,
7165
+        'empty_zero' => 0,
7166
+        'hide_alter_empty' => 1,
7167
+        'value' => '<?php
7168 7168
   require_boinc(\'host\');
7169 7169
   echo gpu_desc(parse_serialnum($data->host_serialnum));
7170 7170
 ?>',
7171
-      'exclude' => 1,
7172
-      'id' => 'phpcode_1',
7173
-      'table' => 'customfield',
7174
-      'field' => 'phpcode',
7175
-      'relationship' => 'none',
7176
-      'override' => array(
7171
+        'exclude' => 1,
7172
+        'id' => 'phpcode_1',
7173
+        'table' => 'customfield',
7174
+        'field' => 'phpcode',
7175
+        'relationship' => 'none',
7176
+        'override' => array(
7177 7177
         'button' => 'Use default',
7178
-      ),
7178
+        ),
7179 7179
     ),
7180 7180
     'os_name' => array(
7181
-      'label' => 'Operating system',
7182
-      'alter' => array(
7181
+        'label' => 'Operating system',
7182
+        'alter' => array(
7183 7183
         'alter_text' => 0,
7184 7184
         'text' => '',
7185 7185
         'make_link' => 0,
@@ -7198,23 +7198,23 @@  discard block
 block discarded – undo
7198 7198
         'ellipsis' => 1,
7199 7199
         'html' => 0,
7200 7200
         'strip_tags' => 0,
7201
-      ),
7202
-      'empty' => '',
7203
-      'hide_empty' => 0,
7204
-      'empty_zero' => 0,
7205
-      'hide_alter_empty' => 1,
7206
-      'exclude' => 1,
7207
-      'id' => 'os_name',
7208
-      'table' => 'host',
7209
-      'field' => 'os_name',
7210
-      'relationship' => 'none',
7211
-      'override' => array(
7201
+        ),
7202
+        'empty' => '',
7203
+        'hide_empty' => 0,
7204
+        'empty_zero' => 0,
7205
+        'hide_alter_empty' => 1,
7206
+        'exclude' => 1,
7207
+        'id' => 'os_name',
7208
+        'table' => 'host',
7209
+        'field' => 'os_name',
7210
+        'relationship' => 'none',
7211
+        'override' => array(
7212 7212
         'button' => 'Use default',
7213
-      ),
7213
+        ),
7214 7214
     ),
7215 7215
     'os_version' => array(
7216
-      'label' => 'Operating system version',
7217
-      'alter' => array(
7216
+        'label' => 'Operating system version',
7217
+        'alter' => array(
7218 7218
         'alter_text' => 0,
7219 7219
         'text' => '',
7220 7220
         'make_link' => 0,
@@ -7233,178 +7233,178 @@  discard block
 block discarded – undo
7233 7233
         'ellipsis' => 1,
7234 7234
         'html' => 0,
7235 7235
         'strip_tags' => 0,
7236
-      ),
7237
-      'empty' => '',
7238
-      'hide_empty' => 0,
7239
-      'empty_zero' => 0,
7240
-      'hide_alter_empty' => 1,
7241
-      'exclude' => 1,
7242
-      'id' => 'os_version',
7243
-      'table' => 'host',
7244
-      'field' => 'os_version',
7245
-      'relationship' => 'none',
7246
-      'override' => array(
7236
+        ),
7237
+        'empty' => '',
7238
+        'hide_empty' => 0,
7239
+        'empty_zero' => 0,
7240
+        'hide_alter_empty' => 1,
7241
+        'exclude' => 1,
7242
+        'id' => 'os_version',
7243
+        'table' => 'host',
7244
+        'field' => 'os_version',
7245
+        'relationship' => 'none',
7246
+        'override' => array(
7247 7247
         'button' => 'Use default',
7248
-      ),
7248
+        ),
7249 7249
     ),
7250
-  ));
7251
-  $handler->override_option('arguments', array());
7252
-  $handler->override_option('filters', array(
7250
+    ));
7251
+    $handler->override_option('arguments', array());
7252
+    $handler->override_option('filters', array(
7253 7253
     'show_hosts' => array(
7254
-      'operator' => '=',
7255
-      'value' => array(
7254
+        'operator' => '=',
7255
+        'value' => array(
7256 7256
         'value' => '1',
7257 7257
         'min' => '',
7258 7258
         'max' => '',
7259
-      ),
7260
-      'group' => '0',
7261
-      'exposed' => FALSE,
7262
-      'expose' => array(
7259
+        ),
7260
+        'group' => '0',
7261
+        'exposed' => FALSE,
7262
+        'expose' => array(
7263 7263
         'operator' => FALSE,
7264 7264
         'label' => '',
7265
-      ),
7266
-      'id' => 'show_hosts',
7267
-      'table' => 'user',
7268
-      'field' => 'show_hosts',
7269
-      'relationship' => 'userid',
7265
+        ),
7266
+        'id' => 'show_hosts',
7267
+        'table' => 'user',
7268
+        'field' => 'show_hosts',
7269
+        'relationship' => 'userid',
7270 7270
     ),
7271 7271
     'total_credit' => array(
7272
-      'operator' => '>=',
7273
-      'value' => array(
7272
+        'operator' => '>=',
7273
+        'value' => array(
7274 7274
         'value' => '1',
7275 7275
         'min' => '',
7276 7276
         'max' => '',
7277
-      ),
7278
-      'group' => '0',
7279
-      'exposed' => FALSE,
7280
-      'expose' => array(
7277
+        ),
7278
+        'group' => '0',
7279
+        'exposed' => FALSE,
7280
+        'expose' => array(
7281 7281
         'operator' => FALSE,
7282 7282
         'label' => '',
7283
-      ),
7284
-      'id' => 'total_credit',
7285
-      'table' => 'host',
7286
-      'field' => 'total_credit',
7287
-      'override' => array(
7283
+        ),
7284
+        'id' => 'total_credit',
7285
+        'table' => 'host',
7286
+        'field' => 'total_credit',
7287
+        'override' => array(
7288 7288
         'button' => 'Use default',
7289
-      ),
7290
-      'relationship' => 'none',
7291
-    ),
7292
-  ));
7293
-  $handler->override_option('title', 'Top computers');
7294
-  $handler->override_option('items_per_page', 10);
7295
-  $handler->override_option('use_pager', '0');
7296
-  $handler->override_option('use_more', 1);
7297
-  $handler->override_option('use_more_always', 0);
7298
-  $handler->override_option('use_more_text', 'view more');
7299
-  $handler->override_option('link_display', 'page_3');
7300
-  $handler->override_option('style_options', array(
7289
+        ),
7290
+        'relationship' => 'none',
7291
+    ),
7292
+    ));
7293
+    $handler->override_option('title', 'Top computers');
7294
+    $handler->override_option('items_per_page', 10);
7295
+    $handler->override_option('use_pager', '0');
7296
+    $handler->override_option('use_more', 1);
7297
+    $handler->override_option('use_more_always', 0);
7298
+    $handler->override_option('use_more_text', 'view more');
7299
+    $handler->override_option('link_display', 'page_3');
7300
+    $handler->override_option('style_options', array(
7301 7301
     'grouping' => '',
7302 7302
     'override' => 1,
7303 7303
     'sticky' => 0,
7304 7304
     'order' => 'desc',
7305 7305
     'summary' => '',
7306 7306
     'columns' => array(
7307
-      'id_1' => 'id_1',
7308
-      'name' => 'name',
7309
-      'show_hosts' => 'show_hosts',
7310
-      'rownumber' => 'rownumber',
7311
-      'id' => 'id',
7312
-      'phpcode_3' => 'id',
7313
-      'host_cpid' => 'host_cpid',
7314
-      'phpcode_4' => 'id',
7315
-      'phpcode_5' => 'phpcode_5',
7316
-      'expavg_credit' => 'expavg_credit',
7317
-      'total_credit' => 'total_credit',
7318
-      'serialnum' => 'serialnum',
7319
-      'phpcode' => 'phpcode',
7320
-      'p_vendor' => 'p_vendor',
7321
-      'p_model' => 'p_vendor',
7322
-      'p_ncpus' => 'p_vendor',
7323
-      'phpcode_1' => 'phpcode_1',
7324
-      'os_name' => 'os_name',
7325
-      'os_version' => 'os_name',
7307
+        'id_1' => 'id_1',
7308
+        'name' => 'name',
7309
+        'show_hosts' => 'show_hosts',
7310
+        'rownumber' => 'rownumber',
7311
+        'id' => 'id',
7312
+        'phpcode_3' => 'id',
7313
+        'host_cpid' => 'host_cpid',
7314
+        'phpcode_4' => 'id',
7315
+        'phpcode_5' => 'phpcode_5',
7316
+        'expavg_credit' => 'expavg_credit',
7317
+        'total_credit' => 'total_credit',
7318
+        'serialnum' => 'serialnum',
7319
+        'phpcode' => 'phpcode',
7320
+        'p_vendor' => 'p_vendor',
7321
+        'p_model' => 'p_vendor',
7322
+        'p_ncpus' => 'p_vendor',
7323
+        'phpcode_1' => 'phpcode_1',
7324
+        'os_name' => 'os_name',
7325
+        'os_version' => 'os_name',
7326 7326
     ),
7327 7327
     'info' => array(
7328
-      'id_1' => array(
7328
+        'id_1' => array(
7329 7329
         'sortable' => 0,
7330 7330
         'separator' => '',
7331
-      ),
7332
-      'name' => array(
7331
+        ),
7332
+        'name' => array(
7333 7333
         'sortable' => 0,
7334 7334
         'separator' => '',
7335
-      ),
7336
-      'show_hosts' => array(
7335
+        ),
7336
+        'show_hosts' => array(
7337 7337
         'sortable' => 0,
7338 7338
         'separator' => '',
7339
-      ),
7340
-      'rownumber' => array(
7339
+        ),
7340
+        'rownumber' => array(
7341 7341
         'separator' => '',
7342
-      ),
7343
-      'id' => array(
7342
+        ),
7343
+        'id' => array(
7344 7344
         'sortable' => 0,
7345 7345
         'separator' => ' | ',
7346
-      ),
7347
-      'phpcode_3' => array(
7346
+        ),
7347
+        'phpcode_3' => array(
7348 7348
         'separator' => '',
7349
-      ),
7350
-      'host_cpid' => array(
7349
+        ),
7350
+        'host_cpid' => array(
7351 7351
         'sortable' => 0,
7352 7352
         'separator' => '',
7353
-      ),
7354
-      'phpcode_4' => array(
7353
+        ),
7354
+        'phpcode_4' => array(
7355 7355
         'separator' => '',
7356
-      ),
7357
-      'phpcode_5' => array(
7356
+        ),
7357
+        'phpcode_5' => array(
7358 7358
         'separator' => '',
7359
-      ),
7360
-      'expavg_credit' => array(
7359
+        ),
7360
+        'expavg_credit' => array(
7361 7361
         'sortable' => 1,
7362 7362
         'separator' => '',
7363
-      ),
7364
-      'total_credit' => array(
7363
+        ),
7364
+        'total_credit' => array(
7365 7365
         'sortable' => 1,
7366 7366
         'separator' => '',
7367
-      ),
7368
-      'serialnum' => array(
7367
+        ),
7368
+        'serialnum' => array(
7369 7369
         'sortable' => 0,
7370 7370
         'separator' => '',
7371
-      ),
7372
-      'phpcode' => array(
7371
+        ),
7372
+        'phpcode' => array(
7373 7373
         'separator' => '',
7374
-      ),
7375
-      'p_vendor' => array(
7374
+        ),
7375
+        'p_vendor' => array(
7376 7376
         'sortable' => 1,
7377 7377
         'separator' => '<br/>',
7378
-      ),
7379
-      'p_model' => array(
7378
+        ),
7379
+        'p_model' => array(
7380 7380
         'sortable' => 0,
7381 7381
         'separator' => '',
7382
-      ),
7383
-      'p_ncpus' => array(
7382
+        ),
7383
+        'p_ncpus' => array(
7384 7384
         'sortable' => 0,
7385 7385
         'separator' => '',
7386
-      ),
7387
-      'phpcode_1' => array(
7386
+        ),
7387
+        'phpcode_1' => array(
7388 7388
         'separator' => '',
7389
-      ),
7390
-      'os_name' => array(
7389
+        ),
7390
+        'os_name' => array(
7391 7391
         'sortable' => 1,
7392 7392
         'separator' => '<br/>',
7393
-      ),
7394
-      'os_version' => array(
7393
+        ),
7394
+        'os_version' => array(
7395 7395
         'sortable' => 0,
7396 7396
         'separator' => '',
7397
-      ),
7397
+        ),
7398 7398
     ),
7399 7399
     'default' => 'expavg_credit',
7400
-  ));
7401
-  $handler->override_option('pane_title', '');
7402
-  $handler->override_option('pane_description', '');
7403
-  $handler->override_option('pane_category', array(
7400
+    ));
7401
+    $handler->override_option('pane_title', '');
7402
+    $handler->override_option('pane_description', '');
7403
+    $handler->override_option('pane_category', array(
7404 7404
     'name' => 'View panes',
7405 7405
     'weight' => 0,
7406
-  ));
7407
-  $handler->override_option('allow', array(
7406
+    ));
7407
+    $handler->override_option('allow', array(
7408 7408
     'use_pager' => FALSE,
7409 7409
     'items_per_page' => FALSE,
7410 7410
     'offset' => FALSE,
@@ -7414,27 +7414,27 @@  discard block
 block discarded – undo
7414 7414
     'title_override' => FALSE,
7415 7415
     'exposed_form' => FALSE,
7416 7416
     'fields_override' => FALSE,
7417
-  ));
7418
-  $handler->override_option('argument_input', array());
7419
-  $handler->override_option('link_to_view', 0);
7420
-  $handler->override_option('inherit_panels_path', 0);
7417
+    ));
7418
+    $handler->override_option('argument_input', array());
7419
+    $handler->override_option('link_to_view', 0);
7420
+    $handler->override_option('inherit_panels_path', 0);
7421 7421
 
7422
-  $views[$view->name] = $view;
7422
+    $views[$view->name] = $view;
7423 7423
 
7424
-  // Exported view: boinc_host_tasks_all
7425
-  $view = new view;
7426
-  $view->name = 'boinc_host_tasks_all';
7427
-  $view->description = 'A list of all tasks for the given host';
7428
-  $view->tag = '';
7429
-  $view->base_table = 'result';
7430
-  $view->core = 0;
7431
-  $view->api_version = '2';
7432
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
7433
-  $handler = $view->new_display('default', 'Defaults', 'default');
7434
-  $handler->override_option('fields', array(
7424
+    // Exported view: boinc_host_tasks_all
7425
+    $view = new view;
7426
+    $view->name = 'boinc_host_tasks_all';
7427
+    $view->description = 'A list of all tasks for the given host';
7428
+    $view->tag = '';
7429
+    $view->base_table = 'result';
7430
+    $view->core = 0;
7431
+    $view->api_version = '2';
7432
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
7433
+    $handler = $view->new_display('default', 'Defaults', 'default');
7434
+    $handler->override_option('fields', array(
7435 7435
     'name' => array(
7436
-      'label' => 'Name',
7437
-      'alter' => array(
7436
+        'label' => 'Name',
7437
+        'alter' => array(
7438 7438
         'alter_text' => 0,
7439 7439
         'text' => '',
7440 7440
         'make_link' => 0,
@@ -7453,20 +7453,20 @@  discard block
 block discarded – undo
7453 7453
         'ellipsis' => 1,
7454 7454
         'html' => 0,
7455 7455
         'strip_tags' => 0,
7456
-      ),
7457
-      'empty' => '',
7458
-      'hide_empty' => 0,
7459
-      'empty_zero' => 0,
7460
-      'hide_alter_empty' => 1,
7461
-      'exclude' => 1,
7462
-      'id' => 'name',
7463
-      'table' => 'result',
7464
-      'field' => 'name',
7465
-      'relationship' => 'none',
7456
+        ),
7457
+        'empty' => '',
7458
+        'hide_empty' => 0,
7459
+        'empty_zero' => 0,
7460
+        'hide_alter_empty' => 1,
7461
+        'exclude' => 1,
7462
+        'id' => 'name',
7463
+        'table' => 'result',
7464
+        'field' => 'name',
7465
+        'relationship' => 'none',
7466 7466
     ),
7467 7467
     'id' => array(
7468
-      'label' => 'Task ID',
7469
-      'alter' => array(
7468
+        'label' => 'Task ID',
7469
+        'alter' => array(
7470 7470
         'alter_text' => 0,
7471 7471
         'text' => '',
7472 7472
         'make_link' => 0,
@@ -7485,29 +7485,29 @@  discard block
 block discarded – undo
7485 7485
         'ellipsis' => 1,
7486 7486
         'html' => 0,
7487 7487
         'strip_tags' => 0,
7488
-      ),
7489
-      'empty' => '',
7490
-      'hide_empty' => 0,
7491
-      'empty_zero' => 0,
7492
-      'hide_alter_empty' => 1,
7493
-      'set_precision' => FALSE,
7494
-      'precision' => 0,
7495
-      'decimal' => '.',
7496
-      'separator' => '',
7497
-      'format_plural' => 0,
7498
-      'format_plural_singular' => '1',
7499
-      'format_plural_plural' => '@count',
7500
-      'prefix' => '',
7501
-      'suffix' => '',
7502
-      'exclude' => 0,
7503
-      'id' => 'id',
7504
-      'table' => 'result',
7505
-      'field' => 'id',
7506
-      'relationship' => 'none',
7488
+        ),
7489
+        'empty' => '',
7490
+        'hide_empty' => 0,
7491
+        'empty_zero' => 0,
7492
+        'hide_alter_empty' => 1,
7493
+        'set_precision' => FALSE,
7494
+        'precision' => 0,
7495
+        'decimal' => '.',
7496
+        'separator' => '',
7497
+        'format_plural' => 0,
7498
+        'format_plural_singular' => '1',
7499
+        'format_plural_plural' => '@count',
7500
+        'prefix' => '',
7501
+        'suffix' => '',
7502
+        'exclude' => 0,
7503
+        'id' => 'id',
7504
+        'table' => 'result',
7505
+        'field' => 'id',
7506
+        'relationship' => 'none',
7507 7507
     ),
7508 7508
     'workunitid' => array(
7509
-      'label' => 'Workunit ID',
7510
-      'alter' => array(
7509
+        'label' => 'Workunit ID',
7510
+        'alter' => array(
7511 7511
         'alter_text' => 0,
7512 7512
         'text' => '',
7513 7513
         'make_link' => 1,
@@ -7524,25 +7524,25 @@  discard block
 block discarded – undo
7524 7524
         'ellipsis' => 1,
7525 7525
         'html' => 0,
7526 7526
         'strip_tags' => 0,
7527
-      ),
7528
-      'empty' => '',
7529
-      'hide_empty' => 0,
7530
-      'empty_zero' => 0,
7531
-      'set_precision' => FALSE,
7532
-      'precision' => 0,
7533
-      'decimal' => '.',
7534
-      'separator' => '',
7535
-      'prefix' => '',
7536
-      'suffix' => '',
7537
-      'exclude' => 0,
7538
-      'id' => 'workunitid',
7539
-      'table' => 'result',
7540
-      'field' => 'workunitid',
7541
-      'relationship' => 'none',
7527
+        ),
7528
+        'empty' => '',
7529
+        'hide_empty' => 0,
7530
+        'empty_zero' => 0,
7531
+        'set_precision' => FALSE,
7532
+        'precision' => 0,
7533
+        'decimal' => '.',
7534
+        'separator' => '',
7535
+        'prefix' => '',
7536
+        'suffix' => '',
7537
+        'exclude' => 0,
7538
+        'id' => 'workunitid',
7539
+        'table' => 'result',
7540
+        'field' => 'workunitid',
7541
+        'relationship' => 'none',
7542 7542
     ),
7543 7543
     'sent_time' => array(
7544
-      'label' => 'Sent',
7545
-      'alter' => array(
7544
+        'label' => 'Sent',
7545
+        'alter' => array(
7546 7546
         'alter_text' => 0,
7547 7547
         'text' => '',
7548 7548
         'make_link' => 0,
@@ -7559,21 +7559,21 @@  discard block
 block discarded – undo
7559 7559
         'ellipsis' => 1,
7560 7560
         'html' => 0,
7561 7561
         'strip_tags' => 0,
7562
-      ),
7563
-      'empty' => '',
7564
-      'hide_empty' => 0,
7565
-      'empty_zero' => 0,
7566
-      'date_format' => 'custom',
7567
-      'custom_date_format' => 'j M Y G:i:s e',
7568
-      'exclude' => 1,
7569
-      'id' => 'sent_time',
7570
-      'table' => 'result',
7571
-      'field' => 'sent_time',
7572
-      'relationship' => 'none',
7562
+        ),
7563
+        'empty' => '',
7564
+        'hide_empty' => 0,
7565
+        'empty_zero' => 0,
7566
+        'date_format' => 'custom',
7567
+        'custom_date_format' => 'j M Y G:i:s e',
7568
+        'exclude' => 1,
7569
+        'id' => 'sent_time',
7570
+        'table' => 'result',
7571
+        'field' => 'sent_time',
7572
+        'relationship' => 'none',
7573 7573
     ),
7574 7574
     'received_time' => array(
7575
-      'label' => 'Received time',
7576
-      'alter' => array(
7575
+        'label' => 'Received time',
7576
+        'alter' => array(
7577 7577
         'alter_text' => 0,
7578 7578
         'text' => '',
7579 7579
         'make_link' => 0,
@@ -7590,21 +7590,21 @@  discard block
 block discarded – undo
7590 7590
         'ellipsis' => 1,
7591 7591
         'html' => 0,
7592 7592
         'strip_tags' => 0,
7593
-      ),
7594
-      'empty' => '',
7595
-      'hide_empty' => 0,
7596
-      'empty_zero' => 0,
7597
-      'date_format' => 'small',
7598
-      'custom_date_format' => '',
7599
-      'exclude' => 1,
7600
-      'id' => 'received_time',
7601
-      'table' => 'result',
7602
-      'field' => 'received_time',
7603
-      'relationship' => 'none',
7593
+        ),
7594
+        'empty' => '',
7595
+        'hide_empty' => 0,
7596
+        'empty_zero' => 0,
7597
+        'date_format' => 'small',
7598
+        'custom_date_format' => '',
7599
+        'exclude' => 1,
7600
+        'id' => 'received_time',
7601
+        'table' => 'result',
7602
+        'field' => 'received_time',
7603
+        'relationship' => 'none',
7604 7604
     ),
7605 7605
     'report_deadline' => array(
7606
-      'label' => 'Report deadline',
7607
-      'alter' => array(
7606
+        'label' => 'Report deadline',
7607
+        'alter' => array(
7608 7608
         'alter_text' => 0,
7609 7609
         'text' => '',
7610 7610
         'make_link' => 0,
@@ -7621,21 +7621,21 @@  discard block
 block discarded – undo
7621 7621
         'ellipsis' => 1,
7622 7622
         'html' => 0,
7623 7623
         'strip_tags' => 0,
7624
-      ),
7625
-      'empty' => '',
7626
-      'hide_empty' => 0,
7627
-      'empty_zero' => 0,
7628
-      'date_format' => 'small',
7629
-      'custom_date_format' => '',
7630
-      'exclude' => 1,
7631
-      'id' => 'report_deadline',
7632
-      'table' => 'result',
7633
-      'field' => 'report_deadline',
7634
-      'relationship' => 'none',
7624
+        ),
7625
+        'empty' => '',
7626
+        'hide_empty' => 0,
7627
+        'empty_zero' => 0,
7628
+        'date_format' => 'small',
7629
+        'custom_date_format' => '',
7630
+        'exclude' => 1,
7631
+        'id' => 'report_deadline',
7632
+        'table' => 'result',
7633
+        'field' => 'report_deadline',
7634
+        'relationship' => 'none',
7635 7635
     ),
7636 7636
     'phpcode_3' => array(
7637
-      'label' => 'Sent',
7638
-      'alter' => array(
7637
+        'label' => 'Sent',
7638
+        'alter' => array(
7639 7639
         'alter_text' => 0,
7640 7640
         'text' => '',
7641 7641
         'make_link' => 0,
@@ -7654,24 +7654,24 @@  discard block
 block discarded – undo
7654 7654
         'ellipsis' => 1,
7655 7655
         'html' => 0,
7656 7656
         'strip_tags' => 0,
7657
-      ),
7658
-      'empty' => '',
7659
-      'hide_empty' => 0,
7660
-      'empty_zero' => 0,
7661
-      'hide_alter_empty' => 1,
7662
-      'value' => '<?php
7657
+        ),
7658
+        'empty' => '',
7659
+        'hide_empty' => 0,
7660
+        'empty_zero' => 0,
7661
+        'hide_alter_empty' => 1,
7662
+        'value' => '<?php
7663 7663
   require_boinc(\'util\');
7664 7664
   echo date(\'j M Y G:i:s T\', $data->result_sent_time);
7665 7665
 ?>',
7666
-      'exclude' => 0,
7667
-      'id' => 'phpcode_3',
7668
-      'table' => 'customfield',
7669
-      'field' => 'phpcode',
7670
-      'relationship' => 'none',
7666
+        'exclude' => 0,
7667
+        'id' => 'phpcode_3',
7668
+        'table' => 'customfield',
7669
+        'field' => 'phpcode',
7670
+        'relationship' => 'none',
7671 7671
     ),
7672 7672
     'phpcode' => array(
7673
-      'label' => 'Time reported or deadline',
7674
-      'alter' => array(
7673
+        'label' => 'Time reported or deadline',
7674
+        'alter' => array(
7675 7675
         'alter_text' => 0,
7676 7676
         'text' => '',
7677 7677
         'make_link' => 0,
@@ -7690,24 +7690,24 @@  discard block
 block discarded – undo
7690 7690
         'ellipsis' => 1,
7691 7691
         'html' => 0,
7692 7692
         'strip_tags' => 0,
7693
-      ),
7694
-      'empty' => '',
7695
-      'hide_empty' => 0,
7696
-      'empty_zero' => 0,
7697
-      'hide_alter_empty' => 1,
7698
-      'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
7699
-      'exclude' => 0,
7700
-      'id' => 'phpcode',
7701
-      'table' => 'customfield',
7702
-      'field' => 'phpcode',
7703
-      'override' => array(
7693
+        ),
7694
+        'empty' => '',
7695
+        'hide_empty' => 0,
7696
+        'empty_zero' => 0,
7697
+        'hide_alter_empty' => 1,
7698
+        'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
7699
+        'exclude' => 0,
7700
+        'id' => 'phpcode',
7701
+        'table' => 'customfield',
7702
+        'field' => 'phpcode',
7703
+        'override' => array(
7704 7704
         'button' => 'Override',
7705
-      ),
7706
-      'relationship' => 'none',
7705
+        ),
7706
+        'relationship' => 'none',
7707 7707
     ),
7708 7708
     'server_state' => array(
7709
-      'label' => 'Server state',
7710
-      'alter' => array(
7709
+        'label' => 'Server state',
7710
+        'alter' => array(
7711 7711
         'alter_text' => 0,
7712 7712
         'text' => '',
7713 7713
         'make_link' => 0,
@@ -7724,25 +7724,25 @@  discard block
 block discarded – undo
7724 7724
         'ellipsis' => 1,
7725 7725
         'html' => 0,
7726 7726
         'strip_tags' => 0,
7727
-      ),
7728
-      'empty' => '',
7729
-      'hide_empty' => 0,
7730
-      'empty_zero' => 0,
7731
-      'set_precision' => FALSE,
7732
-      'precision' => 0,
7733
-      'decimal' => '.',
7734
-      'separator' => '',
7735
-      'prefix' => '',
7736
-      'suffix' => '',
7737
-      'exclude' => 1,
7738
-      'id' => 'server_state',
7739
-      'table' => 'result',
7740
-      'field' => 'server_state',
7741
-      'relationship' => 'none',
7727
+        ),
7728
+        'empty' => '',
7729
+        'hide_empty' => 0,
7730
+        'empty_zero' => 0,
7731
+        'set_precision' => FALSE,
7732
+        'precision' => 0,
7733
+        'decimal' => '.',
7734
+        'separator' => '',
7735
+        'prefix' => '',
7736
+        'suffix' => '',
7737
+        'exclude' => 1,
7738
+        'id' => 'server_state',
7739
+        'table' => 'result',
7740
+        'field' => 'server_state',
7741
+        'relationship' => 'none',
7742 7742
     ),
7743 7743
     'outcome' => array(
7744
-      'label' => 'Outcome',
7745
-      'alter' => array(
7744
+        'label' => 'Outcome',
7745
+        'alter' => array(
7746 7746
         'alter_text' => 0,
7747 7747
         'text' => '',
7748 7748
         'make_link' => 0,
@@ -7759,25 +7759,25 @@  discard block
 block discarded – undo
7759 7759
         'ellipsis' => 1,
7760 7760
         'html' => 0,
7761 7761
         'strip_tags' => 0,
7762
-      ),
7763
-      'empty' => '',
7764
-      'hide_empty' => 0,
7765
-      'empty_zero' => 0,
7766
-      'set_precision' => FALSE,
7767
-      'precision' => 0,
7768
-      'decimal' => '.',
7769
-      'separator' => '',
7770
-      'prefix' => '',
7771
-      'suffix' => '',
7772
-      'exclude' => 1,
7773
-      'id' => 'outcome',
7774
-      'table' => 'result',
7775
-      'field' => 'outcome',
7776
-      'relationship' => 'none',
7762
+        ),
7763
+        'empty' => '',
7764
+        'hide_empty' => 0,
7765
+        'empty_zero' => 0,
7766
+        'set_precision' => FALSE,
7767
+        'precision' => 0,
7768
+        'decimal' => '.',
7769
+        'separator' => '',
7770
+        'prefix' => '',
7771
+        'suffix' => '',
7772
+        'exclude' => 1,
7773
+        'id' => 'outcome',
7774
+        'table' => 'result',
7775
+        'field' => 'outcome',
7776
+        'relationship' => 'none',
7777 7777
     ),
7778 7778
     'client_state' => array(
7779
-      'label' => 'Client state',
7780
-      'alter' => array(
7779
+        'label' => 'Client state',
7780
+        'alter' => array(
7781 7781
         'alter_text' => 0,
7782 7782
         'text' => '',
7783 7783
         'make_link' => 0,
@@ -7794,25 +7794,25 @@  discard block
 block discarded – undo
7794 7794
         'ellipsis' => 1,
7795 7795
         'html' => 0,
7796 7796
         'strip_tags' => 0,
7797
-      ),
7798
-      'empty' => '',
7799
-      'hide_empty' => 0,
7800
-      'empty_zero' => 0,
7801
-      'set_precision' => FALSE,
7802
-      'precision' => 0,
7803
-      'decimal' => '.',
7804
-      'separator' => '',
7805
-      'prefix' => '',
7806
-      'suffix' => '',
7807
-      'exclude' => 1,
7808
-      'id' => 'client_state',
7809
-      'table' => 'result',
7810
-      'field' => 'client_state',
7811
-      'relationship' => 'none',
7797
+        ),
7798
+        'empty' => '',
7799
+        'hide_empty' => 0,
7800
+        'empty_zero' => 0,
7801
+        'set_precision' => FALSE,
7802
+        'precision' => 0,
7803
+        'decimal' => '.',
7804
+        'separator' => '',
7805
+        'prefix' => '',
7806
+        'suffix' => '',
7807
+        'exclude' => 1,
7808
+        'id' => 'client_state',
7809
+        'table' => 'result',
7810
+        'field' => 'client_state',
7811
+        'relationship' => 'none',
7812 7812
     ),
7813 7813
     'validate_state' => array(
7814
-      'label' => 'Validation state',
7815
-      'alter' => array(
7814
+        'label' => 'Validation state',
7815
+        'alter' => array(
7816 7816
         'alter_text' => 0,
7817 7817
         'text' => '',
7818 7818
         'make_link' => 0,
@@ -7829,25 +7829,25 @@  discard block
 block discarded – undo
7829 7829
         'ellipsis' => 1,
7830 7830
         'html' => 0,
7831 7831
         'strip_tags' => 0,
7832
-      ),
7833
-      'empty' => '',
7834
-      'hide_empty' => 0,
7835
-      'empty_zero' => 0,
7836
-      'set_precision' => FALSE,
7837
-      'precision' => 0,
7838
-      'decimal' => '.',
7839
-      'separator' => '',
7840
-      'prefix' => '',
7841
-      'suffix' => '',
7842
-      'exclude' => 1,
7843
-      'id' => 'validate_state',
7844
-      'table' => 'result',
7845
-      'field' => 'validate_state',
7846
-      'relationship' => 'none',
7832
+        ),
7833
+        'empty' => '',
7834
+        'hide_empty' => 0,
7835
+        'empty_zero' => 0,
7836
+        'set_precision' => FALSE,
7837
+        'precision' => 0,
7838
+        'decimal' => '.',
7839
+        'separator' => '',
7840
+        'prefix' => '',
7841
+        'suffix' => '',
7842
+        'exclude' => 1,
7843
+        'id' => 'validate_state',
7844
+        'table' => 'result',
7845
+        'field' => 'validate_state',
7846
+        'relationship' => 'none',
7847 7847
     ),
7848 7848
     'exit_status' => array(
7849
-      'label' => 'Exit status',
7850
-      'alter' => array(
7849
+        'label' => 'Exit status',
7850
+        'alter' => array(
7851 7851
         'alter_text' => 0,
7852 7852
         'text' => '',
7853 7853
         'make_link' => 0,
@@ -7864,25 +7864,25 @@  discard block
 block discarded – undo
7864 7864
         'ellipsis' => 1,
7865 7865
         'html' => 0,
7866 7866
         'strip_tags' => 0,
7867
-      ),
7868
-      'empty' => '',
7869
-      'hide_empty' => 0,
7870
-      'empty_zero' => 0,
7871
-      'set_precision' => FALSE,
7872
-      'precision' => 0,
7873
-      'decimal' => '.',
7874
-      'separator' => '',
7875
-      'prefix' => '',
7876
-      'suffix' => '',
7877
-      'exclude' => 1,
7878
-      'id' => 'exit_status',
7879
-      'table' => 'result',
7880
-      'field' => 'exit_status',
7881
-      'relationship' => 'none',
7867
+        ),
7868
+        'empty' => '',
7869
+        'hide_empty' => 0,
7870
+        'empty_zero' => 0,
7871
+        'set_precision' => FALSE,
7872
+        'precision' => 0,
7873
+        'decimal' => '.',
7874
+        'separator' => '',
7875
+        'prefix' => '',
7876
+        'suffix' => '',
7877
+        'exclude' => 1,
7878
+        'id' => 'exit_status',
7879
+        'table' => 'result',
7880
+        'field' => 'exit_status',
7881
+        'relationship' => 'none',
7882 7882
     ),
7883 7883
     'phpcode_1' => array(
7884
-      'label' => 'Status',
7885
-      'alter' => array(
7884
+        'label' => 'Status',
7885
+        'alter' => array(
7886 7886
         'alter_text' => 0,
7887 7887
         'text' => '',
7888 7888
         'make_link' => 0,
@@ -7899,11 +7899,11 @@  discard block
 block discarded – undo
7899 7899
         'ellipsis' => 1,
7900 7900
         'html' => 0,
7901 7901
         'strip_tags' => 0,
7902
-      ),
7903
-      'empty' => '',
7904
-      'hide_empty' => 0,
7905
-      'empty_zero' => 0,
7906
-      'value' => '<?php
7902
+        ),
7903
+        'empty' => '',
7904
+        'hide_empty' => 0,
7905
+        'empty_zero' => 0,
7906
+        'value' => '<?php
7907 7907
   require_boinc(\'result\');
7908 7908
   $result = new stdClass();
7909 7909
   $result->server_state = $data->result_server_state;
@@ -7913,18 +7913,18 @@  discard block
 block discarded – undo
7913 7913
   $result->exit_status = $data->result_exit_status;
7914 7914
   return state_string($result);
7915 7915
 ?>',
7916
-      'exclude' => 0,
7917
-      'id' => 'phpcode_1',
7918
-      'table' => 'customfield',
7919
-      'field' => 'phpcode',
7920
-      'override' => array(
7916
+        'exclude' => 0,
7917
+        'id' => 'phpcode_1',
7918
+        'table' => 'customfield',
7919
+        'field' => 'phpcode',
7920
+        'override' => array(
7921 7921
         'button' => 'Override',
7922
-      ),
7923
-      'relationship' => 'none',
7922
+        ),
7923
+        'relationship' => 'none',
7924 7924
     ),
7925 7925
     'elapsed_time' => array(
7926
-      'label' => 'Run time',
7927
-      'alter' => array(
7926
+        'label' => 'Run time',
7927
+        'alter' => array(
7928 7928
         'alter_text' => 0,
7929 7929
         'text' => '',
7930 7930
         'make_link' => 0,
@@ -7943,29 +7943,29 @@  discard block
 block discarded – undo
7943 7943
         'ellipsis' => 1,
7944 7944
         'html' => 0,
7945 7945
         'strip_tags' => 0,
7946
-      ),
7947
-      'empty' => '',
7948
-      'hide_empty' => 0,
7949
-      'empty_zero' => 0,
7950
-      'hide_alter_empty' => 1,
7951
-      'set_precision' => 1,
7952
-      'precision' => '2',
7953
-      'decimal' => '.',
7954
-      'separator' => ',',
7955
-      'format_plural' => 0,
7956
-      'format_plural_singular' => '1',
7957
-      'format_plural_plural' => '@count',
7958
-      'prefix' => '',
7959
-      'suffix' => '',
7960
-      'exclude' => 0,
7961
-      'id' => 'elapsed_time',
7962
-      'table' => 'result',
7963
-      'field' => 'elapsed_time',
7964
-      'relationship' => 'none',
7946
+        ),
7947
+        'empty' => '',
7948
+        'hide_empty' => 0,
7949
+        'empty_zero' => 0,
7950
+        'hide_alter_empty' => 1,
7951
+        'set_precision' => 1,
7952
+        'precision' => '2',
7953
+        'decimal' => '.',
7954
+        'separator' => ',',
7955
+        'format_plural' => 0,
7956
+        'format_plural_singular' => '1',
7957
+        'format_plural_plural' => '@count',
7958
+        'prefix' => '',
7959
+        'suffix' => '',
7960
+        'exclude' => 0,
7961
+        'id' => 'elapsed_time',
7962
+        'table' => 'result',
7963
+        'field' => 'elapsed_time',
7964
+        'relationship' => 'none',
7965 7965
     ),
7966 7966
     'cpu_time' => array(
7967
-      'label' => 'CPU time',
7968
-      'alter' => array(
7967
+        'label' => 'CPU time',
7968
+        'alter' => array(
7969 7969
         'alter_text' => 0,
7970 7970
         'text' => '',
7971 7971
         'make_link' => 0,
@@ -7984,29 +7984,29 @@  discard block
 block discarded – undo
7984 7984
         'ellipsis' => 1,
7985 7985
         'html' => 0,
7986 7986
         'strip_tags' => 0,
7987
-      ),
7988
-      'empty' => '',
7989
-      'hide_empty' => 0,
7990
-      'empty_zero' => 0,
7991
-      'hide_alter_empty' => 1,
7992
-      'set_precision' => 1,
7993
-      'precision' => '2',
7994
-      'decimal' => '.',
7995
-      'separator' => ',',
7996
-      'format_plural' => 0,
7997
-      'format_plural_singular' => '1',
7998
-      'format_plural_plural' => '@count',
7999
-      'prefix' => '',
8000
-      'suffix' => '',
8001
-      'exclude' => 0,
8002
-      'id' => 'cpu_time',
8003
-      'table' => 'result',
8004
-      'field' => 'cpu_time',
8005
-      'relationship' => 'none',
7987
+        ),
7988
+        'empty' => '',
7989
+        'hide_empty' => 0,
7990
+        'empty_zero' => 0,
7991
+        'hide_alter_empty' => 1,
7992
+        'set_precision' => 1,
7993
+        'precision' => '2',
7994
+        'decimal' => '.',
7995
+        'separator' => ',',
7996
+        'format_plural' => 0,
7997
+        'format_plural_singular' => '1',
7998
+        'format_plural_plural' => '@count',
7999
+        'prefix' => '',
8000
+        'suffix' => '',
8001
+        'exclude' => 0,
8002
+        'id' => 'cpu_time',
8003
+        'table' => 'result',
8004
+        'field' => 'cpu_time',
8005
+        'relationship' => 'none',
8006 8006
     ),
8007 8007
     'granted_credit' => array(
8008
-      'label' => 'Granted credit',
8009
-      'alter' => array(
8008
+        'label' => 'Granted credit',
8009
+        'alter' => array(
8010 8010
         'alter_text' => 0,
8011 8011
         'text' => '',
8012 8012
         'make_link' => 0,
@@ -8025,29 +8025,29 @@  discard block
 block discarded – undo
8025 8025
         'ellipsis' => 1,
8026 8026
         'html' => 0,
8027 8027
         'strip_tags' => 0,
8028
-      ),
8029
-      'empty' => '',
8030
-      'hide_empty' => 0,
8031
-      'empty_zero' => 0,
8032
-      'hide_alter_empty' => 0,
8033
-      'set_precision' => 1,
8034
-      'precision' => '0',
8035
-      'decimal' => '.',
8036
-      'separator' => ',',
8037
-      'format_plural' => 0,
8038
-      'format_plural_singular' => '1',
8039
-      'format_plural_plural' => '@count',
8040
-      'prefix' => '',
8041
-      'suffix' => '',
8042
-      'exclude' => 0,
8043
-      'id' => 'granted_credit',
8044
-      'table' => 'result',
8045
-      'field' => 'granted_credit',
8046
-      'relationship' => 'none',
8028
+        ),
8029
+        'empty' => '',
8030
+        'hide_empty' => 0,
8031
+        'empty_zero' => 0,
8032
+        'hide_alter_empty' => 0,
8033
+        'set_precision' => 1,
8034
+        'precision' => '0',
8035
+        'decimal' => '.',
8036
+        'separator' => ',',
8037
+        'format_plural' => 0,
8038
+        'format_plural_singular' => '1',
8039
+        'format_plural_plural' => '@count',
8040
+        'prefix' => '',
8041
+        'suffix' => '',
8042
+        'exclude' => 0,
8043
+        'id' => 'granted_credit',
8044
+        'table' => 'result',
8045
+        'field' => 'granted_credit',
8046
+        'relationship' => 'none',
8047 8047
     ),
8048 8048
     'appid' => array(
8049
-      'label' => 'Application ID',
8050
-      'alter' => array(
8049
+        'label' => 'Application ID',
8050
+        'alter' => array(
8051 8051
         'alter_text' => 0,
8052 8052
         'text' => '',
8053 8053
         'make_link' => 0,
@@ -8066,29 +8066,29 @@  discard block
 block discarded – undo
8066 8066
         'ellipsis' => 1,
8067 8067
         'html' => 0,
8068 8068
         'strip_tags' => 0,
8069
-      ),
8070
-      'empty' => '',
8071
-      'hide_empty' => 0,
8072
-      'empty_zero' => 0,
8073
-      'hide_alter_empty' => 1,
8074
-      'set_precision' => FALSE,
8075
-      'precision' => 0,
8076
-      'decimal' => '.',
8077
-      'separator' => '',
8078
-      'format_plural' => 0,
8079
-      'format_plural_singular' => '1',
8080
-      'format_plural_plural' => '@count',
8081
-      'prefix' => '',
8082
-      'suffix' => '',
8083
-      'exclude' => 1,
8084
-      'id' => 'appid',
8085
-      'table' => 'result',
8086
-      'field' => 'appid',
8087
-      'relationship' => 'none',
8069
+        ),
8070
+        'empty' => '',
8071
+        'hide_empty' => 0,
8072
+        'empty_zero' => 0,
8073
+        'hide_alter_empty' => 1,
8074
+        'set_precision' => FALSE,
8075
+        'precision' => 0,
8076
+        'decimal' => '.',
8077
+        'separator' => '',
8078
+        'format_plural' => 0,
8079
+        'format_plural_singular' => '1',
8080
+        'format_plural_plural' => '@count',
8081
+        'prefix' => '',
8082
+        'suffix' => '',
8083
+        'exclude' => 1,
8084
+        'id' => 'appid',
8085
+        'table' => 'result',
8086
+        'field' => 'appid',
8087
+        'relationship' => 'none',
8088 8088
     ),
8089 8089
     'app_version_id' => array(
8090
-      'label' => 'Application version',
8091
-      'alter' => array(
8090
+        'label' => 'Application version',
8091
+        'alter' => array(
8092 8092
         'alter_text' => 0,
8093 8093
         'text' => '',
8094 8094
         'make_link' => 0,
@@ -8105,25 +8105,25 @@  discard block
 block discarded – undo
8105 8105
         'ellipsis' => 1,
8106 8106
         'html' => 0,
8107 8107
         'strip_tags' => 0,
8108
-      ),
8109
-      'empty' => '',
8110
-      'hide_empty' => 0,
8111
-      'empty_zero' => 0,
8112
-      'set_precision' => FALSE,
8113
-      'precision' => 0,
8114
-      'decimal' => '.',
8115
-      'separator' => '',
8116
-      'prefix' => '',
8117
-      'suffix' => '',
8118
-      'exclude' => 1,
8119
-      'id' => 'app_version_id',
8120
-      'table' => 'result',
8121
-      'field' => 'app_version_id',
8122
-      'relationship' => 'none',
8108
+        ),
8109
+        'empty' => '',
8110
+        'hide_empty' => 0,
8111
+        'empty_zero' => 0,
8112
+        'set_precision' => FALSE,
8113
+        'precision' => 0,
8114
+        'decimal' => '.',
8115
+        'separator' => '',
8116
+        'prefix' => '',
8117
+        'suffix' => '',
8118
+        'exclude' => 1,
8119
+        'id' => 'app_version_id',
8120
+        'table' => 'result',
8121
+        'field' => 'app_version_id',
8122
+        'relationship' => 'none',
8123 8123
     ),
8124 8124
     'phpcode_2' => array(
8125
-      'label' => 'Application',
8126
-      'alter' => array(
8125
+        'label' => 'Application',
8126
+        'alter' => array(
8127 8127
         'alter_text' => 0,
8128 8128
         'text' => '',
8129 8129
         'make_link' => 0,
@@ -8142,55 +8142,55 @@  discard block
 block discarded – undo
8142 8142
         'ellipsis' => 1,
8143 8143
         'html' => 0,
8144 8144
         'strip_tags' => 0,
8145
-      ),
8146
-      'empty' => '',
8147
-      'hide_empty' => 0,
8148
-      'empty_zero' => 0,
8149
-      'hide_alter_empty' => 1,
8150
-      'value' => '<?php
8145
+        ),
8146
+        'empty' => '',
8147
+        'hide_empty' => 0,
8148
+        'empty_zero' => 0,
8149
+        'hide_alter_empty' => 1,
8150
+        'value' => '<?php
8151 8151
   require_boinc(\'result\');
8152 8152
   $result = new stdClass();
8153 8153
   $result->appid = $data->result_appid;
8154 8154
   $result->app_version_id = $data->result_app_version_id;
8155 8155
   return app_version_string($result);
8156 8156
 ?>',
8157
-      'exclude' => 0,
8158
-      'id' => 'phpcode_2',
8159
-      'table' => 'customfield',
8160
-      'field' => 'phpcode',
8161
-      'override' => array(
8157
+        'exclude' => 0,
8158
+        'id' => 'phpcode_2',
8159
+        'table' => 'customfield',
8160
+        'field' => 'phpcode',
8161
+        'override' => array(
8162 8162
         'button' => 'Override',
8163
-      ),
8164
-      'relationship' => 'none',
8163
+        ),
8164
+        'relationship' => 'none',
8165 8165
     ),
8166
-  ));
8167
-  $handler->override_option('arguments', array(
8166
+    ));
8167
+    $handler->override_option('arguments', array(
8168 8168
     'hostid' => array(
8169
-      'default_action' => 'not found',
8170
-      'style_plugin' => 'default_summary',
8171
-      'style_options' => array(),
8172
-      'wildcard' => 'all',
8173
-      'wildcard_substitution' => 'All',
8174
-      'title' => 'Tasks for computer %1',
8175
-      'breadcrumb' => '',
8176
-      'default_argument_type' => 'fixed',
8177
-      'default_argument' => '',
8178
-      'validate_type' => 'numeric',
8179
-      'validate_fail' => 'not found',
8180
-      'id' => 'hostid',
8181
-      'table' => 'result',
8182
-      'field' => 'hostid',
8183
-      'validate_user_argument_type' => 'uid',
8184
-      'validate_user_roles' => array(
8169
+        'default_action' => 'not found',
8170
+        'style_plugin' => 'default_summary',
8171
+        'style_options' => array(),
8172
+        'wildcard' => 'all',
8173
+        'wildcard_substitution' => 'All',
8174
+        'title' => 'Tasks for computer %1',
8175
+        'breadcrumb' => '',
8176
+        'default_argument_type' => 'fixed',
8177
+        'default_argument' => '',
8178
+        'validate_type' => 'numeric',
8179
+        'validate_fail' => 'not found',
8180
+        'id' => 'hostid',
8181
+        'table' => 'result',
8182
+        'field' => 'hostid',
8183
+        'validate_user_argument_type' => 'uid',
8184
+        'validate_user_roles' => array(
8185 8185
         2 => 0,
8186 8186
         3 => 0,
8187
-      ),
8188
-      'relationship' => 'none',
8189
-      'default_options_div_prefix' => '',
8190
-      'default_argument_fixed' => '',
8191
-      'default_argument_user' => 0,
8192
-      'default_argument_php' => '',
8193
-      'validate_argument_node_type' => array(
8187
+        ),
8188
+        'relationship' => 'none',
8189
+        'default_options_div_prefix' => '',
8190
+        'default_argument_fixed' => '',
8191
+        'default_argument_user' => 0,
8192
+        'default_argument_php' => '',
8193
+        'validate_argument_node_type' => array(
8194 8194
         'forum' => 0,
8195 8195
         'job_post' => 0,
8196 8196
         'news' => 0,
@@ -8198,687 +8198,687 @@  discard block
 block discarded – undo
8198 8198
         'profile' => 0,
8199 8199
         'story' => 0,
8200 8200
         'team' => 0,
8201
-      ),
8202
-      'validate_argument_node_access' => 0,
8203
-      'validate_argument_nid_type' => 'nid',
8204
-      'validate_argument_vocabulary' => array(
8201
+        ),
8202
+        'validate_argument_node_access' => 0,
8203
+        'validate_argument_nid_type' => 'nid',
8204
+        'validate_argument_vocabulary' => array(
8205 8205
         1 => 0,
8206
-      ),
8207
-      'validate_argument_type' => 'tid',
8208
-      'validate_argument_transform' => 0,
8209
-      'validate_user_restrict_roles' => 0,
8210
-      'validate_argument_php' => '',
8211
-    ),
8212
-  ));
8213
-  $handler->override_option('access', array(
8206
+        ),
8207
+        'validate_argument_type' => 'tid',
8208
+        'validate_argument_transform' => 0,
8209
+        'validate_user_restrict_roles' => 0,
8210
+        'validate_argument_php' => '',
8211
+    ),
8212
+    ));
8213
+    $handler->override_option('access', array(
8214 8214
     'type' => 'none',
8215
-  ));
8216
-  $handler->override_option('cache', array(
8215
+    ));
8216
+    $handler->override_option('cache', array(
8217 8217
     'type' => 'none',
8218
-  ));
8219
-  $handler->override_option('items_per_page', 20);
8220
-  $handler->override_option('use_pager', '1');
8221
-  $handler->override_option('style_plugin', 'table');
8222
-  $handler->override_option('style_options', array(
8218
+    ));
8219
+    $handler->override_option('items_per_page', 20);
8220
+    $handler->override_option('use_pager', '1');
8221
+    $handler->override_option('style_plugin', 'table');
8222
+    $handler->override_option('style_options', array(
8223 8223
     'grouping' => '',
8224 8224
     'override' => 1,
8225 8225
     'sticky' => 1,
8226 8226
     'order' => 'desc',
8227 8227
     'summary' => '',
8228 8228
     'columns' => array(
8229
-      'id' => 'id',
8230
-      'workunitid' => 'workunitid',
8231
-      'sent_time' => 'sent_time',
8232
-      'received_time' => 'received_time',
8233
-      'report_deadline' => 'report_deadline',
8234
-      'phpcode_3' => 'phpcode_3',
8235
-      'phpcode' => 'phpcode',
8236
-      'server_state' => 'server_state',
8237
-      'outcome' => 'outcome',
8238
-      'client_state' => 'client_state',
8239
-      'validate_state' => 'validate_state',
8240
-      'exit_status' => 'exit_status',
8241
-      'phpcode_1' => 'phpcode_1',
8242
-      'elapsed_time' => 'elapsed_time',
8243
-      'cpu_time' => 'cpu_time',
8244
-      'claimed_credit_1' => 'claimed_credit_1',
8245
-      'granted_credit' => 'granted_credit',
8246
-      'app_version_id' => 'app_version_id',
8247
-      'phpcode_2' => 'phpcode_2',
8229
+        'id' => 'id',
8230
+        'workunitid' => 'workunitid',
8231
+        'sent_time' => 'sent_time',
8232
+        'received_time' => 'received_time',
8233
+        'report_deadline' => 'report_deadline',
8234
+        'phpcode_3' => 'phpcode_3',
8235
+        'phpcode' => 'phpcode',
8236
+        'server_state' => 'server_state',
8237
+        'outcome' => 'outcome',
8238
+        'client_state' => 'client_state',
8239
+        'validate_state' => 'validate_state',
8240
+        'exit_status' => 'exit_status',
8241
+        'phpcode_1' => 'phpcode_1',
8242
+        'elapsed_time' => 'elapsed_time',
8243
+        'cpu_time' => 'cpu_time',
8244
+        'claimed_credit_1' => 'claimed_credit_1',
8245
+        'granted_credit' => 'granted_credit',
8246
+        'app_version_id' => 'app_version_id',
8247
+        'phpcode_2' => 'phpcode_2',
8248 8248
     ),
8249 8249
     'info' => array(
8250
-      'id' => array(
8250
+        'id' => array(
8251 8251
         'sortable' => 1,
8252 8252
         'separator' => '',
8253
-      ),
8254
-      'workunitid' => array(
8253
+        ),
8254
+        'workunitid' => array(
8255 8255
         'sortable' => 1,
8256 8256
         'separator' => '',
8257
-      ),
8258
-      'sent_time' => array(
8257
+        ),
8258
+        'sent_time' => array(
8259 8259
         'sortable' => 1,
8260 8260
         'separator' => '',
8261
-      ),
8262
-      'received_time' => array(
8261
+        ),
8262
+        'received_time' => array(
8263 8263
         'sortable' => 1,
8264 8264
         'separator' => '',
8265
-      ),
8266
-      'report_deadline' => array(
8265
+        ),
8266
+        'report_deadline' => array(
8267 8267
         'sortable' => 1,
8268 8268
         'separator' => '',
8269
-      ),
8270
-      'phpcode_3' => array(
8269
+        ),
8270
+        'phpcode_3' => array(
8271 8271
         'separator' => '',
8272
-      ),
8273
-      'phpcode' => array(
8272
+        ),
8273
+        'phpcode' => array(
8274 8274
         'separator' => '',
8275
-      ),
8276
-      'server_state' => array(
8275
+        ),
8276
+        'server_state' => array(
8277 8277
         'sortable' => 0,
8278 8278
         'separator' => '',
8279
-      ),
8280
-      'outcome' => array(
8279
+        ),
8280
+        'outcome' => array(
8281 8281
         'sortable' => 0,
8282 8282
         'separator' => '',
8283
-      ),
8284
-      'client_state' => array(
8283
+        ),
8284
+        'client_state' => array(
8285 8285
         'sortable' => 0,
8286 8286
         'separator' => '',
8287
-      ),
8288
-      'validate_state' => array(
8287
+        ),
8288
+        'validate_state' => array(
8289 8289
         'sortable' => 0,
8290 8290
         'separator' => '',
8291
-      ),
8292
-      'exit_status' => array(
8291
+        ),
8292
+        'exit_status' => array(
8293 8293
         'sortable' => 0,
8294 8294
         'separator' => '',
8295
-      ),
8296
-      'phpcode_1' => array(
8295
+        ),
8296
+        'phpcode_1' => array(
8297 8297
         'separator' => '',
8298
-      ),
8299
-      'elapsed_time' => array(
8298
+        ),
8299
+        'elapsed_time' => array(
8300 8300
         'sortable' => 1,
8301 8301
         'separator' => '',
8302
-      ),
8303
-      'cpu_time' => array(
8302
+        ),
8303
+        'cpu_time' => array(
8304 8304
         'sortable' => 1,
8305 8305
         'separator' => '',
8306
-      ),
8307
-      'claimed_credit_1' => array(
8306
+        ),
8307
+        'claimed_credit_1' => array(
8308 8308
         'sortable' => 1,
8309 8309
         'separator' => '',
8310
-      ),
8311
-      'granted_credit' => array(
8310
+        ),
8311
+        'granted_credit' => array(
8312 8312
         'sortable' => 1,
8313 8313
         'separator' => '',
8314
-      ),
8315
-      'app_version_id' => array(
8314
+        ),
8315
+        'app_version_id' => array(
8316 8316
         'sortable' => 1,
8317 8317
         'separator' => '',
8318
-      ),
8319
-      'phpcode_2' => array(
8318
+        ),
8319
+        'phpcode_2' => array(
8320 8320
         'separator' => '',
8321
-      ),
8321
+        ),
8322 8322
     ),
8323 8323
     'default' => 'id',
8324
-  ));
8325
-  $handler = $view->new_display('page', 'All tasks', 'page_1');
8326
-  $handler->override_option('path', 'host/%/tasks/all');
8327
-  $handler->override_option('menu', array(
8324
+    ));
8325
+    $handler = $view->new_display('page', 'All tasks', 'page_1');
8326
+    $handler->override_option('path', 'host/%/tasks/all');
8327
+    $handler->override_option('menu', array(
8328 8328
     'type' => 'default tab',
8329 8329
     'title' => 'All tasks',
8330 8330
     'description' => 'Show all tasks associated with the host',
8331 8331
     'weight' => '0',
8332 8332
     'name' => 'navigation',
8333
-  ));
8334
-  $handler->override_option('tab_options', array(
8333
+    ));
8334
+    $handler->override_option('tab_options', array(
8335 8335
     'type' => 'tab',
8336 8336
     'title' => 'Tasks',
8337 8337
     'description' => 'Show all tasks',
8338 8338
     'weight' => '0',
8339 8339
     'name' => 'secondary-links',
8340
-  ));
8341
-  $handler = $view->new_display('page', 'Error', 'page_2');
8342
-  $handler->override_option('filters', array(
8340
+    ));
8341
+    $handler = $view->new_display('page', 'Error', 'page_2');
8342
+    $handler->override_option('filters', array(
8343 8343
     'server_state' => array(
8344
-      'operator' => '=',
8345
-      'value' => array(
8344
+        'operator' => '=',
8345
+        'value' => array(
8346 8346
         'value' => '5',
8347 8347
         'min' => '',
8348 8348
         'max' => '',
8349
-      ),
8350
-      'group' => '0',
8351
-      'exposed' => FALSE,
8352
-      'expose' => array(
8349
+        ),
8350
+        'group' => '0',
8351
+        'exposed' => FALSE,
8352
+        'expose' => array(
8353 8353
         'operator' => FALSE,
8354 8354
         'label' => '',
8355
-      ),
8356
-      'id' => 'server_state',
8357
-      'table' => 'result',
8358
-      'field' => 'server_state',
8359
-      'override' => array(
8355
+        ),
8356
+        'id' => 'server_state',
8357
+        'table' => 'result',
8358
+        'field' => 'server_state',
8359
+        'override' => array(
8360 8360
         'button' => 'Use default',
8361
-      ),
8362
-      'relationship' => 'none',
8361
+        ),
8362
+        'relationship' => 'none',
8363 8363
     ),
8364 8364
     'outcome' => array(
8365
-      'operator' => '>=',
8366
-      'value' => array(
8365
+        'operator' => '>=',
8366
+        'value' => array(
8367 8367
         'value' => '3',
8368 8368
         'min' => '',
8369 8369
         'max' => '',
8370
-      ),
8371
-      'group' => '0',
8372
-      'exposed' => FALSE,
8373
-      'expose' => array(
8370
+        ),
8371
+        'group' => '0',
8372
+        'exposed' => FALSE,
8373
+        'expose' => array(
8374 8374
         'operator' => FALSE,
8375 8375
         'label' => '',
8376
-      ),
8377
-      'id' => 'outcome',
8378
-      'table' => 'result',
8379
-      'field' => 'outcome',
8380
-      'override' => array(
8376
+        ),
8377
+        'id' => 'outcome',
8378
+        'table' => 'result',
8379
+        'field' => 'outcome',
8380
+        'override' => array(
8381 8381
         'button' => 'Use default',
8382
-      ),
8383
-      'relationship' => 'none',
8382
+        ),
8383
+        'relationship' => 'none',
8384 8384
     ),
8385 8385
     'outcome_1' => array(
8386
-      'operator' => 'not between',
8387
-      'value' => array(
8386
+        'operator' => 'not between',
8387
+        'value' => array(
8388 8388
         'value' => '',
8389 8389
         'min' => '4',
8390 8390
         'max' => '7',
8391
-      ),
8392
-      'group' => '0',
8393
-      'exposed' => FALSE,
8394
-      'expose' => array(
8391
+        ),
8392
+        'group' => '0',
8393
+        'exposed' => FALSE,
8394
+        'expose' => array(
8395 8395
         'operator' => FALSE,
8396 8396
         'label' => '',
8397
-      ),
8398
-      'id' => 'outcome_1',
8399
-      'table' => 'result',
8400
-      'field' => 'outcome',
8401
-      'override' => array(
8397
+        ),
8398
+        'id' => 'outcome_1',
8399
+        'table' => 'result',
8400
+        'field' => 'outcome',
8401
+        'override' => array(
8402 8402
         'button' => 'Use default',
8403
-      ),
8404
-      'relationship' => 'none',
8403
+        ),
8404
+        'relationship' => 'none',
8405 8405
     ),
8406 8406
     'outcome_2' => array(
8407
-      'operator' => '<=',
8408
-      'value' => array(
8407
+        'operator' => '<=',
8408
+        'value' => array(
8409 8409
         'value' => '7',
8410 8410
         'min' => '',
8411 8411
         'max' => '',
8412
-      ),
8413
-      'group' => '0',
8414
-      'exposed' => FALSE,
8415
-      'expose' => array(
8412
+        ),
8413
+        'group' => '0',
8414
+        'exposed' => FALSE,
8415
+        'expose' => array(
8416 8416
         'operator' => FALSE,
8417 8417
         'label' => '',
8418
-      ),
8419
-      'id' => 'outcome_2',
8420
-      'table' => 'result',
8421
-      'field' => 'outcome',
8422
-      'override' => array(
8418
+        ),
8419
+        'id' => 'outcome_2',
8420
+        'table' => 'result',
8421
+        'field' => 'outcome',
8422
+        'override' => array(
8423 8423
         'button' => 'Use default',
8424
-      ),
8425
-      'relationship' => 'none',
8424
+        ),
8425
+        'relationship' => 'none',
8426 8426
     ),
8427
-  ));
8428
-  $handler->override_option('path', 'host/%/tasks/error');
8429
-  $handler->override_option('menu', array(
8427
+    ));
8428
+    $handler->override_option('path', 'host/%/tasks/error');
8429
+    $handler->override_option('menu', array(
8430 8430
     'type' => 'tab',
8431 8431
     'title' => 'Error',
8432 8432
     'description' => 'Show tasks with errors associated with the host',
8433 8433
     'weight' => '5',
8434 8434
     'name' => 'navigation',
8435
-  ));
8436
-  $handler->override_option('tab_options', array(
8435
+    ));
8436
+    $handler->override_option('tab_options', array(
8437 8437
     'type' => 'none',
8438 8438
     'title' => '',
8439 8439
     'description' => '',
8440 8440
     'weight' => 0,
8441 8441
     'name' => 'navigation',
8442
-  ));
8443
-  $handler = $view->new_display('page', 'In progress', 'page_3');
8444
-  $handler->override_option('filters', array(
8442
+    ));
8443
+    $handler = $view->new_display('page', 'In progress', 'page_3');
8444
+    $handler->override_option('filters', array(
8445 8445
     'server_state' => array(
8446
-      'operator' => '=',
8447
-      'value' => array(
8446
+        'operator' => '=',
8447
+        'value' => array(
8448 8448
         'value' => '4',
8449 8449
         'min' => '',
8450 8450
         'max' => '',
8451
-      ),
8452
-      'group' => '0',
8453
-      'exposed' => FALSE,
8454
-      'expose' => array(
8451
+        ),
8452
+        'group' => '0',
8453
+        'exposed' => FALSE,
8454
+        'expose' => array(
8455 8455
         'operator' => FALSE,
8456 8456
         'label' => '',
8457
-      ),
8458
-      'id' => 'server_state',
8459
-      'table' => 'result',
8460
-      'field' => 'server_state',
8461
-      'override' => array(
8457
+        ),
8458
+        'id' => 'server_state',
8459
+        'table' => 'result',
8460
+        'field' => 'server_state',
8461
+        'override' => array(
8462 8462
         'button' => 'Use default',
8463
-      ),
8464
-      'relationship' => 'none',
8463
+        ),
8464
+        'relationship' => 'none',
8465 8465
     ),
8466
-  ));
8467
-  $handler->override_option('path', 'host/%/tasks/active');
8468
-  $handler->override_option('menu', array(
8466
+    ));
8467
+    $handler->override_option('path', 'host/%/tasks/active');
8468
+    $handler->override_option('menu', array(
8469 8469
     'type' => 'tab',
8470 8470
     'title' => 'In progress',
8471 8471
     'description' => 'Show tasks in progress associated with the host',
8472 8472
     'weight' => '1',
8473 8473
     'name' => 'navigation',
8474
-  ));
8475
-  $handler->override_option('tab_options', array(
8474
+    ));
8475
+    $handler->override_option('tab_options', array(
8476 8476
     'type' => 'none',
8477 8477
     'title' => '',
8478 8478
     'description' => '',
8479 8479
     'weight' => 0,
8480 8480
     'name' => 'navigation',
8481
-  ));
8482
-  $handler = $view->new_display('page', 'Invalidated', 'page_4');
8483
-  $handler->override_option('filters', array(
8481
+    ));
8482
+    $handler = $view->new_display('page', 'Invalidated', 'page_4');
8483
+    $handler->override_option('filters', array(
8484 8484
     'server_state' => array(
8485
-      'operator' => '=',
8486
-      'value' => array(
8485
+        'operator' => '=',
8486
+        'value' => array(
8487 8487
         'value' => '5',
8488 8488
         'min' => '',
8489 8489
         'max' => '',
8490
-      ),
8491
-      'group' => '0',
8492
-      'exposed' => FALSE,
8493
-      'expose' => array(
8490
+        ),
8491
+        'group' => '0',
8492
+        'exposed' => FALSE,
8493
+        'expose' => array(
8494 8494
         'operator' => FALSE,
8495 8495
         'label' => '',
8496
-      ),
8497
-      'id' => 'server_state',
8498
-      'table' => 'result',
8499
-      'field' => 'server_state',
8500
-      'override' => array(
8496
+        ),
8497
+        'id' => 'server_state',
8498
+        'table' => 'result',
8499
+        'field' => 'server_state',
8500
+        'override' => array(
8501 8501
         'button' => 'Use default',
8502
-      ),
8503
-      'relationship' => 'none',
8502
+        ),
8503
+        'relationship' => 'none',
8504 8504
     ),
8505 8505
     'views_or_begin_2' => array(
8506
-      'id' => 'views_or_begin_2',
8507
-      'table' => 'views_or',
8508
-      'field' => 'views_or_begin',
8506
+        'id' => 'views_or_begin_2',
8507
+        'table' => 'views_or',
8508
+        'field' => 'views_or_begin',
8509 8509
     ),
8510 8510
     'outcome' => array(
8511
-      'operator' => '=',
8512
-      'value' => array(
8511
+        'operator' => '=',
8512
+        'value' => array(
8513 8513
         'value' => '6',
8514 8514
         'min' => '',
8515 8515
         'max' => '',
8516
-      ),
8517
-      'group' => '0',
8518
-      'exposed' => FALSE,
8519
-      'expose' => array(
8516
+        ),
8517
+        'group' => '0',
8518
+        'exposed' => FALSE,
8519
+        'expose' => array(
8520 8520
         'operator' => FALSE,
8521 8521
         'label' => '',
8522
-      ),
8523
-      'id' => 'outcome',
8524
-      'table' => 'result',
8525
-      'field' => 'outcome',
8526
-      'override' => array(
8522
+        ),
8523
+        'id' => 'outcome',
8524
+        'table' => 'result',
8525
+        'field' => 'outcome',
8526
+        'override' => array(
8527 8527
         'button' => 'Use default',
8528
-      ),
8529
-      'relationship' => 'none',
8528
+        ),
8529
+        'relationship' => 'none',
8530 8530
     ),
8531 8531
     'views_or_next_3' => array(
8532
-      'id' => 'views_or_next_3',
8533
-      'table' => 'views_or',
8534
-      'field' => 'views_or_next',
8532
+        'id' => 'views_or_next_3',
8533
+        'table' => 'views_or',
8534
+        'field' => 'views_or_next',
8535 8535
     ),
8536 8536
     'outcome_1' => array(
8537
-      'operator' => '=',
8538
-      'value' => array(
8537
+        'operator' => '=',
8538
+        'value' => array(
8539 8539
         'value' => '1',
8540 8540
         'min' => '',
8541 8541
         'max' => '',
8542
-      ),
8543
-      'group' => '0',
8544
-      'exposed' => FALSE,
8545
-      'expose' => array(
8542
+        ),
8543
+        'group' => '0',
8544
+        'exposed' => FALSE,
8545
+        'expose' => array(
8546 8546
         'operator' => FALSE,
8547 8547
         'label' => '',
8548
-      ),
8549
-      'id' => 'outcome_1',
8550
-      'table' => 'result',
8551
-      'field' => 'outcome',
8552
-      'override' => array(
8548
+        ),
8549
+        'id' => 'outcome_1',
8550
+        'table' => 'result',
8551
+        'field' => 'outcome',
8552
+        'override' => array(
8553 8553
         'button' => 'Use default',
8554
-      ),
8555
-      'relationship' => 'none',
8554
+        ),
8555
+        'relationship' => 'none',
8556 8556
     ),
8557 8557
     'views_or_begin' => array(
8558
-      'id' => 'views_or_begin',
8559
-      'table' => 'views_or',
8560
-      'field' => 'views_or_begin',
8558
+        'id' => 'views_or_begin',
8559
+        'table' => 'views_or',
8560
+        'field' => 'views_or_begin',
8561 8561
     ),
8562 8562
     'validate_state' => array(
8563
-      'operator' => '=',
8564
-      'value' => array(
8563
+        'operator' => '=',
8564
+        'value' => array(
8565 8565
         'value' => '2',
8566 8566
         'min' => '',
8567 8567
         'max' => '',
8568
-      ),
8569
-      'group' => '0',
8570
-      'exposed' => FALSE,
8571
-      'expose' => array(
8568
+        ),
8569
+        'group' => '0',
8570
+        'exposed' => FALSE,
8571
+        'expose' => array(
8572 8572
         'operator' => FALSE,
8573 8573
         'label' => '',
8574
-      ),
8575
-      'id' => 'validate_state',
8576
-      'table' => 'result',
8577
-      'field' => 'validate_state',
8578
-      'override' => array(
8574
+        ),
8575
+        'id' => 'validate_state',
8576
+        'table' => 'result',
8577
+        'field' => 'validate_state',
8578
+        'override' => array(
8579 8579
         'button' => 'Use default',
8580
-      ),
8581
-      'relationship' => 'none',
8580
+        ),
8581
+        'relationship' => 'none',
8582 8582
     ),
8583 8583
     'views_or_next_4' => array(
8584
-      'id' => 'views_or_next_4',
8585
-      'table' => 'views_or',
8586
-      'field' => 'views_or_next',
8584
+        'id' => 'views_or_next_4',
8585
+        'table' => 'views_or',
8586
+        'field' => 'views_or_next',
8587 8587
     ),
8588 8588
     'validate_state_1' => array(
8589
-      'operator' => '=',
8590
-      'value' => array(
8589
+        'operator' => '=',
8590
+        'value' => array(
8591 8591
         'value' => '3',
8592 8592
         'min' => '',
8593 8593
         'max' => '',
8594
-      ),
8595
-      'group' => '0',
8596
-      'exposed' => FALSE,
8597
-      'expose' => array(
8594
+        ),
8595
+        'group' => '0',
8596
+        'exposed' => FALSE,
8597
+        'expose' => array(
8598 8598
         'operator' => FALSE,
8599 8599
         'label' => '',
8600
-      ),
8601
-      'id' => 'validate_state_1',
8602
-      'table' => 'result',
8603
-      'field' => 'validate_state',
8604
-      'override' => array(
8600
+        ),
8601
+        'id' => 'validate_state_1',
8602
+        'table' => 'result',
8603
+        'field' => 'validate_state',
8604
+        'override' => array(
8605 8605
         'button' => 'Use default',
8606
-      ),
8607
-      'relationship' => 'none',
8606
+        ),
8607
+        'relationship' => 'none',
8608 8608
     ),
8609 8609
     'views_or_next' => array(
8610
-      'id' => 'views_or_next',
8611
-      'table' => 'views_or',
8612
-      'field' => 'views_or_next',
8610
+        'id' => 'views_or_next',
8611
+        'table' => 'views_or',
8612
+        'field' => 'views_or_next',
8613 8613
     ),
8614 8614
     'validate_state_2' => array(
8615
-      'operator' => '=',
8616
-      'value' => array(
8615
+        'operator' => '=',
8616
+        'value' => array(
8617 8617
         'value' => '5',
8618 8618
         'min' => '',
8619 8619
         'max' => '',
8620
-      ),
8621
-      'group' => '0',
8622
-      'exposed' => FALSE,
8623
-      'expose' => array(
8620
+        ),
8621
+        'group' => '0',
8622
+        'exposed' => FALSE,
8623
+        'expose' => array(
8624 8624
         'operator' => FALSE,
8625 8625
         'label' => '',
8626
-      ),
8627
-      'id' => 'validate_state_2',
8628
-      'table' => 'result',
8629
-      'field' => 'validate_state',
8630
-      'override' => array(
8626
+        ),
8627
+        'id' => 'validate_state_2',
8628
+        'table' => 'result',
8629
+        'field' => 'validate_state',
8630
+        'override' => array(
8631 8631
         'button' => 'Use default',
8632
-      ),
8633
-      'relationship' => 'none',
8632
+        ),
8633
+        'relationship' => 'none',
8634 8634
     ),
8635 8635
     'views_or_end_3' => array(
8636
-      'id' => 'views_or_end_3',
8637
-      'table' => 'views_or',
8638
-      'field' => 'views_or_end',
8636
+        'id' => 'views_or_end_3',
8637
+        'table' => 'views_or',
8638
+        'field' => 'views_or_end',
8639 8639
     ),
8640 8640
     'views_or_end_2' => array(
8641
-      'id' => 'views_or_end_2',
8642
-      'table' => 'views_or',
8643
-      'field' => 'views_or_end',
8641
+        'id' => 'views_or_end_2',
8642
+        'table' => 'views_or',
8643
+        'field' => 'views_or_end',
8644 8644
     ),
8645
-  ));
8646
-  $handler->override_option('path', 'host/%/tasks/invalid');
8647
-  $handler->override_option('menu', array(
8645
+    ));
8646
+    $handler->override_option('path', 'host/%/tasks/invalid');
8647
+    $handler->override_option('menu', array(
8648 8648
     'type' => 'tab',
8649 8649
     'title' => 'Invalid',
8650 8650
     'description' => 'Show invalidated tasks associated with the host',
8651 8651
     'weight' => '4',
8652 8652
     'name' => 'navigation',
8653
-  ));
8654
-  $handler->override_option('tab_options', array(
8653
+    ));
8654
+    $handler->override_option('tab_options', array(
8655 8655
     'type' => 'none',
8656 8656
     'title' => '',
8657 8657
     'description' => '',
8658 8658
     'weight' => 0,
8659 8659
     'name' => 'navigation',
8660
-  ));
8661
-  $handler = $view->new_display('page', 'Pending', 'page_5');
8662
-  $handler->override_option('filters', array(
8660
+    ));
8661
+    $handler = $view->new_display('page', 'Pending', 'page_5');
8662
+    $handler->override_option('filters', array(
8663 8663
     'server_state' => array(
8664
-      'operator' => '=',
8665
-      'value' => array(
8664
+        'operator' => '=',
8665
+        'value' => array(
8666 8666
         'value' => '5',
8667 8667
         'min' => '',
8668 8668
         'max' => '',
8669
-      ),
8670
-      'group' => '0',
8671
-      'exposed' => FALSE,
8672
-      'expose' => array(
8669
+        ),
8670
+        'group' => '0',
8671
+        'exposed' => FALSE,
8672
+        'expose' => array(
8673 8673
         'operator' => FALSE,
8674 8674
         'label' => '',
8675
-      ),
8676
-      'id' => 'server_state',
8677
-      'table' => 'result',
8678
-      'field' => 'server_state',
8679
-      'override' => array(
8675
+        ),
8676
+        'id' => 'server_state',
8677
+        'table' => 'result',
8678
+        'field' => 'server_state',
8679
+        'override' => array(
8680 8680
         'button' => 'Use default',
8681
-      ),
8682
-      'relationship' => 'none',
8681
+        ),
8682
+        'relationship' => 'none',
8683 8683
     ),
8684 8684
     'outcome' => array(
8685
-      'operator' => '=',
8686
-      'value' => array(
8685
+        'operator' => '=',
8686
+        'value' => array(
8687 8687
         'value' => '1',
8688 8688
         'min' => '',
8689 8689
         'max' => '',
8690
-      ),
8691
-      'group' => '0',
8692
-      'exposed' => FALSE,
8693
-      'expose' => array(
8690
+        ),
8691
+        'group' => '0',
8692
+        'exposed' => FALSE,
8693
+        'expose' => array(
8694 8694
         'operator' => FALSE,
8695 8695
         'label' => '',
8696
-      ),
8697
-      'id' => 'outcome',
8698
-      'table' => 'result',
8699
-      'field' => 'outcome',
8700
-      'override' => array(
8696
+        ),
8697
+        'id' => 'outcome',
8698
+        'table' => 'result',
8699
+        'field' => 'outcome',
8700
+        'override' => array(
8701 8701
         'button' => 'Use default',
8702
-      ),
8703
-      'relationship' => 'none',
8702
+        ),
8703
+        'relationship' => 'none',
8704 8704
     ),
8705 8705
     'validate_state' => array(
8706
-      'operator' => '>=',
8707
-      'value' => array(
8706
+        'operator' => '>=',
8707
+        'value' => array(
8708 8708
         'value' => '0',
8709 8709
         'min' => '',
8710 8710
         'max' => '',
8711
-      ),
8712
-      'group' => '0',
8713
-      'exposed' => FALSE,
8714
-      'expose' => array(
8711
+        ),
8712
+        'group' => '0',
8713
+        'exposed' => FALSE,
8714
+        'expose' => array(
8715 8715
         'operator' => FALSE,
8716 8716
         'label' => '',
8717
-      ),
8718
-      'id' => 'validate_state',
8719
-      'table' => 'result',
8720
-      'field' => 'validate_state',
8721
-      'override' => array(
8717
+        ),
8718
+        'id' => 'validate_state',
8719
+        'table' => 'result',
8720
+        'field' => 'validate_state',
8721
+        'override' => array(
8722 8722
         'button' => 'Use default',
8723
-      ),
8724
-      'relationship' => 'none',
8723
+        ),
8724
+        'relationship' => 'none',
8725 8725
     ),
8726 8726
     'validate_state_1' => array(
8727
-      'operator' => 'not between',
8728
-      'value' => array(
8727
+        'operator' => 'not between',
8728
+        'value' => array(
8729 8729
         'value' => '',
8730 8730
         'min' => '0',
8731 8731
         'max' => '4',
8732
-      ),
8733
-      'group' => '0',
8734
-      'exposed' => FALSE,
8735
-      'expose' => array(
8732
+        ),
8733
+        'group' => '0',
8734
+        'exposed' => FALSE,
8735
+        'expose' => array(
8736 8736
         'operator' => FALSE,
8737 8737
         'label' => '',
8738
-      ),
8739
-      'id' => 'validate_state_1',
8740
-      'table' => 'result',
8741
-      'field' => 'validate_state',
8742
-      'override' => array(
8738
+        ),
8739
+        'id' => 'validate_state_1',
8740
+        'table' => 'result',
8741
+        'field' => 'validate_state',
8742
+        'override' => array(
8743 8743
         'button' => 'Use default',
8744
-      ),
8745
-      'relationship' => 'none',
8744
+        ),
8745
+        'relationship' => 'none',
8746 8746
     ),
8747 8747
     'validate_state_2' => array(
8748
-      'operator' => '<=',
8749
-      'value' => array(
8748
+        'operator' => '<=',
8749
+        'value' => array(
8750 8750
         'value' => '4',
8751 8751
         'min' => '',
8752 8752
         'max' => '',
8753
-      ),
8754
-      'group' => '0',
8755
-      'exposed' => FALSE,
8756
-      'expose' => array(
8753
+        ),
8754
+        'group' => '0',
8755
+        'exposed' => FALSE,
8756
+        'expose' => array(
8757 8757
         'operator' => FALSE,
8758 8758
         'label' => '',
8759
-      ),
8760
-      'id' => 'validate_state_2',
8761
-      'table' => 'result',
8762
-      'field' => 'validate_state',
8763
-      'override' => array(
8759
+        ),
8760
+        'id' => 'validate_state_2',
8761
+        'table' => 'result',
8762
+        'field' => 'validate_state',
8763
+        'override' => array(
8764 8764
         'button' => 'Use default',
8765
-      ),
8766
-      'relationship' => 'none',
8765
+        ),
8766
+        'relationship' => 'none',
8767 8767
     ),
8768
-  ));
8769
-  $handler->override_option('path', 'host/%/tasks/pending');
8770
-  $handler->override_option('menu', array(
8768
+    ));
8769
+    $handler->override_option('path', 'host/%/tasks/pending');
8770
+    $handler->override_option('menu', array(
8771 8771
     'type' => 'tab',
8772 8772
     'title' => 'Pending',
8773 8773
     'description' => 'Show tasks associated with the host with results pending',
8774 8774
     'weight' => '2',
8775 8775
     'name' => 'navigation',
8776
-  ));
8777
-  $handler->override_option('tab_options', array(
8776
+    ));
8777
+    $handler->override_option('tab_options', array(
8778 8778
     'type' => 'none',
8779 8779
     'title' => '',
8780 8780
     'description' => '',
8781 8781
     'weight' => 0,
8782 8782
     'name' => 'navigation',
8783
-  ));
8784
-  $handler = $view->new_display('page', 'Validated', 'page_6');
8785
-  $handler->override_option('filters', array(
8783
+    ));
8784
+    $handler = $view->new_display('page', 'Validated', 'page_6');
8785
+    $handler->override_option('filters', array(
8786 8786
     'server_state' => array(
8787
-      'operator' => '=',
8788
-      'value' => array(
8787
+        'operator' => '=',
8788
+        'value' => array(
8789 8789
         'value' => '5',
8790 8790
         'min' => '',
8791 8791
         'max' => '',
8792
-      ),
8793
-      'group' => '0',
8794
-      'exposed' => FALSE,
8795
-      'expose' => array(
8792
+        ),
8793
+        'group' => '0',
8794
+        'exposed' => FALSE,
8795
+        'expose' => array(
8796 8796
         'operator' => FALSE,
8797 8797
         'label' => '',
8798
-      ),
8799
-      'id' => 'server_state',
8800
-      'table' => 'result',
8801
-      'field' => 'server_state',
8802
-      'override' => array(
8798
+        ),
8799
+        'id' => 'server_state',
8800
+        'table' => 'result',
8801
+        'field' => 'server_state',
8802
+        'override' => array(
8803 8803
         'button' => 'Use default',
8804
-      ),
8805
-      'relationship' => 'none',
8804
+        ),
8805
+        'relationship' => 'none',
8806 8806
     ),
8807 8807
     'outcome' => array(
8808
-      'operator' => '=',
8809
-      'value' => array(
8808
+        'operator' => '=',
8809
+        'value' => array(
8810 8810
         'value' => '1',
8811 8811
         'min' => '',
8812 8812
         'max' => '',
8813
-      ),
8814
-      'group' => '0',
8815
-      'exposed' => FALSE,
8816
-      'expose' => array(
8813
+        ),
8814
+        'group' => '0',
8815
+        'exposed' => FALSE,
8816
+        'expose' => array(
8817 8817
         'operator' => FALSE,
8818 8818
         'label' => '',
8819
-      ),
8820
-      'id' => 'outcome',
8821
-      'table' => 'result',
8822
-      'field' => 'outcome',
8823
-      'override' => array(
8819
+        ),
8820
+        'id' => 'outcome',
8821
+        'table' => 'result',
8822
+        'field' => 'outcome',
8823
+        'override' => array(
8824 8824
         'button' => 'Use default',
8825
-      ),
8826
-      'relationship' => 'none',
8825
+        ),
8826
+        'relationship' => 'none',
8827 8827
     ),
8828 8828
     'validate_state' => array(
8829
-      'operator' => '=',
8830
-      'value' => array(
8829
+        'operator' => '=',
8830
+        'value' => array(
8831 8831
         'value' => '1',
8832 8832
         'min' => '',
8833 8833
         'max' => '',
8834
-      ),
8835
-      'group' => '0',
8836
-      'exposed' => FALSE,
8837
-      'expose' => array(
8834
+        ),
8835
+        'group' => '0',
8836
+        'exposed' => FALSE,
8837
+        'expose' => array(
8838 8838
         'operator' => FALSE,
8839 8839
         'label' => '',
8840
-      ),
8841
-      'id' => 'validate_state',
8842
-      'table' => 'result',
8843
-      'field' => 'validate_state',
8844
-      'override' => array(
8840
+        ),
8841
+        'id' => 'validate_state',
8842
+        'table' => 'result',
8843
+        'field' => 'validate_state',
8844
+        'override' => array(
8845 8845
         'button' => 'Use default',
8846
-      ),
8847
-      'relationship' => 'none',
8846
+        ),
8847
+        'relationship' => 'none',
8848 8848
     ),
8849
-  ));
8850
-  $handler->override_option('path', 'host/%/tasks/valid');
8851
-  $handler->override_option('menu', array(
8849
+    ));
8850
+    $handler->override_option('path', 'host/%/tasks/valid');
8851
+    $handler->override_option('menu', array(
8852 8852
     'type' => 'tab',
8853 8853
     'title' => 'Valid',
8854 8854
     'description' => 'Show validated tasks associated with the host',
8855 8855
     'weight' => '3',
8856 8856
     'name' => 'navigation',
8857
-  ));
8858
-  $handler->override_option('tab_options', array(
8857
+    ));
8858
+    $handler->override_option('tab_options', array(
8859 8859
     'type' => 'none',
8860 8860
     'title' => '',
8861 8861
     'description' => '',
8862 8862
     'weight' => 0,
8863 8863
     'name' => 'navigation',
8864
-  ));
8864
+    ));
8865 8865
 
8866
-  $views[$view->name] = $view;
8866
+    $views[$view->name] = $view;
8867 8867
 
8868
-  // Exported view: boinc_task
8869
-  $view = new view;
8870
-  $view->name = 'boinc_task';
8871
-  $view->description = 'Details for a specific task';
8872
-  $view->tag = '';
8873
-  $view->base_table = 'result';
8874
-  $view->core = 0;
8875
-  $view->api_version = '2';
8876
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
8877
-  $handler = $view->new_display('default', 'Defaults', 'default');
8878
-  $handler->override_option('fields', array(
8868
+    // Exported view: boinc_task
8869
+    $view = new view;
8870
+    $view->name = 'boinc_task';
8871
+    $view->description = 'Details for a specific task';
8872
+    $view->tag = '';
8873
+    $view->base_table = 'result';
8874
+    $view->core = 0;
8875
+    $view->api_version = '2';
8876
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
8877
+    $handler = $view->new_display('default', 'Defaults', 'default');
8878
+    $handler->override_option('fields', array(
8879 8879
     'name' => array(
8880
-      'label' => 'Name',
8881
-      'alter' => array(
8880
+        'label' => 'Name',
8881
+        'alter' => array(
8882 8882
         'alter_text' => 0,
8883 8883
         'text' => '',
8884 8884
         'make_link' => 0,
@@ -8895,19 +8895,19 @@  discard block
 block discarded – undo
8895 8895
         'ellipsis' => 1,
8896 8896
         'html' => 0,
8897 8897
         'strip_tags' => 0,
8898
-      ),
8899
-      'empty' => '',
8900
-      'hide_empty' => 0,
8901
-      'empty_zero' => 0,
8902
-      'exclude' => 0,
8903
-      'id' => 'name',
8904
-      'table' => 'result',
8905
-      'field' => 'name',
8906
-      'relationship' => 'none',
8898
+        ),
8899
+        'empty' => '',
8900
+        'hide_empty' => 0,
8901
+        'empty_zero' => 0,
8902
+        'exclude' => 0,
8903
+        'id' => 'name',
8904
+        'table' => 'result',
8905
+        'field' => 'name',
8906
+        'relationship' => 'none',
8907 8907
     ),
8908 8908
     'workunitid' => array(
8909
-      'label' => 'Workunit ID',
8910
-      'alter' => array(
8909
+        'label' => 'Workunit ID',
8910
+        'alter' => array(
8911 8911
         'alter_text' => 0,
8912 8912
         'text' => '',
8913 8913
         'make_link' => 1,
@@ -8924,25 +8924,25 @@  discard block
 block discarded – undo
8924 8924
         'ellipsis' => 1,
8925 8925
         'html' => 0,
8926 8926
         'strip_tags' => 0,
8927
-      ),
8928
-      'empty' => '',
8929
-      'hide_empty' => 0,
8930
-      'empty_zero' => 0,
8931
-      'set_precision' => FALSE,
8932
-      'precision' => 0,
8933
-      'decimal' => '.',
8934
-      'separator' => '',
8935
-      'prefix' => '',
8936
-      'suffix' => '',
8937
-      'exclude' => 0,
8938
-      'id' => 'workunitid',
8939
-      'table' => 'result',
8940
-      'field' => 'workunitid',
8941
-      'relationship' => 'none',
8927
+        ),
8928
+        'empty' => '',
8929
+        'hide_empty' => 0,
8930
+        'empty_zero' => 0,
8931
+        'set_precision' => FALSE,
8932
+        'precision' => 0,
8933
+        'decimal' => '.',
8934
+        'separator' => '',
8935
+        'prefix' => '',
8936
+        'suffix' => '',
8937
+        'exclude' => 0,
8938
+        'id' => 'workunitid',
8939
+        'table' => 'result',
8940
+        'field' => 'workunitid',
8941
+        'relationship' => 'none',
8942 8942
     ),
8943 8943
     'create_time' => array(
8944
-      'label' => 'Created',
8945
-      'alter' => array(
8944
+        'label' => 'Created',
8945
+        'alter' => array(
8946 8946
         'alter_text' => 0,
8947 8947
         'text' => '',
8948 8948
         'make_link' => 0,
@@ -8961,22 +8961,22 @@  discard block
 block discarded – undo
8961 8961
         'ellipsis' => 1,
8962 8962
         'html' => 0,
8963 8963
         'strip_tags' => 0,
8964
-      ),
8965
-      'empty' => '',
8966
-      'hide_empty' => 0,
8967
-      'empty_zero' => 0,
8968
-      'hide_alter_empty' => 1,
8969
-      'date_format' => 'custom',
8970
-      'custom_date_format' => 'j M Y G:i:s T',
8971
-      'exclude' => 1,
8972
-      'id' => 'create_time',
8973
-      'table' => 'result',
8974
-      'field' => 'create_time',
8975
-      'relationship' => 'none',
8964
+        ),
8965
+        'empty' => '',
8966
+        'hide_empty' => 0,
8967
+        'empty_zero' => 0,
8968
+        'hide_alter_empty' => 1,
8969
+        'date_format' => 'custom',
8970
+        'custom_date_format' => 'j M Y G:i:s T',
8971
+        'exclude' => 1,
8972
+        'id' => 'create_time',
8973
+        'table' => 'result',
8974
+        'field' => 'create_time',
8975
+        'relationship' => 'none',
8976 8976
     ),
8977 8977
     'sent_time' => array(
8978
-      'label' => 'Sent',
8979
-      'alter' => array(
8978
+        'label' => 'Sent',
8979
+        'alter' => array(
8980 8980
         'alter_text' => 0,
8981 8981
         'text' => '',
8982 8982
         'make_link' => 0,
@@ -8995,22 +8995,22 @@  discard block
 block discarded – undo
8995 8995
         'ellipsis' => 1,
8996 8996
         'html' => 0,
8997 8997
         'strip_tags' => 0,
8998
-      ),
8999
-      'empty' => '',
9000
-      'hide_empty' => 0,
9001
-      'empty_zero' => 0,
9002
-      'hide_alter_empty' => 1,
9003
-      'date_format' => 'custom',
9004
-      'custom_date_format' => 'j M Y G:i:s T',
9005
-      'exclude' => 1,
9006
-      'id' => 'sent_time',
9007
-      'table' => 'result',
9008
-      'field' => 'sent_time',
9009
-      'relationship' => 'none',
8998
+        ),
8999
+        'empty' => '',
9000
+        'hide_empty' => 0,
9001
+        'empty_zero' => 0,
9002
+        'hide_alter_empty' => 1,
9003
+        'date_format' => 'custom',
9004
+        'custom_date_format' => 'j M Y G:i:s T',
9005
+        'exclude' => 1,
9006
+        'id' => 'sent_time',
9007
+        'table' => 'result',
9008
+        'field' => 'sent_time',
9009
+        'relationship' => 'none',
9010 9010
     ),
9011 9011
     'report_deadline' => array(
9012
-      'label' => 'Report deadline',
9013
-      'alter' => array(
9012
+        'label' => 'Report deadline',
9013
+        'alter' => array(
9014 9014
         'alter_text' => 0,
9015 9015
         'text' => '',
9016 9016
         'make_link' => 0,
@@ -9029,22 +9029,22 @@  discard block
 block discarded – undo
9029 9029
         'ellipsis' => 1,
9030 9030
         'html' => 0,
9031 9031
         'strip_tags' => 0,
9032
-      ),
9033
-      'empty' => '',
9034
-      'hide_empty' => 0,
9035
-      'empty_zero' => 0,
9036
-      'hide_alter_empty' => 1,
9037
-      'date_format' => 'custom',
9038
-      'custom_date_format' => 'j M Y G:i:s T',
9039
-      'exclude' => 1,
9040
-      'id' => 'report_deadline',
9041
-      'table' => 'result',
9042
-      'field' => 'report_deadline',
9043
-      'relationship' => 'none',
9032
+        ),
9033
+        'empty' => '',
9034
+        'hide_empty' => 0,
9035
+        'empty_zero' => 0,
9036
+        'hide_alter_empty' => 1,
9037
+        'date_format' => 'custom',
9038
+        'custom_date_format' => 'j M Y G:i:s T',
9039
+        'exclude' => 1,
9040
+        'id' => 'report_deadline',
9041
+        'table' => 'result',
9042
+        'field' => 'report_deadline',
9043
+        'relationship' => 'none',
9044 9044
     ),
9045 9045
     'received_time' => array(
9046
-      'label' => 'Received',
9047
-      'alter' => array(
9046
+        'label' => 'Received',
9047
+        'alter' => array(
9048 9048
         'alter_text' => 0,
9049 9049
         'text' => '',
9050 9050
         'make_link' => 0,
@@ -9063,22 +9063,22 @@  discard block
 block discarded – undo
9063 9063
         'ellipsis' => 1,
9064 9064
         'html' => 0,
9065 9065
         'strip_tags' => 0,
9066
-      ),
9067
-      'empty' => '',
9068
-      'hide_empty' => 0,
9069
-      'empty_zero' => 0,
9070
-      'hide_alter_empty' => 1,
9071
-      'date_format' => 'custom',
9072
-      'custom_date_format' => 'j M Y G:i:s T',
9073
-      'exclude' => 1,
9074
-      'id' => 'received_time',
9075
-      'table' => 'result',
9076
-      'field' => 'received_time',
9077
-      'relationship' => 'none',
9066
+        ),
9067
+        'empty' => '',
9068
+        'hide_empty' => 0,
9069
+        'empty_zero' => 0,
9070
+        'hide_alter_empty' => 1,
9071
+        'date_format' => 'custom',
9072
+        'custom_date_format' => 'j M Y G:i:s T',
9073
+        'exclude' => 1,
9074
+        'id' => 'received_time',
9075
+        'table' => 'result',
9076
+        'field' => 'received_time',
9077
+        'relationship' => 'none',
9078 9078
     ),
9079 9079
     'phpcode' => array(
9080
-      'label' => 'Created',
9081
-      'alter' => array(
9080
+        'label' => 'Created',
9081
+        'alter' => array(
9082 9082
         'alter_text' => 0,
9083 9083
         'text' => '',
9084 9084
         'make_link' => 0,
@@ -9097,23 +9097,23 @@  discard block
 block discarded – undo
9097 9097
         'ellipsis' => 1,
9098 9098
         'html' => 0,
9099 9099
         'strip_tags' => 0,
9100
-      ),
9101
-      'empty' => '',
9102
-      'hide_empty' => 0,
9103
-      'empty_zero' => 0,
9104
-      'hide_alter_empty' => 1,
9105
-      'value' => '<?php
9100
+        ),
9101
+        'empty' => '',
9102
+        'hide_empty' => 0,
9103
+        'empty_zero' => 0,
9104
+        'hide_alter_empty' => 1,
9105
+        'value' => '<?php
9106 9106
 echo date(\'j M Y G:i:s T\', $data->result_create_time);
9107 9107
 ?>',
9108
-      'exclude' => 0,
9109
-      'id' => 'phpcode',
9110
-      'table' => 'customfield',
9111
-      'field' => 'phpcode',
9112
-      'relationship' => 'none',
9108
+        'exclude' => 0,
9109
+        'id' => 'phpcode',
9110
+        'table' => 'customfield',
9111
+        'field' => 'phpcode',
9112
+        'relationship' => 'none',
9113 9113
     ),
9114 9114
     'phpcode_1' => array(
9115
-      'label' => 'Sent',
9116
-      'alter' => array(
9115
+        'label' => 'Sent',
9116
+        'alter' => array(
9117 9117
         'alter_text' => 0,
9118 9118
         'text' => '',
9119 9119
         'make_link' => 0,
@@ -9132,24 +9132,24 @@  discard block
 block discarded – undo
9132 9132
         'ellipsis' => 1,
9133 9133
         'html' => 0,
9134 9134
         'strip_tags' => 0,
9135
-      ),
9136
-      'empty' => '',
9137
-      'hide_empty' => 0,
9138
-      'empty_zero' => 0,
9139
-      'hide_alter_empty' => 1,
9140
-      'value' => '<?php
9135
+        ),
9136
+        'empty' => '',
9137
+        'hide_empty' => 0,
9138
+        'empty_zero' => 0,
9139
+        'hide_alter_empty' => 1,
9140
+        'value' => '<?php
9141 9141
 echo date(\'j M Y G:i:s T\', $data->result_sent_time);
9142 9142
 ?>
9143 9143
 ',
9144
-      'exclude' => 0,
9145
-      'id' => 'phpcode_1',
9146
-      'table' => 'customfield',
9147
-      'field' => 'phpcode',
9148
-      'relationship' => 'none',
9144
+        'exclude' => 0,
9145
+        'id' => 'phpcode_1',
9146
+        'table' => 'customfield',
9147
+        'field' => 'phpcode',
9148
+        'relationship' => 'none',
9149 9149
     ),
9150 9150
     'phpcode_8' => array(
9151
-      'label' => 'Report deadline',
9152
-      'alter' => array(
9151
+        'label' => 'Report deadline',
9152
+        'alter' => array(
9153 9153
         'alter_text' => 0,
9154 9154
         'text' => '',
9155 9155
         'make_link' => 0,
@@ -9168,24 +9168,24 @@  discard block
 block discarded – undo
9168 9168
         'ellipsis' => 1,
9169 9169
         'html' => 0,
9170 9170
         'strip_tags' => 0,
9171
-      ),
9172
-      'empty' => '',
9173
-      'hide_empty' => 0,
9174
-      'empty_zero' => 0,
9175
-      'hide_alter_empty' => 1,
9176
-      'value' => '<?php
9171
+        ),
9172
+        'empty' => '',
9173
+        'hide_empty' => 0,
9174
+        'empty_zero' => 0,
9175
+        'hide_alter_empty' => 1,
9176
+        'value' => '<?php
9177 9177
 echo date(\'j M Y G:i:s T\', $data->result_report_deadline);
9178 9178
 ?>
9179 9179
 ',
9180
-      'exclude' => 0,
9181
-      'id' => 'phpcode_8',
9182
-      'table' => 'customfield',
9183
-      'field' => 'phpcode',
9184
-      'relationship' => 'none',
9180
+        'exclude' => 0,
9181
+        'id' => 'phpcode_8',
9182
+        'table' => 'customfield',
9183
+        'field' => 'phpcode',
9184
+        'relationship' => 'none',
9185 9185
     ),
9186 9186
     'phpcode_9' => array(
9187
-      'label' => 'Received',
9188
-      'alter' => array(
9187
+        'label' => 'Received',
9188
+        'alter' => array(
9189 9189
         'alter_text' => 0,
9190 9190
         'text' => '',
9191 9191
         'make_link' => 0,
@@ -9204,24 +9204,24 @@  discard block
 block discarded – undo
9204 9204
         'ellipsis' => 1,
9205 9205
         'html' => 0,
9206 9206
         'strip_tags' => 0,
9207
-      ),
9208
-      'empty' => '',
9209
-      'hide_empty' => 0,
9210
-      'empty_zero' => 0,
9211
-      'hide_alter_empty' => 1,
9212
-      'value' => '<?php
9207
+        ),
9208
+        'empty' => '',
9209
+        'hide_empty' => 0,
9210
+        'empty_zero' => 0,
9211
+        'hide_alter_empty' => 1,
9212
+        'value' => '<?php
9213 9213
 echo date(\'j M Y G:i:s T\', $data->result_received_time);
9214 9214
 ?>
9215 9215
 ',
9216
-      'exclude' => 0,
9217
-      'id' => 'phpcode_9',
9218
-      'table' => 'customfield',
9219
-      'field' => 'phpcode',
9220
-      'relationship' => 'none',
9216
+        'exclude' => 0,
9217
+        'id' => 'phpcode_9',
9218
+        'table' => 'customfield',
9219
+        'field' => 'phpcode',
9220
+        'relationship' => 'none',
9221 9221
     ),
9222 9222
     'server_state' => array(
9223
-      'label' => 'Server state',
9224
-      'alter' => array(
9223
+        'label' => 'Server state',
9224
+        'alter' => array(
9225 9225
         'alter_text' => 0,
9226 9226
         'text' => '',
9227 9227
         'make_link' => 0,
@@ -9240,29 +9240,29 @@  discard block
 block discarded – undo
9240 9240
         'ellipsis' => 1,
9241 9241
         'html' => 0,
9242 9242
         'strip_tags' => 0,
9243
-      ),
9244
-      'empty' => '',
9245
-      'hide_empty' => 0,
9246
-      'empty_zero' => 0,
9247
-      'hide_alter_empty' => 1,
9248
-      'set_precision' => FALSE,
9249
-      'precision' => 0,
9250
-      'decimal' => '.',
9251
-      'separator' => '',
9252
-      'format_plural' => 0,
9253
-      'format_plural_singular' => '1',
9254
-      'format_plural_plural' => '@count',
9255
-      'prefix' => '',
9256
-      'suffix' => '',
9257
-      'exclude' => 1,
9258
-      'id' => 'server_state',
9259
-      'table' => 'result',
9260
-      'field' => 'server_state',
9261
-      'relationship' => 'none',
9243
+        ),
9244
+        'empty' => '',
9245
+        'hide_empty' => 0,
9246
+        'empty_zero' => 0,
9247
+        'hide_alter_empty' => 1,
9248
+        'set_precision' => FALSE,
9249
+        'precision' => 0,
9250
+        'decimal' => '.',
9251
+        'separator' => '',
9252
+        'format_plural' => 0,
9253
+        'format_plural_singular' => '1',
9254
+        'format_plural_plural' => '@count',
9255
+        'prefix' => '',
9256
+        'suffix' => '',
9257
+        'exclude' => 1,
9258
+        'id' => 'server_state',
9259
+        'table' => 'result',
9260
+        'field' => 'server_state',
9261
+        'relationship' => 'none',
9262 9262
     ),
9263 9263
     'phpcode_3' => array(
9264
-      'label' => 'Server state',
9265
-      'alter' => array(
9264
+        'label' => 'Server state',
9265
+        'alter' => array(
9266 9266
         'alter_text' => 0,
9267 9267
         'text' => '',
9268 9268
         'make_link' => 0,
@@ -9281,26 +9281,26 @@  discard block
 block discarded – undo
9281 9281
         'ellipsis' => 1,
9282 9282
         'html' => 0,
9283 9283
         'strip_tags' => 0,
9284
-      ),
9285
-      'empty' => '',
9286
-      'hide_empty' => 0,
9287
-      'empty_zero' => 0,
9288
-      'hide_alter_empty' => 1,
9289
-      'value' => '<?php
9284
+        ),
9285
+        'empty' => '',
9286
+        'hide_empty' => 0,
9287
+        'empty_zero' => 0,
9288
+        'hide_alter_empty' => 1,
9289
+        'value' => '<?php
9290 9290
   require_boinc(array(\'result\', \'util\'));
9291 9291
   $result = new stdClass();
9292 9292
   $result->server_state = $data->result_server_state;
9293 9293
   return result_server_state_string($result);
9294 9294
 ?>',
9295
-      'exclude' => 0,
9296
-      'id' => 'phpcode_3',
9297
-      'table' => 'customfield',
9298
-      'field' => 'phpcode',
9299
-      'relationship' => 'none',
9295
+        'exclude' => 0,
9296
+        'id' => 'phpcode_3',
9297
+        'table' => 'customfield',
9298
+        'field' => 'phpcode',
9299
+        'relationship' => 'none',
9300 9300
     ),
9301 9301
     'outcome' => array(
9302
-      'label' => 'Outcome',
9303
-      'alter' => array(
9302
+        'label' => 'Outcome',
9303
+        'alter' => array(
9304 9304
         'alter_text' => 0,
9305 9305
         'text' => '',
9306 9306
         'make_link' => 0,
@@ -9319,29 +9319,29 @@  discard block
 block discarded – undo
9319 9319
         'ellipsis' => 1,
9320 9320
         'html' => 0,
9321 9321
         'strip_tags' => 0,
9322
-      ),
9323
-      'empty' => '',
9324
-      'hide_empty' => 0,
9325
-      'empty_zero' => 0,
9326
-      'hide_alter_empty' => 1,
9327
-      'set_precision' => FALSE,
9328
-      'precision' => 0,
9329
-      'decimal' => '.',
9330
-      'separator' => '',
9331
-      'format_plural' => 0,
9332
-      'format_plural_singular' => '1',
9333
-      'format_plural_plural' => '@count',
9334
-      'prefix' => '',
9335
-      'suffix' => '',
9336
-      'exclude' => 1,
9337
-      'id' => 'outcome',
9338
-      'table' => 'result',
9339
-      'field' => 'outcome',
9340
-      'relationship' => 'none',
9322
+        ),
9323
+        'empty' => '',
9324
+        'hide_empty' => 0,
9325
+        'empty_zero' => 0,
9326
+        'hide_alter_empty' => 1,
9327
+        'set_precision' => FALSE,
9328
+        'precision' => 0,
9329
+        'decimal' => '.',
9330
+        'separator' => '',
9331
+        'format_plural' => 0,
9332
+        'format_plural_singular' => '1',
9333
+        'format_plural_plural' => '@count',
9334
+        'prefix' => '',
9335
+        'suffix' => '',
9336
+        'exclude' => 1,
9337
+        'id' => 'outcome',
9338
+        'table' => 'result',
9339
+        'field' => 'outcome',
9340
+        'relationship' => 'none',
9341 9341
     ),
9342 9342
     'phpcode_4' => array(
9343
-      'label' => 'Outcome',
9344
-      'alter' => array(
9343
+        'label' => 'Outcome',
9344
+        'alter' => array(
9345 9345
         'alter_text' => 0,
9346 9346
         'text' => '',
9347 9347
         'make_link' => 0,
@@ -9360,26 +9360,26 @@  discard block
 block discarded – undo
9360 9360
         'ellipsis' => 1,
9361 9361
         'html' => 0,
9362 9362
         'strip_tags' => 0,
9363
-      ),
9364
-      'empty' => '',
9365
-      'hide_empty' => 0,
9366
-      'empty_zero' => 0,
9367
-      'hide_alter_empty' => 1,
9368
-      'value' => '<?php
9363
+        ),
9364
+        'empty' => '',
9365
+        'hide_empty' => 0,
9366
+        'empty_zero' => 0,
9367
+        'hide_alter_empty' => 1,
9368
+        'value' => '<?php
9369 9369
   require_boinc(array(\'result\', \'util\'));
9370 9370
   $result = new stdClass();
9371 9371
   $result->outcome = $data->result_outcome;
9372 9372
   return result_outcome_string($result);
9373 9373
 ?>',
9374
-      'exclude' => 0,
9375
-      'id' => 'phpcode_4',
9376
-      'table' => 'customfield',
9377
-      'field' => 'phpcode',
9378
-      'relationship' => 'none',
9374
+        'exclude' => 0,
9375
+        'id' => 'phpcode_4',
9376
+        'table' => 'customfield',
9377
+        'field' => 'phpcode',
9378
+        'relationship' => 'none',
9379 9379
     ),
9380 9380
     'client_state' => array(
9381
-      'label' => 'Client state',
9382
-      'alter' => array(
9381
+        'label' => 'Client state',
9382
+        'alter' => array(
9383 9383
         'alter_text' => 0,
9384 9384
         'text' => '',
9385 9385
         'make_link' => 0,
@@ -9398,29 +9398,29 @@  discard block
 block discarded – undo
9398 9398
         'ellipsis' => 1,
9399 9399
         'html' => 0,
9400 9400
         'strip_tags' => 0,
9401
-      ),
9402
-      'empty' => '',
9403
-      'hide_empty' => 0,
9404
-      'empty_zero' => 0,
9405
-      'hide_alter_empty' => 1,
9406
-      'set_precision' => FALSE,
9407
-      'precision' => 0,
9408
-      'decimal' => '.',
9409
-      'separator' => '',
9410
-      'format_plural' => 0,
9411
-      'format_plural_singular' => '1',
9412
-      'format_plural_plural' => '@count',
9413
-      'prefix' => '',
9414
-      'suffix' => '',
9415
-      'exclude' => 1,
9416
-      'id' => 'client_state',
9417
-      'table' => 'result',
9418
-      'field' => 'client_state',
9419
-      'relationship' => 'none',
9401
+        ),
9402
+        'empty' => '',
9403
+        'hide_empty' => 0,
9404
+        'empty_zero' => 0,
9405
+        'hide_alter_empty' => 1,
9406
+        'set_precision' => FALSE,
9407
+        'precision' => 0,
9408
+        'decimal' => '.',
9409
+        'separator' => '',
9410
+        'format_plural' => 0,
9411
+        'format_plural_singular' => '1',
9412
+        'format_plural_plural' => '@count',
9413
+        'prefix' => '',
9414
+        'suffix' => '',
9415
+        'exclude' => 1,
9416
+        'id' => 'client_state',
9417
+        'table' => 'result',
9418
+        'field' => 'client_state',
9419
+        'relationship' => 'none',
9420 9420
     ),
9421 9421
     'phpcode_5' => array(
9422
-      'label' => 'Client state',
9423
-      'alter' => array(
9422
+        'label' => 'Client state',
9423
+        'alter' => array(
9424 9424
         'alter_text' => 0,
9425 9425
         'text' => '',
9426 9426
         'make_link' => 0,
@@ -9439,26 +9439,26 @@  discard block
 block discarded – undo
9439 9439
         'ellipsis' => 1,
9440 9440
         'html' => 0,
9441 9441
         'strip_tags' => 0,
9442
-      ),
9443
-      'empty' => '',
9444
-      'hide_empty' => 0,
9445
-      'empty_zero' => 0,
9446
-      'hide_alter_empty' => 1,
9447
-      'value' => '<?php
9442
+        ),
9443
+        'empty' => '',
9444
+        'hide_empty' => 0,
9445
+        'empty_zero' => 0,
9446
+        'hide_alter_empty' => 1,
9447
+        'value' => '<?php
9448 9448
   require_boinc(array(\'result\', \'util\'));
9449 9449
   $result = new stdClass();
9450 9450
   $result->client_state = $data->result_client_state;
9451 9451
   return result_client_state_string($result);
9452 9452
 ?>',
9453
-      'exclude' => 0,
9454
-      'id' => 'phpcode_5',
9455
-      'table' => 'customfield',
9456
-      'field' => 'phpcode',
9457
-      'relationship' => 'none',
9453
+        'exclude' => 0,
9454
+        'id' => 'phpcode_5',
9455
+        'table' => 'customfield',
9456
+        'field' => 'phpcode',
9457
+        'relationship' => 'none',
9458 9458
     ),
9459 9459
     'exit_status' => array(
9460
-      'label' => 'Exit status',
9461
-      'alter' => array(
9460
+        'label' => 'Exit status',
9461
+        'alter' => array(
9462 9462
         'alter_text' => 0,
9463 9463
         'text' => '',
9464 9464
         'make_link' => 0,
@@ -9477,29 +9477,29 @@  discard block
 block discarded – undo
9477 9477
         'ellipsis' => 1,
9478 9478
         'html' => 0,
9479 9479
         'strip_tags' => 0,
9480
-      ),
9481
-      'empty' => '',
9482
-      'hide_empty' => 0,
9483
-      'empty_zero' => 0,
9484
-      'hide_alter_empty' => 1,
9485
-      'set_precision' => FALSE,
9486
-      'precision' => 0,
9487
-      'decimal' => '.',
9488
-      'separator' => '',
9489
-      'format_plural' => 0,
9490
-      'format_plural_singular' => '1',
9491
-      'format_plural_plural' => '@count',
9492
-      'prefix' => '',
9493
-      'suffix' => '',
9494
-      'exclude' => 1,
9495
-      'id' => 'exit_status',
9496
-      'table' => 'result',
9497
-      'field' => 'exit_status',
9498
-      'relationship' => 'none',
9480
+        ),
9481
+        'empty' => '',
9482
+        'hide_empty' => 0,
9483
+        'empty_zero' => 0,
9484
+        'hide_alter_empty' => 1,
9485
+        'set_precision' => FALSE,
9486
+        'precision' => 0,
9487
+        'decimal' => '.',
9488
+        'separator' => '',
9489
+        'format_plural' => 0,
9490
+        'format_plural_singular' => '1',
9491
+        'format_plural_plural' => '@count',
9492
+        'prefix' => '',
9493
+        'suffix' => '',
9494
+        'exclude' => 1,
9495
+        'id' => 'exit_status',
9496
+        'table' => 'result',
9497
+        'field' => 'exit_status',
9498
+        'relationship' => 'none',
9499 9499
     ),
9500 9500
     'phpcode_6' => array(
9501
-      'label' => 'Exit status',
9502
-      'alter' => array(
9501
+        'label' => 'Exit status',
9502
+        'alter' => array(
9503 9503
         'alter_text' => 0,
9504 9504
         'text' => '',
9505 9505
         'make_link' => 0,
@@ -9518,24 +9518,24 @@  discard block
 block discarded – undo
9518 9518
         'ellipsis' => 1,
9519 9519
         'html' => 0,
9520 9520
         'strip_tags' => 0,
9521
-      ),
9522
-      'empty' => '',
9523
-      'hide_empty' => 0,
9524
-      'empty_zero' => 0,
9525
-      'hide_alter_empty' => 1,
9526
-      'value' => '<?php
9521
+        ),
9522
+        'empty' => '',
9523
+        'hide_empty' => 0,
9524
+        'empty_zero' => 0,
9525
+        'hide_alter_empty' => 1,
9526
+        'value' => '<?php
9527 9527
   require_boinc(array(\'result\', \'util\'));
9528 9528
   return exit_status_string($data->result_exit_status);
9529 9529
 ?>',
9530
-      'exclude' => 0,
9531
-      'id' => 'phpcode_6',
9532
-      'table' => 'customfield',
9533
-      'field' => 'phpcode',
9534
-      'relationship' => 'none',
9530
+        'exclude' => 0,
9531
+        'id' => 'phpcode_6',
9532
+        'table' => 'customfield',
9533
+        'field' => 'phpcode',
9534
+        'relationship' => 'none',
9535 9535
     ),
9536 9536
     'hostid' => array(
9537
-      'label' => 'Computer',
9538
-      'alter' => array(
9537
+        'label' => 'Computer',
9538
+        'alter' => array(
9539 9539
         'alter_text' => 0,
9540 9540
         'text' => '',
9541 9541
         'make_link' => 1,
@@ -9552,25 +9552,25 @@  discard block
 block discarded – undo
9552 9552
         'ellipsis' => 1,
9553 9553
         'html' => 0,
9554 9554
         'strip_tags' => 0,
9555
-      ),
9556
-      'empty' => '',
9557
-      'hide_empty' => 0,
9558
-      'empty_zero' => 0,
9559
-      'set_precision' => FALSE,
9560
-      'precision' => 0,
9561
-      'decimal' => '.',
9562
-      'separator' => '',
9563
-      'prefix' => '',
9564
-      'suffix' => '',
9565
-      'exclude' => 0,
9566
-      'id' => 'hostid',
9567
-      'table' => 'result',
9568
-      'field' => 'hostid',
9569
-      'relationship' => 'none',
9555
+        ),
9556
+        'empty' => '',
9557
+        'hide_empty' => 0,
9558
+        'empty_zero' => 0,
9559
+        'set_precision' => FALSE,
9560
+        'precision' => 0,
9561
+        'decimal' => '.',
9562
+        'separator' => '',
9563
+        'prefix' => '',
9564
+        'suffix' => '',
9565
+        'exclude' => 0,
9566
+        'id' => 'hostid',
9567
+        'table' => 'result',
9568
+        'field' => 'hostid',
9569
+        'relationship' => 'none',
9570 9570
     ),
9571 9571
     'elapsed_time' => array(
9572
-      'label' => 'Run time (sec)',
9573
-      'alter' => array(
9572
+        'label' => 'Run time (sec)',
9573
+        'alter' => array(
9574 9574
         'alter_text' => 0,
9575 9575
         'text' => '',
9576 9576
         'make_link' => 0,
@@ -9587,25 +9587,25 @@  discard block
 block discarded – undo
9587 9587
         'ellipsis' => 1,
9588 9588
         'html' => 0,
9589 9589
         'strip_tags' => 0,
9590
-      ),
9591
-      'empty' => '',
9592
-      'hide_empty' => 0,
9593
-      'empty_zero' => 0,
9594
-      'set_precision' => 1,
9595
-      'precision' => '2',
9596
-      'decimal' => '.',
9597
-      'separator' => ',',
9598
-      'prefix' => '',
9599
-      'suffix' => '',
9600
-      'exclude' => 0,
9601
-      'id' => 'elapsed_time',
9602
-      'table' => 'result',
9603
-      'field' => 'elapsed_time',
9604
-      'relationship' => 'none',
9590
+        ),
9591
+        'empty' => '',
9592
+        'hide_empty' => 0,
9593
+        'empty_zero' => 0,
9594
+        'set_precision' => 1,
9595
+        'precision' => '2',
9596
+        'decimal' => '.',
9597
+        'separator' => ',',
9598
+        'prefix' => '',
9599
+        'suffix' => '',
9600
+        'exclude' => 0,
9601
+        'id' => 'elapsed_time',
9602
+        'table' => 'result',
9603
+        'field' => 'elapsed_time',
9604
+        'relationship' => 'none',
9605 9605
     ),
9606 9606
     'cpu_time' => array(
9607
-      'label' => 'CPU time (sec)',
9608
-      'alter' => array(
9607
+        'label' => 'CPU time (sec)',
9608
+        'alter' => array(
9609 9609
         'alter_text' => 0,
9610 9610
         'text' => '',
9611 9611
         'make_link' => 0,
@@ -9622,25 +9622,25 @@  discard block
 block discarded – undo
9622 9622
         'ellipsis' => 1,
9623 9623
         'html' => 0,
9624 9624
         'strip_tags' => 0,
9625
-      ),
9626
-      'empty' => '',
9627
-      'hide_empty' => 0,
9628
-      'empty_zero' => 0,
9629
-      'set_precision' => 1,
9630
-      'precision' => '2',
9631
-      'decimal' => '.',
9632
-      'separator' => ',',
9633
-      'prefix' => '',
9634
-      'suffix' => '',
9635
-      'exclude' => 0,
9636
-      'id' => 'cpu_time',
9637
-      'table' => 'result',
9638
-      'field' => 'cpu_time',
9639
-      'relationship' => 'none',
9625
+        ),
9626
+        'empty' => '',
9627
+        'hide_empty' => 0,
9628
+        'empty_zero' => 0,
9629
+        'set_precision' => 1,
9630
+        'precision' => '2',
9631
+        'decimal' => '.',
9632
+        'separator' => ',',
9633
+        'prefix' => '',
9634
+        'suffix' => '',
9635
+        'exclude' => 0,
9636
+        'id' => 'cpu_time',
9637
+        'table' => 'result',
9638
+        'field' => 'cpu_time',
9639
+        'relationship' => 'none',
9640 9640
     ),
9641 9641
     'peak_working_set_size' => array(
9642
-      'label' => 'Peak working set size (MB)',
9643
-      'alter' => array(
9642
+        'label' => 'Peak working set size (MB)',
9643
+        'alter' => array(
9644 9644
         'alter_text' => 0,
9645 9645
         'text' => '',
9646 9646
         'make_link' => 0,
@@ -9659,29 +9659,29 @@  discard block
 block discarded – undo
9659 9659
         'ellipsis' => 1,
9660 9660
         'html' => 0,
9661 9661
         'strip_tags' => 0,
9662
-      ),
9663
-      'empty' => '',
9664
-      'hide_empty' => 0,
9665
-      'empty_zero' => 0,
9666
-      'hide_alter_empty' => 1,
9667
-      'set_precision' => FALSE,
9668
-      'precision' => 0,
9669
-      'decimal' => '.',
9670
-      'separator' => ',',
9671
-      'format_plural' => 0,
9672
-      'format_plural_singular' => '1',
9673
-      'format_plural_plural' => '@count',
9674
-      'prefix' => '',
9675
-      'suffix' => '',
9676
-      'exclude' => 0,
9677
-      'id' => 'peak_working_set_size',
9678
-      'table' => 'result',
9679
-      'field' => 'peak_working_set_size',
9680
-      'relationship' => 'none',
9662
+        ),
9663
+        'empty' => '',
9664
+        'hide_empty' => 0,
9665
+        'empty_zero' => 0,
9666
+        'hide_alter_empty' => 1,
9667
+        'set_precision' => FALSE,
9668
+        'precision' => 0,
9669
+        'decimal' => '.',
9670
+        'separator' => ',',
9671
+        'format_plural' => 0,
9672
+        'format_plural_singular' => '1',
9673
+        'format_plural_plural' => '@count',
9674
+        'prefix' => '',
9675
+        'suffix' => '',
9676
+        'exclude' => 0,
9677
+        'id' => 'peak_working_set_size',
9678
+        'table' => 'result',
9679
+        'field' => 'peak_working_set_size',
9680
+        'relationship' => 'none',
9681 9681
     ),
9682 9682
     'peak_swap_size' => array(
9683
-      'label' => 'Peak swap size (MB)',
9684
-      'alter' => array(
9683
+        'label' => 'Peak swap size (MB)',
9684
+        'alter' => array(
9685 9685
         'alter_text' => 0,
9686 9686
         'text' => '',
9687 9687
         'make_link' => 0,
@@ -9700,29 +9700,29 @@  discard block
 block discarded – undo
9700 9700
         'ellipsis' => 1,
9701 9701
         'html' => 0,
9702 9702
         'strip_tags' => 0,
9703
-      ),
9704
-      'empty' => '',
9705
-      'hide_empty' => 0,
9706
-      'empty_zero' => 0,
9707
-      'hide_alter_empty' => 1,
9708
-      'set_precision' => FALSE,
9709
-      'precision' => 0,
9710
-      'decimal' => '.',
9711
-      'separator' => ',',
9712
-      'format_plural' => 0,
9713
-      'format_plural_singular' => '1',
9714
-      'format_plural_plural' => '@count',
9715
-      'prefix' => '',
9716
-      'suffix' => '',
9717
-      'exclude' => 0,
9718
-      'id' => 'peak_swap_size',
9719
-      'table' => 'result',
9720
-      'field' => 'peak_swap_size',
9721
-      'relationship' => 'none',
9703
+        ),
9704
+        'empty' => '',
9705
+        'hide_empty' => 0,
9706
+        'empty_zero' => 0,
9707
+        'hide_alter_empty' => 1,
9708
+        'set_precision' => FALSE,
9709
+        'precision' => 0,
9710
+        'decimal' => '.',
9711
+        'separator' => ',',
9712
+        'format_plural' => 0,
9713
+        'format_plural_singular' => '1',
9714
+        'format_plural_plural' => '@count',
9715
+        'prefix' => '',
9716
+        'suffix' => '',
9717
+        'exclude' => 0,
9718
+        'id' => 'peak_swap_size',
9719
+        'table' => 'result',
9720
+        'field' => 'peak_swap_size',
9721
+        'relationship' => 'none',
9722 9722
     ),
9723 9723
     'peak_disk_usage' => array(
9724
-      'label' => 'Peak disk usage (MB)',
9725
-      'alter' => array(
9724
+        'label' => 'Peak disk usage (MB)',
9725
+        'alter' => array(
9726 9726
         'alter_text' => 0,
9727 9727
         'text' => '',
9728 9728
         'make_link' => 0,
@@ -9741,29 +9741,29 @@  discard block
 block discarded – undo
9741 9741
         'ellipsis' => 1,
9742 9742
         'html' => 0,
9743 9743
         'strip_tags' => 0,
9744
-      ),
9745
-      'empty' => '',
9746
-      'hide_empty' => 0,
9747
-      'empty_zero' => 0,
9748
-      'hide_alter_empty' => 1,
9749
-      'set_precision' => FALSE,
9750
-      'precision' => 0,
9751
-      'decimal' => '.',
9752
-      'separator' => ',',
9753
-      'format_plural' => 0,
9754
-      'format_plural_singular' => '1',
9755
-      'format_plural_plural' => '@count',
9756
-      'prefix' => '',
9757
-      'suffix' => '',
9758
-      'exclude' => 0,
9759
-      'id' => 'peak_disk_usage',
9760
-      'table' => 'result',
9761
-      'field' => 'peak_disk_usage',
9762
-      'relationship' => 'none',
9744
+        ),
9745
+        'empty' => '',
9746
+        'hide_empty' => 0,
9747
+        'empty_zero' => 0,
9748
+        'hide_alter_empty' => 1,
9749
+        'set_precision' => FALSE,
9750
+        'precision' => 0,
9751
+        'decimal' => '.',
9752
+        'separator' => ',',
9753
+        'format_plural' => 0,
9754
+        'format_plural_singular' => '1',
9755
+        'format_plural_plural' => '@count',
9756
+        'prefix' => '',
9757
+        'suffix' => '',
9758
+        'exclude' => 0,
9759
+        'id' => 'peak_disk_usage',
9760
+        'table' => 'result',
9761
+        'field' => 'peak_disk_usage',
9762
+        'relationship' => 'none',
9763 9763
     ),
9764 9764
     'validate_state' => array(
9765
-      'label' => 'Validation state',
9766
-      'alter' => array(
9765
+        'label' => 'Validation state',
9766
+        'alter' => array(
9767 9767
         'alter_text' => 0,
9768 9768
         'text' => '',
9769 9769
         'make_link' => 0,
@@ -9782,29 +9782,29 @@  discard block
 block discarded – undo
9782 9782
         'ellipsis' => 1,
9783 9783
         'html' => 0,
9784 9784
         'strip_tags' => 0,
9785
-      ),
9786
-      'empty' => '',
9787
-      'hide_empty' => 0,
9788
-      'empty_zero' => 0,
9789
-      'hide_alter_empty' => 1,
9790
-      'set_precision' => FALSE,
9791
-      'precision' => 0,
9792
-      'decimal' => '.',
9793
-      'separator' => '',
9794
-      'format_plural' => 0,
9795
-      'format_plural_singular' => '1',
9796
-      'format_plural_plural' => '@count',
9797
-      'prefix' => '',
9798
-      'suffix' => '',
9799
-      'exclude' => 1,
9800
-      'id' => 'validate_state',
9801
-      'table' => 'result',
9802
-      'field' => 'validate_state',
9803
-      'relationship' => 'none',
9785
+        ),
9786
+        'empty' => '',
9787
+        'hide_empty' => 0,
9788
+        'empty_zero' => 0,
9789
+        'hide_alter_empty' => 1,
9790
+        'set_precision' => FALSE,
9791
+        'precision' => 0,
9792
+        'decimal' => '.',
9793
+        'separator' => '',
9794
+        'format_plural' => 0,
9795
+        'format_plural_singular' => '1',
9796
+        'format_plural_plural' => '@count',
9797
+        'prefix' => '',
9798
+        'suffix' => '',
9799
+        'exclude' => 1,
9800
+        'id' => 'validate_state',
9801
+        'table' => 'result',
9802
+        'field' => 'validate_state',
9803
+        'relationship' => 'none',
9804 9804
     ),
9805 9805
     'phpcode_7' => array(
9806
-      'label' => 'Validation state',
9807
-      'alter' => array(
9806
+        'label' => 'Validation state',
9807
+        'alter' => array(
9808 9808
         'alter_text' => 0,
9809 9809
         'text' => '',
9810 9810
         'make_link' => 0,
@@ -9823,26 +9823,26 @@  discard block
 block discarded – undo
9823 9823
         'ellipsis' => 1,
9824 9824
         'html' => 0,
9825 9825
         'strip_tags' => 0,
9826
-      ),
9827
-      'empty' => '',
9828
-      'hide_empty' => 0,
9829
-      'empty_zero' => 0,
9830
-      'hide_alter_empty' => 1,
9831
-      'value' => '<?php
9826
+        ),
9827
+        'empty' => '',
9828
+        'hide_empty' => 0,
9829
+        'empty_zero' => 0,
9830
+        'hide_alter_empty' => 1,
9831
+        'value' => '<?php
9832 9832
   require_boinc(array(\'result\', \'util\'));
9833 9833
   $result = new stdClass();
9834 9834
   $result->validate_state = $data->result_validate_state;
9835 9835
   return validate_state_str($result);
9836 9836
 ?>',
9837
-      'exclude' => 0,
9838
-      'id' => 'phpcode_7',
9839
-      'table' => 'customfield',
9840
-      'field' => 'phpcode',
9841
-      'relationship' => 'none',
9837
+        'exclude' => 0,
9838
+        'id' => 'phpcode_7',
9839
+        'table' => 'customfield',
9840
+        'field' => 'phpcode',
9841
+        'relationship' => 'none',
9842 9842
     ),
9843 9843
     'granted_credit' => array(
9844
-      'label' => 'Granted credit',
9845
-      'alter' => array(
9844
+        'label' => 'Granted credit',
9845
+        'alter' => array(
9846 9846
         'alter_text' => 0,
9847 9847
         'text' => '',
9848 9848
         'make_link' => 0,
@@ -9861,29 +9861,29 @@  discard block
 block discarded – undo
9861 9861
         'ellipsis' => 1,
9862 9862
         'html' => 0,
9863 9863
         'strip_tags' => 0,
9864
-      ),
9865
-      'empty' => '',
9866
-      'hide_empty' => 0,
9867
-      'empty_zero' => 0,
9868
-      'hide_alter_empty' => 0,
9869
-      'set_precision' => 1,
9870
-      'precision' => '0',
9871
-      'decimal' => '.',
9872
-      'separator' => ',',
9873
-      'format_plural' => 0,
9874
-      'format_plural_singular' => '1',
9875
-      'format_plural_plural' => '@count',
9876
-      'prefix' => '',
9877
-      'suffix' => '',
9878
-      'exclude' => 0,
9879
-      'id' => 'granted_credit',
9880
-      'table' => 'result',
9881
-      'field' => 'granted_credit',
9882
-      'relationship' => 'none',
9864
+        ),
9865
+        'empty' => '',
9866
+        'hide_empty' => 0,
9867
+        'empty_zero' => 0,
9868
+        'hide_alter_empty' => 0,
9869
+        'set_precision' => 1,
9870
+        'precision' => '0',
9871
+        'decimal' => '.',
9872
+        'separator' => ',',
9873
+        'format_plural' => 0,
9874
+        'format_plural_singular' => '1',
9875
+        'format_plural_plural' => '@count',
9876
+        'prefix' => '',
9877
+        'suffix' => '',
9878
+        'exclude' => 0,
9879
+        'id' => 'granted_credit',
9880
+        'table' => 'result',
9881
+        'field' => 'granted_credit',
9882
+        'relationship' => 'none',
9883 9883
     ),
9884 9884
     'appid' => array(
9885
-      'label' => 'Application ID',
9886
-      'alter' => array(
9885
+        'label' => 'Application ID',
9886
+        'alter' => array(
9887 9887
         'alter_text' => 0,
9888 9888
         'text' => '',
9889 9889
         'make_link' => 0,
@@ -9902,29 +9902,29 @@  discard block
 block discarded – undo
9902 9902
         'ellipsis' => 1,
9903 9903
         'html' => 0,
9904 9904
         'strip_tags' => 0,
9905
-      ),
9906
-      'empty' => '',
9907
-      'hide_empty' => 0,
9908
-      'empty_zero' => 0,
9909
-      'hide_alter_empty' => 1,
9910
-      'set_precision' => FALSE,
9911
-      'precision' => 0,
9912
-      'decimal' => '.',
9913
-      'separator' => ',',
9914
-      'format_plural' => 0,
9915
-      'format_plural_singular' => '1',
9916
-      'format_plural_plural' => '@count',
9917
-      'prefix' => '',
9918
-      'suffix' => '',
9919
-      'exclude' => 1,
9920
-      'id' => 'appid',
9921
-      'table' => 'result',
9922
-      'field' => 'appid',
9923
-      'relationship' => 'none',
9905
+        ),
9906
+        'empty' => '',
9907
+        'hide_empty' => 0,
9908
+        'empty_zero' => 0,
9909
+        'hide_alter_empty' => 1,
9910
+        'set_precision' => FALSE,
9911
+        'precision' => 0,
9912
+        'decimal' => '.',
9913
+        'separator' => ',',
9914
+        'format_plural' => 0,
9915
+        'format_plural_singular' => '1',
9916
+        'format_plural_plural' => '@count',
9917
+        'prefix' => '',
9918
+        'suffix' => '',
9919
+        'exclude' => 1,
9920
+        'id' => 'appid',
9921
+        'table' => 'result',
9922
+        'field' => 'appid',
9923
+        'relationship' => 'none',
9924 9924
     ),
9925 9925
     'app_version_id' => array(
9926
-      'label' => 'Application version',
9927
-      'alter' => array(
9926
+        'label' => 'Application version',
9927
+        'alter' => array(
9928 9928
         'alter_text' => 0,
9929 9929
         'text' => '',
9930 9930
         'make_link' => 0,
@@ -9943,29 +9943,29 @@  discard block
 block discarded – undo
9943 9943
         'ellipsis' => 1,
9944 9944
         'html' => 0,
9945 9945
         'strip_tags' => 0,
9946
-      ),
9947
-      'empty' => '',
9948
-      'hide_empty' => 0,
9949
-      'empty_zero' => 0,
9950
-      'hide_alter_empty' => 1,
9951
-      'set_precision' => FALSE,
9952
-      'precision' => 0,
9953
-      'decimal' => '.',
9954
-      'separator' => '',
9955
-      'format_plural' => 0,
9956
-      'format_plural_singular' => '1',
9957
-      'format_plural_plural' => '@count',
9958
-      'prefix' => '',
9959
-      'suffix' => '',
9960
-      'exclude' => 1,
9961
-      'id' => 'app_version_id',
9962
-      'table' => 'result',
9963
-      'field' => 'app_version_id',
9964
-      'relationship' => 'none',
9946
+        ),
9947
+        'empty' => '',
9948
+        'hide_empty' => 0,
9949
+        'empty_zero' => 0,
9950
+        'hide_alter_empty' => 1,
9951
+        'set_precision' => FALSE,
9952
+        'precision' => 0,
9953
+        'decimal' => '.',
9954
+        'separator' => '',
9955
+        'format_plural' => 0,
9956
+        'format_plural_singular' => '1',
9957
+        'format_plural_plural' => '@count',
9958
+        'prefix' => '',
9959
+        'suffix' => '',
9960
+        'exclude' => 1,
9961
+        'id' => 'app_version_id',
9962
+        'table' => 'result',
9963
+        'field' => 'app_version_id',
9964
+        'relationship' => 'none',
9965 9965
     ),
9966 9966
     'phpcode_2' => array(
9967
-      'label' => 'Application',
9968
-      'alter' => array(
9967
+        'label' => 'Application',
9968
+        'alter' => array(
9969 9969
         'alter_text' => 0,
9970 9970
         'text' => '',
9971 9971
         'make_link' => 0,
@@ -9984,30 +9984,30 @@  discard block
 block discarded – undo
9984 9984
         'ellipsis' => 1,
9985 9985
         'html' => 0,
9986 9986
         'strip_tags' => 0,
9987
-      ),
9988
-      'empty' => '',
9989
-      'hide_empty' => 0,
9990
-      'empty_zero' => 0,
9991
-      'hide_alter_empty' => 1,
9992
-      'value' => '<?php
9987
+        ),
9988
+        'empty' => '',
9989
+        'hide_empty' => 0,
9990
+        'empty_zero' => 0,
9991
+        'hide_alter_empty' => 1,
9992
+        'value' => '<?php
9993 9993
   require_boinc(array(\'result\', \'util\'));
9994 9994
   $result = new stdClass();
9995 9995
   $result->appid = $data->result_appid;
9996 9996
   $result->app_version_id = $data->result_app_version_id;
9997 9997
   return app_version_string($result);
9998 9998
 ?>',
9999
-      'exclude' => 0,
10000
-      'id' => 'phpcode_2',
10001
-      'table' => 'customfield',
10002
-      'field' => 'phpcode',
10003
-      'override' => array(
9999
+        'exclude' => 0,
10000
+        'id' => 'phpcode_2',
10001
+        'table' => 'customfield',
10002
+        'field' => 'phpcode',
10003
+        'override' => array(
10004 10004
         'button' => 'Override',
10005
-      ),
10006
-      'relationship' => 'none',
10005
+        ),
10006
+        'relationship' => 'none',
10007 10007
     ),
10008 10008
     'stderr_out' => array(
10009
-      'label' => 'Stderr output',
10010
-      'alter' => array(
10009
+        'label' => 'Stderr output',
10010
+        'alter' => array(
10011 10011
         'alter_text' => 0,
10012 10012
         'text' => '<pre>[stderr_out]</pre>',
10013 10013
         'make_link' => 0,
@@ -10024,47 +10024,47 @@  discard block
 block discarded – undo
10024 10024
         'ellipsis' => 1,
10025 10025
         'html' => 0,
10026 10026
         'strip_tags' => 0,
10027
-      ),
10028
-      'empty' => '',
10029
-      'hide_empty' => 0,
10030
-      'empty_zero' => 0,
10031
-      'exclude' => 1,
10032
-      'id' => 'stderr_out',
10033
-      'table' => 'result',
10034
-      'field' => 'stderr_out',
10035
-      'override' => array(
10027
+        ),
10028
+        'empty' => '',
10029
+        'hide_empty' => 0,
10030
+        'empty_zero' => 0,
10031
+        'exclude' => 1,
10032
+        'id' => 'stderr_out',
10033
+        'table' => 'result',
10034
+        'field' => 'stderr_out',
10035
+        'override' => array(
10036 10036
         'button' => 'Override',
10037
-      ),
10038
-      'relationship' => 'none',
10037
+        ),
10038
+        'relationship' => 'none',
10039 10039
     ),
10040
-  ));
10041
-  $handler->override_option('arguments', array(
10040
+    ));
10041
+    $handler->override_option('arguments', array(
10042 10042
     'id' => array(
10043
-      'default_action' => 'not found',
10044
-      'style_plugin' => 'default_summary',
10045
-      'style_options' => array(),
10046
-      'wildcard' => 'all',
10047
-      'wildcard_substitution' => 'All',
10048
-      'title' => 'Task %1',
10049
-      'breadcrumb' => '',
10050
-      'default_argument_type' => 'fixed',
10051
-      'default_argument' => '',
10052
-      'validate_type' => 'numeric',
10053
-      'validate_fail' => 'not found',
10054
-      'id' => 'id',
10055
-      'table' => 'result',
10056
-      'field' => 'id',
10057
-      'validate_user_argument_type' => 'uid',
10058
-      'validate_user_roles' => array(
10043
+        'default_action' => 'not found',
10044
+        'style_plugin' => 'default_summary',
10045
+        'style_options' => array(),
10046
+        'wildcard' => 'all',
10047
+        'wildcard_substitution' => 'All',
10048
+        'title' => 'Task %1',
10049
+        'breadcrumb' => '',
10050
+        'default_argument_type' => 'fixed',
10051
+        'default_argument' => '',
10052
+        'validate_type' => 'numeric',
10053
+        'validate_fail' => 'not found',
10054
+        'id' => 'id',
10055
+        'table' => 'result',
10056
+        'field' => 'id',
10057
+        'validate_user_argument_type' => 'uid',
10058
+        'validate_user_roles' => array(
10059 10059
         2 => 0,
10060 10060
         3 => 0,
10061
-      ),
10062
-      'relationship' => 'none',
10063
-      'default_options_div_prefix' => '',
10064
-      'default_argument_fixed' => '',
10065
-      'default_argument_user' => 0,
10066
-      'default_argument_php' => '',
10067
-      'validate_argument_node_type' => array(
10061
+        ),
10062
+        'relationship' => 'none',
10063
+        'default_options_div_prefix' => '',
10064
+        'default_argument_fixed' => '',
10065
+        'default_argument_user' => 0,
10066
+        'default_argument_php' => '',
10067
+        'validate_argument_node_type' => array(
10068 10068
         'forum' => 0,
10069 10069
         'job_post' => 0,
10070 10070
         'news' => 0,
@@ -10072,69 +10072,69 @@  discard block
 block discarded – undo
10072 10072
         'profile' => 0,
10073 10073
         'story' => 0,
10074 10074
         'team' => 0,
10075
-      ),
10076
-      'validate_argument_node_access' => 0,
10077
-      'validate_argument_nid_type' => 'nid',
10078
-      'validate_argument_vocabulary' => array(
10075
+        ),
10076
+        'validate_argument_node_access' => 0,
10077
+        'validate_argument_nid_type' => 'nid',
10078
+        'validate_argument_vocabulary' => array(
10079 10079
         1 => 0,
10080
-      ),
10081
-      'validate_argument_type' => 'tid',
10082
-      'validate_argument_transform' => 0,
10083
-      'validate_user_restrict_roles' => 0,
10084
-      'validate_argument_php' => '',
10085
-    ),
10086
-  ));
10087
-  $handler->override_option('access', array(
10080
+        ),
10081
+        'validate_argument_type' => 'tid',
10082
+        'validate_argument_transform' => 0,
10083
+        'validate_user_restrict_roles' => 0,
10084
+        'validate_argument_php' => '',
10085
+    ),
10086
+    ));
10087
+    $handler->override_option('access', array(
10088 10088
     'type' => 'none',
10089
-  ));
10090
-  $handler->override_option('cache', array(
10089
+    ));
10090
+    $handler->override_option('cache', array(
10091 10091
     'type' => 'none',
10092
-  ));
10093
-  $handler->override_option('footer_format', '1');
10094
-  $handler->override_option('footer_empty', 0);
10095
-  $handler->override_option('items_per_page', 0);
10096
-  $handler = $view->new_display('page', 'Page', 'page_1');
10097
-  $handler->override_option('items_per_page', 20);
10098
-  $handler->override_option('use_pager', '1');
10099
-  $handler->override_option('style_plugin', 'grid');
10100
-  $handler->override_option('style_options', array(
10092
+    ));
10093
+    $handler->override_option('footer_format', '1');
10094
+    $handler->override_option('footer_empty', 0);
10095
+    $handler->override_option('items_per_page', 0);
10096
+    $handler = $view->new_display('page', 'Page', 'page_1');
10097
+    $handler->override_option('items_per_page', 20);
10098
+    $handler->override_option('use_pager', '1');
10099
+    $handler->override_option('style_plugin', 'grid');
10100
+    $handler->override_option('style_options', array(
10101 10101
     'grouping' => '',
10102 10102
     'columns' => '2',
10103 10103
     'alignment' => 'vertical',
10104 10104
     'fill_single_line' => 1,
10105
-  ));
10106
-  $handler->override_option('path', 'task');
10107
-  $handler->override_option('menu', array(
10105
+    ));
10106
+    $handler->override_option('path', 'task');
10107
+    $handler->override_option('menu', array(
10108 10108
     'type' => 'none',
10109 10109
     'title' => 'All tasks',
10110 10110
     'description' => 'Show all tasks associated with the account',
10111 10111
     'weight' => '0',
10112 10112
     'name' => 'navigation',
10113
-  ));
10114
-  $handler->override_option('tab_options', array(
10113
+    ));
10114
+    $handler->override_option('tab_options', array(
10115 10115
     'type' => 'normal',
10116 10116
     'title' => 'Tasks',
10117 10117
     'description' => 'Show all tasks',
10118 10118
     'weight' => '0',
10119 10119
     'name' => 'secondary-links',
10120
-  ));
10120
+    ));
10121 10121
 
10122
-  $views[$view->name] = $view;
10122
+    $views[$view->name] = $view;
10123 10123
 
10124
-  // Exported view: boinc_users
10125
-  $view = new view;
10126
-  $view->name = 'boinc_users';
10127
-  $view->description = 'User lists and statistics';
10128
-  $view->tag = '';
10129
-  $view->base_table = 'user';
10130
-  $view->core = 6;
10131
-  $view->api_version = '2';
10132
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10133
-  $handler = $view->new_display('default', 'Defaults', 'default');
10134
-  $handler->override_option('fields', array(
10124
+    // Exported view: boinc_users
10125
+    $view = new view;
10126
+    $view->name = 'boinc_users';
10127
+    $view->description = 'User lists and statistics';
10128
+    $view->tag = '';
10129
+    $view->base_table = 'user';
10130
+    $view->core = 6;
10131
+    $view->api_version = '2';
10132
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10133
+    $handler = $view->new_display('default', 'Defaults', 'default');
10134
+    $handler->override_option('fields', array(
10135 10135
     'rownumber' => array(
10136
-      'label' => 'Rank',
10137
-      'alter' => array(
10136
+        'label' => 'Rank',
10137
+        'alter' => array(
10138 10138
         'alter_text' => 0,
10139 10139
         'text' => '',
10140 10140
         'make_link' => 0,
@@ -10153,20 +10153,20 @@  discard block
 block discarded – undo
10153 10153
         'ellipsis' => 1,
10154 10154
         'html' => 0,
10155 10155
         'strip_tags' => 0,
10156
-      ),
10157
-      'empty' => '',
10158
-      'hide_empty' => 0,
10159
-      'empty_zero' => 0,
10160
-      'hide_alter_empty' => 1,
10161
-      'exclude' => 0,
10162
-      'id' => 'rownumber',
10163
-      'table' => 'customfield',
10164
-      'field' => 'rownumber',
10165
-      'relationship' => 'none',
10156
+        ),
10157
+        'empty' => '',
10158
+        'hide_empty' => 0,
10159
+        'empty_zero' => 0,
10160
+        'hide_alter_empty' => 1,
10161
+        'exclude' => 0,
10162
+        'id' => 'rownumber',
10163
+        'table' => 'customfield',
10164
+        'field' => 'rownumber',
10165
+        'relationship' => 'none',
10166 10166
     ),
10167 10167
     'id' => array(
10168
-      'label' => 'Id',
10169
-      'alter' => array(
10168
+        'label' => 'Id',
10169
+        'alter' => array(
10170 10170
         'alter_text' => 0,
10171 10171
         'text' => '',
10172 10172
         'make_link' => 0,
@@ -10185,29 +10185,29 @@  discard block
 block discarded – undo
10185 10185
         'ellipsis' => 1,
10186 10186
         'html' => 0,
10187 10187
         'strip_tags' => 0,
10188
-      ),
10189
-      'empty' => '',
10190
-      'hide_empty' => 0,
10191
-      'empty_zero' => 0,
10192
-      'hide_alter_empty' => 1,
10193
-      'set_precision' => FALSE,
10194
-      'precision' => 0,
10195
-      'decimal' => '.',
10196
-      'separator' => '',
10197
-      'format_plural' => 0,
10198
-      'format_plural_singular' => '1',
10199
-      'format_plural_plural' => '@count',
10200
-      'prefix' => '',
10201
-      'suffix' => '',
10202
-      'exclude' => 1,
10203
-      'id' => 'id',
10204
-      'table' => 'user',
10205
-      'field' => 'id',
10206
-      'relationship' => 'none',
10188
+        ),
10189
+        'empty' => '',
10190
+        'hide_empty' => 0,
10191
+        'empty_zero' => 0,
10192
+        'hide_alter_empty' => 1,
10193
+        'set_precision' => FALSE,
10194
+        'precision' => 0,
10195
+        'decimal' => '.',
10196
+        'separator' => '',
10197
+        'format_plural' => 0,
10198
+        'format_plural_singular' => '1',
10199
+        'format_plural_plural' => '@count',
10200
+        'prefix' => '',
10201
+        'suffix' => '',
10202
+        'exclude' => 1,
10203
+        'id' => 'id',
10204
+        'table' => 'user',
10205
+        'field' => 'id',
10206
+        'relationship' => 'none',
10207 10207
     ),
10208 10208
     'name' => array(
10209
-      'label' => 'Name',
10210
-      'alter' => array(
10209
+        'label' => 'Name',
10210
+        'alter' => array(
10211 10211
         'alter_text' => 0,
10212 10212
         'text' => '',
10213 10213
         'make_link' => 0,
@@ -10226,20 +10226,20 @@  discard block
 block discarded – undo
10226 10226
         'ellipsis' => 1,
10227 10227
         'html' => 0,
10228 10228
         'strip_tags' => 0,
10229
-      ),
10230
-      'empty' => '',
10231
-      'hide_empty' => 0,
10232
-      'empty_zero' => 0,
10233
-      'hide_alter_empty' => 1,
10234
-      'exclude' => 1,
10235
-      'id' => 'name',
10236
-      'table' => 'user',
10237
-      'field' => 'name',
10238
-      'relationship' => 'none',
10229
+        ),
10230
+        'empty' => '',
10231
+        'hide_empty' => 0,
10232
+        'empty_zero' => 0,
10233
+        'hide_alter_empty' => 1,
10234
+        'exclude' => 1,
10235
+        'id' => 'name',
10236
+        'table' => 'user',
10237
+        'field' => 'name',
10238
+        'relationship' => 'none',
10239 10239
     ),
10240 10240
     'phpcode' => array(
10241
-      'label' => 'Name',
10242
-      'alter' => array(
10241
+        'label' => 'Name',
10242
+        'alter' => array(
10243 10243
         'alter_text' => 0,
10244 10244
         'text' => '',
10245 10245
         'make_link' => 0,
@@ -10258,12 +10258,12 @@  discard block
 block discarded – undo
10258 10258
         'ellipsis' => 1,
10259 10259
         'html' => 0,
10260 10260
         'strip_tags' => 0,
10261
-      ),
10262
-      'empty' => '',
10263
-      'hide_empty' => 0,
10264
-      'empty_zero' => 0,
10265
-      'hide_alter_empty' => 1,
10266
-      'value' => '<?php
10261
+        ),
10262
+        'empty' => '',
10263
+        'hide_empty' => 0,
10264
+        'empty_zero' => 0,
10265
+        'hide_alter_empty' => 1,
10266
+        'value' => '<?php
10267 10267
   $uid = boincuser_lookup_uid($data->id);
10268 10268
   if ($uid) {
10269 10269
     $account = user_load($uid);
@@ -10274,15 +10274,15 @@  discard block
 block discarded – undo
10274 10274
     print $data->user_name;
10275 10275
   }
10276 10276
 ?>',
10277
-      'exclude' => 0,
10278
-      'id' => 'phpcode',
10279
-      'table' => 'customfield',
10280
-      'field' => 'phpcode',
10281
-      'relationship' => 'none',
10277
+        'exclude' => 0,
10278
+        'id' => 'phpcode',
10279
+        'table' => 'customfield',
10280
+        'field' => 'phpcode',
10281
+        'relationship' => 'none',
10282 10282
     ),
10283 10283
     'expavg_credit' => array(
10284
-      'label' => 'Recent average credit',
10285
-      'alter' => array(
10284
+        'label' => 'Recent average credit',
10285
+        'alter' => array(
10286 10286
         'alter_text' => 0,
10287 10287
         'text' => '',
10288 10288
         'make_link' => 0,
@@ -10301,29 +10301,29 @@  discard block
 block discarded – undo
10301 10301
         'ellipsis' => 1,
10302 10302
         'html' => 0,
10303 10303
         'strip_tags' => 0,
10304
-      ),
10305
-      'empty' => '0',
10306
-      'hide_empty' => 0,
10307
-      'empty_zero' => 0,
10308
-      'hide_alter_empty' => 0,
10309
-      'set_precision' => 1,
10310
-      'precision' => '2',
10311
-      'decimal' => '.',
10312
-      'separator' => ',',
10313
-      'format_plural' => 0,
10314
-      'format_plural_singular' => '1',
10315
-      'format_plural_plural' => '@count',
10316
-      'prefix' => '',
10317
-      'suffix' => '',
10318
-      'exclude' => 0,
10319
-      'id' => 'expavg_credit',
10320
-      'table' => 'user',
10321
-      'field' => 'expavg_credit',
10322
-      'relationship' => 'none',
10304
+        ),
10305
+        'empty' => '0',
10306
+        'hide_empty' => 0,
10307
+        'empty_zero' => 0,
10308
+        'hide_alter_empty' => 0,
10309
+        'set_precision' => 1,
10310
+        'precision' => '2',
10311
+        'decimal' => '.',
10312
+        'separator' => ',',
10313
+        'format_plural' => 0,
10314
+        'format_plural_singular' => '1',
10315
+        'format_plural_plural' => '@count',
10316
+        'prefix' => '',
10317
+        'suffix' => '',
10318
+        'exclude' => 0,
10319
+        'id' => 'expavg_credit',
10320
+        'table' => 'user',
10321
+        'field' => 'expavg_credit',
10322
+        'relationship' => 'none',
10323 10323
     ),
10324 10324
     'total_credit' => array(
10325
-      'label' => 'Total Credit',
10326
-      'alter' => array(
10325
+        'label' => 'Total Credit',
10326
+        'alter' => array(
10327 10327
         'alter_text' => 0,
10328 10328
         'text' => '',
10329 10329
         'make_link' => 0,
@@ -10342,29 +10342,29 @@  discard block
 block discarded – undo
10342 10342
         'ellipsis' => 1,
10343 10343
         'html' => 0,
10344 10344
         'strip_tags' => 0,
10345
-      ),
10346
-      'empty' => '0',
10347
-      'hide_empty' => 0,
10348
-      'empty_zero' => 0,
10349
-      'hide_alter_empty' => 0,
10350
-      'set_precision' => 1,
10351
-      'precision' => '0',
10352
-      'decimal' => '.',
10353
-      'separator' => ',',
10354
-      'format_plural' => 0,
10355
-      'format_plural_singular' => '1',
10356
-      'format_plural_plural' => '@count',
10357
-      'prefix' => '',
10358
-      'suffix' => '',
10359
-      'exclude' => 0,
10360
-      'id' => 'total_credit',
10361
-      'table' => 'user',
10362
-      'field' => 'total_credit',
10363
-      'relationship' => 'none',
10345
+        ),
10346
+        'empty' => '0',
10347
+        'hide_empty' => 0,
10348
+        'empty_zero' => 0,
10349
+        'hide_alter_empty' => 0,
10350
+        'set_precision' => 1,
10351
+        'precision' => '0',
10352
+        'decimal' => '.',
10353
+        'separator' => ',',
10354
+        'format_plural' => 0,
10355
+        'format_plural_singular' => '1',
10356
+        'format_plural_plural' => '@count',
10357
+        'prefix' => '',
10358
+        'suffix' => '',
10359
+        'exclude' => 0,
10360
+        'id' => 'total_credit',
10361
+        'table' => 'user',
10362
+        'field' => 'total_credit',
10363
+        'relationship' => 'none',
10364 10364
     ),
10365 10365
     'country' => array(
10366
-      'label' => 'Country',
10367
-      'alter' => array(
10366
+        'label' => 'Country',
10367
+        'alter' => array(
10368 10368
         'alter_text' => 0,
10369 10369
         'text' => '',
10370 10370
         'make_link' => 0,
@@ -10383,20 +10383,20 @@  discard block
 block discarded – undo
10383 10383
         'ellipsis' => 1,
10384 10384
         'html' => 0,
10385 10385
         'strip_tags' => 0,
10386
-      ),
10387
-      'empty' => '',
10388
-      'hide_empty' => 0,
10389
-      'empty_zero' => 0,
10390
-      'hide_alter_empty' => 1,
10391
-      'exclude' => 0,
10392
-      'id' => 'country',
10393
-      'table' => 'user',
10394
-      'field' => 'country',
10395
-      'relationship' => 'none',
10386
+        ),
10387
+        'empty' => '',
10388
+        'hide_empty' => 0,
10389
+        'empty_zero' => 0,
10390
+        'hide_alter_empty' => 1,
10391
+        'exclude' => 0,
10392
+        'id' => 'country',
10393
+        'table' => 'user',
10394
+        'field' => 'country',
10395
+        'relationship' => 'none',
10396 10396
     ),
10397 10397
     'create_time' => array(
10398
-      'label' => 'Joined',
10399
-      'alter' => array(
10398
+        'label' => 'Joined',
10399
+        'alter' => array(
10400 10400
         'alter_text' => 0,
10401 10401
         'text' => '',
10402 10402
         'make_link' => 0,
@@ -10415,120 +10415,120 @@  discard block
 block discarded – undo
10415 10415
         'ellipsis' => 1,
10416 10416
         'html' => 0,
10417 10417
         'strip_tags' => 0,
10418
-      ),
10419
-      'empty' => '',
10420
-      'hide_empty' => 0,
10421
-      'empty_zero' => 0,
10422
-      'hide_alter_empty' => 1,
10423
-      'date_format' => 'time ago',
10424
-      'custom_date_format' => '',
10425
-      'exclude' => 0,
10426
-      'id' => 'create_time',
10427
-      'table' => 'user',
10428
-      'field' => 'create_time',
10429
-      'relationship' => 'none',
10418
+        ),
10419
+        'empty' => '',
10420
+        'hide_empty' => 0,
10421
+        'empty_zero' => 0,
10422
+        'hide_alter_empty' => 1,
10423
+        'date_format' => 'time ago',
10424
+        'custom_date_format' => '',
10425
+        'exclude' => 0,
10426
+        'id' => 'create_time',
10427
+        'table' => 'user',
10428
+        'field' => 'create_time',
10429
+        'relationship' => 'none',
10430 10430
     ),
10431
-  ));
10432
-  $handler->override_option('filters', array(
10431
+    ));
10432
+    $handler->override_option('filters', array(
10433 10433
     'total_credit' => array(
10434
-      'operator' => '>=',
10435
-      'value' => array(
10434
+        'operator' => '>=',
10435
+        'value' => array(
10436 10436
         'value' => '1',
10437 10437
         'min' => '',
10438 10438
         'max' => '',
10439
-      ),
10440
-      'group' => '0',
10441
-      'exposed' => FALSE,
10442
-      'expose' => array(
10439
+        ),
10440
+        'group' => '0',
10441
+        'exposed' => FALSE,
10442
+        'expose' => array(
10443 10443
         'operator' => FALSE,
10444 10444
         'label' => '',
10445
-      ),
10446
-      'id' => 'total_credit',
10447
-      'table' => 'user',
10448
-      'field' => 'total_credit',
10449
-      'relationship' => 'none',
10450
-    ),
10451
-  ));
10452
-  $handler->override_option('access', array(
10445
+        ),
10446
+        'id' => 'total_credit',
10447
+        'table' => 'user',
10448
+        'field' => 'total_credit',
10449
+        'relationship' => 'none',
10450
+    ),
10451
+    ));
10452
+    $handler->override_option('access', array(
10453 10453
     'type' => 'none',
10454
-  ));
10455
-  $handler->override_option('cache', array(
10454
+    ));
10455
+    $handler->override_option('cache', array(
10456 10456
     'type' => 'none',
10457
-  ));
10458
-  $handler->override_option('items_per_page', 100);
10459
-  $handler->override_option('use_pager', '0');
10460
-  $handler->override_option('style_plugin', 'table');
10461
-  $handler->override_option('style_options', array(
10457
+    ));
10458
+    $handler->override_option('items_per_page', 100);
10459
+    $handler->override_option('use_pager', '0');
10460
+    $handler->override_option('style_plugin', 'table');
10461
+    $handler->override_option('style_options', array(
10462 10462
     'grouping' => '',
10463 10463
     'override' => 1,
10464 10464
     'sticky' => 1,
10465 10465
     'order' => 'desc',
10466 10466
     'summary' => '',
10467 10467
     'columns' => array(
10468
-      'rownumber' => 'rownumber',
10469
-      'id' => 'id',
10470
-      'name' => 'name',
10471
-      'phpcode' => 'phpcode',
10472
-      'expavg_credit' => 'expavg_credit',
10473
-      'total_credit' => 'total_credit',
10474
-      'country' => 'country',
10475
-      'create_time' => 'create_time',
10468
+        'rownumber' => 'rownumber',
10469
+        'id' => 'id',
10470
+        'name' => 'name',
10471
+        'phpcode' => 'phpcode',
10472
+        'expavg_credit' => 'expavg_credit',
10473
+        'total_credit' => 'total_credit',
10474
+        'country' => 'country',
10475
+        'create_time' => 'create_time',
10476 10476
     ),
10477 10477
     'info' => array(
10478
-      'rownumber' => array(
10478
+        'rownumber' => array(
10479 10479
         'separator' => '',
10480
-      ),
10481
-      'id' => array(
10480
+        ),
10481
+        'id' => array(
10482 10482
         'sortable' => 0,
10483 10483
         'separator' => '',
10484
-      ),
10485
-      'name' => array(
10484
+        ),
10485
+        'name' => array(
10486 10486
         'sortable' => 0,
10487 10487
         'separator' => '',
10488
-      ),
10489
-      'phpcode' => array(
10488
+        ),
10489
+        'phpcode' => array(
10490 10490
         'separator' => '',
10491
-      ),
10492
-      'expavg_credit' => array(
10491
+        ),
10492
+        'expavg_credit' => array(
10493 10493
         'sortable' => 1,
10494 10494
         'separator' => '',
10495
-      ),
10496
-      'total_credit' => array(
10495
+        ),
10496
+        'total_credit' => array(
10497 10497
         'sortable' => 1,
10498 10498
         'separator' => '',
10499
-      ),
10500
-      'country' => array(
10499
+        ),
10500
+        'country' => array(
10501 10501
         'sortable' => 0,
10502 10502
         'separator' => '',
10503
-      ),
10504
-      'create_time' => array(
10503
+        ),
10504
+        'create_time' => array(
10505 10505
         'sortable' => 1,
10506 10506
         'separator' => '',
10507
-      ),
10507
+        ),
10508 10508
     ),
10509 10509
     'default' => 'expavg_credit',
10510
-  ));
10511
-  $handler = $view->new_display('page', 'Top users', 'page_1');
10512
-  $handler->override_option('path', 'community/stats/users');
10513
-  $handler->override_option('menu', array(
10510
+    ));
10511
+    $handler = $view->new_display('page', 'Top users', 'page_1');
10512
+    $handler->override_option('path', 'community/stats/users');
10513
+    $handler->override_option('menu', array(
10514 10514
     'type' => 'tab',
10515 10515
     'title' => 'Top Users',
10516 10516
     'description' => '',
10517 10517
     'weight' => '0',
10518 10518
     'name' => 'primary-links',
10519
-  ));
10520
-  $handler->override_option('tab_options', array(
10519
+    ));
10520
+    $handler->override_option('tab_options', array(
10521 10521
     'type' => 'none',
10522 10522
     'title' => '',
10523 10523
     'description' => '',
10524 10524
     'weight' => 0,
10525 10525
     'name' => 'navigation',
10526
-  ));
10527
-  $handler = $view->new_display('panel_pane', 'Top users pane', 'panel_pane_1');
10528
-  $handler->override_option('fields', array(
10526
+    ));
10527
+    $handler = $view->new_display('panel_pane', 'Top users pane', 'panel_pane_1');
10528
+    $handler->override_option('fields', array(
10529 10529
     'rownumber' => array(
10530
-      'label' => 'Rank',
10531
-      'alter' => array(
10530
+        'label' => 'Rank',
10531
+        'alter' => array(
10532 10532
         'alter_text' => 0,
10533 10533
         'text' => '',
10534 10534
         'make_link' => 0,
@@ -10547,20 +10547,20 @@  discard block
 block discarded – undo
10547 10547
         'ellipsis' => 1,
10548 10548
         'html' => 0,
10549 10549
         'strip_tags' => 0,
10550
-      ),
10551
-      'empty' => '',
10552
-      'hide_empty' => 0,
10553
-      'empty_zero' => 0,
10554
-      'hide_alter_empty' => 1,
10555
-      'exclude' => 0,
10556
-      'id' => 'rownumber',
10557
-      'table' => 'customfield',
10558
-      'field' => 'rownumber',
10559
-      'relationship' => 'none',
10550
+        ),
10551
+        'empty' => '',
10552
+        'hide_empty' => 0,
10553
+        'empty_zero' => 0,
10554
+        'hide_alter_empty' => 1,
10555
+        'exclude' => 0,
10556
+        'id' => 'rownumber',
10557
+        'table' => 'customfield',
10558
+        'field' => 'rownumber',
10559
+        'relationship' => 'none',
10560 10560
     ),
10561 10561
     'id' => array(
10562
-      'label' => 'Id',
10563
-      'alter' => array(
10562
+        'label' => 'Id',
10563
+        'alter' => array(
10564 10564
         'alter_text' => 0,
10565 10565
         'text' => '',
10566 10566
         'make_link' => 0,
@@ -10579,29 +10579,29 @@  discard block
 block discarded – undo
10579 10579
         'ellipsis' => 1,
10580 10580
         'html' => 0,
10581 10581
         'strip_tags' => 0,
10582
-      ),
10583
-      'empty' => '',
10584
-      'hide_empty' => 0,
10585
-      'empty_zero' => 0,
10586
-      'hide_alter_empty' => 1,
10587
-      'set_precision' => FALSE,
10588
-      'precision' => 0,
10589
-      'decimal' => '.',
10590
-      'separator' => '',
10591
-      'format_plural' => 0,
10592
-      'format_plural_singular' => '1',
10593
-      'format_plural_plural' => '@count',
10594
-      'prefix' => '',
10595
-      'suffix' => '',
10596
-      'exclude' => 1,
10597
-      'id' => 'id',
10598
-      'table' => 'user',
10599
-      'field' => 'id',
10600
-      'relationship' => 'none',
10582
+        ),
10583
+        'empty' => '',
10584
+        'hide_empty' => 0,
10585
+        'empty_zero' => 0,
10586
+        'hide_alter_empty' => 1,
10587
+        'set_precision' => FALSE,
10588
+        'precision' => 0,
10589
+        'decimal' => '.',
10590
+        'separator' => '',
10591
+        'format_plural' => 0,
10592
+        'format_plural_singular' => '1',
10593
+        'format_plural_plural' => '@count',
10594
+        'prefix' => '',
10595
+        'suffix' => '',
10596
+        'exclude' => 1,
10597
+        'id' => 'id',
10598
+        'table' => 'user',
10599
+        'field' => 'id',
10600
+        'relationship' => 'none',
10601 10601
     ),
10602 10602
     'name' => array(
10603
-      'label' => 'Name',
10604
-      'alter' => array(
10603
+        'label' => 'Name',
10604
+        'alter' => array(
10605 10605
         'alter_text' => 0,
10606 10606
         'text' => '',
10607 10607
         'make_link' => 0,
@@ -10620,20 +10620,20 @@  discard block
 block discarded – undo
10620 10620
         'ellipsis' => 1,
10621 10621
         'html' => 0,
10622 10622
         'strip_tags' => 0,
10623
-      ),
10624
-      'empty' => '',
10625
-      'hide_empty' => 0,
10626
-      'empty_zero' => 0,
10627
-      'hide_alter_empty' => 1,
10628
-      'exclude' => 1,
10629
-      'id' => 'name',
10630
-      'table' => 'user',
10631
-      'field' => 'name',
10632
-      'relationship' => 'none',
10623
+        ),
10624
+        'empty' => '',
10625
+        'hide_empty' => 0,
10626
+        'empty_zero' => 0,
10627
+        'hide_alter_empty' => 1,
10628
+        'exclude' => 1,
10629
+        'id' => 'name',
10630
+        'table' => 'user',
10631
+        'field' => 'name',
10632
+        'relationship' => 'none',
10633 10633
     ),
10634 10634
     'phpcode' => array(
10635
-      'label' => 'Name',
10636
-      'alter' => array(
10635
+        'label' => 'Name',
10636
+        'alter' => array(
10637 10637
         'alter_text' => 0,
10638 10638
         'text' => '',
10639 10639
         'make_link' => 0,
@@ -10652,12 +10652,12 @@  discard block
 block discarded – undo
10652 10652
         'ellipsis' => 1,
10653 10653
         'html' => 0,
10654 10654
         'strip_tags' => 0,
10655
-      ),
10656
-      'empty' => '',
10657
-      'hide_empty' => 0,
10658
-      'empty_zero' => 0,
10659
-      'hide_alter_empty' => 1,
10660
-      'value' => '<?php
10655
+        ),
10656
+        'empty' => '',
10657
+        'hide_empty' => 0,
10658
+        'empty_zero' => 0,
10659
+        'hide_alter_empty' => 1,
10660
+        'value' => '<?php
10661 10661
   $uid = boincuser_lookup_uid($data->id);
10662 10662
   if ($uid) {
10663 10663
     $account = user_load($uid);
@@ -10668,15 +10668,15 @@  discard block
 block discarded – undo
10668 10668
     print $data->user_name;
10669 10669
   }
10670 10670
 ?>',
10671
-      'exclude' => 0,
10672
-      'id' => 'phpcode',
10673
-      'table' => 'customfield',
10674
-      'field' => 'phpcode',
10675
-      'relationship' => 'none',
10671
+        'exclude' => 0,
10672
+        'id' => 'phpcode',
10673
+        'table' => 'customfield',
10674
+        'field' => 'phpcode',
10675
+        'relationship' => 'none',
10676 10676
     ),
10677 10677
     'country' => array(
10678
-      'label' => 'Country',
10679
-      'alter' => array(
10678
+        'label' => 'Country',
10679
+        'alter' => array(
10680 10680
         'alter_text' => 0,
10681 10681
         'text' => '',
10682 10682
         'make_link' => 0,
@@ -10695,20 +10695,20 @@  discard block
 block discarded – undo
10695 10695
         'ellipsis' => 1,
10696 10696
         'html' => 0,
10697 10697
         'strip_tags' => 0,
10698
-      ),
10699
-      'empty' => '',
10700
-      'hide_empty' => 0,
10701
-      'empty_zero' => 0,
10702
-      'hide_alter_empty' => 1,
10703
-      'exclude' => 0,
10704
-      'id' => 'country',
10705
-      'table' => 'user',
10706
-      'field' => 'country',
10707
-      'relationship' => 'none',
10698
+        ),
10699
+        'empty' => '',
10700
+        'hide_empty' => 0,
10701
+        'empty_zero' => 0,
10702
+        'hide_alter_empty' => 1,
10703
+        'exclude' => 0,
10704
+        'id' => 'country',
10705
+        'table' => 'user',
10706
+        'field' => 'country',
10707
+        'relationship' => 'none',
10708 10708
     ),
10709 10709
     'expavg_credit' => array(
10710
-      'label' => 'Recent average credit',
10711
-      'alter' => array(
10710
+        'label' => 'Recent average credit',
10711
+        'alter' => array(
10712 10712
         'alter_text' => 0,
10713 10713
         'text' => '',
10714 10714
         'make_link' => 0,
@@ -10727,32 +10727,32 @@  discard block
 block discarded – undo
10727 10727
         'ellipsis' => 1,
10728 10728
         'html' => 0,
10729 10729
         'strip_tags' => 0,
10730
-      ),
10731
-      'empty' => '0',
10732
-      'hide_empty' => 0,
10733
-      'empty_zero' => 0,
10734
-      'hide_alter_empty' => 0,
10735
-      'set_precision' => 1,
10736
-      'precision' => '2',
10737
-      'decimal' => '.',
10738
-      'separator' => ',',
10739
-      'format_plural' => 0,
10740
-      'format_plural_singular' => '1',
10741
-      'format_plural_plural' => '@count',
10742
-      'prefix' => '',
10743
-      'suffix' => '',
10744
-      'exclude' => 0,
10745
-      'id' => 'expavg_credit',
10746
-      'table' => 'user',
10747
-      'field' => 'expavg_credit',
10748
-      'relationship' => 'none',
10749
-      'override' => array(
10730
+        ),
10731
+        'empty' => '0',
10732
+        'hide_empty' => 0,
10733
+        'empty_zero' => 0,
10734
+        'hide_alter_empty' => 0,
10735
+        'set_precision' => 1,
10736
+        'precision' => '2',
10737
+        'decimal' => '.',
10738
+        'separator' => ',',
10739
+        'format_plural' => 0,
10740
+        'format_plural_singular' => '1',
10741
+        'format_plural_plural' => '@count',
10742
+        'prefix' => '',
10743
+        'suffix' => '',
10744
+        'exclude' => 0,
10745
+        'id' => 'expavg_credit',
10746
+        'table' => 'user',
10747
+        'field' => 'expavg_credit',
10748
+        'relationship' => 'none',
10749
+        'override' => array(
10750 10750
         'button' => 'Use default',
10751
-      ),
10751
+        ),
10752 10752
     ),
10753 10753
     'total_credit' => array(
10754
-      'label' => 'Total Credit',
10755
-      'alter' => array(
10754
+        'label' => 'Total Credit',
10755
+        'alter' => array(
10756 10756
         'alter_text' => 0,
10757 10757
         'text' => '',
10758 10758
         'make_link' => 0,
@@ -10771,29 +10771,29 @@  discard block
 block discarded – undo
10771 10771
         'ellipsis' => 1,
10772 10772
         'html' => 0,
10773 10773
         'strip_tags' => 0,
10774
-      ),
10775
-      'empty' => '0',
10776
-      'hide_empty' => 0,
10777
-      'empty_zero' => 0,
10778
-      'hide_alter_empty' => 0,
10779
-      'set_precision' => 1,
10780
-      'precision' => '0',
10781
-      'decimal' => '.',
10782
-      'separator' => ',',
10783
-      'format_plural' => 0,
10784
-      'format_plural_singular' => '1',
10785
-      'format_plural_plural' => '@count',
10786
-      'prefix' => '',
10787
-      'suffix' => '',
10788
-      'exclude' => 0,
10789
-      'id' => 'total_credit',
10790
-      'table' => 'user',
10791
-      'field' => 'total_credit',
10792
-      'relationship' => 'none',
10774
+        ),
10775
+        'empty' => '0',
10776
+        'hide_empty' => 0,
10777
+        'empty_zero' => 0,
10778
+        'hide_alter_empty' => 0,
10779
+        'set_precision' => 1,
10780
+        'precision' => '0',
10781
+        'decimal' => '.',
10782
+        'separator' => ',',
10783
+        'format_plural' => 0,
10784
+        'format_plural_singular' => '1',
10785
+        'format_plural_plural' => '@count',
10786
+        'prefix' => '',
10787
+        'suffix' => '',
10788
+        'exclude' => 0,
10789
+        'id' => 'total_credit',
10790
+        'table' => 'user',
10791
+        'field' => 'total_credit',
10792
+        'relationship' => 'none',
10793 10793
     ),
10794 10794
     'create_time' => array(
10795
-      'label' => 'Joined',
10796
-      'alter' => array(
10795
+        'label' => 'Joined',
10796
+        'alter' => array(
10797 10797
         'alter_text' => 0,
10798 10798
         'text' => '',
10799 10799
         'make_link' => 0,
@@ -10812,85 +10812,85 @@  discard block
 block discarded – undo
10812 10812
         'ellipsis' => 1,
10813 10813
         'html' => 0,
10814 10814
         'strip_tags' => 0,
10815
-      ),
10816
-      'empty' => '',
10817
-      'hide_empty' => 0,
10818
-      'empty_zero' => 0,
10819
-      'hide_alter_empty' => 1,
10820
-      'date_format' => 'time ago',
10821
-      'custom_date_format' => '',
10822
-      'exclude' => 1,
10823
-      'id' => 'create_time',
10824
-      'table' => 'user',
10825
-      'field' => 'create_time',
10826
-      'relationship' => 'none',
10827
-      'override' => array(
10815
+        ),
10816
+        'empty' => '',
10817
+        'hide_empty' => 0,
10818
+        'empty_zero' => 0,
10819
+        'hide_alter_empty' => 1,
10820
+        'date_format' => 'time ago',
10821
+        'custom_date_format' => '',
10822
+        'exclude' => 1,
10823
+        'id' => 'create_time',
10824
+        'table' => 'user',
10825
+        'field' => 'create_time',
10826
+        'relationship' => 'none',
10827
+        'override' => array(
10828 10828
         'button' => 'Use default',
10829
-      ),
10830
-    ),
10831
-  ));
10832
-  $handler->override_option('title', 'Top participants');
10833
-  $handler->override_option('items_per_page', 10);
10834
-  $handler->override_option('use_more', 1);
10835
-  $handler->override_option('use_more_always', 0);
10836
-  $handler->override_option('use_more_text', 'view more');
10837
-  $handler->override_option('style_options', array(
10829
+        ),
10830
+    ),
10831
+    ));
10832
+    $handler->override_option('title', 'Top participants');
10833
+    $handler->override_option('items_per_page', 10);
10834
+    $handler->override_option('use_more', 1);
10835
+    $handler->override_option('use_more_always', 0);
10836
+    $handler->override_option('use_more_text', 'view more');
10837
+    $handler->override_option('style_options', array(
10838 10838
     'grouping' => '',
10839 10839
     'override' => 1,
10840 10840
     'sticky' => 0,
10841 10841
     'order' => 'desc',
10842 10842
     'summary' => '',
10843 10843
     'columns' => array(
10844
-      'rownumber' => 'rownumber',
10845
-      'id' => 'id',
10846
-      'name' => 'name',
10847
-      'phpcode' => 'phpcode',
10848
-      'country' => 'country',
10849
-      'expavg_credit' => 'expavg_credit',
10850
-      'total_credit' => 'total_credit',
10851
-      'create_time' => 'create_time',
10844
+        'rownumber' => 'rownumber',
10845
+        'id' => 'id',
10846
+        'name' => 'name',
10847
+        'phpcode' => 'phpcode',
10848
+        'country' => 'country',
10849
+        'expavg_credit' => 'expavg_credit',
10850
+        'total_credit' => 'total_credit',
10851
+        'create_time' => 'create_time',
10852 10852
     ),
10853 10853
     'info' => array(
10854
-      'rownumber' => array(
10854
+        'rownumber' => array(
10855 10855
         'separator' => '',
10856
-      ),
10857
-      'id' => array(
10856
+        ),
10857
+        'id' => array(
10858 10858
         'sortable' => 0,
10859 10859
         'separator' => '',
10860
-      ),
10861
-      'name' => array(
10860
+        ),
10861
+        'name' => array(
10862 10862
         'sortable' => 0,
10863 10863
         'separator' => '',
10864
-      ),
10865
-      'phpcode' => array(
10864
+        ),
10865
+        'phpcode' => array(
10866 10866
         'separator' => '',
10867
-      ),
10868
-      'country' => array(
10867
+        ),
10868
+        'country' => array(
10869 10869
         'sortable' => 0,
10870 10870
         'separator' => '',
10871
-      ),
10872
-      'expavg_credit' => array(
10871
+        ),
10872
+        'expavg_credit' => array(
10873 10873
         'sortable' => 1,
10874 10874
         'separator' => '',
10875
-      ),
10876
-      'total_credit' => array(
10875
+        ),
10876
+        'total_credit' => array(
10877 10877
         'sortable' => 1,
10878 10878
         'separator' => '',
10879
-      ),
10880
-      'create_time' => array(
10879
+        ),
10880
+        'create_time' => array(
10881 10881
         'sortable' => 1,
10882 10882
         'separator' => '',
10883
-      ),
10883
+        ),
10884 10884
     ),
10885 10885
     'default' => 'expavg_credit',
10886
-  ));
10887
-  $handler->override_option('pane_title', '');
10888
-  $handler->override_option('pane_description', '');
10889
-  $handler->override_option('pane_category', array(
10886
+    ));
10887
+    $handler->override_option('pane_title', '');
10888
+    $handler->override_option('pane_description', '');
10889
+    $handler->override_option('pane_category', array(
10890 10890
     'name' => 'View panes',
10891 10891
     'weight' => 0,
10892
-  ));
10893
-  $handler->override_option('allow', array(
10892
+    ));
10893
+    $handler->override_option('allow', array(
10894 10894
     'use_pager' => FALSE,
10895 10895
     'items_per_page' => FALSE,
10896 10896
     'offset' => FALSE,
@@ -10900,37 +10900,37 @@  discard block
 block discarded – undo
10900 10900
     'title_override' => FALSE,
10901 10901
     'exposed_form' => FALSE,
10902 10902
     'fields_override' => FALSE,
10903
-  ));
10904
-  $handler->override_option('argument_input', array());
10905
-  $handler->override_option('link_to_view', 0);
10906
-  $handler->override_option('inherit_panels_path', 0);
10903
+    ));
10904
+    $handler->override_option('argument_input', array());
10905
+    $handler->override_option('link_to_view', 0);
10906
+    $handler->override_option('inherit_panels_path', 0);
10907 10907
 
10908
-  $views[$view->name] = $view;
10908
+    $views[$view->name] = $view;
10909 10909
 
10910
-  // Exported view: boinc_workunit
10911
-  $view = new view;
10912
-  $view->name = 'boinc_workunit';
10913
-  $view->description = 'Details for a specific workunit';
10914
-  $view->tag = '';
10915
-  $view->base_table = 'workunit';
10916
-  $view->core = 0;
10917
-  $view->api_version = '2';
10918
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10919
-  $handler = $view->new_display('default', 'Defaults', 'default');
10920
-  $handler->override_option('relationships', array(
10910
+    // Exported view: boinc_workunit
10911
+    $view = new view;
10912
+    $view->name = 'boinc_workunit';
10913
+    $view->description = 'Details for a specific workunit';
10914
+    $view->tag = '';
10915
+    $view->base_table = 'workunit';
10916
+    $view->core = 0;
10917
+    $view->api_version = '2';
10918
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
10919
+    $handler = $view->new_display('default', 'Defaults', 'default');
10920
+    $handler->override_option('relationships', array(
10921 10921
     'appid' => array(
10922
-      'label' => 'Application',
10923
-      'required' => 1,
10924
-      'id' => 'appid',
10925
-      'table' => 'workunit',
10926
-      'field' => 'appid',
10927
-      'relationship' => 'none',
10928
-    ),
10929
-  ));
10930
-  $handler->override_option('fields', array(
10922
+        'label' => 'Application',
10923
+        'required' => 1,
10924
+        'id' => 'appid',
10925
+        'table' => 'workunit',
10926
+        'field' => 'appid',
10927
+        'relationship' => 'none',
10928
+    ),
10929
+    ));
10930
+    $handler->override_option('fields', array(
10931 10931
     'name' => array(
10932
-      'label' => 'Name',
10933
-      'alter' => array(
10932
+        'label' => 'Name',
10933
+        'alter' => array(
10934 10934
         'alter_text' => 0,
10935 10935
         'text' => '',
10936 10936
         'make_link' => 0,
@@ -10947,19 +10947,19 @@  discard block
 block discarded – undo
10947 10947
         'ellipsis' => 1,
10948 10948
         'html' => 0,
10949 10949
         'strip_tags' => 0,
10950
-      ),
10951
-      'empty' => '',
10952
-      'hide_empty' => 0,
10953
-      'empty_zero' => 0,
10954
-      'exclude' => 0,
10955
-      'id' => 'name',
10956
-      'table' => 'workunit',
10957
-      'field' => 'name',
10958
-      'relationship' => 'none',
10950
+        ),
10951
+        'empty' => '',
10952
+        'hide_empty' => 0,
10953
+        'empty_zero' => 0,
10954
+        'exclude' => 0,
10955
+        'id' => 'name',
10956
+        'table' => 'workunit',
10957
+        'field' => 'name',
10958
+        'relationship' => 'none',
10959 10959
     ),
10960 10960
     'phpcode_8' => array(
10961
-      'label' => 'dont_suppress_pending',
10962
-      'alter' => array(
10961
+        'label' => 'dont_suppress_pending',
10962
+        'alter' => array(
10963 10963
         'alter_text' => 0,
10964 10964
         'text' => '',
10965 10965
         'make_link' => 0,
@@ -10978,25 +10978,25 @@  discard block
 block discarded – undo
10978 10978
         'ellipsis' => 1,
10979 10979
         'html' => 0,
10980 10980
         'strip_tags' => 0,
10981
-      ),
10982
-      'empty' => '',
10983
-      'hide_empty' => 0,
10984
-      'empty_zero' => 0,
10985
-      'hide_alter_empty' => 1,
10986
-      'value' => '<?php
10981
+        ),
10982
+        'empty' => '',
10983
+        'hide_empty' => 0,
10984
+        'empty_zero' => 0,
10985
+        'hide_alter_empty' => 1,
10986
+        'value' => '<?php
10987 10987
   require_boinc(\'util\');
10988 10988
   $dont_suppress_pending = parse_bool(get_config(), "dont_suppress_pending");
10989 10989
   $data->dontsuppresspending = $dont_suppress_pending;
10990 10990
 ?>',
10991
-      'exclude' => 1,
10992
-      'id' => 'phpcode_8',
10993
-      'table' => 'customfield',
10994
-      'field' => 'phpcode',
10995
-      'relationship' => 'none',
10991
+        'exclude' => 1,
10992
+        'id' => 'phpcode_8',
10993
+        'table' => 'customfield',
10994
+        'field' => 'phpcode',
10995
+        'relationship' => 'none',
10996 10996
     ),
10997 10997
     'user_friendly_name' => array(
10998
-      'label' => 'Application',
10999
-      'alter' => array(
10998
+        'label' => 'Application',
10999
+        'alter' => array(
11000 11000
         'alter_text' => 0,
11001 11001
         'text' => '',
11002 11002
         'make_link' => 0,
@@ -11013,19 +11013,19 @@  discard block
 block discarded – undo
11013 11013
         'ellipsis' => 1,
11014 11014
         'html' => 0,
11015 11015
         'strip_tags' => 0,
11016
-      ),
11017
-      'empty' => '',
11018
-      'hide_empty' => 0,
11019
-      'empty_zero' => 0,
11020
-      'exclude' => 0,
11021
-      'id' => 'user_friendly_name',
11022
-      'table' => 'app',
11023
-      'field' => 'user_friendly_name',
11024
-      'relationship' => 'appid',
11016
+        ),
11017
+        'empty' => '',
11018
+        'hide_empty' => 0,
11019
+        'empty_zero' => 0,
11020
+        'exclude' => 0,
11021
+        'id' => 'user_friendly_name',
11022
+        'table' => 'app',
11023
+        'field' => 'user_friendly_name',
11024
+        'relationship' => 'appid',
11025 11025
     ),
11026 11026
     'create_time' => array(
11027
-      'label' => 'Created',
11028
-      'alter' => array(
11027
+        'label' => 'Created',
11028
+        'alter' => array(
11029 11029
         'alter_text' => 0,
11030 11030
         'text' => '',
11031 11031
         'make_link' => 0,
@@ -11044,22 +11044,22 @@  discard block
 block discarded – undo
11044 11044
         'ellipsis' => 1,
11045 11045
         'html' => 0,
11046 11046
         'strip_tags' => 0,
11047
-      ),
11048
-      'empty' => '',
11049
-      'hide_empty' => 0,
11050
-      'empty_zero' => 0,
11051
-      'hide_alter_empty' => 1,
11052
-      'date_format' => 'custom',
11053
-      'custom_date_format' => 'j M Y G:i:s T',
11054
-      'exclude' => 1,
11055
-      'id' => 'create_time',
11056
-      'table' => 'workunit',
11057
-      'field' => 'create_time',
11058
-      'relationship' => 'none',
11047
+        ),
11048
+        'empty' => '',
11049
+        'hide_empty' => 0,
11050
+        'empty_zero' => 0,
11051
+        'hide_alter_empty' => 1,
11052
+        'date_format' => 'custom',
11053
+        'custom_date_format' => 'j M Y G:i:s T',
11054
+        'exclude' => 1,
11055
+        'id' => 'create_time',
11056
+        'table' => 'workunit',
11057
+        'field' => 'create_time',
11058
+        'relationship' => 'none',
11059 11059
     ),
11060 11060
     'phpcode_2' => array(
11061
-      'label' => 'Created',
11062
-      'alter' => array(
11061
+        'label' => 'Created',
11062
+        'alter' => array(
11063 11063
         'alter_text' => 0,
11064 11064
         'text' => '',
11065 11065
         'make_link' => 0,
@@ -11078,23 +11078,23 @@  discard block
 block discarded – undo
11078 11078
         'ellipsis' => 1,
11079 11079
         'html' => 0,
11080 11080
         'strip_tags' => 0,
11081
-      ),
11082
-      'empty' => '',
11083
-      'hide_empty' => 0,
11084
-      'empty_zero' => 0,
11085
-      'hide_alter_empty' => 1,
11086
-      'value' => '<?php
11081
+        ),
11082
+        'empty' => '',
11083
+        'hide_empty' => 0,
11084
+        'empty_zero' => 0,
11085
+        'hide_alter_empty' => 1,
11086
+        'value' => '<?php
11087 11087
 echo date(\'j M Y G:i:s T\', $data->workunit_create_time);
11088 11088
 ?>',
11089
-      'exclude' => 0,
11090
-      'id' => 'phpcode_2',
11091
-      'table' => 'customfield',
11092
-      'field' => 'phpcode',
11093
-      'relationship' => 'none',
11089
+        'exclude' => 0,
11090
+        'id' => 'phpcode_2',
11091
+        'table' => 'customfield',
11092
+        'field' => 'phpcode',
11093
+        'relationship' => 'none',
11094 11094
     ),
11095 11095
     'canonical_resultid' => array(
11096
-      'label' => 'Canonical result',
11097
-      'alter' => array(
11096
+        'label' => 'Canonical result',
11097
+        'alter' => array(
11098 11098
         'alter_text' => 0,
11099 11099
         'text' => '',
11100 11100
         'make_link' => 0,
@@ -11111,25 +11111,25 @@  discard block
 block discarded – undo
11111 11111
         'ellipsis' => 1,
11112 11112
         'html' => 0,
11113 11113
         'strip_tags' => 0,
11114
-      ),
11115
-      'empty' => '',
11116
-      'hide_empty' => 0,
11117
-      'empty_zero' => 0,
11118
-      'set_precision' => FALSE,
11119
-      'precision' => 0,
11120
-      'decimal' => '.',
11121
-      'separator' => '',
11122
-      'prefix' => '',
11123
-      'suffix' => '',
11124
-      'exclude' => 1,
11125
-      'id' => 'canonical_resultid',
11126
-      'table' => 'workunit',
11127
-      'field' => 'canonical_resultid',
11128
-      'relationship' => 'none',
11114
+        ),
11115
+        'empty' => '',
11116
+        'hide_empty' => 0,
11117
+        'empty_zero' => 0,
11118
+        'set_precision' => FALSE,
11119
+        'precision' => 0,
11120
+        'decimal' => '.',
11121
+        'separator' => '',
11122
+        'prefix' => '',
11123
+        'suffix' => '',
11124
+        'exclude' => 1,
11125
+        'id' => 'canonical_resultid',
11126
+        'table' => 'workunit',
11127
+        'field' => 'canonical_resultid',
11128
+        'relationship' => 'none',
11129 11129
     ),
11130 11130
     'canonical_credit' => array(
11131
-      'label' => 'Canonical credit',
11132
-      'alter' => array(
11131
+        'label' => 'Canonical credit',
11132
+        'alter' => array(
11133 11133
         'alter_text' => 0,
11134 11134
         'text' => '',
11135 11135
         'make_link' => 0,
@@ -11146,25 +11146,25 @@  discard block
 block discarded – undo
11146 11146
         'ellipsis' => 1,
11147 11147
         'html' => 0,
11148 11148
         'strip_tags' => 0,
11149
-      ),
11150
-      'empty' => '',
11151
-      'hide_empty' => 0,
11152
-      'empty_zero' => 0,
11153
-      'set_precision' => 0,
11154
-      'precision' => '0',
11155
-      'decimal' => '.',
11156
-      'separator' => ',',
11157
-      'prefix' => '',
11158
-      'suffix' => '',
11159
-      'exclude' => 1,
11160
-      'id' => 'canonical_credit',
11161
-      'table' => 'workunit',
11162
-      'field' => 'canonical_credit',
11163
-      'relationship' => 'none',
11149
+        ),
11150
+        'empty' => '',
11151
+        'hide_empty' => 0,
11152
+        'empty_zero' => 0,
11153
+        'set_precision' => 0,
11154
+        'precision' => '0',
11155
+        'decimal' => '.',
11156
+        'separator' => ',',
11157
+        'prefix' => '',
11158
+        'suffix' => '',
11159
+        'exclude' => 1,
11160
+        'id' => 'canonical_credit',
11161
+        'table' => 'workunit',
11162
+        'field' => 'canonical_credit',
11163
+        'relationship' => 'none',
11164 11164
     ),
11165 11165
     'phpcode' => array(
11166
-      'label' => 'Canonical result',
11167
-      'alter' => array(
11166
+        'label' => 'Canonical result',
11167
+        'alter' => array(
11168 11168
         'alter_text' => 0,
11169 11169
         'text' => '',
11170 11170
         'make_link' => 0,
@@ -11181,24 +11181,24 @@  discard block
 block discarded – undo
11181 11181
         'ellipsis' => 1,
11182 11182
         'html' => 0,
11183 11183
         'strip_tags' => 0,
11184
-      ),
11185
-      'empty' => '',
11186
-      'hide_empty' => 1,
11187
-      'empty_zero' => 0,
11188
-      'value' => '<?php
11184
+        ),
11185
+        'empty' => '',
11186
+        'hide_empty' => 1,
11187
+        'empty_zero' => 0,
11188
+        'value' => '<?php
11189 11189
   if ($data->workunit_canonical_resultid) {
11190 11190
     echo l($data->workunit_canonical_resultid, "task/{$data->workunit_canonical_resultid}");
11191 11191
   }
11192 11192
 ?>',
11193
-      'exclude' => 0,
11194
-      'id' => 'phpcode',
11195
-      'table' => 'customfield',
11196
-      'field' => 'phpcode',
11197
-      'relationship' => 'none',
11193
+        'exclude' => 0,
11194
+        'id' => 'phpcode',
11195
+        'table' => 'customfield',
11196
+        'field' => 'phpcode',
11197
+        'relationship' => 'none',
11198 11198
     ),
11199 11199
     'phpcode_1' => array(
11200
-      'label' => 'Granted credit',
11201
-      'alter' => array(
11200
+        'label' => 'Granted credit',
11201
+        'alter' => array(
11202 11202
         'alter_text' => 0,
11203 11203
         'text' => '',
11204 11204
         'make_link' => 0,
@@ -11215,24 +11215,24 @@  discard block
 block discarded – undo
11215 11215
         'ellipsis' => 1,
11216 11216
         'html' => 0,
11217 11217
         'strip_tags' => 0,
11218
-      ),
11219
-      'empty' => '',
11220
-      'hide_empty' => 1,
11221
-      'empty_zero' => 0,
11222
-      'value' => '<?php
11218
+        ),
11219
+        'empty' => '',
11220
+        'hide_empty' => 1,
11221
+        'empty_zero' => 0,
11222
+        'value' => '<?php
11223 11223
   if ($data->workunit_canonical_resultid) {
11224 11224
     echo $data->workunit_canonical_credit;
11225 11225
   }
11226 11226
 ?>',
11227
-      'exclude' => 0,
11228
-      'id' => 'phpcode_1',
11229
-      'table' => 'customfield',
11230
-      'field' => 'phpcode',
11231
-      'relationship' => 'none',
11227
+        'exclude' => 0,
11228
+        'id' => 'phpcode_1',
11229
+        'table' => 'customfield',
11230
+        'field' => 'phpcode',
11231
+        'relationship' => 'none',
11232 11232
     ),
11233 11233
     'error_mask' => array(
11234
-      'label' => 'Error mask',
11235
-      'alter' => array(
11234
+        'label' => 'Error mask',
11235
+        'alter' => array(
11236 11236
         'alter_text' => 0,
11237 11237
         'text' => '',
11238 11238
         'make_link' => 0,
@@ -11249,25 +11249,25 @@  discard block
 block discarded – undo
11249 11249
         'ellipsis' => 1,
11250 11250
         'html' => 0,
11251 11251
         'strip_tags' => 0,
11252
-      ),
11253
-      'empty' => '',
11254
-      'hide_empty' => 0,
11255
-      'empty_zero' => 0,
11256
-      'set_precision' => FALSE,
11257
-      'precision' => 0,
11258
-      'decimal' => '.',
11259
-      'separator' => '',
11260
-      'prefix' => '',
11261
-      'suffix' => '',
11262
-      'exclude' => 1,
11263
-      'id' => 'error_mask',
11264
-      'table' => 'workunit',
11265
-      'field' => 'error_mask',
11266
-      'relationship' => 'none',
11252
+        ),
11253
+        'empty' => '',
11254
+        'hide_empty' => 0,
11255
+        'empty_zero' => 0,
11256
+        'set_precision' => FALSE,
11257
+        'precision' => 0,
11258
+        'decimal' => '.',
11259
+        'separator' => '',
11260
+        'prefix' => '',
11261
+        'suffix' => '',
11262
+        'exclude' => 1,
11263
+        'id' => 'error_mask',
11264
+        'table' => 'workunit',
11265
+        'field' => 'error_mask',
11266
+        'relationship' => 'none',
11267 11267
     ),
11268 11268
     'target_nresults' => array(
11269
-      'label' => 'Initial replication',
11270
-      'alter' => array(
11269
+        'label' => 'Initial replication',
11270
+        'alter' => array(
11271 11271
         'alter_text' => 0,
11272 11272
         'text' => '',
11273 11273
         'make_link' => 0,
@@ -11284,25 +11284,25 @@  discard block
 block discarded – undo
11284 11284
         'ellipsis' => 1,
11285 11285
         'html' => 0,
11286 11286
         'strip_tags' => 0,
11287
-      ),
11288
-      'empty' => '',
11289
-      'hide_empty' => 0,
11290
-      'empty_zero' => 0,
11291
-      'set_precision' => FALSE,
11292
-      'precision' => 0,
11293
-      'decimal' => '.',
11294
-      'separator' => '',
11295
-      'prefix' => '',
11296
-      'suffix' => '',
11297
-      'exclude' => 1,
11298
-      'id' => 'target_nresults',
11299
-      'table' => 'workunit',
11300
-      'field' => 'target_nresults',
11301
-      'relationship' => 'none',
11287
+        ),
11288
+        'empty' => '',
11289
+        'hide_empty' => 0,
11290
+        'empty_zero' => 0,
11291
+        'set_precision' => FALSE,
11292
+        'precision' => 0,
11293
+        'decimal' => '.',
11294
+        'separator' => '',
11295
+        'prefix' => '',
11296
+        'suffix' => '',
11297
+        'exclude' => 1,
11298
+        'id' => 'target_nresults',
11299
+        'table' => 'workunit',
11300
+        'field' => 'target_nresults',
11301
+        'relationship' => 'none',
11302 11302
     ),
11303 11303
     'max_error_results' => array(
11304
-      'label' => 'Max error tasks',
11305
-      'alter' => array(
11304
+        'label' => 'Max error tasks',
11305
+        'alter' => array(
11306 11306
         'alter_text' => 0,
11307 11307
         'text' => '',
11308 11308
         'make_link' => 0,
@@ -11319,25 +11319,25 @@  discard block
 block discarded – undo
11319 11319
         'ellipsis' => 1,
11320 11320
         'html' => 0,
11321 11321
         'strip_tags' => 0,
11322
-      ),
11323
-      'empty' => '',
11324
-      'hide_empty' => 0,
11325
-      'empty_zero' => 0,
11326
-      'set_precision' => FALSE,
11327
-      'precision' => 0,
11328
-      'decimal' => '.',
11329
-      'separator' => '',
11330
-      'prefix' => '',
11331
-      'suffix' => '',
11332
-      'exclude' => 1,
11333
-      'id' => 'max_error_results',
11334
-      'table' => 'workunit',
11335
-      'field' => 'max_error_results',
11336
-      'relationship' => 'none',
11322
+        ),
11323
+        'empty' => '',
11324
+        'hide_empty' => 0,
11325
+        'empty_zero' => 0,
11326
+        'set_precision' => FALSE,
11327
+        'precision' => 0,
11328
+        'decimal' => '.',
11329
+        'separator' => '',
11330
+        'prefix' => '',
11331
+        'suffix' => '',
11332
+        'exclude' => 1,
11333
+        'id' => 'max_error_results',
11334
+        'table' => 'workunit',
11335
+        'field' => 'max_error_results',
11336
+        'relationship' => 'none',
11337 11337
     ),
11338 11338
     'max_success_results' => array(
11339
-      'label' => 'Max success tasks',
11340
-      'alter' => array(
11339
+        'label' => 'Max success tasks',
11340
+        'alter' => array(
11341 11341
         'alter_text' => 0,
11342 11342
         'text' => '',
11343 11343
         'make_link' => 0,
@@ -11354,25 +11354,25 @@  discard block
 block discarded – undo
11354 11354
         'ellipsis' => 1,
11355 11355
         'html' => 0,
11356 11356
         'strip_tags' => 0,
11357
-      ),
11358
-      'empty' => '',
11359
-      'hide_empty' => 0,
11360
-      'empty_zero' => 0,
11361
-      'set_precision' => FALSE,
11362
-      'precision' => 0,
11363
-      'decimal' => '.',
11364
-      'separator' => '',
11365
-      'prefix' => '',
11366
-      'suffix' => '',
11367
-      'exclude' => 1,
11368
-      'id' => 'max_success_results',
11369
-      'table' => 'workunit',
11370
-      'field' => 'max_success_results',
11371
-      'relationship' => 'none',
11357
+        ),
11358
+        'empty' => '',
11359
+        'hide_empty' => 0,
11360
+        'empty_zero' => 0,
11361
+        'set_precision' => FALSE,
11362
+        'precision' => 0,
11363
+        'decimal' => '.',
11364
+        'separator' => '',
11365
+        'prefix' => '',
11366
+        'suffix' => '',
11367
+        'exclude' => 1,
11368
+        'id' => 'max_success_results',
11369
+        'table' => 'workunit',
11370
+        'field' => 'max_success_results',
11371
+        'relationship' => 'none',
11372 11372
     ),
11373 11373
     'max_total_results' => array(
11374
-      'label' => 'Max total tasks',
11375
-      'alter' => array(
11374
+        'label' => 'Max total tasks',
11375
+        'alter' => array(
11376 11376
         'alter_text' => 0,
11377 11377
         'text' => '',
11378 11378
         'make_link' => 0,
@@ -11389,25 +11389,25 @@  discard block
 block discarded – undo
11389 11389
         'ellipsis' => 1,
11390 11390
         'html' => 0,
11391 11391
         'strip_tags' => 0,
11392
-      ),
11393
-      'empty' => '',
11394
-      'hide_empty' => 0,
11395
-      'empty_zero' => 0,
11396
-      'set_precision' => FALSE,
11397
-      'precision' => 0,
11398
-      'decimal' => '.',
11399
-      'separator' => '',
11400
-      'prefix' => '',
11401
-      'suffix' => '',
11402
-      'exclude' => 1,
11403
-      'id' => 'max_total_results',
11404
-      'table' => 'workunit',
11405
-      'field' => 'max_total_results',
11406
-      'relationship' => 'none',
11392
+        ),
11393
+        'empty' => '',
11394
+        'hide_empty' => 0,
11395
+        'empty_zero' => 0,
11396
+        'set_precision' => FALSE,
11397
+        'precision' => 0,
11398
+        'decimal' => '.',
11399
+        'separator' => '',
11400
+        'prefix' => '',
11401
+        'suffix' => '',
11402
+        'exclude' => 1,
11403
+        'id' => 'max_total_results',
11404
+        'table' => 'workunit',
11405
+        'field' => 'max_total_results',
11406
+        'relationship' => 'none',
11407 11407
     ),
11408 11408
     'min_quorum' => array(
11409
-      'label' => 'Minimum quorum',
11410
-      'alter' => array(
11409
+        'label' => 'Minimum quorum',
11410
+        'alter' => array(
11411 11411
         'alter_text' => 0,
11412 11412
         'text' => '',
11413 11413
         'make_link' => 0,
@@ -11424,25 +11424,25 @@  discard block
 block discarded – undo
11424 11424
         'ellipsis' => 1,
11425 11425
         'html' => 0,
11426 11426
         'strip_tags' => 0,
11427
-      ),
11428
-      'empty' => '',
11429
-      'hide_empty' => 0,
11430
-      'empty_zero' => 0,
11431
-      'set_precision' => FALSE,
11432
-      'precision' => 0,
11433
-      'decimal' => '.',
11434
-      'separator' => '',
11435
-      'prefix' => '',
11436
-      'suffix' => '',
11437
-      'exclude' => 1,
11438
-      'id' => 'min_quorum',
11439
-      'table' => 'workunit',
11440
-      'field' => 'min_quorum',
11441
-      'relationship' => 'none',
11427
+        ),
11428
+        'empty' => '',
11429
+        'hide_empty' => 0,
11430
+        'empty_zero' => 0,
11431
+        'set_precision' => FALSE,
11432
+        'precision' => 0,
11433
+        'decimal' => '.',
11434
+        'separator' => '',
11435
+        'prefix' => '',
11436
+        'suffix' => '',
11437
+        'exclude' => 1,
11438
+        'id' => 'min_quorum',
11439
+        'table' => 'workunit',
11440
+        'field' => 'min_quorum',
11441
+        'relationship' => 'none',
11442 11442
     ),
11443 11443
     'target_nresults_1' => array(
11444
-      'label' => 'Target number of results',
11445
-      'alter' => array(
11444
+        'label' => 'Target number of results',
11445
+        'alter' => array(
11446 11446
         'alter_text' => 0,
11447 11447
         'text' => '',
11448 11448
         'make_link' => 0,
@@ -11459,25 +11459,25 @@  discard block
 block discarded – undo
11459 11459
         'ellipsis' => 1,
11460 11460
         'html' => 0,
11461 11461
         'strip_tags' => 0,
11462
-      ),
11463
-      'empty' => '',
11464
-      'hide_empty' => 0,
11465
-      'empty_zero' => 0,
11466
-      'set_precision' => FALSE,
11467
-      'precision' => 0,
11468
-      'decimal' => '.',
11469
-      'separator' => '',
11470
-      'prefix' => '',
11471
-      'suffix' => '',
11472
-      'exclude' => 1,
11473
-      'id' => 'target_nresults_1',
11474
-      'table' => 'app',
11475
-      'field' => 'target_nresults',
11476
-      'relationship' => 'appid',
11462
+        ),
11463
+        'empty' => '',
11464
+        'hide_empty' => 0,
11465
+        'empty_zero' => 0,
11466
+        'set_precision' => FALSE,
11467
+        'precision' => 0,
11468
+        'decimal' => '.',
11469
+        'separator' => '',
11470
+        'prefix' => '',
11471
+        'suffix' => '',
11472
+        'exclude' => 1,
11473
+        'id' => 'target_nresults_1',
11474
+        'table' => 'app',
11475
+        'field' => 'target_nresults',
11476
+        'relationship' => 'appid',
11477 11477
     ),
11478 11478
     'phpcode_3' => array(
11479
-      'label' => 'Minimum quorum',
11480
-      'alter' => array(
11479
+        'label' => 'Minimum quorum',
11480
+        'alter' => array(
11481 11481
         'alter_text' => 0,
11482 11482
         'text' => '',
11483 11483
         'make_link' => 0,
@@ -11496,25 +11496,25 @@  discard block
 block discarded – undo
11496 11496
         'ellipsis' => 1,
11497 11497
         'html' => 0,
11498 11498
         'strip_tags' => 0,
11499
-      ),
11500
-      'empty' => '',
11501
-      'hide_empty' => 1,
11502
-      'empty_zero' => 0,
11503
-      'hide_alter_empty' => 1,
11504
-      'value' => '<?php
11499
+        ),
11500
+        'empty' => '',
11501
+        'hide_empty' => 1,
11502
+        'empty_zero' => 0,
11503
+        'hide_alter_empty' => 1,
11504
+        'value' => '<?php
11505 11505
   if (!($data->app_workunit_target_nresults>0 AND !$data->workunit_canonical_resultid AND !$data->workunit_error_mask AND !$data->dontsuppresspending)) {
11506 11506
     echo $data->workunit_min_quorum;
11507 11507
   }
11508 11508
 ?>',
11509
-      'exclude' => 0,
11510
-      'id' => 'phpcode_3',
11511
-      'table' => 'customfield',
11512
-      'field' => 'phpcode',
11513
-      'relationship' => 'none',
11509
+        'exclude' => 0,
11510
+        'id' => 'phpcode_3',
11511
+        'table' => 'customfield',
11512
+        'field' => 'phpcode',
11513
+        'relationship' => 'none',
11514 11514
     ),
11515 11515
     'phpcode_4' => array(
11516
-      'label' => 'Initial replication',
11517
-      'alter' => array(
11516
+        'label' => 'Initial replication',
11517
+        'alter' => array(
11518 11518
         'alter_text' => 0,
11519 11519
         'text' => '',
11520 11520
         'make_link' => 0,
@@ -11533,26 +11533,26 @@  discard block
 block discarded – undo
11533 11533
         'ellipsis' => 1,
11534 11534
         'html' => 0,
11535 11535
         'strip_tags' => 0,
11536
-      ),
11537
-      'empty' => '',
11538
-      'hide_empty' => 1,
11539
-      'empty_zero' => 0,
11540
-      'hide_alter_empty' => 1,
11541
-      'value' => '<?php
11536
+        ),
11537
+        'empty' => '',
11538
+        'hide_empty' => 1,
11539
+        'empty_zero' => 0,
11540
+        'hide_alter_empty' => 1,
11541
+        'value' => '<?php
11542 11542
   if (!($data->app_workunit_target_nresults>0 AND !$data->workunit_canonical_resultid AND !$data->workunit_error_mask AND !$data->dontsuppresspending)) {
11543 11543
 
11544 11544
     echo $data->workunit_target_nresults;
11545 11545
   }
11546 11546
 ?>',
11547
-      'exclude' => 0,
11548
-      'id' => 'phpcode_4',
11549
-      'table' => 'customfield',
11550
-      'field' => 'phpcode',
11551
-      'relationship' => 'none',
11547
+        'exclude' => 0,
11548
+        'id' => 'phpcode_4',
11549
+        'table' => 'customfield',
11550
+        'field' => 'phpcode',
11551
+        'relationship' => 'none',
11552 11552
     ),
11553 11553
     'phpcode_5' => array(
11554
-      'label' => 'Max # of error/total/success tasks',
11555
-      'alter' => array(
11554
+        'label' => 'Max # of error/total/success tasks',
11555
+        'alter' => array(
11556 11556
         'alter_text' => 0,
11557 11557
         'text' => '',
11558 11558
         'make_link' => 0,
@@ -11571,25 +11571,25 @@  discard block
 block discarded – undo
11571 11571
         'ellipsis' => 1,
11572 11572
         'html' => 0,
11573 11573
         'strip_tags' => 0,
11574
-      ),
11575
-      'empty' => '',
11576
-      'hide_empty' => 1,
11577
-      'empty_zero' => 0,
11578
-      'hide_alter_empty' => 1,
11579
-      'value' => '<?php
11574
+        ),
11575
+        'empty' => '',
11576
+        'hide_empty' => 1,
11577
+        'empty_zero' => 0,
11578
+        'hide_alter_empty' => 1,
11579
+        'value' => '<?php
11580 11580
   if (!($data->app_workunit_target_nresults>0 AND !$data->workunit_canonical_resultid AND !$data->workunit_error_mask AND !$data->dontsuppresspending)) {
11581 11581
     echo "{$data->workunit_max_error_results}, {$data->workunit_max_total_results}, {$data->workunit_max_success_results}";
11582 11582
   }
11583 11583
 ?>',
11584
-      'exclude' => 0,
11585
-      'id' => 'phpcode_5',
11586
-      'table' => 'customfield',
11587
-      'field' => 'phpcode',
11588
-      'relationship' => 'none',
11584
+        'exclude' => 0,
11585
+        'id' => 'phpcode_5',
11586
+        'table' => 'customfield',
11587
+        'field' => 'phpcode',
11588
+        'relationship' => 'none',
11589 11589
     ),
11590 11590
     'phpcode_6' => array(
11591
-      'label' => 'Errors',
11592
-      'alter' => array(
11591
+        'label' => 'Errors',
11592
+        'alter' => array(
11593 11593
         'alter_text' => 0,
11594 11594
         'text' => '',
11595 11595
         'make_link' => 0,
@@ -11608,12 +11608,12 @@  discard block
 block discarded – undo
11608 11608
         'ellipsis' => 1,
11609 11609
         'html' => 0,
11610 11610
         'strip_tags' => 0,
11611
-      ),
11612
-      'empty' => '',
11613
-      'hide_empty' => 1,
11614
-      'empty_zero' => 0,
11615
-      'hide_alter_empty' => 1,
11616
-      'value' => '<?php
11611
+        ),
11612
+        'empty' => '',
11613
+        'hide_empty' => 1,
11614
+        'empty_zero' => 0,
11615
+        'hide_alter_empty' => 1,
11616
+        'value' => '<?php
11617 11617
   if (!($data->app_workunit_target_nresults>0 AND !$data->workunit_canonical_resultid AND !$data->workunit_error_mask AND !$data->dontsuppresspending)) {
11618 11618
     if ($data->workunit_error_mask) {
11619 11619
       require_boinc(\'result\');
@@ -11621,15 +11621,15 @@  discard block
 block discarded – undo
11621 11621
     }
11622 11622
   }
11623 11623
 ?>',
11624
-      'exclude' => 0,
11625
-      'id' => 'phpcode_6',
11626
-      'table' => 'customfield',
11627
-      'field' => 'phpcode',
11628
-      'relationship' => 'none',
11624
+        'exclude' => 0,
11625
+        'id' => 'phpcode_6',
11626
+        'table' => 'customfield',
11627
+        'field' => 'phpcode',
11628
+        'relationship' => 'none',
11629 11629
     ),
11630 11630
     'need_validate' => array(
11631
-      'label' => 'Needs validation',
11632
-      'alter' => array(
11631
+        'label' => 'Needs validation',
11632
+        'alter' => array(
11633 11633
         'alter_text' => 0,
11634 11634
         'text' => '',
11635 11635
         'make_link' => 0,
@@ -11646,25 +11646,25 @@  discard block
 block discarded – undo
11646 11646
         'ellipsis' => 1,
11647 11647
         'html' => 0,
11648 11648
         'strip_tags' => 0,
11649
-      ),
11650
-      'empty' => '',
11651
-      'hide_empty' => 0,
11652
-      'empty_zero' => 0,
11653
-      'set_precision' => FALSE,
11654
-      'precision' => 0,
11655
-      'decimal' => '.',
11656
-      'separator' => ',',
11657
-      'prefix' => '',
11658
-      'suffix' => '',
11659
-      'exclude' => 1,
11660
-      'id' => 'need_validate',
11661
-      'table' => 'workunit',
11662
-      'field' => 'need_validate',
11663
-      'relationship' => 'none',
11649
+        ),
11650
+        'empty' => '',
11651
+        'hide_empty' => 0,
11652
+        'empty_zero' => 0,
11653
+        'set_precision' => FALSE,
11654
+        'precision' => 0,
11655
+        'decimal' => '.',
11656
+        'separator' => ',',
11657
+        'prefix' => '',
11658
+        'suffix' => '',
11659
+        'exclude' => 1,
11660
+        'id' => 'need_validate',
11661
+        'table' => 'workunit',
11662
+        'field' => 'need_validate',
11663
+        'relationship' => 'none',
11664 11664
     ),
11665 11665
     'phpcode_7' => array(
11666
-      'label' => 'Validation',
11667
-      'alter' => array(
11666
+        'label' => 'Validation',
11667
+        'alter' => array(
11668 11668
         'alter_text' => 0,
11669 11669
         'text' => '',
11670 11670
         'make_link' => 0,
@@ -11683,12 +11683,12 @@  discard block
 block discarded – undo
11683 11683
         'ellipsis' => 1,
11684 11684
         'html' => 0,
11685 11685
         'strip_tags' => 0,
11686
-      ),
11687
-      'empty' => '',
11688
-      'hide_empty' => 1,
11689
-      'empty_zero' => 0,
11690
-      'hide_alter_empty' => 1,
11691
-      'value' => '<?php
11686
+        ),
11687
+        'empty' => '',
11688
+        'hide_empty' => 1,
11689
+        'empty_zero' => 0,
11690
+        'hide_alter_empty' => 1,
11691
+        'value' => '<?php
11692 11692
   if (!($data->app_workunit_target_nresults>0 AND !$data->workunit_canonical_resultid AND !$data->workunit_error_mask AND !$data->dontsuppresspending)) {
11693 11693
 
11694 11694
     if ($data->workunit_need_validate) {
@@ -11696,40 +11696,40 @@  discard block
 block discarded – undo
11696 11696
     }
11697 11697
   }
11698 11698
 ?>',
11699
-      'exclude' => 0,
11700
-      'id' => 'phpcode_7',
11701
-      'table' => 'customfield',
11702
-      'field' => 'phpcode',
11703
-      'relationship' => 'none',
11704
-    ),
11705
-  ));
11706
-  $handler->override_option('arguments', array(
11699
+        'exclude' => 0,
11700
+        'id' => 'phpcode_7',
11701
+        'table' => 'customfield',
11702
+        'field' => 'phpcode',
11703
+        'relationship' => 'none',
11704
+    ),
11705
+    ));
11706
+    $handler->override_option('arguments', array(
11707 11707
     'id' => array(
11708
-      'default_action' => 'not found',
11709
-      'style_plugin' => 'default_summary',
11710
-      'style_options' => array(),
11711
-      'wildcard' => 'all',
11712
-      'wildcard_substitution' => 'All',
11713
-      'title' => 'Workunit %1',
11714
-      'breadcrumb' => '',
11715
-      'default_argument_type' => 'fixed',
11716
-      'default_argument' => '',
11717
-      'validate_type' => 'numeric',
11718
-      'validate_fail' => 'not found',
11719
-      'id' => 'id',
11720
-      'table' => 'workunit',
11721
-      'field' => 'id',
11722
-      'validate_user_argument_type' => 'uid',
11723
-      'validate_user_roles' => array(
11708
+        'default_action' => 'not found',
11709
+        'style_plugin' => 'default_summary',
11710
+        'style_options' => array(),
11711
+        'wildcard' => 'all',
11712
+        'wildcard_substitution' => 'All',
11713
+        'title' => 'Workunit %1',
11714
+        'breadcrumb' => '',
11715
+        'default_argument_type' => 'fixed',
11716
+        'default_argument' => '',
11717
+        'validate_type' => 'numeric',
11718
+        'validate_fail' => 'not found',
11719
+        'id' => 'id',
11720
+        'table' => 'workunit',
11721
+        'field' => 'id',
11722
+        'validate_user_argument_type' => 'uid',
11723
+        'validate_user_roles' => array(
11724 11724
         2 => 0,
11725 11725
         3 => 0,
11726
-      ),
11727
-      'relationship' => 'none',
11728
-      'default_options_div_prefix' => '',
11729
-      'default_argument_fixed' => '',
11730
-      'default_argument_user' => 0,
11731
-      'default_argument_php' => '',
11732
-      'validate_argument_node_type' => array(
11726
+        ),
11727
+        'relationship' => 'none',
11728
+        'default_options_div_prefix' => '',
11729
+        'default_argument_fixed' => '',
11730
+        'default_argument_user' => 0,
11731
+        'default_argument_php' => '',
11732
+        'validate_argument_node_type' => array(
11733 11733
         'forum' => 0,
11734 11734
         'job_post' => 0,
11735 11735
         'news' => 0,
@@ -11737,59 +11737,59 @@  discard block
 block discarded – undo
11737 11737
         'profile' => 0,
11738 11738
         'story' => 0,
11739 11739
         'team' => 0,
11740
-      ),
11741
-      'validate_argument_node_access' => 0,
11742
-      'validate_argument_nid_type' => 'nid',
11743
-      'validate_argument_vocabulary' => array(
11740
+        ),
11741
+        'validate_argument_node_access' => 0,
11742
+        'validate_argument_nid_type' => 'nid',
11743
+        'validate_argument_vocabulary' => array(
11744 11744
         1 => 0,
11745
-      ),
11746
-      'validate_argument_type' => 'tid',
11747
-      'validate_argument_transform' => 0,
11748
-      'validate_user_restrict_roles' => 0,
11749
-      'validate_argument_php' => '',
11750
-    ),
11751
-  ));
11752
-  $handler->override_option('access', array(
11745
+        ),
11746
+        'validate_argument_type' => 'tid',
11747
+        'validate_argument_transform' => 0,
11748
+        'validate_user_restrict_roles' => 0,
11749
+        'validate_argument_php' => '',
11750
+    ),
11751
+    ));
11752
+    $handler->override_option('access', array(
11753 11753
     'type' => 'none',
11754
-  ));
11755
-  $handler->override_option('cache', array(
11754
+    ));
11755
+    $handler->override_option('cache', array(
11756 11756
     'type' => 'none',
11757
-  ));
11758
-  $handler->override_option('footer_format', '1');
11759
-  $handler->override_option('footer_empty', 0);
11760
-  $handler = $view->new_display('page', 'Page', 'page_1');
11761
-  $handler->override_option('path', 'workunit');
11762
-  $handler->override_option('menu', array(
11757
+    ));
11758
+    $handler->override_option('footer_format', '1');
11759
+    $handler->override_option('footer_empty', 0);
11760
+    $handler = $view->new_display('page', 'Page', 'page_1');
11761
+    $handler->override_option('path', 'workunit');
11762
+    $handler->override_option('menu', array(
11763 11763
     'type' => 'none',
11764 11764
     'title' => '',
11765 11765
     'description' => '',
11766 11766
     'weight' => 0,
11767 11767
     'name' => 'primary-links',
11768
-  ));
11769
-  $handler->override_option('tab_options', array(
11768
+    ));
11769
+    $handler->override_option('tab_options', array(
11770 11770
     'type' => 'none',
11771 11771
     'title' => '',
11772 11772
     'description' => '',
11773 11773
     'weight' => 0,
11774 11774
     'name' => 'navigation',
11775
-  ));
11775
+    ));
11776 11776
 
11777
-  $views[$view->name] = $view;
11777
+    $views[$view->name] = $view;
11778 11778
 
11779
-  // Exported view: boinc_workunit_tasks_all
11780
-  $view = new view;
11781
-  $view->name = 'boinc_workunit_tasks_all';
11782
-  $view->description = 'A list of all tasks in a given workunit';
11783
-  $view->tag = '';
11784
-  $view->base_table = 'result';
11785
-  $view->core = 6;
11786
-  $view->api_version = '2';
11787
-  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
11788
-  $handler = $view->new_display('default', 'Defaults', 'default');
11789
-  $handler->override_option('fields', array(
11779
+    // Exported view: boinc_workunit_tasks_all
11780
+    $view = new view;
11781
+    $view->name = 'boinc_workunit_tasks_all';
11782
+    $view->description = 'A list of all tasks in a given workunit';
11783
+    $view->tag = '';
11784
+    $view->base_table = 'result';
11785
+    $view->core = 6;
11786
+    $view->api_version = '2';
11787
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
11788
+    $handler = $view->new_display('default', 'Defaults', 'default');
11789
+    $handler->override_option('fields', array(
11790 11790
     'name' => array(
11791
-      'label' => 'Name',
11792
-      'alter' => array(
11791
+        'label' => 'Name',
11792
+        'alter' => array(
11793 11793
         'alter_text' => 0,
11794 11794
         'text' => '',
11795 11795
         'make_link' => 0,
@@ -11808,20 +11808,20 @@  discard block
 block discarded – undo
11808 11808
         'ellipsis' => 1,
11809 11809
         'html' => 0,
11810 11810
         'strip_tags' => 0,
11811
-      ),
11812
-      'empty' => '',
11813
-      'hide_empty' => 0,
11814
-      'empty_zero' => 0,
11815
-      'hide_alter_empty' => 1,
11816
-      'exclude' => 1,
11817
-      'id' => 'name',
11818
-      'table' => 'result',
11819
-      'field' => 'name',
11820
-      'relationship' => 'none',
11811
+        ),
11812
+        'empty' => '',
11813
+        'hide_empty' => 0,
11814
+        'empty_zero' => 0,
11815
+        'hide_alter_empty' => 1,
11816
+        'exclude' => 1,
11817
+        'id' => 'name',
11818
+        'table' => 'result',
11819
+        'field' => 'name',
11820
+        'relationship' => 'none',
11821 11821
     ),
11822 11822
     'id' => array(
11823
-      'label' => 'Task ID',
11824
-      'alter' => array(
11823
+        'label' => 'Task ID',
11824
+        'alter' => array(
11825 11825
         'alter_text' => 0,
11826 11826
         'text' => '',
11827 11827
         'make_link' => 0,
@@ -11840,29 +11840,29 @@  discard block
 block discarded – undo
11840 11840
         'ellipsis' => 1,
11841 11841
         'html' => 0,
11842 11842
         'strip_tags' => 0,
11843
-      ),
11844
-      'empty' => '',
11845
-      'hide_empty' => 0,
11846
-      'empty_zero' => 0,
11847
-      'hide_alter_empty' => 1,
11848
-      'set_precision' => FALSE,
11849
-      'precision' => 0,
11850
-      'decimal' => '.',
11851
-      'separator' => '',
11852
-      'format_plural' => 0,
11853
-      'format_plural_singular' => '1',
11854
-      'format_plural_plural' => '@count',
11855
-      'prefix' => '',
11856
-      'suffix' => '',
11857
-      'exclude' => 0,
11858
-      'id' => 'id',
11859
-      'table' => 'result',
11860
-      'field' => 'id',
11861
-      'relationship' => 'none',
11843
+        ),
11844
+        'empty' => '',
11845
+        'hide_empty' => 0,
11846
+        'empty_zero' => 0,
11847
+        'hide_alter_empty' => 1,
11848
+        'set_precision' => FALSE,
11849
+        'precision' => 0,
11850
+        'decimal' => '.',
11851
+        'separator' => '',
11852
+        'format_plural' => 0,
11853
+        'format_plural_singular' => '1',
11854
+        'format_plural_plural' => '@count',
11855
+        'prefix' => '',
11856
+        'suffix' => '',
11857
+        'exclude' => 0,
11858
+        'id' => 'id',
11859
+        'table' => 'result',
11860
+        'field' => 'id',
11861
+        'relationship' => 'none',
11862 11862
     ),
11863 11863
     'hostid' => array(
11864
-      'label' => 'Computer',
11865
-      'alter' => array(
11864
+        'label' => 'Computer',
11865
+        'alter' => array(
11866 11866
         'alter_text' => 0,
11867 11867
         'text' => '',
11868 11868
         'make_link' => 1,
@@ -11881,29 +11881,29 @@  discard block
 block discarded – undo
11881 11881
         'ellipsis' => 1,
11882 11882
         'html' => 0,
11883 11883
         'strip_tags' => 0,
11884
-      ),
11885
-      'empty' => '',
11886
-      'hide_empty' => 0,
11887
-      'empty_zero' => 0,
11888
-      'hide_alter_empty' => 1,
11889
-      'set_precision' => FALSE,
11890
-      'precision' => 0,
11891
-      'decimal' => '.',
11892
-      'separator' => '',
11893
-      'format_plural' => 0,
11894
-      'format_plural_singular' => '1',
11895
-      'format_plural_plural' => '@count',
11896
-      'prefix' => '',
11897
-      'suffix' => '',
11898
-      'exclude' => 0,
11899
-      'id' => 'hostid',
11900
-      'table' => 'result',
11901
-      'field' => 'hostid',
11902
-      'relationship' => 'none',
11884
+        ),
11885
+        'empty' => '',
11886
+        'hide_empty' => 0,
11887
+        'empty_zero' => 0,
11888
+        'hide_alter_empty' => 1,
11889
+        'set_precision' => FALSE,
11890
+        'precision' => 0,
11891
+        'decimal' => '.',
11892
+        'separator' => '',
11893
+        'format_plural' => 0,
11894
+        'format_plural_singular' => '1',
11895
+        'format_plural_plural' => '@count',
11896
+        'prefix' => '',
11897
+        'suffix' => '',
11898
+        'exclude' => 0,
11899
+        'id' => 'hostid',
11900
+        'table' => 'result',
11901
+        'field' => 'hostid',
11902
+        'relationship' => 'none',
11903 11903
     ),
11904 11904
     'sent_time' => array(
11905
-      'label' => 'Sent',
11906
-      'alter' => array(
11905
+        'label' => 'Sent',
11906
+        'alter' => array(
11907 11907
         'alter_text' => 0,
11908 11908
         'text' => '',
11909 11909
         'make_link' => 0,
@@ -11920,21 +11920,21 @@  discard block
 block discarded – undo
11920 11920
         'ellipsis' => 1,
11921 11921
         'html' => 0,
11922 11922
         'strip_tags' => 0,
11923
-      ),
11924
-      'empty' => '',
11925
-      'hide_empty' => 0,
11926
-      'empty_zero' => 0,
11927
-      'date_format' => 'custom',
11928
-      'custom_date_format' => 'j M Y G:i:s e',
11929
-      'exclude' => 1,
11930
-      'id' => 'sent_time',
11931
-      'table' => 'result',
11932
-      'field' => 'sent_time',
11933
-      'relationship' => 'none',
11923
+        ),
11924
+        'empty' => '',
11925
+        'hide_empty' => 0,
11926
+        'empty_zero' => 0,
11927
+        'date_format' => 'custom',
11928
+        'custom_date_format' => 'j M Y G:i:s e',
11929
+        'exclude' => 1,
11930
+        'id' => 'sent_time',
11931
+        'table' => 'result',
11932
+        'field' => 'sent_time',
11933
+        'relationship' => 'none',
11934 11934
     ),
11935 11935
     'received_time' => array(
11936
-      'label' => 'Received time',
11937
-      'alter' => array(
11936
+        'label' => 'Received time',
11937
+        'alter' => array(
11938 11938
         'alter_text' => 0,
11939 11939
         'text' => '',
11940 11940
         'make_link' => 0,
@@ -11951,21 +11951,21 @@  discard block
 block discarded – undo
11951 11951
         'ellipsis' => 1,
11952 11952
         'html' => 0,
11953 11953
         'strip_tags' => 0,
11954
-      ),
11955
-      'empty' => '',
11956
-      'hide_empty' => 0,
11957
-      'empty_zero' => 0,
11958
-      'date_format' => 'small',
11959
-      'custom_date_format' => '',
11960
-      'exclude' => 1,
11961
-      'id' => 'received_time',
11962
-      'table' => 'result',
11963
-      'field' => 'received_time',
11964
-      'relationship' => 'none',
11954
+        ),
11955
+        'empty' => '',
11956
+        'hide_empty' => 0,
11957
+        'empty_zero' => 0,
11958
+        'date_format' => 'small',
11959
+        'custom_date_format' => '',
11960
+        'exclude' => 1,
11961
+        'id' => 'received_time',
11962
+        'table' => 'result',
11963
+        'field' => 'received_time',
11964
+        'relationship' => 'none',
11965 11965
     ),
11966 11966
     'report_deadline' => array(
11967
-      'label' => 'Report deadline',
11968
-      'alter' => array(
11967
+        'label' => 'Report deadline',
11968
+        'alter' => array(
11969 11969
         'alter_text' => 0,
11970 11970
         'text' => '',
11971 11971
         'make_link' => 0,
@@ -11982,21 +11982,21 @@  discard block
 block discarded – undo
11982 11982
         'ellipsis' => 1,
11983 11983
         'html' => 0,
11984 11984
         'strip_tags' => 0,
11985
-      ),
11986
-      'empty' => '',
11987
-      'hide_empty' => 0,
11988
-      'empty_zero' => 0,
11989
-      'date_format' => 'small',
11990
-      'custom_date_format' => '',
11991
-      'exclude' => 1,
11992
-      'id' => 'report_deadline',
11993
-      'table' => 'result',
11994
-      'field' => 'report_deadline',
11995
-      'relationship' => 'none',
11985
+        ),
11986
+        'empty' => '',
11987
+        'hide_empty' => 0,
11988
+        'empty_zero' => 0,
11989
+        'date_format' => 'small',
11990
+        'custom_date_format' => '',
11991
+        'exclude' => 1,
11992
+        'id' => 'report_deadline',
11993
+        'table' => 'result',
11994
+        'field' => 'report_deadline',
11995
+        'relationship' => 'none',
11996 11996
     ),
11997 11997
     'phpcode_3' => array(
11998
-      'label' => 'Sent',
11999
-      'alter' => array(
11998
+        'label' => 'Sent',
11999
+        'alter' => array(
12000 12000
         'alter_text' => 0,
12001 12001
         'text' => '',
12002 12002
         'make_link' => 0,
@@ -12015,24 +12015,24 @@  discard block
 block discarded – undo
12015 12015
         'ellipsis' => 1,
12016 12016
         'html' => 0,
12017 12017
         'strip_tags' => 0,
12018
-      ),
12019
-      'empty' => '',
12020
-      'hide_empty' => 0,
12021
-      'empty_zero' => 0,
12022
-      'hide_alter_empty' => 1,
12023
-      'value' => '<?php
12018
+        ),
12019
+        'empty' => '',
12020
+        'hide_empty' => 0,
12021
+        'empty_zero' => 0,
12022
+        'hide_alter_empty' => 1,
12023
+        'value' => '<?php
12024 12024
   require_boinc(\'util\');
12025 12025
   echo date(\'j M Y G:i:s T\', $data->result_sent_time);
12026 12026
 ?>',
12027
-      'exclude' => 0,
12028
-      'id' => 'phpcode_3',
12029
-      'table' => 'customfield',
12030
-      'field' => 'phpcode',
12031
-      'relationship' => 'none',
12027
+        'exclude' => 0,
12028
+        'id' => 'phpcode_3',
12029
+        'table' => 'customfield',
12030
+        'field' => 'phpcode',
12031
+        'relationship' => 'none',
12032 12032
     ),
12033 12033
     'phpcode' => array(
12034
-      'label' => 'Time reported or deadline',
12035
-      'alter' => array(
12034
+        'label' => 'Time reported or deadline',
12035
+        'alter' => array(
12036 12036
         'alter_text' => 0,
12037 12037
         'text' => '',
12038 12038
         'make_link' => 0,
@@ -12051,24 +12051,24 @@  discard block
 block discarded – undo
12051 12051
         'ellipsis' => 1,
12052 12052
         'html' => 0,
12053 12053
         'strip_tags' => 0,
12054
-      ),
12055
-      'empty' => '',
12056
-      'hide_empty' => 0,
12057
-      'empty_zero' => 0,
12058
-      'hide_alter_empty' => 1,
12059
-      'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
12060
-      'exclude' => 0,
12061
-      'id' => 'phpcode',
12062
-      'table' => 'customfield',
12063
-      'field' => 'phpcode',
12064
-      'override' => array(
12054
+        ),
12055
+        'empty' => '',
12056
+        'hide_empty' => 0,
12057
+        'empty_zero' => 0,
12058
+        'hide_alter_empty' => 1,
12059
+        'value' => '<?php return boincwork_task_time_reported($data->result_received_time, $data->result_report_deadline); ?>',
12060
+        'exclude' => 0,
12061
+        'id' => 'phpcode',
12062
+        'table' => 'customfield',
12063
+        'field' => 'phpcode',
12064
+        'override' => array(
12065 12065
         'button' => 'Override',
12066
-      ),
12067
-      'relationship' => 'none',
12066
+        ),
12067
+        'relationship' => 'none',
12068 12068
     ),
12069 12069
     'server_state' => array(
12070
-      'label' => 'Server state',
12071
-      'alter' => array(
12070
+        'label' => 'Server state',
12071
+        'alter' => array(
12072 12072
         'alter_text' => 0,
12073 12073
         'text' => '',
12074 12074
         'make_link' => 0,
@@ -12085,25 +12085,25 @@  discard block
 block discarded – undo
12085 12085
         'ellipsis' => 1,
12086 12086
         'html' => 0,
12087 12087
         'strip_tags' => 0,
12088
-      ),
12089
-      'empty' => '',
12090
-      'hide_empty' => 0,
12091
-      'empty_zero' => 0,
12092
-      'set_precision' => FALSE,
12093
-      'precision' => 0,
12094
-      'decimal' => '.',
12095
-      'separator' => '',
12096
-      'prefix' => '',
12097
-      'suffix' => '',
12098
-      'exclude' => 1,
12099
-      'id' => 'server_state',
12100
-      'table' => 'result',
12101
-      'field' => 'server_state',
12102
-      'relationship' => 'none',
12088
+        ),
12089
+        'empty' => '',
12090
+        'hide_empty' => 0,
12091
+        'empty_zero' => 0,
12092
+        'set_precision' => FALSE,
12093
+        'precision' => 0,
12094
+        'decimal' => '.',
12095
+        'separator' => '',
12096
+        'prefix' => '',
12097
+        'suffix' => '',
12098
+        'exclude' => 1,
12099
+        'id' => 'server_state',
12100
+        'table' => 'result',
12101
+        'field' => 'server_state',
12102
+        'relationship' => 'none',
12103 12103
     ),
12104 12104
     'outcome' => array(
12105
-      'label' => 'Outcome',
12106
-      'alter' => array(
12105
+        'label' => 'Outcome',
12106
+        'alter' => array(
12107 12107
         'alter_text' => 0,
12108 12108
         'text' => '',
12109 12109
         'make_link' => 0,
@@ -12120,25 +12120,25 @@  discard block
 block discarded – undo
12120 12120
         'ellipsis' => 1,
12121 12121
         'html' => 0,
12122 12122
         'strip_tags' => 0,
12123
-      ),
12124
-      'empty' => '',
12125
-      'hide_empty' => 0,
12126
-      'empty_zero' => 0,
12127
-      'set_precision' => FALSE,
12128
-      'precision' => 0,
12129
-      'decimal' => '.',
12130
-      'separator' => '',
12131
-      'prefix' => '',
12132
-      'suffix' => '',
12133
-      'exclude' => 1,
12134
-      'id' => 'outcome',
12135
-      'table' => 'result',
12136
-      'field' => 'outcome',
12137
-      'relationship' => 'none',
12123
+        ),
12124
+        'empty' => '',
12125
+        'hide_empty' => 0,
12126
+        'empty_zero' => 0,
12127
+        'set_precision' => FALSE,
12128
+        'precision' => 0,
12129
+        'decimal' => '.',
12130
+        'separator' => '',
12131
+        'prefix' => '',
12132
+        'suffix' => '',
12133
+        'exclude' => 1,
12134
+        'id' => 'outcome',
12135
+        'table' => 'result',
12136
+        'field' => 'outcome',
12137
+        'relationship' => 'none',
12138 12138
     ),
12139 12139
     'client_state' => array(
12140
-      'label' => 'Client state',
12141
-      'alter' => array(
12140
+        'label' => 'Client state',
12141
+        'alter' => array(
12142 12142
         'alter_text' => 0,
12143 12143
         'text' => '',
12144 12144
         'make_link' => 0,
@@ -12155,25 +12155,25 @@  discard block
 block discarded – undo
12155 12155
         'ellipsis' => 1,
12156 12156
         'html' => 0,
12157 12157
         'strip_tags' => 0,
12158
-      ),
12159
-      'empty' => '',
12160
-      'hide_empty' => 0,
12161
-      'empty_zero' => 0,
12162
-      'set_precision' => FALSE,
12163
-      'precision' => 0,
12164
-      'decimal' => '.',
12165
-      'separator' => '',
12166
-      'prefix' => '',
12167
-      'suffix' => '',
12168
-      'exclude' => 1,
12169
-      'id' => 'client_state',
12170
-      'table' => 'result',
12171
-      'field' => 'client_state',
12172
-      'relationship' => 'none',
12158
+        ),
12159
+        'empty' => '',
12160
+        'hide_empty' => 0,
12161
+        'empty_zero' => 0,
12162
+        'set_precision' => FALSE,
12163
+        'precision' => 0,
12164
+        'decimal' => '.',
12165
+        'separator' => '',
12166
+        'prefix' => '',
12167
+        'suffix' => '',
12168
+        'exclude' => 1,
12169
+        'id' => 'client_state',
12170
+        'table' => 'result',
12171
+        'field' => 'client_state',
12172
+        'relationship' => 'none',
12173 12173
     ),
12174 12174
     'validate_state' => array(
12175
-      'label' => 'Validation state',
12176
-      'alter' => array(
12175
+        'label' => 'Validation state',
12176
+        'alter' => array(
12177 12177
         'alter_text' => 0,
12178 12178
         'text' => '',
12179 12179
         'make_link' => 0,
@@ -12190,25 +12190,25 @@  discard block
 block discarded – undo
12190 12190
         'ellipsis' => 1,
12191 12191
         'html' => 0,
12192 12192
         'strip_tags' => 0,
12193
-      ),
12194
-      'empty' => '',
12195
-      'hide_empty' => 0,
12196
-      'empty_zero' => 0,
12197
-      'set_precision' => FALSE,
12198
-      'precision' => 0,
12199
-      'decimal' => '.',
12200
-      'separator' => '',
12201
-      'prefix' => '',
12202
-      'suffix' => '',
12203
-      'exclude' => 1,
12204
-      'id' => 'validate_state',
12205
-      'table' => 'result',
12206
-      'field' => 'validate_state',
12207
-      'relationship' => 'none',
12193
+        ),
12194
+        'empty' => '',
12195
+        'hide_empty' => 0,
12196
+        'empty_zero' => 0,
12197
+        'set_precision' => FALSE,
12198
+        'precision' => 0,
12199
+        'decimal' => '.',
12200
+        'separator' => '',
12201
+        'prefix' => '',
12202
+        'suffix' => '',
12203
+        'exclude' => 1,
12204
+        'id' => 'validate_state',
12205
+        'table' => 'result',
12206
+        'field' => 'validate_state',
12207
+        'relationship' => 'none',
12208 12208
     ),
12209 12209
     'exit_status' => array(
12210
-      'label' => 'Exit status',
12211
-      'alter' => array(
12210
+        'label' => 'Exit status',
12211
+        'alter' => array(
12212 12212
         'alter_text' => 0,
12213 12213
         'text' => '',
12214 12214
         'make_link' => 0,
@@ -12225,25 +12225,25 @@  discard block
 block discarded – undo
12225 12225
         'ellipsis' => 1,
12226 12226
         'html' => 0,
12227 12227
         'strip_tags' => 0,
12228
-      ),
12229
-      'empty' => '',
12230
-      'hide_empty' => 0,
12231
-      'empty_zero' => 0,
12232
-      'set_precision' => FALSE,
12233
-      'precision' => 0,
12234
-      'decimal' => '.',
12235
-      'separator' => '',
12236
-      'prefix' => '',
12237
-      'suffix' => '',
12238
-      'exclude' => 1,
12239
-      'id' => 'exit_status',
12240
-      'table' => 'result',
12241
-      'field' => 'exit_status',
12242
-      'relationship' => 'none',
12228
+        ),
12229
+        'empty' => '',
12230
+        'hide_empty' => 0,
12231
+        'empty_zero' => 0,
12232
+        'set_precision' => FALSE,
12233
+        'precision' => 0,
12234
+        'decimal' => '.',
12235
+        'separator' => '',
12236
+        'prefix' => '',
12237
+        'suffix' => '',
12238
+        'exclude' => 1,
12239
+        'id' => 'exit_status',
12240
+        'table' => 'result',
12241
+        'field' => 'exit_status',
12242
+        'relationship' => 'none',
12243 12243
     ),
12244 12244
     'phpcode_1' => array(
12245
-      'label' => 'Status',
12246
-      'alter' => array(
12245
+        'label' => 'Status',
12246
+        'alter' => array(
12247 12247
         'alter_text' => 0,
12248 12248
         'text' => '',
12249 12249
         'make_link' => 0,
@@ -12260,11 +12260,11 @@  discard block
 block discarded – undo
12260 12260
         'ellipsis' => 1,
12261 12261
         'html' => 0,
12262 12262
         'strip_tags' => 0,
12263
-      ),
12264
-      'empty' => '',
12265
-      'hide_empty' => 0,
12266
-      'empty_zero' => 0,
12267
-      'value' => '<?php
12263
+        ),
12264
+        'empty' => '',
12265
+        'hide_empty' => 0,
12266
+        'empty_zero' => 0,
12267
+        'value' => '<?php
12268 12268
   require_boinc(\'result\');
12269 12269
   $result = new stdClass();
12270 12270
   $result->server_state = $data->result_server_state;
@@ -12274,18 +12274,18 @@  discard block
 block discarded – undo
12274 12274
   $result->exit_status = $data->result_exit_status;
12275 12275
   return state_string($result);
12276 12276
 ?>',
12277
-      'exclude' => 0,
12278
-      'id' => 'phpcode_1',
12279
-      'table' => 'customfield',
12280
-      'field' => 'phpcode',
12281
-      'override' => array(
12277
+        'exclude' => 0,
12278
+        'id' => 'phpcode_1',
12279
+        'table' => 'customfield',
12280
+        'field' => 'phpcode',
12281
+        'override' => array(
12282 12282
         'button' => 'Override',
12283
-      ),
12284
-      'relationship' => 'none',
12283
+        ),
12284
+        'relationship' => 'none',
12285 12285
     ),
12286 12286
     'elapsed_time' => array(
12287
-      'label' => 'Run time',
12288
-      'alter' => array(
12287
+        'label' => 'Run time',
12288
+        'alter' => array(
12289 12289
         'alter_text' => 0,
12290 12290
         'text' => '',
12291 12291
         'make_link' => 0,
@@ -12304,29 +12304,29 @@  discard block
 block discarded – undo
12304 12304
         'ellipsis' => 1,
12305 12305
         'html' => 0,
12306 12306
         'strip_tags' => 0,
12307
-      ),
12308
-      'empty' => '',
12309
-      'hide_empty' => 0,
12310
-      'empty_zero' => 0,
12311
-      'hide_alter_empty' => 1,
12312
-      'set_precision' => 1,
12313
-      'precision' => '2',
12314
-      'decimal' => '.',
12315
-      'separator' => ',',
12316
-      'format_plural' => 0,
12317
-      'format_plural_singular' => '1',
12318
-      'format_plural_plural' => '@count',
12319
-      'prefix' => '',
12320
-      'suffix' => '',
12321
-      'exclude' => 0,
12322
-      'id' => 'elapsed_time',
12323
-      'table' => 'result',
12324
-      'field' => 'elapsed_time',
12325
-      'relationship' => 'none',
12307
+        ),
12308
+        'empty' => '',
12309
+        'hide_empty' => 0,
12310
+        'empty_zero' => 0,
12311
+        'hide_alter_empty' => 1,
12312
+        'set_precision' => 1,
12313
+        'precision' => '2',
12314
+        'decimal' => '.',
12315
+        'separator' => ',',
12316
+        'format_plural' => 0,
12317
+        'format_plural_singular' => '1',
12318
+        'format_plural_plural' => '@count',
12319
+        'prefix' => '',
12320
+        'suffix' => '',
12321
+        'exclude' => 0,
12322
+        'id' => 'elapsed_time',
12323
+        'table' => 'result',
12324
+        'field' => 'elapsed_time',
12325
+        'relationship' => 'none',
12326 12326
     ),
12327 12327
     'cpu_time' => array(
12328
-      'label' => 'CPU time',
12329
-      'alter' => array(
12328
+        'label' => 'CPU time',
12329
+        'alter' => array(
12330 12330
         'alter_text' => 0,
12331 12331
         'text' => '',
12332 12332
         'make_link' => 0,
@@ -12345,29 +12345,29 @@  discard block
 block discarded – undo
12345 12345
         'ellipsis' => 1,
12346 12346
         'html' => 0,
12347 12347
         'strip_tags' => 0,
12348
-      ),
12349
-      'empty' => '',
12350
-      'hide_empty' => 0,
12351
-      'empty_zero' => 0,
12352
-      'hide_alter_empty' => 1,
12353
-      'set_precision' => 1,
12354
-      'precision' => '2',
12355
-      'decimal' => '.',
12356
-      'separator' => ',',
12357
-      'format_plural' => 0,
12358
-      'format_plural_singular' => '1',
12359
-      'format_plural_plural' => '@count',
12360
-      'prefix' => '',
12361
-      'suffix' => '',
12362
-      'exclude' => 0,
12363
-      'id' => 'cpu_time',
12364
-      'table' => 'result',
12365
-      'field' => 'cpu_time',
12366
-      'relationship' => 'none',
12348
+        ),
12349
+        'empty' => '',
12350
+        'hide_empty' => 0,
12351
+        'empty_zero' => 0,
12352
+        'hide_alter_empty' => 1,
12353
+        'set_precision' => 1,
12354
+        'precision' => '2',
12355
+        'decimal' => '.',
12356
+        'separator' => ',',
12357
+        'format_plural' => 0,
12358
+        'format_plural_singular' => '1',
12359
+        'format_plural_plural' => '@count',
12360
+        'prefix' => '',
12361
+        'suffix' => '',
12362
+        'exclude' => 0,
12363
+        'id' => 'cpu_time',
12364
+        'table' => 'result',
12365
+        'field' => 'cpu_time',
12366
+        'relationship' => 'none',
12367 12367
     ),
12368 12368
     'granted_credit' => array(
12369
-      'label' => 'Granted credit',
12370
-      'alter' => array(
12369
+        'label' => 'Granted credit',
12370
+        'alter' => array(
12371 12371
         'alter_text' => 0,
12372 12372
         'text' => '',
12373 12373
         'make_link' => 0,
@@ -12386,29 +12386,29 @@  discard block
 block discarded – undo
12386 12386
         'ellipsis' => 1,
12387 12387
         'html' => 0,
12388 12388
         'strip_tags' => 0,
12389
-      ),
12390
-      'empty' => '',
12391
-      'hide_empty' => 0,
12392
-      'empty_zero' => 0,
12393
-      'hide_alter_empty' => 0,
12394
-      'set_precision' => 1,
12395
-      'precision' => '0',
12396
-      'decimal' => '.',
12397
-      'separator' => ',',
12398
-      'format_plural' => 0,
12399
-      'format_plural_singular' => '1',
12400
-      'format_plural_plural' => '@count',
12401
-      'prefix' => '',
12402
-      'suffix' => '',
12403
-      'exclude' => 0,
12404
-      'id' => 'granted_credit',
12405
-      'table' => 'result',
12406
-      'field' => 'granted_credit',
12407
-      'relationship' => 'none',
12389
+        ),
12390
+        'empty' => '',
12391
+        'hide_empty' => 0,
12392
+        'empty_zero' => 0,
12393
+        'hide_alter_empty' => 0,
12394
+        'set_precision' => 1,
12395
+        'precision' => '0',
12396
+        'decimal' => '.',
12397
+        'separator' => ',',
12398
+        'format_plural' => 0,
12399
+        'format_plural_singular' => '1',
12400
+        'format_plural_plural' => '@count',
12401
+        'prefix' => '',
12402
+        'suffix' => '',
12403
+        'exclude' => 0,
12404
+        'id' => 'granted_credit',
12405
+        'table' => 'result',
12406
+        'field' => 'granted_credit',
12407
+        'relationship' => 'none',
12408 12408
     ),
12409 12409
     'appid' => array(
12410
-      'label' => 'Application ID',
12411
-      'alter' => array(
12410
+        'label' => 'Application ID',
12411
+        'alter' => array(
12412 12412
         'alter_text' => 0,
12413 12413
         'text' => '',
12414 12414
         'make_link' => 0,
@@ -12427,29 +12427,29 @@  discard block
 block discarded – undo
12427 12427
         'ellipsis' => 1,
12428 12428
         'html' => 0,
12429 12429
         'strip_tags' => 0,
12430
-      ),
12431
-      'empty' => '',
12432
-      'hide_empty' => 0,
12433
-      'empty_zero' => 0,
12434
-      'hide_alter_empty' => 1,
12435
-      'set_precision' => FALSE,
12436
-      'precision' => 0,
12437
-      'decimal' => '.',
12438
-      'separator' => '',
12439
-      'format_plural' => 0,
12440
-      'format_plural_singular' => '1',
12441
-      'format_plural_plural' => '@count',
12442
-      'prefix' => '',
12443
-      'suffix' => '',
12444
-      'exclude' => 1,
12445
-      'id' => 'appid',
12446
-      'table' => 'result',
12447
-      'field' => 'appid',
12448
-      'relationship' => 'none',
12430
+        ),
12431
+        'empty' => '',
12432
+        'hide_empty' => 0,
12433
+        'empty_zero' => 0,
12434
+        'hide_alter_empty' => 1,
12435
+        'set_precision' => FALSE,
12436
+        'precision' => 0,
12437
+        'decimal' => '.',
12438
+        'separator' => '',
12439
+        'format_plural' => 0,
12440
+        'format_plural_singular' => '1',
12441
+        'format_plural_plural' => '@count',
12442
+        'prefix' => '',
12443
+        'suffix' => '',
12444
+        'exclude' => 1,
12445
+        'id' => 'appid',
12446
+        'table' => 'result',
12447
+        'field' => 'appid',
12448
+        'relationship' => 'none',
12449 12449
     ),
12450 12450
     'app_version_id' => array(
12451
-      'label' => 'Application version',
12452
-      'alter' => array(
12451
+        'label' => 'Application version',
12452
+        'alter' => array(
12453 12453
         'alter_text' => 0,
12454 12454
         'text' => '',
12455 12455
         'make_link' => 0,
@@ -12466,25 +12466,25 @@  discard block
 block discarded – undo
12466 12466
         'ellipsis' => 1,
12467 12467
         'html' => 0,
12468 12468
         'strip_tags' => 0,
12469
-      ),
12470
-      'empty' => '',
12471
-      'hide_empty' => 0,
12472
-      'empty_zero' => 0,
12473
-      'set_precision' => FALSE,
12474
-      'precision' => 0,
12475
-      'decimal' => '.',
12476
-      'separator' => '',
12477
-      'prefix' => '',
12478
-      'suffix' => '',
12479
-      'exclude' => 1,
12480
-      'id' => 'app_version_id',
12481
-      'table' => 'result',
12482
-      'field' => 'app_version_id',
12483
-      'relationship' => 'none',
12469
+        ),
12470
+        'empty' => '',
12471
+        'hide_empty' => 0,
12472
+        'empty_zero' => 0,
12473
+        'set_precision' => FALSE,
12474
+        'precision' => 0,
12475
+        'decimal' => '.',
12476
+        'separator' => '',
12477
+        'prefix' => '',
12478
+        'suffix' => '',
12479
+        'exclude' => 1,
12480
+        'id' => 'app_version_id',
12481
+        'table' => 'result',
12482
+        'field' => 'app_version_id',
12483
+        'relationship' => 'none',
12484 12484
     ),
12485 12485
     'phpcode_2' => array(
12486
-      'label' => 'Application',
12487
-      'alter' => array(
12486
+        'label' => 'Application',
12487
+        'alter' => array(
12488 12488
         'alter_text' => 0,
12489 12489
         'text' => '',
12490 12490
         'make_link' => 0,
@@ -12503,756 +12503,756 @@  discard block
 block discarded – undo
12503 12503
         'ellipsis' => 1,
12504 12504
         'html' => 0,
12505 12505
         'strip_tags' => 0,
12506
-      ),
12507
-      'empty' => '',
12508
-      'hide_empty' => 0,
12509
-      'empty_zero' => 0,
12510
-      'hide_alter_empty' => 1,
12511
-      'value' => '<?php
12506
+        ),
12507
+        'empty' => '',
12508
+        'hide_empty' => 0,
12509
+        'empty_zero' => 0,
12510
+        'hide_alter_empty' => 1,
12511
+        'value' => '<?php
12512 12512
   require_boinc(\'result\');
12513 12513
   $result = new stdClass();
12514 12514
   $result->appid = $data->result_appid;
12515 12515
   $result->app_version_id = $data->result_app_version_id;
12516 12516
   return app_version_string($result);
12517 12517
 ?>',
12518
-      'exclude' => 0,
12519
-      'id' => 'phpcode_2',
12520
-      'table' => 'customfield',
12521
-      'field' => 'phpcode',
12522
-      'override' => array(
12518
+        'exclude' => 0,
12519
+        'id' => 'phpcode_2',
12520
+        'table' => 'customfield',
12521
+        'field' => 'phpcode',
12522
+        'override' => array(
12523 12523
         'button' => 'Override',
12524
-      ),
12525
-      'relationship' => 'none',
12524
+        ),
12525
+        'relationship' => 'none',
12526 12526
     ),
12527
-  ));
12528
-  $handler->override_option('arguments', array(
12527
+    ));
12528
+    $handler->override_option('arguments', array(
12529 12529
     'workunitid' => array(
12530
-      'default_action' => 'not found',
12531
-      'style_plugin' => 'default_summary',
12532
-      'style_options' => array(),
12533
-      'wildcard' => 'all',
12534
-      'wildcard_substitution' => 'All',
12535
-      'title' => 'Tasks for workunit %1',
12536
-      'breadcrumb' => '',
12537
-      'default_argument_type' => 'fixed',
12538
-      'default_argument' => '',
12539
-      'validate_type' => 'numeric',
12540
-      'validate_fail' => 'not found',
12541
-      'id' => 'workunitid',
12542
-      'table' => 'result',
12543
-      'field' => 'workunitid',
12544
-      'validate_user_argument_type' => 'uid',
12545
-      'validate_user_roles' => array(
12530
+        'default_action' => 'not found',
12531
+        'style_plugin' => 'default_summary',
12532
+        'style_options' => array(),
12533
+        'wildcard' => 'all',
12534
+        'wildcard_substitution' => 'All',
12535
+        'title' => 'Tasks for workunit %1',
12536
+        'breadcrumb' => '',
12537
+        'default_argument_type' => 'fixed',
12538
+        'default_argument' => '',
12539
+        'validate_type' => 'numeric',
12540
+        'validate_fail' => 'not found',
12541
+        'id' => 'workunitid',
12542
+        'table' => 'result',
12543
+        'field' => 'workunitid',
12544
+        'validate_user_argument_type' => 'uid',
12545
+        'validate_user_roles' => array(
12546 12546
         2 => 0,
12547 12547
         4 => 0,
12548 12548
         7 => 0,
12549 12549
         5 => 0,
12550 12550
         3 => 0,
12551 12551
         6 => 0,
12552
-      ),
12553
-      'me_redirect' => 0,
12554
-      'me_validate_user_argument_type' => 'uid',
12555
-      'me_validate_user_roles' => array(
12552
+        ),
12553
+        'me_redirect' => 0,
12554
+        'me_validate_user_argument_type' => 'uid',
12555
+        'me_validate_user_roles' => array(
12556 12556
         2 => 0,
12557 12557
         4 => 0,
12558 12558
         7 => 0,
12559 12559
         5 => 0,
12560 12560
         3 => 0,
12561 12561
         6 => 0,
12562
-      ),
12563
-      'relationship' => 'none',
12564
-      'default_options_div_prefix' => '',
12565
-      'default_taxonomy_tid_term_page' => 0,
12566
-      'default_taxonomy_tid_node' => 0,
12567
-      'default_taxonomy_tid_limit' => 0,
12568
-      'default_taxonomy_tid_vids' => array(
12562
+        ),
12563
+        'relationship' => 'none',
12564
+        'default_options_div_prefix' => '',
12565
+        'default_taxonomy_tid_term_page' => 0,
12566
+        'default_taxonomy_tid_node' => 0,
12567
+        'default_taxonomy_tid_limit' => 0,
12568
+        'default_taxonomy_tid_vids' => array(
12569 12569
         1 => 0,
12570 12570
         2 => 0,
12571
-      ),
12572
-      'default_argument_user' => 0,
12573
-      'default_argument_fixed' => '',
12574
-      'default_argument_php' => '',
12575
-      'validate_argument_node_type' => array(
12571
+        ),
12572
+        'default_argument_user' => 0,
12573
+        'default_argument_fixed' => '',
12574
+        'default_argument_php' => '',
12575
+        'validate_argument_node_type' => array(
12576 12576
         'page' => 0,
12577 12577
         'news' => 0,
12578 12578
         'profile' => 0,
12579 12579
         'forum' => 0,
12580 12580
         'panel' => 0,
12581 12581
         'story' => 0,
12582
-      ),
12583
-      'validate_argument_node_access' => 0,
12584
-      'validate_argument_nid_type' => 'nid',
12585
-      'validate_argument_vocabulary' => array(
12582
+        ),
12583
+        'validate_argument_node_access' => 0,
12584
+        'validate_argument_nid_type' => 'nid',
12585
+        'validate_argument_vocabulary' => array(
12586 12586
         1 => 0,
12587 12587
         2 => 0,
12588
-      ),
12589
-      'validate_argument_type' => 'tid',
12590
-      'validate_argument_transform' => 0,
12591
-      'validate_user_restrict_roles' => 0,
12592
-      'validate_argument_node_flag_name' => '*relationship*',
12593
-      'validate_argument_node_flag_test' => 'flaggable',
12594
-      'validate_argument_node_flag_id_type' => 'id',
12595
-      'validate_argument_user_flag_name' => '*relationship*',
12596
-      'validate_argument_user_flag_test' => 'flaggable',
12597
-      'validate_argument_user_flag_id_type' => 'id',
12598
-      'validate_argument_php' => '',
12599
-      'me_validate_user_restrict_roles' => 0,
12600
-    ),
12601
-  ));
12602
-  $handler->override_option('access', array(
12588
+        ),
12589
+        'validate_argument_type' => 'tid',
12590
+        'validate_argument_transform' => 0,
12591
+        'validate_user_restrict_roles' => 0,
12592
+        'validate_argument_node_flag_name' => '*relationship*',
12593
+        'validate_argument_node_flag_test' => 'flaggable',
12594
+        'validate_argument_node_flag_id_type' => 'id',
12595
+        'validate_argument_user_flag_name' => '*relationship*',
12596
+        'validate_argument_user_flag_test' => 'flaggable',
12597
+        'validate_argument_user_flag_id_type' => 'id',
12598
+        'validate_argument_php' => '',
12599
+        'me_validate_user_restrict_roles' => 0,
12600
+    ),
12601
+    ));
12602
+    $handler->override_option('access', array(
12603 12603
     'type' => 'none',
12604
-  ));
12605
-  $handler->override_option('cache', array(
12604
+    ));
12605
+    $handler->override_option('cache', array(
12606 12606
     'type' => 'none',
12607
-  ));
12608
-  $handler->override_option('items_per_page', 20);
12609
-  $handler->override_option('use_pager', '1');
12610
-  $handler->override_option('style_plugin', 'table');
12611
-  $handler->override_option('style_options', array(
12607
+    ));
12608
+    $handler->override_option('items_per_page', 20);
12609
+    $handler->override_option('use_pager', '1');
12610
+    $handler->override_option('style_plugin', 'table');
12611
+    $handler->override_option('style_options', array(
12612 12612
     'grouping' => '',
12613 12613
     'override' => 1,
12614 12614
     'sticky' => 1,
12615 12615
     'order' => 'asc',
12616 12616
     'summary' => '',
12617 12617
     'columns' => array(
12618
-      'id' => 'id',
12619
-      'hostid' => 'hostid',
12620
-      'sent_time' => 'sent_time',
12621
-      'received_time' => 'received_time',
12622
-      'report_deadline' => 'report_deadline',
12623
-      'phpcode_3' => 'phpcode_3',
12624
-      'phpcode' => 'phpcode',
12625
-      'server_state' => 'server_state',
12626
-      'outcome' => 'outcome',
12627
-      'client_state' => 'client_state',
12628
-      'validate_state' => 'validate_state',
12629
-      'exit_status' => 'exit_status',
12630
-      'phpcode_1' => 'phpcode_1',
12631
-      'elapsed_time' => 'elapsed_time',
12632
-      'cpu_time' => 'cpu_time',
12633
-      'claimed_credit_1' => 'claimed_credit_1',
12634
-      'granted_credit' => 'granted_credit',
12635
-      'app_version_id' => 'app_version_id',
12636
-      'phpcode_2' => 'phpcode_2',
12618
+        'id' => 'id',
12619
+        'hostid' => 'hostid',
12620
+        'sent_time' => 'sent_time',
12621
+        'received_time' => 'received_time',
12622
+        'report_deadline' => 'report_deadline',
12623
+        'phpcode_3' => 'phpcode_3',
12624
+        'phpcode' => 'phpcode',
12625
+        'server_state' => 'server_state',
12626
+        'outcome' => 'outcome',
12627
+        'client_state' => 'client_state',
12628
+        'validate_state' => 'validate_state',
12629
+        'exit_status' => 'exit_status',
12630
+        'phpcode_1' => 'phpcode_1',
12631
+        'elapsed_time' => 'elapsed_time',
12632
+        'cpu_time' => 'cpu_time',
12633
+        'claimed_credit_1' => 'claimed_credit_1',
12634
+        'granted_credit' => 'granted_credit',
12635
+        'app_version_id' => 'app_version_id',
12636
+        'phpcode_2' => 'phpcode_2',
12637 12637
     ),
12638 12638
     'info' => array(
12639
-      'id' => array(
12639
+        'id' => array(
12640 12640
         'sortable' => 1,
12641 12641
         'separator' => '',
12642
-      ),
12643
-      'hostid' => array(
12642
+        ),
12643
+        'hostid' => array(
12644 12644
         'sortable' => 1,
12645 12645
         'separator' => '',
12646
-      ),
12647
-      'sent_time' => array(
12646
+        ),
12647
+        'sent_time' => array(
12648 12648
         'sortable' => 1,
12649 12649
         'separator' => '',
12650
-      ),
12651
-      'received_time' => array(
12650
+        ),
12651
+        'received_time' => array(
12652 12652
         'sortable' => 1,
12653 12653
         'separator' => '',
12654
-      ),
12655
-      'report_deadline' => array(
12654
+        ),
12655
+        'report_deadline' => array(
12656 12656
         'sortable' => 1,
12657 12657
         'separator' => '',
12658
-      ),
12659
-      'phpcode_3' => array(
12658
+        ),
12659
+        'phpcode_3' => array(
12660 12660
         'separator' => '',
12661
-      ),
12662
-      'phpcode' => array(
12661
+        ),
12662
+        'phpcode' => array(
12663 12663
         'separator' => '',
12664
-      ),
12665
-      'server_state' => array(
12664
+        ),
12665
+        'server_state' => array(
12666 12666
         'sortable' => 0,
12667 12667
         'separator' => '',
12668
-      ),
12669
-      'outcome' => array(
12668
+        ),
12669
+        'outcome' => array(
12670 12670
         'sortable' => 0,
12671 12671
         'separator' => '',
12672
-      ),
12673
-      'client_state' => array(
12672
+        ),
12673
+        'client_state' => array(
12674 12674
         'sortable' => 0,
12675 12675
         'separator' => '',
12676
-      ),
12677
-      'validate_state' => array(
12676
+        ),
12677
+        'validate_state' => array(
12678 12678
         'sortable' => 0,
12679 12679
         'separator' => '',
12680
-      ),
12681
-      'exit_status' => array(
12680
+        ),
12681
+        'exit_status' => array(
12682 12682
         'sortable' => 0,
12683 12683
         'separator' => '',
12684
-      ),
12685
-      'phpcode_1' => array(
12684
+        ),
12685
+        'phpcode_1' => array(
12686 12686
         'separator' => '',
12687
-      ),
12688
-      'elapsed_time' => array(
12687
+        ),
12688
+        'elapsed_time' => array(
12689 12689
         'sortable' => 1,
12690 12690
         'separator' => '',
12691
-      ),
12692
-      'cpu_time' => array(
12691
+        ),
12692
+        'cpu_time' => array(
12693 12693
         'sortable' => 1,
12694 12694
         'separator' => '',
12695
-      ),
12696
-      'claimed_credit_1' => array(
12695
+        ),
12696
+        'claimed_credit_1' => array(
12697 12697
         'sortable' => 1,
12698 12698
         'separator' => '',
12699
-      ),
12700
-      'granted_credit' => array(
12699
+        ),
12700
+        'granted_credit' => array(
12701 12701
         'sortable' => 1,
12702 12702
         'separator' => '',
12703
-      ),
12704
-      'app_version_id' => array(
12703
+        ),
12704
+        'app_version_id' => array(
12705 12705
         'sortable' => 1,
12706 12706
         'separator' => '',
12707
-      ),
12708
-      'phpcode_2' => array(
12707
+        ),
12708
+        'phpcode_2' => array(
12709 12709
         'separator' => '',
12710
-      ),
12710
+        ),
12711 12711
     ),
12712 12712
     'default' => 'id',
12713
-  ));
12714
-  $handler = $view->new_display('page', 'All tasks', 'page_1');
12715
-  $handler->override_option('path', 'workunit/%/tasks/all');
12716
-  $handler->override_option('menu', array(
12713
+    ));
12714
+    $handler = $view->new_display('page', 'All tasks', 'page_1');
12715
+    $handler->override_option('path', 'workunit/%/tasks/all');
12716
+    $handler->override_option('menu', array(
12717 12717
     'type' => 'default tab',
12718 12718
     'title' => 'All tasks',
12719 12719
     'description' => 'Show all tasks associated with the workunit',
12720 12720
     'weight' => '0',
12721 12721
     'name' => 'navigation',
12722
-  ));
12723
-  $handler->override_option('tab_options', array(
12722
+    ));
12723
+    $handler->override_option('tab_options', array(
12724 12724
     'type' => 'tab',
12725 12725
     'title' => 'Tasks',
12726 12726
     'description' => 'Show all tasks',
12727 12727
     'weight' => '0',
12728 12728
     'name' => 'secondary-links',
12729
-  ));
12730
-  $handler = $view->new_display('page', 'Error', 'page_2');
12731
-  $handler->override_option('filters', array(
12729
+    ));
12730
+    $handler = $view->new_display('page', 'Error', 'page_2');
12731
+    $handler->override_option('filters', array(
12732 12732
     'server_state' => array(
12733
-      'operator' => '=',
12734
-      'value' => array(
12733
+        'operator' => '=',
12734
+        'value' => array(
12735 12735
         'value' => '5',
12736 12736
         'min' => '',
12737 12737
         'max' => '',
12738
-      ),
12739
-      'group' => '0',
12740
-      'exposed' => FALSE,
12741
-      'expose' => array(
12738
+        ),
12739
+        'group' => '0',
12740
+        'exposed' => FALSE,
12741
+        'expose' => array(
12742 12742
         'operator' => FALSE,
12743 12743
         'label' => '',
12744
-      ),
12745
-      'id' => 'server_state',
12746
-      'table' => 'result',
12747
-      'field' => 'server_state',
12748
-      'override' => array(
12744
+        ),
12745
+        'id' => 'server_state',
12746
+        'table' => 'result',
12747
+        'field' => 'server_state',
12748
+        'override' => array(
12749 12749
         'button' => 'Use default',
12750
-      ),
12751
-      'relationship' => 'none',
12750
+        ),
12751
+        'relationship' => 'none',
12752 12752
     ),
12753 12753
     'outcome' => array(
12754
-      'operator' => '>=',
12755
-      'value' => array(
12754
+        'operator' => '>=',
12755
+        'value' => array(
12756 12756
         'value' => '3',
12757 12757
         'min' => '',
12758 12758
         'max' => '',
12759
-      ),
12760
-      'group' => '0',
12761
-      'exposed' => FALSE,
12762
-      'expose' => array(
12759
+        ),
12760
+        'group' => '0',
12761
+        'exposed' => FALSE,
12762
+        'expose' => array(
12763 12763
         'operator' => FALSE,
12764 12764
         'label' => '',
12765
-      ),
12766
-      'id' => 'outcome',
12767
-      'table' => 'result',
12768
-      'field' => 'outcome',
12769
-      'override' => array(
12765
+        ),
12766
+        'id' => 'outcome',
12767
+        'table' => 'result',
12768
+        'field' => 'outcome',
12769
+        'override' => array(
12770 12770
         'button' => 'Use default',
12771
-      ),
12772
-      'relationship' => 'none',
12771
+        ),
12772
+        'relationship' => 'none',
12773 12773
     ),
12774 12774
     'outcome_1' => array(
12775
-      'operator' => 'not between',
12776
-      'value' => array(
12775
+        'operator' => 'not between',
12776
+        'value' => array(
12777 12777
         'value' => '',
12778 12778
         'min' => '4',
12779 12779
         'max' => '7',
12780
-      ),
12781
-      'group' => '0',
12782
-      'exposed' => FALSE,
12783
-      'expose' => array(
12780
+        ),
12781
+        'group' => '0',
12782
+        'exposed' => FALSE,
12783
+        'expose' => array(
12784 12784
         'operator' => FALSE,
12785 12785
         'label' => '',
12786
-      ),
12787
-      'id' => 'outcome_1',
12788
-      'table' => 'result',
12789
-      'field' => 'outcome',
12790
-      'override' => array(
12786
+        ),
12787
+        'id' => 'outcome_1',
12788
+        'table' => 'result',
12789
+        'field' => 'outcome',
12790
+        'override' => array(
12791 12791
         'button' => 'Use default',
12792
-      ),
12793
-      'relationship' => 'none',
12792
+        ),
12793
+        'relationship' => 'none',
12794 12794
     ),
12795 12795
     'outcome_2' => array(
12796
-      'operator' => '<=',
12797
-      'value' => array(
12796
+        'operator' => '<=',
12797
+        'value' => array(
12798 12798
         'value' => '7',
12799 12799
         'min' => '',
12800 12800
         'max' => '',
12801
-      ),
12802
-      'group' => '0',
12803
-      'exposed' => FALSE,
12804
-      'expose' => array(
12801
+        ),
12802
+        'group' => '0',
12803
+        'exposed' => FALSE,
12804
+        'expose' => array(
12805 12805
         'operator' => FALSE,
12806 12806
         'label' => '',
12807
-      ),
12808
-      'id' => 'outcome_2',
12809
-      'table' => 'result',
12810
-      'field' => 'outcome',
12811
-      'override' => array(
12807
+        ),
12808
+        'id' => 'outcome_2',
12809
+        'table' => 'result',
12810
+        'field' => 'outcome',
12811
+        'override' => array(
12812 12812
         'button' => 'Use default',
12813
-      ),
12814
-      'relationship' => 'none',
12813
+        ),
12814
+        'relationship' => 'none',
12815 12815
     ),
12816
-  ));
12817
-  $handler->override_option('path', 'workunit/%/tasks/error');
12818
-  $handler->override_option('menu', array(
12816
+    ));
12817
+    $handler->override_option('path', 'workunit/%/tasks/error');
12818
+    $handler->override_option('menu', array(
12819 12819
     'type' => 'tab',
12820 12820
     'title' => 'Error',
12821 12821
     'description' => 'Show tasks with errors associated with the workunit',
12822 12822
     'weight' => '5',
12823 12823
     'name' => 'navigation',
12824
-  ));
12825
-  $handler->override_option('tab_options', array(
12824
+    ));
12825
+    $handler->override_option('tab_options', array(
12826 12826
     'type' => 'none',
12827 12827
     'title' => '',
12828 12828
     'description' => '',
12829 12829
     'weight' => 0,
12830 12830
     'name' => 'navigation',
12831
-  ));
12832
-  $handler = $view->new_display('page', 'In progress', 'page_3');
12833
-  $handler->override_option('filters', array(
12831
+    ));
12832
+    $handler = $view->new_display('page', 'In progress', 'page_3');
12833
+    $handler->override_option('filters', array(
12834 12834
     'server_state' => array(
12835
-      'operator' => '=',
12836
-      'value' => array(
12835
+        'operator' => '=',
12836
+        'value' => array(
12837 12837
         'value' => '4',
12838 12838
         'min' => '',
12839 12839
         'max' => '',
12840
-      ),
12841
-      'group' => '0',
12842
-      'exposed' => FALSE,
12843
-      'expose' => array(
12840
+        ),
12841
+        'group' => '0',
12842
+        'exposed' => FALSE,
12843
+        'expose' => array(
12844 12844
         'operator' => FALSE,
12845 12845
         'label' => '',
12846
-      ),
12847
-      'id' => 'server_state',
12848
-      'table' => 'result',
12849
-      'field' => 'server_state',
12850
-      'override' => array(
12846
+        ),
12847
+        'id' => 'server_state',
12848
+        'table' => 'result',
12849
+        'field' => 'server_state',
12850
+        'override' => array(
12851 12851
         'button' => 'Use default',
12852
-      ),
12853
-      'relationship' => 'none',
12852
+        ),
12853
+        'relationship' => 'none',
12854 12854
     ),
12855
-  ));
12856
-  $handler->override_option('path', 'workunit/%/tasks/active');
12857
-  $handler->override_option('menu', array(
12855
+    ));
12856
+    $handler->override_option('path', 'workunit/%/tasks/active');
12857
+    $handler->override_option('menu', array(
12858 12858
     'type' => 'tab',
12859 12859
     'title' => 'In progress',
12860 12860
     'description' => 'Show tasks in progress associated with the workunit',
12861 12861
     'weight' => '1',
12862 12862
     'name' => 'navigation',
12863
-  ));
12864
-  $handler->override_option('tab_options', array(
12863
+    ));
12864
+    $handler->override_option('tab_options', array(
12865 12865
     'type' => 'none',
12866 12866
     'title' => '',
12867 12867
     'description' => '',
12868 12868
     'weight' => 0,
12869 12869
     'name' => 'navigation',
12870
-  ));
12871
-  $handler = $view->new_display('page', 'Invalidated', 'page_4');
12872
-  $handler->override_option('filters', array(
12870
+    ));
12871
+    $handler = $view->new_display('page', 'Invalidated', 'page_4');
12872
+    $handler->override_option('filters', array(
12873 12873
     'server_state' => array(
12874
-      'operator' => '=',
12875
-      'value' => array(
12874
+        'operator' => '=',
12875
+        'value' => array(
12876 12876
         'value' => '5',
12877 12877
         'min' => '',
12878 12878
         'max' => '',
12879
-      ),
12880
-      'group' => '0',
12881
-      'exposed' => FALSE,
12882
-      'expose' => array(
12879
+        ),
12880
+        'group' => '0',
12881
+        'exposed' => FALSE,
12882
+        'expose' => array(
12883 12883
         'operator' => FALSE,
12884 12884
         'label' => '',
12885
-      ),
12886
-      'id' => 'server_state',
12887
-      'table' => 'result',
12888
-      'field' => 'server_state',
12889
-      'override' => array(
12885
+        ),
12886
+        'id' => 'server_state',
12887
+        'table' => 'result',
12888
+        'field' => 'server_state',
12889
+        'override' => array(
12890 12890
         'button' => 'Use default',
12891
-      ),
12892
-      'relationship' => 'none',
12891
+        ),
12892
+        'relationship' => 'none',
12893 12893
     ),
12894 12894
     'views_or_begin_2' => array(
12895
-      'id' => 'views_or_begin_2',
12896
-      'table' => 'views_or',
12897
-      'field' => 'views_or_begin',
12895
+        'id' => 'views_or_begin_2',
12896
+        'table' => 'views_or',
12897
+        'field' => 'views_or_begin',
12898 12898
     ),
12899 12899
     'outcome' => array(
12900
-      'operator' => '=',
12901
-      'value' => array(
12900
+        'operator' => '=',
12901
+        'value' => array(
12902 12902
         'value' => '6',
12903 12903
         'min' => '',
12904 12904
         'max' => '',
12905
-      ),
12906
-      'group' => '0',
12907
-      'exposed' => FALSE,
12908
-      'expose' => array(
12905
+        ),
12906
+        'group' => '0',
12907
+        'exposed' => FALSE,
12908
+        'expose' => array(
12909 12909
         'operator' => FALSE,
12910 12910
         'label' => '',
12911
-      ),
12912
-      'id' => 'outcome',
12913
-      'table' => 'result',
12914
-      'field' => 'outcome',
12915
-      'override' => array(
12911
+        ),
12912
+        'id' => 'outcome',
12913
+        'table' => 'result',
12914
+        'field' => 'outcome',
12915
+        'override' => array(
12916 12916
         'button' => 'Use default',
12917
-      ),
12918
-      'relationship' => 'none',
12917
+        ),
12918
+        'relationship' => 'none',
12919 12919
     ),
12920 12920
     'views_or_next_3' => array(
12921
-      'id' => 'views_or_next_3',
12922
-      'table' => 'views_or',
12923
-      'field' => 'views_or_next',
12921
+        'id' => 'views_or_next_3',
12922
+        'table' => 'views_or',
12923
+        'field' => 'views_or_next',
12924 12924
     ),
12925 12925
     'outcome_1' => array(
12926
-      'operator' => '=',
12927
-      'value' => array(
12926
+        'operator' => '=',
12927
+        'value' => array(
12928 12928
         'value' => '1',
12929 12929
         'min' => '',
12930 12930
         'max' => '',
12931
-      ),
12932
-      'group' => '0',
12933
-      'exposed' => FALSE,
12934
-      'expose' => array(
12931
+        ),
12932
+        'group' => '0',
12933
+        'exposed' => FALSE,
12934
+        'expose' => array(
12935 12935
         'operator' => FALSE,
12936 12936
         'label' => '',
12937
-      ),
12938
-      'id' => 'outcome_1',
12939
-      'table' => 'result',
12940
-      'field' => 'outcome',
12941
-      'override' => array(
12937
+        ),
12938
+        'id' => 'outcome_1',
12939
+        'table' => 'result',
12940
+        'field' => 'outcome',
12941
+        'override' => array(
12942 12942
         'button' => 'Use default',
12943
-      ),
12944
-      'relationship' => 'none',
12943
+        ),
12944
+        'relationship' => 'none',
12945 12945
     ),
12946 12946
     'views_or_begin' => array(
12947
-      'id' => 'views_or_begin',
12948
-      'table' => 'views_or',
12949
-      'field' => 'views_or_begin',
12947
+        'id' => 'views_or_begin',
12948
+        'table' => 'views_or',
12949
+        'field' => 'views_or_begin',
12950 12950
     ),
12951 12951
     'validate_state' => array(
12952
-      'operator' => '=',
12953
-      'value' => array(
12952
+        'operator' => '=',
12953
+        'value' => array(
12954 12954
         'value' => '2',
12955 12955
         'min' => '',
12956 12956
         'max' => '',
12957
-      ),
12958
-      'group' => '0',
12959
-      'exposed' => FALSE,
12960
-      'expose' => array(
12957
+        ),
12958
+        'group' => '0',
12959
+        'exposed' => FALSE,
12960
+        'expose' => array(
12961 12961
         'operator' => FALSE,
12962 12962
         'label' => '',
12963
-      ),
12964
-      'id' => 'validate_state',
12965
-      'table' => 'result',
12966
-      'field' => 'validate_state',
12967
-      'override' => array(
12963
+        ),
12964
+        'id' => 'validate_state',
12965
+        'table' => 'result',
12966
+        'field' => 'validate_state',
12967
+        'override' => array(
12968 12968
         'button' => 'Use default',
12969
-      ),
12970
-      'relationship' => 'none',
12969
+        ),
12970
+        'relationship' => 'none',
12971 12971
     ),
12972 12972
     'views_or_next_4' => array(
12973
-      'id' => 'views_or_next_4',
12974
-      'table' => 'views_or',
12975
-      'field' => 'views_or_next',
12973
+        'id' => 'views_or_next_4',
12974
+        'table' => 'views_or',
12975
+        'field' => 'views_or_next',
12976 12976
     ),
12977 12977
     'validate_state_1' => array(
12978
-      'operator' => '=',
12979
-      'value' => array(
12978
+        'operator' => '=',
12979
+        'value' => array(
12980 12980
         'value' => '3',
12981 12981
         'min' => '',
12982 12982
         'max' => '',
12983
-      ),
12984
-      'group' => '0',
12985
-      'exposed' => FALSE,
12986
-      'expose' => array(
12983
+        ),
12984
+        'group' => '0',
12985
+        'exposed' => FALSE,
12986
+        'expose' => array(
12987 12987
         'operator' => FALSE,
12988 12988
         'label' => '',
12989
-      ),
12990
-      'id' => 'validate_state_1',
12991
-      'table' => 'result',
12992
-      'field' => 'validate_state',
12993
-      'override' => array(
12989
+        ),
12990
+        'id' => 'validate_state_1',
12991
+        'table' => 'result',
12992
+        'field' => 'validate_state',
12993
+        'override' => array(
12994 12994
         'button' => 'Use default',
12995
-      ),
12996
-      'relationship' => 'none',
12995
+        ),
12996
+        'relationship' => 'none',
12997 12997
     ),
12998 12998
     'views_or_next' => array(
12999
-      'id' => 'views_or_next',
13000
-      'table' => 'views_or',
13001
-      'field' => 'views_or_next',
12999
+        'id' => 'views_or_next',
13000
+        'table' => 'views_or',
13001
+        'field' => 'views_or_next',
13002 13002
     ),
13003 13003
     'validate_state_2' => array(
13004
-      'operator' => '=',
13005
-      'value' => array(
13004
+        'operator' => '=',
13005
+        'value' => array(
13006 13006
         'value' => '5',
13007 13007
         'min' => '',
13008 13008
         'max' => '',
13009
-      ),
13010
-      'group' => '0',
13011
-      'exposed' => FALSE,
13012
-      'expose' => array(
13009
+        ),
13010
+        'group' => '0',
13011
+        'exposed' => FALSE,
13012
+        'expose' => array(
13013 13013
         'operator' => FALSE,
13014 13014
         'label' => '',
13015
-      ),
13016
-      'id' => 'validate_state_2',
13017
-      'table' => 'result',
13018
-      'field' => 'validate_state',
13019
-      'override' => array(
13015
+        ),
13016
+        'id' => 'validate_state_2',
13017
+        'table' => 'result',
13018
+        'field' => 'validate_state',
13019
+        'override' => array(
13020 13020
         'button' => 'Use default',
13021
-      ),
13022
-      'relationship' => 'none',
13021
+        ),
13022
+        'relationship' => 'none',
13023 13023
     ),
13024 13024
     'views_or_end_3' => array(
13025
-      'id' => 'views_or_end_3',
13026
-      'table' => 'views_or',
13027
-      'field' => 'views_or_end',
13025
+        'id' => 'views_or_end_3',
13026
+        'table' => 'views_or',
13027
+        'field' => 'views_or_end',
13028 13028
     ),
13029 13029
     'views_or_end_2' => array(
13030
-      'id' => 'views_or_end_2',
13031
-      'table' => 'views_or',
13032
-      'field' => 'views_or_end',
13030
+        'id' => 'views_or_end_2',
13031
+        'table' => 'views_or',
13032
+        'field' => 'views_or_end',
13033 13033
     ),
13034
-  ));
13035
-  $handler->override_option('path', 'workunit/%/tasks/invalid');
13036
-  $handler->override_option('menu', array(
13034
+    ));
13035
+    $handler->override_option('path', 'workunit/%/tasks/invalid');
13036
+    $handler->override_option('menu', array(
13037 13037
     'type' => 'tab',
13038 13038
     'title' => 'Invalid',
13039 13039
     'description' => 'Show invalidated tasks associated with the workunit',
13040 13040
     'weight' => '4',
13041 13041
     'name' => 'navigation',
13042
-  ));
13043
-  $handler->override_option('tab_options', array(
13042
+    ));
13043
+    $handler->override_option('tab_options', array(
13044 13044
     'type' => 'none',
13045 13045
     'title' => '',
13046 13046
     'description' => '',
13047 13047
     'weight' => 0,
13048 13048
     'name' => 'navigation',
13049
-  ));
13050
-  $handler = $view->new_display('page', 'Pending', 'page_5');
13051
-  $handler->override_option('filters', array(
13049
+    ));
13050
+    $handler = $view->new_display('page', 'Pending', 'page_5');
13051
+    $handler->override_option('filters', array(
13052 13052
     'server_state' => array(
13053
-      'operator' => '=',
13054
-      'value' => array(
13053
+        'operator' => '=',
13054
+        'value' => array(
13055 13055
         'value' => '5',
13056 13056
         'min' => '',
13057 13057
         'max' => '',
13058
-      ),
13059
-      'group' => '0',
13060
-      'exposed' => FALSE,
13061
-      'expose' => array(
13058
+        ),
13059
+        'group' => '0',
13060
+        'exposed' => FALSE,
13061
+        'expose' => array(
13062 13062
         'operator' => FALSE,
13063 13063
         'label' => '',
13064
-      ),
13065
-      'id' => 'server_state',
13066
-      'table' => 'result',
13067
-      'field' => 'server_state',
13068
-      'override' => array(
13064
+        ),
13065
+        'id' => 'server_state',
13066
+        'table' => 'result',
13067
+        'field' => 'server_state',
13068
+        'override' => array(
13069 13069
         'button' => 'Use default',
13070
-      ),
13071
-      'relationship' => 'none',
13070
+        ),
13071
+        'relationship' => 'none',
13072 13072
     ),
13073 13073
     'outcome' => array(
13074
-      'operator' => '=',
13075
-      'value' => array(
13074
+        'operator' => '=',
13075
+        'value' => array(
13076 13076
         'value' => '1',
13077 13077
         'min' => '',
13078 13078
         'max' => '',
13079
-      ),
13080
-      'group' => '0',
13081
-      'exposed' => FALSE,
13082
-      'expose' => array(
13079
+        ),
13080
+        'group' => '0',
13081
+        'exposed' => FALSE,
13082
+        'expose' => array(
13083 13083
         'operator' => FALSE,
13084 13084
         'label' => '',
13085
-      ),
13086
-      'id' => 'outcome',
13087
-      'table' => 'result',
13088
-      'field' => 'outcome',
13089
-      'override' => array(
13085
+        ),
13086
+        'id' => 'outcome',
13087
+        'table' => 'result',
13088
+        'field' => 'outcome',
13089
+        'override' => array(
13090 13090
         'button' => 'Use default',
13091
-      ),
13092
-      'relationship' => 'none',
13091
+        ),
13092
+        'relationship' => 'none',
13093 13093
     ),
13094 13094
     'validate_state' => array(
13095
-      'operator' => '>=',
13096
-      'value' => array(
13095
+        'operator' => '>=',
13096
+        'value' => array(
13097 13097
         'value' => '0',
13098 13098
         'min' => '',
13099 13099
         'max' => '',
13100
-      ),
13101
-      'group' => '0',
13102
-      'exposed' => FALSE,
13103
-      'expose' => array(
13100
+        ),
13101
+        'group' => '0',
13102
+        'exposed' => FALSE,
13103
+        'expose' => array(
13104 13104
         'operator' => FALSE,
13105 13105
         'label' => '',
13106
-      ),
13107
-      'id' => 'validate_state',
13108
-      'table' => 'result',
13109
-      'field' => 'validate_state',
13110
-      'override' => array(
13106
+        ),
13107
+        'id' => 'validate_state',
13108
+        'table' => 'result',
13109
+        'field' => 'validate_state',
13110
+        'override' => array(
13111 13111
         'button' => 'Use default',
13112
-      ),
13113
-      'relationship' => 'none',
13112
+        ),
13113
+        'relationship' => 'none',
13114 13114
     ),
13115 13115
     'validate_state_1' => array(
13116
-      'operator' => 'not between',
13117
-      'value' => array(
13116
+        'operator' => 'not between',
13117
+        'value' => array(
13118 13118
         'value' => '',
13119 13119
         'min' => '0',
13120 13120
         'max' => '4',
13121
-      ),
13122
-      'group' => '0',
13123
-      'exposed' => FALSE,
13124
-      'expose' => array(
13121
+        ),
13122
+        'group' => '0',
13123
+        'exposed' => FALSE,
13124
+        'expose' => array(
13125 13125
         'operator' => FALSE,
13126 13126
         'label' => '',
13127
-      ),
13128
-      'id' => 'validate_state_1',
13129
-      'table' => 'result',
13130
-      'field' => 'validate_state',
13131
-      'override' => array(
13127
+        ),
13128
+        'id' => 'validate_state_1',
13129
+        'table' => 'result',
13130
+        'field' => 'validate_state',
13131
+        'override' => array(
13132 13132
         'button' => 'Use default',
13133
-      ),
13134
-      'relationship' => 'none',
13133
+        ),
13134
+        'relationship' => 'none',
13135 13135
     ),
13136 13136
     'validate_state_2' => array(
13137
-      'operator' => '<=',
13138
-      'value' => array(
13137
+        'operator' => '<=',
13138
+        'value' => array(
13139 13139
         'value' => '4',
13140 13140
         'min' => '',
13141 13141
         'max' => '',
13142
-      ),
13143
-      'group' => '0',
13144
-      'exposed' => FALSE,
13145
-      'expose' => array(
13142
+        ),
13143
+        'group' => '0',
13144
+        'exposed' => FALSE,
13145
+        'expose' => array(
13146 13146
         'operator' => FALSE,
13147 13147
         'label' => '',
13148
-      ),
13149
-      'id' => 'validate_state_2',
13150
-      'table' => 'result',
13151
-      'field' => 'validate_state',
13152
-      'override' => array(
13148
+        ),
13149
+        'id' => 'validate_state_2',
13150
+        'table' => 'result',
13151
+        'field' => 'validate_state',
13152
+        'override' => array(
13153 13153
         'button' => 'Use default',
13154
-      ),
13155
-      'relationship' => 'none',
13154
+        ),
13155
+        'relationship' => 'none',
13156 13156
     ),
13157
-  ));
13158
-  $handler->override_option('path', 'workunit/%/tasks/pending');
13159
-  $handler->override_option('menu', array(
13157
+    ));
13158
+    $handler->override_option('path', 'workunit/%/tasks/pending');
13159
+    $handler->override_option('menu', array(
13160 13160
     'type' => 'tab',
13161 13161
     'title' => 'Pending',
13162 13162
     'description' => 'Show tasks associated with the workunit with results pending',
13163 13163
     'weight' => '2',
13164 13164
     'name' => 'navigation',
13165
-  ));
13166
-  $handler->override_option('tab_options', array(
13165
+    ));
13166
+    $handler->override_option('tab_options', array(
13167 13167
     'type' => 'none',
13168 13168
     'title' => '',
13169 13169
     'description' => '',
13170 13170
     'weight' => 0,
13171 13171
     'name' => 'navigation',
13172
-  ));
13173
-  $handler = $view->new_display('page', 'Validated', 'page_6');
13174
-  $handler->override_option('filters', array(
13172
+    ));
13173
+    $handler = $view->new_display('page', 'Validated', 'page_6');
13174
+    $handler->override_option('filters', array(
13175 13175
     'server_state' => array(
13176
-      'operator' => '=',
13177
-      'value' => array(
13176
+        'operator' => '=',
13177
+        'value' => array(
13178 13178
         'value' => '5',
13179 13179
         'min' => '',
13180 13180
         'max' => '',
13181
-      ),
13182
-      'group' => '0',
13183
-      'exposed' => FALSE,
13184
-      'expose' => array(
13181
+        ),
13182
+        'group' => '0',
13183
+        'exposed' => FALSE,
13184
+        'expose' => array(
13185 13185
         'operator' => FALSE,
13186 13186
         'label' => '',
13187
-      ),
13188
-      'id' => 'server_state',
13189
-      'table' => 'result',
13190
-      'field' => 'server_state',
13191
-      'override' => array(
13187
+        ),
13188
+        'id' => 'server_state',
13189
+        'table' => 'result',
13190
+        'field' => 'server_state',
13191
+        'override' => array(
13192 13192
         'button' => 'Use default',
13193
-      ),
13194
-      'relationship' => 'none',
13193
+        ),
13194
+        'relationship' => 'none',
13195 13195
     ),
13196 13196
     'outcome' => array(
13197
-      'operator' => '=',
13198
-      'value' => array(
13197
+        'operator' => '=',
13198
+        'value' => array(
13199 13199
         'value' => '1',
13200 13200
         'min' => '',
13201 13201
         'max' => '',
13202
-      ),
13203
-      'group' => '0',
13204
-      'exposed' => FALSE,
13205
-      'expose' => array(
13202
+        ),
13203
+        'group' => '0',
13204
+        'exposed' => FALSE,
13205
+        'expose' => array(
13206 13206
         'operator' => FALSE,
13207 13207
         'label' => '',
13208
-      ),
13209
-      'id' => 'outcome',
13210
-      'table' => 'result',
13211
-      'field' => 'outcome',
13212
-      'override' => array(
13208
+        ),
13209
+        'id' => 'outcome',
13210
+        'table' => 'result',
13211
+        'field' => 'outcome',
13212
+        'override' => array(
13213 13213
         'button' => 'Use default',
13214
-      ),
13215
-      'relationship' => 'none',
13214
+        ),
13215
+        'relationship' => 'none',
13216 13216
     ),
13217 13217
     'validate_state' => array(
13218
-      'operator' => '=',
13219
-      'value' => array(
13218
+        'operator' => '=',
13219
+        'value' => array(
13220 13220
         'value' => '1',
13221 13221
         'min' => '',
13222 13222
         'max' => '',
13223
-      ),
13224
-      'group' => '0',
13225
-      'exposed' => FALSE,
13226
-      'expose' => array(
13223
+        ),
13224
+        'group' => '0',
13225
+        'exposed' => FALSE,
13226
+        'expose' => array(
13227 13227
         'operator' => FALSE,
13228 13228
         'label' => '',
13229
-      ),
13230
-      'id' => 'validate_state',
13231
-      'table' => 'result',
13232
-      'field' => 'validate_state',
13233
-      'override' => array(
13229
+        ),
13230
+        'id' => 'validate_state',
13231
+        'table' => 'result',
13232
+        'field' => 'validate_state',
13233
+        'override' => array(
13234 13234
         'button' => 'Use default',
13235
-      ),
13236
-      'relationship' => 'none',
13235
+        ),
13236
+        'relationship' => 'none',
13237 13237
     ),
13238
-  ));
13239
-  $handler->override_option('path', 'workunit/%/tasks/valid');
13240
-  $handler->override_option('menu', array(
13238
+    ));
13239
+    $handler->override_option('path', 'workunit/%/tasks/valid');
13240
+    $handler->override_option('menu', array(
13241 13241
     'type' => 'tab',
13242 13242
     'title' => 'Valid',
13243 13243
     'description' => 'Show validated tasks associated with the workunit',
13244 13244
     'weight' => '3',
13245 13245
     'name' => 'navigation',
13246
-  ));
13247
-  $handler->override_option('tab_options', array(
13246
+    ));
13247
+    $handler->override_option('tab_options', array(
13248 13248
     'type' => 'none',
13249 13249
     'title' => '',
13250 13250
     'description' => '',
13251 13251
     'weight' => 0,
13252 13252
     'name' => 'navigation',
13253
-  ));
13253
+    ));
13254 13254
 
13255
-  $views[$view->name] = $view;
13255
+    $views[$view->name] = $view;
13256 13256
 
13257
-  return $views;
13257
+    return $views;
13258 13258
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincteam/includes/boincteam.rules.inc 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
  */
17 17
 
18 18
 function boincteam_rules_event_info() {
19
-  return array(
19
+    return array(
20 20
     'boincteam_create_team_error' => array(
21
-      'label' => bts('Error creating a new BOINC team - general error.', array(), NULL, 'boinc:rule-event'),
22
-      'module' => 'Boincteam',
23
-      'arguments' => rules_events_hook_boincteam_arguments(),
21
+        'label' => bts('Error creating a new BOINC team - general error.', array(), NULL, 'boinc:rule-event'),
22
+        'module' => 'Boincteam',
23
+        'arguments' => rules_events_hook_boincteam_arguments(),
24 24
     ),
25 25
     'boincteam_create_team_nopathauto_error' => array(
26
-      'label' => bts('Error creating a new BOINC team - no pathauto module.', array(), NULL, 'boinc:rule-event'),
27
-      'module' => 'Boincteam',
28
-      'arguments' => rules_events_hook_boincteam_arguments(),
26
+        'label' => bts('Error creating a new BOINC team - no pathauto module.', array(), NULL, 'boinc:rule-event'),
27
+        'module' => 'Boincteam',
28
+        'arguments' => rules_events_hook_boincteam_arguments(),
29 29
     ),
30
-  );
30
+    );
31 31
 }
32 32
 
33 33
 /**
34 34
  * Arguments suitable for boincteam
35 35
  **/
36 36
 function rules_events_hook_boincteam_arguments() {
37
-  return array(
37
+    return array(
38 38
     'team_name' => array(
39
-      'type' => 'string',
40
-      'label' => 'team name',
41
-      'required' => TRUE,
39
+        'type' => 'string',
40
+        'label' => 'team name',
41
+        'required' => TRUE,
42 42
     ),
43
-  ) + rules_events_hook_boincteam_adminnotify_argument();
43
+    ) + rules_events_hook_boincteam_adminnotify_argument();
44 44
 }
45 45
 
46 46
 function rules_events_hook_boincteam_adminnotify_argument() {
47
-  return array(
47
+    return array(
48 48
     'subject_tag' => array(
49
-      'type' => 'string',
50
-      'label' => 'Subject tag for email filtering',
51
-      'required' => TRUE,
49
+        'type' => 'string',
50
+        'label' => 'Subject tag for email filtering',
51
+        'required' => TRUE,
52 52
     ),
53
-  ) + rules_events_global_user_argument();
53
+    ) + rules_events_global_user_argument();
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 function boincteam_rules_event_info() {
19 19
   return array(
20 20
     'boincteam_create_team_error' => array(
21
-      'label' => bts('Error creating a new BOINC team - general error.', array(), NULL, 'boinc:rule-event'),
21
+      'label' => bts('Error creating a new BOINC team - general error.', array(), null, 'boinc:rule-event'),
22 22
       'module' => 'Boincteam',
23 23
       'arguments' => rules_events_hook_boincteam_arguments(),
24 24
     ),
25 25
     'boincteam_create_team_nopathauto_error' => array(
26
-      'label' => bts('Error creating a new BOINC team - no pathauto module.', array(), NULL, 'boinc:rule-event'),
26
+      'label' => bts('Error creating a new BOINC team - no pathauto module.', array(), null, 'boinc:rule-event'),
27 27
       'module' => 'Boincteam',
28 28
       'arguments' => rules_events_hook_boincteam_arguments(),
29 29
     ),
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     'team_name' => array(
39 39
       'type' => 'string',
40 40
       'label' => 'team name',
41
-      'required' => TRUE,
41
+      'required' => true,
42 42
     ),
43 43
   ) + rules_events_hook_boincteam_adminnotify_argument();
44 44
 }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     'subject_tag' => array(
49 49
       'type' => 'string',
50 50
       'label' => 'Subject tag for email filtering',
51
-      'required' => TRUE,
51
+      'required' => true,
52 52
     ),
53 53
   ) + rules_events_global_user_argument();
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.