Passed
Push — dpa_docker18 ( 99df08 )
by David
10:05
created
drupal/sites/default/boinc/modules/boincwork/includes/boincwork.helpers.inc 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -643,9 +643,9 @@  discard block
 block discarded – undo
643 643
     }
644 644
     break;
645 645
 
646
-    default:
647
-      // Don't generate form elements for things that aren't explicitly form
648
-      // elements (i.e. 'title', '@attributes' keys, and the like)
646
+  default:
647
+    // Don't generate form elements for things that aren't explicitly form
648
+    // elements (i.e. 'title', '@attributes' keys, and the like)
649 649
   }
650 650
 }
651 651
 
@@ -1990,31 +1990,31 @@  discard block
 block discarded – undo
1990 1990
  */
1991 1991
 function pretty_application_version($appverid, $vernum, $plan_class, $plfm) {
1992 1992
   switch ($appverid) {
1993
-    case ANON_PLATFORM_UNKNOWN:
1994
-      return "Anonymous platform";
1995
-    case ANON_PLATFORM_CPU:
1996
-      return "Anonymous platform CPU";
1997
-    case ANON_PLATFORM_NVIDIA:
1998
-      return "Anonymous platform NVIDIA GPU";
1999
-    case ANON_PLATFORM_ATI:
2000
-      return "Anonymous platform AMD GPU";
2001
-    case ANON_PLATFORM_INTEL_GPU:
2002
-      return "Anonymous platform Intel GPU";
2003
-    case ANON_PLATFORM_APPLE_GPU:
2004
-      return "Anonymous platform Apple GPU";
2005
-    case 0:
2006
-      return "---";
2007
-    default:
2008
-      // Handle the case where the appversid is still negative. This
2009
-      // may be cause BOINC has introduced a new anonymous platform
2010
-      // that is not handled by the above case statements.
2011
-      if ($appverid < 0) {
2012
-        return "Unknown Anonymous platform";
2013
-      }
2014
-      else {
2015
-        $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
2016
-        $prettyc = ($plan_class) ? "($av->plan_class)" : '';
2017
-        return "v$prettyv $prettyc $plfm";
2018
-      }
1993
+  case ANON_PLATFORM_UNKNOWN:
1994
+    return "Anonymous platform";
1995
+  case ANON_PLATFORM_CPU:
1996
+    return "Anonymous platform CPU";
1997
+  case ANON_PLATFORM_NVIDIA:
1998
+    return "Anonymous platform NVIDIA GPU";
1999
+  case ANON_PLATFORM_ATI:
2000
+    return "Anonymous platform AMD GPU";
2001
+  case ANON_PLATFORM_INTEL_GPU:
2002
+    return "Anonymous platform Intel GPU";
2003
+  case ANON_PLATFORM_APPLE_GPU:
2004
+    return "Anonymous platform Apple GPU";
2005
+  case 0:
2006
+    return "---";
2007
+  default:
2008
+    // Handle the case where the appversid is still negative. This
2009
+    // may be cause BOINC has introduced a new anonymous platform
2010
+    // that is not handled by the above case statements.
2011
+    if ($appverid < 0) {
2012
+      return "Unknown Anonymous platform";
2013
+    }
2014
+    else {
2015
+      $prettyv = sprintf("%d.%02d", $vernum/100, $vernum%100);
2016
+      $prettyc = ($plan_class) ? "($av->plan_class)" : '';
2017
+      return "v$prettyv $prettyc $plfm";
2018
+    }
2019 2019
   }
2020 2020
 }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/boincuser/boincuser.views.inc 1 patch
