@@ -30,14 +30,12 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * Shows the contactform and stores the submitted data |
| 32 | 32 | * |
| 33 | - * @param array $content=null submitted eTemplate content |
|
| 34 | - * @param int $addressbook=null int owner-id of addressbook to save contacts too |
|
| 35 | - * @param array $fields=null field-names to show |
|
| 36 | - * @param string $msg=null message to show after submitting the form |
|
| 37 | - * @param string $email=null comma-separated email addresses |
|
| 38 | - * @param string $tpl_name=null custom etemplate to use |
|
| 39 | - * @param string $subject=null subject for email |
|
| 40 | - * @param string $copytoreceiver=false send a copy of notification to receiver |
|
| 33 | + * @param array $content submitted eTemplate content |
|
| 34 | + * @param int $addressbook int owner-id of addressbook to save contacts too |
|
| 35 | + * @param array $fields field-names to show |
|
| 36 | + * @param string $tpl_name custom etemplate to use |
|
| 37 | + * @param string $subject subject for email |
|
| 38 | + * @param string $copytoreceiver send a copy of notification to receiver |
|
| 41 | 39 | * @return string html content |
| 42 | 40 | */ |
| 43 | 41 | function display(array $content=null,$addressbook=null,$fields=null,$msg=null,$email=null,$tpl_name=null,$subject=null,$copytoreceiver=false,$sel_options=array()) |
@@ -49,13 +47,11 @@ discard block |
||
| 49 | 47 | * Shows the contactform and stores the submitted data ($content is a var parameter, eg. for extending classes) |
| 50 | 48 | * |
| 51 | 49 | * @param array &$content=null submitted eTemplate content |
| 52 | - * @param int $addressbook=null int owner-id of addressbook to save contacts too |
|
| 53 | - * @param array $fields=null field-names to show |
|
| 54 | - * @param string $msg=null message to show after submitting the form |
|
| 55 | - * @param string $email=null comma-separated email addresses |
|
| 56 | - * @param string $tpl_name=null custom etemplate to use |
|
| 57 | - * @param string $subject=null subject for email |
|
| 58 | - * @param string $copytoreceiver=false send a copy of notification to receiver |
|
| 50 | + * @param int $addressbook int owner-id of addressbook to save contacts too |
|
| 51 | + * @param array $fields field-names to show |
|
| 52 | + * @param string $tpl_name custom etemplate to use |
|
| 53 | + * @param string $subject subject for email |
|
| 54 | + * @param string $copytoreceiver send a copy of notification to receiver |
|
| 59 | 55 | * @return string html content |
| 60 | 56 | */ |
| 61 | 57 | function display_var(array &$content=null,$addressbook=null,$fields=null,$msg=null,$email=null,$tpl_name=null,$subject=null,$copytoreceiver=false,$sel_options=array()) |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | /** |
| 37 | 37 | * Exports records as defined in $_definition |
| 38 | 38 | * |
| 39 | - * @param egw_record $_definition |
|
| 39 | + * @param importexport_definition $_definition |
|
| 40 | 40 | */ |
| 41 | 41 | public function export( $_stream, importexport_definition $_definition) { |
| 42 | 42 | |
@@ -365,10 +365,10 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | /** |
| 368 | - * Convert some internal data to something with more meaning |
|
| 369 | - * |
|
| 370 | - * Dates, times, user IDs, category IDs |
|
| 371 | - */ |
|
| 368 | + * Convert some internal data to something with more meaning |
|
| 369 | + * |
|
| 370 | + * Dates, times, user IDs, category IDs |
|
| 371 | + */ |
|
| 372 | 372 | public static function convert(addressbook_egw_record &$record, $options) { |
| 373 | 373 | |
| 374 | 374 | if ($record->tel_prefer) { |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | * Adjust automatically generated filter fields |
| 437 | 437 | */ |
| 438 | 438 | public function get_filter_fields(Array &$filters) |
| 439 | - { |
|
| 439 | + { |
|
| 440 | 440 | unset($filters['last_event']); |
| 441 | 441 | unset($filters['next_event']); |
| 442 | 442 | foreach($filters as $field_name => &$settings) |
@@ -79,8 +79,6 @@ |
||
| 79 | 79 | * Here we need to handle any incoming data. Setup is done in the constructor, |
| 80 | 80 | * output is handled by parent. |
| 81 | 81 | * |
| 82 | - * @param type $id |
|
| 83 | - * @param Etemplate $etemplate |
|
| 84 | 82 | */ |
| 85 | 83 | public static function process($values = array()) |
| 86 | 84 | { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * @param array &$files |
| 107 | 107 | * @param int $user account_id |
| 108 | 108 | * @param string $id ='' |
| 109 | - * @return mixed boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 109 | + * @return boolean boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 110 | 110 | */ |
| 111 | 111 | function propfind($path,&$options,&$files,$user,$id='') |
| 112 | 112 | { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * |
| 189 | 189 | * @param string $path |
| 190 | 190 | * @param array& $filter |
| 191 | - * @param array|boolean $start =false false=return all or array(start,num) |
|
| 191 | + * @param integer[] $start =false false=return all or array(start,num) |
|
| 192 | 192 | * @return array with "files" array with values for keys path and props |
| 193 | 193 | */ |
| 194 | 194 | function &propfind_callback($path,array &$filter,$start=false,$report_not_found_multiget_ids=true) |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | * @param array &$options |
| 540 | 540 | * @param int $id |
| 541 | 541 | * @param int $user =null account_id |
| 542 | - * @return mixed boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 542 | + * @return string|boolean boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 543 | 543 | */ |
| 544 | 544 | function get(&$options,$id,$user=null) |
| 545 | 545 | { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | * @param int $id |
| 567 | 567 | * @param int $user =null account_id of owner, default null |
| 568 | 568 | * @param string $prefix =null user prefix from path (eg. /ralf from /ralf/addressbook) |
| 569 | - * @return mixed boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 569 | + * @return string|boolean boolean true on success, false on failure or string with http status (eg. '404 Not Found') |
|
| 570 | 570 | */ |
| 571 | 571 | function put(&$options,$id,$user=null,$prefix=null) |
| 572 | 572 | { |
@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | * |
| 1025 | 1025 | * @param int $acl Acl::READ, Acl::EDIT or Acl::DELETE |
| 1026 | 1026 | * @param array|int $contact contact-array or id |
| 1027 | - * @return boolean null if entry does not exist, false if no access, true if access permitted |
|
| 1027 | + * @return null|boolean null if entry does not exist, false if no access, true if access permitted |
|
| 1028 | 1028 | */ |
| 1029 | 1029 | function check_access($acl,$contact) |
| 1030 | 1030 | { |
@@ -44,9 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * imports entries according to given definition object. |
| 47 | - * @param resource $_stream |
|
| 48 | - * @param string $_charset |
|
| 49 | - * @param definition $_definition |
|
| 47 | + * @param importexport_definition $_definition |
|
| 50 | 48 | */ |
| 51 | 49 | public function init(importexport_definition &$_definition ) { |
| 52 | 50 | |
@@ -84,7 +82,7 @@ discard block |
||
| 84 | 82 | * |
| 85 | 83 | * Updates the count of actions taken |
| 86 | 84 | * |
| 87 | - * @return boolean success |
|
| 85 | + * @return null|boolean success |
|
| 88 | 86 | */ |
| 89 | 87 | protected function import_record(importexport_iface_egw_record &$record, &$import_csv) |
| 90 | 88 | { |
@@ -381,38 +381,38 @@ |
||
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | /** |
| 384 | - * Returns warnings that were encountered during importing |
|
| 385 | - * Maximum of one warning message per record, but you can append if you need to |
|
| 386 | - * |
|
| 387 | - * @return Array ( |
|
| 388 | - * record_# => warning message |
|
| 389 | - * ) |
|
| 390 | - */ |
|
| 391 | - public function get_warnings() { |
|
| 384 | + * Returns warnings that were encountered during importing |
|
| 385 | + * Maximum of one warning message per record, but you can append if you need to |
|
| 386 | + * |
|
| 387 | + * @return Array ( |
|
| 388 | + * record_# => warning message |
|
| 389 | + * ) |
|
| 390 | + */ |
|
| 391 | + public function get_warnings() { |
|
| 392 | 392 | return $this->warnings; |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | /** |
| 396 | - * Returns errors that were encountered during importing |
|
| 397 | - * Maximum of one error message per record, but you can append if you need to |
|
| 398 | - * |
|
| 399 | - * @return Array ( |
|
| 400 | - * record_# => error message |
|
| 401 | - * ) |
|
| 402 | - */ |
|
| 403 | - public function get_errors() { |
|
| 396 | + * Returns errors that were encountered during importing |
|
| 397 | + * Maximum of one error message per record, but you can append if you need to |
|
| 398 | + * |
|
| 399 | + * @return Array ( |
|
| 400 | + * record_# => error message |
|
| 401 | + * ) |
|
| 402 | + */ |
|
| 403 | + public function get_errors() { |
|
| 404 | 404 | return $this->errors; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | /** |
| 408 | - * Returns a list of actions taken, and the number of records for that action. |
|
| 409 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 410 | - * |
|
| 411 | - * @return Array ( |
|
| 412 | - * action => record count |
|
| 413 | - * ) |
|
| 414 | - */ |
|
| 415 | - public function get_results() { |
|
| 416 | - return $this->results; |
|
| 417 | - } |
|
| 408 | + * Returns a list of actions taken, and the number of records for that action. |
|
| 409 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 410 | + * |
|
| 411 | + * @return Array ( |
|
| 412 | + * action => record count |
|
| 413 | + * ) |
|
| 414 | + */ |
|
| 415 | + public function get_results() { |
|
| 416 | + return $this->results; |
|
| 417 | + } |
|
| 418 | 418 | } |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | /** |
| 84 | 84 | * imports entries according to given definition object. |
| 85 | 85 | * @param resource $_stream |
| 86 | - * @param string $_charset |
|
| 87 | - * @param definition $_definition |
|
| 86 | + * @param importexport_definition $_definition |
|
| 88 | 87 | */ |
| 89 | 88 | public function import( $_stream, importexport_definition $_definition ) { |
| 90 | 89 | $this->definition = $_definition; |
@@ -45,8 +45,8 @@ discard block |
||
| 45 | 45 | private $bocontacts; |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * For figuring out if a contact has changed |
|
| 49 | - */ |
|
| 48 | + * For figuring out if a contact has changed |
|
| 49 | + */ |
|
| 50 | 50 | protected $tracking; |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | protected $errors = array(); |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * List of actions, and how many times that action was taken |
|
| 80 | - */ |
|
| 81 | - protected $results = array(); |
|
| 79 | + * List of actions, and how many times that action was taken |
|
| 80 | + */ |
|
| 81 | + protected $results = array(); |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * imports entries according to given definition object. |
@@ -93,14 +93,14 @@ discard block |
||
| 93 | 93 | $this->is_admin = isset( $GLOBALS['egw_info']['user']['apps']['admin'] ) && $GLOBALS['egw_info']['user']['apps']['admin']; |
| 94 | 94 | $this->user = $GLOBALS['egw_info']['user']['account_id']; |
| 95 | 95 | |
| 96 | - // set contact owner |
|
| 97 | - $contact_owner = isset( $_definition->plugin_options['contact_owner'] ) ? |
|
| 98 | - $_definition->plugin_options['contact_owner'] : $this->user; |
|
| 99 | - // Import into importer's personal addressbook |
|
| 100 | - if($contact_owner == 'personal') |
|
| 101 | - { |
|
| 102 | - $contact_owner = $this->user; |
|
| 103 | - } |
|
| 96 | + // set contact owner |
|
| 97 | + $contact_owner = isset( $_definition->plugin_options['contact_owner'] ) ? |
|
| 98 | + $_definition->plugin_options['contact_owner'] : $this->user; |
|
| 99 | + // Import into importer's personal addressbook |
|
| 100 | + if($contact_owner == 'personal') |
|
| 101 | + { |
|
| 102 | + $contact_owner = $this->user; |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | 105 | // dry run? |
| 106 | 106 | $this->dry_run = isset( $_definition->plugin_options['dry_run'] ) ? $_definition->plugin_options['dry_run'] : false; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $this->errors = array(); |
| 124 | 124 | |
| 125 | 125 | // Fix for Apple Addressbook |
| 126 | - $vCard = preg_replace('/item\d\.(ADR|TEL|EMAIL|URL)/', '\1', stream_get_contents($_stream)); |
|
| 126 | + $vCard = preg_replace('/item\d\.(ADR|TEL|EMAIL|URL)/', '\1', stream_get_contents($_stream)); |
|
| 127 | 127 | |
| 128 | 128 | $contacts = new Api\CalDAV\IcalIterator($vCard, '', $charset, array($this, '_vcard'),array( |
| 129 | 129 | // Owner (addressbook) |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | foreach($this->preview_records as $record) |
| 278 | 278 | { |
| 279 | 279 | // Convert to human-friendly |
| 280 | - importexport_export_csv::convert($record,$record_class::$types,$_definition->application); |
|
| 280 | + importexport_export_csv::convert($record,$record_class::$types,$_definition->application); |
|
| 281 | 281 | $record = $record->get_record_array(); |
| 282 | 282 | $row = array(); |
| 283 | 283 | foreach(array_keys($labels) as $field) |
@@ -350,38 +350,38 @@ discard block |
||
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | - * Returns warnings that were encountered during importing |
|
| 354 | - * Maximum of one warning message per record, but you can append if you need to |
|
| 355 | - * |
|
| 356 | - * @return Array ( |
|
| 357 | - * record_# => warning message |
|
| 358 | - * ) |
|
| 359 | - */ |
|
| 360 | - public function get_warnings() { |
|
| 353 | + * Returns warnings that were encountered during importing |
|
| 354 | + * Maximum of one warning message per record, but you can append if you need to |
|
| 355 | + * |
|
| 356 | + * @return Array ( |
|
| 357 | + * record_# => warning message |
|
| 358 | + * ) |
|
| 359 | + */ |
|
| 360 | + public function get_warnings() { |
|
| 361 | 361 | return $this->warnings; |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | /** |
| 365 | - * Returns errors that were encountered during importing |
|
| 366 | - * Maximum of one error message per record, but you can append if you need to |
|
| 367 | - * |
|
| 368 | - * @return Array ( |
|
| 369 | - * record_# => error message |
|
| 370 | - * ) |
|
| 371 | - */ |
|
| 372 | - public function get_errors() { |
|
| 365 | + * Returns errors that were encountered during importing |
|
| 366 | + * Maximum of one error message per record, but you can append if you need to |
|
| 367 | + * |
|
| 368 | + * @return Array ( |
|
| 369 | + * record_# => error message |
|
| 370 | + * ) |
|
| 371 | + */ |
|
| 372 | + public function get_errors() { |
|
| 373 | 373 | return $this->errors; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
| 377 | - * Returns a list of actions taken, and the number of records for that action. |
|
| 378 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 379 | - * |
|
| 380 | - * @return Array ( |
|
| 381 | - * action => record count |
|
| 382 | - * ) |
|
| 383 | - */ |
|
| 384 | - public function get_results() { |
|
| 385 | - return $this->results; |
|
| 386 | - } |
|
| 377 | + * Returns a list of actions taken, and the number of records for that action. |
|
| 378 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 379 | + * |
|
| 380 | + * @return Array ( |
|
| 381 | + * action => record count |
|
| 382 | + * ) |
|
| 383 | + */ |
|
| 384 | + public function get_results() { |
|
| 385 | + return $this->results; |
|
| 386 | + } |
|
| 387 | 387 | } |
@@ -532,7 +532,6 @@ |
||
| 532 | 532 | /** |
| 533 | 533 | * Read the IMAP ACLs |
| 534 | 534 | * |
| 535 | - * @param array $args admin-account[@domain],admin-password,accout_lid[,pw] |
|
| 536 | 535 | * @return int 0 on success |
| 537 | 536 | */ |
| 538 | 537 | function do_subscribe_other($account_lid,$pw=null) |
@@ -255,11 +255,10 @@ |
||
| 255 | 255 | * |
| 256 | 256 | * @param type $action |
| 257 | 257 | * @param type $checked |
| 258 | - * @param type $use_all |
|
| 259 | 258 | * @param type $success |
| 260 | 259 | * @param int $failed |
| 261 | 260 | * @param type $action_msg |
| 262 | - * @return type number of failed |
|
| 261 | + * @return boolean number of failed |
|
| 263 | 262 | */ |
| 264 | 263 | function action($action,$checked,&$success,&$failed,&$action_msg) |
| 265 | 264 | { |
@@ -679,6 +679,8 @@ |
||
| 679 | 679 | * @param int &$failed number of failed actions (not enought permissions) |
| 680 | 680 | * @param string &$action_msg translated verb for the actions, to be used in a message like '%1 entries deleted' |
| 681 | 681 | * @param array $query get_rows parameter |
| 682 | + * @param integer $success |
|
| 683 | + * @param integer $failed |
|
| 682 | 684 | * @return boolean true if all actions succeded, false otherwise |
| 683 | 685 | */ |
| 684 | 686 | function action($_action, $checked, $use_all, &$success, &$failed, &$action_msg, array $query) |