Completed
Pull Request — master (#2659)
by Christian
10:33
created
drupal/sites/default/boinc/modules/contrib/filefield/filefield.theme.inc 1 patch
Switch Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -123,126 +123,126 @@
 block discarded – undo
123 123
 function _filefield_generic_icon_map($file) {
124 124
   switch ($file['filemime']) {
125 125
     // Word document types.
126
-    case 'application/msword':
127
-    case 'application/vnd.ms-word.document.macroEnabled.12':
128
-    case 'application/vnd.oasis.opendocument.text':
129
-    case 'application/vnd.oasis.opendocument.text-template':
130
-    case 'application/vnd.oasis.opendocument.text-master':
131
-    case 'application/vnd.oasis.opendocument.text-web':
132
-    case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
133
-    case 'application/vnd.stardivision.writer':
134
-    case 'application/vnd.sun.xml.writer':
135
-    case 'application/vnd.sun.xml.writer.template':
136
-    case 'application/vnd.sun.xml.writer.global':
137
-    case 'application/vnd.wordperfect':
138
-    case 'application/x-abiword':
139
-    case 'application/x-applix-word':
140
-    case 'application/x-kword':
141
-    case 'application/x-kword-crypt':
142
-      return 'x-office-document';
143
-
144
-    // Spreadsheet document types.
145
-    case 'application/vnd.ms-excel':
146
-    case 'application/vnd.ms-excel.sheet.macroEnabled.12':
147
-    case 'application/vnd.oasis.opendocument.spreadsheet':
148
-    case 'application/vnd.oasis.opendocument.spreadsheet-template':
149
-    case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
150
-    case 'application/vnd.stardivision.calc':
151
-    case 'application/vnd.sun.xml.calc':
152
-    case 'application/vnd.sun.xml.calc.template':
153
-    case 'application/vnd.lotus-1-2-3':
154
-    case 'application/x-applix-spreadsheet':
155
-    case 'application/x-gnumeric':
156
-    case 'application/x-kspread':
157
-    case 'application/x-kspread-crypt':
158
-      return 'x-office-spreadsheet';
159
-
160
-    // Presentation document types.
161
-    case 'application/vnd.ms-powerpoint':
162
-    case 'application/vnd.ms-powerpoint.presentation.macroEnabled.12':
163
-    case 'application/vnd.oasis.opendocument.presentation':
164
-    case 'application/vnd.oasis.opendocument.presentation-template':
165
-    case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
166
-    case 'application/vnd.openxmlformats-officedocument.presentationml.slideshow':
167
-    case 'application/vnd.stardivision.impress':
168
-    case 'application/vnd.sun.xml.impress':
169
-    case 'application/vnd.sun.xml.impress.template':
170
-    case 'application/x-kpresenter':
171
-      return 'x-office-presentation';
172
-
173
-    // Compressed archive types.
174
-    case 'application/zip':
175
-    case 'application/x-zip':
176
-    case 'application/stuffit':
177
-    case 'application/x-stuffit':
178
-    case 'application/x-7z-compressed':
179
-    case 'application/x-ace':
180
-    case 'application/x-arj':
181
-    case 'application/x-bzip':
182
-    case 'application/x-bzip-compressed-tar':
183
-    case 'application/x-compress':
184
-    case 'application/x-compressed-tar':
185
-    case 'application/x-cpio-compressed':
186
-    case 'application/x-deb':
187
-    case 'application/x-gzip':
188
-    case 'application/x-java-archive':
189
-    case 'application/x-lha':
190
-    case 'application/x-lhz':
191
-    case 'application/x-lzop':
192
-    case 'application/x-rar':
193
-    case 'application/x-rpm':
194
-    case 'application/x-tzo':
195
-    case 'application/x-tar':
196
-    case 'application/x-tarz':
197
-    case 'application/x-tgz':
198
-      return 'package-x-generic';
199
-
200
-    // Script file types.
201
-    case 'application/ecmascript':
202
-    case 'application/javascript':
203
-    case 'application/mathematica':
204
-    case 'application/vnd.mozilla.xul+xml':
205
-    case 'application/x-asp':
206
-    case 'application/x-awk':
207
-    case 'application/x-cgi':
208
-    case 'application/x-csh':
209
-    case 'application/x-m4':
210
-    case 'application/x-perl':
211
-    case 'application/x-php':
212
-    case 'application/x-ruby':
213
-    case 'application/x-shellscript':
214
-    case 'text/vnd.wap.wmlscript':
215
-    case 'text/x-emacs-lisp':
216
-    case 'text/x-haskell':
217
-    case 'text/x-literate-haskell':
218
-    case 'text/x-lua':
219
-    case 'text/x-makefile':
220
-    case 'text/x-matlab':
221
-    case 'text/x-python':
222
-    case 'text/x-sql':
223
-    case 'text/x-tcl':
224
-      return 'text-x-script';
225
-
226
-    // HTML aliases.
227
-    case 'application/xhtml+xml':
228
-      return 'text-html';
229
-
230
-    // RTF files.
231
-    case 'application/rtf':
232
-      return 'text-rtf';
233
-
234
-    // Google earth files.
235
-    case 'application/vnd.google-earth.kml+xml':
236
-    case 'application/vnd.google-earth.kmz':
237
-      return 'application-google-earth';
238
-
239
-    // Executable types.
240
-    case 'application/x-macbinary':
241
-    case 'application/x-ms-dos-executable':
242
-    case 'application/x-pef-executable':
243
-      return 'application-x-executable';
244
-
245
-    default:
246
-      return FALSE;
126
+  case 'application/msword':
127
+  case 'application/vnd.ms-word.document.macroEnabled.12':
128
+  case 'application/vnd.oasis.opendocument.text':
129
+  case 'application/vnd.oasis.opendocument.text-template':
130
+  case 'application/vnd.oasis.opendocument.text-master':
131
+  case 'application/vnd.oasis.opendocument.text-web':
132
+  case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
133
+  case 'application/vnd.stardivision.writer':
134
+  case 'application/vnd.sun.xml.writer':
135
+  case 'application/vnd.sun.xml.writer.template':
136
+  case 'application/vnd.sun.xml.writer.global':
137
+  case 'application/vnd.wordperfect':
138
+  case 'application/x-abiword':
139
+  case 'application/x-applix-word':
140
+  case 'application/x-kword':
141
+  case 'application/x-kword-crypt':
142
+    return 'x-office-document';
143
+
144
+  // Spreadsheet document types.
145
+  case 'application/vnd.ms-excel':
146
+  case 'application/vnd.ms-excel.sheet.macroEnabled.12':
147
+  case 'application/vnd.oasis.opendocument.spreadsheet':
148
+  case 'application/vnd.oasis.opendocument.spreadsheet-template':
149
+  case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
150
+  case 'application/vnd.stardivision.calc':
151
+  case 'application/vnd.sun.xml.calc':
152
+  case 'application/vnd.sun.xml.calc.template':
153
+  case 'application/vnd.lotus-1-2-3':
154
+  case 'application/x-applix-spreadsheet':
155
+  case 'application/x-gnumeric':
156
+  case 'application/x-kspread':
157
+  case 'application/x-kspread-crypt':
158
+    return 'x-office-spreadsheet';
159
+
160
+  // Presentation document types.
161
+  case 'application/vnd.ms-powerpoint':
162
+  case 'application/vnd.ms-powerpoint.presentation.macroEnabled.12':
163
+  case 'application/vnd.oasis.opendocument.presentation':
164
+  case 'application/vnd.oasis.opendocument.presentation-template':
165
+  case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
166
+  case 'application/vnd.openxmlformats-officedocument.presentationml.slideshow':
167
+  case 'application/vnd.stardivision.impress':
168
+  case 'application/vnd.sun.xml.impress':
169
+  case 'application/vnd.sun.xml.impress.template':
170
+  case 'application/x-kpresenter':
171
+    return 'x-office-presentation';
172
+
173
+  // Compressed archive types.
174
+  case 'application/zip':
175
+  case 'application/x-zip':
176
+  case 'application/stuffit':
177
+  case 'application/x-stuffit':
178
+  case 'application/x-7z-compressed':
179
+  case 'application/x-ace':
180
+  case 'application/x-arj':
181
+  case 'application/x-bzip':
182
+  case 'application/x-bzip-compressed-tar':
183
+  case 'application/x-compress':
184
+  case 'application/x-compressed-tar':
185
+  case 'application/x-cpio-compressed':
186
+  case 'application/x-deb':
187
+  case 'application/x-gzip':
188
+  case 'application/x-java-archive':
189
+  case 'application/x-lha':
190
+  case 'application/x-lhz':
191
+  case 'application/x-lzop':
192
+  case 'application/x-rar':
193
+  case 'application/x-rpm':
194
+  case 'application/x-tzo':
195
+  case 'application/x-tar':
196
+  case 'application/x-tarz':
197
+  case 'application/x-tgz':
198
+    return 'package-x-generic';
199
+
200
+  // Script file types.
201
+  case 'application/ecmascript':
202
+  case 'application/javascript':
203
+  case 'application/mathematica':
204
+  case 'application/vnd.mozilla.xul+xml':
205
+  case 'application/x-asp':
206
+  case 'application/x-awk':
207
+  case 'application/x-cgi':
208
+  case 'application/x-csh':
209
+  case 'application/x-m4':
210
+  case 'application/x-perl':
211
+  case 'application/x-php':
212
+  case 'application/x-ruby':
213
+  case 'application/x-shellscript':
214
+  case 'text/vnd.wap.wmlscript':
215
+  case 'text/x-emacs-lisp':
216
+  case 'text/x-haskell':
217
+  case 'text/x-literate-haskell':
218
+  case 'text/x-lua':
219
+  case 'text/x-makefile':
220
+  case 'text/x-matlab':
221
+  case 'text/x-python':
222
+  case 'text/x-sql':
223
+  case 'text/x-tcl':
224
+    return 'text-x-script';
225
+
226
+  // HTML aliases.
227
+  case 'application/xhtml+xml':
228
+    return 'text-html';
229
+
230
+  // RTF files.
231
+  case 'application/rtf':
232
+    return 'text-rtf';
233
+
234
+  // Google earth files.
235
+  case 'application/vnd.google-earth.kml+xml':
236
+  case 'application/vnd.google-earth.kmz':
237
+    return 'application-google-earth';
238
+
239
+  // Executable types.
240
+  case 'application/x-macbinary':
241
+  case 'application/x-ms-dos-executable':
242
+  case 'application/x-pef-executable':
243
+    return 'application-x-executable';
244
+
245
+  default:
246
+    return FALSE;
247 247
   }
248 248
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/filefield/filefield.module 1 patch
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -313,10 +313,10 @@
 block discarded – undo
313 313
  */
314 314
 function filefield_widget_settings($op, $widget) {
315 315
   switch ($op) {
316
-    case 'form':
317
-      return filefield_widget_settings_form($widget);
318
-    case 'save':
319
-      return filefield_widget_settings_save($widget);
316
+  case 'form':
317
+    return filefield_widget_settings_form($widget);
318
+  case 'save':
319
+    return filefield_widget_settings_save($widget);
320 320
   }
321 321
 }
322 322
 
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/forum_access/forum_access.node.inc 1 patch
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -79,27 +79,27 @@  discard block
 block discarded – undo
79 79
     $allowed_options = variable_get('forum_access_allowed_node_edit_options', array('status', 'sticky', 'subscriptions_notify'));
80 80
     foreach (element_children($form) as $key) {
81 81
       switch ($key) {
82
-        case 'options':
83
-          foreach (element_children($form[$key]) as $key2) {
84
-            if (array_search($key2, $allowed_options) === FALSE) {
85
-              $form[$key][$key2]['#access'] = FALSE;
86
-            }
87
-          }
88
-          break;
89
-        case 'buttons':
90
-          $tid = $form['taxonomy'][$vid]['#default_value'][0];
91
-          if (!forum_access_access($tid, 'update')) {
92
-            $form['buttons']['submit']['#access'] = FALSE;
93
-            $form['buttons']['preview']['#access'] = FALSE;
94
-          }
95
-          if (!forum_access_access($tid, 'delete')) {
96
-            $form['buttons']['delete']['#access'] = FALSE;
97
-          }
98
-          break;
99
-        default:
100
-          if (array_search($key, $allowed_elements) === FALSE) {
101
-            $form[$key]['#access'] = FALSE;
82
+      case 'options':
83
+        foreach (element_children($form[$key]) as $key2) {
84
+          if (array_search($key2, $allowed_options) === FALSE) {
85
+            $form[$key][$key2]['#access'] = FALSE;
102 86
           }
87
+        }
88
+        break;
89
+      case 'buttons':
90
+        $tid = $form['taxonomy'][$vid]['#default_value'][0];
91
+        if (!forum_access_access($tid, 'update')) {
92
+          $form['buttons']['submit']['#access'] = FALSE;
93
+          $form['buttons']['preview']['#access'] = FALSE;
94
+        }
95
+        if (!forum_access_access($tid, 'delete')) {
96
+          $form['buttons']['delete']['#access'] = FALSE;
97
+        }
98
+        break;
99
+      default:
100
+        if (array_search($key, $allowed_elements) === FALSE) {
101
+          $form[$key]['#access'] = FALSE;
102
+        }
103 103
       }
104 104
     }
105 105
   }
@@ -120,20 +120,20 @@  discard block
 block discarded – undo
120 120
     if ($tid = _forum_access_get_tid($node)) {
121 121
       if (!forum_access_access($tid, 'comment_create') and !(forum_access_access($tid, 'create') and ($node->uid==$user->uid)) ) {
122 122
         switch (arg(0)) {
123
-          case 'node':
124
-              // Remove the in-line comment form, replace with text message to user.
125
-              $form = NULL;
126
-              $form['from'] = array(
127
-                  '#type'  => 'item',
128
-                  '#value' => 'You do not have permission to post comments in this forum.',);
129
-            break;
130
-            case 'comment':
131
-                if (arg(1)=='reply') {
132
-                    drupal_set_message(t("ERROR: You do not have permission to post comments in this forum."), 'error');
133
-                    drupal_goto("node/$node->nid");
134
-                    exit;
135
-                }
136
-            break;
123
+        case 'node':
124
+            // Remove the in-line comment form, replace with text message to user.
125
+            $form = NULL;
126
+            $form['from'] = array(
127
+                '#type'  => 'item',
128
+                '#value' => 'You do not have permission to post comments in this forum.',);
129
+          break;
130
+        case 'comment':
131
+            if (arg(1)=='reply') {
132
+                drupal_set_message(t("ERROR: You do not have permission to post comments in this forum."), 'error');
133
+                drupal_goto("node/$node->nid");
134
+                exit;
135
+            }
136
+        break;
137 137
         }//switch arg(0)
138 138
       }
139 139
       else {
Please login to merge, or discard this patch.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.module 1 patch
Switch Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -94,64 +94,64 @@  discard block
 block discarded – undo
94 94
   global $user;
95 95
 
96 96
   switch($form_id) {
97
-    case 'user_profile_form':
98
-      if ( user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3)=='') ) {
99
-        $form['delete'] = array(
100
-          '#type' => 'submit',
101
-          '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
102
-          '#weight' => 1009,
103
-          '#submit' => array('user_edit_delete_submit'),
104
-          '#prefix' => '<li class="tab">',
105
-          '#suffix' => '</li>',
106
-        );
107
-      }
108
-      else if ( user_access('administer users') ) {
109
-        $form['delete'] = array(
110
-          '#type' => 'submit',
111
-          '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
112
-          '#weight' => 1009,
113
-          '#submit' => array('_boincuser_delete_goto_admindelete'),
114
-          '#prefix' => '<li class="tab">',
115
-          '#suffix' => '</li>',
116
-        );
117
-      }
118
-      else {
119
-        unset($form['delete']);
120
-      }
121
-      break;
122
-    case 'user_confirm_delete':
123
-
124
-      $disable_delete = FALSE;
125
-      // If email address was changed less than 7 days (7 * 86400 s)
126
-      // ago, it cannot be changed again.
127
-      $duration = TOKEN_DURATION_ONE_WEEK;
128
-      if (($form['_account']['#value']->boincuser_email_addr_change_time + $duration) > time()) {
129
-        drupal_set_message(
130
-          bts("INFO: Your email address was changed within the past seven (7) days. You may not delete your account until after !time.",
131
-            array(
132
-              '!time' => date('F j, Y \a\t G:i T', $form['_account']['#value']->boincuser_email_addr_change_time + $duration),
133
-            ), NULL, 'boinc:account-credentials-change')
134
-        , 'info');
135
-        $disable_delete = TRUE;
136
-      }
137
-
138
-      // Configure radio options
139
-      $deleteoptions = array(
140
-        'boincuser_delete_softdelete' => bts('<b>Soft delete</b> the account. Afterwards your account will be disabled, and all posts/comments will be attributed to the Anonymous User. However, your user profile will be deleted, your host information deleted, and you will be removed from any team you are a member of.', array(), NULL, 'boinc:delete-user-account'),
141
-        'boincuser_delete_delete' => bts('<b>Delete</b> the account. Afterwards your account will be deleted, and all posts/comments will be attributed to the Anonymous User. Your user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),
97
+  case 'user_profile_form':
98
+    if ( user_access('delete own account') AND ($form['#uid'] == $user->uid) AND (arg(3)=='') ) {
99
+      $form['delete'] = array(
100
+        '#type' => 'submit',
101
+        '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
102
+        '#weight' => 1009,
103
+        '#submit' => array('user_edit_delete_submit'),
104
+        '#prefix' => '<li class="tab">',
105
+        '#suffix' => '</li>',
142 106
       );
107
+    }
108
+    else if ( user_access('administer users') ) {
109
+      $form['delete'] = array(
110
+        '#type' => 'submit',
111
+        '#value' => bts('Delete Account', array(), null, 'boinc:delete-user-account'),
112
+        '#weight' => 1009,
113
+        '#submit' => array('_boincuser_delete_goto_admindelete'),
114
+        '#prefix' => '<li class="tab">',
115
+        '#suffix' => '</li>',
116
+      );
117
+    }
118
+    else {
119
+      unset($form['delete']);
120
+    }
121
+    break;
122
+  case 'user_confirm_delete':
123
+
124
+    $disable_delete = FALSE;
125
+    // If email address was changed less than 7 days (7 * 86400 s)
126
+    // ago, it cannot be changed again.
127
+    $duration = TOKEN_DURATION_ONE_WEEK;
128
+    if (($form['_account']['#value']->boincuser_email_addr_change_time + $duration) > time()) {
129
+      drupal_set_message(
130
+        bts("INFO: Your email address was changed within the past seven (7) days. You may not delete your account until after !time.",
131
+          array(
132
+            '!time' => date('F j, Y \a\t G:i T', $form['_account']['#value']->boincuser_email_addr_change_time + $duration),
133
+          ), NULL, 'boinc:account-credentials-change')
134
+      , 'info');
135
+      $disable_delete = TRUE;
136
+    }
137
+
138
+    // Configure radio options
139
+    $deleteoptions = array(
140
+      'boincuser_delete_softdelete' => bts('<b>Soft delete</b> the account. Afterwards your account will be disabled, and all posts/comments will be attributed to the Anonymous User. However, your user profile will be deleted, your host information deleted, and you will be removed from any team you are a member of.', array(), NULL, 'boinc:delete-user-account'),
141
+      'boincuser_delete_delete' => bts('<b>Delete</b> the account. Afterwards your account will be deleted, and all posts/comments will be attributed to the Anonymous User. Your user profile will be deleted.', array(), NULL, 'boinc:delete-user-account'),
142
+    );
143 143
 
144
-      $dtypes = variable_get('boincuser_delete_type', 'user_decides');
145
-      // unset the other option if dtype is set. i.e., if dtype is set
146
-      // to soft delete, unset the hard delete option.
147
-      switch ($dtypes) {
148
-        case 'soft_obfuscate':
149
-          unset($deleteoptions['boincuser_delete_delete']);
150
-          break;
151
-        case 'hard_wipe':
152
-          unset($deleteoptions['boincuser_delete_softdelete']);
153
-          break;
154
-      }
144
+    $dtypes = variable_get('boincuser_delete_type', 'user_decides');
145
+    // unset the other option if dtype is set. i.e., if dtype is set
146
+    // to soft delete, unset the hard delete option.
147
+    switch ($dtypes) {
148
+    case 'soft_obfuscate':
149
+    unset($deleteoptions['boincuser_delete_delete']);
150
+    break;
151
+    case 'hard_wipe':
152
+    unset($deleteoptions['boincuser_delete_softdelete']);
153
+    break;
154
+    }
155 155
 
156 156
       $question = 'Are you sure you want to delete the account <em>' . htmlspecialchars($form['_account']['#value']->boincuser_name) . '</em>?';
157 157
       drupal_set_title($question);
@@ -303,56 +303,56 @@  discard block
 block discarded – undo
303 303
   // create token with 1 day/24 hour expiration
304 304
   $mytoken = create_token($account->boincuser_id, 'D', 24*60*60);
305 305
   switch ($op) {
306
-    case 'boincuser_delete_softdelete':
307
-      $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
308
-      break;
309
-    case 'boincuser_delete_delete':
310
-      $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
306
+  case 'boincuser_delete_softdelete':
307
+    $myurl = "${base_url}/user/{$account->uid}/odeleteconfirm/$mytoken";
311 308
       break;
312
-  }
313
-
314
-  $mysubject = "Instructions for account deletion at {$site_name}";
315
-  $mymessage = ''
316
-    . "{$account->boincuser_name},\n"
317
-    . "\n"
318
-    . "We have received a request to DELETE your user account at "
319
-    . "${site_name}. Below in this email is a one-time token you must "
320
-    . "use. Either click on the link or copy-and-paste the URL into your "
321
-    . "browser address bar. Then you will be required to enter your password "
322
-    . "again to confirm your identity.\n"
323
-    . "\n"
324
-    . "${myurl}\n"
325
-    . "\n"
326
-    . "This one-time token will expire in 24 hours. Afterwards you must "
327
-    . "re-request deletion of your account in order to generate a new token.\n"
328
-    . "\n"
329
-    . "If you did not initiate this request, please login to the "
330
-    . "${site_name} Web site (${site_url}) and "
331
-    . "then contact the administrators.\n"
332
-    . "\n"
333
-    . "Thanks, \n"
334
-    . "\n"
335
-    . "{$site_name} support team";
336
-
337
-  // Create array for sending email to user to notify account is being
338
-  // disabled/deleted. Then send email.
339
-  $settings = array(
340
-    'from' => '',
341
-    'subject' => $mysubject,
342
-    'message' => $mymessage,
343
-  );
344
-  rules_action_mail_to_user($account, $settings);
345
-
346
-  drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
309
+case 'boincuser_delete_delete':
310
+  $myurl = "${base_url}/user/{$account->uid}/deleteconfirm/$mytoken";
311
+  break;
312
+}
347 313
 
348
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
349
-  // Redirect
350
-  if (!empty($redirect)) {
351
-    drupal_goto($redirect);
352
-  }
353
-  else {
354
-    drupal_goto();
355
-  }
314
+$mysubject = "Instructions for account deletion at {$site_name}";
315
+$mymessage = ''
316
+. "{$account->boincuser_name},\n"
317
+. "\n"
318
+. "We have received a request to DELETE your user account at "
319
+. "${site_name}. Below in this email is a one-time token you must "
320
+. "use. Either click on the link or copy-and-paste the URL into your "
321
+. "browser address bar. Then you will be required to enter your password "
322
+. "again to confirm your identity.\n"
323
+. "\n"
324
+. "${myurl}\n"
325
+. "\n"
326
+. "This one-time token will expire in 24 hours. Afterwards you must "
327
+. "re-request deletion of your account in order to generate a new token.\n"
328
+. "\n"
329
+. "If you did not initiate this request, please login to the "
330
+. "${site_name} Web site (${site_url}) and "
331
+. "then contact the administrators.\n"
332
+. "\n"
333
+. "Thanks, \n"
334
+. "\n"
335
+. "{$site_name} support team";
336
+
337
+// Create array for sending email to user to notify account is being
338
+// disabled/deleted. Then send email.
339
+$settings = array(
340
+'from' => '',
341
+'subject' => $mysubject,
342
+'message' => $mymessage,
343
+);
344
+rules_action_mail_to_user($account, $settings);
345
+
346
+drupal_set_message(bts("INFO: You have requested account deletion. Please check your email for further instructions.", array(), NULL, 'boinc:delete-user-account'),'info');
347
+
348
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
349
+// Redirect
350
+if (!empty($redirect)) {
351
+drupal_goto($redirect);
352
+}
353
+else {
354
+drupal_goto();
355
+}
356 356
 }
357 357
 
358 358
 
@@ -364,77 +364,77 @@  discard block
 block discarded – undo
364 364
  * The final confirmation form for the user to delete their account.
365 365
  */
366 366
 function boincuser_delete_finalconfirmation(&$form_state, $token) {
367
-  require_boinc('token');
368
-
369
-  global $user;
370
-  $form = array();
371
-
372
-  // check BOINC user exists
373
-  $account = user_load(array('uid' => $user->uid));
374
-  $uid = $user->uid;
375
-  $boincid = $account->boincuser_id;
376
-  // check $token is valid
377
-  if (!is_valid_token($boincid, $token, 'D')) {
378
-    drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
379
-    array(
380
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
381
-    ),
382
-    NULL, 'boinc:delete-user-account'), 'error');
383
-    drupal_goto();
384
-  }
385
-
386
-  // Attach account to this form.
387
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
388
-
389
-  // This form is for hard/wipe delete
390
-  $form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
391
-
392
-  // Instructions
393
-  $form['main']['instructions1'] = array(
394
-    '#value' => '<p>'.
395
-    bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
396
-    '</p>',
397
-  );
398
-
399
-  $form['main']['instructions2'] = array(
400
-    '#value' => '<p>'.
401
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
402
-    '</p>',
403
-  );
404
-
405
-  // Password field
406
-  $form['main']['current_pass'] = array(
407
-    '#type' => 'password',
408
-    '#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
409
-    '#size' => 17,
410
-    '#attributes' => array(
411
-      'autocomplete' => 'off',
412
-    ),
413
-    '#weight' => 25,
414
-  );
415
-
416
-  // Form control
417
-  $form['form control tabs prefix'] = array(
418
-    '#value' => '<ul class="form-control tab-list">',
419
-    '#weight' => 1001,
420
-  );
421
-  $form['submit'] = array(
422
-    '#prefix' => '<li class="first tab">',
423
-    '#type' => 'submit',
424
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
425
-    '#suffix' => '</li>',
426
-    '#weight' => 1002,
427
-  );
428
-  $form['form control tabs'] = array(
429
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
430
-    '#weight' => 1003,
431
-  );
432
-  $form['form control tabs suffix'] = array(
433
-    '#value' => '</ul>',
434
-    '#weight' => 1004,
435
-  );
367
+require_boinc('token');
368
+
369
+global $user;
370
+$form = array();
371
+
372
+// check BOINC user exists
373
+$account = user_load(array('uid' => $user->uid));
374
+$uid = $user->uid;
375
+$boincid = $account->boincuser_id;
376
+// check $token is valid
377
+if (!is_valid_token($boincid, $token, 'D')) {
378
+drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
379
+array(
380
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
381
+),
382
+NULL, 'boinc:delete-user-account'), 'error');
383
+drupal_goto();
384
+}
436 385
 