Switch Indentation   +254 added lines, -254 removed lines patch added patch discarded remove patch
@@ -13,255 +13,255 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function boincuser_views_data() {
15 15
 
16
-  // -----------------------------------------------------------------------------------------------
17
-  // Definition for user table
18
-  // -----------------------------------------------------------------------------------------------
16
+// -----------------------------------------------------------------------------------------------
17
+// Definition for user table
18
+// -----------------------------------------------------------------------------------------------
19 19
 
20
-  $data['user']['table']['group'] = t('BOINC');
20
+$data['user']['table']['group'] = t('BOINC');
21 21
 
22
-  $data['user']['table']['base'] = array(
23
-      'field' => 'id',
24
-      'title' => t('BOINC user'),
25
-      'help' => t('BOINC account data for a user'),
26
-      'database' => 'boinc_ro'
27
-  );
22
+$data['user']['table']['base'] = array(
23
+  'field' => 'id',
24
+  'title' => t('BOINC user'),
25
+  'help' => t('BOINC account data for a user'),
26
+  'database' => 'boinc_ro'
27
+);
28 28
 
29
-  // Describe each of the individual fields in this table to Views. For
30
-  // each field, you may define what field, sort, argument, and/or filter
31
-  // handlers it supports. This will determine where in the Views interface you
32
-  // may use the field.
29
+// Describe each of the individual fields in this table to Views. For
30
+// each field, you may define what field, sort, argument, and/or filter
31
+// handlers it supports. This will determine where in the Views interface you
32
+// may use the field.
33 33
 
34
-  // Primary keys allowed as arguments
34
+// Primary keys allowed as arguments
35 35
 
36
-  $data['user']['id'] = array(
37
-    'title' => bts('Id', array(), NULL, 'boinc:user-id'),
38
-    'help' => t('The BOINC ID of the user account.'),
39
-    'field' => array(
40
-      'handler' => 'views_handler_field_numeric',
41
-      'click sortable' => TRUE
42
-    ),
43
-    'argument' => array(
44
-      'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
-      'name field' => 'title', // the field to display in the summary.
46
-      'numeric' => TRUE,
47
-      'validate type' => 'id'
48
-    ),
49
-    'filter' => array(
50
-      'handler' => 'views_handler_filter_numeric'
51
-    ),
52
-    'sort' => array(
53
-      'handler' => 'views_handler_sort_numeric'
54
-    )
55
-  );
56
-  $data['user']['teamid'] = array(
57
-    'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
58
-    'help' => t('The ID of the user\'s team.'),
59
-    'field' => array(
60
-      'handler' => 'views_handler_field_numeric',
61
-      'click sortable' => TRUE,
62
-    ),
63
-    'argument' => array(
64
-      'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
-      'name field' => 'title', // the field to display in the summary.
66
-      'numeric' => TRUE,
67
-      'validate type' => 'id'
68
-    ),
69
-    'filter' => array(
70
-      'handler' => 'views_handler_filter_numeric'
71
-    ),
72
-    'sort' => array(
73
-      'handler' => 'views_handler_sort_numeric'
74
-    )
75
-  );
36
+$data['user']['id'] = array(
37
+'title' => bts('Id', array(), NULL, 'boinc:user-id'),
38
+'help' => t('The BOINC ID of the user account.'),
39
+'field' => array(
40
+  'handler' => 'views_handler_field_numeric',
41
+  'click sortable' => TRUE
42
+),
43
+'argument' => array(
44
+  'handler' => 'views_handler_argument_boincuser_id', // custom handler
45
+  'name field' => 'title', // the field to display in the summary.
46
+  'numeric' => TRUE,
47
+  'validate type' => 'id'
48
+),
49
+'filter' => array(
50
+  'handler' => 'views_handler_filter_numeric'
51
+),
52
+'sort' => array(
53
+  'handler' => 'views_handler_sort_numeric'
54
+)
55
+);
56
+$data['user']['teamid'] = array(
57
+'title' => bts('Team ID', array(), NULL, 'boinc:team-id'),
58
+'help' => t('The ID of the user\'s team.'),
59
+'field' => array(
60
+  'handler' => 'views_handler_field_numeric',
61
+  'click sortable' => TRUE,
62
+),
63
+'argument' => array(
64
+  'handler' => 'views_handler_argument_boincteam_id', // custom handler
65
+  'name field' => 'title', // the field to display in the summary.
66
+  'numeric' => TRUE,
67
+  'validate type' => 'id'
68
+),
69
+'filter' => array(
70
+  'handler' => 'views_handler_filter_numeric'
71
+),
72
+'sort' => array(
73
+  'handler' => 'views_handler_sort_numeric'
74
+)
75
+);
76 76
 
77
-  // Descriptions of general host fields (alphabetized)
77
+// Descriptions of general host fields (alphabetized)
78 78
 
79
-  $data['user']['authenticator'] = array(
80
-    'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
81
-    'help' => t('The BOINC account key of the user.'),
82
-    'field' => array(
83
-      'handler' => 'views_handler_field',
84
-      'click sortable' => TRUE
85
-    ),
86
-    'filter' => array(
87
-      'handler' => 'views_handler_filter_string'
88
-    ),
89
-    'sort' => array(
90
-      'handler' => 'views_handler_sort_string'
91
-    )
92
-  );
93
-  $data['user']['country'] = array(
94
-    'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
95
-    'help' => t('The country of the user.'),
96
-    'field' => array(
97
-      'handler' => 'views_handler_field',
98
-      'click sortable' => TRUE
99
-    ),
100
-    'filter' => array(
101
-      'handler' => 'views_handler_filter_string'
102
-    ),
103
-    'sort' => array(
104
-      'handler' => 'views_handler_sort_string'
105
-    )
106
-  );
107
-  $data['user']['create_time'] = array(
108
-    'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
109
-    'help' => t('When the BOINC account was created.'),
110
-    'field' => array(
111
-      'handler' => 'views_handler_field_date',
112
-      'click sortable' => TRUE
113
-    ),
114
-    'filter' => array(
115
-      'handler' => 'views_handler_filter_date'
116
-    ),
117
-    'sort' => array(
118
-      'handler' => 'views_handler_sort_date'
119
-    )
120
-  );
121
-  $data['user']['cross_project_id'] = array(
122
-    'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
123
-    'help' => t('The cross project user identifier.'),
124
-    'field' => array(
125
-      'handler' => 'views_handler_field',
126
-      'click sortable' => TRUE
127
-    ),
128
-    'filter' => array(
129
-      'handler' => 'views_handler_filter_string'
130
-    ),
131
-    'sort' => array(
132
-      'handler' => 'views_handler_sort_string'
133
-    )
134
-  );
135
-  $data['user']['email_addr'] = array(
136
-      'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
137
-    'help' => t('The BOINC account email address.'),
138
-    'field' => array(
139
-      'handler' => 'views_handler_field',
140
-      'click sortable' => TRUE
141
-    ),
142
-    'filter' => array(
143
-      'handler' => 'views_handler_filter_string'
144
-    ),
145
-    'sort' => array(
146
-      'handler' => 'views_handler_sort_string'
147
-    )
148
-  );
149
-  $data['user']['expavg_credit'] = array(
150
-    'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
151
-    'help' => t('A decaying average of credit per day for the user.'),
152
-    'field' => array(
153
-      'handler' => 'views_handler_field_numeric',
154
-      'click sortable' => TRUE,
155
-      'float' => TRUE
156
-    ),
157
-    'filter' => array(
158
-      'handler' => 'views_handler_filter_numeric'
159
-    ),
160
-    'sort' => array(
161
-      'handler' => 'views_handler_sort_numeric'
162
-    )
163
-  );
164
-  $data['user']['name'] = array(
165
-    'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
166
-    'help' => t('The BOINC account user name.'),
167
-    'field' => array(
168
-      'handler' => 'views_handler_field',
169
-      'click sortable' => TRUE
170
-    ),
171
-    'filter' => array(
172
-      'handler' => 'views_handler_filter_string'
173
-    ),
174
-    'sort' => array(
175
-      'handler' => 'views_handler_sort_string'
176
-    )
177
-  );
178
-  $data['user']['passwd_hash'] = array(
179
-    'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
180
-    'help' => t('The user password hash'),
181
-    'field' => array(
182
-      'handler' => 'views_handler_field',
183
-      'click sortable' => TRUE
184
-    ),
185
-    'filter' => array(
186
-      'handler' => 'views_handler_filter_string'
187
-    ),
188
-    'sort' => array(
189
-      'handler' => 'views_handler_sort_string'
190
-    )
191
-  );
192
-  $data['user']['postal_code'] = array(
193
-    'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
194
-    'help' => t('The postal code of the user.'),
195
-    'field' => array(
196
-      'handler' => 'views_handler_field',
197
-      'click sortable' => TRUE
198
-    ),
199
-    'filter' => array(
200
-      'handler' => 'views_handler_filter_string'
201
-    ),
202
-    'sort' => array(
203
-      'handler' => 'views_handler_sort_string'
204
-    )
205
-  );
206
-  $data['user']['send_email'] = array(
207
-    'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
208
-    'help' => t('User preference to allow email communications.'),
209
-    'field' => array(
210
-      'handler' => 'views_handler_field_numeric',
211
-      'click sortable' => TRUE
212
-    ),
213
-    'filter' => array(
214
-      'handler' => 'views_handler_filter_numeric'
215
-    ),
216
-    'sort' => array(
217
-      'handler' => 'views_handler_sort_numeric'
218
-    )
219
-  );
220
-  $data['user']['show_hosts'] = array(
221
-    'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
222
-    'help' => t('User preference to display owned computers.'),
223
-    'field' => array(
224
-      'handler' => 'views_handler_field_numeric',
225
-      'click sortable' => TRUE
226
-    ),
227
-    'filter' => array(
228
-      'handler' => 'views_handler_filter_numeric'
229
-    ),
230
-    'sort' => array(
231
-      'handler' => 'views_handler_sort_numeric'
232
-    )
233
-  );
234
-  $data['user']['total_credit'] = array(
235
-    'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
236
-    'help' => t('The total accumulated BOINC credit for the user.'),
237
-    'field' => array(
238
-      'handler' => 'views_handler_field_numeric',
239
-      'click sortable' => TRUE,
240
-      'float' => TRUE
241
-    ),
242
-    'filter' => array(
243
-      'handler' => 'views_handler_filter_numeric'
244
-    ),
245
-    'sort' => array(
246
-      'handler' => 'views_handler_sort_numeric'
247
-    )
248
-  );
249
-  $data['user']['url'] = array(
250
-    'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
251
-    'help' => t('The URL provided by the user'),
252
-    'field' => array(
253
-      'handler' => 'views_handler_field',
254
-      'click sortable' => TRUE
255
-    ),
256
-    'filter' => array(
257
-      'handler' => 'views_handler_filter_string'
258
-    ),
259
-    'sort' => array(
260
-      'handler' => 'views_handler_sort_string'
261
-    )
262
-  );
79
+$data['user']['authenticator'] = array(
80
+'title' => bts('Account Key', array(), NULL, 'boinc:user-info'),
81
+'help' => t('The BOINC account key of the user.'),
82
+'field' => array(
83
+  'handler' => 'views_handler_field',
84
+  'click sortable' => TRUE
85
+),
86
+'filter' => array(
87
+  'handler' => 'views_handler_filter_string'
88
+),
89
+'sort' => array(
90
+  'handler' => 'views_handler_sort_string'
91
+)
92
+);
93
+$data['user']['country'] = array(
94
+'title' => bts('Country', array(), NULL, 'boinc:country-of-origin'),
95
+'help' => t('The country of the user.'),
96
+'field' => array(
97
+  'handler' => 'views_handler_field',
98
+  'click sortable' => TRUE
99
+),
100
+'filter' => array(
101
+  'handler' => 'views_handler_filter_string'
102
+),
103
+'sort' => array(
104
+  'handler' => 'views_handler_sort_string'
105
+)
106
+);
107
+$data['user']['create_time'] = array(
108
+'title' => bts('Member since', array(), NULL, 'boinc:user-info'),
109
+'help' => t('When the BOINC account was created.'),
110
+'field' => array(
111
+  'handler' => 'views_handler_field_date',
112
+  'click sortable' => TRUE
113
+),
114
+'filter' => array(
115
+  'handler' => 'views_handler_filter_date'
116
+),
117
+'sort' => array(
118
+  'handler' => 'views_handler_sort_date'
119
+)
120
+);
121
+$data['user']['cross_project_id'] = array(
122
+'title' => bts('CPID', array(), NULL, 'boinc:user-info'),
123
+'help' => t('The cross project user identifier.'),
124
+'field' => array(
125
+  'handler' => 'views_handler_field',
126
+  'click sortable' => TRUE
127
+),
128
+'filter' => array(
129
+  'handler' => 'views_handler_filter_string'
130
+),
131
+'sort' => array(
132
+  'handler' => 'views_handler_sort_string'
133
+)
134
+);
135
+$data['user']['email_addr'] = array(
136
+  'title' => bts('Email Address', array(), NULL, 'boinc:user-info'),
137
+'help' => t('The BOINC account email address.'),
138
+'field' => array(
139
+  'handler' => 'views_handler_field',
140
+  'click sortable' => TRUE
141
+),
142
+'filter' => array(
143
+  'handler' => 'views_handler_filter_string'
144
+),
145
+'sort' => array(
146
+  'handler' => 'views_handler_sort_string'
147
+)
148
+);
149
+$data['user']['expavg_credit'] = array(
150
+'title' => bts('Recent average credit', array(), NULL, 'boinc:user-or-team-RAC'),
151
+'help' => t('A decaying average of credit per day for the user.'),
152
+'field' => array(
153
+  'handler' => 'views_handler_field_numeric',
154
+  'click sortable' => TRUE,
155
+  'float' => TRUE
156
+),
157
+'filter' => array(
158
+  'handler' => 'views_handler_filter_numeric'
159
+),
160
+'sort' => array(
161
+  'handler' => 'views_handler_sort_numeric'
162
+)
163
+);
164
+$data['user']['name'] = array(
165
+'title' => bts('Name', array(), NULL, 'boinc:user-or-team-name'),
166
+'help' => t('The BOINC account user name.'),
167
+'field' => array(
168
+  'handler' => 'views_handler_field',
169
+  'click sortable' => TRUE
170
+),
171
+'filter' => array(
172
+  'handler' => 'views_handler_filter_string'
173
+),
174
+'sort' => array(
175
+  'handler' => 'views_handler_sort_string'
176
+)
177
+);
178
+$data['user']['passwd_hash'] = array(
179
+'title' => bts('Password Hash', array(), NULL, 'boinc:user-info'),
180
+'help' => t('The user password hash'),
181
+'field' => array(
182
+  'handler' => 'views_handler_field',
183
+  'click sortable' => TRUE
184
+),
185
+'filter' => array(
186
+  'handler' => 'views_handler_filter_string'
187
+),
188
+'sort' => array(
189
+  'handler' => 'views_handler_sort_string'
190
+)
191
+);
192
+$data['user']['postal_code'] = array(
193
+'title' => bts('Postal Code', array(), NULL, 'boinc:user-info'),
194
+'help' => t('The postal code of the user.'),
195
+'field' => array(
196
+  'handler' => 'views_handler_field',
197
+  'click sortable' => TRUE
198
+),
199
+'filter' => array(
200
+  'handler' => 'views_handler_filter_string'
201
+),
202
+'sort' => array(
203
+  'handler' => 'views_handler_sort_string'
204
+)
205
+);
206
+$data['user']['send_email'] = array(
207
+'title' => bts('Send Email', array(), NULL, 'boinc:user-info'),
208
+'help' => t('User preference to allow email communications.'),
209
+'field' => array(
210
+  'handler' => 'views_handler_field_numeric',
211
+  'click sortable' => TRUE
212
+),
213
+'filter' => array(
214
+  'handler' => 'views_handler_filter_numeric'
215
+),
216
+'sort' => array(
217
+  'handler' => 'views_handler_sort_numeric'
218
+)
219
+);
220
+$data['user']['show_hosts'] = array(
221
+'title' => bts('Show Hosts', array(), NULL, 'boinc:user-info'),
222
+'help' => t('User preference to display owned computers.'),
223
+'field' => array(
224
+  'handler' => 'views_handler_field_numeric',
225
+  'click sortable' => TRUE
226
+),
227
+'filter' => array(
228
+  'handler' => 'views_handler_filter_numeric'
229
+),
230
+'sort' => array(
231
+  'handler' => 'views_handler_sort_numeric'
232
+)
233
+);
234
+$data['user']['total_credit'] = array(
235
+'title' => bts('Total credit', array(), NULL, 'boinc:user-or-team-total-credits'),
236
+'help' => t('The total accumulated BOINC credit for the user.'),
237
+'field' => array(
238
+  'handler' => 'views_handler_field_numeric',
239
+  'click sortable' => TRUE,
240
+  'float' => TRUE
241
+),
242
+'filter' => array(
243
+  'handler' => 'views_handler_filter_numeric'
244
+),
245
+'sort' => array(
246
+  'handler' => 'views_handler_sort_numeric'
247
+)
248
+);
249
+$data['user']['url'] = array(
250
+'title' => bts('URL', array(), NULL, 'boinc:website-of-user-or-team'),
251
+'help' => t('The URL provided by the user'),
252
+'field' => array(
253
+  'handler' => 'views_handler_field',
254
+  'click sortable' => TRUE
255
+),
256
+'filter' => array(
257
+  'handler' => 'views_handler_filter_string'
258
+),
259
+'sort' => array(
260
+  'handler' => 'views_handler_sort_string'
261
+)
262
+);
263 263
 
264
-  return $data;
264
+return $data;
265 265
 }
