@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Egroupware |
|
| 4 | - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License |
|
| 5 | - * @link http://www.egroupware.org |
|
| 6 | - * @author Nathan Gray |
|
| 7 | - * @version $Id$ |
|
| 8 | - */ |
|
| 3 | + * Egroupware |
|
| 4 | + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License |
|
| 5 | + * @link http://www.egroupware.org |
|
| 6 | + * @author Nathan Gray |
|
| 7 | + * @version $Id$ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | use EGroupware\Api; |
| 11 | 11 | use EGroupware\Api\Etemplate; |
@@ -22,13 +22,13 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * Set up what we know on the server side. |
|
| 26 | - * |
|
| 27 | - * Sending a first chunk of rows |
|
| 28 | - * |
|
| 29 | - * @param string $cname |
|
| 30 | - * @param array $expand values for keys 'c', 'row', 'c_', 'row_', 'cont' |
|
| 31 | - */ |
|
| 25 | + * Set up what we know on the server side. |
|
| 26 | + * |
|
| 27 | + * Sending a first chunk of rows |
|
| 28 | + * |
|
| 29 | + * @param string $cname |
|
| 30 | + * @param array $expand values for keys 'c', 'row', 'c_', 'row_', 'cont' |
|
| 31 | + */ |
|
| 32 | 32 | public function beforeSendToClient($cname, array $expand=null) |
| 33 | 33 | { |
| 34 | 34 | $form_name = self::form_name($cname, $this->id, $expand); |
@@ -326,20 +326,20 @@ discard block |
||
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
| 329 | - * Table plugin for event |
|
| 330 | - * Lists events for a certain day of the week. Only works for one week at a time, so for multiple weeks, |
|
| 331 | - * use multiple date ranges. |
|
| 332 | - * |
|
| 333 | - * Use: |
|
| 334 | - * $$table/Monday$$ $$starttime$$ $$title$$ $$endtable$$ |
|
| 335 | - * The day of the week may be language specific (date('l')). |
|
| 336 | - * |
|
| 337 | - * @param string $plugin (Monday-Sunday) |
|
| 338 | - * @param int/array date or date range |
|
| 339 | - * @param int $n Row number |
|
| 340 | - * @param string $repeat Text being repeated for each entry |
|
| 341 | - * @return array |
|
| 342 | - */ |
|
| 329 | + * Table plugin for event |
|
| 330 | + * Lists events for a certain day of the week. Only works for one week at a time, so for multiple weeks, |
|
| 331 | + * use multiple date ranges. |
|
| 332 | + * |
|
| 333 | + * Use: |
|
| 334 | + * $$table/Monday$$ $$starttime$$ $$title$$ $$endtable$$ |
|
| 335 | + * The day of the week may be language specific (date('l')). |
|
| 336 | + * |
|
| 337 | + * @param string $plugin (Monday-Sunday) |
|
| 338 | + * @param int/array date or date range |
|
| 339 | + * @param int $n Row number |
|
| 340 | + * @param string $repeat Text being repeated for each entry |
|
| 341 | + * @return array |
|
| 342 | + */ |
|
| 343 | 343 | public function day_plugin($plugin,$date,$n,$repeat) |
| 344 | 344 | { |
| 345 | 345 | static $days = null; |
@@ -414,16 +414,16 @@ discard block |
||
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | /** |
| 417 | - * Table plugin for a certain date |
|
| 418 | - * |
|
| 419 | - * Can be either a particular date (2011-02-15) or a day of the month (15) |
|
| 420 | - * |
|
| 421 | - * @param string $plugin |
|
| 422 | - * @param int $id ID for this record |
|
| 423 | - * @param int $n Repeated row number |
|
| 424 | - * @param string $repeat Text being repeated for each entry |
|
| 425 | - * @return array |
|
| 426 | - */ |
|
| 417 | + * Table plugin for a certain date |
|
| 418 | + * |
|
| 419 | + * Can be either a particular date (2011-02-15) or a day of the month (15) |
|
| 420 | + * |
|
| 421 | + * @param string $plugin |
|
| 422 | + * @param int $id ID for this record |
|
| 423 | + * @param int $n Repeated row number |
|
| 424 | + * @param string $repeat Text being repeated for each entry |
|
| 425 | + * @return array |
|
| 426 | + */ |
|
| 427 | 427 | public function day($plugin,$id,$n,$repeat) |
| 428 | 428 | { |
| 429 | 429 | static $days = null; |
@@ -515,15 +515,15 @@ discard block |
||
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | /** |
| 518 | - * Table plugin for participants |
|
| 519 | - * |
|
| 520 | - * Copied from eventmgr resources |
|
| 521 | - * |
|
| 522 | - * @param string $plugin |
|
| 523 | - * @param int $id |
|
| 524 | - * @param int $n |
|
| 525 | - * @return array |
|
| 526 | - */ |
|
| 518 | + * Table plugin for participants |
|
| 519 | + * |
|
| 520 | + * Copied from eventmgr resources |
|
| 521 | + * |
|
| 522 | + * @param string $plugin |
|
| 523 | + * @param int $id |
|
| 524 | + * @param int $n |
|
| 525 | + * @return array |
|
| 526 | + */ |
|
| 527 | 527 | public function participant($plugin,$id,$n) |
| 528 | 528 | { |
| 529 | 529 | unset($plugin); // not used, but required by function signature |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | { |
| 583 | 583 | foreach($resource as $name => $value) |
| 584 | 584 | { |
| 585 | - $replacements['$$'.$name.'$$'] = $value; |
|
| 585 | + $replacements['$$'.$name.'$$'] = $value; |
|
| 586 | 586 | } |
| 587 | 587 | } |
| 588 | 588 | break; |
@@ -323,17 +323,17 @@ |
||
| 323 | 323 | $days = $states['days']; |
| 324 | 324 | $ui = new calendar_uiviews($states); |
| 325 | 325 | if (!$days) |
| 326 | - { |
|
| 327 | - $days = isset($_GET['days']) ? $_GET['days'] : $ui->cal_prefs['days_in_weekview']; |
|
| 328 | - if ($days != 5) $days = 7; |
|
| 329 | - } |
|
| 326 | + { |
|
| 327 | + $days = isset($_GET['days']) ? $_GET['days'] : $ui->cal_prefs['days_in_weekview']; |
|
| 328 | + if ($days != 5) $days = 7; |
|
| 329 | + } |
|
| 330 | 330 | if ($states['view'] == 'week' && $days == 4) // next 4 days view |
| 331 | - { |
|
| 332 | - $query['start'] = $this->bo->date2ts($states['date']); |
|
| 333 | - $query['end'] = strtotime("+$days days",$query['start']) - 1; |
|
| 334 | - } |
|
| 335 | - else |
|
| 336 | - { |
|
| 331 | + { |
|
| 332 | + $query['start'] = $this->bo->date2ts($states['date']); |
|
| 333 | + $query['end'] = strtotime("+$days days",$query['start']) - 1; |
|
| 334 | + } |
|
| 335 | + else |
|
| 336 | + { |
|
| 337 | 337 | $query['start'] = $ui->datetime->get_weekday_start($states['year'],$states['month'],$states['day']); |
| 338 | 338 | if ($days == 5) // no weekend-days |
| 339 | 339 | { |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | private $bo; |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * For figuring out if an entry has changed |
|
| 68 | - */ |
|
| 67 | + * For figuring out if an entry has changed |
|
| 68 | + */ |
|
| 69 | 69 | protected $tracking; |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | protected $errors = array(); |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * List of actions, and how many times that action was taken |
|
| 98 | - */ |
|
| 99 | - protected $results = array(); |
|
| 97 | + * List of actions, and how many times that action was taken |
|
| 98 | + */ |
|
| 99 | + protected $results = array(); |
|
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * imports entries according to given definition object. |
@@ -202,38 +202,38 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | /** |
| 205 | - * Returns warnings that were encountered during importing |
|
| 206 | - * Maximum of one warning message per record, but you can append if you need to |
|
| 207 | - * |
|
| 208 | - * @return Array ( |
|
| 209 | - * record_# => warning message |
|
| 210 | - * ) |
|
| 211 | - */ |
|
| 212 | - public function get_warnings() { |
|
| 205 | + * Returns warnings that were encountered during importing |
|
| 206 | + * Maximum of one warning message per record, but you can append if you need to |
|
| 207 | + * |
|
| 208 | + * @return Array ( |
|
| 209 | + * record_# => warning message |
|
| 210 | + * ) |
|
| 211 | + */ |
|
| 212 | + public function get_warnings() { |
|
| 213 | 213 | return $this->warnings; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
| 217 | - * Returns errors that were encountered during importing |
|
| 218 | - * Maximum of one error message per record, but you can append if you need to |
|
| 219 | - * |
|
| 220 | - * @return Array ( |
|
| 221 | - * record_# => error message |
|
| 222 | - * ) |
|
| 223 | - */ |
|
| 224 | - public function get_errors() { |
|
| 217 | + * Returns errors that were encountered during importing |
|
| 218 | + * Maximum of one error message per record, but you can append if you need to |
|
| 219 | + * |
|
| 220 | + * @return Array ( |
|
| 221 | + * record_# => error message |
|
| 222 | + * ) |
|
| 223 | + */ |
|
| 224 | + public function get_errors() { |
|
| 225 | 225 | return $this->errors; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
| 229 | - * Returns a list of actions taken, and the number of records for that action. |
|
| 230 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 231 | - * |
|
| 232 | - * @return Array ( |
|
| 233 | - * action => record count |
|
| 234 | - * ) |
|
| 235 | - */ |
|
| 236 | - public function get_results() { |
|
| 237 | - return $this->results; |
|
| 238 | - } |
|
| 229 | + * Returns a list of actions taken, and the number of records for that action. |
|
| 230 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 231 | + * |
|
| 232 | + * @return Array ( |
|
| 233 | + * action => record count |
|
| 234 | + * ) |
|
| 235 | + */ |
|
| 236 | + public function get_results() { |
|
| 237 | + return $this->results; |
|
| 238 | + } |
|
| 239 | 239 | } |
| 240 | 240 | \ No newline at end of file |
@@ -132,10 +132,10 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | - * Do some magic with the participants and recurrance. |
|
| 136 | - * If this is one of a recurring event, append the recur_date to the participant field so we can |
|
| 137 | - * filter by it later. |
|
| 138 | - */ |
|
| 135 | + * Do some magic with the participants and recurrance. |
|
| 136 | + * If this is one of a recurring event, append the recur_date to the participant field so we can |
|
| 137 | + * filter by it later. |
|
| 138 | + */ |
|
| 139 | 139 | if(is_array($data['participants'])) |
| 140 | 140 | { |
| 141 | 141 | $participants = $data['participants']; |
@@ -195,10 +195,10 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | /** |
| 198 | - * Do some magic with the participants and recurrance. |
|
| 199 | - * If this is one of a recurring event, append the recur_date to the participant field so we can |
|
| 200 | - * filter by it later. |
|
| 201 | - */ |
|
| 198 | + * Do some magic with the participants and recurrance. |
|
| 199 | + * If this is one of a recurring event, append the recur_date to the participant field so we can |
|
| 200 | + * filter by it later. |
|
| 201 | + */ |
|
| 202 | 202 | protected function alter_participants($participants) |
| 203 | 203 | { |
| 204 | 204 | $data = array(); |
@@ -1528,7 +1528,7 @@ |
||
| 1528 | 1528 | if (!$set_recurrences) |
| 1529 | 1529 | { |
| 1530 | 1530 | $set_recurrences = (isset($event['cal_start']) && (int)$old_min != (int) $event['cal_start']) || |
| 1531 | - $event['recur_type'] != $old_repeats['recur_type'] || $event['recur_data'] != $old_repeats['recur_data'] || |
|
| 1531 | + $event['recur_type'] != $old_repeats['recur_type'] || $event['recur_data'] != $old_repeats['recur_data'] || |
|
| 1532 | 1532 | (int)$event['recur_interval'] != (int)$old_repeats['recur_interval'] || $event['tz_id'] != $old_tz_id; |
| 1533 | 1533 | } |
| 1534 | 1534 | |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | private $user = null; |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * List of import errors |
|
| 86 | - */ |
|
| 87 | - protected $errors = array(); |
|
| 85 | + * List of import errors |
|
| 86 | + */ |
|
| 87 | + protected $errors = array(); |
|
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | 90 | * List of actions, and how many times that action was taken |
@@ -305,26 +305,26 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | /** |
| 308 | - * Returns errors that were encountered during importing |
|
| 309 | - * Maximum of one error message per record, but you can append if you need to |
|
| 310 | - * |
|
| 311 | - * @return Array ( |
|
| 312 | - * record_# => error message |
|
| 313 | - * ) |
|
| 314 | - */ |
|
| 315 | - public function get_errors() { |
|
| 308 | + * Returns errors that were encountered during importing |
|
| 309 | + * Maximum of one error message per record, but you can append if you need to |
|
| 310 | + * |
|
| 311 | + * @return Array ( |
|
| 312 | + * record_# => error message |
|
| 313 | + * ) |
|
| 314 | + */ |
|
| 315 | + public function get_errors() { |
|
| 316 | 316 | return $this->errors; |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | - * Returns a list of actions taken, and the number of records for that action. |
|
| 321 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 322 | - * |
|
| 323 | - * @return Array ( |
|
| 324 | - * action => record count |
|
| 325 | - * ) |
|
| 326 | - */ |
|
| 327 | - public function get_results() { |
|
| 320 | + * Returns a list of actions taken, and the number of records for that action. |
|
| 321 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 322 | + * |
|
| 323 | + * @return Array ( |
|
| 324 | + * action => record count |
|
| 325 | + * ) |
|
| 326 | + */ |
|
| 327 | + public function get_results() { |
|
| 328 | 328 | return $this->results; |
| 329 | 329 | } |
| 330 | 330 | } // end of iface_export_plugin |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * |
| 44 | 44 | * @param string $extra_vars for login url |
| 45 | 45 | * @param string $change_passwd =null string with message to render input fields for password change |
| 46 | - */ |
|
| 46 | + */ |
|
| 47 | 47 | function screen($extra_vars, $change_passwd=null) |
| 48 | 48 | { |
| 49 | 49 | Api\Header\ContentSecurityPolicy::add('frame-src', array()); // array() no external frame-sources |
@@ -226,8 +226,8 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
| 229 | - * displays a login denied message |
|
| 230 | - */ |
|
| 229 | + * displays a login denied message |
|
| 230 | + */ |
|
| 231 | 231 | function denylogin_screen() |
| 232 | 232 | { |
| 233 | 233 | try { |
@@ -337,16 +337,16 @@ discard block |
||
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | /** |
| 340 | - * called by hooks to add an icon in the topmenu info location |
|
| 341 | - * |
|
| 342 | - * @param string $id unique element id |
|
| 343 | - * @param string $icon_src src of the icon image. Make sure this nog height then 18pixels |
|
| 344 | - * @param string $iconlink where the icon links to |
|
| 345 | - * @param booleon $blink set true to make the icon blink |
|
| 346 | - * @param mixed $tooltip string containing the tooltip Api\Html, or null of no tooltip |
|
| 347 | - * @todo implement in a reasonable way for jdots |
|
| 348 | - * @return void |
|
| 349 | - */ |
|
| 340 | + * called by hooks to add an icon in the topmenu info location |
|
| 341 | + * |
|
| 342 | + * @param string $id unique element id |
|
| 343 | + * @param string $icon_src src of the icon image. Make sure this nog height then 18pixels |
|
| 344 | + * @param string $iconlink where the icon links to |
|
| 345 | + * @param booleon $blink set true to make the icon blink |
|
| 346 | + * @param mixed $tooltip string containing the tooltip Api\Html, or null of no tooltip |
|
| 347 | + * @todo implement in a reasonable way for jdots |
|
| 348 | + * @return void |
|
| 349 | + */ |
|
| 350 | 350 | function topmenu_info_icon($id,$icon_src,$iconlink,$blink=false,$tooltip=null) |
| 351 | 351 | { |
| 352 | 352 | unset($id,$icon_src,$iconlink,$blink,$tooltip); // not used |
@@ -354,14 +354,14 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | /** |
| 357 | - * Add menu items to the topmenu template class to be displayed |
|
| 358 | - * |
|
| 359 | - * @param array $app application data |
|
| 360 | - * @param mixed $alt_label string with alternative menu item label default value = null |
|
| 361 | - * @param string $urlextra string with alternate additional code inside <a>-tag |
|
| 362 | - * @access protected |
|
| 363 | - * @return void |
|
| 364 | - */ |
|
| 357 | + * Add menu items to the topmenu template class to be displayed |
|
| 358 | + * |
|
| 359 | + * @param array $app application data |
|
| 360 | + * @param mixed $alt_label string with alternative menu item label default value = null |
|
| 361 | + * @param string $urlextra string with alternate additional code inside <a>-tag |
|
| 362 | + * @access protected |
|
| 363 | + * @return void |
|
| 364 | + */ |
|
| 365 | 365 | function _add_topmenu_item(array $app_data,$alt_label=null) |
| 366 | 366 | { |
| 367 | 367 | switch($app_data['name']) |