437
-  return $form;
386
+// Attach account to this form.
387
+$form['_account'] = array('#type' => 'value', '#value' => $account);
388
+
389
+// This form is for hard/wipe delete
390
+$form['_action'] = array('#type' => 'value', '#value' => 'hard_wipe');
391
+
392
+// Instructions
393
+$form['main']['instructions1'] = array(
394
+'#value' => '<p>'.
395
+bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
396
+'</p>',
397
+);
398
+
399
+$form['main']['instructions2'] = array(
400
+'#value' => '<p>'.
401
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
402
+'</p>',
403
+);
404
+
405
+// Password field
406
+$form['main']['current_pass'] = array(
407
+'#type' => 'password',
408
+'#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
409
+'#size' => 17,
410
+'#attributes' => array(
411
+  'autocomplete' => 'off',
412
+),
413
+'#weight' => 25,
414
+);
415
+
416
+// Form control
417
+$form['form control tabs prefix'] = array(
418
+'#value' => '<ul class="form-control tab-list">',
419
+'#weight' => 1001,
420
+);
421
+$form['submit'] = array(
422
+'#prefix' => '<li class="first tab">',
423
+'#type' => 'submit',
424
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
425
+'#suffix' => '</li>',
426
+'#weight' => 1002,
427
+);
428
+$form['form control tabs'] = array(
429
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
430
+'#weight' => 1003,
431
+);
432
+$form['form control tabs suffix'] = array(
433
+'#value' => '</ul>',
434
+'#weight' => 1004,
435
+);
436
+
437
+return $form;
438 438
 }