266 266
 
267 267
 /*
@@ -272,17 +272,17 @@  discard block
 block discarded – undo
272 272
  */
273 273
 
274 274
 function boincuser_views_handlers() {
275
-  return array(
276
-    'info' => array(
277
-      'path' => drupal_get_path('module', 'boincuser') . '/views',
278
-    ),
279
-    'handlers' => array(
280
-      'views_handler_argument_boincuser_id' => array(
281
-        'parent' => 'views_handler_argument_numeric'
282
-      ),
283
-      'views_handler_argument_boincteam_id' => array(
284
-        'parent' => 'views_handler_argument_numeric'
285
-      ),
286
-    )
287
-  );
275
+return array(
276
+'info' => array(
277
+  'path' => drupal_get_path('module', 'boincuser') . '/views',
278
+),
279
+'handlers' => array(
280
+  'views_handler_argument_boincuser_id' => array(
281
+    'parent' => 'views_handler_argument_numeric'
282
+  ),
283
+  'views_handler_argument_boincteam_id' => array(
284
+    'parent' => 'views_handler_argument_numeric'
285
+  ),
286
+)
287
+);
288 288
 }
Please login to merge, or discard this patch.
html/user/job_file.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -80,20 +80,20 @@
 block discarded – undo
80 80
 
81 81
 function upload_error_description($errno) {
82 82
     switch ($errno) {
83
-        case UPLOAD_ERR_INI_SIZE:
84
-            return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85
-        case UPLOAD_ERR_FORM_SIZE:
86
-            return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break;
87
-        case UPLOAD_ERR_PARTIAL:
88
-            return "The uploaded file was only partially uploaded."; break;
89
-        case UPLOAD_ERR_NO_FILE:
90
-            return "No file was uploaded."; break;
91
-        case UPLOAD_ERR_NO_TMP_DIR:
92
-            return "Missing a temporary folder."; break;
93
-        case UPLOAD_ERR_CANT_WRITE:
94
-            return "Failed to write file to disk."; break;
95
-        case UPLOAD_ERR_EXTENSION:
96
-            return "A PHP extension stopped the file upload."; break;
83
+    case UPLOAD_ERR_INI_SIZE:
84
+        return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85
+    case UPLOAD_ERR_FORM_SIZE:
86
+        return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break;
87
+    case UPLOAD_ERR_PARTIAL:
88
+        return "The uploaded file was only partially uploaded."; break;
89
+    case UPLOAD_ERR_NO_FILE:
90
+        return "No file was uploaded."; break;
91
+    case UPLOAD_ERR_NO_TMP_DIR:
92
+        return "Missing a temporary folder."; break;
93
+    case UPLOAD_ERR_CANT_WRITE:
94
+        return "Failed to write file to disk."; break;
95
+    case UPLOAD_ERR_EXTENSION:
96
+        return "A PHP extension stopped the file upload."; break;
97 97
     }
98 98
 }
