@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | * Utility Form to delete teams suspected of being spammers. |
18 | 18 | */ |
19 | 19 | function boincteam_utility_delete(&$form_state) { |
20 | - $form = array(); |
|
20 | + $form = array(); |
|
21 | 21 | |
22 | - $form['help'] = array( |
|
22 | + $form['help'] = array( |
|
23 | 23 | '#type' => 'fieldset', |
24 | 24 | '#title' => t('Help'), |
25 | 25 | '#collapsible' => TRUE, |
26 | - ); |
|
26 | + ); |
|
27 | 27 | |
28 | - $form['help']['text'] = array( |
|
28 | + $form['help']['text'] = array( |
|
29 | 29 | '#type' => 'item', |
30 | 30 | '#description' => t('This utility page will help in identifying BOINC teams created by SPAMMERs which can be deleted. The search will find BOINC teams that meet the following criteria. |
31 | 31 | <ul> |
@@ -38,19 +38,19 @@ discard block |
||
38 | 38 | <p> <i>How teams are deleted</i>: Select the teams to be deleted from the table below. Click "Delete Selected Teams" button to begin a batch operation to delete the teams. If you select teams, and then page through to another page of the table, your selections will be lost. I.e., only the teams select on the current page will be deleted. |
39 | 39 | <p> The site must be offline/in maintenance mode before searching for and deleting teams. If not, the delete button below is disabled. |
40 | 40 | '), |
41 | - ); |
|
41 | + ); |
|
42 | 42 | |
43 | - // This variable name has been changed for Drupal 7/8. |
|
44 | - $maintenance_mode = variable_get('site_offline'); |
|
45 | - if (!$maintenance_mode) { |
|
43 | + // This variable name has been changed for Drupal 7/8. |
|
44 | + $maintenance_mode = variable_get('site_offline'); |
|
45 | + if (!$maintenance_mode) { |
|
46 | 46 | drupal_set_message(t('WARNING: Site is online (not in maintenance mode)! Deleting teams is only allowed when site is offline. Change this setting in ') . l(t('Site maintenance'), '/admin/settings/site-maintenance'), 'warning'); |
47 | - } |
|
47 | + } |
|
48 | 48 | |
49 | - $form['teamdelete'] = array( |
|
49 | + $form['teamdelete'] = array( |
|
50 | 50 | '#type' => 'fieldset', |
51 | 51 | '#title' => t('Teams to delete'), |
52 | - ); |
|
53 | - $form['teamdelete']['deleteall'] = array( |
|
52 | + ); |
|
53 | + $form['teamdelete']['deleteall'] = array( |
|
54 | 54 | '#type' => 'submit', |
55 | 55 | '#disabled' => !($maintenance_mode), |
56 | 56 | '#value' => t('Delete Selected Teams'), |
@@ -58,101 +58,101 @@ discard block |
||
58 | 58 | '#attributes' => array( |
59 | 59 | 'onclick' => 'return confirm(\'' . t('You are about to delete the selected teams suspected of being SPAM. Do you want to continue?') . '\')', |
60 | 60 | ), |
61 | - ); |
|
62 | - $form['teamdelete']['results_table'] = array( |
|
61 | + ); |
|
62 | + $form['teamdelete']['results_table'] = array( |
|
63 | 63 | '#value' => drupal_get_form('boincteam_utility_team_table'), |
64 | - ); |
|
64 | + ); |
|
65 | 65 | |
66 | - return $form; |
|
66 | + return $form; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | function boincteam_utility_team_table() { |
70 | 70 | |
71 | - $limit=50; |
|
72 | - $sql = "SELECT team.id AS id, team.name AS name, team.nusers AS nusers FROM {team} WHERE team.nusers<2 AND team.total_credit=0 AND team.seti_id=0 AND team.description REGEXP '<a href'"; |
|
71 | + $limit=50; |
|
72 | + $sql = "SELECT team.id AS id, team.name AS name, team.nusers AS nusers FROM {team} WHERE team.nusers<2 AND team.total_credit=0 AND team.seti_id=0 AND team.description REGEXP '<a href'"; |
|
73 | 73 | |
74 | - // @todo - add bts() or t() |
|
75 | - $resultheader = array( |
|
74 | + // @todo - add bts() or t() |
|
75 | + $resultheader = array( |
|
76 | 76 | array( |
77 | - 'data' => 'Team ID', |
|
78 | - 'field' => 'id', |
|
79 | - 'sort' => 'asc', |
|
77 | + 'data' => 'Team ID', |
|
78 | + 'field' => 'id', |
|
79 | + 'sort' => 'asc', |
|
80 | 80 | ), |
81 | 81 | array( |
82 | - 'data' => 'Team Name', |
|
83 | - 'field' => 'name', |
|
82 | + 'data' => 'Team Name', |
|
83 | + 'field' => 'name', |
|
84 | 84 | ), |
85 | 85 | array( |
86 | - 'data' => 'Num Users', |
|
87 | - 'field' => 'nusers', |
|
86 | + 'data' => 'Num Users', |
|
87 | + 'field' => 'nusers', |
|
88 | 88 | ), |
89 | 89 | array( |
90 | - 'data' => 'Link to Team', |
|
91 | - 'field' => 'link', |
|
90 | + 'data' => 'Link to Team', |
|
91 | + 'field' => 'link', |
|
92 | 92 | ), |
93 | - ); |
|
93 | + ); |
|
94 | 94 | |
95 | - $tablesort = tablesort_sql($resultheader); |
|
96 | - db_set_active('boinc_rw'); |
|
97 | - $db_res = pager_query($sql . $tablesort, $limit); |
|
98 | - db_set_active('default'); |
|
95 | + $tablesort = tablesort_sql($resultheader); |
|
96 | + db_set_active('boinc_rw'); |
|
97 | + $db_res = pager_query($sql . $tablesort, $limit); |
|
98 | + db_set_active('default'); |
|
99 | 99 | |
100 | - $form = array(); |
|
101 | - $form['options'] = array(); |
|
102 | - $checkboxes = array(); |
|
103 | - if ($db_res) { |
|
100 | + $form = array(); |
|
101 | + $form['options'] = array(); |
|
102 | + $checkboxes = array(); |
|
103 | + if ($db_res) { |
|
104 | 104 | while ($result = db_fetch_object($db_res)) { |
105 | - $drupalnid = boincteam_lookup_nid($result->id); |
|
106 | - if ($drupalnid) { |
|
105 | + $drupalnid = boincteam_lookup_nid($result->id); |
|
106 | + if ($drupalnid) { |
|
107 | 107 | $tlink = l($result->name, '/community/teams/' . $drupalnid); |
108 | - } |
|
109 | - else { |
|
108 | + } |
|
109 | + else { |
|
110 | 110 | $tlink = ''; |
111 | - } |
|
112 | - // only keys no values |
|
113 | - $checkboxes[$result->id] = ''; |
|
111 | + } |
|
112 | + // only keys no values |
|
113 | + $checkboxes[$result->id] = ''; |
|
114 | 114 | |
115 | - $form['id'][$result->id] = array( |
|
115 | + $form['id'][$result->id] = array( |
|
116 | 116 | '#value' => $result->id, |
117 | - ); |
|
118 | - $form['name'][$result->id] = array( |
|
117 | + ); |
|
118 | + $form['name'][$result->id] = array( |
|
119 | 119 | '#value' => $result->name, |
120 | - ); |
|
121 | - $form['nusers'][$result->id] = array( |
|
120 | + ); |
|
121 | + $form['nusers'][$result->id] = array( |
|
122 | 122 | '#value' => $result->nusers, |
123 | - ); |
|
124 | - $form['link'][$result->id] = array( |
|
123 | + ); |
|
124 | + $form['link'][$result->id] = array( |
|
125 | 125 | '#value' => $tlink, |
126 | - ); |
|
126 | + ); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | $form['checkboxes'] = array('#type' => 'checkboxes', '#options' => $checkboxes); |
130 | 130 | $form['pager'] = array('#value' => theme('pager', NULL, $limit, 0)); |
131 | 131 | |
132 | 132 | return $form; |
133 | - } |
|
134 | - return "<p>No teams matched the criteria for a SPAM team.</p>"; |
|
133 | + } |
|
134 | + return "<p>No teams matched the criteria for a SPAM team.</p>"; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
138 | 138 | * Submit handler - also creates the batch job to delete the teams. |
139 | 139 | */ |
140 | 140 | function boincteam_utility_delete_team($form, &$form_state) { |
141 | - $checkedteamids = $form_state['clicked_button']['#post']['checkboxes']; |
|
142 | - // Use batch to delete teams |
|
143 | - $operations = array(); |
|
144 | - foreach ($checkedteamids as $id) { |
|
141 | + $checkedteamids = $form_state['clicked_button']['#post']['checkboxes']; |
|
142 | + // Use batch to delete teams |
|
143 | + $operations = array(); |
|
144 | + foreach ($checkedteamids as $id) { |
|
145 | 145 | $operations[] = array('boincteam_utility_batch_process', array($id)); |
146 | - } |
|
147 | - $batch = array( |
|
146 | + } |
|
147 | + $batch = array( |
|
148 | 148 | 'title' => t('Processing BOINC Teams'), |
149 | 149 | 'operations' => $operations, |
150 | 150 | 'init_message' => t('Starting team deletion'), |
151 | 151 | 'finished' => 'boincteam_utility_batch_finished', |
152 | 152 | 'file' => drupal_get_path('module', 'boincteam') . '/boincteam.admin.inc', |
153 | - ); |
|
154 | - batch_set($batch); |
|
155 | - //batch_process('/admin/boinc/utility-team-delete'); |
|
153 | + ); |
|
154 | + batch_set($batch); |
|
155 | + //batch_process('/admin/boinc/utility-team-delete'); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /* |
@@ -163,37 +163,37 @@ discard block |
||
163 | 163 | * Input form (table) |
164 | 164 | */ |
165 | 165 | function theme_boincteam_utility_team_table($form) { |
166 | - //define table header |
|
167 | - $header = array( |
|
166 | + //define table header |
|
167 | + $header = array( |
|
168 | 168 | theme('table_select_header_cell'), //using that previously empty field |
169 | 169 | array('data' => t('Team ID'), 'field' => 'id', 'sort' => 'asc'), |
170 | 170 | array('data' => t('Name'), 'field' => 'name'), |
171 | 171 | array('data' => t('Num Users'), 'field' => 'nusers'), |
172 | 172 | array('data' => t('Link to Team'), 'field' => 'link'), |
173 | - ); |
|
174 | - $rows = array(); |
|
175 | - $output = ""; |
|
176 | - if(!empty($form['checkboxes']['#options'])) { |
|
173 | + ); |
|
174 | + $rows = array(); |
|
175 | + $output = ""; |
|
176 | + if(!empty($form['checkboxes']['#options'])) { |
|
177 | 177 | foreach (element_children($form['id']) as $key) { |
178 | - $rows[] = array( |
|
178 | + $rows[] = array( |
|
179 | 179 | drupal_render($form['checkboxes'][$key]), |
180 | 180 | drupal_render($form['id'][$key]), |
181 | 181 | drupal_render($form['name'][$key]), |
182 | 182 | drupal_render($form['nusers'][$key]), |
183 | 183 | drupal_render($form['link'][$key]), |
184 | - ); |
|
184 | + ); |
|
185 | + } |
|
185 | 186 | } |
186 | - } |
|
187 | - else { |
|
187 | + else { |
|
188 | 188 | $rows[] = array(array('data' => '<div class="error">No teams found</div>', 'colspan' => 5)); |
189 | - } |
|
190 | - $output .= theme('table', $header, $rows); |
|
191 | - if ($form['pager']['#value']) { |
|
189 | + } |
|
190 | + $output .= theme('table', $header, $rows); |
|
191 | + if ($form['pager']['#value']) { |
|
192 | 192 | $output .= drupal_render($form['pager']); |
193 | - } |
|
193 | + } |
|
194 | 194 | |
195 | - $output .= drupal_render($form); |
|
196 | - return $output; |
|
195 | + $output .= drupal_render($form); |
|
196 | + return $output; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
@@ -202,26 +202,26 @@ discard block |
||
202 | 202 | * table. It also removes the team's drupal page (node) if found. |
203 | 203 | */ |
204 | 204 | function boincteam_utility_batch_process($id, &$context) { |
205 | - $boincteam = boincteam_load($id); |
|
206 | - $drupalid = boincteam_lookup_nid($id); |
|
205 | + $boincteam = boincteam_load($id); |
|
206 | + $drupalid = boincteam_lookup_nid($id); |
|
207 | 207 | |
208 | - // Delete entry in team table |
|
209 | - db_set_active('boinc_rw'); |
|
210 | - $sql1='DELETE FROM {team} WHERE id=%d'; |
|
211 | - $db_res = db_query($sql1, $id); |
|
212 | - db_set_active('default'); |
|
208 | + // Delete entry in team table |
|
209 | + db_set_active('boinc_rw'); |
|
210 | + $sql1='DELETE FROM {team} WHERE id=%d'; |
|
211 | + $db_res = db_query($sql1, $id); |
|
212 | + db_set_active('default'); |
|
213 | 213 | |
214 | - // Delete entry in boincteam table |
|
215 | - $sql2='DELETE FROM {boincteam} WHERE id=%d'; |
|
216 | - $db_res = db_query($sql2, $id); |
|
214 | + // Delete entry in boincteam table |
|
215 | + $sql2='DELETE FROM {boincteam} WHERE id=%d'; |
|
216 | + $db_res = db_query($sql2, $id); |
|
217 | 217 | |
218 | - // Delete the drupal node (if present) |
|
219 | - if ($drupalid) { |
|
218 | + // Delete the drupal node (if present) |
|
219 | + if ($drupalid) { |
|
220 | 220 | node_delete($drupalid); |
221 | - } |
|
221 | + } |
|
222 | 222 | |
223 | - $context['results'][] = $id . ' : ' . check_plain($boincteam->name); |
|
224 | - $context['message'] = t('Processing team @name', array('@name' => $boincteam->name)); |
|
223 | + $context['results'][] = $id . ' : ' . check_plain($boincteam->name); |
|
224 | + $context['message'] = t('Processing team @name', array('@name' => $boincteam->name)); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -229,15 +229,15 @@ discard block |
||
229 | 229 | * or failure. |
230 | 230 | */ |
231 | 231 | function boincteam_utility_batch_finished($success, $results, $operations) { |
232 | - if ($success) { |
|
232 | + if ($success) { |
|
233 | 233 | $message = 'Info: Delete SPAM Teams utility- ' . count($results) . ' team(s) deleted.'; |
234 | 234 | drupal_set_message($message, 'info'); |
235 | - } |
|
236 | - else { |
|
235 | + } |
|
236 | + else { |
|
237 | 237 | // An error occurred. |
238 | 238 | // $operations contains the operations that remained unprocessed. |
239 | 239 | $error_operation = reset($operations); |
240 | 240 | $message = 'Error: An error occurred while processing ' . $error_operation[0] . ' with arguments :' . print_r($error_operation[0], TRUE); |
241 | 241 | drupal_set_message($message, 'error'); |
242 | - } |
|
242 | + } |
|
243 | 243 | } |
244 | 244 | \ No newline at end of file |
@@ -56,9 +56,9 @@ |
||
56 | 56 | "email_addr=previous_email_addr, previous_email_addr='', email_addr_change_time=0, passwd_hash='$database_passwd_hash', email_validated=0" |
57 | 57 | ); |
58 | 58 | $result = delete_token($userid, $token, TOKEN_TYPE_CHANGE_EMAIL); |
59 | - } |
|
59 | + } |
|
60 | 60 | } else { |
61 | - echo tra("Invalid token."); |
|
61 | + echo tra("Invalid token."); |
|
62 | 62 | } |
63 | 63 | } else { |
64 | 64 | echo tra("Invalid token."); |
@@ -44,9 +44,9 @@ |
||
44 | 44 | page_head(tra("Delete Account")); |
45 | 45 | |
46 | 46 | echo "<p>".tra("Thank you for verifying ownership of your account.")."</p>" |
47 | - ."<p>".tra("You can now delete your account by entering in your password below and clicking the \"Delete Account\" button.")."</p>" |
|
48 | - ."<p>".tra("As a reminder, your account <b>cannot be recovered</b> once you delete it.")."</p>" |
|
49 | - ."<br/>"; |
|
47 | + ."<p>".tra("You can now delete your account by entering in your password below and clicking the \"Delete Account\" button.")."</p>" |
|
48 | + ."<p>".tra("As a reminder, your account <b>cannot be recovered</b> once you delete it.")."</p>" |
|
49 | + ."<br/>"; |
|
50 | 50 | |
51 | 51 | form_start(secure_url_base()."delete_account_confirm.php", "post"); |
52 | 52 | form_input_hidden("token", $token); |
@@ -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 | } |
@@ -13,45 +13,45 @@ discard block |
||
13 | 13 | * a form array |
14 | 14 | */ |
15 | 15 | function boincuser_delete_settings() { |
16 | - $form = array(); |
|
16 | + $form = array(); |
|
17 | 17 | |
18 | - $default = array( |
|
18 | + $default = array( |
|
19 | 19 | 'boincuser_delete_type' => variable_get('boincuser_delete_type', ''), |
20 | 20 | 'boincuser_delete_redirect' => variable_get('boincuser_delete_redirect', '<front>'), |
21 | - ); |
|
21 | + ); |
|
22 | 22 | |
23 | - $form['options'] = array( |
|
23 | + $form['options'] = array( |
|
24 | 24 | '#type' => 'fieldset', |
25 | 25 | '#title' => t('Options'), |
26 | - ); |
|
27 | - $form['options']['help'] = array( |
|
26 | + ); |
|
27 | + $form['options']['help'] = array( |
|
28 | 28 | '#value' => t('When a user deletes their account, which option is shown to the user? A soft/obfusate delete, a hard/wipe delete, or let the user chose between the two.'), |
29 | 29 | '#weight' => 11, |
30 | - ); |
|
31 | - $form['options']['boincuser_delete_type'] = array( |
|
30 | + ); |
|
31 | + $form['options']['boincuser_delete_type'] = array( |
|
32 | 32 | '#type' => 'radios', |
33 | 33 | '#title' => t('Type of delete'), |
34 | 34 | '#default_value' => $default['boincuser_delete_type'], |
35 | 35 | '#options' => array( |
36 | - 'soft_obfuscate' => t('A soft/obfuscate delete. User\'s account is disabled, but some data is deleted.'), |
|
37 | - 'hard_wipe' => t('A hard/wipe delete. User\'s account is deleted along with many data.'), |
|
38 | - 'user_decides' => t('User is presented with radio buttons where they choose between the two options above.'), |
|
36 | + 'soft_obfuscate' => t('A soft/obfuscate delete. User\'s account is disabled, but some data is deleted.'), |
|
37 | + 'hard_wipe' => t('A hard/wipe delete. User\'s account is deleted along with many data.'), |
|
38 | + 'user_decides' => t('User is presented with radio buttons where they choose between the two options above.'), |
|
39 | 39 | ), |
40 | 40 | '#weight' => 21, |
41 | - ); |
|
41 | + ); |
|
42 | 42 | |
43 | - $form['redirect'] = array( |
|
43 | + $form['redirect'] = array( |
|
44 | 44 | '#type' => 'fieldset', |
45 | 45 | '#title' => t('Redirect'), |
46 | - ); |
|
47 | - $form['redirect']['boincuser_delete_redirect'] = array( |
|
46 | + ); |
|
47 | + $form['redirect']['boincuser_delete_redirect'] = array( |
|
48 | 48 | '#type' => 'textfield', |
49 | 49 | '#title' => t('Redirection page'), |
50 | 50 | '#default_value' => $default['boincuser_delete_redirect'], |
51 | 51 | '#description' => t('Choose where to redirect your users after account deletion. Any valid Drupal path will do, e.g. %front or %node', array('%front' => '<front>', '%node' => 'node/1')), |
52 | - ); |
|
52 | + ); |
|
53 | 53 | |
54 | - return system_settings_form($form); |
|
54 | + return system_settings_form($form); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -60,124 +60,124 @@ discard block |
||
60 | 60 | * password checks. |
61 | 61 | */ |
62 | 62 | function boincuser_delete_admindelete(&$form_state, $uid) { |
63 | - $form = array(); |
|
63 | + $form = array(); |
|
64 | 64 | |
65 | - $form['#uid'] = $uid; |
|
65 | + $form['#uid'] = $uid; |
|
66 | 66 | |
67 | - $form['account']['help'] = array( |
|
67 | + $form['account']['help'] = array( |
|
68 | 68 | '#value' => "<p>" . t("This form will delete this user <strong>without any email notification</strong> sent to the user. Be very careful in deleting users using this form. Once you select the delete type, check the checkbox, enter your password, and click submit, the user's account will be deleted. This will occur <strong>immediately</strong>. There is no 'undo'!") . "</p><p>" . t("You are deleting the following user, link opens in new window:") . "</p>", |
69 | 69 | '#weight' => -1, |
70 | 70 | '#prefix' => "<div id='delete-instructions'>", |
71 | 71 | '#suffix' => "</div>", |
72 | - ); |
|
72 | + ); |
|
73 | 73 | |
74 | - $account = user_load($uid); |
|
75 | - if ($account) { |
|
74 | + $account = user_load($uid); |
|
75 | + if ($account) { |
|
76 | 76 | drupal_set_title($account->boincuser_name); |
77 | 77 | |
78 | 78 | $form['account']['boincuser_name'] = array( |
79 | - '#value' => t('<li>BOINC username (public displayname): ') . l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))), |
|
79 | + '#value' => t('<li>BOINC username (public displayname): ') . l("{$account->boincuser_name}", "account/{$account->uid}", array('attributes' => array('target' => '_blank'))), |
|
80 | 80 | ); |
81 | 81 | $form['account']['boincuser_id'] = array( |
82 | - '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id, |
|
82 | + '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id, |
|
83 | 83 | ); |
84 | 84 | $form['account']['drupal_name'] = array( |
85 | - '#value' => t('<li>Drupal username (internal): ') . $account->name, |
|
85 | + '#value' => t('<li>Drupal username (internal): ') . $account->name, |
|
86 | 86 | ); |
87 | 87 | $form['account']['user_id'] = array( |
88 | - '#value' => t('<li>Drupal user ID: ') . $account->uid, |
|
88 | + '#value' => t('<li>Drupal user ID: ') . $account->uid, |
|
89 | 89 | ); |
90 | 90 | |
91 | 91 | $form['account']['user_delete_action'] = array( |
92 | 92 | '#type' => 'radios', |
93 | 93 | '#options' => array( |
94 | - 'soft_obfuscate' => bts('<b>Soft delete</b> the account. The account will be disabled, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted, the host information deleted, and the user will be removed from any team.', array(), NULL, 'boinc:delete-user-account'), |
|
95 | - 'hard_wipe' => bts('<b>Delete</b> the account. The account will be deleted, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),), |
|
96 | - ); |
|
94 | + 'soft_obfuscate' => bts('<b>Soft delete</b> the account. The account will be disabled, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted, the host information deleted, and the user will be removed from any team.', array(), NULL, 'boinc:delete-user-account'), |
|
95 | + 'hard_wipe' => bts('<b>Delete</b> the account. The account will be deleted, and all posts/comments will be attributed to the Anonymous User. The user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),), |
|
96 | + ); |
|
97 | 97 | |
98 | 98 | $form['account']['surecheckbox'] = array( |
99 | - '#type' => 'checkbox', |
|
100 | - '#title' => t('I am <strong>sure</strong> I know what I am doing. I am <u><strong>deleting user</strong></u> %name.', |
|
99 | + '#type' => 'checkbox', |
|
100 | + '#title' => t('I am <strong>sure</strong> I know what I am doing. I am <u><strong>deleting user</strong></u> %name.', |
|
101 | 101 | array('%name' => $account->boincuser_name) |
102 | - ), |
|
103 | - '#default_value' => FALSE, |
|
102 | + ), |
|
103 | + '#default_value' => FALSE, |
|
104 | 104 | ); |
105 | 105 | |
106 | 106 | $form['account']['current_pass'] = array( |
107 | - '#type' => 'password', |
|
108 | - '#title' => bts('Enter your password before clicking Submit, or click Cancel to return to the user\'s edit page', array(), NULL, 'boinc:delete-user-account'), |
|
109 | - '#size' => 17, |
|
110 | - '#attributes' => array( |
|
107 | + '#type' => 'password', |
|
108 | + '#title' => bts('Enter your password before clicking Submit, or click Cancel to return to the user\'s edit page', array(), NULL, 'boinc:delete-user-account'), |
|
109 | + '#size' => 17, |
|
110 | + '#attributes' => array( |
|
111 | 111 | 'autocomplete' => 'off', |
112 | - ), |
|
113 | - '#weight' => 25, |
|
112 | + ), |
|
113 | + '#weight' => 25, |
|
114 | 114 | ); |
115 | 115 | |
116 | 116 | // Action buttons |
117 | 117 | $form['actions']['submit'] = array( |
118 | - '#type' => 'submit', |
|
119 | - '#value' => t('Submit'), |
|
118 | + '#type' => 'submit', |
|
119 | + '#value' => t('Submit'), |
|
120 | 120 | ); |
121 | 121 | $form['actions']['cancel'] = array( |
122 | - '#type' => 'button', |
|
123 | - '#value' => t('Cancel'), |
|
124 | - '#executes_submit_callback' => TRUE, |
|
125 | - '#validate' => array(), |
|
126 | - '#submit' => array('_boincuser_delete_cancel'), |
|
122 | + '#type' => 'button', |
|
123 | + '#value' => t('Cancel'), |
|
124 | + '#executes_submit_callback' => TRUE, |
|
125 | + '#validate' => array(), |
|
126 | + '#submit' => array('_boincuser_delete_cancel'), |
|
127 | 127 | ); |
128 | 128 | |
129 | 129 | $form['#redirect'] = 'account'; |
130 | - } |
|
131 | - else { |
|
130 | + } |
|
131 | + else { |
|
132 | 132 | $form['noaccount'] = array( |
133 | - '#value' => t('No such user with UID: %uid', array('%uid' => $uid)), |
|
133 | + '#value' => t('No such user with UID: %uid', array('%uid' => $uid)), |
|
134 | 134 | ); |
135 | - } |
|
135 | + } |
|
136 | 136 | |
137 | - return $form; |
|
137 | + return $form; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | 141 | * Validation function for admin delete user. |
142 | 142 | */ |
143 | 143 | function boincuser_delete_admindelete_validate($form, &$form_state) { |
144 | - global $user; |
|
145 | - $boinc_user = boincuser_load($user->uid, TRUE); |
|
144 | + global $user; |
|
145 | + $boinc_user = boincuser_load($user->uid, TRUE); |
|
146 | 146 | |
147 | - if ($form_state['values']['user_delete_action'] == '') { |
|
147 | + if ($form_state['values']['user_delete_action'] == '') { |
|
148 | 148 | form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.')); |
149 | - } |
|
149 | + } |
|
150 | 150 | |
151 | - if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) { |
|
151 | + if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) { |
|
152 | 152 | form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.')); |
153 | - } |
|
153 | + } |
|
154 | 154 | |
155 | - if (!($form_state['values']['surecheckbox'])) { |
|
155 | + if (!($form_state['values']['surecheckbox'])) { |
|
156 | 156 | return form_set_error('surecheckbox', t('Please confirm you are sure you want to delete this account.')); |
157 | - } |
|
157 | + } |
|
158 | 158 | |
159 | - if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) { |
|
159 | + if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) { |
|
160 | 160 | return true; |
161 | - } |
|
161 | + } |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | 165 | * Submit function for admin delete user. |
166 | 166 | */ |
167 | 167 | function boincuser_delete_admindelete_submit($form, &$form_state) { |
168 | - // This is the account to be deleted, and not the administrator's |
|
169 | - // account. |
|
170 | - $account = user_load(array('uid' => $form['#uid'])); |
|
171 | - $action = $form_state['values']['user_delete_action']; |
|
168 | + // This is the account to be deleted, and not the administrator's |
|
169 | + // account. |
|
170 | + $account = user_load(array('uid' => $form['#uid'])); |
|
171 | + $action = $form_state['values']['user_delete_action']; |
|
172 | 172 | |
173 | - drupal_set_message(t('WARNING: Account @displayname, Drupal UID=@uid has been deleted.', |
|
173 | + drupal_set_message(t('WARNING: Account @displayname, Drupal UID=@uid has been deleted.', |
|
174 | 174 | array( |
175 | - '@uid' => $form['#uid'], |
|
176 | - '@displayname' => $account->boincuser_name, |
|
175 | + '@uid' => $form['#uid'], |
|
176 | + '@displayname' => $account->boincuser_name, |
|
177 | 177 | )), 'warning'); |
178 | 178 | |
179 | - // Delete the user |
|
180 | - _boincuser_delete_deleteuser($account, $action); |
|
179 | + // Delete the user |
|
180 | + _boincuser_delete_deleteuser($account, $action); |
|
181 | 181 | |
182 | - drupal_goto('/admin/boinc/user_delete'); |
|
182 | + drupal_goto('/admin/boinc/user_delete'); |
|
183 | 183 | } |
@@ -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 |
@@ -31,43 +31,43 @@ |
||
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 | } |
@@ -4,22 +4,22 @@ discard block |
||
4 | 4 | * Implementation of hook_views_default_views(). |
5 | 5 | */ |
6 | 6 | function user_profiles_views_default_views() { |
7 | - $views = array(); |
|
7 | + $views = array(); |
|
8 | 8 | |
9 | - // Exported view: moderation_queue |
|
10 | - $view = new view; |
|
11 | - $view->name = 'moderation_queue'; |
|
12 | - $view->description = ''; |
|
13 | - $view->tag = ''; |
|
14 | - $view->base_table = 'node'; |
|
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: moderation_queue |
|
10 | + $view = new view; |
|
11 | + $view->name = 'moderation_queue'; |
|
12 | + $view->description = ''; |
|
13 | + $view->tag = ''; |
|
14 | + $view->base_table = 'node'; |
|
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 | 'title' => array( |
21 | - 'label' => 'Title', |
|
22 | - 'alter' => array( |
|
21 | + 'label' => 'Title', |
|
22 | + 'alter' => array( |
|
23 | 23 | 'alter_text' => 0, |
24 | 24 | 'text' => '', |
25 | 25 | 'make_link' => 0, |
@@ -38,21 +38,21 @@ discard block |
||
38 | 38 | 'ellipsis' => 1, |
39 | 39 | 'html' => 0, |
40 | 40 | 'strip_tags' => 0, |
41 | - ), |
|
42 | - 'empty' => '', |
|
43 | - 'hide_empty' => 0, |
|
44 | - 'empty_zero' => 0, |
|
45 | - 'hide_alter_empty' => 1, |
|
46 | - 'link_to_node' => 1, |
|
47 | - 'exclude' => 0, |
|
48 | - 'id' => 'title', |
|
49 | - 'table' => 'node', |
|
50 | - 'field' => 'title', |
|
51 | - 'relationship' => 'none', |
|
41 | + ), |
|
42 | + 'empty' => '', |
|
43 | + 'hide_empty' => 0, |
|
44 | + 'empty_zero' => 0, |
|
45 | + 'hide_alter_empty' => 1, |
|
46 | + 'link_to_node' => 1, |
|
47 | + 'exclude' => 0, |
|
48 | + 'id' => 'title', |
|
49 | + 'table' => 'node', |
|
50 | + 'field' => 'title', |
|
51 | + 'relationship' => 'none', |
|
52 | 52 | ), |
53 | 53 | 'changed' => array( |
54 | - 'label' => 'Updated date', |
|
55 | - 'alter' => array( |
|
54 | + 'label' => 'Updated date', |
|
55 | + 'alter' => array( |
|
56 | 56 | 'alter_text' => 0, |
57 | 57 | 'text' => '', |
58 | 58 | 'make_link' => 0, |
@@ -71,22 +71,22 @@ discard block |
||
71 | 71 | 'ellipsis' => 1, |
72 | 72 | 'html' => 0, |
73 | 73 | 'strip_tags' => 0, |
74 | - ), |
|
75 | - 'empty' => '', |
|
76 | - 'hide_empty' => 0, |
|
77 | - 'empty_zero' => 0, |
|
78 | - 'hide_alter_empty' => 1, |
|
79 | - 'date_format' => 'time ago', |
|
80 | - 'custom_date_format' => '', |
|
81 | - 'exclude' => 0, |
|
82 | - 'id' => 'changed', |
|
83 | - 'table' => 'node', |
|
84 | - 'field' => 'changed', |
|
85 | - 'relationship' => 'none', |
|
74 | + ), |
|
75 | + 'empty' => '', |
|
76 | + 'hide_empty' => 0, |
|
77 | + 'empty_zero' => 0, |
|
78 | + 'hide_alter_empty' => 1, |
|
79 | + 'date_format' => 'time ago', |
|
80 | + 'custom_date_format' => '', |
|
81 | + 'exclude' => 0, |
|
82 | + 'id' => 'changed', |
|
83 | + 'table' => 'node', |
|
84 | + 'field' => 'changed', |
|
85 | + 'relationship' => 'none', |
|
86 | 86 | ), |
87 | 87 | 'uid' => array( |
88 | - 'label' => 'Uid', |
|
89 | - 'alter' => array( |
|
88 | + 'label' => 'Uid', |
|
89 | + 'alter' => array( |
|
90 | 90 | 'alter_text' => 0, |
91 | 91 | 'text' => '', |
92 | 92 | 'make_link' => 0, |
@@ -105,21 +105,21 @@ discard block |
||
105 | 105 | 'ellipsis' => 1, |
106 | 106 | 'html' => 0, |
107 | 107 | 'strip_tags' => 0, |
108 | - ), |
|
109 | - 'empty' => '', |
|
110 | - 'hide_empty' => 0, |
|
111 | - 'empty_zero' => 0, |
|
112 | - 'hide_alter_empty' => 1, |
|
113 | - 'link_to_user' => 1, |
|
114 | - 'exclude' => 1, |
|
115 | - 'id' => 'uid', |
|
116 | - 'table' => 'users', |
|
117 | - 'field' => 'uid', |
|
118 | - 'relationship' => 'none', |
|
108 | + ), |
|
109 | + 'empty' => '', |
|
110 | + 'hide_empty' => 0, |
|
111 | + 'empty_zero' => 0, |
|
112 | + 'hide_alter_empty' => 1, |
|
113 | + 'link_to_user' => 1, |
|
114 | + 'exclude' => 1, |
|
115 | + 'id' => 'uid', |
|
116 | + 'table' => 'users', |
|
117 | + 'field' => 'uid', |
|
118 | + 'relationship' => 'none', |
|
119 | 119 | ), |
120 | 120 | 'name' => array( |
121 | - 'label' => 'Author', |
|
122 | - 'alter' => array( |
|
121 | + 'label' => 'Author', |
|
122 | + 'alter' => array( |
|
123 | 123 | 'alter_text' => 0, |
124 | 124 | 'text' => '', |
125 | 125 | 'make_link' => 1, |
@@ -138,81 +138,81 @@ discard block |
||
138 | 138 | 'ellipsis' => 1, |
139 | 139 | 'html' => 0, |
140 | 140 | 'strip_tags' => 0, |
141 | - ), |
|
142 | - 'empty' => '', |
|
143 | - 'hide_empty' => 0, |
|
144 | - 'empty_zero' => 0, |
|
145 | - 'hide_alter_empty' => 0, |
|
146 | - 'link_to_user' => 0, |
|
147 | - 'overwrite_anonymous' => 1, |
|
148 | - 'anonymous_text' => 'Anonymous', |
|
149 | - 'exclude' => 0, |
|
150 | - 'id' => 'name', |
|
151 | - 'table' => 'users', |
|
152 | - 'field' => 'name', |
|
153 | - 'relationship' => 'none', |
|
141 | + ), |
|
142 | + 'empty' => '', |
|
143 | + 'hide_empty' => 0, |
|
144 | + 'empty_zero' => 0, |
|
145 | + 'hide_alter_empty' => 0, |
|
146 | + 'link_to_user' => 0, |
|
147 | + 'overwrite_anonymous' => 1, |
|
148 | + 'anonymous_text' => 'Anonymous', |
|
149 | + 'exclude' => 0, |
|
150 | + 'id' => 'name', |
|
151 | + 'table' => 'users', |
|
152 | + 'field' => 'name', |
|
153 | + 'relationship' => 'none', |
|
154 | 154 | ), |
155 | - )); |
|
156 | - $handler->override_option('filters', array( |
|
155 | + )); |
|
156 | + $handler->override_option('filters', array( |
|
157 | 157 | 'moderate' => array( |
158 | - 'operator' => '=', |
|
159 | - 'value' => '1', |
|
160 | - 'group' => '0', |
|
161 | - 'exposed' => FALSE, |
|
162 | - 'expose' => array( |
|
158 | + 'operator' => '=', |
|
159 | + 'value' => '1', |
|
160 | + 'group' => '0', |
|
161 | + 'exposed' => FALSE, |
|
162 | + 'expose' => array( |
|
163 | 163 | 'operator' => FALSE, |
164 | 164 | 'label' => '', |
165 | - ), |
|
166 | - 'id' => 'moderate', |
|
167 | - 'table' => 'node', |
|
168 | - 'field' => 'moderate', |
|
169 | - 'relationship' => 'none', |
|
165 | + ), |
|
166 | + 'id' => 'moderate', |
|
167 | + 'table' => 'node', |
|
168 | + 'field' => 'moderate', |
|
169 | + 'relationship' => 'none', |
|
170 | 170 | ), |
171 | - )); |
|
172 | - $handler->override_option('access', array( |
|
171 | + )); |
|
172 | + $handler->override_option('access', array( |
|
173 | 173 | 'type' => 'role', |
174 | 174 | 'role' => array( |
175 | - 1271379760 => 1271379760, |
|
175 | + 1271379760 => 1271379760, |
|
176 | 176 | ), |
177 | - )); |
|
178 | - $handler->override_option('cache', array( |
|
177 | + )); |
|
178 | + $handler->override_option('cache', array( |
|
179 | 179 | 'type' => 'none', |
180 | - )); |
|
181 | - $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page')); |
|
182 | - $handler->override_option('empty_format', '4'); |
|
183 | - $handler->override_option('use_pager', '1'); |
|
184 | - $handler->override_option('style_plugin', 'table'); |
|
185 | - $handler->override_option('style_options', array( |
|
180 | + )); |
|
181 | + $handler->override_option('empty', bts('No content is in the queue for moderation.', array(), NULL, 'boinc:moderate-user-page')); |
|
182 | + $handler->override_option('empty_format', '4'); |
|
183 | + $handler->override_option('use_pager', '1'); |
|
184 | + $handler->override_option('style_plugin', 'table'); |
|
185 | + $handler->override_option('style_options', array( |
|
186 | 186 | 'grouping' => '', |
187 | 187 | 'override' => 1, |
188 | 188 | 'sticky' => 0, |
189 | 189 | 'order' => 'desc', |
190 | 190 | 'summary' => '', |
191 | 191 | 'columns' => array( |
192 | - 'view_node' => 'view_node', |
|
193 | - 'title' => 'title', |
|
194 | - 'changed' => 'changed', |
|
192 | + 'view_node' => 'view_node', |
|
193 | + 'title' => 'title', |
|
194 | + 'changed' => 'changed', |
|
195 | 195 | ), |
196 | 196 | 'info' => array( |
197 | - 'view_node' => array( |
|
197 | + 'view_node' => array( |
|
198 | 198 | 'separator' => '', |
199 | - ), |
|
200 | - 'title' => array( |
|
199 | + ), |
|
200 | + 'title' => array( |
|
201 | 201 | 'sortable' => 0, |
202 | 202 | 'separator' => '', |
203 | - ), |
|
204 | - 'changed' => array( |
|
203 | + ), |
|
204 | + 'changed' => array( |
|
205 | 205 | 'sortable' => 0, |
206 | 206 | 'separator' => '', |
207 | - ), |
|
207 | + ), |
|
208 | 208 | ), |
209 | 209 | 'default' => 'changed', |
210 | - )); |
|
211 | - $handler = $view->new_display('page', 'User profiles', 'page_1'); |
|
212 | - $handler->override_option('fields', array( |
|
210 | + )); |
|
211 | + $handler = $view->new_display('page', 'User profiles', 'page_1'); |
|
212 | + $handler->override_option('fields', array( |
|
213 | 213 | 'uid' => array( |
214 | - 'label' => 'Uid', |
|
215 | - 'alter' => array( |
|
214 | + 'label' => 'Uid', |
|
215 | + 'alter' => array( |
|
216 | 216 | 'alter_text' => 0, |
217 | 217 | 'text' => '', |
218 | 218 | 'make_link' => 0, |
@@ -231,24 +231,24 @@ discard block |
||
231 | 231 | 'ellipsis' => 1, |
232 | 232 | 'html' => 0, |
233 | 233 | 'strip_tags' => 0, |
234 | - ), |
|
235 | - 'empty' => '', |
|
236 | - 'hide_empty' => 0, |
|
237 | - 'empty_zero' => 0, |
|
238 | - 'hide_alter_empty' => 1, |
|
239 | - 'link_to_user' => 1, |
|
240 | - 'exclude' => 1, |
|
241 | - 'id' => 'uid', |
|
242 | - 'table' => 'users', |
|
243 | - 'field' => 'uid', |
|
244 | - 'override' => array( |
|
234 | + ), |
|
235 | + 'empty' => '', |
|
236 | + 'hide_empty' => 0, |
|
237 | + 'empty_zero' => 0, |
|
238 | + 'hide_alter_empty' => 1, |
|
239 | + 'link_to_user' => 1, |
|
240 | + 'exclude' => 1, |
|
241 | + 'id' => 'uid', |
|
242 | + 'table' => 'users', |
|
243 | + 'field' => 'uid', |
|
244 | + 'override' => array( |
|
245 | 245 | 'button' => 'Use default', |
246 | - ), |
|
247 | - 'relationship' => 'none', |
|
246 | + ), |
|
247 | + 'relationship' => 'none', |
|
248 | 248 | ), |
249 | 249 | 'name' => array( |
250 | - 'label' => 'User', |
|
251 | - 'alter' => array( |
|
250 | + 'label' => 'User', |
|
251 | + 'alter' => array( |
|
252 | 252 | 'alter_text' => 0, |
253 | 253 | 'text' => '', |
254 | 254 | 'make_link' => 1, |
@@ -267,26 +267,26 @@ discard block |
||
267 | 267 | 'ellipsis' => 1, |
268 | 268 | 'html' => 0, |
269 | 269 | 'strip_tags' => 0, |
270 | - ), |
|
271 | - 'empty' => '', |
|
272 | - 'hide_empty' => 0, |
|
273 | - 'empty_zero' => 0, |
|
274 | - 'hide_alter_empty' => 1, |
|
275 | - 'link_to_user' => 1, |
|
276 | - 'overwrite_anonymous' => 0, |
|
277 | - 'anonymous_text' => '', |
|
278 | - 'exclude' => 0, |
|
279 | - 'id' => 'name', |
|
280 | - 'table' => 'users', |
|
281 | - 'field' => 'name', |
|
282 | - 'override' => array( |
|
270 | + ), |
|
271 | + 'empty' => '', |
|
272 | + 'hide_empty' => 0, |
|
273 | + 'empty_zero' => 0, |
|
274 | + 'hide_alter_empty' => 1, |
|
275 | + 'link_to_user' => 1, |
|
276 | + 'overwrite_anonymous' => 0, |
|
277 | + 'anonymous_text' => '', |
|
278 | + 'exclude' => 0, |
|
279 | + 'id' => 'name', |
|
280 | + 'table' => 'users', |
|
281 | + 'field' => 'name', |
|
282 | + 'override' => array( |
|
283 | 283 | 'button' => 'Use default', |
284 | - ), |
|
285 | - 'relationship' => 'none', |
|
284 | + ), |
|
285 | + 'relationship' => 'none', |
|
286 | 286 | ), |
287 | 287 | 'changed' => array( |
288 | - 'label' => 'Updated date', |
|
289 | - 'alter' => array( |
|
288 | + 'label' => 'Updated date', |
|
289 | + 'alter' => array( |
|
290 | 290 | 'alter_text' => 0, |
291 | 291 | 'text' => '', |
292 | 292 | 'make_link' => 0, |
@@ -305,22 +305,22 @@ discard block |
||
305 | 305 | 'ellipsis' => 1, |
306 | 306 | 'html' => 0, |
307 | 307 | 'strip_tags' => 0, |
308 | - ), |
|
309 | - 'empty' => '', |
|
310 | - 'hide_empty' => 0, |
|
311 | - 'empty_zero' => 0, |
|
312 | - 'hide_alter_empty' => 1, |
|
313 | - 'date_format' => 'time ago', |
|
314 | - 'custom_date_format' => '', |
|
315 | - 'exclude' => 0, |
|
316 | - 'id' => 'changed', |
|
317 | - 'table' => 'node', |
|
318 | - 'field' => 'changed', |
|
319 | - 'relationship' => 'none', |
|
308 | + ), |
|
309 | + 'empty' => '', |
|
310 | + 'hide_empty' => 0, |
|
311 | + 'empty_zero' => 0, |
|
312 | + 'hide_alter_empty' => 1, |
|
313 | + 'date_format' => 'time ago', |
|
314 | + 'custom_date_format' => '', |
|
315 | + 'exclude' => 0, |
|
316 | + 'id' => 'changed', |
|
317 | + 'table' => 'node', |
|
318 | + 'field' => 'changed', |
|
319 | + 'relationship' => 'none', |
|
320 | 320 | ), |
321 | 321 | 'phpcode' => array( |
322 | - 'label' => 'Edit Profile', |
|
323 | - 'alter' => array( |
|
322 | + 'label' => 'Edit Profile', |
|
323 | + 'alter' => array( |
|
324 | 324 | 'alter_text' => 0, |
325 | 325 | 'text' => '', |
326 | 326 | 'make_link' => 0, |
@@ -339,108 +339,108 @@ discard block |
||
339 | 339 | 'ellipsis' => 1, |
340 | 340 | 'html' => 0, |
341 | 341 | 'strip_tags' => 0, |
342 | - ), |
|
343 | - 'empty' => '', |
|
344 | - 'hide_empty' => 0, |
|
345 | - 'empty_zero' => 0, |
|
346 | - 'hide_alter_empty' => 1, |
|
347 | - 'value' => '<?php |
|
342 | + ), |
|
343 | + 'empty' => '', |
|
344 | + 'hide_empty' => 0, |
|
345 | + 'empty_zero' => 0, |
|
346 | + 'hide_alter_empty' => 1, |
|
347 | + 'value' => '<?php |
|
348 | 348 | $uid = $data->users_uid; |
349 | 349 | return l( |
350 | 350 | bts(\'edit\', array(), NULL, \'boinc:edit-profile\'), |
351 | 351 | "/moderate/profile/$uid/edit"); |
352 | 352 | ?>', |
353 | - 'exclude' => 0, |
|
354 | - 'id' => 'phpcode', |
|
355 | - 'table' => 'customfield', |
|
356 | - 'field' => 'phpcode', |
|
357 | - 'override' => array( |
|
353 | + 'exclude' => 0, |
|
354 | + 'id' => 'phpcode', |
|
355 | + 'table' => 'customfield', |
|
356 | + 'field' => 'phpcode', |
|
357 | + 'override' => array( |
|
358 | 358 | 'button' => 'Use default', |
359 | - ), |
|
360 | - 'relationship' => 'none', |
|
359 | + ), |
|
360 | + 'relationship' => 'none', |
|
361 | 361 | ), |
362 | - )); |
|
363 | - $handler->override_option('filters', array( |
|
362 | + )); |
|
363 | + $handler->override_option('filters', array( |
|
364 | 364 | 'moderate' => array( |
365 | - 'operator' => '=', |
|
366 | - 'value' => '1', |
|
367 | - 'group' => '0', |
|
368 | - 'exposed' => FALSE, |
|
369 | - 'expose' => array( |
|
365 | + 'operator' => '=', |
|
366 | + 'value' => '1', |
|
367 | + 'group' => '0', |
|
368 | + 'exposed' => FALSE, |
|
369 | + 'expose' => array( |
|
370 | 370 | 'operator' => FALSE, |
371 | 371 | 'label' => '', |
372 | - ), |
|
373 | - 'id' => 'moderate', |
|
374 | - 'table' => 'node', |
|
375 | - 'field' => 'moderate', |
|
376 | - 'override' => array( |
|
372 | + ), |
|
373 | + 'id' => 'moderate', |
|
374 | + 'table' => 'node', |
|
375 | + 'field' => 'moderate', |
|
376 | + 'override' => array( |
|
377 | 377 | 'button' => 'Use default', |
378 | - ), |
|
379 | - 'relationship' => 'none', |
|
378 | + ), |
|
379 | + 'relationship' => 'none', |
|
380 | 380 | ), |
381 | 381 | 'type' => array( |
382 | - 'operator' => 'in', |
|
383 | - 'value' => array( |
|
382 | + 'operator' => 'in', |
|
383 | + 'value' => array( |
|
384 | 384 | 'profile' => 'profile', |
385 | - ), |
|
386 | - 'group' => '0', |
|
387 | - 'exposed' => FALSE, |
|
388 | - 'expose' => array( |
|
385 | + ), |
|
386 | + 'group' => '0', |
|
387 | + 'exposed' => FALSE, |
|
388 | + 'expose' => array( |
|
389 | 389 | 'operator' => FALSE, |
390 | 390 | 'label' => '', |
391 | - ), |
|
392 | - 'id' => 'type', |
|
393 | - 'table' => 'node', |
|
394 | - 'field' => 'type', |
|
395 | - 'override' => array( |
|
391 | + ), |
|
392 | + 'id' => 'type', |
|
393 | + 'table' => 'node', |
|
394 | + 'field' => 'type', |
|
395 | + 'override' => array( |
|
396 | 396 | 'button' => 'Use default', |
397 | - ), |
|
398 | - 'relationship' => 'none', |
|
397 | + ), |
|
398 | + 'relationship' => 'none', |
|
399 | 399 | ), |
400 | - )); |
|
401 | - $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page')); |
|
402 | - $handler->override_option('path', 'moderate/profiles'); |
|
403 | - $handler->override_option('menu', array( |
|
400 | + )); |
|
401 | + $handler->override_option('title', bts('User profile moderation queue', array(), NULL, 'boinc:moderate-user-page')); |
|
402 | + $handler->override_option('path', 'moderate/profiles'); |
|
403 | + $handler->override_option('menu', array( |
|
404 | 404 | 'type' => 'default tab', |
405 | 405 | 'title' => 'Queue', |
406 | 406 | 'description' => '', |
407 | 407 | 'weight' => '-50', |
408 | 408 | 'name' => 'primary-links', |
409 | - )); |
|
410 | - $handler->override_option('tab_options', array( |
|
409 | + )); |
|
410 | + $handler->override_option('tab_options', array( |
|
411 | 411 | 'type' => 'normal', |
412 | 412 | 'title' => 'Moderation', |
413 | 413 | 'description' => '', |
414 | 414 | 'weight' => '0', |
415 | 415 | 'name' => 'primary-links', |
416 | - )); |
|
416 | + )); |
|
417 | 417 | |
418 | - $views[$view->name] = $view; |
|
418 | + $views[$view->name] = $view; |
|
419 | 419 | |
420 | - // Exported view: user_activity |
|
421 | - $view = new view; |
|
422 | - $view->name = 'user_activity'; |
|
423 | - $view->description = 'A feed of a user\'s activity on the site'; |
|
424 | - $view->tag = ''; |
|
425 | - $view->base_table = 'node_revisions'; |
|
426 | - $view->core = 6; |
|
427 | - $view->api_version = '2'; |
|
428 | - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
429 | - $handler = $view->new_display('default', 'Defaults', 'default'); |
|
430 | - $handler->override_option('relationships', array( |
|
420 | + // Exported view: user_activity |
|
421 | + $view = new view; |
|
422 | + $view->name = 'user_activity'; |
|
423 | + $view->description = 'A feed of a user\'s activity on the site'; |
|
424 | + $view->tag = ''; |
|
425 | + $view->base_table = 'node_revisions'; |
|
426 | + $view->core = 6; |
|
427 | + $view->api_version = '2'; |
|
428 | + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
|
429 | + $handler = $view->new_display('default', 'Defaults', 'default'); |
|
430 | + $handler->override_option('relationships', array( |
|
431 | 431 | 'uid' => array( |
432 | - 'label' => 'user', |
|
433 | - 'required' => 1, |
|
434 | - 'id' => 'uid', |
|
435 | - 'table' => 'node_revisions', |
|
436 | - 'field' => 'uid', |
|
437 | - 'relationship' => 'none', |
|
432 | + 'label' => 'user', |
|
433 | + 'required' => 1, |
|
434 | + 'id' => 'uid', |
|
435 | + 'table' => 'node_revisions', |
|
436 | + 'field' => 'uid', |
|
437 | + 'relationship' => 'none', |
|
438 | 438 | ), |
439 | - )); |
|
440 | - $handler->override_option('fields', array( |
|
439 | + )); |
|
440 | + $handler->override_option('fields', array( |
|
441 | 441 | 'nid' => array( |
442 | - 'label' => 'Nid', |
|
443 | - 'alter' => array( |
|
442 | + 'label' => 'Nid', |
|
443 | + 'alter' => array( |
|
444 | 444 | 'alter_text' => 0, |
445 | 445 | 'text' => '', |
446 | 446 | 'make_link' => 0, |
@@ -459,21 +459,21 @@ discard block |
||
459 | 459 | 'ellipsis' => 1, |
460 | 460 | 'html' => 0, |
461 | 461 | 'strip_tags' => 0, |
462 | - ), |
|
463 | - 'empty' => '', |
|
464 | - 'hide_empty' => 0, |
|
465 | - 'empty_zero' => 0, |
|
466 | - 'hide_alter_empty' => 1, |
|
467 | - 'link_to_node' => 0, |
|
468 | - 'exclude' => 1, |
|
469 | - 'id' => 'nid', |
|
470 | - 'table' => 'node', |
|
471 | - 'field' => 'nid', |
|
472 | - 'relationship' => 'none', |
|
462 | + ), |
|
463 | + 'empty' => '', |
|
464 | + 'hide_empty' => 0, |
|
465 | + 'empty_zero' => 0, |
|
466 | + 'hide_alter_empty' => 1, |
|
467 | + 'link_to_node' => 0, |
|
468 | + 'exclude' => 1, |
|
469 | + 'id' => 'nid', |
|
470 | + 'table' => 'node', |
|
471 | + 'field' => 'nid', |
|
472 | + 'relationship' => 'none', |
|
473 | 473 | ), |
474 | 474 | 'title' => array( |
475 | - 'label' => 'Title', |
|
476 | - 'alter' => array( |
|
475 | + 'label' => 'Title', |
|
476 | + 'alter' => array( |
|
477 | 477 | 'alter_text' => 0, |
478 | 478 | 'text' => '', |
479 | 479 | 'make_link' => 0, |
@@ -492,21 +492,21 @@ discard block |
||
492 | 492 | 'ellipsis' => 1, |
493 | 493 | 'html' => 0, |
494 | 494 | 'strip_tags' => 0, |
495 | - ), |
|
496 | - 'empty' => '', |
|
497 | - 'hide_empty' => 0, |
|
498 | - 'empty_zero' => 0, |
|
499 | - 'hide_alter_empty' => 1, |
|
500 | - 'link_to_node' => 0, |
|
501 | - 'exclude' => 1, |
|
502 | - 'id' => 'title', |
|
503 | - 'table' => 'node', |
|
504 | - 'field' => 'title', |
|
505 | - 'relationship' => 'none', |
|
495 | + ), |
|
496 | + 'empty' => '', |
|
497 | + 'hide_empty' => 0, |
|
498 | + 'empty_zero' => 0, |
|
499 | + 'hide_alter_empty' => 1, |
|
500 | + 'link_to_node' => 0, |
|
501 | + 'exclude' => 1, |
|
502 | + 'id' => 'title', |
|
503 | + 'table' => 'node', |
|
504 | + 'field' => 'title', |
|
505 | + 'relationship' => 'none', |
|
506 | 506 | ), |
507 | 507 | 'type' => array( |
508 | - 'label' => 'Type', |
|
509 | - 'alter' => array( |
|
508 | + 'label' => 'Type', |
|
509 | + 'alter' => array( |
|
510 | 510 | 'alter_text' => 0, |
511 | 511 | 'text' => '', |
512 | 512 | 'make_link' => 0, |
@@ -525,22 +525,22 @@ discard block |
||
525 | 525 | 'ellipsis' => 1, |
526 | 526 | 'html' => 0, |
527 | 527 | 'strip_tags' => 0, |
528 | - ), |
|
529 | - 'empty' => '', |
|
530 | - 'hide_empty' => 0, |
|
531 | - 'empty_zero' => 0, |
|
532 | - 'hide_alter_empty' => 1, |
|
533 | - 'link_to_node' => 0, |
|
534 | - 'machine_name' => 0, |
|
535 | - 'exclude' => 1, |
|
536 | - 'id' => 'type', |
|
537 | - 'table' => 'node', |
|
538 | - 'field' => 'type', |
|
539 | - 'relationship' => 'none', |
|
528 | + ), |
|
529 | + 'empty' => '', |
|
530 | + 'hide_empty' => 0, |
|
531 | + 'empty_zero' => 0, |
|
532 | + 'hide_alter_empty' => 1, |
|
533 | + 'link_to_node' => 0, |
|
534 | + 'machine_name' => 0, |
|
535 | + 'exclude' => 1, |
|
536 | + 'id' => 'type', |
|
537 | + 'table' => 'node', |
|
538 | + 'field' => 'type', |
|
539 | + 'relationship' => 'none', |
|
540 | 540 | ), |
541 | 541 | 'uid' => array( |
542 | - 'label' => 'Uid', |
|
543 | - 'alter' => array( |
|
542 | + 'label' => 'Uid', |
|
543 | + 'alter' => array( |
|
544 | 544 | 'alter_text' => 0, |
545 | 545 | 'text' => '', |
546 | 546 | 'make_link' => 0, |
@@ -559,21 +559,21 @@ discard block |
||
559 | 559 | 'ellipsis' => 1, |
560 | 560 | 'html' => 0, |
561 | 561 | 'strip_tags' => 0, |
562 | - ), |
|
563 | - 'empty' => '', |
|
564 | - 'hide_empty' => 0, |
|
565 | - 'empty_zero' => 0, |
|
566 | - 'hide_alter_empty' => 1, |
|
567 | - 'link_to_user' => 0, |
|
568 | - 'exclude' => 1, |
|
569 | - 'id' => 'uid', |
|
570 | - 'table' => 'users', |
|
571 | - 'field' => 'uid', |
|
572 | - 'relationship' => 'uid', |
|
562 | + ), |
|
563 | + 'empty' => '', |
|
564 | + 'hide_empty' => 0, |
|
565 | + 'empty_zero' => 0, |
|
566 | + 'hide_alter_empty' => 1, |
|
567 | + 'link_to_user' => 0, |
|
568 | + 'exclude' => 1, |
|
569 | + 'id' => 'uid', |
|
570 | + 'table' => 'users', |
|
571 | + 'field' => 'uid', |
|
572 | + 'relationship' => 'uid', |
|
573 | 573 | ), |
574 | 574 | 'nothing' => array( |
575 | - 'label' => '', |
|
576 | - 'alter' => array( |
|
575 | + 'label' => '', |
|
576 | + 'alter' => array( |
|
577 | 577 | 'text' => '<div class="gray-divider"></div>', |
578 | 578 | 'make_link' => 0, |
579 | 579 | 'path' => '', |
@@ -591,20 +591,20 @@ discard block |
||
591 | 591 | 'ellipsis' => 1, |
592 | 592 | 'html' => 0, |
593 | 593 | 'strip_tags' => 0, |
594 | - ), |
|
595 | - 'empty' => '', |
|
596 | - 'hide_empty' => 0, |
|
597 | - 'empty_zero' => 0, |
|
598 | - 'hide_alter_empty' => 1, |
|
599 | - 'exclude' => 0, |
|
600 | - 'id' => 'nothing', |
|
601 | - 'table' => 'views', |
|
602 | - 'field' => 'nothing', |
|
603 | - 'relationship' => 'none', |
|
594 | + ), |
|
595 | + 'empty' => '', |
|
596 | + 'hide_empty' => 0, |
|
597 | + 'empty_zero' => 0, |
|
598 | + 'hide_alter_empty' => 1, |
|
599 | + 'exclude' => 0, |
|
600 | + 'id' => 'nothing', |
|
601 | + 'table' => 'views', |
|
602 | + 'field' => 'nothing', |
|
603 | + 'relationship' => 'none', |
|
604 | 604 | ), |
605 | 605 | 'phpcode_1' => array( |
606 | - 'label' => '', |
|
607 | - 'alter' => array( |
|
606 | + 'label' => '', |
|
607 | + 'alter' => array( |
|
608 | 608 | 'alter_text' => 0, |
609 | 609 | 'text' => '', |
610 | 610 | 'make_link' => 0, |
@@ -623,12 +623,12 @@ discard block |
||
623 | 623 | 'ellipsis' => 1, |
624 | 624 | 'html' => 0, |
625 | 625 | 'strip_tags' => 0, |
626 | - ), |
|
627 | - 'empty' => '', |
|
628 | - 'hide_empty' => 0, |
|
629 | - 'empty_zero' => 0, |
|
630 | - 'hide_alter_empty' => 1, |
|
631 | - 'value' => '<?php |
|
626 | + ), |
|
627 | + 'empty' => '', |
|
628 | + 'hide_empty' => 0, |
|
629 | + 'empty_zero' => 0, |
|
630 | + 'hide_alter_empty' => 1, |
|
631 | + 'value' => '<?php |
|
632 | 632 | |
633 | 633 | switch($data->node_type) { |
634 | 634 | case \'forum\': |
@@ -657,18 +657,18 @@ discard block |
||
657 | 657 | $account = user_load($uid); |
658 | 658 | echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment)); |
659 | 659 | ?>', |
660 | - 'exclude' => 0, |
|
661 | - 'id' => 'phpcode_1', |
|
662 | - 'table' => 'customfield', |
|
663 | - 'field' => 'phpcode', |
|
664 | - 'relationship' => 'none', |
|
665 | - 'override' => array( |
|
660 | + 'exclude' => 0, |
|
661 | + 'id' => 'phpcode_1', |
|
662 | + 'table' => 'customfield', |
|
663 | + 'field' => 'phpcode', |
|
664 | + 'relationship' => 'none', |
|
665 | + 'override' => array( |
|
666 | 666 | 'button' => 'Override', |
667 | - ), |
|
667 | + ), |
|
668 | 668 | ), |
669 | 669 | 'body' => array( |
670 | - 'label' => '', |
|
671 | - 'alter' => array( |
|
670 | + 'label' => '', |
|
671 | + 'alter' => array( |
|
672 | 672 | 'alter_text' => 0, |
673 | 673 | 'text' => '', |
674 | 674 | 'make_link' => 0, |
@@ -687,20 +687,20 @@ discard block |
||
687 | 687 | 'ellipsis' => 1, |
688 | 688 | 'html' => 0, |
689 | 689 | 'strip_tags' => 1, |
690 | - ), |
|
691 | - 'empty' => '', |
|
692 | - 'hide_empty' => 0, |
|
693 | - 'empty_zero' => 0, |
|
694 | - 'hide_alter_empty' => 1, |
|
695 | - 'exclude' => 0, |
|
696 | - 'id' => 'body', |
|
697 | - 'table' => 'node_revisions', |
|
698 | - 'field' => 'body', |
|
699 | - 'relationship' => 'none', |
|
690 | + ), |
|
691 | + 'empty' => '', |
|
692 | + 'hide_empty' => 0, |
|
693 | + 'empty_zero' => 0, |
|
694 | + 'hide_alter_empty' => 1, |
|
695 | + 'exclude' => 0, |
|
696 | + 'id' => 'body', |
|
697 | + 'table' => 'node_revisions', |
|
698 | + 'field' => 'body', |
|
699 | + 'relationship' => 'none', |
|
700 | 700 | ), |
701 | 701 | 'timestamp' => array( |
702 | - 'label' => '', |
|
703 | - 'alter' => array( |
|
702 | + 'label' => '', |
|
703 | + 'alter' => array( |
|
704 | 704 | 'alter_text' => 0, |
705 | 705 | 'text' => '', |
706 | 706 | 'make_link' => 0, |
@@ -719,40 +719,40 @@ discard block |
||
719 | 719 | 'ellipsis' => 1, |
720 | 720 | 'html' => 0, |
721 | 721 | 'strip_tags' => 0, |
722 | - ), |
|
723 | - 'empty' => '', |
|
724 | - 'hide_empty' => 0, |
|
725 | - 'empty_zero' => 0, |
|
726 | - 'hide_alter_empty' => 1, |
|
727 | - 'date_format' => 'custom', |
|
728 | - 'custom_date_format' => 'jS F Y', |
|
729 | - 'exclude' => 0, |
|
730 | - 'id' => 'timestamp', |
|
731 | - 'table' => 'node_revisions', |
|
732 | - 'field' => 'timestamp', |
|
733 | - 'relationship' => 'none', |
|
722 | + ), |
|
723 | + 'empty' => '', |
|
724 | + 'hide_empty' => 0, |
|
725 | + 'empty_zero' => 0, |
|
726 | + 'hide_alter_empty' => 1, |
|
727 | + 'date_format' => 'custom', |
|
728 | + 'custom_date_format' => 'jS F Y', |
|
729 | + 'exclude' => 0, |
|
730 | + 'id' => 'timestamp', |
|
731 | + 'table' => 'node_revisions', |
|
732 | + 'field' => 'timestamp', |
|
733 | + 'relationship' => 'none', |
|
734 | 734 | ), |
735 | - )); |
|
736 | - $handler->override_option('arguments', array( |
|
735 | + )); |
|
736 | + $handler->override_option('arguments', array( |
|
737 | 737 | 'uid' => array( |
738 | - 'default_action' => 'default', |
|
739 | - 'style_plugin' => 'default_summary', |
|
740 | - 'style_options' => array(), |
|
741 | - 'wildcard' => 'all', |
|
742 | - 'wildcard_substitution' => 'All', |
|
743 | - 'title' => '', |
|
744 | - 'breadcrumb' => '', |
|
745 | - 'default_argument_type' => 'user', |
|
746 | - 'default_argument' => '', |
|
747 | - 'validate_type' => 'user', |
|
748 | - 'validate_fail' => 'empty', |
|
749 | - 'break_phrase' => 0, |
|
750 | - 'not' => 0, |
|
751 | - 'id' => 'uid', |
|
752 | - 'table' => 'users', |
|
753 | - 'field' => 'uid', |
|
754 | - 'validate_user_argument_type' => 'uid', |
|
755 | - 'validate_user_roles' => array( |
|
738 | + 'default_action' => 'default', |
|
739 | + 'style_plugin' => 'default_summary', |
|
740 | + 'style_options' => array(), |
|
741 | + 'wildcard' => 'all', |
|
742 | + 'wildcard_substitution' => 'All', |
|
743 | + 'title' => '', |
|
744 | + 'breadcrumb' => '', |
|
745 | + 'default_argument_type' => 'user', |
|
746 | + 'default_argument' => '', |
|
747 | + 'validate_type' => 'user', |
|
748 | + 'validate_fail' => 'empty', |
|
749 | + 'break_phrase' => 0, |
|
750 | + 'not' => 0, |
|
751 | + 'id' => 'uid', |
|
752 | + 'table' => 'users', |
|
753 | + 'field' => 'uid', |
|
754 | + 'validate_user_argument_type' => 'uid', |
|
755 | + 'validate_user_roles' => array( |
|
756 | 756 | 2 => 0, |
757 | 757 | 3519698132 => 0, |
758 | 758 | 1110965548 => 0, |
@@ -761,20 +761,20 @@ discard block |
||
761 | 761 | 268174006 => 0, |
762 | 762 | 1271379760 => 0, |
763 | 763 | 933038561 => 0, |
764 | - ), |
|
765 | - 'relationship' => 'uid', |
|
766 | - 'default_options_div_prefix' => '', |
|
767 | - 'default_taxonomy_tid_term_page' => 0, |
|
768 | - 'default_taxonomy_tid_node' => 0, |
|
769 | - 'default_taxonomy_tid_limit' => 0, |
|
770 | - 'default_taxonomy_tid_vids' => array( |
|
764 | + ), |
|
765 | + 'relationship' => 'uid', |
|
766 | + 'default_options_div_prefix' => '', |
|
767 | + 'default_taxonomy_tid_term_page' => 0, |
|
768 | + 'default_taxonomy_tid_node' => 0, |
|
769 | + 'default_taxonomy_tid_limit' => 0, |
|
770 | + 'default_taxonomy_tid_vids' => array( |
|
771 | 771 | 1 => 0, |
772 | 772 | 2 => 0, |
773 | - ), |
|
774 | - 'default_argument_user' => 0, |
|
775 | - 'default_argument_fixed' => '', |
|
776 | - 'default_argument_php' => '', |
|
777 | - 'validate_argument_node_type' => array( |
|
773 | + ), |
|
774 | + 'default_argument_user' => 0, |
|
775 | + 'default_argument_fixed' => '', |
|
776 | + 'default_argument_php' => '', |
|
777 | + 'validate_argument_node_type' => array( |
|
778 | 778 | 'page' => 0, |
779 | 779 | 'news' => 0, |
780 | 780 | 'team' => 0, |
@@ -783,20 +783,20 @@ discard block |
||
783 | 783 | 'forum' => 0, |
784 | 784 | 'panel' => 0, |
785 | 785 | 'story' => 0, |
786 | - ), |
|
787 | - 'validate_argument_node_access' => 0, |
|
788 | - 'validate_argument_nid_type' => 'nid', |
|
789 | - 'validate_argument_vocabulary' => array( |
|
786 | + ), |
|
787 | + 'validate_argument_node_access' => 0, |
|
788 | + 'validate_argument_nid_type' => 'nid', |
|
789 | + 'validate_argument_vocabulary' => array( |
|
790 | 790 | 1 => 0, |
791 | 791 | 2 => 0, |
792 | - ), |
|
793 | - 'validate_argument_type' => 'tid', |
|
794 | - 'validate_argument_transform' => 0, |
|
795 | - 'validate_user_restrict_roles' => 0, |
|
796 | - 'validate_argument_php' => '', |
|
797 | - 'me_redirect' => 0, |
|
798 | - 'me_validate_user_argument_type' => 'uid', |
|
799 | - 'me_validate_user_roles' => array( |
|
792 | + ), |
|
793 | + 'validate_argument_type' => 'tid', |
|
794 | + 'validate_argument_transform' => 0, |
|
795 | + 'validate_user_restrict_roles' => 0, |
|
796 | + 'validate_argument_php' => '', |
|
797 | + 'me_redirect' => 0, |
|
798 | + 'me_validate_user_argument_type' => 'uid', |
|
799 | + 'me_validate_user_roles' => array( |
|
800 | 800 | 2 => 0, |
801 | 801 | 3519698132 => 0, |
802 | 802 | 1110965548 => 0, |
@@ -805,67 +805,67 @@ discard block |
||
805 | 805 | 268174006 => 0, |
806 | 806 | 1271379760 => 0, |
807 | 807 | 933038561 => 0, |
808 | - ), |
|
809 | - 'validate_argument_node_flag_name' => '*relationship*', |
|
810 | - 'validate_argument_node_flag_test' => 'flaggable', |
|
811 | - 'validate_argument_node_flag_id_type' => 'id', |
|
812 | - 'validate_argument_user_flag_name' => '*relationship*', |
|
813 | - 'validate_argument_user_flag_test' => 'flaggable', |
|
814 | - 'validate_argument_user_flag_id_type' => 'id', |
|
815 | - 'me_validate_user_restrict_roles' => 0, |
|
808 | + ), |
|
809 | + 'validate_argument_node_flag_name' => '*relationship*', |
|
810 | + 'validate_argument_node_flag_test' => 'flaggable', |
|
811 | + 'validate_argument_node_flag_id_type' => 'id', |
|
812 | + 'validate_argument_user_flag_name' => '*relationship*', |
|
813 | + 'validate_argument_user_flag_test' => 'flaggable', |
|
814 | + 'validate_argument_user_flag_id_type' => 'id', |
|
815 | + 'me_validate_user_restrict_roles' => 0, |
|
816 | 816 | ), |
817 | - )); |
|
818 | - $handler->override_option('access', array( |
|
817 | + )); |
|
818 | + $handler->override_option('access', array( |
|
819 | 819 | 'type' => 'none', |
820 | - )); |
|
821 | - $handler->override_option('cache', array( |
|
820 | + )); |
|
821 | + $handler->override_option('cache', array( |
|
822 | 822 | 'type' => 'none', |
823 | - )); |
|
824 | - $handler->override_option('items_per_page', 5); |
|
825 | - $handler->override_option('use_pager', '1'); |
|
826 | - $handler->override_option('row_options', array( |
|
823 | + )); |
|
824 | + $handler->override_option('items_per_page', 5); |
|
825 | + $handler->override_option('use_pager', '1'); |
|
826 | + $handler->override_option('row_options', array( |
|
827 | 827 | 'inline' => array( |
828 | - 'value' => 'value', |
|
829 | - 'phpcode_1' => 'phpcode_1', |
|
828 | + 'value' => 'value', |
|
829 | + 'phpcode_1' => 'phpcode_1', |
|
830 | 830 | ), |
831 | 831 | 'separator' => ' ', |
832 | 832 | 'hide_empty' => 0, |
833 | - )); |
|
834 | - $handler = $view->new_display('block', 'Block', 'block_1'); |
|
835 | - $handler->override_option('block_description', ''); |
|
836 | - $handler->override_option('block_caching', -1); |
|
837 | - $handler = $view->new_display('page', 'Page', 'page_1'); |
|
838 | - $handler->override_option('title', 'Recent posts'); |
|
839 | - $handler->override_option('style_plugin', 'grid'); |
|
840 | - $handler->override_option('style_options', array( |
|
833 | + )); |
|
834 | + $handler = $view->new_display('block', 'Block', 'block_1'); |
|
835 | + $handler->override_option('block_description', ''); |
|
836 | + $handler->override_option('block_caching', -1); |
|
837 | + $handler = $view->new_display('page', 'Page', 'page_1'); |
|
838 | + $handler->override_option('title', 'Recent posts'); |
|
839 | + $handler->override_option('style_plugin', 'grid'); |
|
840 | + $handler->override_option('style_options', array( |
|
841 | 841 | 'grouping' => '', |
842 | 842 | 'columns' => '1', |
843 | 843 | 'alignment' => 'vertical', |
844 | 844 | 'fill_single_line' => 1, |
845 | 845 | 'summary' => '', |
846 | - )); |
|
847 | - $handler->override_option('row_options', array( |
|
846 | + )); |
|
847 | + $handler->override_option('row_options', array( |
|
848 | 848 | 'inline' => array(), |
849 | 849 | 'separator' => '', |
850 | 850 | 'hide_empty' => 0, |
851 | - )); |
|
852 | - $handler->override_option('path', 'account/%/posts'); |
|
853 | - $handler->override_option('menu', array( |
|
851 | + )); |
|
852 | + $handler->override_option('path', 'account/%/posts'); |
|
853 | + $handler->override_option('menu', array( |
|
854 | 854 | 'type' => 'none', |
855 | 855 | 'title' => '', |
856 | 856 | 'description' => '', |
857 | 857 | 'weight' => '0', |
858 | 858 | 'name' => 'primary-links', |
859 | - )); |
|
860 | - $handler->override_option('tab_options', array( |
|
859 | + )); |
|
860 | + $handler->override_option('tab_options', array( |
|
861 | 861 | 'type' => 'none', |
862 | 862 | 'title' => '', |
863 | 863 | 'description' => '', |
864 | 864 | 'weight' => 0, |
865 | 865 | 'name' => 'navigation', |
866 | - )); |
|
866 | + )); |
|
867 | 867 | |
868 | - $views[$view->name] = $view; |
|
868 | + $views[$view->name] = $view; |
|
869 | 869 | |
870 | - return $views; |
|
870 | + return $views; |
|
871 | 871 | } |
@@ -556,14 +556,14 @@ |
||
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; |