439 439
 
440 440
 /**
@@ -442,122 +442,122 @@  discard block
 block discarded – undo
442 442
  * the soft/obfuscate method.
443 443
  */
444 444
 function boincuser_delete_softdelconfirmation(&$form_state, $token) {
445
-  require_boinc('token');
446
-
447
-  global $user;
448
-  $form = array();
449
-
450
-  // check BOINC user exists
451
-  $account = user_load(array('uid' => $user->uid));
452
-  $uid = $user->uid;
453
-  $boincid = $account->boincuser_id;
454
-
455
-  // check $token is valid
456
-  if (!is_valid_token($boincid, $token, 'D')) {
457
-    drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
458
-    array(
459
-      '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
460
-    ),
461
-    NULL, 'boinc:delete-user-account'), 'error');
462
-    drupal_goto();
463
-  }
464
-
465
-  // Attach account to this form.
466
-  $form['_account'] = array('#type' => 'value', '#value' => $account);
467
-
468
-  // This form is for hard/wipe delete
469
-  $form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
470
-
471
-  // Instructions
472
-  $form['main']['instructions1'] = array(
473
-    '#value' => '<p>'.
474
-    bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
475
-    '</p>',
476
-  );
477
-
478
-  $form['main']['instructions2'] = array(
479
-    '#value' => '<p>'.
480
-    bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
481
-    '</p>',
482
-  );
483
-
484
-  // Password field
485
-  $form['main']['current_pass'] = array(
486
-    '#type' => 'password',
487
-    '#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
488
-    '#size' => 17,
489
-    '#attributes' => array(
490
-      'autocomplete' => 'off',
491
-    ),
492
-    '#weight' => 25,
493
-  );
494
-
495
-  // Form control
496
-  $form['form control tabs prefix'] = array(
497
-    '#value' => '<ul class="form-control tab-list">',
498
-    '#weight' => 1001,
499
-  );
500
-  $form['submit'] = array(
501
-    '#prefix' => '<li class="first tab">',
502
-    '#type' => 'submit',
503
-    '#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
504
-    '#suffix' => '</li>',
505
-    '#weight' => 1002,
506
-  );
507
-  $form['form control tabs'] = array(
508
-    '#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
509
-    '#weight' => 1003,
510
-  );
511
-  $form['form control tabs suffix'] = array(
512
-    '#value' => '</ul>',
513
-    '#weight' => 1004,
514
-  );
445
+require_boinc('token');
446
+
447
+global $user;
448
+$form = array();
449
+
450
+// check BOINC user exists
451
+$account = user_load(array('uid' => $user->uid));
452
+$uid = $user->uid;
453
+$boincid = $account->boincuser_id;
454
+
455
+// check $token is valid
456
+if (!is_valid_token($boincid, $token, 'D')) {
457
+drupal_set_message(bts('ERROR: You have supplied an incorrect (most likely expired) token. Please obtain a new token by !link your account be deleted.',
458
+array(
459
+  '!link' => l(bts('re-requesting', array(), NULL, 'boinc:delete-user-account'), "/user/${uid}/delete"),
460
+),
461
+NULL, 'boinc:delete-user-account'), 'error');
462
+drupal_goto();
463
+}
515 464
 
516
-  //set validation and submit to the functions below
517
-  $form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
518
-  $form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
519
-  return $form;
465
+// Attach account to this form.
466
+$form['_account'] = array('#type' => 'value', '#value' => $account);
467
+
468
+// This form is for hard/wipe delete
469
+$form['_action'] = array('#type' => 'value', '#value' => 'soft_obfuscate');
470
+
471
+// Instructions
472
+$form['main']['instructions1'] = array(
473
+'#value' => '<p>'.
474
+bts('You are one-step away from deleting your account. Enter your password in the textbox below and click submit. This action is irreversable: once you delete your account, there is no way un-delete.', array(), NULL, 'boinc:delete-user-account').
475
+'</p>',
476
+);
477
+
478
+$form['main']['instructions2'] = array(
479
+'#value' => '<p>'.
480
+bts('If you wish to cancel, click cancel and you will be taken to your account dashboard.', array(), NULL, 'boinc:delete-user-account').
481
+'</p>',
482
+);
483
+
484
+// Password field
485
+$form['main']['current_pass'] = array(
486
+'#type' => 'password',
487
+'#title' => bts('Enter your password before clicking Submit', array(), NULL, 'boinc:delete-user-account'),
488
+'#size' => 17,
489
+'#attributes' => array(
490
+  'autocomplete' => 'off',
491
+),
492
+'#weight' => 25,
493
+);
494
+
495
+// Form control
496
+$form['form control tabs prefix'] = array(
497
+'#value' => '<ul class="form-control tab-list">',
498
+'#weight' => 1001,
499
+);
500
+$form['submit'] = array(
501
+'#prefix' => '<li class="first tab">',
502
+'#type' => 'submit',
503
+'#value' => bts('Submit', array(), NULL, 'boinc:form-submit'),
504
+'#suffix' => '</li>',
505
+'#weight' => 1002,
506
+);
507
+$form['form control tabs'] = array(
508
+'#value' => '<li class="tab">' . l(bts('Cancel', array(), NULL, 'boinc:form-cancel'), "account/") . '</li>',
509
+'#weight' => 1003,
510
+);
511
+$form['form control tabs suffix'] = array(
512
+'#value' => '</ul>',
513
+'#weight' => 1004,
514
+);
515
+
516
+//set validation and submit to the functions below
517
+$form['#validate'][] = 'boincuser_delete_finalconfirmation_validate';
518
+$form['#submit'][] = 'boincuser_delete_finalconfirmation_submit';
519
+return $form;
520 520
 }
521 521
 
522 522
 /**
523 523
  * Validation for final confirmation
524 524
  */
525 525
 function boincuser_delete_finalconfirmation_validate($form, &$form_state) {
526
-  $account = $form_state['values']['_account'];
527
-  $boinc_user = BoincUser::lookup_id($account->boincuser_id);
526
+$account = $form_state['values']['_account'];
527
+$boinc_user = BoincUser::lookup_id($account->boincuser_id);
528 528
 
529
-  if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
530
-    return true;
531
-  }
529
+if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
530
+return true;
531
+}
532 532
 }
533 533
 
534 534
 /**
535 535
  * Submit for final confirmation
536 536
  */
537 537
 function boincuser_delete_finalconfirmation_submit($form, &$form_state) {
538
-  global $user;
539
-
540
-  // Delete the user
541
-  $account = $form_state['values']['_account'];
542
-  $action = $form_state['values']['_action'];
543
-  _boincuser_delete_deleteuser($account, $action);
544
-
545
-  // Destroy the current session:
546
-  session_destroy();
547
-  // Only variables can be passed by reference workaround.
548
-  $null = NULL;
549
-  user_module_invoke('logout', $null, $user);
550
-
551
-  // Load the anonymous user
552
-  $user = drupal_anonymous_user();
553
-
554
-  $redirect = variable_get('boincuser_delete_redirect', '<front>');
555
-  // Redirect
556
-  if (!empty($redirect)) {
557
-    drupal_goto($redirect);
558
-  }
559
-  else {
560
-    drupal_goto();
561
-  }
538
+global $user;
539
+
540
+// Delete the user
541
+$account = $form_state['values']['_account'];
542
+$action = $form_state['values']['_action'];
543
+_boincuser_delete_deleteuser($account, $action);
544
+
545
+// Destroy the current session:
546
+session_destroy();
547
+// Only variables can be passed by reference workaround.
548
+$null = NULL;
549
+user_module_invoke('logout', $null, $user);
550
+
551
+// Load the anonymous user
552
+$user = drupal_anonymous_user();
553
+
554
+$redirect = variable_get('boincuser_delete_redirect', '<front>');
555
+// Redirect
556
+if (!empty($redirect)) {
557
+drupal_goto($redirect);
558
+}
559
+else {
560
+drupal_goto();
561
+}
562 562
 
563 563
 }
Please login to merge, or discard this patch.
default/boinc/modules/boincuser/boincuser_delete/boincuser_delete.admin.inc 1 patch
Switch Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -13,45 +13,45 @@  discard block
 block discarded – undo
13 13
  *   a form array
14 14
  */
15 15
 function boincuser_delete_settings() {
16
-  $form = array();
17
-
18
-  $default = array(
19
-    'boincuser_delete_type' => variable_get('boincuser_delete_type', ''),
20
-    'boincuser_delete_redirect' => variable_get('boincuser_delete_redirect', '<front>'),
21
-  );
22
-
23
-  $form['options'] = array(
24
-    '#type' => 'fieldset',
25
-    '#title' => t('Options'),
26
-  );
27
-  $form['options']['help'] = array(
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
-    '#weight' => 11,
30
-  );
31
-  $form['options']['boincuser_delete_type'] = array(
32
-    '#type' => 'radios',
33
-    '#title' => t('Type of delete'),
34
-    '#default_value' => $default['boincuser_delete_type'],
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.'),
39
-    ),
40
-    '#weight' => 21,
41
-  );
42
-
43
-  $form['redirect'] = array(
44
-    '#type' => 'fieldset',
45
-    '#title' => t('Redirect'),
46
-  );
47
-  $form['redirect']['boincuser_delete_redirect'] = array(
48
-    '#type' => 'textfield',
49
-    '#title' => t('Redirection page'),
50
-    '#default_value' => $default['boincuser_delete_redirect'],
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
-  );
53
-
54
-  return system_settings_form($form);
16
+$form = array();
17
+
18
+$default = array(
19
+'boincuser_delete_type' => variable_get('boincuser_delete_type', ''),
20
+'boincuser_delete_redirect' => variable_get('boincuser_delete_redirect', '<front>'),
21
+);
22
+
23
+$form['options'] = array(
24
+'#type' => 'fieldset',
25
+'#title' => t('Options'),
26
+);
27
+$form['options']['help'] = array(
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
+'#weight' => 11,
30
+);
31
+$form['options']['boincuser_delete_type'] = array(
32
+'#type' => 'radios',
33
+'#title' => t('Type of delete'),
34
+'#default_value' => $default['boincuser_delete_type'],
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.'),
39
+),
40
+'#weight' => 21,
41
+);
42
+
43
+$form['redirect'] = array(
44
+'#type' => 'fieldset',
45
+'#title' => t('Redirect'),
46
+);
47
+$form['redirect']['boincuser_delete_redirect'] = array(
48
+'#type' => 'textfield',
49
+'#title' => t('Redirection page'),
50
+'#default_value' => $default['boincuser_delete_redirect'],
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
+);
53
+
54
+return system_settings_form($form);
55 55
 }
56 56
 
57 57
 
@@ -60,124 +60,124 @@  discard block
 block discarded – undo
60 60
  * password checks.
61 61
  */
