@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | |
189 | 189 | if (!is_null($teamid)) { |
190 | - if ($teamid==0) { |
|
190 | + if ($teamid == 0) { |
|
191 | 191 | user_quit_team($user); |
192 | 192 | } else { |
193 | 193 | $team = BoincTeam::lookup_id_nocache($teamid); |
@@ -240,15 +240,15 @@ discard block |
||
240 | 240 | // table. If one or more of these consent_xyz parameters are NOT |
241 | 241 | // present, the RPC will still return 'success', even though the |
242 | 242 | // consent table is not updated. |
243 | -if ( (isset($consent_name) and isset($consent_flag) and isset($consent_not_required) and isset($consent_source)) ) { |
|
243 | +if ((isset($consent_name) and isset($consent_flag) and isset($consent_not_required) and isset($consent_source))) { |
|
244 | 244 | list($checkct, $ctid) = check_consent_type($consent_name); |
245 | 245 | if ($checkct) { |
246 | 246 | |
247 | 247 | // Check to see if latest consent of this name is already |
248 | 248 | // given. |
249 | - $cr= BoincConsent::lookup("userid={$user->id} AND consent_type_id='${ctid}' ORDER BY consent_time DESC LIMIT 1"); |
|
250 | - if ( (($cr) and ($cr->consent_flag!=$consent_flag)) or |
|
251 | - (!$cr) ) { |
|
249 | + $cr = BoincConsent::lookup("userid={$user->id} AND consent_type_id='${ctid}' ORDER BY consent_time DESC LIMIT 1"); |
|
250 | + if ((($cr) and ($cr->consent_flag != $consent_flag)) or |
|
251 | + (!$cr)) { |
|
252 | 252 | |
253 | 253 | $rc = consent_to_a_policy($user, $ctid, $consent_flag, $consent_not_required, $consent_source, time()); |
254 | 254 | if (!$rc) { |
@@ -104,7 +104,7 @@ |
||
104 | 104 | // set to 1. |
105 | 105 | if ($consent_flag==0) { |
106 | 106 | $rc = consent_to_a_policy($user, $ctid, 0, 1, $source); |
107 | - } else { |
|
107 | + } else { |
|
108 | 108 | $rc = consent_to_a_policy($user, $ctid, 1, 0, $source); |
109 | 109 | } |
110 | 110 | if (!$rc) { |
@@ -106,7 +106,7 @@ |
||
106 | 106 | } |
107 | 107 | if (!$checkct) { |
108 | 108 | error_log("Project configuration error! " . |
109 | - "'CONSENT_TYPE_ENROLL' disabled while 'account_creation_rpc_require_consent' enabled!" |
|
109 | + "'CONSENT_TYPE_ENROLL' disabled while 'account_creation_rpc_require_consent' enabled!" |
|
110 | 110 | ); |
111 | 111 | } |
112 | 112 |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | // Consistency checks |
101 | 101 | // |
102 | 102 | if (!check_termsofuse()) { |
103 | - error_log("Project configuration error! " . |
|
103 | + error_log("Project configuration error! ". |
|
104 | 104 | "Terms of use undefined while 'account_creation_rpc_require_consent' enabled!" |
105 | 105 | ); |
106 | 106 | } |
107 | 107 | if (!$checkct) { |
108 | - error_log("Project configuration error! " . |
|
108 | + error_log("Project configuration error! ". |
|
109 | 109 | "'CONSENT_TYPE_ENROLL' disabled while 'account_creation_rpc_require_consent' enabled!" |
110 | 110 | ); |
111 | 111 | } |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | // |
115 | 115 | if (is_null($consent_flag) or !$source) { |
116 | 116 | xml_error(ERR_ACCT_REQUIRE_CONSENT, |
117 | - "This project requires you to consent to its terms of use. " . |
|
118 | - "Please update your BOINC software " . |
|
119 | - "or register via the project's website " . |
|
117 | + "This project requires you to consent to its terms of use. ". |
|
118 | + "Please update your BOINC software ". |
|
119 | + "or register via the project's website ". |
|
120 | 120 | "or contact your account manager's provider." |
121 | 121 | ); |
122 | 122 | } |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | // * not agree. |
153 | 153 | // -> no create account RPC at all |
154 | 154 | // |
155 | - if ( (!is_null($consent_flag)) and $source) { |
|
155 | + if ((!is_null($consent_flag)) and $source) { |
|
156 | 156 | // Record the user giving consent in database - if consent_flag is 0, |
157 | 157 | // this is an 'anonymous account' and consent_not_required is |
158 | 158 | // set to 1. |
159 | - if ($consent_flag==0) { |
|
159 | + if ($consent_flag == 0) { |
|
160 | 160 | $rc = consent_to_a_policy($user, $ctid, 0, 1, $source); |
161 | - } else { |
|
161 | + } else { |
|
162 | 162 | $rc = consent_to_a_policy($user, $ctid, 1, 0, $source); |
163 | 163 | } |
164 | 164 | if (!$rc) { |
@@ -53,7 +53,7 @@ |
||
53 | 53 | // Toggles the enable flag |
54 | 54 | function mct_toggle_field($field) { |
55 | 55 | $ctid = post_int("consent_type_id"); |
56 | - $toggle = post_str("toggle" . $field); |
|
56 | + $toggle = post_str("toggle".$field); |
|
57 | 57 | if ($toggle == "Click to Enable") { |
58 | 58 | $state = 1; |
59 | 59 | $action = "Enabled"; |
@@ -46,8 +46,7 @@ discard block |
||
46 | 46 | if ($toggle == "Click to Enable") { |
47 | 47 | $state = 1; |
48 | 48 | $action = "Enabled"; |
49 | - } |
|
50 | - else { |
|
49 | + } else { |
|
51 | 50 | $state = 0; |
52 | 51 | $action = "Disabled"; |
53 | 52 | } |
@@ -91,12 +90,10 @@ discard block |
||
91 | 90 | if (!in_rops()) { |
92 | 91 | if (!($ct->enabled)) { |
93 | 92 | echo " <td><input class=\"btn btn-default\" name=toggleenabled type=submit value=\"Click to Enable\"></td>"; |
94 | - } |
|
95 | - else { |
|
93 | + } else { |
|
96 | 94 | echo " <td><input class=\"btn btn-default\" name=toggleenabled type=submit value=\"Click to Disable\"></td>"; |
97 | 95 | } |
98 | - } |
|
99 | - else { |
|
96 | + } else { |
|
100 | 97 | echo " <td>$ct->enabled</td>"; |
101 | 98 | } |
102 | 99 | |
@@ -107,12 +104,10 @@ discard block |
||
107 | 104 | if (!in_rops()) { |
108 | 105 | if (!($ct->privacypref)) { |
109 | 106 | echo " <td><input class=\"btn btn-default\" name=toggleprivacypref type=submit value=\"Click to Enable\"></td>"; |
110 | - } |
|
111 | - else { |
|
107 | + } else { |
|
112 | 108 | echo " <td><input class=\"btn btn-default\" name=toggleprivacypref type=submit value=\"Click to Disable\"></td>"; |
113 | 109 | } |
114 | - } |
|
115 | - else { |
|
110 | + } else { |
|
116 | 111 | echo " <td>$ct->privacypref</td>"; |
117 | 112 | } |
118 | 113 | |
@@ -156,11 +151,9 @@ discard block |
||
156 | 151 | |
157 | 152 | if (post_str("add_consenttype", true)) { |
158 | 153 | add_consenttype(); |
159 | -} |
|
160 | -else if (post_str("toggleenabled", true)) { |
|
154 | +} else if (post_str("toggleenabled", true)) { |
|
161 | 155 | mct_toggle_field("enabled"); |
162 | -} |
|
163 | -else if (post_str("toggleprivacypref", true)) { |
|
156 | +} else if (post_str("toggleprivacypref", true)) { |
|
164 | 157 | mct_toggle_field("privacypref"); |
165 | 158 | } |
166 | 159 |
@@ -4,110 +4,110 @@ |
||
4 | 4 | * Implementation of hook_user_default_permissions(). |
5 | 5 | */ |
6 | 6 | function discussion_forums_user_default_permissions() { |
7 | - $permissions = array(); |
|
7 | + $permissions = array(); |
|
8 | 8 | |
9 | - // Exported permission: access comments |
|
10 | - $permissions['access comments'] = array( |
|
9 | + // Exported permission: access comments |
|
10 | + $permissions['access comments'] = array( |
|
11 | 11 | 'name' => 'access comments', |
12 | 12 | 'roles' => array( |
13 | - '0' => 'administrator', |
|
14 | - '1' => 'anonymous user', |
|
15 | - '2' => 'authenticated user', |
|
13 | + '0' => 'administrator', |
|
14 | + '1' => 'anonymous user', |
|
15 | + '2' => 'authenticated user', |
|
16 | 16 | ), |
17 | - ); |
|
17 | + ); |
|
18 | 18 | |
19 | - // Exported permission: administer comments |
|
20 | - $permissions['administer comments'] = array( |
|
19 | + // Exported permission: administer comments |
|
20 | + $permissions['administer comments'] = array( |
|
21 | 21 | 'name' => 'administer comments', |
22 | 22 | 'roles' => array( |
23 | - '0' => 'administrator', |
|
24 | - '1' => 'moderator', |
|
23 | + '0' => 'administrator', |
|
24 | + '1' => 'moderator', |
|
25 | 25 | ), |
26 | - ); |
|
26 | + ); |
|
27 | 27 | |
28 | - // Exported permission: administer forums |
|
29 | - $permissions['administer forums'] = array( |
|
28 | + // Exported permission: administer forums |
|
29 | + $permissions['administer forums'] = array( |
|
30 | 30 | 'name' => 'administer forums', |
31 | 31 | 'roles' => array( |
32 | - '0' => 'administrator', |
|
32 | + '0' => 'administrator', |
|
33 | 33 | ), |
34 | - ); |
|
34 | + ); |
|
35 | 35 | |
36 | - // Exported permission: assign community member role |
|
37 | - $permissions['assign community member role'] = array( |
|
36 | + // Exported permission: assign community member role |
|
37 | + $permissions['assign community member role'] = array( |
|
38 | 38 | 'name' => 'assign community member role', |
39 | 39 | 'roles' => array( |
40 | - '0' => 'moderator', |
|
40 | + '0' => 'moderator', |
|
41 | 41 | ), |
42 | - ); |
|
42 | + ); |
|
43 | 43 | |
44 | - // Exported permission: create forum topics |
|
45 | - $permissions['create forum topics'] = array( |
|
44 | + // Exported permission: create forum topics |
|
45 | + $permissions['create forum topics'] = array( |
|
46 | 46 | 'name' => 'create forum topics', |
47 | 47 | 'roles' => array( |
48 | - '0' => 'administrator', |
|
49 | - '1' => 'community member', |
|
50 | - '2' => 'moderator', |
|
51 | - '3' => 'verified contributor', |
|
48 | + '0' => 'administrator', |
|
49 | + '1' => 'community member', |
|
50 | + '2' => 'moderator', |
|
51 | + '3' => 'verified contributor', |
|
52 | 52 | ), |
53 | - ); |
|
53 | + ); |
|
54 | 54 | |
55 | - // Exported permission: delete any forum topic |
|
56 | - $permissions['delete any forum topic'] = array( |
|
55 | + // Exported permission: delete any forum topic |
|
56 | + $permissions['delete any forum topic'] = array( |
|
57 | 57 | 'name' => 'delete any forum topic', |
58 | 58 | 'roles' => array( |
59 | - '0' => 'administrator', |
|
59 | + '0' => 'administrator', |
|
60 | 60 | ), |
61 | - ); |
|
61 | + ); |
|
62 | 62 | |
63 | - // Exported permission: delete own forum topics |
|
64 | - $permissions['delete own forum topics'] = array( |
|
63 | + // Exported permission: delete own forum topics |
|
64 | + $permissions['delete own forum topics'] = array( |
|
65 | 65 | 'name' => 'delete own forum topics', |
66 | 66 | 'roles' => array( |
67 | - '0' => 'administrator', |
|
67 | + '0' => 'administrator', |
|
68 | 68 | ), |
69 | - ); |
|
69 | + ); |
|
70 | 70 | |
71 | - // Exported permission: edit any forum topic |
|
72 | - $permissions['edit any forum topic'] = array( |
|
71 | + // Exported permission: edit any forum topic |
|
72 | + $permissions['edit any forum topic'] = array( |
|
73 | 73 | 'name' => 'edit any forum topic', |
74 | 74 | 'roles' => array( |
75 | - '0' => 'administrator', |
|
76 | - '1' => 'moderator', |
|
75 | + '0' => 'administrator', |
|
76 | + '1' => 'moderator', |
|
77 | 77 | ), |
78 | - ); |
|
78 | + ); |
|
79 | 79 | |
80 | - // Exported permission: edit own forum topics |
|
81 | - $permissions['edit own forum topics'] = array( |
|
80 | + // Exported permission: edit own forum topics |
|
81 | + $permissions['edit own forum topics'] = array( |
|
82 | 82 | 'name' => 'edit own forum topics', |
83 | 83 | 'roles' => array( |
84 | - '0' => 'administrator', |
|
85 | - '1' => 'community member', |
|
86 | - '2' => 'verified contributor', |
|
84 | + '0' => 'administrator', |
|
85 | + '1' => 'community member', |
|
86 | + '2' => 'verified contributor', |
|
87 | 87 | ), |
88 | - ); |
|
88 | + ); |
|
89 | 89 | |
90 | - // Exported permission: post comments |
|
91 | - $permissions['post comments'] = array( |
|
90 | + // Exported permission: post comments |
|
91 | + $permissions['post comments'] = array( |
|
92 | 92 | 'name' => 'post comments', |
93 | 93 | 'roles' => array( |
94 | - '0' => 'administrator', |
|
95 | - '1' => 'community member', |
|
96 | - '2' => 'moderator', |
|
97 | - '3' => 'verified contributor', |
|
94 | + '0' => 'administrator', |
|
95 | + '1' => 'community member', |
|
96 | + '2' => 'moderator', |
|
97 | + '3' => 'verified contributor', |
|
98 | 98 | ), |
99 | - ); |
|
99 | + ); |
|
100 | 100 | |
101 | - // Exported permission: post comments without approval |
|
102 | - $permissions['post comments without approval'] = array( |
|
101 | + // Exported permission: post comments without approval |
|
102 | + $permissions['post comments without approval'] = array( |
|
103 | 103 | 'name' => 'post comments without approval', |
104 | 104 | 'roles' => array( |
105 | - '0' => 'administrator', |
|
106 | - '1' => 'community member', |
|
107 | - '2' => 'moderator', |
|
108 | - '3' => 'verified contributor', |
|
105 | + '0' => 'administrator', |
|
106 | + '1' => 'community member', |
|
107 | + '2' => 'moderator', |
|
108 | + '3' => 'verified contributor', |
|
109 | 109 | ), |
110 | - ); |
|
110 | + ); |
|
111 | 111 | |
112 | - return $permissions; |
|
112 | + return $permissions; |
|
113 | 113 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | show_type($vers, $stats); |
156 | 156 | } |
157 | 157 | foreach ($data->darwin as $vers=>$state) { |
158 | - show_type("Darwin $vers", $state); |
|
158 | + show_type("darwin $vers", $state); |
|
159 | 159 | } |
160 | 160 | show_type("Linux total", $data->linux); |
161 | 161 | foreach ($data->other as $vers=>$stats) { |
@@ -22,14 +22,14 @@ |
||
22 | 22 | require_once("../inc/util.inc"); |
23 | 23 | require_once("../inc/cache.inc"); |
24 | 24 | |
25 | -$min_credit = .1; // only count hosts with this much RAC |
|
25 | +$min_credit = .1; // only count hosts with this much RAC |
|
26 | 26 | $total_rac = 0; |
27 | 27 | |
28 | 28 | define("CACHE_PERIOD", 7*86400); |
29 | 29 | |
30 | 30 | function show_type($type, $stats) { |
31 | 31 | global $total_rac; |
32 | - $pct = $total_rac?number_format(100*$stats->rac/$total_rac, 4):0; |
|
32 | + $pct = $total_rac ?number_format(100*$stats->rac/$total_rac, 4) : 0; |
|
33 | 33 | row_array(array($type, $stats->nhosts, "$pct %")); |
34 | 34 | } |
35 | 35 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | start_table(); |
28 | 28 | echo " |
29 | 29 | <tr><td>" |
30 | - . tra("Leader boards for %1",PROJECT).": |
|
30 | + . tra("Leader boards for %1", PROJECT).": |
|
31 | 31 | <ul> |
32 | 32 | <li><a href=\"top_users.php\">" . tra("Participants")."</a> |
33 | 33 | "; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | if (!DISABLE_TEAMS) { |
39 | 39 | echo " |
40 | - <li><a href=\"top_teams.php\">" . tra("Teams"). "</a> |
|
40 | + <li><a href=\"top_teams.php\">" . tra("Teams")."</a> |
|
41 | 41 | "; |
42 | 42 | if ($credit_by_app) { |
43 | 43 | echo "<ul><li><a href=per_app_list.php?is_team=1>Per application</a></ul>\n"; |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * Helper functions |
10 | 10 | */ |
11 | 11 | function _boincuser_delete_goto_admindelete($form, &$form_state) { |
12 | - drupal_goto('/admin/boinc/user_delete/' . $form['#uid']); |
|
12 | + drupal_goto('/admin/boinc/user_delete/'.$form['#uid']); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | function _boincuser_delete_cancel($form, &$form_state) { |
16 | - drupal_goto('/user/' . $form['#uid'] . '/edit'); |
|
16 | + drupal_goto('/user/'.$form['#uid'].'/edit'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | return form_set_error('current_pass', bts('Authentication is required when requesting account deletion.', array(), NULL, 'boinc:delete-user-account')); |
25 | 25 | } |
26 | 26 | |
27 | - $given_hash = md5($current_pass . $boinc_user->email_addr); |
|
27 | + $given_hash = md5($current_pass.$boinc_user->email_addr); |
|
28 | 28 | |
29 | - if ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) { |
|
29 | + if ((!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash)) { |
|
30 | 30 | return form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:delete-user-account')); |
31 | 31 | } |
32 | 32 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Delete the user function. |
42 | 42 | */ |
43 | -function _boincuser_delete_deleteuser($account, $action=NULL) { |
|
43 | +function _boincuser_delete_deleteuser($account, $action = NULL) { |
|
44 | 44 | require_boinc('user_util'); |
45 | 45 | require_boinc('delete_account'); |
46 | 46 | |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | // * erase signature |
75 | 75 | $myarray = array( |
76 | 76 | 'status' => 0, |
77 | - 'name' => 'deleted_' . time() . '_' . random_string(), |
|
78 | - 'mail' => 'deleted_' . time() . '_' . random_string(), |
|
79 | - 'pass' => 'deleted_' . time() . '_' . random_string(), |
|
77 | + 'name' => 'deleted_'.time().'_'.random_string(), |
|
78 | + 'mail' => 'deleted_'.time().'_'.random_string(), |
|
79 | + 'pass' => 'deleted_'.time().'_'.random_string(), |
|
80 | 80 | 'signature' => '', |
81 | - 'init' => 'deleted_' . time() . '_' . random_string(), |
|
81 | + 'init' => 'deleted_'.time().'_'.random_string(), |
|
82 | 82 | ); |
83 | 83 | user_save($account, $myarray); |
84 | 84 | break; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | if (!empty($mids)) { |
132 | 132 | // Delete recipient entries in {pm_index} of the messages the user wrote. |
133 | - db_query('DELETE FROM {pm_index} WHERE mid IN (' . db_placeholders($mids) . ')', $mids); |
|
133 | + db_query('DELETE FROM {pm_index} WHERE mid IN ('.db_placeholders($mids).')', $mids); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | // Delete recipient entries of that user. |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | */ |
22 | 22 | function _boincuser_delete_validatepasswd($boinc_user, $current_pass) { |
23 | 23 | if (!$current_pass) { |
24 | - return form_set_error('current_pass', bts('Authentication is required when requesting account deletion.', array(), NULL, 'boinc:delete-user-account')); |
|
24 | + return form_set_error('current_pass', bts('Authentication is required when requesting account deletion.', array(), null, 'boinc:delete-user-account')); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | $given_hash = md5($current_pass . $boinc_user->email_addr); |
28 | 28 | |
29 | 29 | if ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) { |
30 | - return form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:delete-user-account')); |
|
30 | + return form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), null, 'boinc:delete-user-account')); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | return true; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Delete the user function. |
42 | 42 | */ |
43 | -function _boincuser_delete_deleteuser($account, $action=NULL) { |
|
43 | +function _boincuser_delete_deleteuser($account, $action=null) { |
|
44 | 44 | require_boinc('user_util'); |
45 | 45 | require_boinc('delete_account'); |
46 | 46 |
@@ -9,28 +9,28 @@ discard block |
||
9 | 9 | * Helper functions |
10 | 10 | */ |
11 | 11 | function _boincuser_delete_goto_admindelete($form, &$form_state) { |
12 | - drupal_goto('/admin/boinc/user_delete/' . $form['#uid']); |
|
12 | + drupal_goto('/admin/boinc/user_delete/' . $form['#uid']); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | function _boincuser_delete_cancel($form, &$form_state) { |
16 | - drupal_goto('/user/' . $form['#uid'] . '/edit'); |
|
16 | + drupal_goto('/user/' . $form['#uid'] . '/edit'); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Validation user password function. |
21 | 21 | */ |
22 | 22 | function _boincuser_delete_validatepasswd($boinc_user, $current_pass) { |
23 | - if (!$current_pass) { |
|
23 | + if (!$current_pass) { |
|
24 | 24 | return form_set_error('current_pass', bts('Authentication is required when requesting account deletion.', array(), NULL, 'boinc:delete-user-account')); |
25 | - } |
|
25 | + } |
|
26 | 26 | |
27 | - $given_hash = md5($current_pass . $boinc_user->email_addr); |
|
27 | + $given_hash = md5($current_pass . $boinc_user->email_addr); |
|
28 | 28 | |
29 | - if ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) { |
|
29 | + if ( (!password_verify($given_hash, $boinc_user->passwd_hash)) and ($given_hash != $boinc_user->passwd_hash) ) { |
|
30 | 30 | return form_set_error('current_pass', bts('Password entered is not valid. Please verify that it is correct.', array(), NULL, 'boinc:delete-user-account')); |
31 | - } |
|
31 | + } |
|
32 | 32 | |
33 | - return true; |
|
33 | + return true; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * |
@@ -41,56 +41,56 @@ discard block |
||
41 | 41 | * Delete the user function. |
42 | 42 | */ |
43 | 43 | function _boincuser_delete_deleteuser($account, $action=NULL) { |
44 | - require_boinc('user_util'); |
|
45 | - require_boinc('delete_account'); |
|
44 | + require_boinc('user_util'); |
|
45 | + require_boinc('delete_account'); |
|
46 | 46 | |
47 | - $boinc_user = BoincUser::lookup_id($account->boincuser_id); |
|
47 | + $boinc_user = BoincUser::lookup_id($account->boincuser_id); |
|
48 | 48 | |
49 | - // watchdog message |
|
50 | - watchdog('boincuser_delete', 'Deleting account drupal UID: %uid, BOINC id: %boincuser_id., BOINC displayname: %displayname', |
|
51 | - array( |
|
49 | + // watchdog message |
|
50 | + watchdog('boincuser_delete', 'Deleting account drupal UID: %uid, BOINC id: %boincuser_id., BOINC displayname: %displayname', |
|
51 | + array( |
|
52 | 52 | '%uid' => $account->uid, |
53 | 53 | '%boincuser_id' => $account->boincuser_id, |
54 | 54 | '%displayname' => $account->boincuser_name, |
55 | - ), WATCHDOG_NOTICE); |
|
55 | + ), WATCHDOG_NOTICE); |
|
56 | 56 | |
57 | - // delete the account - This will delete the boinc user from the |
|
58 | - // boinc project database, and then delete the Drupal user using the |
|
59 | - // hook_user() functions. |
|
57 | + // delete the account - This will delete the boinc user from the |
|
58 | + // boinc project database, and then delete the Drupal user using the |
|
59 | + // hook_user() functions. |
|
60 | 60 | |
61 | - switch ($action) { |
|
61 | + switch ($action) { |
|
62 | 62 | case 'soft_obfuscate': |
63 | 63 | obfuscate_account($boinc_user); |
64 | - _boincuser_delete_comment_reassign($account); |
|
65 | - _boincuser_delete_node_reassign($account); |
|
66 | - _boincuser_delete_privatemsg_delete($account); |
|
67 | - _boincuser_delete_friends($account); |
|
68 | - // delete the user's profile |
|
69 | - $profile = content_profile_load('profile', $account->uid); |
|
70 | - node_delete($profile->nid); |
|
71 | - // Drupal account - |
|
72 | - // * 'block'/disable the account |
|
73 | - // * set name, mail, pass, and init to deleted |
|
74 | - // * erase signature |
|
75 | - $myarray = array( |
|
64 | + _boincuser_delete_comment_reassign($account); |
|
65 | + _boincuser_delete_node_reassign($account); |
|
66 | + _boincuser_delete_privatemsg_delete($account); |
|
67 | + _boincuser_delete_friends($account); |
|
68 | + // delete the user's profile |
|
69 | + $profile = content_profile_load('profile', $account->uid); |
|
70 | + node_delete($profile->nid); |
|
71 | + // Drupal account - |
|
72 | + // * 'block'/disable the account |
|
73 | + // * set name, mail, pass, and init to deleted |
|
74 | + // * erase signature |
|
75 | + $myarray = array( |
|
76 | 76 | 'status' => 0, |
77 | 77 | 'name' => 'deleted_' . time() . '_' . random_string(), |
78 | 78 | 'mail' => 'deleted_' . time() . '_' . random_string(), |
79 | 79 | 'pass' => 'deleted_' . time() . '_' . random_string(), |
80 | 80 | 'signature' => '', |
81 | 81 | 'init' => 'deleted_' . time() . '_' . random_string(), |
82 | - ); |
|
83 | - user_save($account, $myarray); |
|
84 | - break; |
|
82 | + ); |
|
83 | + user_save($account, $myarray); |
|
84 | + break; |
|
85 | 85 | case 'hard_wipe': |
86 | 86 | wipe_account($boinc_user); |
87 | - user_delete(array(), $account->uid); |
|
88 | - break; |
|
87 | + user_delete(array(), $account->uid); |
|
88 | + break; |
|
89 | 89 | default: |
90 | 90 | watchdog('boincuser_delete', 'Delete action is %action, which is not \'soft_obfuscate\' or \'hard_wipe\'.', array( |
91 | 91 | '%action' => $action, |
92 | - ), WATCHDOG_ERROR); |
|
93 | - } |
|
92 | + ), WATCHDOG_ERROR); |
|
93 | + } |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | * Copied from node.module, node_user() |
100 | 100 | */ |
101 | 101 | function _boincuser_delete_node_reassign($account) { |
102 | - db_query('UPDATE {node} SET uid = 0 WHERE uid = %d', $account->uid); |
|
103 | - db_query('UPDATE {node_revisions} SET uid = 0 WHERE uid = %d', $account->uid); |
|
102 | + db_query('UPDATE {node} SET uid = 0 WHERE uid = %d', $account->uid); |
|
103 | + db_query('UPDATE {node_revisions} SET uid = 0 WHERE uid = %d', $account->uid); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | * Copied from comment.module, comment_user() |
110 | 110 | */ |
111 | 111 | function _boincuser_delete_comment_reassign($account) { |
112 | - // bug in comment module, remove user name from comments. |
|
113 | - db_query("UPDATE {comments} SET comments.name='' WHERE uid =%d", $account->uid); |
|
112 | + // bug in comment module, remove user name from comments. |
|
113 | + db_query("UPDATE {comments} SET comments.name='' WHERE uid =%d", $account->uid); |
|
114 | 114 | |
115 | - db_query('UPDATE {comments} SET uid = 0 WHERE uid = %d', $account->uid); |
|
116 | - db_query('UPDATE {node_comment_statistics} SET last_comment_uid = 0 WHERE last_comment_uid = %d', $account->uid); |
|
115 | + db_query('UPDATE {comments} SET uid = 0 WHERE uid = %d', $account->uid); |
|
116 | + db_query('UPDATE {node_comment_statistics} SET last_comment_uid = 0 WHERE last_comment_uid = %d', $account->uid); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -122,23 +122,23 @@ discard block |
||
122 | 122 | * Copied from privatemsg module, case 'delete' in privatemsg_user(). |
123 | 123 | */ |
124 | 124 | function _boincuser_delete_privatemsg_delete($account) { |
125 | - // Load all mids of the messages the user wrote. |
|
126 | - $result = db_query("SELECT mid FROM {pm_message} WHERE author = %d", $account->uid); |
|
127 | - $mids = array(); |
|
128 | - while ($row = db_fetch_array($result)) { |
|
125 | + // Load all mids of the messages the user wrote. |
|
126 | + $result = db_query("SELECT mid FROM {pm_message} WHERE author = %d", $account->uid); |
|
127 | + $mids = array(); |
|
128 | + while ($row = db_fetch_array($result)) { |
|
129 | 129 | $mids[] = $row['mid']; |
130 | - } |
|
130 | + } |
|
131 | 131 | |
132 | - // Delete messages the user wrote. |
|
133 | - db_query('DELETE FROM {pm_message} WHERE author = %d', $account->uid); |
|
132 | + // Delete messages the user wrote. |
|
133 | + db_query('DELETE FROM {pm_message} WHERE author = %d', $account->uid); |
|
134 | 134 | |
135 | - if (!empty($mids)) { |
|
135 | + if (!empty($mids)) { |
|
136 | 136 | // Delete recipient entries in {pm_index} of the messages the user wrote. |
137 | 137 | db_query('DELETE FROM {pm_index} WHERE mid IN (' . db_placeholders($mids) . ')', $mids); |
138 | - } |
|
138 | + } |
|
139 | 139 | |
140 | - // Delete recipient entries of that user. |
|
141 | - db_query('DELETE FROM {pm_index} WHERE uid = %d', $account->uid); |
|
140 | + // Delete recipient entries of that user. |
|
141 | + db_query('DELETE FROM {pm_index} WHERE uid = %d', $account->uid); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -147,6 +147,6 @@ discard block |
||
147 | 147 | * Copied from flag_friend, flag_friend_user() |
148 | 148 | */ |
149 | 149 | function _boincuser_delete_friends($account) { |
150 | - // remove any friend relationships if an account is removed |
|
150 | + // remove any friend relationships if an account is removed |
|
151 | 151 | db_query("DELETE FROM {flag_friend} WHERE uid = %d OR friend_uid = %d", $account->uid, $account->uid); |
152 | 152 | } |
153 | 153 | \ No newline at end of file |
@@ -59,37 +59,37 @@ |
||
59 | 59 | // hook_user() functions. |
60 | 60 | |
61 | 61 | switch ($action) { |
62 | - case 'soft_obfuscate': |
|
63 | - obfuscate_account($boinc_user); |
|
64 | - _boincuser_delete_comment_reassign($account); |
|
65 | - _boincuser_delete_node_reassign($account); |
|
66 | - _boincuser_delete_privatemsg_delete($account); |
|
67 | - _boincuser_delete_friends($account); |
|
68 | - // delete the user's profile |
|
69 | - $profile = content_profile_load('profile', $account->uid); |
|
70 | - node_delete($profile->nid); |
|
71 | - // Drupal account - |
|
72 | - // * 'block'/disable the account |
|
73 | - // * set name, mail, pass, and init to deleted |
|
74 | - // * erase signature |
|
75 | - $myarray = array( |
|
76 | - 'status' => 0, |
|
77 | - 'name' => 'deleted_' . time() . '_' . random_string(), |
|
78 | - 'mail' => 'deleted_' . time() . '_' . random_string(), |
|
79 | - 'pass' => 'deleted_' . time() . '_' . random_string(), |
|
80 | - 'signature' => '', |
|
81 | - 'init' => 'deleted_' . time() . '_' . random_string(), |
|
82 | - ); |
|
83 | - user_save($account, $myarray); |
|
84 | - break; |
|
85 | - case 'hard_wipe': |
|
86 | - wipe_account($boinc_user); |
|
87 | - user_delete(array(), $account->uid); |
|
88 | - break; |
|
89 | - default: |
|
90 | - watchdog('boincuser_delete', 'Delete action is %action, which is not \'soft_obfuscate\' or \'hard_wipe\'.', array( |
|
91 | - '%action' => $action, |
|
92 | - ), WATCHDOG_ERROR); |
|
62 | + case 'soft_obfuscate': |
|
63 | + obfuscate_account($boinc_user); |
|
64 | + _boincuser_delete_comment_reassign($account); |
|
65 | + _boincuser_delete_node_reassign($account); |
|
66 | + _boincuser_delete_privatemsg_delete($account); |
|
67 | + _boincuser_delete_friends($account); |
|
68 | + // delete the user's profile |
|
69 | + $profile = content_profile_load('profile', $account->uid); |
|
70 | + node_delete($profile->nid); |
|
71 | + // Drupal account - |
|
72 | + // * 'block'/disable the account |
|
73 | + // * set name, mail, pass, and init to deleted |
|
74 | + // * erase signature |
|
75 | + $myarray = array( |
|
76 | + 'status' => 0, |
|
77 | + 'name' => 'deleted_' . time() . '_' . random_string(), |
|
78 | + 'mail' => 'deleted_' . time() . '_' . random_string(), |
|
79 | + 'pass' => 'deleted_' . time() . '_' . random_string(), |
|
80 | + 'signature' => '', |
|
81 | + 'init' => 'deleted_' . time() . '_' . random_string(), |
|
82 | + ); |
|
83 | + user_save($account, $myarray); |
|
84 | + break; |
|
85 | + case 'hard_wipe': |
|
86 | + wipe_account($boinc_user); |
|
87 | + user_delete(array(), $account->uid); |
|
88 | + break; |
|
89 | + default: |
|
90 | + watchdog('boincuser_delete', 'Delete action is %action, which is not \'soft_obfuscate\' or \'hard_wipe\'.', array( |
|
91 | + '%action' => $action, |
|
92 | + ), WATCHDOG_ERROR); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | */ |
6 | 6 | function boinc_standard_default_page_manager_pages() { |
7 | 7 | $page = new stdClass; |
8 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
8 | + $page->disabled = false; /* Edit this to true to make a default page disabled initially */ |
|
9 | 9 | $page->api_version = 1; |
10 | 10 | $page->name = 'about_us'; |
11 | 11 | $page->task = 'page'; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $page->path = 'about.fail'; |
15 | 15 | $page->access = array( |
16 | 16 | 'type' => 'none', |
17 | - 'settings' => NULL, |
|
17 | + 'settings' => null, |
|
18 | 18 | ); |
19 | 19 | $page->menu = array(); |
20 | 20 | $page->arguments = array(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $pages['about_us'] = $page; |
24 | 24 | |
25 | 25 | $page = new stdClass; |
26 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
26 | + $page->disabled = false; /* Edit this to true to make a default page disabled initially */ |
|
27 | 27 | $page->api_version = 1; |
28 | 28 | $page->name = 'account_dashboard'; |
29 | 29 | $page->task = 'page'; |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | ), |
41 | 41 | ), |
42 | 42 | 'context' => 'logged-in-user', |
43 | - 'not' => FALSE, |
|
43 | + 'not' => false, |
|
44 | 44 | ), |
45 | 45 | ), |
46 | 46 | 'logic' => 'and', |
47 | 47 | 'type' => 'none', |
48 | - 'settings' => NULL, |
|
48 | + 'settings' => null, |
|
49 | 49 | ); |
50 | 50 | $page->menu = array( |
51 | 51 | 'type' => 'none', |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $page->conf = array(); |
64 | 64 | $page->default_handlers = array(); |
65 | 65 | $handler = new stdClass; |
66 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
66 | + $handler->disabled = false; /* Edit this to true to make a default handler disabled initially */ |
|
67 | 67 | $handler->api_version = 1; |
68 | 68 | $handler->name = 'page_account_dashboard_panel_context'; |
69 | 69 | $handler->task = 'page'; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $handler->weight = 0; |
73 | 73 | $handler->conf = array( |
74 | 74 | 'title' => 'Landing page', |
75 | - 'no_blocks' => FALSE, |
|
75 | + 'no_blocks' => false, |
|
76 | 76 | 'pipeline' => 'ipe', |
77 | 77 | 'css_id' => '', |
78 | 78 | 'css' => '', |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | $display->layout_settings = array(); |
101 | 101 | $display->panel_settings = array( |
102 | 102 | 'style_settings' => array( |
103 | - 'default' => NULL, |
|
104 | - 'content' => NULL, |
|
105 | - 'sidebar_first' => NULL, |
|
103 | + 'default' => null, |
|
104 | + 'content' => null, |
|
105 | + 'sidebar_first' => null, |
|
106 | 106 | ), |
107 | 107 | ); |
108 | 108 | $display->cache = array(); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $pane->panel = 'content'; |
117 | 117 | $pane->type = 'panels_mini'; |
118 | 118 | $pane->subtype = 'dashboard_tables'; |
119 | - $pane->shown = TRUE; |
|
119 | + $pane->shown = true; |
|
120 | 120 | $pane->access = array(); |
121 | 121 | $pane->configuration = array( |
122 | 122 | 'override_title' => 1, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ); |
125 | 125 | $pane->cache = array(); |
126 | 126 | $pane->style = array( |
127 | - 'settings' => NULL, |
|
127 | + 'settings' => null, |
|
128 | 128 | ); |
129 | 129 | $pane->css = array( |
130 | 130 | 'css_id' => '', |
@@ -139,12 +139,12 @@ discard block |
||
139 | 139 | $pane->panel = 'content'; |
140 | 140 | $pane->type = 'views_panes'; |
141 | 141 | $pane->subtype = 'subscriptions-panel_pane_1'; |
142 | - $pane->shown = TRUE; |
|
142 | + $pane->shown = true; |
|
143 | 143 | $pane->access = array(); |
144 | 144 | $pane->configuration = array(); |
145 | 145 | $pane->cache = array(); |
146 | 146 | $pane->style = array( |
147 | - 'settings' => NULL, |
|
147 | + 'settings' => null, |
|
148 | 148 | ); |
149 | 149 | $pane->css = array( |
150 | 150 | 'css_id' => '', |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $pane->panel = 'sidebar_first'; |
160 | 160 | $pane->type = 'custom'; |
161 | 161 | $pane->subtype = 'custom'; |
162 | - $pane->shown = TRUE; |
|
162 | + $pane->shown = true; |
|
163 | 163 | $pane->access = array( |
164 | 164 | 'plugins' => array( |
165 | 165 | 1 => array( |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'perm' => 'edit any profile content', |
169 | 169 | ), |
170 | 170 | 'context' => 'context_user_1', |
171 | - 'not' => FALSE, |
|
171 | + 'not' => false, |
|
172 | 172 | ), |
173 | 173 | ), |
174 | 174 | ); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | ); |
182 | 182 | $pane->cache = array(); |
183 | 183 | $pane->style = array( |
184 | - 'settings' => NULL, |
|
184 | + 'settings' => null, |
|
185 | 185 | ); |
186 | 186 | $pane->css = array( |
187 | 187 | 'css_id' => '', |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $pane->panel = 'sidebar_first'; |
197 | 197 | $pane->type = 'panels_mini'; |
198 | 198 | $pane->subtype = 'user_mail_summary'; |
199 | - $pane->shown = TRUE; |
|
199 | + $pane->shown = true; |
|
200 | 200 | $pane->access = array(); |
201 | 201 | $pane->configuration = array( |
202 | 202 | 'override_title' => 0, |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | ); |
205 | 205 | $pane->cache = array(); |
206 | 206 | $pane->style = array( |
207 | - 'settings' => NULL, |
|
207 | + 'settings' => null, |
|
208 | 208 | ); |
209 | 209 | $pane->css = array( |
210 | 210 | 'css_id' => '', |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $pane->panel = 'sidebar_first'; |
220 | 220 | $pane->type = 'custom'; |
221 | 221 | $pane->subtype = 'custom'; |
222 | - $pane->shown = TRUE; |
|
222 | + $pane->shown = true; |
|
223 | 223 | $pane->access = array(); |
224 | 224 | $pane->configuration = array( |
225 | 225 | 'admin_title' => 'Team summary', |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | ); |
235 | 235 | $pane->cache = array(); |
236 | 236 | $pane->style = array( |
237 | - 'settings' => NULL, |
|
237 | + 'settings' => null, |
|
238 | 238 | ); |
239 | 239 | $pane->css = array( |
240 | 240 | 'css_id' => 'team-dashboard-pane', |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $pane->panel = 'sidebar_first'; |
250 | 250 | $pane->type = 'custom'; |
251 | 251 | $pane->subtype = 'custom'; |
252 | - $pane->shown = TRUE; |
|
252 | + $pane->shown = true; |
|
253 | 253 | $pane->access = array(); |
254 | 254 | $pane->configuration = array( |
255 | 255 | 'admin_title' => 'User activity summary', |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | ); |
269 | 269 | $pane->cache = array(); |
270 | 270 | $pane->style = array( |
271 | - 'settings' => NULL, |
|
271 | + 'settings' => null, |
|
272 | 272 | ); |
273 | 273 | $pane->css = array( |
274 | 274 | 'css_id' => '', |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $pane->panel = 'sidebar_first'; |
284 | 284 | $pane->type = 'views'; |
285 | 285 | $pane->subtype = 'boinc_friends'; |
286 | - $pane->shown = TRUE; |
|
286 | + $pane->shown = true; |
|
287 | 287 | $pane->access = array(); |
288 | 288 | $pane->configuration = array( |
289 | 289 | 'override_pager_settings' => 0, |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | ); |
307 | 307 | $pane->cache = array(); |
308 | 308 | $pane->style = array( |
309 | - 'settings' => NULL, |
|
309 | + 'settings' => null, |
|
310 | 310 | ); |
311 | 311 | $pane->css = array( |
312 | 312 | 'css_id' => '', |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $pages['account_dashboard'] = $page; |
324 | 324 | |
325 | 325 | $page = new stdClass; |
326 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
326 | + $page->disabled = false; /* Edit this to true to make a default page disabled initially */ |
|
327 | 327 | $page->api_version = 1; |
328 | 328 | $page->name = 'boinc_user'; |
329 | 329 | $page->task = 'page'; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | $page->path = 'account/%user'; |
333 | 333 | $page->access = array( |
334 | 334 | 'type' => 'none', |
335 | - 'settings' => NULL, |
|
335 | + 'settings' => null, |
|
336 | 336 | ); |
337 | 337 | $page->menu = array(); |
338 | 338 | $page->arguments = array( |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $page->conf = array(); |
347 | 347 | $page->default_handlers = array(); |
348 | 348 | $handler = new stdClass; |
349 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
349 | + $handler->disabled = false; /* Edit this to true to make a default handler disabled initially */ |
|
350 | 350 | $handler->api_version = 1; |
351 | 351 | $handler->name = 'page_boinc_user_panel_context_2'; |
352 | 352 | $handler->task = 'page'; |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | return ($account->status); |
372 | 372 | ', |
373 | 373 | ), |
374 | - 'not' => FALSE, |
|
374 | + 'not' => false, |
|
375 | 375 | ), |
376 | 376 | ), |
377 | 377 | 'logic' => 'and', |
@@ -382,9 +382,9 @@ discard block |
||
382 | 382 | $display->layout_settings = array(); |
383 | 383 | $display->panel_settings = array( |
384 | 384 | 'style_settings' => array( |
385 | - 'default' => NULL, |
|
386 | - 'content' => NULL, |
|
387 | - 'sidebar_first' => NULL, |
|
385 | + 'default' => null, |
|
386 | + 'content' => null, |
|
387 | + 'sidebar_first' => null, |
|
388 | 388 | ), |
389 | 389 | ); |
390 | 390 | $display->cache = array(); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $pane->panel = 'content'; |
399 | 399 | $pane->type = 'panels_mini'; |
400 | 400 | $pane->subtype = 'user_profile'; |
401 | - $pane->shown = TRUE; |
|
401 | + $pane->shown = true; |
|
402 | 402 | $pane->access = array(); |
403 | 403 | $pane->configuration = array( |
404 | 404 | 'context' => array( |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | ); |
410 | 410 | $pane->cache = array(); |
411 | 411 | $pane->style = array( |
412 | - 'settings' => NULL, |
|
412 | + 'settings' => null, |
|
413 | 413 | ); |
414 | 414 | $pane->css = array( |
415 | 415 | 'css_id' => '', |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $pane->panel = 'sidebar_first'; |
425 | 425 | $pane->type = 'views_panes'; |
426 | 426 | $pane->subtype = 'boinc_account_stats-panel_pane_2'; |
427 | - $pane->shown = TRUE; |
|
427 | + $pane->shown = true; |
|
428 | 428 | $pane->access = array(); |
429 | 429 | $pane->configuration = array( |
430 | 430 | 'override_title' => 0, |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | ); |
433 | 433 | $pane->cache = array(); |
434 | 434 | $pane->style = array( |
435 | - 'settings' => NULL, |
|
435 | + 'settings' => null, |
|
436 | 436 | ); |
437 | 437 | $pane->css = array( |
438 | 438 | 'css_id' => '', |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | $pane->panel = 'sidebar_first'; |
448 | 448 | $pane->type = 'custom'; |
449 | 449 | $pane->subtype = 'custom'; |
450 | - $pane->shown = TRUE; |
|
450 | + $pane->shown = true; |
|
451 | 451 | $pane->access = array(); |
452 | 452 | $pane->configuration = array( |
453 | 453 | 'admin_title' => 'Team summary', |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | ); |
463 | 463 | $pane->cache = array(); |
464 | 464 | $pane->style = array( |
465 | - 'settings' => NULL, |
|
465 | + 'settings' => null, |
|
466 | 466 | ); |
467 | 467 | $pane->css = array( |
468 | 468 | 'css_id' => 'team-dashboard-pane', |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | $pane->panel = 'sidebar_first'; |
478 | 478 | $pane->type = 'custom'; |
479 | 479 | $pane->subtype = 'custom'; |
480 | - $pane->shown = TRUE; |
|
480 | + $pane->shown = true; |
|
481 | 481 | $pane->access = array(); |
482 | 482 | $pane->configuration = array( |
483 | 483 | 'admin_title' => 'User activity summary', |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | ); |
496 | 496 | $pane->cache = array(); |
497 | 497 | $pane->style = array( |
498 | - 'settings' => NULL, |
|
498 | + 'settings' => null, |
|
499 | 499 | ); |
500 | 500 | $pane->css = array( |
501 | 501 | 'css_id' => '', |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $pane->panel = 'sidebar_first'; |
511 | 511 | $pane->type = 'views'; |
512 | 512 | $pane->subtype = 'boinc_friends'; |
513 | - $pane->shown = TRUE; |
|
513 | + $pane->shown = true; |
|
514 | 514 | $pane->access = array(); |
515 | 515 | $pane->configuration = array( |
516 | 516 | 'override_pager_settings' => 0, |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | ); |
534 | 534 | $pane->cache = array(); |
535 | 535 | $pane->style = array( |
536 | - 'settings' => NULL, |
|
536 | + 'settings' => null, |
|
537 | 537 | ); |
538 | 538 | $pane->css = array( |
539 | 539 | 'css_id' => '', |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $pane->panel = 'sidebar_first'; |
549 | 549 | $pane->type = 'custom'; |
550 | 550 | $pane->subtype = 'custom'; |
551 | - $pane->shown = TRUE; |
|
551 | + $pane->shown = true; |
|
552 | 552 | $pane->access = array(); |
553 | 553 | $pane->configuration = array( |
554 | 554 | 'admin_title' => 'Project list', |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | ); |
560 | 560 | $pane->cache = array(); |
561 | 561 | $pane->style = array( |
562 | - 'settings' => NULL, |
|
562 | + 'settings' => null, |
|
563 | 563 | ); |
564 | 564 | $pane->css = array( |
565 | 565 | 'css_id' => '', |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $pages['boinc_user'] = $page; |
577 | 577 | |
578 | 578 | $page = new stdClass; |
579 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
579 | + $page->disabled = false; /* Edit this to true to make a default page disabled initially */ |
|
580 | 580 | $page->api_version = 1; |
581 | 581 | $page->name = 'home'; |
582 | 582 | $page->task = 'page'; |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $page->path = 'home'; |
586 | 586 | $page->access = array( |
587 | 587 | 'type' => 'none', |
588 | - 'settings' => NULL, |
|
588 | + 'settings' => null, |
|
589 | 589 | ); |
590 | 590 | $page->menu = array( |
591 | 591 | 'type' => 'normal', |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | $page->conf = array(); |
604 | 604 | $page->default_handlers = array(); |
605 | 605 | $handler = new stdClass; |
606 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
606 | + $handler->disabled = false; /* Edit this to true to make a default handler disabled initially */ |
|
607 | 607 | $handler->api_version = 1; |
608 | 608 | $handler->name = 'page_home_panel_context'; |
609 | 609 | $handler->task = 'page'; |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $handler->weight = 0; |
613 | 613 | $handler->conf = array( |
614 | 614 | 'title' => 'Landing page', |
615 | - 'no_blocks' => FALSE, |
|
615 | + 'no_blocks' => false, |
|
616 | 616 | 'pipeline' => 'ipe', |
617 | 617 | 'css_id' => '', |
618 | 618 | 'css' => '', |
@@ -624,9 +624,9 @@ discard block |
||
624 | 624 | $display->layout_settings = array(); |
625 | 625 | $display->panel_settings = array( |
626 | 626 | 'style_settings' => array( |
627 | - 'default' => NULL, |
|
628 | - 'content' => NULL, |
|
629 | - 'sidebar_first' => NULL, |
|
627 | + 'default' => null, |
|
628 | + 'content' => null, |
|
629 | + 'sidebar_first' => null, |
|
630 | 630 | ), |
631 | 631 | ); |
632 | 632 | $display->cache = array(); |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | $pane->panel = 'content'; |
641 | 641 | $pane->type = 'custom'; |
642 | 642 | $pane->subtype = 'custom'; |
643 | - $pane->shown = TRUE; |
|
643 | + $pane->shown = true; |
|
644 | 644 | $pane->access = array( |
645 | 645 | 'plugins' => array(), |
646 | 646 | ); |
@@ -649,11 +649,11 @@ discard block |
||
649 | 649 | 'title' => '', |
650 | 650 | 'body' => '<?php print boincuser_home_page(); ?>', |
651 | 651 | 'format' => '3', |
652 | - 'substitute' => TRUE, |
|
652 | + 'substitute' => true, |
|
653 | 653 | ); |
654 | 654 | $pane->cache = array(); |
655 | 655 | $pane->style = array( |
656 | - 'settings' => NULL, |
|
656 | + 'settings' => null, |
|
657 | 657 | ); |
658 | 658 | $pane->css = array( |
659 | 659 | 'css_id' => '', |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | $pane->panel = 'sidebar_first'; |
669 | 669 | $pane->type = 'panels_mini'; |
670 | 670 | $pane->subtype = 'project_stats_overview'; |
671 | - $pane->shown = TRUE; |
|
671 | + $pane->shown = true; |
|
672 | 672 | $pane->access = array(); |
673 | 673 | $pane->configuration = array( |
674 | 674 | 'override_title' => 0, |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | ); |
677 | 677 | $pane->cache = array(); |
678 | 678 | $pane->style = array( |
679 | - 'settings' => NULL, |
|
679 | + 'settings' => null, |
|
680 | 680 | ); |
681 | 681 | $pane->css = array( |
682 | 682 | 'css_id' => '', |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $pane->panel = 'sidebar_first'; |
692 | 692 | $pane->type = 'views'; |
693 | 693 | $pane->subtype = 'news'; |
694 | - $pane->shown = TRUE; |
|
694 | + $pane->shown = true; |
|
695 | 695 | $pane->access = array(); |
696 | 696 | $pane->configuration = array( |
697 | 697 | 'override_pager_settings' => 1, |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | ); |
712 | 712 | $pane->cache = array(); |
713 | 713 | $pane->style = array( |
714 | - 'settings' => NULL, |
|
714 | + 'settings' => null, |
|
715 | 715 | ); |
716 | 716 | $pane->css = array( |
717 | 717 | 'css_id' => '', |
@@ -4,113 +4,113 @@ discard block |
||
4 | 4 | * Implementation of hook_default_page_manager_pages(). |
5 | 5 | */ |
6 | 6 | function boinc_standard_default_page_manager_pages() { |
7 | - $page = new stdClass; |
|
8 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
9 | - $page->api_version = 1; |
|
10 | - $page->name = 'about_us'; |
|
11 | - $page->task = 'page'; |
|
12 | - $page->admin_title = 'About Us'; |
|
13 | - $page->admin_description = ''; |
|
14 | - $page->path = 'about.fail'; |
|
15 | - $page->access = array( |
|
7 | + $page = new stdClass; |
|
8 | + $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
9 | + $page->api_version = 1; |
|
10 | + $page->name = 'about_us'; |
|
11 | + $page->task = 'page'; |
|
12 | + $page->admin_title = 'About Us'; |
|
13 | + $page->admin_description = ''; |
|
14 | + $page->path = 'about.fail'; |
|
15 | + $page->access = array( |
|
16 | 16 | 'type' => 'none', |
17 | 17 | 'settings' => NULL, |
18 | - ); |
|
19 | - $page->menu = array(); |
|
20 | - $page->arguments = array(); |
|
21 | - $page->conf = array(); |
|
22 | - $page->default_handlers = array(); |
|
23 | - $pages['about_us'] = $page; |
|
18 | + ); |
|
19 | + $page->menu = array(); |
|
20 | + $page->arguments = array(); |
|
21 | + $page->conf = array(); |
|
22 | + $page->default_handlers = array(); |
|
23 | + $pages['about_us'] = $page; |
|
24 | 24 | |
25 | - $page = new stdClass; |
|
26 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
27 | - $page->api_version = 1; |
|
28 | - $page->name = 'account_dashboard'; |
|
29 | - $page->task = 'page'; |
|
30 | - $page->admin_title = 'Dashboard'; |
|
31 | - $page->admin_description = ''; |
|
32 | - $page->path = 'dashboard'; |
|
33 | - $page->access = array( |
|
25 | + $page = new stdClass; |
|
26 | + $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
27 | + $page->api_version = 1; |
|
28 | + $page->name = 'account_dashboard'; |
|
29 | + $page->task = 'page'; |
|
30 | + $page->admin_title = 'Dashboard'; |
|
31 | + $page->admin_description = ''; |
|
32 | + $page->path = 'dashboard'; |
|
33 | + $page->access = array( |
|
34 | 34 | 'plugins' => array( |
35 | - 1 => array( |
|
35 | + 1 => array( |
|
36 | 36 | 'name' => 'role', |
37 | 37 | 'settings' => array( |
38 | - 'rids' => array( |
|
38 | + 'rids' => array( |
|
39 | 39 | 0 => 2, |
40 | - ), |
|
40 | + ), |
|
41 | 41 | ), |
42 | 42 | 'context' => 'logged-in-user', |
43 | 43 | 'not' => FALSE, |
44 | - ), |
|
44 | + ), |
|
45 | 45 | ), |
46 | 46 | 'logic' => 'and', |
47 | 47 | 'type' => 'none', |
48 | 48 | 'settings' => NULL, |
49 | - ); |
|
50 | - $page->menu = array( |
|
49 | + ); |
|
50 | + $page->menu = array( |
|
51 | 51 | 'type' => 'none', |
52 | 52 | 'title' => 'Dashboard', |
53 | 53 | 'name' => 'navigation', |
54 | 54 | 'weight' => '0', |
55 | 55 | 'parent' => array( |
56 | - 'type' => 'normal', |
|
57 | - 'title' => 'Account', |
|
58 | - 'name' => 'navigation', |
|
59 | - 'weight' => '0', |
|
56 | + 'type' => 'normal', |
|
57 | + 'title' => 'Account', |
|
58 | + 'name' => 'navigation', |
|
59 | + 'weight' => '0', |
|
60 | 60 | ), |
61 | - ); |
|
62 | - $page->arguments = array(); |
|
63 | - $page->conf = array(); |
|
64 | - $page->default_handlers = array(); |
|
65 | - $handler = new stdClass; |
|
66 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
67 | - $handler->api_version = 1; |
|
68 | - $handler->name = 'page_account_dashboard_panel_context'; |
|
69 | - $handler->task = 'page'; |
|
70 | - $handler->subtask = 'account_dashboard'; |
|
71 | - $handler->handler = 'panel_context'; |
|
72 | - $handler->weight = 0; |
|
73 | - $handler->conf = array( |
|
61 | + ); |
|
62 | + $page->arguments = array(); |
|
63 | + $page->conf = array(); |
|
64 | + $page->default_handlers = array(); |
|
65 | + $handler = new stdClass; |
|
66 | + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
67 | + $handler->api_version = 1; |
|
68 | + $handler->name = 'page_account_dashboard_panel_context'; |
|
69 | + $handler->task = 'page'; |
|
70 | + $handler->subtask = 'account_dashboard'; |
|
71 | + $handler->handler = 'panel_context'; |
|
72 | + $handler->weight = 0; |
|
73 | + $handler->conf = array( |
|
74 | 74 | 'title' => 'Landing page', |
75 | 75 | 'no_blocks' => FALSE, |
76 | 76 | 'pipeline' => 'ipe', |
77 | 77 | 'css_id' => '', |
78 | 78 | 'css' => '', |
79 | 79 | 'contexts' => array( |
80 | - 0 => array( |
|
80 | + 0 => array( |
|
81 | 81 | 'name' => 'user', |
82 | 82 | 'id' => 1, |
83 | 83 | 'identifier' => 'User', |
84 | 84 | 'keyword' => 'user', |
85 | 85 | 'context_settings' => array( |
86 | - 'type' => 'current', |
|
87 | - 'user' => '', |
|
88 | - 'uid' => '', |
|
86 | + 'type' => 'current', |
|
87 | + 'user' => '', |
|
88 | + 'uid' => '', |
|
89 | + ), |
|
89 | 90 | ), |
90 | - ), |
|
91 | 91 | ), |
92 | 92 | 'relationships' => array(), |
93 | 93 | 'access' => array( |
94 | - 'plugins' => array(), |
|
95 | - 'logic' => 'and', |
|
94 | + 'plugins' => array(), |
|
95 | + 'logic' => 'and', |
|
96 | 96 | ), |
97 | - ); |
|
98 | - $display = new panels_display; |
|
99 | - $display->layout = 'one_sidebar_second'; |
|
100 | - $display->layout_settings = array(); |
|
101 | - $display->panel_settings = array( |
|
97 | + ); |
|
98 | + $display = new panels_display; |
|
99 | + $display->layout = 'one_sidebar_second'; |
|
100 | + $display->layout_settings = array(); |
|
101 | + $display->panel_settings = array( |
|
102 | 102 | 'style_settings' => array( |
103 | - 'default' => NULL, |
|
104 | - 'content' => NULL, |
|
105 | - 'sidebar_first' => NULL, |
|
103 | + 'default' => NULL, |
|
104 | + 'content' => NULL, |
|
105 | + 'sidebar_first' => NULL, |
|
106 | 106 | ), |
107 | - ); |
|
108 | - $display->cache = array(); |
|
109 | - $display->title = 'Dashboard'; |
|
110 | - $display->storage_type = 'page_manager'; |
|
111 | - $display->storage_id = 'page_account_dashboard_panel_context'; |
|
112 | - $display->content = array(); |
|
113 | - $display->panels = array(); |
|
107 | + ); |
|
108 | + $display->cache = array(); |
|
109 | + $display->title = 'Dashboard'; |
|
110 | + $display->storage_type = 'page_manager'; |
|
111 | + $display->storage_id = 'page_account_dashboard_panel_context'; |
|
112 | + $display->content = array(); |
|
113 | + $display->panels = array(); |
|
114 | 114 | $pane = new stdClass; |
115 | 115 | $pane->pid = 'new-1'; |
116 | 116 | $pane->panel = 'content'; |
@@ -119,16 +119,16 @@ discard block |
||
119 | 119 | $pane->shown = TRUE; |
120 | 120 | $pane->access = array(); |
121 | 121 | $pane->configuration = array( |
122 | - 'override_title' => 1, |
|
123 | - 'override_title_text' => 'My stats', |
|
122 | + 'override_title' => 1, |
|
123 | + 'override_title_text' => 'My stats', |
|
124 | 124 | ); |
125 | 125 | $pane->cache = array(); |
126 | 126 | $pane->style = array( |
127 | - 'settings' => NULL, |
|
127 | + 'settings' => NULL, |
|
128 | 128 | ); |
129 | 129 | $pane->css = array( |
130 | - 'css_id' => '', |
|
131 | - 'css_class' => 'panel-primary container shadow', |
|
130 | + 'css_id' => '', |
|
131 | + 'css_class' => 'panel-primary container shadow', |
|
132 | 132 | ); |
133 | 133 | $pane->extras = array(); |
134 | 134 | $pane->position = 0; |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | $pane->configuration = array(); |
145 | 145 | $pane->cache = array(); |
146 | 146 | $pane->style = array( |
147 | - 'settings' => NULL, |
|
147 | + 'settings' => NULL, |
|
148 | 148 | ); |
149 | 149 | $pane->css = array( |
150 | - 'css_id' => '', |
|
151 | - 'css_class' => 'panel-primary container shadow', |
|
150 | + 'css_id' => '', |
|
151 | + 'css_class' => 'panel-primary container shadow', |
|
152 | 152 | ); |
153 | 153 | $pane->extras = array(); |
154 | 154 | $pane->position = 1; |
@@ -161,31 +161,31 @@ discard block |
||
161 | 161 | $pane->subtype = 'custom'; |
162 | 162 | $pane->shown = TRUE; |
163 | 163 | $pane->access = array( |
164 | - 'plugins' => array( |
|
164 | + 'plugins' => array( |
|
165 | 165 | 1 => array( |
166 | - 'name' => 'perm', |
|
167 | - 'settings' => array( |
|
166 | + 'name' => 'perm', |
|
167 | + 'settings' => array( |
|
168 | 168 | 'perm' => 'edit any profile content', |
169 | - ), |
|
170 | - 'context' => 'context_user_1', |
|
171 | - 'not' => FALSE, |
|
169 | + ), |
|
170 | + 'context' => 'context_user_1', |
|
171 | + 'not' => FALSE, |
|
172 | + ), |
|
172 | 173 | ), |
173 | - ), |
|
174 | 174 | ); |
175 | 175 | $pane->configuration = array( |
176 | - 'admin_title' => 'Moderation overview', |
|
177 | - 'title' => '', |
|
178 | - 'body' => '<?php print boinccore_moderation_overview_panel(); ?>', |
|
179 | - 'format' => '3', |
|
180 | - 'substitute' => 1, |
|
176 | + 'admin_title' => 'Moderation overview', |
|
177 | + 'title' => '', |
|
178 | + 'body' => '<?php print boinccore_moderation_overview_panel(); ?>', |
|
179 | + 'format' => '3', |
|
180 | + 'substitute' => 1, |
|
181 | 181 | ); |
182 | 182 | $pane->cache = array(); |
183 | 183 | $pane->style = array( |
184 | - 'settings' => NULL, |
|
184 | + 'settings' => NULL, |
|
185 | 185 | ); |
186 | 186 | $pane->css = array( |
187 | - 'css_id' => '', |
|
188 | - 'css_class' => 'panel-secondary container shadow', |
|
187 | + 'css_id' => '', |
|
188 | + 'css_class' => 'panel-secondary container shadow', |
|
189 | 189 | ); |
190 | 190 | $pane->extras = array(); |
191 | 191 | $pane->position = 0; |
@@ -199,16 +199,16 @@ discard block |
||
199 | 199 | $pane->shown = TRUE; |
200 | 200 | $pane->access = array(); |
201 | 201 | $pane->configuration = array( |
202 | - 'override_title' => 0, |
|
203 | - 'override_title_text' => '', |
|
202 | + 'override_title' => 0, |
|
203 | + 'override_title_text' => '', |
|
204 | 204 | ); |
205 | 205 | $pane->cache = array(); |
206 | 206 | $pane->style = array( |
207 | - 'settings' => NULL, |
|
207 | + 'settings' => NULL, |
|
208 | 208 | ); |
209 | 209 | $pane->css = array( |
210 | - 'css_id' => '', |
|
211 | - 'css_class' => 'panel-secondary container shadow', |
|
210 | + 'css_id' => '', |
|
211 | + 'css_class' => 'panel-secondary container shadow', |
|
212 | 212 | ); |
213 | 213 | $pane->extras = array(); |
214 | 214 | $pane->position = 1; |
@@ -222,23 +222,23 @@ discard block |
||
222 | 222 | $pane->shown = TRUE; |
223 | 223 | $pane->access = array(); |
224 | 224 | $pane->configuration = array( |
225 | - 'admin_title' => 'Team summary', |
|
226 | - 'title' => '', |
|
227 | - 'body' => '<?php |
|
225 | + 'admin_title' => 'Team summary', |
|
226 | + 'title' => '', |
|
227 | + 'body' => '<?php |
|
228 | 228 | if (module_exists(\'boincteam\')) { |
229 | 229 | echo boincteam_dashboard_panel(); |
230 | 230 | } |
231 | 231 | ?>', |
232 | - 'format' => '3', |
|
233 | - 'substitute' => 1, |
|
232 | + 'format' => '3', |
|
233 | + 'substitute' => 1, |
|
234 | 234 | ); |
235 | 235 | $pane->cache = array(); |
236 | 236 | $pane->style = array( |
237 | - 'settings' => NULL, |
|
237 | + 'settings' => NULL, |
|
238 | 238 | ); |
239 | 239 | $pane->css = array( |
240 | - 'css_id' => 'team-dashboard-pane', |
|
241 | - 'css_class' => 'panel-secondary container shadow', |
|
240 | + 'css_id' => 'team-dashboard-pane', |
|
241 | + 'css_class' => 'panel-secondary container shadow', |
|
242 | 242 | ); |
243 | 243 | $pane->extras = array(); |
244 | 244 | $pane->position = 2; |
@@ -252,9 +252,9 @@ discard block |
||
252 | 252 | $pane->shown = TRUE; |
253 | 253 | $pane->access = array(); |
254 | 254 | $pane->configuration = array( |
255 | - 'admin_title' => 'User activity summary', |
|
256 | - 'title' => '', |
|
257 | - 'body' => '<?php |
|
255 | + 'admin_title' => 'User activity summary', |
|
256 | + 'title' => '', |
|
257 | + 'body' => '<?php |
|
258 | 258 | |
259 | 259 | global $user; |
260 | 260 | $uid = $user->uid; |
@@ -263,16 +263,16 @@ discard block |
||
263 | 263 | echo \'<div class="item-count-wrapper"><div class="item-count">\' . $account->post_count . \'</div></div>\'; |
264 | 264 | |
265 | 265 | ?>', |
266 | - 'format' => '3', |
|
267 | - 'substitute' => 1, |
|
266 | + 'format' => '3', |
|
267 | + 'substitute' => 1, |
|
268 | 268 | ); |
269 | 269 | $pane->cache = array(); |
270 | 270 | $pane->style = array( |
271 | - 'settings' => NULL, |
|
271 | + 'settings' => NULL, |
|
272 | 272 | ); |
273 | 273 | $pane->css = array( |
274 | - 'css_id' => '', |
|
275 | - 'css_class' => 'panel-secondary container shadow', |
|
274 | + 'css_id' => '', |
|
275 | + 'css_class' => 'panel-secondary container shadow', |
|
276 | 276 | ); |
277 | 277 | $pane->extras = array(); |
278 | 278 | $pane->position = 3; |
@@ -286,74 +286,74 @@ discard block |
||
286 | 286 | $pane->shown = TRUE; |
287 | 287 | $pane->access = array(); |
288 | 288 | $pane->configuration = array( |
289 | - 'override_pager_settings' => 0, |
|
290 | - 'use_pager' => 0, |
|
291 | - 'nodes_per_page' => '6', |
|
292 | - 'pager_id' => '', |
|
293 | - 'offset' => '0', |
|
294 | - 'more_link' => 1, |
|
295 | - 'feed_icons' => 0, |
|
296 | - 'panel_args' => 0, |
|
297 | - 'link_to_view' => 0, |
|
298 | - 'args' => '', |
|
299 | - 'url' => '', |
|
300 | - 'display' => 'block_1', |
|
301 | - 'context' => array( |
|
289 | + 'override_pager_settings' => 0, |
|
290 | + 'use_pager' => 0, |
|
291 | + 'nodes_per_page' => '6', |
|
292 | + 'pager_id' => '', |
|
293 | + 'offset' => '0', |
|
294 | + 'more_link' => 1, |
|
295 | + 'feed_icons' => 0, |
|
296 | + 'panel_args' => 0, |
|
297 | + 'link_to_view' => 0, |
|
298 | + 'args' => '', |
|
299 | + 'url' => '', |
|
300 | + 'display' => 'block_1', |
|
301 | + 'context' => array( |
|
302 | 302 | 0 => 'context_user_1.uid', |
303 | - ), |
|
304 | - 'override_title' => 0, |
|
305 | - 'override_title_text' => '', |
|
303 | + ), |
|
304 | + 'override_title' => 0, |
|
305 | + 'override_title_text' => '', |
|
306 | 306 | ); |
307 | 307 | $pane->cache = array(); |
308 | 308 | $pane->style = array( |
309 | - 'settings' => NULL, |
|
309 | + 'settings' => NULL, |
|
310 | 310 | ); |
311 | 311 | $pane->css = array( |
312 | - 'css_id' => '', |
|
313 | - 'css_class' => 'panel-secondary container shadow', |
|
312 | + 'css_id' => '', |
|
313 | + 'css_class' => 'panel-secondary container shadow', |
|
314 | 314 | ); |
315 | 315 | $pane->extras = array(); |
316 | 316 | $pane->position = 4; |
317 | 317 | $display->content['new-7'] = $pane; |
318 | 318 | $display->panels['sidebar_first'][4] = 'new-7'; |
319 | - $display->hide_title = PANELS_TITLE_FIXED; |
|
320 | - $display->title_pane = 'new-1'; |
|
321 | - $handler->conf['display'] = $display; |
|
322 | - $page->default_handlers[$handler->name] = $handler; |
|
323 | - $pages['account_dashboard'] = $page; |
|
319 | + $display->hide_title = PANELS_TITLE_FIXED; |
|
320 | + $display->title_pane = 'new-1'; |
|
321 | + $handler->conf['display'] = $display; |
|
322 | + $page->default_handlers[$handler->name] = $handler; |
|
323 | + $pages['account_dashboard'] = $page; |
|
324 | 324 | |
325 | - $page = new stdClass; |
|
326 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
327 | - $page->api_version = 1; |
|
328 | - $page->name = 'boinc_user'; |
|
329 | - $page->task = 'page'; |
|
330 | - $page->admin_title = 'User profile template (boinc)'; |
|
331 | - $page->admin_description = ''; |
|
332 | - $page->path = 'account/%user'; |
|
333 | - $page->access = array( |
|
325 | + $page = new stdClass; |
|
326 | + $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
327 | + $page->api_version = 1; |
|
328 | + $page->name = 'boinc_user'; |
|
329 | + $page->task = 'page'; |
|
330 | + $page->admin_title = 'User profile template (boinc)'; |
|
331 | + $page->admin_description = ''; |
|
332 | + $page->path = 'account/%user'; |
|
333 | + $page->access = array( |
|
334 | 334 | 'type' => 'none', |
335 | 335 | 'settings' => NULL, |
336 | - ); |
|
337 | - $page->menu = array(); |
|
338 | - $page->arguments = array( |
|
336 | + ); |
|
337 | + $page->menu = array(); |
|
338 | + $page->arguments = array( |
|
339 | 339 | 'user' => array( |
340 | - 'id' => 1, |
|
341 | - 'identifier' => 'User: ID', |
|
342 | - 'name' => 'uid', |
|
343 | - 'settings' => array(), |
|
340 | + 'id' => 1, |
|
341 | + 'identifier' => 'User: ID', |
|
342 | + 'name' => 'uid', |
|
343 | + 'settings' => array(), |
|
344 | 344 | ), |
345 | - ); |
|
346 | - $page->conf = array(); |
|
347 | - $page->default_handlers = array(); |
|
348 | - $handler = new stdClass; |
|
349 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
350 | - $handler->api_version = 1; |
|
351 | - $handler->name = 'page_boinc_user_panel_context_2'; |
|
352 | - $handler->task = 'page'; |
|
353 | - $handler->subtask = 'boinc_user'; |
|
354 | - $handler->handler = 'panel_context'; |
|
355 | - $handler->weight = 1; |
|
356 | - $handler->conf = array( |
|
345 | + ); |
|
346 | + $page->conf = array(); |
|
347 | + $page->default_handlers = array(); |
|
348 | + $handler = new stdClass; |
|
349 | + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
350 | + $handler->api_version = 1; |
|
351 | + $handler->name = 'page_boinc_user_panel_context_2'; |
|
352 | + $handler->task = 'page'; |
|
353 | + $handler->subtask = 'boinc_user'; |
|
354 | + $handler->handler = 'panel_context'; |
|
355 | + $handler->weight = 1; |
|
356 | + $handler->conf = array( |
|
357 | 357 | 'title' => 'Panel', |
358 | 358 | 'no_blocks' => 0, |
359 | 359 | 'pipeline' => 'standard', |
@@ -362,37 +362,37 @@ discard block |
||
362 | 362 | 'contexts' => array(), |
363 | 363 | 'relationships' => array(), |
364 | 364 | 'access' => array( |
365 | - 'plugins' => array( |
|
365 | + 'plugins' => array( |
|
366 | 366 | 0 => array( |
367 | - 'name' => 'php', |
|
368 | - 'settings' => array( |
|
367 | + 'name' => 'php', |
|
368 | + 'settings' => array( |
|
369 | 369 | 'description' => 'if user status then show profile', |
370 | 370 | 'php' => '$account = $contexts[\'argument_uid_1\']->data; |
371 | 371 | return ($account->status); |
372 | 372 | ', |
373 | - ), |
|
374 | - 'not' => FALSE, |
|
373 | + ), |
|
374 | + 'not' => FALSE, |
|
375 | + ), |
|
375 | 376 | ), |
376 | - ), |
|
377 | - 'logic' => 'and', |
|
377 | + 'logic' => 'and', |
|
378 | 378 | ), |
379 | - ); |
|
380 | - $display = new panels_display; |
|
381 | - $display->layout = 'one_sidebar_second'; |
|
382 | - $display->layout_settings = array(); |
|
383 | - $display->panel_settings = array( |
|
379 | + ); |
|
380 | + $display = new panels_display; |
|
381 | + $display->layout = 'one_sidebar_second'; |
|
382 | + $display->layout_settings = array(); |
|
383 | + $display->panel_settings = array( |
|
384 | 384 | 'style_settings' => array( |
385 | - 'default' => NULL, |
|
386 | - 'content' => NULL, |
|
387 | - 'sidebar_first' => NULL, |
|
385 | + 'default' => NULL, |
|
386 | + 'content' => NULL, |
|
387 | + 'sidebar_first' => NULL, |
|
388 | 388 | ), |
389 | - ); |
|
390 | - $display->cache = array(); |
|
391 | - $display->title = 'Account'; |
|
392 | - $display->storage_type = 'page_manager'; |
|
393 | - $display->storage_id = 'page_boinc_user_panel_context_2'; |
|
394 | - $display->content = array(); |
|
395 | - $display->panels = array(); |
|
389 | + ); |
|
390 | + $display->cache = array(); |
|
391 | + $display->title = 'Account'; |
|
392 | + $display->storage_type = 'page_manager'; |
|
393 | + $display->storage_id = 'page_boinc_user_panel_context_2'; |
|
394 | + $display->content = array(); |
|
395 | + $display->panels = array(); |
|
396 | 396 | $pane = new stdClass; |
397 | 397 | $pane->pid = 'new-1'; |
398 | 398 | $pane->panel = 'content'; |
@@ -401,19 +401,19 @@ discard block |
||
401 | 401 | $pane->shown = TRUE; |
402 | 402 | $pane->access = array(); |
403 | 403 | $pane->configuration = array( |
404 | - 'context' => array( |
|
404 | + 'context' => array( |
|
405 | 405 | 0 => 'argument_uid_1', |
406 | - ), |
|
407 | - 'override_title' => 0, |
|
408 | - 'override_title_text' => '', |
|
406 | + ), |
|
407 | + 'override_title' => 0, |
|
408 | + 'override_title_text' => '', |
|
409 | 409 | ); |
410 | 410 | $pane->cache = array(); |
411 | 411 | $pane->style = array( |
412 | - 'settings' => NULL, |
|
412 | + 'settings' => NULL, |
|
413 | 413 | ); |
414 | 414 | $pane->css = array( |
415 | - 'css_id' => '', |
|
416 | - 'css_class' => 'panel-primary container shadow', |
|
415 | + 'css_id' => '', |
|
416 | + 'css_class' => 'panel-primary container shadow', |
|
417 | 417 | ); |
418 | 418 | $pane->extras = array(); |
419 | 419 | $pane->position = 0; |
@@ -427,16 +427,16 @@ discard block |
||
427 | 427 | $pane->shown = TRUE; |
428 | 428 | $pane->access = array(); |
429 | 429 | $pane->configuration = array( |
430 | - 'override_title' => 0, |
|
431 | - 'override_title_text' => '', |
|
430 | + 'override_title' => 0, |
|
431 | + 'override_title_text' => '', |
|
432 | 432 | ); |
433 | 433 | $pane->cache = array(); |
434 | 434 | $pane->style = array( |
435 | - 'settings' => NULL, |
|
435 | + 'settings' => NULL, |
|
436 | 436 | ); |
437 | 437 | $pane->css = array( |
438 | - 'css_id' => '', |
|
439 | - 'css_class' => 'panel-secondary container shadow', |
|
438 | + 'css_id' => '', |
|
439 | + 'css_class' => 'panel-secondary container shadow', |
|
440 | 440 | ); |
441 | 441 | $pane->extras = array(); |
442 | 442 | $pane->position = 0; |
@@ -450,23 +450,23 @@ discard block |
||
450 | 450 | $pane->shown = TRUE; |
451 | 451 | $pane->access = array(); |
452 | 452 | $pane->configuration = array( |
453 | - 'admin_title' => 'Team summary', |
|
454 | - 'title' => '', |
|
455 | - 'body' => '<?php |
|
453 | + 'admin_title' => 'Team summary', |
|
454 | + 'title' => '', |
|
455 | + 'body' => '<?php |
|
456 | 456 | if (module_exists(\'boincteam\')) { |
457 | 457 | echo boincteam_dashboard_panel(%user:uid); |
458 | 458 | } |
459 | 459 | ?>', |
460 | - 'format' => '3', |
|
461 | - 'substitute' => 1, |
|
460 | + 'format' => '3', |
|
461 | + 'substitute' => 1, |
|
462 | 462 | ); |
463 | 463 | $pane->cache = array(); |
464 | 464 | $pane->style = array( |
465 | - 'settings' => NULL, |
|
465 | + 'settings' => NULL, |
|
466 | 466 | ); |
467 | 467 | $pane->css = array( |
468 | - 'css_id' => 'team-dashboard-pane', |
|
469 | - 'css_class' => 'panel-secondary container shadow', |
|
468 | + 'css_id' => 'team-dashboard-pane', |
|
469 | + 'css_class' => 'panel-secondary container shadow', |
|
470 | 470 | ); |
471 | 471 | $pane->extras = array(); |
472 | 472 | $pane->position = 1; |
@@ -480,9 +480,9 @@ discard block |
||
480 | 480 | $pane->shown = TRUE; |
481 | 481 | $pane->access = array(); |
482 | 482 | $pane->configuration = array( |
483 | - 'admin_title' => 'User activity summary', |
|
484 | - 'title' => '', |
|
485 | - 'body' => '<?php |
|
483 | + 'admin_title' => 'User activity summary', |
|
484 | + 'title' => '', |
|
485 | + 'body' => '<?php |
|
486 | 486 | |
487 | 487 | $uid = arg(1); |
488 | 488 | $account = user_load($uid); |
@@ -490,16 +490,16 @@ discard block |
||
490 | 490 | echo \'<div class="item-count-wrapper"><div class="item-count">\' . $account->post_count . \'</div></div>\'; |
491 | 491 | |
492 | 492 | ?>', |
493 | - 'format' => '3', |
|
494 | - 'substitute' => 0, |
|
493 | + 'format' => '3', |
|
494 | + 'substitute' => 0, |
|
495 | 495 | ); |
496 | 496 | $pane->cache = array(); |
497 | 497 | $pane->style = array( |
498 | - 'settings' => NULL, |
|
498 | + 'settings' => NULL, |
|
499 | 499 | ); |
500 | 500 | $pane->css = array( |
501 | - 'css_id' => '', |
|
502 | - 'css_class' => 'panel-secondary container shadow', |
|
501 | + 'css_id' => '', |
|
502 | + 'css_class' => 'panel-secondary container shadow', |
|
503 | 503 | ); |
504 | 504 | $pane->extras = array(); |
505 | 505 | $pane->position = 2; |
@@ -513,31 +513,31 @@ discard block |
||
513 | 513 | $pane->shown = TRUE; |
514 | 514 | $pane->access = array(); |
515 | 515 | $pane->configuration = array( |
516 | - 'override_pager_settings' => 0, |
|
517 | - 'use_pager' => 0, |
|
518 | - 'nodes_per_page' => '6', |
|
519 | - 'pager_id' => '', |
|
520 | - 'offset' => '0', |
|
521 | - 'more_link' => 0, |
|
522 | - 'feed_icons' => 0, |
|
523 | - 'panel_args' => 0, |
|
524 | - 'link_to_view' => 0, |
|
525 | - 'args' => '', |
|
526 | - 'url' => '', |
|
527 | - 'display' => 'block_1', |
|
528 | - 'context' => array( |
|
516 | + 'override_pager_settings' => 0, |
|
517 | + 'use_pager' => 0, |
|
518 | + 'nodes_per_page' => '6', |
|
519 | + 'pager_id' => '', |
|
520 | + 'offset' => '0', |
|
521 | + 'more_link' => 0, |
|
522 | + 'feed_icons' => 0, |
|
523 | + 'panel_args' => 0, |
|
524 | + 'link_to_view' => 0, |
|
525 | + 'args' => '', |
|
526 | + 'url' => '', |
|
527 | + 'display' => 'block_1', |
|
528 | + 'context' => array( |
|
529 | 529 | 0 => 'argument_uid_1.uid', |
530 | - ), |
|
531 | - 'override_title' => 0, |
|
532 | - 'override_title_text' => '', |
|
530 | + ), |
|
531 | + 'override_title' => 0, |
|
532 | + 'override_title_text' => '', |
|
533 | 533 | ); |
534 | 534 | $pane->cache = array(); |
535 | 535 | $pane->style = array( |
536 | - 'settings' => NULL, |
|
536 | + 'settings' => NULL, |
|
537 | 537 | ); |
538 | 538 | $pane->css = array( |
539 | - 'css_id' => '', |
|
540 | - 'css_class' => 'panel-secondary container shadow', |
|
539 | + 'css_id' => '', |
|
540 | + 'css_class' => 'panel-secondary container shadow', |
|
541 | 541 | ); |
542 | 542 | $pane->extras = array(); |
543 | 543 | $pane->position = 3; |
@@ -551,66 +551,66 @@ discard block |
||
551 | 551 | $pane->shown = TRUE; |
552 | 552 | $pane->access = array(); |
553 | 553 | $pane->configuration = array( |
554 | - 'admin_title' => 'Project list', |
|
555 | - 'title' => 'Projects', |
|
556 | - 'body' => '<?php echo boincuser_get_projects_table(%user:uid); ?>', |
|
557 | - 'format' => '3', |
|
558 | - 'substitute' => 1, |
|
554 | + 'admin_title' => 'Project list', |
|
555 | + 'title' => 'Projects', |
|
556 | + 'body' => '<?php echo boincuser_get_projects_table(%user:uid); ?>', |
|
557 | + 'format' => '3', |
|
558 | + 'substitute' => 1, |
|
559 | 559 | ); |
560 | 560 | $pane->cache = array(); |
561 | 561 | $pane->style = array( |
562 | - 'settings' => NULL, |
|
562 | + 'settings' => NULL, |
|
563 | 563 | ); |
564 | 564 | $pane->css = array( |
565 | - 'css_id' => '', |
|
566 | - 'css_class' => 'panel-secondary container shadow', |
|
565 | + 'css_id' => '', |
|
566 | + 'css_class' => 'panel-secondary container shadow', |
|
567 | 567 | ); |
568 | 568 | $pane->extras = array(); |
569 | 569 | $pane->position = 4; |
570 | 570 | $display->content['new-6'] = $pane; |
571 | 571 | $display->panels['sidebar_first'][4] = 'new-6'; |
572 | - $display->hide_title = PANELS_TITLE_FIXED; |
|
573 | - $display->title_pane = '0'; |
|
574 | - $handler->conf['display'] = $display; |
|
575 | - $page->default_handlers[$handler->name] = $handler; |
|
576 | - $pages['boinc_user'] = $page; |
|
572 | + $display->hide_title = PANELS_TITLE_FIXED; |
|
573 | + $display->title_pane = '0'; |
|
574 | + $handler->conf['display'] = $display; |
|
575 | + $page->default_handlers[$handler->name] = $handler; |
|
576 | + $pages['boinc_user'] = $page; |
|
577 | 577 | |
578 | - $page = new stdClass; |
|
579 | - $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
580 | - $page->api_version = 1; |
|
581 | - $page->name = 'home'; |
|
582 | - $page->task = 'page'; |
|
583 | - $page->admin_title = 'Home page'; |
|
584 | - $page->admin_description = ''; |
|
585 | - $page->path = 'home'; |
|
586 | - $page->access = array( |
|
578 | + $page = new stdClass; |
|
579 | + $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
|
580 | + $page->api_version = 1; |
|
581 | + $page->name = 'home'; |
|
582 | + $page->task = 'page'; |
|
583 | + $page->admin_title = 'Home page'; |
|
584 | + $page->admin_description = ''; |
|
585 | + $page->path = 'home'; |
|
586 | + $page->access = array( |
|
587 | 587 | 'type' => 'none', |
588 | 588 | 'settings' => NULL, |
589 | - ); |
|
590 | - $page->menu = array( |
|
589 | + ); |
|
590 | + $page->menu = array( |
|
591 | 591 | 'type' => 'normal', |
592 | 592 | 'title' => 'Home', |
593 | 593 | 'name' => 'navigation', |
594 | 594 | 'weight' => '0', |
595 | 595 | 'parent' => array( |
596 | - 'type' => 'none', |
|
597 | - 'title' => '', |
|
598 | - 'name' => 'navigation', |
|
599 | - 'weight' => '0', |
|
596 | + 'type' => 'none', |
|
597 | + 'title' => '', |
|
598 | + 'name' => 'navigation', |
|
599 | + 'weight' => '0', |
|
600 | 600 | ), |
601 | - ); |
|
602 | - $page->arguments = array(); |
|
603 | - $page->conf = array(); |
|
604 | - $page->default_handlers = array(); |
|
605 | - $handler = new stdClass; |
|
606 | - $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
607 | - $handler->api_version = 1; |
|
608 | - $handler->name = 'page_home_panel_context'; |
|
609 | - $handler->task = 'page'; |
|
610 | - $handler->subtask = 'home'; |
|
611 | - $handler->handler = 'panel_context'; |
|
612 | - $handler->weight = 0; |
|
613 | - $handler->conf = array( |
|
601 | + ); |
|
602 | + $page->arguments = array(); |
|
603 | + $page->conf = array(); |
|
604 | + $page->default_handlers = array(); |
|
605 | + $handler = new stdClass; |
|
606 | + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
|
607 | + $handler->api_version = 1; |
|
608 | + $handler->name = 'page_home_panel_context'; |
|
609 | + $handler->task = 'page'; |
|
610 | + $handler->subtask = 'home'; |
|
611 | + $handler->handler = 'panel_context'; |
|
612 | + $handler->weight = 0; |
|
613 | + $handler->conf = array( |
|
614 | 614 | 'title' => 'Landing page', |
615 | 615 | 'no_blocks' => FALSE, |
616 | 616 | 'pipeline' => 'ipe', |
@@ -618,23 +618,23 @@ discard block |
||
618 | 618 | 'css' => '', |
619 | 619 | 'contexts' => array(), |
620 | 620 | 'relationships' => array(), |
621 | - ); |
|
622 | - $display = new panels_display; |
|
623 | - $display->layout = 'one_sidebar_second'; |
|
624 | - $display->layout_settings = array(); |
|
625 | - $display->panel_settings = array( |
|
621 | + ); |
|
622 | + $display = new panels_display; |
|
623 | + $display->layout = 'one_sidebar_second'; |
|
624 | + $display->layout_settings = array(); |
|
625 | + $display->panel_settings = array( |
|
626 | 626 | 'style_settings' => array( |
627 | - 'default' => NULL, |
|
628 | - 'content' => NULL, |
|
629 | - 'sidebar_first' => NULL, |
|
627 | + 'default' => NULL, |
|
628 | + 'content' => NULL, |
|
629 | + 'sidebar_first' => NULL, |
|
630 | 630 | ), |
631 | - ); |
|
632 | - $display->cache = array(); |
|
633 | - $display->title = ''; |
|
634 | - $display->storage_type = 'page_manager'; |
|
635 | - $display->storage_id = 'page_home_panel_context'; |
|
636 | - $display->content = array(); |
|
637 | - $display->panels = array(); |
|
631 | + ); |
|
632 | + $display->cache = array(); |
|
633 | + $display->title = ''; |
|
634 | + $display->storage_type = 'page_manager'; |
|
635 | + $display->storage_id = 'page_home_panel_context'; |
|
636 | + $display->content = array(); |
|
637 | + $display->panels = array(); |
|
638 | 638 | $pane = new stdClass; |
639 | 639 | $pane->pid = 'new-1'; |
640 | 640 | $pane->panel = 'content'; |
@@ -642,22 +642,22 @@ discard block |
||
642 | 642 | $pane->subtype = 'custom'; |
643 | 643 | $pane->shown = TRUE; |
644 | 644 | $pane->access = array( |
645 | - 'plugins' => array(), |
|
645 | + 'plugins' => array(), |
|
646 | 646 | ); |
647 | 647 | $pane->configuration = array( |
648 | - 'admin_title' => 'BOINC overview', |
|
649 | - 'title' => '', |
|
650 | - 'body' => '<?php print boincuser_home_page(); ?>', |
|
651 | - 'format' => '3', |
|
652 | - 'substitute' => TRUE, |
|
648 | + 'admin_title' => 'BOINC overview', |
|
649 | + 'title' => '', |
|
650 | + 'body' => '<?php print boincuser_home_page(); ?>', |
|
651 | + 'format' => '3', |
|
652 | + 'substitute' => TRUE, |
|
653 | 653 | ); |
654 | 654 | $pane->cache = array(); |
655 | 655 | $pane->style = array( |
656 | - 'settings' => NULL, |
|
656 | + 'settings' => NULL, |
|
657 | 657 | ); |
658 | 658 | $pane->css = array( |
659 | - 'css_id' => '', |
|
660 | - 'css_class' => 'panel-primary container shadow', |
|
659 | + 'css_id' => '', |
|
660 | + 'css_class' => 'panel-primary container shadow', |
|
661 | 661 | ); |
662 | 662 | $pane->extras = array(); |
663 | 663 | $pane->position = 0; |
@@ -671,16 +671,16 @@ discard block |
||
671 | 671 | $pane->shown = TRUE; |
672 | 672 | $pane->access = array(); |
673 | 673 | $pane->configuration = array( |
674 | - 'override_title' => 0, |
|
675 | - 'override_title_text' => '', |
|
674 | + 'override_title' => 0, |
|
675 | + 'override_title_text' => '', |
|
676 | 676 | ); |
677 | 677 | $pane->cache = array(); |
678 | 678 | $pane->style = array( |
679 | - 'settings' => NULL, |
|
679 | + 'settings' => NULL, |
|
680 | 680 | ); |
681 | 681 | $pane->css = array( |
682 | - 'css_id' => '', |
|
683 | - 'css_class' => 'panel-secondary container shadow balance-height-front no-resize', |
|
682 | + 'css_id' => '', |
|
683 | + 'css_class' => 'panel-secondary container shadow balance-height-front no-resize', |
|
684 | 684 | ); |
685 | 685 | $pane->extras = array(); |
686 | 686 | $pane->position = 0; |
@@ -694,39 +694,39 @@ discard block |
||
694 | 694 | $pane->shown = TRUE; |
695 | 695 | $pane->access = array(); |
696 | 696 | $pane->configuration = array( |
697 | - 'override_pager_settings' => 1, |
|
698 | - 'use_pager' => 0, |
|
699 | - 'nodes_per_page' => '2', |
|
700 | - 'pager_id' => '', |
|
701 | - 'offset' => '0', |
|
702 | - 'more_link' => 1, |
|
703 | - 'feed_icons' => 1, |
|
704 | - 'panel_args' => 0, |
|
705 | - 'link_to_view' => 0, |
|
706 | - 'args' => '', |
|
707 | - 'url' => '', |
|
708 | - 'display' => 'page_2', |
|
709 | - 'override_title' => 1, |
|
710 | - 'override_title_text' => '', |
|
697 | + 'override_pager_settings' => 1, |
|
698 | + 'use_pager' => 0, |
|
699 | + 'nodes_per_page' => '2', |
|
700 | + 'pager_id' => '', |
|
701 | + 'offset' => '0', |
|
702 | + 'more_link' => 1, |
|
703 | + 'feed_icons' => 1, |
|
704 | + 'panel_args' => 0, |
|
705 | + 'link_to_view' => 0, |
|
706 | + 'args' => '', |
|
707 | + 'url' => '', |
|
708 | + 'display' => 'page_2', |
|
709 | + 'override_title' => 1, |
|
710 | + 'override_title_text' => '', |
|
711 | 711 | ); |
712 | 712 | $pane->cache = array(); |
713 | 713 | $pane->style = array( |
714 | - 'settings' => NULL, |
|
714 | + 'settings' => NULL, |
|
715 | 715 | ); |
716 | 716 | $pane->css = array( |
717 | - 'css_id' => '', |
|
718 | - 'css_class' => 'panel-secondary container shadow balance-height-front', |
|
717 | + 'css_id' => '', |
|
718 | + 'css_class' => 'panel-secondary container shadow balance-height-front', |
|
719 | 719 | ); |
720 | 720 | $pane->extras = array(); |
721 | 721 | $pane->position = 1; |
722 | 722 | $display->content['new-3'] = $pane; |
723 | 723 | $display->panels['sidebar_first'][1] = 'new-3'; |
724 | - $display->hide_title = PANELS_TITLE_NONE; |
|
725 | - $display->title_pane = '0'; |
|
726 | - $handler->conf['display'] = $display; |
|
727 | - $page->default_handlers[$handler->name] = $handler; |
|
728 | - $pages['home'] = $page; |
|
724 | + $display->hide_title = PANELS_TITLE_NONE; |
|
725 | + $display->title_pane = '0'; |
|
726 | + $handler->conf['display'] = $display; |
|
727 | + $page->default_handlers[$handler->name] = $handler; |
|
728 | + $pages['home'] = $page; |
|
729 | 729 | |
730 | - return $pages; |
|
730 | + return $pages; |
|
731 | 731 | |
732 | 732 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | // If $selection is provided, and if it matches one of the entries in the file, |
33 | 33 | // it will be selected by default. |
34 | 34 | // |
35 | -function show_combo_box($name, $filename, $selection=null) { |
|
35 | +function show_combo_box($name, $filename, $selection = null) { |
|
36 | 36 | echo "<select name=\"$name\" class=\"form-control\">\n"; |
37 | 37 | |
38 | 38 | $file = fopen($filename, "r"); |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | <tr><td colspan=2> |
64 | 64 | <table border=0 cellpadding=5 |
65 | 65 | <tr> |
66 | -<td valign=top><a href=\"" . IMAGE_URL . $profile->userid . '.jpg' . "\"><img src=\"" . IMAGE_URL . $profile->userid . '_sm.jpg' . "\"></a> |
|
66 | +<td valign=top><a href=\"" . IMAGE_URL.$profile->userid.'.jpg'."\"><img src=\"".IMAGE_URL.$profile->userid.'_sm.jpg'."\"></a> |
|
67 | 67 | </td> |
68 | -<td valign=top>" .tra("%1 Your profile picture is shown to the left.", $warning) ." |
|
68 | +<td valign=top>" .tra("%1 Your profile picture is shown to the left.", $warning)." |
|
69 | 69 | <p>". |
70 | -tra("To replace it, click the \"Browse\" button and select a JPEG or PNG file (%1 or less).", "50KB") ."<br /> |
|
70 | +tra("To replace it, click the \"Browse\" button and select a JPEG or PNG file (%1 or less).", "50KB")."<br /> |
|
71 | 71 | <input name=picture type=file><br> |
72 | 72 | <p>". |
73 | -tra("To remove it from your profile, check this box:") . " |
|
73 | +tra("To remove it from your profile, check this box:")." |
|
74 | 74 | <input type=checkbox name=delete_pic> |
75 | 75 | <p> |
76 | 76 | </td></tr>"; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | end_table(); |
79 | 79 | echo "</td></tr>"; |
80 | 80 | } else { |
81 | - rowify(tra("If you would like include a picture with your profile, click the \"Browse\" button and select a JPEG or PNG file. Please select images of %1 or less.", "50KB") . " |
|
81 | + rowify(tra("If you would like include a picture with your profile, click the \"Browse\" button and select a JPEG or PNG file. Please select images of %1 or less.", "50KB")." |
|
82 | 82 | <p> |
83 | 83 | <input name=picture type=file> |
84 | 84 | "); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | row1(tra("Language")); |
94 | 94 | echo "<tr><td> |
95 | 95 | <p>" . |
96 | - tra("Select the language in which your profile is written:") . " |
|
96 | + tra("Select the language in which your profile is written:")." |
|
97 | 97 | <p> |
98 | 98 | "; |
99 | 99 | if (isset($profile->language)) { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | if ($recaptcha_public_key) { |
111 | 111 | table_row(boinc_recaptcha_get_html($recaptcha_public_key)); |
112 | 112 | } |
113 | - table_row("<p><input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Create/edit profile") ."\" name=\"submit\">"); |
|
113 | + table_row("<p><input class=\"btn btn-success\" type=\"submit\" value=\"".tra("Create/edit profile")."\" name=\"submit\">"); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // Returns an array containing: |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | // Determine if the filetype uploaded is supported. |
126 | 126 | // TODO: Change these to constants. |
127 | - switch($size[2]) { |
|
127 | + switch ($size[2]) { |
|
128 | 128 | case '2': // JPEG |
129 | 129 | $image = imageCreateFromJPEG($fileName); |
130 | 130 | break; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | function show_description() { |
163 | 163 | echo " |
164 | - <p>" .tra("Your %1 profile %2 lets you share your opinions and background with the %3 community.", "<b>", "</b>", PROJECT) . " |
|
164 | + <p>" .tra("Your %1 profile %2 lets you share your opinions and background with the %3 community.", "<b>", "</b>", PROJECT)." |
|
165 | 165 | <p> |
166 | 166 | "; |
167 | 167 | } |
@@ -179,14 +179,14 @@ discard block |
||
179 | 179 | row1(show_profile_heading1()); |
180 | 180 | rowify(show_profile_question1().bbcode_info()); |
181 | 181 | show_textarea("response1", $response1); |
182 | - row1( show_profile_heading2()); |
|
183 | - rowify( show_profile_question2().bbcode_info()); |
|
182 | + row1(show_profile_heading2()); |
|
183 | + rowify(show_profile_question2().bbcode_info()); |
|
184 | 184 | show_textarea("response2", $response2); |
185 | 185 | show_language_selection($profile); |
186 | 186 | } |
187 | 187 | |
188 | 188 | function show_textarea($name, $text) { |
189 | - rowify("<textarea name=\"$name\" class=\"form-control\" rows=\"10\">" . $text . "</textarea>"); |
|
189 | + rowify("<textarea name=\"$name\" class=\"form-control\" rows=\"10\">".$text."</textarea>"); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | // $profile is null if user doesn't already have a profile. |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | $delete_pic = "off"; |
233 | 233 | } |
234 | 234 | |
235 | - if (strlen($response1)==0 && |
|
236 | - strlen($response2)==0 && |
|
235 | + if (strlen($response1) == 0 && |
|
236 | + strlen($response2) == 0 && |
|
237 | 237 | $delete_pic != "on" && |
238 | 238 | !is_uploaded_file($_FILES['picture']['tmp_name']) |
239 | 239 | ) { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $profile->verification = 0; |
248 | 248 | } |
249 | 249 | |
250 | - $profile ? $has_picture = $profile->has_picture: $has_picture = false; |
|
250 | + $profile ? $has_picture = $profile->has_picture : $has_picture = false; |
|
251 | 251 | |
252 | 252 | if (is_uploaded_file($_FILES['picture']['tmp_name'])) { |
253 | 253 | $has_picture = true; |
@@ -262,13 +262,13 @@ discard block |
||
262 | 262 | |
263 | 263 | // Write the original image file to disk. |
264 | 264 | // TODO: define a constant for image quality. |
265 | - ImageJPEG($images[0], IMAGE_PATH . $user->id . '.jpg'); |
|
266 | - ImageJPEG($images[1], IMAGE_PATH . $user->id . '_sm.jpg'); |
|
265 | + ImageJPEG($images[0], IMAGE_PATH.$user->id.'.jpg'); |
|
266 | + ImageJPEG($images[1], IMAGE_PATH.$user->id.'_sm.jpg'); |
|
267 | 267 | } |
268 | 268 | $response1 = sanitize_html($response1); |
269 | 269 | $response2 = sanitize_html($response2); |
270 | 270 | |
271 | - $has_picture = $has_picture?1:0; |
|
271 | + $has_picture = $has_picture ? 1 : 0; |
|
272 | 272 | if ($profile) { |
273 | 273 | $query = " response1 = '".BoincDb::escape_string($response1)."'," |
274 | 274 | ." response2 = '".BoincDb::escape_string($response2)."'," |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | page_tail(); |
311 | 311 | } |
312 | 312 | |
313 | -function show_profile_form($profile, $warning=null) { |
|
313 | +function show_profile_form($profile, $warning = null) { |
|
314 | 314 | if ($profile) { |
315 | 315 | page_head(tra("Edit your profile"), null, null, null, boinc_recaptcha_get_head_extra()); |
316 | 316 | } else { |