@@ -32,25 +32,25 @@ discard block |
||
32 | 32 | * Relative date ranges for filtering |
33 | 33 | */ |
34 | 34 | public static $relative_dates = array( // Start: year,month,day,week, End: year,month,day,week |
35 | - 'Today' => array(0,0,0,0, 0,0,1,0), |
|
36 | - 'Yesterday' => array(0,0,-1,0, 0,0,0,0), |
|
37 | - 'This week' => array(0,0,0,0, 0,0,0,1), |
|
38 | - 'Last week' => array(0,0,0,-1, 0,0,0,0), |
|
39 | - 'This month' => array(0,0,0,0, 0,1,0,0), |
|
40 | - 'Last month' => array(0,-1,0,0, 0,0,0,0), |
|
41 | - 'Last 3 months' => array(0,-3,0,0, 0,0,0,0), |
|
42 | - 'This quarter'=> array(0,0,0,0, 0,0,0,0), // Just a marker, needs special handling |
|
43 | - 'Last quarter'=> array(0,-4,0,0, 0,-4,0,0), // Just a marker |
|
44 | - 'This year' => array(0,0,0,0, 1,0,0,0), |
|
45 | - 'Last year' => array(-1,0,0,0, 0,0,0,0), |
|
46 | - '2 years ago' => array(-2,0,0,0, -1,0,0,0), |
|
47 | - '3 years ago' => array(-3,0,0,0, -2,0,0,0), |
|
48 | - ); |
|
35 | + 'Today' => array(0,0,0,0, 0,0,1,0), |
|
36 | + 'Yesterday' => array(0,0,-1,0, 0,0,0,0), |
|
37 | + 'This week' => array(0,0,0,0, 0,0,0,1), |
|
38 | + 'Last week' => array(0,0,0,-1, 0,0,0,0), |
|
39 | + 'This month' => array(0,0,0,0, 0,1,0,0), |
|
40 | + 'Last month' => array(0,-1,0,0, 0,0,0,0), |
|
41 | + 'Last 3 months' => array(0,-3,0,0, 0,0,0,0), |
|
42 | + 'This quarter'=> array(0,0,0,0, 0,0,0,0), // Just a marker, needs special handling |
|
43 | + 'Last quarter'=> array(0,-4,0,0, 0,-4,0,0), // Just a marker |
|
44 | + 'This year' => array(0,0,0,0, 1,0,0,0), |
|
45 | + 'Last year' => array(-1,0,0,0, 0,0,0,0), |
|
46 | + '2 years ago' => array(-2,0,0,0, -1,0,0,0), |
|
47 | + '3 years ago' => array(-3,0,0,0, -2,0,0,0), |
|
48 | + ); |
|
49 | 49 | |
50 | 50 | /** |
51 | - * Files known to cause problems, and will be skipped in a plugin scan |
|
52 | - * If you put appname => true, the whole app will be skipped. |
|
53 | - */ |
|
51 | + * Files known to cause problems, and will be skipped in a plugin scan |
|
52 | + * If you put appname => true, the whole app will be skipped. |
|
53 | + */ |
|
54 | 54 | protected static $blacklist_files = array( |
55 | 55 | 'api' => true, |
56 | 56 | 'etemplate' => true, |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | ); |
65 | 65 | |
66 | 66 | /** |
67 | - * Class used to provide extra conversion functions |
|
68 | - * |
|
69 | - * Passed in as a param to conversion() |
|
70 | - */ |
|
67 | + * Class used to provide extra conversion functions |
|
68 | + * |
|
69 | + * Passed in as a param to conversion() |
|
70 | + */ |
|
71 | 71 | protected static $cclass = null; |
72 | 72 | |
73 | 73 | /** |
@@ -137,10 +137,10 @@ |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
140 | - * Save a definition |
|
141 | - * |
|
142 | - * @param definition $definition |
|
143 | - */ |
|
140 | + * Save a definition |
|
141 | + * |
|
142 | + * @param definition $definition |
|
143 | + */ |
|
144 | 144 | public function save(Array $data) { |
145 | 145 | $definition = new importexport_definition(); |
146 | 146 | $definition->set_record($data); |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
44 | - * Step user through importing their file |
|
45 | - */ |
|
44 | + * Step user through importing their file |
|
45 | + */ |
|
46 | 46 | public function import_dialog($content = array()) { |
47 | 47 | $appname = $_GET['appname'] ? $_GET['appname'] : $content['appname']; |
48 | 48 | $definition = $_GET['definition'] ? $_GET['definition'] : $content['definition']; |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
227 | - * Get options for select boxes |
|
228 | - */ |
|
227 | + * Get options for select boxes |
|
228 | + */ |
|
229 | 229 | public static function get_select_options(Array $data) { |
230 | 230 | $options = array( |
231 | 231 | 'delimiter' => array( |
@@ -274,8 +274,8 @@ discard block |
||
274 | 274 | } |
275 | 275 | |
276 | 276 | /** |
277 | - * Get definitions via ajax |
|
278 | - */ |
|
277 | + * Get definitions via ajax |
|
278 | + */ |
|
279 | 279 | public function ajax_get_definitions($appname, $file=null) { |
280 | 280 | $options = self::get_select_options(array('appname'=>$appname, 'file'=>$file)); |
281 | 281 | $response = new xajaxResponse(); |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | const TEMPLATE_MARKER = '-eTemplate-'; |
24 | 24 | |
25 | 25 | /** |
26 | - * List of steps. Key is the function, value is the translated title. |
|
27 | - */ |
|
26 | + * List of steps. Key is the function, value is the translated title. |
|
27 | + */ |
|
28 | 28 | public $steps; |
29 | 29 | |
30 | 30 | /** |
31 | - * List of eTemplates to use for each step. You can override this with your own etemplates steps. |
|
32 | - */ |
|
31 | + * List of eTemplates to use for each step. You can override this with your own etemplates steps. |
|
32 | + */ |
|
33 | 33 | protected $step_templates = array( |
34 | 34 | 'wizard_step30' => 'importexport.wizard_basic_import_csv.sample_file', |
35 | 35 | 'wizard_step40' => 'importexport.wizard_basic_import_csv.choosesepncharset', |
@@ -39,19 +39,19 @@ discard block |
||
39 | 39 | |
40 | 40 | |
41 | 41 | /** |
42 | - * Destination fields for the mapping |
|
43 | - * Key is the field name, value is the human version |
|
44 | - */ |
|
42 | + * Destination fields for the mapping |
|
43 | + * Key is the field name, value is the human version |
|
44 | + */ |
|
45 | 45 | protected $mapping_fields = array(); |
46 | 46 | |
47 | 47 | /** |
48 | - * List of conditions your plugin supports |
|
49 | - */ |
|
48 | + * List of conditions your plugin supports |
|
49 | + */ |
|
50 | 50 | protected $conditions = array(); |
51 | 51 | |
52 | 52 | /** |
53 | - * List of actions your plugin supports |
|
54 | - */ |
|
53 | + * List of actions your plugin supports |
|
54 | + */ |
|
55 | 55 | protected $actions = array(); |
56 | 56 | |
57 | 57 | /** |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * Take a sample CSV file. It will be processed in later steps |
|
72 | - */ |
|
71 | + * Take a sample CSV file. It will be processed in later steps |
|
72 | + */ |
|
73 | 73 | function wizard_step30(&$content, &$sel_options, &$readonlys, &$preserv) |
74 | 74 | { |
75 | 75 | if($this->debug) error_log(get_class($this) . '::wizard_step30->$content '.print_r($content,true)); |
@@ -263,11 +263,11 @@ discard block |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
266 | - * Process the sample file, get the fields out of it, then allow them to be mapped onto |
|
267 | - * the fields the destination understands. Also, set any translations to be done to the field. |
|
268 | - * |
|
269 | - * You can use the eTemplate |
|
270 | - */ |
|
266 | + * Process the sample file, get the fields out of it, then allow them to be mapped onto |
|
267 | + * the fields the destination understands. Also, set any translations to be done to the field. |
|
268 | + * |
|
269 | + * You can use the eTemplate |
|
270 | + */ |
|
271 | 271 | function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv) |
272 | 272 | { |
273 | 273 | if($this->debug) error_log(get_class($this) . '::wizard_step50->$content '.print_r($content,true)); |
@@ -348,8 +348,8 @@ discard block |
||
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
351 | - * Edit conditions |
|
352 | - */ |
|
351 | + * Edit conditions |
|
352 | + */ |
|
353 | 353 | function wizard_step55(&$content, &$sel_options, &$readonlys, &$preserv) |
354 | 354 | { |
355 | 355 | if($this->debug) error_log(get_class($this) . '::wizard_step55->$content '.print_r($content,true)); |
@@ -275,37 +275,37 @@ |
||
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
278 | - * Returns warnings that were encountered during importing |
|
279 | - * Maximum of one warning message per record, but you can concatenate them if you need to |
|
280 | - * |
|
281 | - * @return Array ( |
|
282 | - * record_# => warning message |
|
283 | - * ) |
|
284 | - */ |
|
278 | + * Returns warnings that were encountered during importing |
|
279 | + * Maximum of one warning message per record, but you can concatenate them if you need to |
|
280 | + * |
|
281 | + * @return Array ( |
|
282 | + * record_# => warning message |
|
283 | + * ) |
|
284 | + */ |
|
285 | 285 | public function get_warnings() { |
286 | 286 | return $this->warnings; |
287 | 287 | } |
288 | 288 | |
289 | 289 | /** |
290 | - * Returns errors that were encountered during importing |
|
291 | - * Maximum of one error message per record, but you can append if you need to |
|
292 | - * |
|
293 | - * @return Array ( |
|
294 | - * record_# => error message |
|
295 | - * ) |
|
296 | - */ |
|
290 | + * Returns errors that were encountered during importing |
|
291 | + * Maximum of one error message per record, but you can append if you need to |
|
292 | + * |
|
293 | + * @return Array ( |
|
294 | + * record_# => error message |
|
295 | + * ) |
|
296 | + */ |
|
297 | 297 | public function get_errors() { |
298 | 298 | return $this->errors; |
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
302 | - * Returns a list of actions taken, and the number of records for that action. |
|
303 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
304 | - * |
|
305 | - * @return Array ( |
|
306 | - * action => record count |
|
307 | - * ) |
|
308 | - */ |
|
302 | + * Returns a list of actions taken, and the number of records for that action. |
|
303 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
304 | + * |
|
305 | + * @return Array ( |
|
306 | + * action => record count |
|
307 | + * ) |
|
308 | + */ |
|
309 | 309 | public function get_results() { |
310 | 310 | return $this->results; |
311 | 311 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | parent::__construct(); |
19 | 19 | |
20 | 20 | // Field mapping |
21 | - $this->export_fields = array( |
|
21 | + $this->export_fields = array( |
|
22 | 22 | 'account_id' => lang('Account ID'), |
23 | 23 | 'account_lid' => lang('Group Name'), |
24 | 24 | 'account_members' => lang('Members'), |
25 | - ); |
|
25 | + ); |
|
26 | 26 | |
27 | 27 | // Custom fields - not really used in admin... |
28 | 28 | unset($this->export_fields['customfields']); |
@@ -18,20 +18,20 @@ |
||
18 | 18 | parent::__construct(); |
19 | 19 | |
20 | 20 | // Field mapping |
21 | - $this->export_fields = array( |
|
21 | + $this->export_fields = array( |
|
22 | 22 | 'account_id' => lang('Account ID'), |
23 | - 'account_lid' => lang('LoginID'), |
|
24 | - 'account_firstname' => lang('First Name'), |
|
25 | - 'account_lastname' => lang('Last Name'), |
|
26 | - 'account_email' => lang('email'), |
|
27 | - 'account_pwd' => lang('Password'), |
|
28 | - 'account_status' => lang('Status'), |
|
29 | - 'account_primary_group' => lang('Primary Group'), |
|
30 | - 'account_groups' => lang('Groups'), |
|
31 | - 'account_expires' => lang('Expires'), |
|
32 | - 'account_lastlogin' => lang('Last login'), |
|
33 | - 'account_lastpwd_change'=> lang('Last password change'), |
|
34 | - ); |
|
23 | + 'account_lid' => lang('LoginID'), |
|
24 | + 'account_firstname' => lang('First Name'), |
|
25 | + 'account_lastname' => lang('Last Name'), |
|
26 | + 'account_email' => lang('email'), |
|
27 | + 'account_pwd' => lang('Password'), |
|
28 | + 'account_status' => lang('Status'), |
|
29 | + 'account_primary_group' => lang('Primary Group'), |
|
30 | + 'account_groups' => lang('Groups'), |
|
31 | + 'account_expires' => lang('Expires'), |
|
32 | + 'account_lastlogin' => lang('Last login'), |
|
33 | + 'account_lastpwd_change'=> lang('Last password change'), |
|
34 | + ); |
|
35 | 35 | |
36 | 36 | // Custom fields - not really used in admin... |
37 | 37 | unset($this->export_fields['customfields']); |
@@ -239,11 +239,11 @@ |
||
239 | 239 | unset($postdata[$name]); |
240 | 240 | } |
241 | 241 | $opts = array('http' => |
242 | - array( |
|
243 | - 'method' => 'POST', |
|
244 | - 'header' => 'Content-type: application/x-www-form-urlencoded', |
|
245 | - 'content' => http_build_query($postdata), |
|
246 | - ) |
|
242 | + array( |
|
243 | + 'method' => 'POST', |
|
244 | + 'header' => 'Content-type: application/x-www-form-urlencoded', |
|
245 | + 'content' => http_build_query($postdata), |
|
246 | + ) |
|
247 | 247 | ); |
248 | 248 | $url = $remote['remote_url'].'/admin/remote.php?domain='.urlencode($remote['remote_domain']).'&secret='.urlencode($secret); |
249 | 249 | //echo "sending command to $url\n"; _debug_array($opts); |
@@ -125,8 +125,8 @@ |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | public static function get_mimetype() { |
128 | - return 'text/csv'; |
|
129 | - } |
|
128 | + return 'text/csv'; |
|
129 | + } |
|
130 | 130 | |
131 | 131 | /** |
132 | 132 | * return html for options. |