62 62
 function boincuser_delete_admindelete(&$form_state, $uid) {
63
-  $form = array();
64
-
65
-  $form['#uid'] = $uid;
66
-
67
-  $form['account']['help'] = array(
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
-    '#weight' => -1,
70
-    '#prefix' => "<div id='delete-instructions'>",
71
-    '#suffix' => "</div>",
63
+$form = array();
64
+
65
+$form['#uid'] = $uid;
66
+
67
+$form['account']['help'] = array(
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
+'#weight' => -1,
70
+'#prefix' => "<div id='delete-instructions'>",
71
+'#suffix' => "</div>",
72
+);
73
+
74
+$account = user_load($uid);
75
+if ($account) {
76
+drupal_set_title($account->boincuser_name);
77
+
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'))),
80
+);
81
+$form['account']['boincuser_id'] = array(
82
+  '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id,
83
+);
84
+$form['account']['drupal_name'] = array(
85
+  '#value' => t('<li>Drupal username (internal): ') . $account->name,
86
+);
87
+$form['account']['user_id'] = array(
88
+  '#value' => t('<li>Drupal user ID: ') . $account->uid,
89
+);
90
+
91
+$form['account']['user_delete_action'] = array(
92
+    '#type' => 'radios',
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'),),
72 96
   );
73 97
 
74
-  $account = user_load($uid);
75
-  if ($account) {
76
-    drupal_set_title($account->boincuser_name);
77
-
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'))),
80
-    );
81
-    $form['account']['boincuser_id'] = array(
82
-      '#value' => t('<li>BOINC user ID: ') . $account->boincuser_id,
83
-    );
84
-    $form['account']['drupal_name'] = array(
85
-      '#value' => t('<li>Drupal username (internal): ') . $account->name,
86
-    );
87
-    $form['account']['user_id'] = array(
88
-      '#value' => t('<li>Drupal user ID: ') . $account->uid,
89
-    );
90
-
91
-    $form['account']['user_delete_action'] = array(
92
-        '#type' => 'radios',
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
-      );
97
-
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.',
101
-        array('%name' => $account->boincuser_name)
102
-      ),
103
-      '#default_value' => FALSE,
104
-    );
105
-
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(
111
-        'autocomplete' => 'off',
112
-      ),
113
-      '#weight' => 25,
114
-    );
115
-
116
-    // Action buttons
117
-    $form['actions']['submit'] = array(
118
-      '#type' => 'submit',
119
-      '#value' => t('Submit'),
120
-    );
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'),
127
-    );
128
-
129
-    $form['#redirect'] = 'account';
130
-  }
131
-  else {
132
-    $form['noaccount'] = array(
133
-      '#value' => t('No such user with UID: %uid', array('%uid' => $uid)),
134
-    );
135
-  }
136
-
137
-  return $form;
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.',
101
+    array('%name' => $account->boincuser_name)
102
+  ),
103
+  '#default_value' => FALSE,
104
+);
105
+
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(
111
+    'autocomplete' => 'off',
112
+  ),
113
+  '#weight' => 25,
114
+);
115
+
116
+// Action buttons
117
+$form['actions']['submit'] = array(
118
+  '#type' => 'submit',
119
+  '#value' => t('Submit'),
120
+);
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'),
127
+);
128
+
129
+$form['#redirect'] = 'account';
130
+}
131
+else {
132
+$form['noaccount'] = array(
133
+  '#value' => t('No such user with UID: %uid', array('%uid' => $uid)),
134
+);
135
+}
136
+
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'] == '') {
148
-    form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.'));
149
-  }
147
+if ($form_state['values']['user_delete_action'] == '') {
148
+form_set_error('user_delete_action', t('Please select an action to perform using the radio buttons.'));
149
+}
150 150
 
151
-  if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) {
152
-    form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.'));
153
-  }
151
+if ( ($form_state['values']['user_delete_action'] != 'soft_obfuscate') and ($form_state['values']['user_delete_action'] != 'hard_wipe') ) {
152
+form_set_error('user_delete_action', t('User Delete action not a predefined value, unknown error in radio buttons.'));
153
+}
154 154
 
155
-  if (!($form_state['values']['surecheckbox'])) {
156
-    return form_set_error('surecheckbox', t('Please confirm you are sure you want to delete this account.'));
157
-  }
155
+if (!($form_state['values']['surecheckbox'])) {
156
+return form_set_error('surecheckbox', t('Please confirm you are sure you want to delete this account.'));
157
+}
158 158
 