99 99
 
Please login to merge, or discard this patch.
html/user/submit_rpc_handler.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1102,24 +1102,24 @@
 block discarded – undo
1102 1102
 log_write("----- Handling RPC; command ".$r->getName());
1103 1103
 
1104 1104
 switch ($r->getName()) {
1105
-    case 'abort_batch': handle_abort_batch($r); break;
1106
-    case 'abort_jobs': handle_abort_jobs($r); break;
1107
-    case 'create_batch': create_batch($r); break;
1108
-    case 'estimate_batch': estimate_batch($r); break;
1109
-    case 'get_templates': get_templates($r); break;
1110
-    case 'ping': ping($r); break;
1111
-    case 'query_batch': query_batch($r); break;
1112
-    case 'query_batch2': query_batch2($r); break;
1113
-    case 'query_batches': query_batches($r); break;
1114
-    case 'query_job': query_job($r); break;
1115
-    case 'query_completed_job': query_completed_job($r); break;
1116
-    case 'retire_batch': handle_retire_batch($r); break;
1117
-    case 'set_expire_time': handle_set_expire_time($r); break;
1118
-    case 'submit_batch': submit_batch($r); break;
1119
-    default:
1120
-        log_write("bad command");
1121
-        xml_error(-1, "bad command");
1122
-        break;
1105
+case 'abort_batch': handle_abort_batch($r); break;
1106
+case 'abort_jobs': handle_abort_jobs($r); break;
1107
+case 'create_batch': create_batch($r); break;
1108
+case 'estimate_batch': estimate_batch($r); break;
1109
+case 'get_templates': get_templates($r); break;
1110
+case 'ping': ping($r); break;
1111
+case 'query_batch': query_batch($r); break;
1112
+case 'query_batch2': query_batch2($r); break;
1113
+case 'query_batches': query_batches($r); break;
1114
+case 'query_job': query_job($r); break;
1115
+case 'query_completed_job': query_completed_job($r); break;
1116
+case 'retire_batch': handle_retire_batch($r); break;
1117
+case 'set_expire_time': handle_set_expire_time($r); break;
1118
+case 'submit_batch': submit_batch($r); break;
1119
+default:
1120
+    log_write("bad command");
1121
+    xml_error(-1, "bad command");
1122
+    break;
1123 1123
 }
1124 1124
 
1125 1125
 log_write("RPC done");
Please login to merge, or discard this patch.