159
-  if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
160
-    return true;
161
-  }
159
+if (_boincuser_delete_validatepasswd($boinc_user, $form_state['values']['current_pass'])) {
160
+return true;
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.',
174
-    array(
175
-      '@uid' => $form['#uid'],
176
-      '@displayname' => $account->boincuser_name,
177
-    )), 'warning');
173
+drupal_set_message(t('WARNING: Account @displayname, Drupal UID=@uid has been deleted.',
174
+array(
175
+  '@uid' => $form['#uid'],
176
+  '@displayname' => $account->boincuser_name,
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
 }
Please login to merge, or discard this patch.
modules/boincuser/boincuser_delete/includes/boincuser_delete.helpers.inc 1 patch
Switch Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -59,37 +59,37 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
drupal/sites/all/features/user_preferences/user_preferences.features.inc 1 patch
Switch Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * Implementation of hook_views_api().
5 5
  */
6 6
 function user_preferences_views_api() {
7
-  return array(
8
-    'api' => '2',
9
-  );
7
+return array(
8
+'api' => '2',
9
+);
10 10
 }
Please login to merge, or discard this patch.
all/features/user_preferences/user_preferences.features.menu_links.inc 1 patch
Switch Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@
 block discarded – undo
4 4
  * Implementation of hook_menu_default_menu_links().
5 5
  */
6 6
 function user_preferences_menu_default_menu_links() {
7
-  $menu_links = array();
7
+$menu_links = array();
8 8
 
9
-  // Exported menu link: primary-links:account/prefs
10
-  $menu_links['primary-links:account/prefs'] = array(
11
-    'menu_name' => 'primary-links',
12
-    'link_path' => 'account/prefs',
13
-    'router_path' => 'account/prefs',
14
-    'link_title' => 'Preferences',
15
-    'options' => array(
16
-      'attributes' => array(
17
-        'title' => '',
18
-      ),
19
-    ),
20
-    'module' => 'menu',
21
-    'hidden' => '0',
22
-    'external' => '0',
23
-    'has_children' => '0',
24
-    'expanded' => '0',
25
-    'weight' => '-47',
26
-    'parent_path' => 'dashboard',
27
-  );
28
-  // Translatables
29
-  // Use bts() function to translate additional strings.
30
-  bts('Preferences', array(), NULL, 'boinc:menu-link');
31
-  bts('Community', array(), NULL, 'boinc:menu-link');
32
-  bts('Privacy', array(), NULL, 'boinc:menu-link');
33
-  bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
9
+// Exported menu link: primary-links:account/prefs
10
+$menu_links['primary-links:account/prefs'] = array(
11
+'menu_name' => 'primary-links',
12
+'link_path' => 'account/prefs',
13
+'router_path' => 'account/prefs',
14
+'link_title' => 'Preferences',
15
+'options' => array(
16
+  'attributes' => array(
17
+    'title' => '',
18
+  ),
19
+),
20
+'module' => 'menu',
21
+'hidden' => '0',
22
+'external' => '0',
23
+'has_children' => '0',
24
+'expanded' => '0',
25
+'weight' => '-47',
26
+'parent_path' => 'dashboard',
27
+);
28
+// Translatables
29
+// Use bts() function to translate additional strings.
30
+bts('Preferences', array(), NULL, 'boinc:menu-link');
31
+bts('Community', array(), NULL, 'boinc:menu-link');
32
+bts('Privacy', array(), NULL, 'boinc:menu-link');
33
+bts('Subscriptions', array(), NULL, 'boinc:menu-link:-1:ignoreoverwrite');
34 34
 
35
-  return $menu_links;
35
+return $menu_links;
36 36
 }
Please login to merge, or discard this patch.
sites/all/features/user_preferences/user_preferences.views_default.inc 1 patch
Switch Indentation   +871 added lines, -871 removed lines patch added patch discarded remove patch
@@ -4,280 +4,280 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_views_default_views().
5 5
  */
6 6
 function user_preferences_views_default_views() {
7
-  $views = array();
7
+$views = array();
8 8
 
9
-  // Exported view: subscriptions
10
-  $view = new view;
11
-  $view->name = 'subscriptions';
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('relationships', array(
20
-    'flag_content_rel' => array(
21
-      'label' => 'Subscription flag',
22
-      'required' => 1,
23
-      'flag' => 'subscriptions',
24
-      'user_scope' => 'current',
25
-      'id' => 'flag_content_rel',
26
-      'table' => 'node',
27
-      'field' => 'flag_content_rel',
28
-      'relationship' => 'none',
29
-    ),
30
-    'flag_count_rel' => array(
31
-      'label' => 'counter',
32
-      'required' => 1,
33
-      'flag' => 'subscriptions',
34
-      'id' => 'flag_count_rel',
35
-      'table' => 'node',
36
-      'field' => 'flag_count_rel',
37
-      'relationship' => 'none',
38
-    ),
39
-    'vid' => array(
40
-      'id' => 'vid',
41
-      'table' => 'term_node',
42
-      'field' => 'vid',
43
-    ),
44
-  ));
45
-  $handler->override_option('fields', array(
46
-    'title' => array(
47
-      'label' => 'Page',
48
-      'alter' => array(
49
-        'alter_text' => 0,
50
-        'text' => '',
51
-        'make_link' => 0,
52
-        'path' => '',
53
-        'absolute' => 0,
54
-        'link_class' => '',
55
-        'alt' => '',
56
-        'rel' => '',
57
-        'prefix' => '',
58
-        'suffix' => '',
59
-        'target' => '',
60
-        'help' => '',
61
-        'trim' => 0,
62
-        'max_length' => '',
63
-        'word_boundary' => 1,
64
-        'ellipsis' => 1,
65
-        'html' => 0,
66
-        'strip_tags' => 0,
67
-      ),
68
-      'empty' => '',
69
-      'hide_empty' => 0,
70
-      'empty_zero' => 0,
71
-      'hide_alter_empty' => 1,
72
-      'link_to_node' => 0,
73
-      'exclude' => 1,
74
-      'id' => 'title',
75
-      'table' => 'node',
76
-      'field' => 'title',
77
-      'relationship' => 'none',
78
-    ),
79
-    'type' => array(
80
-      'label' => 'Type',
81
-      'alter' => array(
82
-        'alter_text' => 0,
83
-        'text' => '',
84
-        'make_link' => 0,
85
-        'path' => '',
86
-        'absolute' => 0,
87
-        'link_class' => '',
88
-        'alt' => '',
89
-        'rel' => '',
90
-        'prefix' => '',
91
-        'suffix' => '',
92
-        'target' => '',
93
-        'help' => '',
94
-        'trim' => 0,
95
-        'max_length' => '',
96
-        'word_boundary' => 1,
97
-        'ellipsis' => 1,
98
-        'html' => 0,
99
-        'strip_tags' => 0,
100
-      ),
101
-      'empty' => '',
102
-      'hide_empty' => 0,
103
-      'empty_zero' => 0,
104
-      'hide_alter_empty' => 1,
105
-      'link_to_node' => 0,
106
-      'machine_name' => 0,
107
-      'exclude' => 1,
108
-      'id' => 'type',
109
-      'table' => 'node',
110
-      'field' => 'type',
111
-      'relationship' => 'none',
112
-    ),
113
-    'timestamp' => array(
114
-      'label' => 'Has new content',
115
-      'alter' => array(
116
-        'alter_text' => 0,
117
-        'text' => '',
118
-        'make_link' => 0,
119
-        'path' => '',
120
-        'absolute' => 0,
121
-        'link_class' => '',
122
-        'alt' => '',
123
-        'rel' => '',
124
-        'prefix' => '',
125
-        'suffix' => '',
126
-        'target' => '',
127
-        'help' => '',
128
-        'trim' => 0,
129
-        'max_length' => '',
130
-        'word_boundary' => 1,
131
-        'ellipsis' => 1,
132
-        'html' => 0,
133
-        'strip_tags' => 0,
134
-      ),
135
-      'empty' => '',
136
-      'hide_empty' => 0,
137
-      'empty_zero' => 0,
138
-      'hide_alter_empty' => 1,
139
-      'link_to_node' => 0,
140
-      'comments' => 1,
141
-      'exclude' => 1,
142
-      'id' => 'timestamp',
143
-      'table' => 'history_user',
144
-      'field' => 'timestamp',
145
-      'relationship' => 'none',
146
-    ),
147
-    'new_comments' => array(
148
-      'label' => 'New comments',
149
-      'alter' => array(
150
-        'alter_text' => 0,
151
-        'text' => '',
152
-        'make_link' => 0,
153
-        'path' => '',
154
-        'absolute' => 0,
155
-        'link_class' => '',
156
-        'alt' => '',
157
-        'rel' => '',
158
-        'prefix' => '',
159
-        'suffix' => '',
160
-        'target' => '',
161
-        'help' => '',
162
-        'trim' => 0,
163
-        'max_length' => '',
164
-        'word_boundary' => 1,
165
-        'ellipsis' => 1,
166
-        'html' => 0,
167
-        'strip_tags' => 0,
168
-      ),
169
-      'empty' => '',
170
-      'hide_empty' => 0,
171
-      'empty_zero' => 0,
172
-      'hide_alter_empty' => 1,
173
-      'set_precision' => FALSE,
174
-      'precision' => 0,
175
-      'decimal' => '.',
176
-      'separator' => ',',
177
-      'format_plural' => 0,
178
-      'format_plural_singular' => '1',
179
-      'format_plural_plural' => '@count',
180
-      'prefix' => '',
181
-      'suffix' => '',
182
-      'link_to_comment' => 1,
183
-      'exclude' => 1,
184
-      'id' => 'new_comments',
185
-      'table' => 'node',
186
-      'field' => 'new_comments',
187
-      'relationship' => 'none',
188
-    ),
189
-    'name' => array(
190
-      'label' => 'Term',
191
-      'alter' => array(
192
-        'alter_text' => 0,
193
-        'text' => '',
194
-        'make_link' => 0,
195
-        'path' => '',
196
-        'absolute' => 0,
197
-        'link_class' => '',
198
-        'alt' => '',
199
-        'rel' => '',
200
-        'prefix' => '',
201
-        'suffix' => '',
202
-        'target' => '',
203
-        'help' => '',
204
-        'trim' => 0,
205
-        'max_length' => '',
206
-        'word_boundary' => 1,
207
-        'ellipsis' => 1,
208
-        'html' => 0,
209
-        'strip_tags' => 0,
210
-      ),
211
-      'empty' => '',
212
-      'hide_empty' => 0,
213
-      'empty_zero' => 0,
214
-      'hide_alter_empty' => 1,
215
-      'link_to_taxonomy' => 0,
216
-      'exclude' => 1,
217
-      'id' => 'name',
218
-      'table' => 'term_data',
219
-      'field' => 'name',
220
-      'relationship' => 'none',
221
-    ),
222
-    'name_1' => array(
223
-      'label' => 'Vocabulary name',
224
-      'alter' => array(
225
-        'alter_text' => 0,
226
-        'text' => '',
227
-        'make_link' => 0,
228
-        'path' => '',
229
-        'absolute' => 0,
230
-        'link_class' => '',
231
-        'alt' => '',
232
-        'rel' => '',
233
-        'prefix' => '',
234
-        'suffix' => '',
235
-        'target' => '',
236
-        'help' => '',
237
-        'trim' => 0,
238
-        'max_length' => '',
239
-        'word_boundary' => 1,
240
-        'ellipsis' => 1,
241
-        'html' => 0,
242
-        'strip_tags' => 0,
243
-      ),
244
-      'empty' => '',
245
-      'hide_empty' => 0,
246
-      'empty_zero' => 0,
247
-      'hide_alter_empty' => 1,
248
-      'exclude' => 1,
249
-      'id' => 'name_1',
250
-      'table' => 'vocabulary',
251
-      'field' => 'name',
252
-      'relationship' => 'none',
253
-    ),
254
-    'phpcode' => array(
255
-      'label' => 'Page',
256
-      'alter' => array(
257
-        'alter_text' => 0,
258
-        'text' => '',
259
-        'make_link' => 0,
260
-        'path' => '',
261
-        'absolute' => 0,
262
-        'link_class' => '',
263
-        'alt' => '',
264
-        'rel' => '',
265
-        'prefix' => '',
266
-        'suffix' => '',
267
-        'target' => '',
268
-        'help' => '',
269
-        'trim' => 0,
270
-        'max_length' => '',
271
-        'word_boundary' => 1,
272
-        'ellipsis' => 1,
273
-        'html' => 0,
274
-        'strip_tags' => 0,
275
-      ),
276
-      'empty' => '',
277
-      'hide_empty' => 0,
278
-      'empty_zero' => 0,
279
-      'hide_alter_empty' => 1,
280
-      'value' => '<?php
9
+// Exported view: subscriptions
10
+$view = new view;
11
+$view->name = 'subscriptions';
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('relationships', array(
20
+'flag_content_rel' => array(
21
+  'label' => 'Subscription flag',
22
+  'required' => 1,
23
+  'flag' => 'subscriptions',
24
+  'user_scope' => 'current',
25
+  'id' => 'flag_content_rel',
26
+  'table' => 'node',
27
+  'field' => 'flag_content_rel',
28
+  'relationship' => 'none',
29
+),
30
+'flag_count_rel' => array(
31
+  'label' => 'counter',
32
+  'required' => 1,
33
+  'flag' => 'subscriptions',
34
+  'id' => 'flag_count_rel',
35
+  'table' => 'node',
36
+  'field' => 'flag_count_rel',
37
+  'relationship' => 'none',
38
+),
39
+'vid' => array(
40
+  'id' => 'vid',
41
+  'table' => 'term_node',
42
+  'field' => 'vid',
43
+),
44
+));
45
+$handler->override_option('fields', array(
46
+'title' => array(
47
+  'label' => 'Page',
48
+  'alter' => array(
49
+    'alter_text' => 0,
50
+    'text' => '',
51
+    'make_link' => 0,
52
+    'path' => '',
53
+    'absolute' => 0,
54
+    'link_class' => '',
55
+    'alt' => '',
56
+    'rel' => '',
57
+    'prefix' => '',
58
+    'suffix' => '',
59
+    'target' => '',
60
+    'help' => '',
61
+    'trim' => 0,
62
+    'max_length' => '',
63
+    'word_boundary' => 1,
64
+    'ellipsis' => 1,
65
+    'html' => 0,
66
+    'strip_tags' => 0,
67
+  ),
68
+  'empty' => '',
69
+  'hide_empty' => 0,
70
+  'empty_zero' => 0,
71
+  'hide_alter_empty' => 1,
72
+  'link_to_node' => 0,
73
+  'exclude' => 1,
74
+  'id' => 'title',
75
+  'table' => 'node',
76
+  'field' => 'title',
77
+  'relationship' => 'none',
78
+),
79
+'type' => array(
80
+  'label' => 'Type',
81
+  'alter' => array(
82
+    'alter_text' => 0,
83
+    'text' => '',
84
+    'make_link' => 0,
85
+    'path' => '',
86
+    'absolute' => 0,
87
+    'link_class' => '',
88
+    'alt' => '',
89
+    'rel' => '',
90
+    'prefix' => '',
91
+    'suffix' => '',
92
+    'target' => '',
93
+    'help' => '',
94
+    'trim' => 0,
95
+    'max_length' => '',
96
+    'word_boundary' => 1,
97
+    'ellipsis' => 1,
98
+    'html' => 0,
99
+    'strip_tags' => 0,
100
+  ),
101
+  'empty' => '',
102
+  'hide_empty' => 0,
103
+  'empty_zero' => 0,
104
+  'hide_alter_empty' => 1,
105
+  'link_to_node' => 0,
106
+  'machine_name' => 0,
107
+  'exclude' => 1,
108
+  'id' => 'type',
109
+  'table' => 'node',
110
+  'field' => 'type',
111
+  'relationship' => 'none',
112
+),
113
+'timestamp' => array(
114
+  'label' => 'Has new content',
115
+  'alter' => array(
116
+    'alter_text' => 0,
117
+    'text' => '',
118
+    'make_link' => 0,
119
+    'path' => '',
120
+    'absolute' => 0,
121
+    'link_class' => '',
122
+    'alt' => '',
123
+    'rel' => '',
124
+    'prefix' => '',
125
+    'suffix' => '',
126
+    'target' => '',
127
+    'help' => '',
128
+    'trim' => 0,
129
+    'max_length' => '',
130
+    'word_boundary' => 1,
131
+    'ellipsis' => 1,
132
+    'html' => 0,
133
+    'strip_tags' => 0,
134
+  ),
135
+  'empty' => '',
136
+  'hide_empty' => 0,
137
+  'empty_zero' => 0,
138
+  'hide_alter_empty' => 1,
139
+  'link_to_node' => 0,
140
+  'comments' => 1,
141
+  'exclude' => 1,
142
+  'id' => 'timestamp',
143
+  'table' => 'history_user',
144
+  'field' => 'timestamp',
145
+  'relationship' => 'none',
146
+),
147
+'new_comments' => array(
148
+  'label' => 'New comments',
149
+  'alter' => array(
150
+    'alter_text' => 0,
151
+    'text' => '',
152
+    'make_link' => 0,
153
+    'path' => '',
154
+    'absolute' => 0,
155
+    'link_class' => '',
156
+    'alt' => '',
157
+    'rel' => '',
158
+    'prefix' => '',
159
+    'suffix' => '',
160
+    'target' => '',
161
+    'help' => '',
162
+    'trim' => 0,
163
+    'max_length' => '',
164
+    'word_boundary' => 1,
165
+    'ellipsis' => 1,
166
+    'html' => 0,
167
+    'strip_tags' => 0,
168
+  ),
169
+  'empty' => '',
170
+  'hide_empty' => 0,
171
+  'empty_zero' => 0,
172
+  'hide_alter_empty' => 1,
173
+  'set_precision' => FALSE,
174
+  'precision' => 0,
175
+  'decimal' => '.',
176
+  'separator' => ',',
177
+  'format_plural' => 0,
178
+  'format_plural_singular' => '1',
179
+  'format_plural_plural' => '@count',
180
+  'prefix' => '',
181
+  'suffix' => '',
182
+  'link_to_comment' => 1,
183
+  'exclude' => 1,
184
+  'id' => 'new_comments',
185
+  'table' => 'node',
186
+  'field' => 'new_comments',
187
+  'relationship' => 'none',
188
+),
189
+'name' => array(
190
+  'label' => 'Term',
191
+  'alter' => array(
192
+    'alter_text' => 0,
193
+    'text' => '',
194
+    'make_link' => 0,
195
+    'path' => '',
196
+    'absolute' => 0,
197
+    'link_class' => '',
198
+    'alt' => '',
199
+    'rel' => '',
200
+    'prefix' => '',
201
+    'suffix' => '',
202
+    'target' => '',
203
+    'help' => '',
204
+    'trim' => 0,
205
+    'max_length' => '',
206
+    'word_boundary' => 1,
207
+    'ellipsis' => 1,
208
+    'html' => 0,
209
+    'strip_tags' => 0,
210
+  ),
211
+  'empty' => '',
212
+  'hide_empty' => 0,
213
+  'empty_zero' => 0,
214
+  'hide_alter_empty' => 1,
215
+  'link_to_taxonomy' => 0,
216
+  'exclude' => 1,
217
+  'id' => 'name',
218
+  'table' => 'term_data',
219
+  'field' => 'name',
220
+  'relationship' => 'none',
221
+),
222
+'name_1' => array(
223
+  'label' => 'Vocabulary name',
224
+  'alter' => array(
225
+    'alter_text' => 0,
226
+    'text' => '',
227
+    'make_link' => 0,
228
+    'path' => '',
229
+    'absolute' => 0,
230
+    'link_class' => '',
231
+    'alt' => '',
232
+    'rel' => '',
233
+    'prefix' => '',
234
+    'suffix' => '',
235
+    'target' => '',
236
+    'help' => '',
237
+    'trim' => 0,
238
+    'max_length' => '',
239
+    'word_boundary' => 1,
240
+    'ellipsis' => 1,
241
+    'html' => 0,
242
+    'strip_tags' => 0,
243
+  ),
244
+  'empty' => '',
245
+  'hide_empty' => 0,
246
+  'empty_zero' => 0,
247
+  'hide_alter_empty' => 1,
248
+  'exclude' => 1,
249
+  'id' => 'name_1',
250
+  'table' => 'vocabulary',
251
+  'field' => 'name',
252
+  'relationship' => 'none',
253
+),
254
+'phpcode' => array(
255
+  'label' => 'Page',
256
+  'alter' => array(
257
+    'alter_text' => 0,
258
+    'text' => '',
259
+    'make_link' => 0,
260
+    'path' => '',
261
+    'absolute' => 0,
262
+    'link_class' => '',
263
+    'alt' => '',
264
+    'rel' => '',
265
+    'prefix' => '',
266
+    'suffix' => '',
267
+    'target' => '',
268
+    'help' => '',
269
+    'trim' => 0,
270
+    'max_length' => '',
271
+    'word_boundary' => 1,
272
+    'ellipsis' => 1,
273
+    'html' => 0,
274
+    'strip_tags' => 0,
275
+  ),
276
+  'empty' => '',
277
+  'hide_empty' => 0,
278
+  'empty_zero' => 0,
279
+  'hide_alter_empty' => 1,
280
+  'value' => '<?php
281 281
 $updated = ($data->node_comment_statistics_last_updated > $data->history_user_timestamp) ? TRUE : FALSE;
282 282
 $url = "node/{$data->nid}";
283 283
 if ($data->node_new_comments) {
@@ -288,39 +288,39 @@  discard block
 block discarded – undo
288 288
 print l($data->node_title, $url);
289 289
 print \'</span>\';
290 290
 ?>',
291
-      'exclude' => 0,
292
-      'id' => 'phpcode',
293
-      'table' => 'customfield',
294
-      'field' => 'phpcode',
295
-      'relationship' => 'none',
296
-    ),
297
-    'phpcode_1' => array(
298
-      'label' => '',
299
-      'alter' => array(
300
-        'alter_text' => 0,
301
-        'text' => '',
302
-        'make_link' => 0,
303
-        'path' => '',
304
-        'absolute' => 0,
305
-        'link_class' => '',
306
-        'alt' => '',
307
-        'rel' => '',
308
-        'prefix' => '',
309
-        'suffix' => '',
310
-        'target' => '',
311
-        'help' => '',
312
-        'trim' => 0,
313
-        'max_length' => '',
314
-        'word_boundary' => 1,
315
-        'ellipsis' => 1,
316
-        'html' => 0,
317
-        'strip_tags' => 0,
318
-      ),
319
-      'empty' => '',
320
-      'hide_empty' => 0,
321
-      'empty_zero' => 0,
322
-      'hide_alter_empty' => 1,
323
-      'value' => '<?php
291
+  'exclude' => 0,
292
+  'id' => 'phpcode',
293
+  'table' => 'customfield',
294
+  'field' => 'phpcode',
295
+  'relationship' => 'none',
296
+),
297
+'phpcode_1' => array(
298
+  'label' => '',
299
+  'alter' => array(
300
+    'alter_text' => 0,
301
+    'text' => '',
302
+    'make_link' => 0,
303
+    'path' => '',
304
+    'absolute' => 0,
305
+    'link_class' => '',
306
+    'alt' => '',
307
+    'rel' => '',
308
+    'prefix' => '',
309
+    'suffix' => '',
310
+    'target' => '',
311
+    'help' => '',
312
+    'trim' => 0,
313
+    'max_length' => '',
314
+    'word_boundary' => 1,
315
+    'ellipsis' => 1,
316
+    'html' => 0,
317
+    'strip_tags' => 0,
318
+  ),
319
+  'empty' => '',
320
+  'hide_empty' => 0,
321
+  'empty_zero' => 0,
322
+  'hide_alter_empty' => 1,
323
+  'value' => '<?php
324 324
 if ($data->node_type == \'forum\') {
325 325
   print $data->vocabulary_name . \' &rsaquo; \' . $data->term_data_name;
326 326
 }
@@ -328,393 +328,393 @@  discard block
 block discarded – undo
328 328
   print bts(\'News\', array(), NULL, \'boinc:menu-link\');
329 329
 }
330 330
 ?>',
331
-      'exclude' => 0,
332
-      'id' => 'phpcode_1',
333
-      'table' => 'customfield',
334
-      'field' => 'phpcode',
335
-      'relationship' => 'none',
336
-    ),
337
-    'last_updated' => array(
338
-      'label' => 'Updated',
339
-      'alter' => array(
340
-        'alter_text' => 0,
341
-        'text' => '',
342
-        'make_link' => 0,
343
-        'path' => '',
344
-        'absolute' => 0,
345
-        'link_class' => '',
346
-        'alt' => '',
347
-        'rel' => '',
348
-        'prefix' => '',
349
-        'suffix' => '',
350
-        'target' => '',
351
-        'help' => '',
352
-        'trim' => 0,
353
-        'max_length' => '',
354
-        'word_boundary' => 1,
355
-        'ellipsis' => 1,
356
-        'html' => 0,
357
-        'strip_tags' => 0,
358
-      ),
359
-      'empty' => '',
360
-      'hide_empty' => 0,
361
-      'empty_zero' => 0,
362
-      'hide_alter_empty' => 1,
363
-      'date_format' => 'time ago',
364
-      'custom_date_format' => '',
365
-      'exclude' => 0,
366
-      'id' => 'last_updated',
367
-      'table' => 'node_comment_statistics',
368
-      'field' => 'last_updated',
369
-      'override' => array(
370
-        'button' => 'Override',
371
-      ),
372
-      'relationship' => 'none',
373
-    ),
374
-    'ops' => array(
375
-      'label' => '',
376
-      'alter' => array(
377
-        'alter_text' => 0,
378
-        'text' => '',
379
-        'make_link' => 0,
380
-        'path' => '',
381
-        'absolute' => 0,
382
-        'link_class' => '',
383
-        'alt' => '',
384
-        'rel' => '',
385
-        'prefix' => '',
386
-        'suffix' => '',
387
-        'target' => '',
388
-        'help' => '',
389
-        'trim' => 0,
390
-        'max_length' => '',
391
-        'word_boundary' => 1,
392
-        'ellipsis' => 1,
393
-        'html' => 0,
394
-        'strip_tags' => 0,
395
-      ),
396
-      'empty' => '',
397
-      'hide_empty' => 0,
398
-      'empty_zero' => 0,
399
-      'hide_alter_empty' => 1,
400
-      'link_type' => '',
401
-      'exclude' => 0,
402
-      'id' => 'ops',
403
-      'table' => 'flag_content',
404
-      'field' => 'ops',
405
-      'relationship' => 'flag_content_rel',
406
-    ),
407
-  ));
408
-  $handler->override_option('access', array(
409
-    'type' => 'none',
410
-  ));
411
-  $handler->override_option('cache', array(
412
-    'type' => 'none',
413
-  ));
414
-  $handler->override_option('use_pager', '1');
415
-  $handler = $view->new_display('page', 'Page', 'page_1');
416
-  $handler->override_option('style_plugin', 'table');
417
-  $handler->override_option('style_options', array(
418
-    'grouping' => '',
419
-    'override' => 1,
420
-    'sticky' => 0,
421
-    'order' => 'desc',
422
-    'summary' => '',
423
-    'columns' => array(
424
-      'ops' => 'ops',
425
-      'title' => 'title',
426
-      'type' => 'type',
427
-      'last_updated' => 'last_updated',
428
-    ),
429
-    'info' => array(
430
-      'ops' => array(
431
-        'separator' => '',
432
-      ),
433
-      'title' => array(
434
-        'sortable' => 0,
435
-        'separator' => '',
436
-      ),
437
-      'type' => array(
438
-        'sortable' => 0,
439
-        'separator' => '',
440
-      ),
441
-      'last_updated' => array(
442
-        'sortable' => 0,
443
-        'separator' => '',
444
-      ),
445
-    ),
446
-    'default' => 'last_updated',
447
-  ));
448
-  $handler->override_option('path', 'account/prefs/subscriptions');
449
-  $handler->override_option('menu', array(
450
-    'type' => 'tab',
451
-    'title' => bts('Subscriptions', array(), NULL, 'boinc:account-dashboard'),
452
-    'description' => '',
453
-    'weight' => '20',
454
-    'name' => 'primary-links',
455
-  ));
456
-  $handler->override_option('tab_options', array(
457
-    'type' => 'none',
458
-    'title' => '',
459
-    'description' => '',
460
-    'weight' => 0,
461
-    'name' => 'navigation',
462
-  ));
463
-  $handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
464
-  $handler->override_option('fields', array(
465
-    'title' => array(
466
-      'label' => 'Page',
467
-      'alter' => array(
468
-        'alter_text' => 0,
469
-        'text' => '',
470
-        'make_link' => 0,
471
-        'path' => '',
472
-        'absolute' => 0,
473
-        'link_class' => '',
474
-        'alt' => '',
475
-        'rel' => '',
476
-        'prefix' => '',
477
-        'suffix' => '',
478
-        'target' => '',
479
-        'help' => '',
480
-        'trim' => 0,
481
-        'max_length' => '',
482
-        'word_boundary' => 1,
483
-        'ellipsis' => 1,
484
-        'html' => 0,
485
-        'strip_tags' => 0,
486
-      ),
487
-      'empty' => '',
488
-      'hide_empty' => 0,
489
-      'empty_zero' => 0,
490
-      'hide_alter_empty' => 1,
491
-      'link_to_node' => 1,
492
-      'exclude' => 1,
493
-      'id' => 'title',
494
-      'table' => 'node',
495
-      'field' => 'title',
496
-      'relationship' => 'none',
497
-      'override' => array(
498
-        'button' => 'Use default',
499
-      ),
500
-    ),
501
-    'type' => array(
502
-      'label' => 'Type',
503
-      'alter' => array(
504
-        'alter_text' => 0,
505
-        'text' => '',
506
-        'make_link' => 0,
507
-        'path' => '',
508
-        'absolute' => 0,
509
-        'link_class' => '',
510
-        'alt' => '',
511
-        'rel' => '',
512
-        'prefix' => '',
513
-        'suffix' => '',
514
-        'target' => '',
515
-        'help' => '',
516
-        'trim' => 0,
517
-        'max_length' => '',
518
-        'word_boundary' => 1,
519
-        'ellipsis' => 1,
520
-        'html' => 0,
521
-        'strip_tags' => 0,
522
-      ),
523
-      'empty' => '',
524
-      'hide_empty' => 0,
525
-      'empty_zero' => 0,
526
-      'hide_alter_empty' => 1,
527
-      'link_to_node' => 0,
528
-      'machine_name' => 0,
529
-      'exclude' => 1,
530
-      'id' => 'type',
531
-      'table' => 'node',
532
-      'field' => 'type',
533
-      'override' => array(
534
-        'button' => 'Use default',
535
-      ),
536
-      'relationship' => 'none',
537
-    ),
538
-    'timestamp' => array(
539
-      'label' => 'Has new content',
540
-      'alter' => array(
541
-        'alter_text' => 0,
542
-        'text' => '',
543
-        'make_link' => 0,
544
-        'path' => '',
545
-        'absolute' => 0,
546
-        'link_class' => '',
547
-        'alt' => '',
548
-        'rel' => '',
549
-        'prefix' => '',
550
-        'suffix' => '',
551
-        'target' => '',
552
-        'help' => '',
553
-        'trim' => 0,
554
-        'max_length' => '',
555
-        'word_boundary' => 1,
556
-        'ellipsis' => 1,
557
-        'html' => 0,
558
-        'strip_tags' => 0,
559
-      ),
560
-      'empty' => '',
561
-      'hide_empty' => 0,
562
-      'empty_zero' => 0,
563
-      'hide_alter_empty' => 1,
564
-      'link_to_node' => 0,
565
-      'comments' => 1,
566
-      'exclude' => 1,
567
-      'id' => 'timestamp',
568
-      'table' => 'history_user',
569
-      'field' => 'timestamp',
570
-      'relationship' => 'none',
571
-      'override' => array(
572
-        'button' => 'Use default',
573
-      ),
574
-    ),
575
-    'new_comments' => array(
576
-      'label' => 'New comments',
577
-      'alter' => array(
578
-        'alter_text' => 0,
579
-        'text' => '',
580
-        'make_link' => 0,
581
-        'path' => '',
582
-        'absolute' => 0,
583
-        'link_class' => '',
584
-        'alt' => '',
585
-        'rel' => '',
586
-        'prefix' => '',
587
-        'suffix' => '',
588
-        'target' => '',
589
-        'help' => '',
590
-        'trim' => 0,
591
-        'max_length' => '',
592
-        'word_boundary' => 1,
593
-        'ellipsis' => 1,
594
-        'html' => 0,
595
-        'strip_tags' => 0,
596
-      ),
597
-      'empty' => '',
598
-      'hide_empty' => 0,
599
-      'empty_zero' => 0,
600
-      'hide_alter_empty' => 1,
601
-      'set_precision' => FALSE,
602
-      'precision' => 0,
603
-      'decimal' => '.',
604
-      'separator' => ',',
605
-      'format_plural' => 0,
606
-      'format_plural_singular' => '1',
607
-      'format_plural_plural' => '@count',
608
-      'prefix' => '',
609
-      'suffix' => '',
610
-      'link_to_comment' => 1,
611
-      'exclude' => 1,
612
-      'id' => 'new_comments',
613
-      'table' => 'node',
614
-      'field' => 'new_comments',
615
-      'relationship' => 'none',
616
-      'override' => array(
617
-        'button' => 'Use default',
618
-      ),
619
-    ),
620
-    'name' => array(
621
-      'label' => 'Term',
622
-      'alter' => array(
623
-        'alter_text' => 0,
624
-        'text' => '',
625
-        'make_link' => 0,
626
-        'path' => '',
627
-        'absolute' => 0,
628
-        'link_class' => '',
629
-        'alt' => '',
630
-        'rel' => '',
631
-        'prefix' => '',
632
-        'suffix' => '',
633
-        'target' => '',
634
-        'help' => '',
635
-        'trim' => 0,
636
-        'max_length' => '',
637
-        'word_boundary' => 1,
638
-        'ellipsis' => 1,
639
-        'html' => 0,
640
-        'strip_tags' => 0,
641
-      ),
642
-      'empty' => '',
643
-      'hide_empty' => 0,
644
-      'empty_zero' => 0,
645
-      'hide_alter_empty' => 1,
646
-      'link_to_taxonomy' => 0,
647
-      'exclude' => 1,
648
-      'id' => 'name',
649
-      'table' => 'term_data',
650
-      'field' => 'name',
651
-      'override' => array(
652
-        'button' => 'Use default',
653
-      ),
654
-      'relationship' => 'none',
655
-    ),
656
-    'name_1' => array(
657
-      'label' => 'Vocabulary name',
658
-      'alter' => array(
659
-        'alter_text' => 0,
660
-        'text' => '',
661
-        'make_link' => 0,
662
-        'path' => '',
663
-        'absolute' => 0,
664
-        'link_class' => '',
665
-        'alt' => '',
666
-        'rel' => '',
667
-        'prefix' => '',
668
-        'suffix' => '',
669
-        'target' => '',
670
-        'help' => '',
671
-        'trim' => 0,
672
-        'max_length' => '',
673
-        'word_boundary' => 1,
674
-        'ellipsis' => 1,
675
-        'html' => 0,
676
-        'strip_tags' => 0,
677
-      ),
678
-      'empty' => '',
679
-      'hide_empty' => 0,
680
-      'empty_zero' => 0,
681
-      'hide_alter_empty' => 1,
682
-      'exclude' => 1,
683
-      'id' => 'name_1',
684
-      'table' => 'vocabulary',
685
-      'field' => 'name',
686
-      'override' => array(
687
-        'button' => 'Use default',
688
-      ),
689
-      'relationship' => 'none',
690
-    ),
691
-    'phpcode' => array(
692
-      'label' => 'Page',
693
-      'alter' => array(
694
-        'alter_text' => 0,
695
-        'text' => '',
696
-        'make_link' => 0,
697
-        'path' => '',
698
-        'absolute' => 0,
699
-        'link_class' => '',
700
-        'alt' => '',
701
-        'rel' => '',
702
-        'prefix' => '',
703
-        'suffix' => '',
704
-        'target' => '',
705
-        'help' => '',
706
-        'trim' => 0,
707
-        'max_length' => '',
708
-        'word_boundary' => 1,
709
-        'ellipsis' => 1,
710
-        'html' => 0,
711
-        'strip_tags' => 0,
712
-      ),
713
-      'empty' => '',
714
-      'hide_empty' => 0,
715
-      'empty_zero' => 0,
716
-      'hide_alter_empty' => 1,
717
-      'value' => '<?php
331
+  'exclude' => 0,
332
+  'id' => 'phpcode_1',
333
+  'table' => 'customfield',
334
+  'field' => 'phpcode',
335
+  'relationship' => 'none',
336
+),
337
+'last_updated' => array(
338
+  'label' => 'Updated',
339
+  'alter' => array(
340
+    'alter_text' => 0,
341
+    'text' => '',
342
+    'make_link' => 0,
343
+    'path' => '',
344
+    'absolute' => 0,
345
+    'link_class' => '',
346
+    'alt' => '',
347
+    'rel' => '',
348
+    'prefix' => '',
349
+    'suffix' => '',
350
+    'target' => '',
351
+    'help' => '',
352
+    'trim' => 0,
353
+    'max_length' => '',
354
+    'word_boundary' => 1,
355
+    'ellipsis' => 1,
356
+    'html' => 0,
357
+    'strip_tags' => 0,
358
+  ),
359
+  'empty' => '',
360
+  'hide_empty' => 0,
361
+  'empty_zero' => 0,
362
+  'hide_alter_empty' => 1,
363
+  'date_format' => 'time ago',
364
+  'custom_date_format' => '',
365
+  'exclude' => 0,
366
+  'id' => 'last_updated',
367
+  'table' => 'node_comment_statistics',
368
+  'field' => 'last_updated',
369
+  'override' => array(
370
+    'button' => 'Override',
371
+  ),
372
+  'relationship' => 'none',
373
+),
374
+'ops' => array(
375
+  'label' => '',
376
+  'alter' => array(
377
+    'alter_text' => 0,
378
+    'text' => '',
379
+    'make_link' => 0,
380
+    'path' => '',
381
+    'absolute' => 0,
382
+    'link_class' => '',
383
+    'alt' => '',
384
+    'rel' => '',
385
+    'prefix' => '',
386
+    'suffix' => '',
387
+    'target' => '',
388
+    'help' => '',
389
+    'trim' => 0,
390
+    'max_length' => '',
391
+    'word_boundary' => 1,
392
+    'ellipsis' => 1,
393
+    'html' => 0,
394
+    'strip_tags' => 0,
395
+  ),
396
+  'empty' => '',
397
+  'hide_empty' => 0,
398
+  'empty_zero' => 0,
399
+  'hide_alter_empty' => 1,
400
+  'link_type' => '',
401
+  'exclude' => 0,
402
+  'id' => 'ops',
403
+  'table' => 'flag_content',
404
+  'field' => 'ops',
405
+  'relationship' => 'flag_content_rel',
406
+),
407
+));
408
+$handler->override_option('access', array(
409
+'type' => 'none',
410
+));
411
+$handler->override_option('cache', array(
412
+'type' => 'none',
413
+));
414
+$handler->override_option('use_pager', '1');
415
+$handler = $view->new_display('page', 'Page', 'page_1');
416
+$handler->override_option('style_plugin', 'table');
417
+$handler->override_option('style_options', array(
418
+'grouping' => '',
419
+'override' => 1,
420
+'sticky' => 0,
421
+'order' => 'desc',
422
+'summary' => '',
423
+'columns' => array(
424
+  'ops' => 'ops',
425
+  'title' => 'title',
426
+  'type' => 'type',
427
+  'last_updated' => 'last_updated',
428
+),
429
+'info' => array(
430
+  'ops' => array(
431
+    'separator' => '',
432
+  ),
433
+  'title' => array(
434
+    'sortable' => 0,
435
+    'separator' => '',
436
+  ),
437
+  'type' => array(
438
+    'sortable' => 0,
439
+    'separator' => '',
440
+  ),
441
+  'last_updated' => array(
442
+    'sortable' => 0,
443
+    'separator' => '',
444
+  ),
445
+),
446
+'default' => 'last_updated',
447
+));
448
+$handler->override_option('path', 'account/prefs/subscriptions');
449
+$handler->override_option('menu', array(
450
+'type' => 'tab',
451
+'title' => bts('Subscriptions', array(), NULL, 'boinc:account-dashboard'),
452
+'description' => '',
453
+'weight' => '20',
454
+'name' => 'primary-links',
455
+));
456
+$handler->override_option('tab_options', array(
457
+'type' => 'none',
458
+'title' => '',
459
+'description' => '',
460
+'weight' => 0,
461
+'name' => 'navigation',
462
+));
463
+$handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
464
+$handler->override_option('fields', array(
465
+'title' => array(
466
+  'label' => 'Page',
467
+  'alter' => array(
468
+    'alter_text' => 0,
469
+    'text' => '',
470
+    'make_link' => 0,
471
+    'path' => '',
472
+    'absolute' => 0,
473
+    'link_class' => '',
474
+    'alt' => '',
475
+    'rel' => '',
476
+    'prefix' => '',
477
+    'suffix' => '',
478
+    'target' => '',
479
+    'help' => '',
480
+    'trim' => 0,
481
+    'max_length' => '',
482
+    'word_boundary' => 1,
483
+    'ellipsis' => 1,
484
+    'html' => 0,
485
+    'strip_tags' => 0,
486
+  ),
487
+  'empty' => '',
488
+  'hide_empty' => 0,
489
+  'empty_zero' => 0,
490
+  'hide_alter_empty' => 1,
491
+  'link_to_node' => 1,
492
+  'exclude' => 1,
493
+  'id' => 'title',
494
+  'table' => 'node',
495
+  'field' => 'title',
496
+  'relationship' => 'none',
497
+  'override' => array(
498
+    'button' => 'Use default',
499
+  ),
500
+),
501
+'type' => array(
502
+  'label' => 'Type',
503
+  'alter' => array(
504
+    'alter_text' => 0,
505
+    'text' => '',
506
+    'make_link' => 0,
507
+    'path' => '',
508
+    'absolute' => 0,
509
+    'link_class' => '',
510
+    'alt' => '',
511
+    'rel' => '',
512
+    'prefix' => '',
513
+    'suffix' => '',
514
+    'target' => '',
515
+    'help' => '',
516
+    'trim' => 0,
517
+    'max_length' => '',
518
+    'word_boundary' => 1,
519
+    'ellipsis' => 1,
520
+    'html' => 0,
521
+    'strip_tags' => 0,
522
+  ),
523
+  'empty' => '',
524
+  'hide_empty' => 0,
525
+  'empty_zero' => 0,
526
+  'hide_alter_empty' => 1,
527
+  'link_to_node' => 0,
528
+  'machine_name' => 0,
529
+  'exclude' => 1,
530
+  'id' => 'type',
531
+  'table' => 'node',
532
+  'field' => 'type',
533
+  'override' => array(
534
+    'button' => 'Use default',
535
+  ),
536
+  'relationship' => 'none',
537
+),
538
+'timestamp' => array(
539
+  'label' => 'Has new content',
540
+  'alter' => array(
541
+    'alter_text' => 0,
542
+    'text' => '',
543
+    'make_link' => 0,
544
+    'path' => '',
545
+    'absolute' => 0,
546
+    'link_class' => '',
547
+    'alt' => '',
548
+    'rel' => '',
549
+    'prefix' => '',
550
+    'suffix' => '',
551
+    'target' => '',
552
+    'help' => '',
553
+    'trim' => 0,
554
+    'max_length' => '',
555
+    'word_boundary' => 1,
556
+    'ellipsis' => 1,
557
+    'html' => 0,
558
+    'strip_tags' => 0,
559
+  ),
560
+  'empty' => '',
561
+  'hide_empty' => 0,
562
+  'empty_zero' => 0,
563
+  'hide_alter_empty' => 1,
564
+  'link_to_node' => 0,
565
+  'comments' => 1,
566
+  'exclude' => 1,
567
+  'id' => 'timestamp',
568
+  'table' => 'history_user',
569
+  'field' => 'timestamp',
570
+  'relationship' => 'none',
571
+  'override' => array(
572
+    'button' => 'Use default',
573
+  ),
574
+),
575
+'new_comments' => array(
576
+  'label' => 'New comments',
577
+  'alter' => array(
578
+    'alter_text' => 0,
579
+    'text' => '',
580
+    'make_link' => 0,
581
+    'path' => '',
582
+    'absolute' => 0,
583
+    'link_class' => '',
584
+    'alt' => '',
585
+    'rel' => '',
586
+    'prefix' => '',
587
+    'suffix' => '',
588
+    'target' => '',
589
+    'help' => '',
590
+    'trim' => 0,
591
+    'max_length' => '',
592
+    'word_boundary' => 1,
593
+    'ellipsis' => 1,
594
+    'html' => 0,
595
+    'strip_tags' => 0,
596
+  ),
597
+  'empty' => '',
598
+  'hide_empty' => 0,
599
+  'empty_zero' => 0,
600
+  'hide_alter_empty' => 1,
601
+  'set_precision' => FALSE,
602
+  'precision' => 0,
603
+  'decimal' => '.',
604
+  'separator' => ',',
605
+  'format_plural' => 0,
606
+  'format_plural_singular' => '1',
607
+  'format_plural_plural' => '@count',
608
+  'prefix' => '',
609
+  'suffix' => '',
610
+  'link_to_comment' => 1,
611
+  'exclude' => 1,
612
+  'id' => 'new_comments',
613
+  'table' => 'node',
614
+  'field' => 'new_comments',
615
+  'relationship' => 'none',
616
+  'override' => array(
617
+    'button' => 'Use default',
618
+  ),
619
+),
620
+'name' => array(
621
+  'label' => 'Term',
622
+  'alter' => array(
623
+    'alter_text' => 0,
624
+    'text' => '',
625
+    'make_link' => 0,
626
+    'path' => '',
627
+    'absolute' => 0,
628
+    'link_class' => '',
629
+    'alt' => '',
630
+    'rel' => '',
631
+    'prefix' => '',
632
+    'suffix' => '',
633
+    'target' => '',
634
+    'help' => '',
635
+    'trim' => 0,
636
+    'max_length' => '',
637
+    'word_boundary' => 1,
638
+    'ellipsis' => 1,
639
+    'html' => 0,
640
+    'strip_tags' => 0,
641
+  ),
642
+  'empty' => '',
643
+  'hide_empty' => 0,
644
+  'empty_zero' => 0,
645
+  'hide_alter_empty' => 1,
646
+  'link_to_taxonomy' => 0,
647
+  'exclude' => 1,
648
+  'id' => 'name',
649
+  'table' => 'term_data',
650
+  'field' => 'name',
651
+  'override' => array(
652
+    'button' => 'Use default',
653
+  ),
654
+  'relationship' => 'none',
655
+),
656
+'name_1' => array(
657
+  'label' => 'Vocabulary name',
658
+  'alter' => array(
659
+    'alter_text' => 0,
660
+    'text' => '',
661
+    'make_link' => 0,
662
+    'path' => '',
663
+    'absolute' => 0,
664
+    'link_class' => '',
665
+    'alt' => '',
666
+    'rel' => '',
667
+    'prefix' => '',
668
+    'suffix' => '',
669
+    'target' => '',
670
+    'help' => '',
671
+    'trim' => 0,
672
+    'max_length' => '',
673
+    'word_boundary' => 1,
674
+    'ellipsis' => 1,
675
+    'html' => 0,
676
+    'strip_tags' => 0,
677
+  ),
678
+  'empty' => '',
679
+  'hide_empty' => 0,
680
+  'empty_zero' => 0,
681
+  'hide_alter_empty' => 1,
682
+  'exclude' => 1,
683
+  'id' => 'name_1',
684
+  'table' => 'vocabulary',
685
+  'field' => 'name',
686
+  'override' => array(
687
+    'button' => 'Use default',
688
+  ),
689
+  'relationship' => 'none',
690
+),
691
+'phpcode' => array(
692
+  'label' => 'Page',
693
+  'alter' => array(
694
+    'alter_text' => 0,
695
+    'text' => '',
696
+    'make_link' => 0,
697
+    'path' => '',
698
+    'absolute' => 0,
699
+    'link_class' => '',
700
+    'alt' => '',
701
+    'rel' => '',
702
+    'prefix' => '',
703
+    'suffix' => '',
704
+    'target' => '',
705
+    'help' => '',
706
+    'trim' => 0,
707
+    'max_length' => '',
708
+    'word_boundary' => 1,
709
+    'ellipsis' => 1,
710
+    'html' => 0,
711
+    'strip_tags' => 0,
712
+  ),
713
+  'empty' => '',
714
+  'hide_empty' => 0,
715
+  'empty_zero' => 0,
716
+  'hide_alter_empty' => 1,
717
+  'value' => '<?php
718 718
 $updated = ($data->node_comment_statistics_last_updated > $data->history_user_timestamp) ? TRUE : FALSE;
719 719
 $url = "node/{$data->nid}";
720 720
 if ($data->node_new_comments) {
@@ -725,42 +725,42 @@  discard block
 block discarded – undo
725 725
 print l($data->node_title, $url);
726 726
 print \'</span>\';
727 727
 ?>',
728
-      'exclude' => 0,
729
-      'id' => 'phpcode',
730
-      'table' => 'customfield',
731
-      'field' => 'phpcode',
732
-      'override' => array(
733
-        'button' => 'Use default',
734
-      ),
735
-      'relationship' => 'none',
736
-    ),
737
-    'phpcode_1' => array(
738
-      'label' => '',
739
-      'alter' => array(
740
-        'alter_text' => 0,
741
-        'text' => '',
742
-        'make_link' => 0,
743
-        'path' => '',
744
-        'absolute' => 0,
745
-        'link_class' => '',
746
-        'alt' => '',
747
-        'rel' => '',
748
-        'prefix' => '',
749
-        'suffix' => '',
750
-        'target' => '',
751
-        'help' => '',
752
-        'trim' => 0,
753
-        'max_length' => '',
754
-        'word_boundary' => 1,
755
-        'ellipsis' => 1,
756
-        'html' => 0,
757
-        'strip_tags' => 0,
758
-      ),
759
-      'empty' => '',
760
-      'hide_empty' => 0,
761
-      'empty_zero' => 0,
762
-      'hide_alter_empty' => 1,
763
-      'value' => '<?php
728
+  'exclude' => 0,
729
+  'id' => 'phpcode',
730
+  'table' => 'customfield',
731
+  'field' => 'phpcode',
732
+  'override' => array(
733
+    'button' => 'Use default',
734
+  ),
735
+  'relationship' => 'none',
736
+),
737
+'phpcode_1' => array(
738
+  'label' => '',
739
+  'alter' => array(
740
+    'alter_text' => 0,
741
+    'text' => '',
742
+    'make_link' => 0,
743
+    'path' => '',
744
+    'absolute' => 0,
745
+    'link_class' => '',
746
+    'alt' => '',
747
+    'rel' => '',
748
+    'prefix' => '',
749
+    'suffix' => '',
750
+    'target' => '',
751
+    'help' => '',
752
+    'trim' => 0,
753
+    'max_length' => '',
754
+    'word_boundary' => 1,
755
+    'ellipsis' => 1,
756
+    'html' => 0,
757
+    'strip_tags' => 0,
758
+  ),
759
+  'empty' => '',
760
+  'hide_empty' => 0,
761
+  'empty_zero' => 0,
762
+  'hide_alter_empty' => 1,
763
+  'value' => '<?php
764 764
 if ($data->node_type == \'forum\') {
765 765
   print $data->vocabulary_name . \' &rsaquo; \' . $data->term_data_name;
766 766
 }
@@ -768,148 +768,148 @@  discard block
 block discarded – undo
768 768
   print bts(\'News\', array(), NULL, \'boinc:menu-link\');
769 769
 }
770 770
 ?>',
771
-      'exclude' => 0,
772
-      'id' => 'phpcode_1',
773
-      'table' => 'customfield',
774
-      'field' => 'phpcode',
775
-      'override' => array(
776
-        'button' => 'Use default',
777
-      ),
778
-      'relationship' => 'none',
779
-    ),
780
-    'last_updated' => array(
781
-      'label' => bts('Updated', array(), NULL, 'boinc:account-dashboard'),
782
-      'alter' => array(
783
-        'alter_text' => 0,
784
-        'text' => '',
785
-        'make_link' => 0,
786
-        'path' => '',
787
-        'absolute' => 0,
788
-        'link_class' => '',
789
-        'alt' => '',
790
-        'rel' => '',
791
-        'prefix' => '',
792
-        'suffix' => '',
793
-        'target' => '',
794
-        'help' => '',
795
-        'trim' => 0,
796
-        'max_length' => '',
797
-        'word_boundary' => 1,
798
-        'ellipsis' => 1,
799
-        'html' => 0,
800
-        'strip_tags' => 0,
801
-      ),
802
-      'empty' => '',
803
-      'hide_empty' => 0,
804
-      'empty_zero' => 0,
805
-      'hide_alter_empty' => 1,
806
-      'date_format' => 'time ago',
807
-      'custom_date_format' => '',
808
-      'exclude' => 0,
809
-      'id' => 'last_updated',
810
-      'table' => 'node_comment_statistics',
811
-      'field' => 'last_updated',
812
-      'override' => array(
813
-        'button' => 'Use default',
814
-      ),
815
-      'relationship' => 'none',
816
-    ),
817
-    'ops' => array(
818
-      'label' => '',
819
-      'alter' => array(
820
-        'alter_text' => 0,
821
-        'text' => '',
822
-        'make_link' => 0,
823
-        'path' => '',
824
-        'absolute' => 0,
825
-        'link_class' => '',
826
-        'alt' => '',
827
-        'rel' => '',
828
-        'prefix' => '',
829
-        'suffix' => '',
830
-        'target' => '',
831
-        'help' => '',
832
-        'trim' => 0,
833
-        'max_length' => '',
834
-        'word_boundary' => 1,
835
-        'ellipsis' => 1,
836
-        'html' => 0,
837
-        'strip_tags' => 0,
838
-      ),
839
-      'empty' => '',
840
-      'hide_empty' => 0,
841
-      'empty_zero' => 0,
842
-      'hide_alter_empty' => 1,
843
-      'link_type' => '',
844
-      'exclude' => 1,
845
-      'id' => 'ops',
846
-      'table' => 'flag_content',
847
-      'field' => 'ops',
848
-      'relationship' => 'flag_content_rel',
849
-      'override' => array(
850
-        'button' => 'Use default',
851
-      ),
852
-    ),
853
-  ));
854
-  $handler->override_option('title', 'Subscriptions');
855
-  $handler->override_option('items_per_page', 5);
856
-  $handler->override_option('use_pager', '0');
857
-  $handler->override_option('use_more', 1);
858
-  $handler->override_option('use_more_always', 1);
859
-  $handler->override_option('style_plugin', 'table');
860
-  $handler->override_option('style_options', array(
861
-    'grouping' => '',
862
-    'override' => 1,
863
-    'sticky' => 0,
864
-    'order' => 'desc',
865
-    'summary' => '',
866
-    'columns' => array(
867
-      'title' => 'title',
868
-      'type' => 'type',
869
-      'ops' => 'ops',
870
-      'last_updated' => 'last_updated',
871
-    ),
872
-    'info' => array(
873
-      'title' => array(
874
-        'sortable' => 0,
875
-        'separator' => '',
876
-      ),
877
-      'type' => array(
878
-        'sortable' => 0,
879
-        'separator' => '',
880
-      ),
881
-      'ops' => array(
882
-        'separator' => '',
883
-      ),
884
-      'last_updated' => array(
885
-        'sortable' => 0,
886
-        'separator' => '',
887
-      ),
888
-    ),
889
-    'default' => 'last_updated',
890
-  ));
891
-  $handler->override_option('pane_title', '');
892
-  $handler->override_option('pane_description', '');
893
-  $handler->override_option('pane_category', array(
894
-    'name' => 'View panes',
895
-    'weight' => 0,
896
-  ));
897
-  $handler->override_option('allow', array(
898
-    'use_pager' => FALSE,
899
-    'items_per_page' => FALSE,
900
-    'offset' => FALSE,
901
-    'link_to_view' => FALSE,
902
-    'more_link' => FALSE,
903
-    'path_override' => FALSE,
904
-    'title_override' => FALSE,
905
-    'exposed_form' => FALSE,
906
-    'fields_override' => FALSE,
907
-  ));
908
-  $handler->override_option('argument_input', array());
909
-  $handler->override_option('link_to_view', 0);
910
-  $handler->override_option('inherit_panels_path', 0);
771
+  'exclude' => 0,
772
+  'id' => 'phpcode_1',
773
+  'table' => 'customfield',
774
+  'field' => 'phpcode',
775
+  'override' => array(
776
+    'button' => 'Use default',
777
+  ),
778
+  'relationship' => 'none',
779
+),
780
+'last_updated' => array(
781
+  'label' => bts('Updated', array(), NULL, 'boinc:account-dashboard'),
782
+  'alter' => array(
783
+    'alter_text' => 0,
784
+    'text' => '',
785
+    'make_link' => 0,
786
+    'path' => '',
787
+    'absolute' => 0,
788
+    'link_class' => '',
789
+    'alt' => '',
790
+    'rel' => '',
791
+    'prefix' => '',
792
+    'suffix' => '',
793
+    'target' => '',
794
+    'help' => '',
795
+    'trim' => 0,
796
+    'max_length' => '',
797
+    'word_boundary' => 1,
798
+    'ellipsis' => 1,
799
+    'html' => 0,
800
+    'strip_tags' => 0,
801
+  ),
802
+  'empty' => '',
803
+  'hide_empty' => 0,
804
+  'empty_zero' => 0,
805
+  'hide_alter_empty' => 1,
806
+  'date_format' => 'time ago',
807
+  'custom_date_format' => '',
808
+  'exclude' => 0,
809
+  'id' => 'last_updated',
810
+  'table' => 'node_comment_statistics',
811
+  'field' => 'last_updated',
812
+  'override' => array(
813
+    'button' => 'Use default',
814
+  ),
815
+  'relationship' => 'none',
816
+),
817
+'ops' => array(
818
+  'label' => '',
819
+  'alter' => array(
820
+    'alter_text' => 0,
821
+    'text' => '',
822
+    'make_link' => 0,
823
+    'path' => '',
824
+    'absolute' => 0,
825
+    'link_class' => '',
826
+    'alt' => '',
827
+    'rel' => '',
828
+    'prefix' => '',
829
+    'suffix' => '',
830
+    'target' => '',
831
+    'help' => '',
832
+    'trim' => 0,
833
+    'max_length' => '',
834
+    'word_boundary' => 1,
835
+    'ellipsis' => 1,
836
+    'html' => 0,
837
+    'strip_tags' => 0,
838
+  ),
839
+  'empty' => '',
840
+  'hide_empty' => 0,
841
+  'empty_zero' => 0,
842
+  'hide_alter_empty' => 1,
843
+  'link_type' => '',
844
+  'exclude' => 1,
845
+  'id' => 'ops',
846
+  'table' => 'flag_content',
847
+  'field' => 'ops',
848
+  'relationship' => 'flag_content_rel',
849
+  'override' => array(
850
+    'button' => 'Use default',
851
+  ),
852
+),
853
+));
854
+$handler->override_option('title', 'Subscriptions');
855
+$handler->override_option('items_per_page', 5);
856
+$handler->override_option('use_pager', '0');
857
+$handler->override_option('use_more', 1);
858
+$handler->override_option('use_more_always', 1);
859
+$handler->override_option('style_plugin', 'table');
860
+$handler->override_option('style_options', array(
861
+'grouping' => '',
862
+'override' => 1,
863
+'sticky' => 0,
864
+'order' => 'desc',
865
+'summary' => '',
866
+'columns' => array(
867
+  'title' => 'title',
868
+  'type' => 'type',
869
+  'ops' => 'ops',
870
+  'last_updated' => 'last_updated',
871
+),
872
+'info' => array(
873
+  'title' => array(
874
+    'sortable' => 0,
875
+    'separator' => '',
876
+  ),
877
+  'type' => array(
878
+    'sortable' => 0,
879
+    'separator' => '',
880
+  ),
881
+  'ops' => array(
882
+    'separator' => '',
883
+  ),
884
+  'last_updated' => array(
885
+    'sortable' => 0,
886
+    'separator' => '',
887
+  ),
888
+),
889
+'default' => 'last_updated',
890
+));
891
+$handler->override_option('pane_title', '');
892
+$handler->override_option('pane_description', '');
893
+$handler->override_option('pane_category', array(
894
+'name' => 'View panes',
895
+'weight' => 0,
896
+));
897
+$handler->override_option('allow', array(
898
+'use_pager' => FALSE,
899
+'items_per_page' => FALSE,
900
+'offset' => FALSE,
901
+'link_to_view' => FALSE,
902
+'more_link' => FALSE,
903
+'path_override' => FALSE,
904
+'title_override' => FALSE,
905
+'exposed_form' => FALSE,
906
+'fields_override' => FALSE,
907
+));
908
+$handler->override_option('argument_input', array());
909
+$handler->override_option('link_to_view', 0);
910
+$handler->override_option('inherit_panels_path', 0);
911 911
 
912
-  $views[$view->name] = $view;
912
+$views[$view->name] = $view;
913 913
 
914
-  return $views;
914
+return $views;
915 915
 }
Please login to merge, or discard this patch.