diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 63848372044..880e696354d 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -48,7 +48,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c523df85326..9f1fe74d0ea 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -87,7 +87,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 67d8be1b38a..5a417cef7a9 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -104,7 +104,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 41c88e00c4f..68e8b5c94ef 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -90,7 +90,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 514edeb4528..bed71d9d27b 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -64,7 +64,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index fdce681f7ef..6d6c875cf85 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -68,7 +68,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 3f7b4ecdeb5..7cae93566c6 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -70,7 +70,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index 621683ea4cb..a2e9d362aad 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -90,7 +90,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index b393c0f54ce..bc7393c4bbd 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -48,7 +48,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index d6df336d979..8fdff8628d2 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -45,7 +45,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->bind->write)) { +if (!$user->hasRight('accounting', 'bind', 'write')) { accessforbidden(); } @@ -82,7 +82,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 06fd0369f03..cd3269431ad 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -97,7 +97,7 @@ if (!isModEnabled('accounting')) { if ($user->socid > 0) { accessforbidden(); } -if (empty($user->rights->accounting->mouvements->lire)) { +if (!$user->hasRight('accounting', 'mouvements', 'lire')) { accessforbidden(); } diff --git a/htdocs/adherents/admin/member_emails.php b/htdocs/adherents/admin/member_emails.php index 2bfd3a1d630..cc7b60f6233 100644 --- a/htdocs/adherents/admin/member_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -56,16 +56,16 @@ $helptext .= '__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL_ // Editing global variables not related to a specific theme $constantes = array( 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))), - 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member'), - 'ADHERENT_MAIL_FROM' =>array('type'=>'string'), - 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string'), - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string'), - 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext) + 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member','label'=>''), + 'ADHERENT_MAIL_FROM' =>array('type'=>'string','label'=>''), + 'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string','label'=>''), + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string','label'=>''), + 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext,'label'=>'') ); diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index c5a4d1a3463..919a32b4c0e 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -410,7 +410,7 @@ foreach ($dirmodels as $reldir) { // Defaut print ''; - if ($conf->global->CONTRACT_ADDON_PDF == $name) { + if (getDolGlobalString('CONTRACT_ADDON_PDF') == $name) { print 'scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4cefb9630c5..5d4631cb362 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -605,7 +605,9 @@ foreach ($tabcomplete as $key => $value) { $keytable = ''; if ($id > 0) { $arrayofkeys = array_keys($tabcomplete); - $keytable = $arrayofkeys[$id - 1]; + if (array_key_exists($id -1, $arrayofkeys)) { + $keytable = $arrayofkeys[$id - 1]; + } } // Defaut sortorder @@ -2238,7 +2240,9 @@ if ($id > 0) { $valuetoshow = $obj->{$value}." ".img_picto("", $obj->{$value}); } elseif ($value == 'type_duration') { $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes')); - $valuetoshow =$TDurationTypes[$obj->{$value}]; + if (!empty($obj->{$value}) && array_key_exists($obj->{$value}, $TDurationTypes)) { + $valuetoshow = $TDurationTypes[$obj->{$value}]; + } } $class .= ($class ? ' ' : '').'tddict'; if ($value == 'note' && $id == 10) { @@ -2428,12 +2432,12 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $withentity = ''; foreach ($fieldlist as $field => $value) { - if ($value == 'entity') { + if ($value == 'entity' && isset($obj->$value)) { $withentity = $obj->$value; continue; } - if (in_array($value, array('code', 'libelle', 'type')) && $tabname == "c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) { + if (in_array($value, array('code', 'libelle', 'type')) && $tabname == "c_actioncomm" && isset($obj->$value) && in_array($obj->type, array('system', 'systemauto'))) { $hidden = (!empty($obj->{$value}) ? $obj->{$value}:''); print ''; print ''; @@ -2530,10 +2534,12 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') // Special case for labels if ($tabname == 'c_payment_term') { $langs->load("bills"); - $transkey = "PaymentCondition".strtoupper($obj->code); - if ($langs->trans($transkey) != $transkey) { - $transfound = 1; - print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); + if (isset($obj->code) && !empty($obj->code)) { + $transkey = "PaymentCondition" . strtoupper($obj->code); + if ($langs->trans($transkey) != $transkey) { + $transfound = 1; + print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); + } } } if (!$transfound) { diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php index 0d10602b1c4..2ffb966828b 100644 --- a/htdocs/admin/eventorganization.php +++ b/htdocs/admin/eventorganization.php @@ -230,7 +230,7 @@ if ($action == 'edit') { print "\n"; } elseif ($val['type']== 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, getDolGlobalString($constname), 1); diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 1ad9cc67e7d..968fdea81af 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -221,7 +221,7 @@ if ($action != 'edit') { echo '' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . ''; echo '' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . ''; echo '' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0) . ''; - echo '' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . ''; echo ''; echo '' . $form->selectyesno('restrictive', 0, 1) . ''; echo ''; diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 679ee078f47..e02f28c91b6 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -171,7 +171,7 @@ print ''; print ''; print $langs->trans("ActivateCheckReadKey").''; -print ''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index a9c0071078d..ba9ab75bc7c 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -49,7 +49,7 @@ if ($action == 'test' || ($action == 'send' && $trackid = 'test')) { $substitutionarrayfortest = array( '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, - '__CHECK_READ__' => '', + '__CHECK_READ__' => '', '__USER_LOGIN__' => $user->login, '__USER_EMAIL__' => $user->email, '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 062aac55962..82d05113b8b 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -42,7 +42,7 @@ if ($action == 'test' || $action == 'send') { $substitutionarrayfortest = array( '__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT, - '__CHECK_READ__' => '', + '__CHECK_READ__' => '', '__USER_LOGIN__' => $user->login, '__USER_EMAIL__' => $user->email, '__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 6b7e40ce84a..8469814f919 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -236,7 +236,7 @@ if (isModEnabled('agenda')) { if (isModEnabled('eventorganization') && !empty($user->rights->eventorganization->read)) { $elementList['conferenceorbooth'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization')); } -if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) { +if (isModEnabled('partnership') && !empty($user->rights->partnership->read)) { $elementList['partnership_send'] = img_picto('', 'partnership', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToPartnership')); } diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index cc564fdc5d4..7a64b89bccb 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -539,14 +539,14 @@ print '
'; print '
'; print load_fiche_titre($langs->trans("API"), '', 'folder'); -if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) { +if (!isModEnabled('api') && !isModEnabled('webservices')) { print $langs->trans("APIsAreNotEnabled"); } else { - if (!empty($conf->webservices->enabled)) { + if (isModEnabled('webservices')) { print $langs->trans('YouEnableDeprecatedWSAPIsUseRESTAPIsInstead')."
\n"; print '
'; } - if (!empty($conf->api->enabled)) { + if (isModEnabled('api')) { print 'API_ENDPOINT_RULES = '.getDolGlobalString('API_ENDPOINT_RULES', ''.$langs->trans("Undefined").'   ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)')."
\n"; print '
'; } diff --git a/htdocs/admin/webhook.php b/htdocs/admin/webhook.php index 8c109a042b6..00a3c85f8c7 100644 --- a/htdocs/admin/webhook.php +++ b/htdocs/admin/webhook.php @@ -226,7 +226,7 @@ if ($action == 'edit') { print "\n"; } elseif ($val['type']== 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, getDolGlobalString($constname), 1); diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 4d0a553d1e6..7b5704b3d7a 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -477,7 +477,7 @@ if ($action == 'edit') { print "\n"; } elseif ($val['type']== 'html') { require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); } elseif ($val['type'] == 'yesno') { print $form->selectyesno($constname, getDolGlobalString($constname), 1); diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index caacc986cc5..b21d0a1c27c 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -166,7 +166,7 @@ print ''; print ''.$langs->trans("Description").''; print ''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -$doleditor = new DolEditor('description', $object->description, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, ROWS_6, '90%'); +$doleditor = new DolEditor('description', $object->description, '', 200, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), ROWS_6, '90%'); $doleditor->Create(); print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 158cfc3aef0..5d9995bfaba 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -2016,7 +2016,7 @@ if ($id > 0) { print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', $object->note_private, '', 120, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); + $doleditor = new DolEditor('note', $object->note_private, '', 120, 'dolibarr_notes', 'In', true, true, isModEnabled('fckeditor'), ROWS_4, '90%'); $doleditor->Create(); print ''; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index e9013aa2f6b..aaa946fd2fe 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -257,9 +257,9 @@ if (empty($reshook)) { $substitutionarray['__OTHER5__'] = $other5; $substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter) $substitutionarray['__SENDEREMAIL_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter) - $substitutionarray['__CHECK_READ__'] = ''; - $substitutionarray['__UNSUBSCRIBE__'] = ''.$langs->trans("MailUnsubcribe").''; - $substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY.'-'.$obj->tag.'-'.$obj->email.'-'.$obj->rowid, "md5").'&email='.urlencode($obj->email).'&mtid='.((int) $obj->rowid); + $substitutionarray['__CHECK_READ__'] = ''; + $substitutionarray['__UNSUBSCRIBE__'] = ''.$langs->trans("MailUnsubcribe").''; + $substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.urlencode($obj->tag).'&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY').'-'.$obj->tag.'-'.$obj->email.'-'.$obj->rowid, "md5").'&email='.urlencode($obj->email).'&mtid='.((int) $obj->rowid); $onlinepaymentenabled = 0; if (isModEnabled('paypal')) { @@ -489,9 +489,9 @@ if (empty($reshook)) { // other are set at begin of page $substitutionarray['__EMAIL__'] = $object->sendto; $substitutionarray['__MAILTOEMAIL__'] = ''.$object->sendto.''; - $substitutionarray['__CHECK_READ__'] = 'sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>'; - $substitutionarray['__UNSUBSCRIBE__'] = 'sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").''; - $substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0'; + $substitutionarray['__CHECK_READ__'] = 'sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>'; + $substitutionarray['__UNSUBSCRIBE__'] = 'sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").''; + $substitutionarray['__UNSUBSCRIBE_URL__'] = DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag=undefinedintestmode&unsuscrib=1&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0'; // Subject and message substitutions complete_substitutions_array($substitutionarray, $langs, $targetobject); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 5702c078aca..d86c7349aa1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -6170,6 +6170,8 @@ class FactureLigne extends CommonInvoiceLine $this->multicurrency_total_tva = $objp->multicurrency_total_tva; $this->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $this->fetch_optionals(); + $this->db->free($result); return 1; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 1828c5d053b..a8675ceb018 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -360,7 +360,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Invoice with Paypal transaction // TODO add hook here - if (!empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_ext)) { + if (isModEnabled('paypalplus') && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_ext)) { if (!empty($conf->global->PAYPAL_BANK_ACCOUNT)) { $accountid = $conf->global->PAYPAL_BANK_ACCOUNT; } diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index da7f2f43740..22510525a64 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -475,7 +475,7 @@ if (!$error && $massaction == 'confirm_presend') { $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ', array_keys($listofqualifiedobj)) : $objecttmp->id); $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ', $listofqualifiedref) : $objecttmp->ref); $substitutionarray['__EMAIL__'] = $thirdparty->email; - $substitutionarray['__CHECK_READ__'] = ''; + $substitutionarray['__CHECK_READ__'] = ''; $parameters = array('mode'=>'formemail'); diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 624fe5766d2..21427edba07 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -346,7 +346,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); $substitutionarray['__EMAIL__'] = $sendto; - $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; + $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; $parameters = array('mode'=>'formemail'); complete_substitutions_array($substitutionarray, $langs, $object, $parameters); diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index bb63c1dd927..973db087e06 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -90,7 +90,7 @@ class DolEditor $this->readonly = $readonly; // Check if extended editor is ok. If not we force textarea - if ((empty($conf->fckeditor->enabled) && $okforextendededitor != 'ace') || empty($okforextendededitor)) { + if ((!isModEnabled('fckeditor') && $okforextendededitor != 'ace') || empty($okforextendededitor)) { $this->tool = 'textarea'; } if ($okforextendededitor === 'ace') { diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index a3908df0adb..0b56169cf33 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -900,7 +900,7 @@ class FormSetupItem { global $conf; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; - $doleditor = new DolEditor($this->confKey, $this->fieldValue, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor($this->confKey, $this->fieldValue, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); return $doleditor->Create(1); } diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index d069bb0da23..56b02b41676 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -70,9 +70,9 @@ class Interfaces // phpcs:enable // Check parameters if (!is_object($object) || !is_object($conf)) { // Error - $this->error = 'function run_triggers called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf); - dol_syslog(get_class($this).'::run_triggers '.$this->error, LOG_ERR); - $this->errors[] = $this->error; + $error = 'function run_triggers called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf); + dol_syslog(get_class($this).'::run_triggers '.$error, LOG_ERR); + $this->errors[] = $error; return -1; } if (!is_object($langs)) { // Warning diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 0bb532e33c4..e2694520577 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -260,14 +260,16 @@ class vCard * Add a e-mail address to this vCard * * @param string $address E-mail address - * @param string $type (optional) The type of the e-mail (typical "PREF;INTERNET" or "INTERNET") + * @param string $type (optional) The type of the e-mail (typical "PREF" or "INTERNET") * @return void */ public function setEmail($address, $type = "") { $key = "EMAIL"; - if ($type != "") { - $key .= ";".$type; + if ($type == "PREF") { + $key .= ";PREF=1"; + } elseif (!empty($type)) { + $key .= ";TYPE=".dol_strtolower($type); } $this->properties[$key] = $address; } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 283daac5d96..247f06a90d1 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -2166,9 +2166,9 @@ function get_left_menu_mrp($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = if (isModEnabled('mrp')) { $langs->load("mrp"); - $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mo', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); - $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, 'mo'); - $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mo'); + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); + $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); } } } diff --git a/htdocs/core/modules/member/modules_member.class.php b/htdocs/core/modules/member/modules_member.class.php index 77ab5621915..41fbbacf2b3 100644 --- a/htdocs/core/modules/member/modules_member.class.php +++ b/htdocs/core/modules/member/modules_member.class.php @@ -67,6 +67,15 @@ abstract class ModelePDFMember extends CommonDocGenerator */ abstract class ModeleNumRefMembers { + + public $code_modifiable; // Editable code + + public $code_modifiable_invalide; // Modified code if it is invalid + + public $code_modifiable_null; // Modified code if it is null + + public $code_null; // + /** * @var string Error code (or message) */ diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index 356f043cea0..7c0929891a8 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -91,7 +91,7 @@ class modDav extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("admin"); - $this->phpmin = array(7, 0); // Minimum version of PHP required by module + $this->phpmin = array(7, 1); // Minimum version of PHP required by module $this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 286dcd59cb2..8c1f571aa0c 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -677,10 +677,10 @@ class pdf_squille extends ModelePdfReception if ($totalVolume != '') { $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs, -1, 'no', 1); } - if ($object->trueWeight) { + if (isset($object->trueWeight) && !empty($object->trueWeight)) { $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs, -1, 'no', 1); } - if ($object->trueVolume) { + if (isset($object->trueVolume) && !empty($object->trueVolume)) { $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs, -1, 'no', 1); } @@ -946,7 +946,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetFont('', '', $default_font_size - 2); $text = $linkedobject->ref; - if ($linkedobject->ref_client) { + if (isset($linkedobject->ref_client) && !empty($linkedobject->ref_client)) { $text .= ' ('.$linkedobject->ref_client.')'; } $Yoff = $Yoff + 8; diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index ed6f9c0fbfb..0c812cc7609 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -269,7 +269,7 @@ if ($action == 'presend') { if (is_object($object) && is_object($object->thirdparty)) { $checkRead= 'global->MAILING_EMAIL_UNSUBSCRIBE_KEY)?urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY):""); + $checkRead.='&securitykey='.(!empty(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY'))?urlencode(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')):""); $checkRead.='" width="1" height="1" style="width:1px;height:1px" border="0"/>'; $substitutionarray['__CHECK_READ__'] = $checkRead; } diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 2b4eff09aa6..92bf4919255 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -282,7 +282,7 @@ if ($massaction == 'presend') { $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); $substitutionarray['__EMAIL__'] = $sendto; - $substitutionarray['__CHECK_READ__'] = ''; + $substitutionarray['__CHECK_READ__'] = ''; $substitutionarray['__PERSONALIZED__'] = ''; // deprecated $substitutionarray['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php index 055cff0352e..5707b3474ef 100644 --- a/htdocs/expedition/dispatch.php +++ b/htdocs/expedition/dispatch.php @@ -382,7 +382,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 132c4d036b4..e043b4556f3 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3616,7 +3616,7 @@ class CommandeFournisseur extends CommonOrder } $sql .= ' cfd.fk_commandefourndet = cd.rowid'; $sql .= ' AND cd.fk_commande ='.((int) $this->id); - if ($this->fk_product > 0) { + if (isset($this->fk_product) && !empty($this->fk_product) > 0) { $sql .= ' AND cd.fk_product = '.((int) $this->fk_product); } if ($filtre_statut >= 0) { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 4f49d0166e5..dce1b8c63b5 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -723,7 +723,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; print price($sign * $remaintopay); - if (!empty($conf->paymentbybanktransfer->enabled)) { + if (isModEnabled('paymentbybanktransfer')) { $numdirectdebitopen = 0; $totaldirectdebit = 0; $sql = "SELECT COUNT(pfd.rowid) as nb, SUM(pfd.amount) as amount"; diff --git a/htdocs/includes/sabre/sabre/dav/.gitignore b/htdocs/includes/sabre/sabre/dav/.gitignore deleted file mode 100644 index 499f7b689c2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# Unit tests -tests/temp -tests/.sabredav -tests/cov - -# Custom settings for tests -tests/config.user.php - -# ViM -*.swp - -# Composer -composer.lock -vendor - -# Composer binaries -bin/phing -bin/phpunit -bin/vobject -bin/generate_vcards -bin/phpdocmd -bin/phpunit -bin/php-cs-fixer -bin/sabre-cs-fixer - -# Assuming every .php file in the root is for testing -/*.php - -# Other testing stuff -/tmpdata -/data -/public - -# Build -build -build.properties - -# Docs -docs/api -docs/wikidocs - -# Mac -.DS_Store - -.php_cs.cache diff --git a/htdocs/includes/sabre/sabre/dav/.php_cs.dist b/htdocs/includes/sabre/sabre/dav/.php_cs.dist index 8d61ee25924..c5c78a971df 100644 --- a/htdocs/includes/sabre/sabre/dav/.php_cs.dist +++ b/htdocs/includes/sabre/sabre/dav/.php_cs.dist @@ -6,7 +6,7 @@ $config->getFinder() ->in(__DIR__); $config->setRules([ '@PSR1' => true, - '@Symfony' =>true + '@Symfony' => true ]); return $config; \ No newline at end of file diff --git a/htdocs/includes/sabre/sabre/dav/.travis.yml b/htdocs/includes/sabre/sabre/dav/.travis.yml index c98ea59ef4d..6214d80b39e 100644 --- a/htdocs/includes/sabre/sabre/dav/.travis.yml +++ b/htdocs/includes/sabre/sabre/dav/.travis.yml @@ -1,51 +1,72 @@ language: php sudo: required + +branches: + only: + - master + php: - - 7.0 - 7.1 - 7.2 - 7.3 + - 7.4 env: global: - SABRE_MYSQLUSER="root" - SABRE_MYSQLPASS="" - SABRE_MYSQLDSN="mysql:host=127.0.0.1;dbname=sabredav_test" + - RUN_PHPCSFIXER="TRUE" + - RUN_PHPUNIT="TRUE" - RUN_PHPSTAN="FALSE" matrix: - - LOWEST_DEPS="" TEST_DEPS="" WITH_COVERAGE="--coverage-clover=coverage.xml" - - LOWEST_DEPS="--prefer-lowest" TEST_DEPS="tests/Sabre/" $WITH_COVERAGE="" + - PREFER_LOWEST="" TEST_DEPS="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml" + - PREFER_LOWEST="--prefer-lowest" TEST_DEPS="tests/Sabre/" REPORT_COVERAGE="FALSE" WITH_COVERAGE="" matrix: include: + - name: 'PHP8' + dist: bionic + php: 8.0 + env: + - RUN_PHPCSFIXER="FALSE" + - REPORT_COVERAGE="FALSE" - name: 'PHPStan' + php: 7.4 + env: + - RUN_PHPCSFIXER="FALSE" + - RUN_PHPUNIT="FALSE" + - RUN_PHPSTAN="TRUE" + - REPORT_COVERAGE="FALSE" + - name: 'Test with streaming propfind' php: 7.2 - env: RUN_PHPSTAN="TRUE" + env: + - RUN_TEST_WITH_STREAMING_PROPFIND="TRUE" + - REPORT_COVERAGE="FALSE" + fast_finish: true services: - mysql - postgresql -install: - - if [ $RUN_PHPSTAN == "TRUE" ]; then wget https://github.com/phpstan/phpstan/releases/download/0.11.8/phpstan.phar; fi - before_script: -# - mysql -u root -h 127.0.0.1 sabredav_test -e 'SELECT VERSION();' -#- mysql -u root -h 127.0.0.1 -e 'create database sabredav_test' + - mysql -u root -h 127.0.0.1 -e 'create database sabredav_test' - psql -c "create database sabredav_test" -U postgres - psql -c "create user sabredav with PASSWORD 'sabredav';GRANT ALL PRIVILEGES ON DATABASE sabredav_test TO sabredav" -U postgres - - composer update --prefer-dist $LOWEST_DEPS + - if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --no-update --dev friendsofphp/php-cs-fixer; fi + - composer update $PREFER_LOWEST addons: postgresql: "9.5" script: - - if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/phpunit --verbose --configuration tests/phpunit.xml.dist $WITH_COVERAGE $TEST_DEPS; fi - - if [ $RUN_PHPSTAN == "FALSE" ]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi - - if [ $RUN_PHPSTAN == "TRUE" ]; then php phpstan.phar analyse -c phpstan.neon lib; fi + - if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi + - if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE $TEST_DEPS; fi + - if [ $RUN_PHPUNIT == "TRUE" ]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi + - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi after_success: - - bash <(curl -s https://codecov.io/bash) + - if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi cache: directories: diff --git a/htdocs/includes/sabre/sabre/dav/CHANGELOG.md b/htdocs/includes/sabre/sabre/dav/CHANGELOG.md deleted file mode 100644 index 455b3ae5e6e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/CHANGELOG.md +++ /dev/null @@ -1,2497 +0,0 @@ -ChangeLog -========= - -4.0.2 (2019-10-18) -------------------------- -* Fix error with PHP 7.4 -* CardDAV: Fix content-type for Thunderbird - - -4.0.1 (2019-08-20) -------------------------- -* TemporaryFileFilterPlugin: Fix Strict Error -* CalDAV\Plugin: Fix null path - - -4.0.0 (2019-07-01) -------------------------- -* Lock: Support lock timeout value Infinity -* Lock: Hide lock token in lock discovery when not set -* BrowserPlugin: Show display name of nodes -* FSExt: Fix folder (file) move issue if rename fails -* IMipPlugin: Add sender name in invite mail headers -* IMipPlugin: Fix email subject and recipient -* Fix issues with empty content-type header -* Apply new code style -* Fix for litmus test suite - test case: props propfind_invalid2 -* Depend on sabre/xml 2.0.1 -* Depend on sabre/http 5.0 -* Now supports PHP 7.3 -* Now requires PHP 7. -* Using `strict_types` in every php file. -* #896: Using the [sabre/event][evnt] `WildcardEmitter`. This allows event - handlers to listen to events using a wildcard. -* #896: Event listeners that in the past listened to `beforeMethod` or `method` - no longer get called. They must listen to `beforeMethod:*` and `method:*` now. -* #322: Imap authentication backend. (@c0d3z3r0). -* #889: Support for selective property querying in CardDAV's addressbook-query. - (@DeepDiver1975). -* #982: Make sure that files that are siblings of directories, are reported - as files (@nickvergessen) - - -4.0.0-beta1 (2019-05-08) -------------------------- -* Lock: Support lock timeout value Infinity -* Lock: Hide lock token in lock discovery when not set -* BrowserPlugin: Show display name of nodes -* FSExt: Fix folder (file) move issue if rename fails -* IMipPlugin: Add sender name in invite mail headers -* IMipPlugin: Fix email subject and recipient - - -4.0.0-alpha5 (2018-10-15) -------------------------- -* Fix issues with empty content-type header - - -4.0.0-alpha4 (2018-10-12) -------------------------- -* Apply new code style -* Fix for litmus test suite - test case: props propfind_invalid2 -* Depend on sabre/xml 2.0.1 - - -4.0.0-alpha3 (2018-10-05) -------------------------- -* Fixes for PHP 7.3 -* Depend on sabre/http 5.0 - - -4.0.0-alpha2 (2018-09-27) -------------------------- -* Now supports PHP 7.3 - - -4.0.0-alpha1 (2018-06-05) -------------------------- - -* Now requires PHP 7. -* Using `strict_types` in every php file. -* #896: Using the [sabre/event][evnt] `WildcardEmitter`. This allows event - handlers to listen to events using a wildcard. -* #896: Event listeners that in the past listened to `beforeMethod` or `method` - no longer get called. They must listen to `beforeMethod:*` and `method:*` now. -* #322: Imap authentication backend. (@c0d3z3r0). -* #889: Support for selective property querying in CardDAV's addressbook-query. - (@DeepDiver1975). -* #982: Make sure that files that are siblings of directories, are reported - as files (@nickvergessen) - - -3.3.0-alpha1 (2018-06-04) -------------------------- - -* SimpleCollection can now take arrays and strings as argument for super - simple tree creation. -* Added `Sabre\DAV\Server::start()`. This replaces `::exec()`. `::exec()` - is now deprecated, but we're keeping it around for a year or two to make - the transition easier. -* `getChildren()` function in any collection may now return an iterator - instead of an array. This can result in memory savings for large - collections. -* `Tree::getChildren()` now returns an Iterator instead of an array. -* Added `$overrideName` to all `Sabre\DAV\FS` and `Sabre\DAV\FSExt` classes, - so users can specify under what name these nodes show up in the tree. -* #889 Added support for filtering vCard properties in the addressbook-query - REPORT (@DeepDiver1975). -* #918: Add a lot of sqlite indexes. This should speed up sqlite-based - installations quite a bit. -* #982: Make sure that files that are siblings of directories, are reported - as files (@nickvergessen) -* #1058: Don't open file resource on HEAD request (@icewind1991) -* #1031: Fix copyNode for case of file named 0 (@phil-davis) - - -3.2.3 (????-??-??) ------------------- - -* #982: Make sure that files that are siblings of directories, are reported - as files (@nickvergessen) - - -3.2.2 (2017-02-14) ------------------- - -* #943: Fix CardDAV XML reporting bug, which was affecting several CardDAV - clients. Bug was introduced in 3.2.1. -* The zip release ships with [sabre/vobject 4.1.2][vobj], - [sabre/http 4.2.2][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.2.0][uri] and [sabre/xml 1.5.0][xml]. - - -3.2.1 (2017-01-28) ------------------- - -* #877: Fix for syncing large calendars when using the Sqlite PDO backend. - (@theseer). -* #889 Added support for filtering vCard properties in the addressbook-query - REPORT (@DeepDiver1975). -* The zip release ships with [sabre/vobject 4.1.2][vobj], - [sabre/http 4.2.2][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.2.0][uri] and [sabre/xml 1.5.0][xml]. - - -3.2.0 (2016-06-27) ------------------- - -* The default ACL rules allow an unauthenticated user to read information - about nodes that don't have their own ACL defined. This was a security - problem. -* The zip release ships with [sabre/vobject 4.1.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.2][xml]. - - -3.2.0-beta1 (2016-05-20) ------------------------- - -* #833: Calendars throw exceptions when the sharing plugin is not enabled. -* #834: Return vCards exactly as they were stored if we don't need to convert - in between versions. -* The zip release ships with [sabre/vobject 4.1.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.2.0-alpha1 (2016-05-09) -------------------------- - -* Database changes for CalDAV. If you are using the CalDAV PDO backends, you - must migrate. Run `./bin/migrateto32.php` for more info. -* Support for WebDAV Resource Sharing, an upcoming standard. -* Added support for sharing in the CalDAV PDO backend! Users can now invite - others to their calendar and give them read/read-write access! -* #397: Support for PSR-3. You can now log exceptions with your favourite - psr3-compatible logging tool. -* #825: Actual proper, tested support for PostgreSQL. We require version 9.5. -* Removed database migration script for sabre/dav 1.7. To update from that - version you now first need to update to sabre/dav 3.1. -* Removed deprecated function: `Sabre\DAV\Auth\Plugin::getCurrentUser()`. -* #774: Fixes for getting free disk space on Windows. -* #803: Major changes in the sharing API. If you were using an old sabre/dav - sharing api, head to the website for more detailed migration notes. -* #657: Support for optional auth using `{DAV:}unauthorized` and `{DAV:}all` - privileges. This allows you to assign a privilege to a resource, allowing - non-authenticated users to access it. For instance, this could allow you - to create a public read-only collection. -* #812 #814: ICS/VCF exporter now includes a more useful filename in its - `Content-Disposition` header. (@Xenopathic). -* #801: BC break: If you were using the `Href` object before, it's behavior - now changed a bit, and `LocalHref` was added to replace the old, default - behavior of `Href`. See the migration doc for more info. -* Removed `Sabre\DAVACL\Plugin::$allowAccessToNodesWithoutACL` setting. - Instead, you can provide a set of default ACL rules with - `Sabre\DAVACL\Plugin::setDefaultAcl()`. -* Introduced `Sabre\DAVACL\ACLTrait` which contains a default implementation - of `Sabre\DAV\IACL` with some sane defaults. We're using this trait all over - the place now, reducing the amount of boilerplate. -* Plugins can now control the "Supported Privilege Set". -* Added Sharing, ICSExport and VCFExport plugins to `groupwareserver.php` - example. -* The `{DAV:}all` privilege is now no longer abstract, so it can be assigned - directly. We're using the `{DAV:}all` privilege now in a lot of cases where - we before assigned both `{DAV:}read` and `{DAV:}write`. -* Resources that are not collections no longer support the `{DAV:}bind` and - `{DAV:}unbind` privileges. -* Corrected the CalDAV-scheduling related privileges. -* Doing an `UNLOCK` no longer requires the `{DAV:}write-content` privilege. -* Added a new `getPrincipalByUri` plugin event. Allowing plugins to request - quickly where a principal lives on a server. -* Renamed `phpunit.xml` to `phpunit.xml.dist` to make local modifications easy. -* Functionality from `IShareableCalendar` is merged into `ISharedCalendar`. -* #751: Fixed XML responses from failing `MKCOL` requests. -* #600: Support for `principal-match` ACL `REPORT`. -* #599: Support for `acl-principal-prop-set` ACL `REPORT`. -* #798: Added an index on `firstoccurence` field in MySQL CalDAV backend. This - should speed up common calendar-query requests. -* #759: DAV\Client is now able to actually correctly resolve relative urls. -* #671: We are no longer checking the `read-free-busy` privilege on individual - calendars during freebusy operations in the scheduling plugin. Instead, we - check the `schedule-query-freebusy` privilege on the target users' inbox, - which validates access for the entire account, per the spec. -* The zip release ships with [sabre/vobject 4.1.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.1.5 (????-??-??) ------------------- - -* Fixed: Creating a new calendar on some MySQL configurations caused an error. -* #889 Added support for filtering vCard properties in the addressbook-query - REPORT (@DeepDiver1975). - - - -3.1.4 (2016-05-28) ------------------- - -* #834: Backport from `master`: Return vCards exactly as they were stored if - we don't need to convert in between versions. This should speed up many - large addressbook syncs sometimes up to 50%. -* The zip release ships with [sabre/vobject 4.1.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.2][xml]. - - -3.1.3 (2016-04-06) ------------------- - -* Set minimum libxml version to 2.7.0 in `composer.json`. -* #805: It wasn't possible to create calendars that hold events, journals and - todos using MySQL, because the `components` column was 1 byte too small. -* The zip release ships with [sabre/vobject 4.1.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.1.2 (2016-03-12) ------------------- - -* #784: Sync logs for address books were not correctly cleaned up after - deleting them. -* #787: Cannot use non-seekable stream-wrappers with range requests. -* Faster XML parsing and generating due to sabre/xml update. -* #793: The Sqlite schema is now more strict and more similar to the MySQL - schema. This solves a problem within Baikal. -* The zip release ships with [sabre/vobject 4.0.3][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.1.1 (2016-01-25) ------------------- - -* #755: The brower plugin and some operations would break when scheduling and - delegation would both be enabled. -* #757: A bunch of unittest improvements (@jakobsack). -* The zip release ships with [sabre/vobject 4.0.2][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.3.0][xml]. - - -3.1.0 (2016-01-06) ------------------- - -* Better error message when the browser plugin is not enabled. -* Added a super minimal server example. -* #730: Switched all mysql tables to `utf8mb4` character set, allowing you to - use emoji in some tables where you couldn't before. -* #710: Provide an Auth backend that acts as a helper for people implementing - OAuth2 Bearer token. (@fkooman). -* #729: Not all calls to `Sabre\DAV\Tree::getChildren()` were properly cached. -* #727: Added another workaround to make CalDAV work for Windows 10 clients. -* #742: Fixes to make sure that vobject 4 is correctly supported. -* #726: Better error reporting in `Client::propPatch`. We're now throwing - exceptions. -* #608: When a HTTP error is triggered during `Client:propFind`, we're now - throwing `Sabre\HTTP\ClientHttpException` instead of `Sabre\DAV\Exception`. - This new exception contains a LOT more information about the problem. -* #721: Events are now handled in the correct order for `COPY` requests. - Before this subtle bugs could appear that could cause data-loss. -* #747: Now throwing exceptions and setting the HTTP status to 500 in subtle - cases where no other plugin set a correct HTTP status. -* #686: Corrected PDO principal backend's findByURI for email addresses that - don't match the exact capitalization. -* #512: The client now has it's own `User-Agent`. -* #720: Some browser improvements. -* The zip release ships with [sabre/vobject 4.0.1][vobj], - [sabre/http 4.2.1][http], [sabre/event 3.0.0][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.3.0][xml]. - - -3.1.0-alpha2 (2015-09-05) -------------------------- - -* Massive calendars and addressbooks should see a big drop in peak memory - usage. -* Fixed a privilege bug in the availability system. -* #697: Added a "tableName" member to the PropertyStorage PDO backend. (@Frzk). -* #699: PostgreSQL fix for the Locks PDO backend. (@TCKnet) -* Removed the `simplefsserver.php` example file. It's not simple enough. -* #703: PropPatch in client is not correctly encoded. -* #709: Throw exception when running into empty - `supported-calendar-component-set`. -* #711: Don't trigger deserializers for empty elements in `{DAV:}prop`. This - fixes issues when using sabre/dav as a client. -* The zip release ships with [sabre/vobject 4.0.0-alpha2][vobj], - [sabre/http 4.1.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.2.0][xml]. - - -3.1.0-alpha1 (2015-07-19) -------------------------- - -* Now requires PHP 5.5 -* Upgraded to vobject 4, which is a lot faster. -* Support for PHP 7. -* #690: Support for `calendar-availability`, draft 05. - [reference][calendar-availability]. -* #691: Workaround for broken Windows Phone client. -* The zip release ships with [sabre/vobject 4.0.0-alpha1][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.1.0][xml]. - - -3.0.10 (2016-??-??) ------------------- - -* #889 Added support for filtering vCard properties in the addressbook-query - REPORT (@DeepDiver1975). - - -3.0.9 (2016-04-06) ------------------- - -* Set minimum libxml version to 2.7.0 in `composer.json`. -* #727: Added another workaround to make CalDAV work for Windows 10 clients. -* #805: It wasn't possible to create calendars that hold events, journals and - todos using MySQL, because the `components` column was 1 byte too small. -* The zip release ships with [sabre/vobject 3.5.1][vobj], - [sabre/http 4.2.1][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.0.8 (2016-03-12) ------------------- - -* #784: Sync logs for address books were not correctly cleaned up after - deleting them. -* #787: Cannot use non-seekable stream-wrappers with range requests. -* Faster XML parsing and generating due to sabre/xml update. -* The zip release ships with [sabre/vobject 3.5.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.1.0][uri] and [sabre/xml 1.4.1][xml]. - - -3.0.7 (2016-01-12) ------------------- - -* #752: PHP 7 support for 3.0 branch. (@DeepDiver1975) -* The zip release ships with [sabre/vobject 3.5.0][vobj], - [sabre/http 4.2.1][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.3.0][xml]. - - -3.0.6 (2016-01-04) ------------------- - -* #730: Switched all mysql tables to `utf8mb4` character set, allowing you to - use emoji in some tables where you couldn't before. -* #729: Not all calls to `Sabre\DAV\Tree::getChildren()` were properly cached. -* #734: Return `418 I'm a Teapot` when generating a multistatus response that - has resources with no returned properties. -* #740: Bugs in `migrate20.php` script. -* The zip release ships with [sabre/vobject 3.4.8][vobj], - [sabre/http 4.1.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.3.0][xml]. - - -3.0.5 (2015-09-15) ------------------- - -* #704: Fixed broken uri encoding in multistatus responses. This affected - at least CyberDuck, but probably also others. -* The zip release ships with [sabre/vobject 3.4.7][vobj], -* The zip release ships with [sabre/vobject 3.4.7][vobj], - [sabre/http 4.1.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.2.0][xml]. - - -3.0.4 (2015-09-06) ------------------- - -* #703: PropPatch in client is not correctly encoded. -* #709: Throw exception when running into empty - `supported-calendar-component-set`. -* #711: Don't trigger deserializers for empty elements in `{DAV:}prop`. This - fixes issues when using sabre/dav as a client. -* #705: A `MOVE` request that gets prevented from deleting the source resource - will still remove the target resource. Now all events are triggered before - any destructive operations. -* The zip release ships with [sabre/vobject 3.4.7][vobj], - [sabre/http 4.1.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.2.0][xml]. - - -3.0.3 (2015-08-06) ------------------- - -* #700: Digest Auth fails on `HEAD` requests. -* Fixed example files to no longer use now-deprecated realm argument. -* The zip release ships with [sabre/vobject 3.4.6][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.1.0][xml]. - - -3.0.2 (2015-07-21) ------------------- - -* #657: Migration script would break when coming a cross an iCalendar object - with no UID. -* #691: Workaround for broken Windows Phone client. -* Fixed a whole bunch of incorrect php docblocks. -* The zip release ships with [sabre/vobject 3.4.5][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.1.0][xml]. - - -3.0.1 (2015-07-02) ------------------- - -* #674: Postgres sql file fixes. (@davesouthey) -* #677: Resources with the name '0' would not get retrieved when using - `Depth: infinity` in a `PROPFIND` request. -* #680: Fix 'autoprefixing' of dead `{DAV:}href` properties. -* #675: NTLM support in DAV\Client. (@k42b3) -* The zip release ships with [sabre/vobject 3.4.5][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.1.0][xml]. - - -3.0.0 (2015-06-02) ------------------- - -* No changes since last beta. -* The zip release ships with [sabre/vobject 3.4.5][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.0.0][xml]. - - -3.0.0-beta3 (2015-05-29) ------------------------- - -* Fixed deserializing href properties with no value. -* Fixed deserializing `{DAV:}propstat` without a `{DAV:}prop`. -* #668: More information about vcf-export-plugin in browser plugin. -* #669: Add export button to browser plugin for address books. (@mgee) -* #670: multiget report hrefs were not decoded. -* The zip release ships with [sabre/vobject 3.4.4][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.0.0][xml]. - - -3.0.0-beta2 (2015-05-27) ------------------------- - -* A node's properties should not overwrite properties that were already set. -* Some uris were not correctly encoded in notifications. -* The zip release ships with [sabre/vobject 3.4.4][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.0.0][xml]. - - -3.0.0-beta1 (2015-05-25) ------------------------- - -* `migrate22.php` is now called `migrate30.php`. -* Using php-cs-fixer for automated coding standards enforcement and fixing. -* #660: principals could break html output. -* #662: Fixed several bugs in the `share` request parser. -* #665: Fix a bug in serialization of complex properties in the proppatch - request in the client. -* #666: expand-property report did not correctly prepend the base uri when - generating uris, this caused delegation to break. -* #659: Don't throw errors when when etag-related checks are done on - collections. -* Fully supporting the updated `Prefer` header syntax, as defined in - [rfc7240][rfc7240]. -* The zip release ships with [sabre/vobject 3.4.3][vobj], - [sabre/http 4.0.0][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 1.0.0][xml]. - - -3.0.0-alpha1 (2015-05-19) -------------------------- - -* It's now possible to get all property information from files using the - browser plugin. -* Browser plugin will now show a 'calendar export' button when the - ics-export plugin is enabled. -* Some nodes that by default showed the current time as their last - modification time, now no longer has a last modification time. -* CardDAV namespace was missing from default namespaceMap. -* #646: Properties can now control their own HTML output in the browser plugin. -* #646: Nicer HTML output for the `{DAV:}acl` property. -* Browser plugin no longer shows a few properties that take up a lot of space, - but are likely not really interesting for most users. -* #654: Added a collection, `Sabre\DAVACL\FS\HomeCollection` for automatically - creating a private home collection per-user. -* Changed all MySQL columns from `VARCHAR` to `VARBINARY` where possible. -* Improved older migration scripts a bit to allow easier testing. -* The zip release ships with [sabre/vobject 3.4.3][vobj], - [sabre/http 4.0.0-alpha3][http], [sabre/event 2.0.2][evnt], - [sabre/uri 1.0.1][uri] and [sabre/xml 0.4.3][xml]. - - -2.2.0-alpha4 (2015-04-13) -------------------------- - -* Complete rewrite of the XML system. We now use our own [sabre/xml][xml], - which has a much smarter XML Reader and Writer. -* BC Break: It's no longer possible to instantiate the Locks plugin without - a locks backend. I'm not sure why this ever made sense. -* Simplified the Locking system and fixed a bug related to if tokens checking - locks unrelated to the current request. -* `FSExt` Directory and File no longer do custom property storage. This - functionality is already covered pretty well by the `PropertyStorage` plugin, - so please switch. -* Renamed `Sabre\CardDAV\UserAddressBooks` to `Sabre\CardDAV\AddressBookHome` - to be more consistent with `CalendarHome` as well as the CardDAV - specification. -* `Sabre\DAV\IExtendedCollection` now receives a `Sabre\DAV\MkCol` object as - its second argument, and no longer receives seperate properties and - resourcetype arguments. -* `MKCOL` now integrates better with propertystorage plugins. -* #623: Remove need of temporary files when working with Range requests. - (@dratini0) -* The zip release ships with [sabre/vobject 3.4.2][vobj], - [sabre/http 4.0.0-alpha1][http], [sabre/event 2.0.1][evnt], - [sabre/uri 1.0.0][uri] and [sabre/xml 0.4.3][xml]. - - -2.2.0-alpha3 (2015-02-25) -------------------------- - -* Contains all the changes introduced between 2.1.2 and 2.1.3. -* The zip release ships with [sabre/vobject 3.4.2][vobj], - [sabre/http 4.0.0-alpha1][http], [sabre/event 2.0.1][evnt] and - [sabre/uri 1.0.0][uri]. - - -2.2.0-alpha2 (2015-01-09) -------------------------- - -* Renamed `Sabre\DAV\Auth\Backend\BackendInterface::requireAuth` to - `challenge`, which is a more correct and better sounding name. -* The zip release ships with [sabre/vobject 3.3.5][vobj], - [sabre/http 3.0.4][http], [sabre/event 2.0.1][evnt]. - - -2.2.0-alpha1 (2014-12-10) -------------------------- - -* The browser plugin now has a new page with information about your sabredav - server, and shows information about every plugin that's loaded in the - system. -* #191: The Authentication system can now support multiple authentication - backends. -* Removed: all `$tableName` arguments from every PDO backend. This was already - deprecated, but has now been fully removed. All of these have been replaced - with public properties. -* Deleted several classes that were already deprecated much earlier: - * `Sabre\CalDAV\CalendarRootNode` - * `Sabre\CalDAV\UserCalendars` - * `Sabre\DAV\Exception\FileNotFound` - * `Sabre\DAV\Locks\Backend\FS` - * `Sabre\DAV\PartialUpdate\IFile` - * `Sabre\DAV\URLUtil` -* Removed: `Sabre\DAV\Client::addTrustedCertificates` and - `Sabre\DAV\Client::setVerifyPeer`. -* Removed: `Sabre\DAV\Plugin::getPlugin()` can now no longer return plugins - based on its class name. -* Removed: `Sabre\DAVACL\Plugin::getPrincipalByEmail()`. -* #560: GuessContentType plugin will now set content-type to - `application/octet-stream` if a better content-type could not be determined. -* #568: Added a `componentType` argument to `ICSExportPlugin`, allowing you to - specifically fetch `VEVENT`, `VTODO` or `VJOURNAL`. -* #582: Authentication backend interface changed to be stateless. If you - implemented your own authentication backend, make sure you upgrade your class - to the latest API! -* #582: `Sabre\DAV\Auth\Plugin::getCurrentUser()` is now deprecated. Use - `Sabre\DAV\Auth\Plugin::getCurrentPrincipal()` instead. -* #193: Fix `Sabre\DAV\FSExt\Directory::getQuotaInfo()` on windows. - - -2.1.11 (2016-10-06) -------------------- - -* #805: It wasn't possible to create calendars that hold events, journals and - todos using MySQL, because the `components` column was 1 byte too small. -* The zip release ships with [sabre/vobject 3.5.3][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.10 (2016-03-10) -------------------- - -* #784: Sync logs for address books were not correctly cleaned up after - deleting them. -* The zip release ships with [sabre/vobject 3.5.0][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.9 (2016-01-25) ------------------- - -* #674: PHP7 support (@DeepDiver1975). -* The zip release ships with [sabre/vobject 3.5.0][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.8 (2016-01-04) ------------------- - -* #729: Fixed a caching problem in the Tree object. -* #740: Bugs in `migrate20.php` script. -* The zip release ships with [sabre/vobject 3.4.8][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.7 (2015-09-05) ------------------- - -* #705: A `MOVE` request that gets prevented from deleting the source resource - will still remove the target resource. Now all events are triggered before - any destructive operations. -* The zip release ships with [sabre/vobject 3.4.7][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.6 (2015-07-21) ------------------- - -* #657: Migration script would break when coming a cross an iCalendar object - with no UID. -* #691: Workaround for broken Windows Phone client. -* The zip release ships with [sabre/vobject 3.4.5][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.5 (2015-07-11) ------------------- - -* #677: Resources with the name '0' would not get retrieved when using - `Depth: infinity` in a `PROPFIND` request. -* The zip release ships with [sabre/vobject 3.4.5][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.4 (2015-05-25) ------------------- - -* #651: Double-encoded path in the browser plugin. Should fix a few broken - links in some setups. -* #650: Correctly cleaning up change info after deleting calendars (@ErrOrnAmE). -* #658: Updating `schedule-calendar-default-URL` does not work well, so we're - disabling it until there's a better fix. -* The zip release ships with [sabre/vobject 3.4.3][vobj], - [sabre/http 3.0.5][http], and [sabre/event 2.0.2][evnt]. - - -2.1.3 (2015-02-25) ------------------- - -* #586: `SCHEDULE-STATUS` should not contain a reason-phrase. -* #539: Fixed a bug related to scheduling in shared calendars. -* #595: Support for calendar-timezone in iCalendar exports. -* #581: findByUri would send empty prefixes to the principal backend (@soydeedo) -* #611: Escaping a bit more HTML output in the browser plugin. (@LukasReschke) -* #610: Don't allow discovery of arbitrary files using `..` in the browser - plugin (@LukasReschke). -* Browser plugin now shows quota properties. -* #612: PropertyStorage didn't delete properties from nodes when a node's - parents get deleted. -* #581: Fixed problems related to finding attendee information during - scheduling. -* The zip release ships with [sabre/vobject 3.4.2][vobj], - [sabre/http 3.0.4][http], and [sabre/event 2.0.1][evnt]. - - -2.1.2 (2014-12-10) ------------------- - -* #566: Another issue related to the migration script, which would cause - scheduling to not work well for events that were already added before the - migration. -* #567: Doing freebusy requests on accounts that had 0 calendars would throw - a `E_NOTICE`. -* #572: `HEAD` requests trigger a PHP warning. -* #579: Browser plugin can throw exception for a few resourcetypes that didn't - have an icon defined. -* The zip release ships with [sabre/vobject 3.3.4][vobj], - [sabre/http 3.0.4][http], and [sabre/event 2.0.1][evnt]. - - -2.1.1 (2014-11-22) ------------------- - -* #561: IMip Plugin didn't strip mailto: from email addresses. -* #566: Migration process had 2 problems related to adding the `uid` field - to the `calendarobjects` table. -* The zip release ships with [sabre/vobject 3.3.4][vobj], - [sabre/http 3.0.2][http], and [sabre/event 2.0.1][evnt]. - - -2.1.0 (2014-11-19) ------------------- - -* #541: CalDAV PDO backend didn't respect overridden PDO table names. -* #550: Scheduling invites are no longer delivered into shared calendars. -* #554: `calendar-multiget` `REPORT` did not work on inbox items. -* #555: The `calendar-timezone` property is now respected for floating times - and all-day events in the `calendar-query`, `calendar-multiget` and - `free-busy-query` REPORTs. -* #555: The `calendar-timezone` property is also respected for scheduling - free-busy requests. -* #547: CalDAV system too aggressively 'corrects' incoming iCalendar data, and - as a result doesn't return an etag for common cases. -* The zip release ships with [sabre/vobject 3.3.4][vobj], - [sabre/http 3.0.2][http], and [sabre/event 2.0.1][evnt]. - - -2.1.0-alpha2 (2014-10-23) -------------------------- - -* Added: calendar-user-address-set to default principal search properties - list. This should fix iOS attendee autocomplete support. -* Changed: Moved all 'notifications' functionality from `Sabre\CalDAV\Plugin` - to a new plugin: `Sabre\CalDAV\Notifications\Plugin`. If you want to use - notifications-related functionality, just add this plugin. -* Changed: Accessing the caldav inbox, outbox or notification collection no - longer triggers getCalendarsForUser() on backends. -* #533: New invites are no longer delivered to taks-only calendars. -* #538: Added `calendarObjectChange` event. -* Scheduling speedups. -* #539: added `afterResponse` event. (@joserobleda) -* Deprecated: All the "tableName" constructor arguments for all the PDO - backends are now deprecated. They still work, but will be removed in the - next major sabredav version. Every argument that is now deprecated can now - be accessed as a public property on the respective backends. -* #529: Added getCalendarObjectByUID to PDO backend, speeding up scheduling - operations on large calendars. -* The zip release ships with [sabre/vobject 3.3.3][vobj], - [sabre/http 3.0.2][http], and [sabre/event 2.0.1][evnt]. - - -2.1.0-alpha1 (2014-09-23) -------------------------- - -* Added: Support for [rfc6638][rfc6638], also known as CalDAV Scheduling. -* Added: Automatically converting between vCard 3, 4 and jCard using the - `Accept:` header, in CardDAV reports, and automatically converting from - jCard to vCard upon `PUT`. It's important to note that your backends _may_ - now receive both vCard 3.0 and 4.0. -* Added: #444. Collections can now opt-in to support high-speed `MOVE`. -* Changed: PropertyStorage backends now have a `move` method. -* Added: `beforeMove`, and `afterMove` events. -* Changed: A few database changes for the CalDAV PDO backend. Make sure you - run `bin/migrate21.php` to upgrade your database schema. -* Changed: CalDAV backends have a new method: `getCalendarObjectByUID`. This - method MUST be implemented by all backends, but the `AbstractBackend` has a - simple default implementation for this. -* Changed: `Sabre\CalDAV\UserCalendars` has been renamed to - `Sabre\CalDAV\CalendarHome`. -* Changed: `Sabre\CalDAV\CalendarRootNode` has been renamed to - `Sabre\CalDAV\CalendarRoot`. -* Changed: The IMipHandler has been completely removed. With CalDAV scheduling - support, it is no longer needed. It's functionality has been replaced by - `Sabre\CalDAV\Schedule\IMipPlugin`, which can now send emails for clients - other than iCal. -* Removed: `Sabre\DAV\ObjectTree` and `Sabre\DAV\Tree\FileSystem`. All this - functionality has been merged into `Sabre\DAV\Tree`. -* Changed: PrincipalBackend now has a findByUri method. -* Changed: `PrincipalBackend::searchPrincipals` has a new optional `test` - argument. -* Added: Support for the `{http://calendarserver.org/ns/}email-address-set` - property. -* #460: PropertyStorage must move properties during `MOVE` requests. -* Changed: Restructured the zip distribution to be a little bit more lean - and consistent. -* #524: Full support for the `test="anyof"` attribute in principal-search - `REPORT`. -* #472: Always returning lock tokens in the lockdiscovery property. -* Directory entries in the Browser plugin are sorted by type and name. - (@aklomp) -* #486: It's now possible to return additional properties when an 'allprop' - PROPFIND request is being done. (@aklomp) -* Changed: Now return HTTP errors when an addressbook-query REPORT is done - on a uri that's not a vcard. This should help with debugging this common - mistake. -* Changed: `PUT` requests with a `Content-Range` header now emit a 400 status - instead of 501, as per RFC7231. -* Added: Browser plugin can now display the contents of the - `{DAV:}supported-privilege-set` property. -* Added: Now reporting `CALDAV:max-resource-size`, but we're not actively - restricting it yet. -* Changed: CalDAV plugin is now responsible for reporting - `CALDAV:supported-collation-set` and `CALDAV:supported-calendar-data` - properties. -* Added: Now reporting `CARDDAV:max-resource-size`, but we're not actively - restricting it yet. -* Added: Support for `CARDDAV:supported-collation-set`. -* Changed: CardDAV plugin is now responsible for reporting - `CARDDAV:supported-address-data`. This functionality has been removed from - the CardDAV PDO backend. -* When a REPORT is not supported, we now emit HTTP error 415, instead of 403. -* #348: `HEAD` requests now work wherever `GET` also works. -* Changed: Lower priority for the iMip plugins `schedule` event listener. -* Added: #523 Custom CalDAV backends can now mark any calendar as read-only. -* The zip release ships with [sabre/vobject 3.3.3][vobj], - [sabre/http 3.0.0][http], and [sabre/event 2.0.0][evnt]. - - -2.0.9 (2015-09-04) ------------------- - -* #705: A `MOVE` request that gets prevented from deleting the source resource - will still remove the target resource. Now all events are triggered before - any destructive operations. -* The zip release ships with [sabre/vobject 3.4.6][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - - -2.0.8 (2015-07-11) ------------------- - -* #677: Resources with the name '0' would not get retrieved when using - `Depth: infinity` in a `PROPFIND` request. -* The zip release ships with [sabre/vobject 3.3.5][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.7 (2015-05-25) ------------------- - -* #650: Correctly cleaning up change info after deleting calendars (@ErrOrnAmE). -* The zip release ships with [sabre/vobject 3.3.4][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.6 (2014-12-10) ------------------- - -* Added `Sabre\CalDAV\CalendarRoot` as an alias for - `Sabre\CalDAV\CalendarRootNode`. The latter is going to be deprecated in 2.1, - so this makes it slightly easier to write code that works in both branches. -* #497: Making sure we're initializing the sync-token field with a value after - migration. -* The zip release ships with [sabre/vobject 3.3.4][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.5 (2014-10-14) ------------------- - -* #514: CalDAV PDO backend didn't work when overriding the 'calendar changes' - database table name. -* #515: 304 status code was not being sent when checking preconditions. -* The zip release ships with [sabre/vobject 3.3.3][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.4 (2014-08-27) ------------------- - -* #483: typo in calendars creation for PostgreSQL. -* #487: Locks are now automatically removed after a node has been deleted. -* #496: Improve CalDAV and CardDAV sync when there is no webdav-sync support. -* Added: Automatically mapping internal sync-tokens to getctag. -* The zip release ships with [sabre/vobject 3.3.1][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.3 (2014-07-14) ------------------- - -* #474: Fixed PropertyStorage `pathFilter()`. -* #476: CSP policy incorrect, causing stylesheets to not load in the browser - plugin. -* #475: Href properties in the browser plugin sometimes included a backslash. -* #478: `TooMuchMatches` exception never worked. This was fixed, and we also - took this opportunity to rename it to `TooManyMatches`. -* The zip release ships with [sabre/vobject 3.2.4][vobj], - [sabre/http 2.0.4][http], and [sabre/event 1.0.1][evnt]. - - -2.0.2 (2014-06-12) ------------------- - -* #470: Fixed compatibility with PHP < 5.4.14. -* #467: Fixed a problem in `examples/calendarserver.php`. -* #466: All the postgresql sample files have been updated. -* Fixed: An error would be thrown if a client did a propfind on a node the - user didn't have access to. -* Removed: Old and broken example code from the `examples/` directory. -* The zip release ships with [sabre/vobject 3.2.3][vobj], - [sabre/http 2.0.3][http], and [sabre/event 1.0.1][evnt]. - - -2.0.1 (2014-05-28) ------------------- - -* #459: PROPFIND requests on Files with no Depth header would return a fatal - error. -* #464: A PROPFIND allprops request should not return properties with status - 404. -* The zip release ships with [sabre/vobject 3.2.2][vobj], - [sabre/http 2.0.3][http], and [sabre/event 1.0.0][evnt]. - - -2.0.0 (2014-05-22) ------------------- - -* The zip release ships with [sabre/vobject 3.2.2][vobj], - [sabre/http 2.0.3][http], and [sabre/event 1.0.0][evnt]. -* Fixed: #456: Issue in sqlite migration script. -* Updated: MySQL database schema optimized by using more efficient column types. -* Cleaned up browser design. - - -2.0.0-beta1 (2014-05-15) -------------------------- - -* The zip release ships with [sabre/vobject 3.2.2][vobj], - [sabre/http 2.0.3][http], and [sabre/event 1.0.0][evnt]. -* BC Break: Property updating and fetching got refactored. Read the [migration - document][mi20] for more information. This allows for creation of a generic - property storage, and other property-related functionality that was not - possible before. -* BC Break: Removed `propertyUpdate`, `beforeGetProperties` and - `afterGetProperties` events. -* Fixed: #413: Memory optimizations for the CardDAV PDO backend. -* Updated: Brand new browser plugin with more debugging features and a design - that is slightly less painful. -* Added: Support for the `{DAV:}supported-method-set` property server-wide. -* Making it easier for implementors to override how the CardDAV addressbook - home is located. -* Fixed: Issue #422 Preconditions were not being set on PUT on non-existent - files. Not really a chance for data-loss, but incorrect nevertheless. -* Fixed: Issue #428: Etag check with `If:` fails if the target is a collection. -* Fixed: Issues #430, #431, #433: Locks plugin didn't not properly release - filesystem based locks. -* Fixed: #443. Support for creating new calendar subscriptions for OS X 10.9.2 - and up. -* Removed: `Sabre\DAV\Server::NODE_*` constants. -* Moved all precondition checking into a central place, instead of having to - think about it on a per-method basis. -* jCal transformation for calendar-query REPORT now works again. -* Switched to PSR-4 -* Fixed: #175. Returning ETag header upon a failed `If-Match` or - `If-None-Match` check. -* Removed: `lib/Sabre/autoload.php`. Use `vendor/autoload.php` instead. -* Removed: all the rfc documentation from the sabre/dav source. This made the - package needlessly larger. -* Updated: Issue #439. Lots of updates in PATCH support. The - Sabre_DAV_PartialUpdate_IFile interface is now deprecated and will be - removed in a future version. -* Added: `Sabre\DAV\Exception\LengthRequired`. - -1.9.0-alpha2 (2014-01-14) -------------------------- - -* The zip release ships with sabre/vobject 3.1.3, sabre/http 2.0.1, and - sabre/event 1.0.0. -* Added: Browser can now inspect any node, if ?sabreaction=browser is appended. -* Fixed: Issue #178. Support for multiple items in the Timeout header. -* Fixed: Issue #382. Stricter checking if calendar-query is allowed to run. -* Added: Depth: Infinity support for PROPFIND request. Thanks Thomas Müller and - Markus Goetz. - - -1.9.0-alpha1 (2013-11-07) -------------------------- - -* The zip release ships with sabre/vobject 3.1.3, sabre/http 2.0.0alpha5, and - sabre/event 1.0.0. -* BC Break: The CardDAV and CalDAV BackendInterface each have a new method: - getMultipleCards and getMultipleCalendarObjects. The Abstract and PDO backends - have default implementations, but if you implement that interface directly, - this method is now required. -* BC Break: XML property classes now receive an extra argument in their - unserialize method ($propertyMap). This allows for recursively parsing - properties, if needed. -* BC Break: Now using sabre/event for event emitting/subscription. For plugin - authors this means Server::subscribeEvent is now Server::on, and - Server::broadcastEvent is now Server::emit. -* BC Break: Almost all core functionality moved into a CorePlugin. -* BC Break: Most events triggered by the server got an overhaul. -* Changed: Sabre\HTTP now moved into a dedicated sabre/http package. -* Added: Support for WebDAV-sync (rfc6578). -* Added: Support for caldav-subscriptions, which is an easy way for caldav - clients to manage a list of subscriptions on the server. -* Added: Support for emitting and receiving jCal instead of iCalendar for - CalDAV. -* Added: BasicCallback authenticaton backend, for creating simple authentication - systems without having to define any classes. -* Added: A $transactionType property on the server class. This can be used for - logging and performance measuring purposes. -* Fixed: If event handlers modify the request body from a PUT request, an ETag - is no longer sent back. -* Added: Sabre\DAV\IMultiGet to optimize requests that retrieve information - about lists of resources. -* Added: MultiGet support to default CalDAV and CardDAV backends, speeding up - the multiget and sync reports quite a bit! -* Added: ICSExportPlugin can now generate jCal, filter on time-ranges and expand - recurrences. -* Fixed: Read-only access to calendars still allows the sharee to modify basic - calendar properties, such as the displayname and color. -* Changed: The default supportedPrivilegeSet has changed. Most privileges are no - longer marked as abstract. -* Changed: More elegant ACL management for CalendarObject and Card nodes. -* Added: Browser plugin now marks a carddav directory as type Directory, and a - shared calendar as 'Shared'. -* Added: When debugExceptions is turned on, all previous exceptions are also - traversed. -* Removed: Got rid of the Version classes for CalDAV, CardDAV, HTTP, and DAVACL. - Now that there's no separate packages anymore, this makes a bit more sense. -* Added: Generalized the multistatus response parser a bit more, for better - re-use. -* Added: Sabre\DAV\Client now has support for complex properties for PROPPATCH. - (Issue #299). -* Added: Sabre\DAV\Client has support for gzip and deflate encoding. -* Added: Sabre\DAV\Client now has support for sending objects as streams. -* Added: Deserializer for {DAV:}current-user-privilege-set. -* Added: Addressbooks or backends can now specify custom acl rules when creating - cards. -* Added: The ability for plugins to validate custom tokens in If: headers. -* Changed: Completely refactored the Lock plugin to deal with the new If: header - system. -* Added: Checking preconditions for MOVE, COPY, DELETE and PROPPATCH methods. -* Added: has() method on DAV\Property\SupportedReportSet. -* Added: If header now gets checked (with ETag) all the time. Before the dealing - with the If-header was a responsibility of the Locking plugin. -* Fixed: Outbox access for delegates. -* Added: Issue 333: It's now possible to override the calendar-home in the - CalDAV plugin. -* Added: A negotiateContentType to HTTP\Request. A convenience method. -* Fixed: Issue 349: Denying copying or moving a resource into it's own subtree. -* Fixed: SabreDAV catches every exception again. -* Added: Issue #358, adding a component=vevent parameter to the content-types - for calendar objects, if the caldav backend provides this info. - - -1.8.12-stable (2015-01-21) --------------------------- - -* The zip release ships with sabre/vobject 2.1.7. -* #568: Support empty usernames and passwords in basic auth. - - -1.8.11 (2014-12-10) -------------------- - -* The zip release ships with sabre/vobject 2.1.6. -* Updated: MySQL database schema optimized by using more efficient column types. -* #516: The DAV client will now only redirect to HTTP and HTTPS urls. - - -1.8.10 (2014-05-15) -------------------- - -* The zip release ships with sabre/vobject 2.1.4. -* includes changes from version 1.7.12. - - -1.8.9 (2014-02-26) ------------------- - -* The zip release ships with sabre/vobject 2.1.3. -* includes changes from version 1.7.11. - - -1.8.8 (2014-02-09) ------------------- - -* includes changes from version 1.7.10. -* The zip release ships with sabre/vobject 2.1.3. - -1.8.7 (2013-10-02) ------------------- - -* the zip release ships with sabre/vobject 2.1.3. -* includes changes from version 1.7.9. - - -1.8.6 (2013-06-18) ------------------- - -* The zip release ships with sabre/vobject 2.1.0. -* Includes changes from version 1.7.8. - - -1.8.5 (2013-04-11) ------------------- - -* The zip release ships with sabre/vobject 2.0.7. -* Includes changes from version 1.7.7. - - -1.8.4 (2013-04-08) ------------------- - -* The zip release ships with sabre/vobject 2.0.7. -* Includes changes from version 1.7.6. - - -1.8.3 (2013-03-01) ------------------- - -* The zip release ships with sabre/vobject 2.0.6. -* Includes changes from version 1.7.5. -* Fixed: organizer email-address for shared calendars is now prefixed with - mailto:, as it should. - - -1.8.2 (2013-01-19) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* Includes changes from version 1.7.4. - - -1.8.1 (2012-12-01) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* Includes changes from version 1.7.3. -* Fixed: Typo in 1.7 migration script caused it to fail. - - -1.8.0 (2012-11-08) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* BC Break: Moved the entire codebase to PHP namespaces. -* BC Break: Every backend package (CalDAV, CardDAV, Auth, Locks, Principals) now - has consistent naming conventions. There's a BackendInterface, and an - AbstractBackend class. -* BC Break: Changed a bunch of constructor signatures in the CalDAV package, to - reduce dependencies on the ACL package. -* BC Break: Sabre_CalDAV_ISharedCalendar now also has a getShares method, so - sharees can figure out who is also on a shared calendar. -* Added: Sabre_DAVACL_IPrincipalCollection interface, to advertise support for - principal-property-search on any node. -* Added: Simple console script to fire up a fileserver in the current directory - using PHP 5.4's built-in webserver. -* Added: Sharee's can now also read out the list of invites for a shared - calendar. -* Added: The Proxy principal classes now both implement an interface, for - greater flexibility. - - -1.7.13 (2014-07-28) -------------------- - -* The zip release ships with sabre/vobject 2.1.4. -* Changed: Removed phing and went with a custom build script for now. - - -1.7.12 (2014-05-15) -------------------- - -* The zip release ships with sabre/vobject 2.1.4. -* Updated: Issue #439. Lots of updates in PATCH support. The - Sabre_DAV_PartialUpdate_IFile interface is now deprecated and will be removed - in a future version. -* Fixed: Restoring old setting after changing libxml_disable_entity_loader. -* Fixed: Issue #422: Preconditions were not being set on PUT on non-existent - files. Not really a chance for data-loss, but incorrect nevertheless. -* Fixed: Issue #427: Now checking preconditions on DELETE requests. -* Fixed: Issue #428: Etag check with If: fails if the target is a collection. -* Fixed: Issue #393: PATCH request with missing end-range was handled - incorrectly. -* Added: Sabre_DAV_Exception_LengthRequired to omit 411 errors. - - -1.7.11 (2014-02-26) -------------------- - -* The zip release ships with sabre/vobject 2.1.3. -* Fixed: Issue #407: large downloads failed. -* Fixed: Issue #414: XXE security problem on older PHP versions. - - -1.7.10 (2014-02-09) -------------------- - -* Fixed: Issue #374: Don't urlescape colon (:) when it's not required. -* Fixed: Potential security vulnerability in the http client. - - -1.7.9 (2013-10-02) ------------------- - -* The zip release ships with sabre/vobject 2.1.3. -* Fixed: Issue #365. Incorrect output when principal urls have spaces in them. -* Added: Issue #367: Automatically adding a UID to vcards that don't have them. - - -1.7.8 (2013-06-17) ------------------- - -* The zip release ships with sabre/vobject 2.1.0. -* Changed: Sabre\DAV\Client::verifyPeer is now a protected property (instead of - private). -* Fixed: Text was incorrectly escaped in the Href and HrefList properties, - disallowing urls with ampersands (&) in them. -* Added: deserializer for Sabre\DAVACL\Property\CurrentUserPrivilegeSet. -* Fixed: Issue 335: Client only deserializes properties with status 200. -* Fixed: Issue 341: Escaping xml in 423 Locked error responses. -* Added: Issue 339: beforeGetPropertiesForPath event. - - -1.7.7 (2013-04-11) ------------------- - -* The zip release ships with sabre/vobject 2.0.7. -* Fixed: Assets in the browser plugins were not being served on windows - machines. - - -1.7.6 (2013-04-08) ------------------- - -* The zip release ships with sabre/vobject 2.0.7. -* Fixed: vcardurl in database schema can now hold 255 characters instead of 80 - (which is often way to small). -* Fixed: The browser plugin potentially allowed people to open any arbitrary - file on windows servers (CVE-2013-1939). - - -1.7.5 (2013-03-01) ------------------- - -* The zip release ships with sabre/vobject 2.0.6. -* Change: No longer advertising support for 4.0 vcards. iOS and OS X address - book don't handle this well, and just advertising 3.0 support seems like the - most logical course of action. -* Added: ->setVerifyPeers to Sabre_DAV_Client (greatly resisting against it, - don't use this..). - - -1.7.4 (2013-01-19) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* Changed: To be compatible with MS Office 2011 for Mac, a workaround was - removed that was added to support old versions of Windows XP (pre-SP3). - Indeed! We needed a crazy workaround to work with one MS product in the past, - and we can't keep that workaround to be compatible with another MS product. -* Fixed: expand-properties REPORT had incorrect values for the href element. -* Fixed: Range requests now work for non-seekable streams. (Thanks Alfred - Klomp). -* Fixed: Changed serialization of {DAV:}getlastmodified and {DAV:}supportedlock - to improve compatibility with MS Office 2011 for Mac. -* Changed: reverted the automatic translation of 'DAV:' xml namespaces to - 'urn:DAV' when parsing files. Issues were reported with libxml 2.6.32, on a - relatively recent debian release, so we'll wait till 2015 to take this one out - again. -* Added: Sabre_DAV_Exception_ServiceUnavailable, for emitting 503's. - - -1.7.3 (2012-12-01) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* Fixed: Removing double slashes from getPropertiesForPath. -* Change: Marked a few more properties in the CardDAV as protected, instead of - private. -* Fixed: SharingPlugin now plays nicer with other plugins with similar - functionality. -* Fixed: Issue 174. Sending back HTTP/1.0 for requests with this version. - - -1.7.2 (2012-11-08) ------------------- - -* The zip release ships with sabre/vobject 2.0.5. -* Added: ACL plugin advertises support for 'calendarserver-principal- - property-search'. -* Fixed: [#153] Allowing for relative http principals in iMip requests. -* Added: Support for cs:first-name and cs:last-name properties in sharing - invites. -* Fixed: Made a bunch of properties protected, where they were private before. -* Added: Some non-standard properties for sharing to improve compatibility. -* Fixed: some bugfixes in postgres sql script. -* Fixed: When requesting some properties using PROPFIND, they could show up as - both '200 Ok' and '403 Forbidden'. -* Fixed: calendar-proxy principals were not checked for deeper principal - membership than 1 level. -* Fixed: setGroupMemberSet argument now correctly receives relative principal - urls, instead of the absolute ones. -* Fixed: Server class will filter out any bonus properties if any extra were - returned. This means the implementor of the IProperty class can be a bit - lazier when implementing. Note: bug numbers after this line refer to Google - Code tickets. We're using github now. - - -1.7.1 (2012-10-07) ------------------- - -* Fixed: include path problem in the migration script. - - -1.7.0 (2012-10-06) ------------------- - -* BC Break: The calendarobjects database table has a bunch of new fields, and a - migration script is required to ensure everything will keep working. Read the - wiki for more details. -* BC Break: The ICalendar interface now has a new method: calendarQuery. -* BC Break: In this version a number of classes have been deleted, that have - been previously deprecated. Namely: - Sabre_DAV_Directory (now: - Sabre_DAV_Collection) - Sabre_DAV_SimpleDirectory (now: - Sabre_DAV_SimpleCollection) -* BC Break: Sabre_CalDAV_Schedule_IMip::sendMessage now has an extra argument. - If you extended this class, you should fix this method. It's only used for - informational purposes. -* BC Break: The DAV: namespace is no longer converted to urn:DAV. This was a - workaround for a bug in older PHP versions (pre-5.3). -* Removed: Sabre.includes.php was deprecated, and is now removed. -* Removed: Sabre_CalDAV_Server was deprecated, and is now removed. Please use - Sabre_DAV_Server and check the examples in the examples/ directory. -* Changed: The Sabre_VObject library now spawned into it's own project! The - VObject library is still included in the SabreDAV zip package. -* Added: Experimental interfaces to allow implementation of caldav-sharing. Note - that no implementation is provided yet, just the api hooks. -* Added: Free-busy reporting compliant with the caldav-scheduling standard. This - allows iCal and other clients to fetch other users' free-busy data. -* Added: Experimental NotificationSupport interface to add caldav notifications. -* Added: VCF Export plugin. If enabled, it can generate an export of an entire - addressbook. -* Added: Support for PATCH using a SabreDAV format, to live-patch files. -* Added: Support for Prefer: return-minimal and Brief: t headers for PROPFIND - and PROPPATCH requests. -* Changed: Responsibility for dealing with the calendar-query is now moved from - the CalDAV plugin to the CalDAV backends. This allows for heavy optimizations. -* Changed: The CalDAV PDO backend is now a lot faster for common calendar - queries. -* Changed: We are now using the composer autoloader. -* Changed: The CalDAV backend now all implement an interface. -* Changed: Instead of Sabre_DAV_Property, Sabre_DAV_PropertyInterface is now the - basis of every property class. -* Update: Caching results for principal lookups. This should cut down queries - and performance for a number of heavy requests. -* Update: ObjectTree caches lookups much more aggresively, which will help - especially speeding up a bunch of REPORT queries. -* Added: Support for the schedule-calendar-transp property. -* Fixed: Marking both the text/calendar and text/x-vcard as UTF-8 encoded. -* Fixed: Workaround for the SOGO connector, as it doesn't understand receiving - "text/x-vcard; charset=utf-8" for a contenttype. -* Added: Sabre_DAV_Client now throws more specific exceptions in cases where we - already has an exception class. -* Added: Sabre_DAV_PartialUpdate. This plugin allows you to use the PATCH method - to update parts of a file. -* Added: Tons of timezone name mappings for Microsoft Exchange. -* Added: Support for an 'exception' event in the server class. -* Fixed: Uploaded VCards without a UID are now rejected. (thanks Dominik!) -* Fixed: Rejecting calendar objects if they are not in the - supported-calendar-component list. (thanks Armin!) -* Fixed: Issue 219: serialize() now reorders correctly. -* Fixed: Sabre_DAV_XMLUtil no longer returns empty $dom->childNodes if there is - whitespace in $dom. -* Fixed: Returning 409 Conflict instead of 500 when an attempt is made to create - a file as a child of something that's not a collection. -* Fixed: Issue 237: xml-encoding values in SabreDAV error responses. -* Fixed: Returning 403, instead of 501 when an unknown REPORT is requested. -* Fixed: Postfixing slash on {DAV:}owner properties. -* Fixed: Several embarrassing spelling mistakes in docblocks. - - -1.6.10 (2013-06-17) -------------------- - -* Fixed: Text was incorrectly escaped in the Href and HrefList properties, - disallowing urls with ampersands (&) in them. -* Fixed: Issue 341: Escaping xml in 423 Locked error responses. - - -1.6.9 (2013-04-11) ------------------- - -* Fixed: Assets in the browser plugins were not being served on windows - machines. - - -1.6.8 (2013-04-08) ------------------- - -* Fixed: vcardurl in database schema can now hold 255 characters instead of 80 - (which is often way to small). -* Fixed: The browser plugin potentially allowed people to open any arbitrary - file on windows servers. (CVE-2013-1939). - - -1.6.7 (2013-03-01) ------------------- - -* Change: No longer advertising support for 4.0 vcards. iOS and OS X address - book don't handle this well, and just advertising 3.0 support seems like the - most logical course of action. -* Added: ->setVerifyPeers to Sabre_DAV_Client (greatly resisting against it, - don't use this..). - - -1.6.6 (2013-01-19) ------------------- - -* Fixed: Backported a fix for broken XML serialization in error responses. - (Thanks @DeepDiver1975!) - - -1.6.5 (2012-10-04) ------------------- - -* Fixed: Workaround for line-ending bug OS X 10.8 addressbook has. -* Added: Ability to allow users to set SSL certificates for the Client class. - (Thanks schiesbn!). -* Fixed: Directory indexes with lots of nodes should be a lot faster. -* Fixed: Issue 235: E_NOTICE thrown when doing a propfind request with - Sabre_DAV_Client, and no valid properties are returned. -* Fixed: Issue with filtering on alarms in tasks. - - -1.6.4 (2012-08-02) ------------------- - -* Fixed: Issue 220: Calendar-query filters may fail when filtering on alarms, if - an overridden event has it's alarm removed. -* Fixed: Compatibility for OS/X 10.8 iCal in the IMipHandler. -* Fixed: Issue 222: beforeWriteContent shouldn't be called for lock requests. -* Fixed: Problem with POST requests to the outbox if mailto: was not lower - cased. -* Fixed: Yearly recurrence rule expansion on leap-days no behaves correctly. -* Fixed: Correctly checking if recurring, all-day events with no dtstart fall in - a timerange if the start of the time-range exceeds the start of the instance - of an event, but not the end. -* Fixed: All-day recurring events wouldn't match if an occurence ended exactly - on the start of a time-range. -* Fixed: HTTP basic auth did not correctly deal with passwords containing colons - on some servers. -* Fixed: Issue 228: DTEND is now non-inclusive for all-day events in the - calendar-query REPORT and free-busy calculations. - - -1.6.3 (2012-06-12) ------------------- - -* Added: It's now possible to specify in Sabre_DAV_Client which type of - authentication is to be used. -* Fixed: Issue 206: Sabre_DAV_Client PUT requests are fixed. -* Fixed: Issue 205: Parsing an iCalendar 0-second date interval. -* Fixed: Issue 112: Stronger validation of iCalendar objects. Now making sure - every iCalendar object only contains 1 component, and disallowing vcards, - forcing every component to have a UID. -* Fixed: Basic validation for vcards in the CardDAV plugin. -* Fixed: Issue 213: Workaround for an Evolution bug, that prevented it from - updating events. -* Fixed: Issue 211: A time-limit query on a non-relative alarm trigger in a - recurring event could result in an endless loop. -* Fixed: All uri fields are now a maximum of 200 characters. The Bynari outlook - plugin used much longer strings so this should improve compatibility. -* Fixed: Added a workaround for a bug in KDE 4.8.2 contact syncing. See - https://bugs.kde.org/show_bug.cgi?id=300047 -* Fixed: Issue 217: Sabre_DAV_Tree_FileSystem was pretty broken. - - -1.6.2 (2012-04-16) ------------------- - -* Fixed: Sabre_VObject_Node::$parent should have been public. -* Fixed: Recurrence rules of events are now taken into consideration when doing - time-range queries on alarms. -* Fixed: Added a workaround for the fact that php's DateInterval cannot parse - weeks and days at the same time. -* Added: Sabre_DAV_Server::$exposeVersion, allowing you to hide SabreDAV's - version number from various outputs. -* Fixed: DTSTART values would be incorrect when expanding events. -* Fixed: DTSTART and DTEND would be incorrect for expansion of WEEKLY BYDAY - recurrences. -* Fixed: Issue 203: A problem with overridden events hitting the exact date and - time of a subsequent event in the recurrence set. -* Fixed: There was a problem with recurrence rules, for example the 5th tuesday - of the month, if this day did not exist. -* Added: New HTTP status codes from draft-nottingham-http-new-status-04. - - -1.6.1 (2012-03-05) ------------------- - -* Added: createFile and put() can now return an ETag. -* Added: Sending back an ETag on for operations on CardDAV backends. This should - help with OS X 10.6 Addressbook compatibility. -* Fixed: Fixed a bug where an infinite loop could occur in the recurrence - iterator if the recurrence was YEARLY, with a BYMONTH rule, and either BYDAY - or BYMONTHDAY match the first day of the month. -* Fixed: Events that are excluded using EXDATE are still counted in the COUNT= - parameter in the RRULE property. -* Added: Support for time-range filters on VALARM components. -* Fixed: Correctly filtering all-day events. -* Fixed: Sending back correct mimetypes from the browser plugin (thanks - Jürgen). -* Fixed: Issue 195: Sabre_CardDAV pear package had an incorrect dependency. -* Fixed: Calendardata would be destroyed when performing a MOVE request. - - -1.6.0 (2012-02-22) ------------------- - -* BC Break: Now requires PHP 5.3 -* BC Break: Any node that implemented Sabre_DAVACL_IACL must now also implement - the getSupportedPrivilegeSet method. See website for details. -* BC Break: Moved functions from Sabre_CalDAV_XMLUtil to - Sabre_VObject_DateTimeParser. -* BC Break: The Sabre_DAVACL_IPrincipalCollection now has two new methods: - 'searchPrincipals' and 'updatePrincipal'. -* BC Break: Sabre_DAV_ILockable is removed and all related per-node locking - functionality. -* BC Break: Sabre_DAV_Exception_FileNotFound is now deprecated in favor of - Sabre_DAV_Exception_NotFound. The former will be removed in a later version. -* BC Break: Removed Sabre_CalDAV_ICalendarUtil, use Sabre_VObject instead. -* BC Break: Sabre_CalDAV_Server is now deprecated, check out the documentation - on how to setup a caldav server with just Sabre_DAV_Server. -* BC Break: Default Principals PDO backend now needs a new field in the - 'principals' table. See the website for details. -* Added: Ability to create new calendars and addressbooks from within the - browser plugin. -* Added: Browser plugin: icons for various nodes. -* Added: Support for FREEBUSY reports! -* Added: Support for creating principals with admin-level privileges. -* Added: Possibility to let server send out invitation emails on behalf of - CalDAV client, using Sabre_CalDAV_Schedule_IMip. -* Changed: beforeCreateFile event now passes data argument by reference. -* Changed: The 'propertyMap' property from Sabre_VObject_Reader, must now be - specified in Sabre_VObject_Property::$classMap. -* Added: Ability for plugins to tell the ACL plugin which principal plugins are - searchable. -* Added: [DAVACL] Per-node overriding of supported privileges. This allows for - custom privileges where needed. -* Added: [DAVACL] Public 'principalSearch' method on the DAVACL plugin, which - allows for easy searching for principals, based on their properties. -* Added: Sabre_VObject_Component::getComponents() to return a list of only - components and not properties. -* Added: An includes.php file in every sub-package (CalDAV, CardDAV, DAV, - DAVACL, HTTP, VObject) as an alternative to the autoloader. This often works - much faster. -* Added: Support for the 'Me card', which allows Addressbook.app users specify - which vcard is their own. -* Added: Support for updating principal properties in the DAVACL principal - backends. -* Changed: Major refactoring in the calendar-query REPORT code. Should make - things more flexible and correct. -* Changed: The calendar-proxy-[read|write] principals will now only appear in - the tree, if they actually exist in the Principal backend. This should reduce - some problems people have been having with this. -* Changed: Sabre_VObject_Element_* classes are now renamed to - Sabre_VObject_Property. Old classes are retained for backwards compatibility, - but this will be removed in the future. -* Added: Sabre_VObject_FreeBusyGenerator to generate free-busy reports based on - lists of events. -* Added: Sabre_VObject_RecurrenceIterator to find all the dates and times for - recurring events. -* Fixed: Issue 97: Correctly handling RRULE for the calendar-query REPORT. -* Fixed: Issue 154: Encoding of VObject parameters with no value was incorrect. -* Added: Support for {DAV:}acl-restrictions property from RFC3744. -* Added: The contentlength for calendar objects can now be supplied by a CalDAV - backend, allowing for more optimizations. -* Fixed: Much faster implementation of Sabre_DAV_URLUtil::encodePath. -* Fixed: {DAV:}getcontentlength may now be not specified. -* Fixed: Issue 66: Using rawurldecode instead of urldecode to decode paths from - clients. This means that + will now be treated as a literal rather than a - space, and this should improve compatibility with the Windows built-in client. -* Added: Sabre_DAV_Exception_PaymentRequired exception, to emit HTTP 402 status - codes. -* Added: Some mysql unique constraints to example files. -* Fixed: Correctly formatting HTTP dates. -* Fixed: Issue 94: Sending back Last-Modified header for 304 responses. -* Added: Sabre_VObject_Component_VEvent, Sabre_VObject_Component_VJournal, - Sabre_VObject_Component_VTodo and Sabre_VObject_Component_VCalendar. -* Changed: Properties are now also automatically mapped to their appropriate - classes, if they are created using the add() or __set() methods. -* Changed: Cloning VObject objects now clones the entire tree, rather than just - the default shallow copy. -* Added: Support for recurrence expansion in the CALDAV:calendar-multiget and - CALDAV:calendar-query REPORTS. -* Changed: CalDAV PDO backend now sorts calendars based on the internal - 'calendarorder' field. -* Added: Issue 181: Carddav backends may no optionally not supply the carddata - in getCards, if etag and size are specified. This may speed up certain - requests. -* Added: More arguments to beforeWriteContent and beforeCreateFile (see - WritingPlugins wiki document). -* Added: Hook for iCalendar validation. This allows us to validate iCalendar - objects when they're uploaded. At the moment we're just validating syntax. -* Added: VObject now support Windows Timezone names correctly (thanks mrpace2). -* Added: If a timezonename could not be detected, we fall back on the default - PHP timezone. -* Added: Now a Composer package (thanks willdurand). -* Fixed: Support for \N as a newline character in the VObject reader. -* Added: afterWriteContent, afterCreateFile and afterUnbind events. -* Added: Postgresql example files. Not part of the unittests though, so use at - your own risk. -* Fixed: Issue 182: Removed backticks from sql queries, so it will work with - Postgres. - - -1.5.9 (2012-04-16) ------------------- - -* Fixed: Issue with parsing timezone identifiers that were surrounded by quotes. - (Fixes emClient compatibility). - - -1.5.8 (2012-02-22) ------------------- - -* Fixed: Issue 95: Another timezone parsing issue, this time in calendar-query. - - -1.5.7 (2012-02-19) ------------------- - -* Fixed: VObject properties are now always encoded before components. -* Fixed: Sabre_DAVACL had issues with multiple levels of privilege aggregration. -* Changed: Added 'GuessContentType' plugin to fileserver.php example. -* Fixed: The Browser plugin will now trigger the correct events when creating - files. -* Fixed: The ICSExportPlugin now considers ACL's. -* Added: Made it optional to supply carddata from an Addressbook backend when - requesting getCards. This can make some operations much faster, and could - result in much lower memory use. -* Fixed: Issue 187: Sabre_DAV_UUIDUtil was missing from includes file. -* Fixed: Issue 191: beforeUnlock was triggered twice. - - -1.5.6 (2012-01-07) ------------------- - -* Fixed: Issue 174: VObject could break UTF-8 characters. -* Fixed: pear package installation issues. - - -1.5.5 (2011-12-16) ------------------- - -* Fixed: CalDAV time-range filter workaround for recurring events. -* Fixed: Bug in Sabre_DAV_Locks_Backend_File that didn't allow multiple files to - be locked at the same time. - - -1.5.4 (2011-10-28) ------------------- - -* Fixed: GuessContentType plugin now supports mixed case file extensions. -* Fixed: DATE-TIME encoding was wrong in VObject. (we used 'DATETIME'). -* Changed: Sending back HTTP 204 after a PUT request on an existing resource - instead of HTTP 200. This should fix Evolution CardDAV client compatibility. -* Fixed: Issue 95: Parsing X-LIC-LOCATION if it's available. -* Added: All VObject elements now have a reference to their parent node. - - -1.5.3 (2011-09-28) ------------------- - -* Fixed: Sabre_DAV_Collection was missing from the includes file. -* Fixed: Issue 152. iOS 1.4.2 apparantly requires HTTP/1.1 200 OK to be in - uppercase. -* Fixed: Issue 153: Support for files with mixed newline styles in - Sabre_VObject. -* Fixed: Issue 159: Automatically converting any vcard and icalendardata to - UTF-8. -* Added: Sabre_DAV_SimpleFile class for easy static file creation. -* Added: Issue 158: Support for the CARDDAV:supported-address-data property. - - -1.5.2 (2011-09-21) ------------------- - -* Fixed: carddata and calendardata MySQL fields are now of type 'mediumblob'. - 'TEXT' was too small sometimes to hold all the data. -* Fixed: {DAV:}supported-report-set is now correctly reporting the reports for - IAddressBook. -* Added: Sabre_VObject_Property::add() to add duplicate parameters to - properties. -* Added: Issue 151: Sabre_CalDAV_ICalendar and Sabre_CalDAV_ICalendarObject - interfaces. -* Fixed: Issue 140: Not returning 201 Created if an event cancelled the creation - of a file. -* Fixed: Issue 150: Faster URLUtil::encodePath() implementation. -* Fixed: Issue 144: Browser plugin could interfere with - TemporaryFileFilterPlugin if it was loaded first. -* Added: It's not possible to specify more 'alternate uris' in principal - backends. - - -1.5.1 (2011-08-24) ------------------- - -* Fixed: Issue 137. Hiding action interface in HTML browser for non-collections. -* Fixed: addressbook-query is now correctly returned from the - {DAV:}supported-report-set property. -* Fixed: Issue 142: Bugs in groupwareserver.php example. -* Fixed: Issue 139: Rejecting PUT requests with Content-Range. - - -1.5.0 (2011-08-12) ------------------- - -* Added: CardDAV support. -* Added: An experimental WebDAV client. -* Added: MIME-Directory grouping support in the VObject library. This is very - useful for people attempting to parse vcards. -* BC Break: Adding parameters with the VObject libraries now overwrites the - previous parameter, rather than just add it. This makes more sense for 99% of - the cases. -* BC Break: lib/Sabre.autoload.php is now removed in favor of - lib/Sabre/autoload.php. -* Deprecated: Sabre_DAV_Directory is now deprecated and will be removed in a - future version. Use Sabre_DAV_Collection instead. -* Deprecated: Sabre_DAV_SimpleDirectory is now deprecated and will be removed in - a future version. Use Sabre_DAV_SimpleCollection instead. -* Fixed: Problem with overriding tablenames for the CalDAV backend. -* Added: Clark-notation parser to XML utility. -* Added: unset() support to VObject components. -* Fixed: Refactored CalDAV property fetching to be faster and simpler. -* Added: Central string-matcher for CalDAV and CardDAV plugins. -* Added: i;unicode-casemap support -* Fixed: VObject bug: wouldn't parse parameters if they weren't specified in - uppercase. -* Fixed: VObject bug: Parameters now behave more like Properties. -* Fixed: VObject bug: Parameters with no value are now correctly parsed. -* Changed: If calendars don't specify which components they allow, 'all' - components are assumed (e.g.: VEVENT, VTODO, VJOURNAL). -* Changed: Browser plugin now uses POST variable 'sabreAction' instead of - 'action' to reduce the chance of collisions. - - -1.4.4 (2011-07-07) ------------------- - -* Fixed: Issue 131: Custom CalDAV backends could break in certain cases. -* Added: The option to override the default tablename all PDO backends use. - (Issue 60). -* Fixed: Issue 124: 'File' authentication backend now takes realm into - consideration. -* Fixed: Sabre_DAV_Property_HrefList now properly deserializes. This allows - users to update the {DAV:}group-member-set property. -* Added: Helper functions for DateTime-values in Sabre_VObject package. -* Added: VObject library can now automatically map iCalendar properties to - custom classes. - - -1.4.3 (2011-04-25) ------------------- - -* Fixed: Issue 123: Added workaround for Windows 7 UNLOCK bug. -* Fixed: datatype of lastmodified field in mysql.calendars.sql. Please change - the DATETIME field to an INT to ensure this field will work correctly. -* Change: Sabre_DAV_Property_Principal is now renamed to - Sabre_DAVACL_Property_Principal. -* Added: API level support for ACL HTTP method. -* Fixed: Bug in serializing {DAV:}acl property. -* Added: deserializer for {DAV:}resourcetype property. -* Added: deserializer for {DAV:}acl property. -* Added: deserializer for {DAV:}principal property. - - -1.4.2-beta (2011-04-01) ------------------------ - -* Added: It's not possible to disable listing of nodes that are denied read - access by ACL. -* Fixed: Changed a few properties in CalDAV classes from private to protected. -* Fixed: Issue 119: Terrible things could happen when relying on guessBaseUri, - the server was running on the root of the domain and a user tried to access a - file ending in .php. This is a slight BC break. -* Fixed: Issue 118: Lock tokens in If headers without a uri should be treated as - the request uri, not 'all relevant uri's. -* Fixed: Issue 120: PDO backend was incorrectly fetching too much locks in cases - where there were similar named locked files in a directory. - - -1.4.1-beta (2011-02-26) ------------------------ - -* Fixed: Sabre_DAV_Locks_Backend_PDO returned too many locks. -* Fixed: Sabre_HTTP_Request::getHeader didn't return Content-Type when running - on apache, so a few workarounds were added. -* Change: Slightly changed CalDAV Backend API's, to allow for heavy - optimizations. This is non-bc breaking. - - -1.4.0-beta (2011-02-12) ------------------------ - -* Added: Partly RFC3744 ACL support. -* Added: Calendar-delegation (caldav-proxy) support. -* BC break: In order to fix Issue 99, a new argument had to be added to - Sabre_DAV_Locks_Backend_*::getLocks classes. Consult the classes for details. -* Deprecated: Sabre_DAV_Locks_Backend_FS is now deprecated and will be removed - in a later version. Use PDO or the new File class instead. -* Deprecated: The Sabre_CalDAV_ICalendarUtil class is now marked deprecated, and - will be removed in a future version. Please use Sabre_VObject instead. -* Removed: All principal-related functionality has been removed from the - Sabre_DAV_Auth_Plugin, and moved to the Sabre_DAVACL_Plugin. -* Added: VObject library, for easy vcard/icalendar parsing using a natural - interface. -* Added: Ability to automatically generate full .ics feeds off calendars. To - use: Add the Sabre_CalDAV_ICSExportPlugin, and add ?export to your calendar - url. -* Added: Plugins can now specify a pluginname, for easy access using - Sabre_DAV_Server::getPlugin(). -* Added: beforeGetProperties event. -* Added: updateProperties event. -* Added: Principal listings and calendar-access can now be done privately, - disallowing users from accessing or modifying other users' data. -* Added: You can now pass arrays to the Sabre_DAV_Server constructor. If it's an - array with node-objects, a Root collection will automatically be created, and - the nodes are used as top-level children. -* Added: The principal base uri is now customizable. It used to be hardcoded to - 'principals/[user]'. -* Added: getSupportedReportSet method in ServerPlugin class. This allows you to - easily specify which reports you're implementing. -* Added: A '..' link to the HTML browser. -* Fixed: Issue 99: Locks on child elements were ignored when their parent nodes - were deleted. -* Fixed: Issue 90: lockdiscovery property and LOCK response now include a - {DAV}lockroot element. -* Fixed: Issue 96: support for 'default' collation in CalDAV text-match filters. -* Fixed: Issue 102: Ensuring that copy and move with identical source and - destination uri's fails. -* Fixed: Issue 105: Supporting MKCALENDAR with no body. -* Fixed: Issue 109: Small fixes in Sabre_HTTP_Util. -* Fixed: Issue 111: Properly catching the ownername in a lock (if it's a string) -* Fixed: Sabre_DAV_ObjectTree::nodeExist always returned false for the root - node. -* Added: Global way to easily supply new resourcetypes for certain node classes. -* Fixed: Issue 59: Allowing the user to override the authentication realm in - Sabre_CalDAV_Server. -* Update: Issue 97: Looser time-range checking if there's a recurrence rule in - an event. This fixes 'missing recurring events'. - - -1.3.0 (2010-10-14) ------------------- - -* Added: childExists method to Sabre_DAV_ICollection. This is an api break, so - if you implement Sabre_DAV_ICollection directly, add the method. -* Changed: Almost all HTTP method implementations now take a uri argument, - including events. This allows for internal rerouting of certain calls. If you - have custom plugins, make sure they use this argument. If they don't, they - will likely still work, but it might get in the way of future changes. -* Changed: All getETag methods MUST now surround the etag with double-quotes. - This was a mistake made in all previous SabreDAV versions. If you don't do - this, any If-Match, If-None-Match and If: headers using Etags will work - incorrectly. (Issue 85). -* Added: Sabre_DAV_Auth_Backend_AbstractBasic class, which can be used to easily - implement basic authentication. -* Removed: Sabre_DAV_PermissionDenied class. Use Sabre_DAV_Forbidden instead. -* Removed: Sabre_DAV_IDirectory interface, use Sabre_DAV_ICollection instead. -* Added: Browser plugin now uses {DAV:}displayname if this property is - available. -* Added: Cache layer in the ObjectTree. -* Added: Tree classes now have a delete and getChildren method. -* Fixed: If-Modified-Since and If-Unmodified-Since would be incorrect if the - date is an exact match. -* Fixed: Support for multiple ETags in If-Match and If-None-Match headers. -* Fixed: Improved baseUrl handling. -* Fixed: Issue 67: Non-seekable stream support in ::put()/::get(). -* Fixed: Issue 65: Invalid dates are now ignored. -* Updated: Refactoring in Sabre_CalDAV to make everything a bit more ledgable. -* Fixed: Issue 88, Issue 89: Fixed compatibility for running SabreDAV on - Windows. -* Fixed: Issue 86: Fixed Content-Range top-boundary from 'file size' to 'file - size'-1. - - -1.2.5 (2010-08-18) ------------------- - -* Fixed: Issue 73: guessBaseUrl fails for some servers. -* Fixed: Issue 67: SabreDAV works better with non-seekable streams. -* Fixed: If-Modified-Since and If-Unmodified-Since would be incorrect if - the date is an exact match. - - -1.2.4 (2010-07-13) ------------------- - -* Fixed: Issue 62: Guessing baseUrl fails when url contains a query-string. -* Added: Apache configuration sample for CGI/FastCGI setups. -* Fixed: Issue 64: Only returning calendar-data when it was actually requested. - - -1.2.3 (2010-06-26) ------------------- - -* Fixed: Issue 57: Supporting quotes around etags in If-Match and If-None-Match - - -1.2.2 (2010-06-21) ------------------- - -* Updated: SabreDAV now attempts to guess the BaseURI if it's not set. -* Updated: Better compatibility with BitKinex -* Fixed: Issue 56: Incorrect behaviour for If-None-Match headers and GET - requests. -* Fixed: Issue with certain encoded paths in Browser Plugin. - - -1.2.1 (2010-06-07) ------------------- - -* Fixed: Issue 50, patch by Mattijs Hoitink. -* Fixed: Issue 51, Adding windows 7 lockfiles to TemporaryFileFilter. -* Fixed: Issue 38, Allowing custom filters to be added to TemporaryFileFilter. -* Fixed: Issue 53, ETags in the If: header were always failing. This behaviour - is now corrected. -* Added: Apache Authentication backend, in case authentication through .htaccess - is desired. -* Updated: Small improvements to example files. - - -1.2.0 (2010-05-24) ------------------- - -* Fixed: Browser plugin now displays international characters. -* Changed: More properties in CalDAV classes are now protected instead of - private. - - -1.2.0beta3 (2010-05-14) ------------------------ - -* Fixed: Custom properties were not properly sent back for allprops requests. -* Fixed: Issue 49, incorrect parsing of PROPPATCH, affecting Office 2007. -* Changed: Removed CalDAV items from includes.php, and added a few missing ones. - - -1.2.0beta2 (2010-05-04) ------------------------ - -* Fixed: Issue 46: Fatal error for some non-existent nodes. -* Updated: some example sql to include email address. -* Added: 208 and 508 statuscodes from RFC5842. -* Added: Apache2 configuration examples - - -1.2.0beta1 (2010-04-28) ------------------------ - -* Fixed: redundant namespace declaration in resourcetypes. -* Fixed: 2 locking bugs triggered by litmus when no Sabre_DAV_ILockable - interface is used. -* Changed: using http://sabredav.org/ns for all custom xml properties. -* Added: email address property to principals. -* Updated: CalendarObject validation. - - -1.2.0alpha4 (2010-04-24) ------------------------- - -* Added: Support for If-Range, If-Match, If-None-Match, If-Modified-Since, - If-Unmodified-Since. -* Changed: Brand new build system. Functionality is split up between Sabre, - Sabre_HTTP, Sabre_DAV and Sabre_CalDAV packages. In addition to that a new - non-pear package will be created with all this functionality combined. -* Changed: Autoloader moved to Sabre/autoload.php. -* Changed: The Allow: header is now more accurate, with appropriate HTTP methods - per uri. -* Changed: Now throwing back Sabre_DAV_Exception_MethodNotAllowed on a few - places where Sabre_DAV_Exception_NotImplemented was used. - - -1.2.0alpha3 (2010-04-20) ------------------------- - -* Update: Complete rewrite of property updating. Now easier to use and atomic. -* Fixed: Issue 16, automatically adding trailing / to baseUri. -* Added: text/plain is used for .txt files in GuessContentType plugin. -* Added: support for principal-property-search and principal-search-property-set - reports. -* Added: Issue 31: Hiding exception information by default. Can be turned on - with the Sabre_DAV_Server::$debugExceptions property. - - -1.2.0alpha2 (2010-04-08) ------------------------- - -* Added: Calendars are now private and can only be read by the owner. -* Fixed: double namespace declaration in multistatus responses. -* Added: MySQL database dumps. MySQL is now also supported next to SQLite. -* Added: expand-properties REPORT from RFC 3253. -* Added: Sabre_DAV_Property_IHref interface for properties exposing urls. -* Added: Issue 25: Throwing error on broken Finder behaviour. -* Changed: Authentication backend is now aware of current user. - - -1.2.0alpha1 (2010-03-31) ------------------------- - -* Fixed: Issue 26: Workaround for broken GVFS behaviour with encoded special - characters. -* Fixed: Issue 34: Incorrect Lock-Token response header for LOCK. Fixes Office - 2010 compatibility. -* Added: Issue 35: SabreDAV version to header to OPTIONS response to ease - debugging. -* Fixed: Issue 36: Incorrect variable name, throwing error in some requests. -* Fixed: Issue 37: Incorrect smultron regex in temporary filefilter. -* Fixed: Issue 33: Converting ISO-8859-1 characters to UTF-8. -* Fixed: Issue 39 & Issue 40: Basename fails on non-utf-8 locales. -* Added: More unittests. -* Added: SabreDAV version to all error responses. -* Added: URLUtil class for decoding urls. -* Changed: Now using pear.sabredav.org pear channel. -* Changed: Sabre_DAV_Server::getCopyAndMoveInfo is now a public method. - - -1.1.2-alpha (2010-03-18) ------------------------- - -* Added: RFC5397 - current-user-principal support. -* Fixed: Issue 27: encoding entities in property responses. -* Added: naturalselection script now allows the user to specify a 'minimum - number of bytes' for deletion. This should reduce load due to less crawling -* Added: Full support for the calendar-query report. -* Added: More unittests. -* Added: Support for complex property deserialization through the static - ::unserialize() method. -* Added: Support for modifying calendar-component-set -* Fixed: Issue 29: Added TIMEOUT_INFINITE constant - - -1.1.1-alpha (2010-03-11) ------------------------- - -* Added: RFC5689 - Extended MKCOL support. -* Fixed: Evolution support for CalDAV. -* Fixed: PDO-locks backend was pretty much completely broken. This is 100% - unittested now. -* Added: support for ctags. -* Fixed: Comma's between HTTP methods in 'Allow' method. -* Changed: default argument for Sabre_DAV_Locks_Backend_FS. This means a - datadirectory must always be specified from now on. -* Changed: Moved Sabre_DAV_Server::parseProps to - Sabre_DAV_XMLUtil::parseProperties. -* Changed: Sabre_DAV_IDirectory is now Sabre_DAV_ICollection. -* Changed: Sabre_DAV_Exception_PermissionDenied is now - Sabre_DAV_Exception_Forbidden. -* Changed: Sabre_CalDAV_ICalendarCollection is removed. -* Added: Sabre_DAV_IExtendedCollection. -* Added: Many more unittests. -* Added: support for calendar-timezone property. - - -1.1.0-alpha (2010-03-01) ------------------------- - -* Note: This version is forked from version 1.0.5, so release dates may be out - of order. -* Added: CalDAV - RFC 4791 -* Removed: Sabre_PHP_Exception. PHP has a built-in ErrorException for this. -* Added: PDO authentication backend. -* Added: Example sql for auth, caldav, locks for sqlite. -* Added: Sabre_DAV_Browser_GuessContentType plugin -* Changed: Authentication plugin refactored, making it possible to implement - non-digest authentication. -* Fixed: Better error display in browser plugin. -* Added: Support for {DAV:}supported-report-set -* Added: XML utility class with helper functions for the WebDAV protocol. -* Added: Tons of unittests -* Added: PrincipalCollection and Principal classes -* Added: Sabre_DAV_Server::getProperties for easy property retrieval -* Changed: {DAV:}resourceType defaults to 0 -* Changed: Any non-null resourceType now gets a / appended to the href value. - Before this was just for {DAV:}collection's, but this is now also the case for - for example {DAV:}principal. -* Changed: The Href property class can now optionally create non-relative uri's. -* Changed: Sabre_HTTP_Response now returns false if headers are already sent and - header-methods are called. -* Fixed: Issue 19: HEAD requests on Collections -* Fixed: Issue 21: Typo in Sabre_DAV_Property_Response -* Fixed: Issue 18: Doesn't work with Evolution Contacts - - -1.0.15 (2010-05-28) -------------------- - -* Added: Issue 31: Hiding exception information by default. Can be turned on - with the Sabre_DAV_Server::$debugExceptions property. -* Added: Moved autoload from lib/ to lib/Sabre/autoload.php. This is also the - case in the upcoming 1.2.0, so it will improve future compatibility. - - -1.0.14 (2010-04-15) -------------------- - -* Fixed: double namespace declaration in multistatus responses. - - -1.0.13 (2010-03-30) -------------------- - -* Fixed: Issue 40: Last references to basename/dirname - - -1.0.12 (2010-03-30) -------------------- - -* Fixed: Issue 37: Incorrect smultron regex in temporary filefilter. -* Fixed: Issue 26: Workaround for broken GVFS behaviour with encoded special - characters. -* Fixed: Issue 33: Converting ISO-8859-1 characters to UTF-8. -* Fixed: Issue 39: Basename fails on non-utf-8 locales. -* Added: More unittests. -* Added: SabreDAV version to all error responses. -* Added: URLUtil class for decoding urls. -* Updated: Now using pear.sabredav.org pear channel. - - -1.0.11 (2010-03-23) -------------------- - -* Non-public release. This release is identical to 1.0.10, but it is used to - test releasing packages to pear.sabredav.org. - - -1.0.10 (2010-03-22) -------------------- - -* Fixed: Issue 34: Invalid Lock-Token header response. -* Added: Issue 35: Adding SabreDAV version to HTTP OPTIONS responses. - - -1.0.9 (2010-03-19) ------------------- - -* Fixed: Issue 27: Entities not being encoded in PROPFIND responses. -* Fixed: Issue 29: Added missing TIMEOUT_INFINITE constant. - - -1.0.8 (2010-03-03) ------------------- - -* Fixed: Issue 21: typos causing errors -* Fixed: Issue 23: Comma's between methods in Allow header. -* Added: Sabre_DAV_ICollection interface, to aid in future compatibility. -* Added: Sabre_DAV_Exception_Forbidden exception. This will replace - Sabre_DAV_Exception_PermissionDenied in the future, and can already be used to - ensure future compatibility. - - -1.0.7 (2010-02-24) ------------------- - -* Fixed: Issue 19 regression for MS Office - - -1.0.6 (2010-02-23) ------------------- - -* Fixed: Issue 19: HEAD requests on Collections - - -1.0.5 (2010-01-22) ------------------- - -* Fixed: Fatal error when a malformed url was used for unlocking, in conjuction - with Sabre.autoload.php due to a incorrect filename. -* Fixed: Improved unittests and build system - - -1.0.4 (2010-01-11) ------------------- - -* Fixed: needed 2 different releases. One for googlecode and one for pearfarm. - This is to retain the old method to install SabreDAV until pearfarm becomes - the standard installation method. - - -1.0.3 (2010-01-11) ------------------- - -* Added: RFC4709 support (davmount) -* Added: 6 unittests -* Added: naturalselection. A tool to keep cache directories below a specified - theshold. -* Changed: Now using pearfarm.org channel server. - - -1.0.1 (2009-12-22) ------------------- - -* Fixed: Issue 15: typos in examples -* Fixed: Minor pear installation issues - - -1.0.0 (2009-11-02) ------------------- - -* Added: SimpleDirectory class. This class allows creating static directory - structures with ease. -* Changed: Custom complex properties and exceptions now get an instance of - Sabre_DAV_Server as their first argument in serialize() -* Changed: Href complex property now prepends server's baseUri -* Changed: delete before an overwriting copy/move is now handles by server class - instead of tree classes -* Changed: events must now explicitly return false to stop execution. Before, - execution would be stopped by anything loosely evaluating to false. -* Changed: the getPropertiesForPath method now takes a different set of - arguments, and returns a different response. This allows plugin developers to - return statuses for properties other than 200 and 404. The hrefs are now also - always calculated relative to the baseUri, and not the uri of the request. -* Changed: generatePropFindResponse is renamed to generateMultiStatus, and now - takes a list of properties similar to the response of getPropertiesForPath. - This was also needed to improve flexibility for plugin development. -* Changed: Auth plugins are no longer included. They were not yet stable - quality, so they will probably be reintroduced in a later version. -* Changed: PROPPATCH also used generateMultiStatus now. -* Removed: unknownProperties event. This is replaced by the afterGetProperties - event, which should provide more flexibility. -* Fixed: Only calling getSize() on IFile instances in httpHead() -* Added: beforeBind event. This is invoked upon file or directory creation -* Added: beforeWriteContent event, this is invoked by PUT and LOCK on an - existing resource. -* Added: beforeUnbind event. This is invoked right before deletion of any - resource. -* Added: afterGetProperties event. This event can be used to make modifications - to property responses. -* Added: beforeLock and beforeUnlock events. -* Added: afterBind event. -* Fixed: Copy and Move could fail in the root directory. This is now fixed. -* Added: Plugins can now be retrieved by their classname. This is useful for - inter-plugin communication. -* Added: The Auth backend can now return usernames and user-id's. -* Added: The Auth backend got a getUsers method -* Added: Sabre_DAV_FSExt_Directory now returns quota info - - -0.12.1-beta (2009-09-11) ------------------------- - -* Fixed: UNLOCK bug. Unlock didn't work at all - - -0.12-beta (2009-09-10) ----------------------- - -* Updated: Browser plugin now shows multiple {DAV:}resourcetype values if - available. -* Added: Experimental PDO backend for Locks Manager -* Fixed: Sending Content-Length: 0 for every empty response. This improves NGinx - compatibility. -* Fixed: Last modification time is reported in UTC timezone. This improves - Finder compatibility. - - -0.11-beta (2009-08-11) ----------------------- - -* Updated: Now in Beta -* Updated: Pear package no longer includes docs/ directory. These just contained - rfc's, which are publicly available. This reduces the package from ~800k to - ~60k -* Added: generatePropfindResponse now takes a baseUri argument -* Added: ResourceType property can now contain multiple resourcetypes. -* Fixed: Issue 13. - - -0.10-alpha (2009-08-03) ------------------------ - -* Added: Plugin to automatically map GET requests to non-files to PROPFIND - (Sabre_DAV_Browser_MapGetToPropFind). This should allow easier debugging of - complicated WebDAV setups. -* Added: Sabre_DAV_Property_Href class. For future use. -* Added: Ability to choose to use auth-int, auth or both for HTTP Digest - authentication. (Issue 11) -* Changed: Made more methods in Sabre_DAV_Server public. -* Fixed: TemporaryFileFilter plugin now intercepts HTTP LOCK requests to - non-existent files. (Issue 12) -* Added: Central list of defined xml namespace prefixes. This can reduce - Bandwidth and legibility for xml bodies with user-defined namespaces. -* Added: now a PEAR-compatible package again, thanks to Michael Gauthier -* Changed: moved default copy and move logic from ObjectTree to Tree class - -0.9a-alpha (2009-07-21) ----------------------- - -* Fixed: Broken release - -0.9-alpha (2009-07-21) ----------------------- - -* Changed: Major refactoring, removed most of the logic from the Tree objects. - The Server class now directly works with the INode, IFile and IDirectory - objects. If you created your own Tree objects, this will most likely break in - this release. -* Changed: Moved all the Locking logic from the Tree and Server classes into a - separate plugin. -* Changed: TemporaryFileFilter is now a plugin. -* Added: Comes with an autoloader script. This can be used instead of the - includer script, and is preferred by some people. -* Added: AWS Authentication class. -* Added: simpleserversetup.py script. This will quickly get a fileserver up and - running. -* Added: When subscribing to events, it is now possible to supply a priority. - This is for example needed to ensure that the Authentication Plugin is used - before any other Plugin. -* Added: 22 new tests. -* Added: Users-manager plugin for .htdigest files. Experimental and subject to - change. -* Added: RFC 2324 HTTP 418 status code -* Fixed: Exclusive locks could in some cases be picked up as shared locks -* Fixed: Digest auth for non-apache servers had a bug (still not actually tested - this well). - - -0.8-alpha (2009-05-30) ----------------------- - -* Changed: Renamed all exceptions! This is a compatibility break. Every - Exception now follows Sabre_DAV_Exception_FileNotFound convention instead of - Sabre_DAV_FileNotFoundException. -* Added: Browser plugin now allows uploading and creating directories straight - from the browser. -* Added: 12 more unittests -* Fixed: Locking bug, which became prevalent on Windows Vista. -* Fixed: Netdrive support -* Fixed: TemporaryFileFilter filtered out too many files. Fixed some of the - regexes. -* Fixed: Added README and ChangeLog to package - - -0.7-alpha (2009-03-29) ----------------------- - -* Added: System to return complex properties from PROPFIND. -* Added: support for {DAV:}supportedlock. -* Added: support for {DAV:}lockdiscovery. -* Added: 6 new tests. -* Added: New plugin system. -* Added: Simple HTML directory plugin, for browser access. -* Added: Server class now sends back standard pre-condition error xml bodies. - This was new since RFC4918. -* Added: Sabre_DAV_Tree_Aggregate, which can 'host' multiple Tree objects into - one. -* Added: simple basis for HTTP REPORT method. This method is not used yet, but - can be used by plugins to add reports. -* Changed: ->getSize is only called for files, no longer for collections. r303 -* Changed: Sabre_DAV_FilterTree is now Sabre_DAV_Tree_Filter -* Changed: Sabre_DAV_TemporaryFileFilter is now called - Sabre_DAV_Tree_TemporaryFileFilter. -* Changed: removed functions (get(/set)HTTPRequest(/Response)) from Server - class, and using a public property instead. -* Fixed: bug related to parsing proppatch and propfind requests. Didn't show up - in most clients, but it needed fixing regardless. (r255) -* Fixed: auth-int is now properly supported within HTTP Digest. -* Fixed: Using application/xml for a mimetype vs. text/xml as per RFC4918 sec - 8.2. -* Fixed: TemporaryFileFilter now lets through GET's if they actually exist on - the backend. (r274) -* Fixed: Some methods didn't get passed through in the FilterTree (r283). -* Fixed: LockManager is now slightly more complex, Tree classes slightly less. - (r287) - - -0.6-alpha (2009-02-16) ----------------------- - -* Added: Now uses streams for files, instead of strings. This means it won't - require to hold entire files in memory, which can be an issue if you're - dealing with big files. Note that this breaks compatibility for put() and - createFile methods. -* Added: HTTP Digest Authentication helper class. -* Added: Support for HTTP Range header -* Added: Support for ETags within If: headers -* Added: The API can now return ETags and override the default Content-Type -* Added: starting with basic framework for unittesting, using PHPUnit. -* Added: 49 unittests. -* Added: Abstraction for the HTTP request. -* Updated: Using Clark Notation for tags in properties. This means tags are - serialized as {namespace}tagName instead of namespace#tagName -* Fixed: HTTP_BasicAuth class now works as expected. -* Fixed: DAV_Server uses / for a default baseUrl. -* Fixed: Last modification date is no longer ignored in PROPFIND. -* Fixed: PROPFIND now sends back information about the requestUri even when - "Depth: 1" is specified. - - -0.5-alpha (2009-01-14) ----------------------- - -* Added: Added a very simple example for implementing a mapping to PHP file - streams. This should allow easy implementation of for example a WebDAV to FTP - proxy. -* Added: HTTP Basic Authentication helper class. -* Added: Sabre_HTTP_Response class. This centralizes HTTP operations and will be - a start towards the creating of a testing framework. -* Updated: Backwards compatibility break: all require_once() statements are - removed from all the files. It is now recommended to use autoloading of - classes, or just including lib/Sabre.includes.php. This fix was made to allow - easier integration into applications not using this standard inclusion model. -* Updated: Better in-file documentation. -* Updated: Sabre_DAV_Tree can now work with Sabre_DAV_LockManager. -* Updated: Fixes a shared-lock bug. -* Updated: Removed ?> from the bottom of each php file. -* Updated: Split up some operations from Sabre_DAV_Server to - Sabre_HTTP_Response. -* Fixed: examples are now actually included in the pear package. - - -0.4-alpha (2008-11-05) ----------------------- - -* Passes all litmus tests! -* Added: more examples -* Added: Custom property support -* Added: Shared lock support -* Added: Depth support to locks -* Added: Locking on unmapped urls (non-existent nodes) -* Fixed: Advertising as WebDAV class 3 support - - -0.3-alpha (2008-06-29) ----------------------- - -* Fully working in MS Windows clients. -* Added: temporary file filter: support for smultron files. -* Added: Phing build scripts -* Added: PEAR package -* Fixed: MOVE bug identified using finder. -* Fixed: Using gzuncompress instead of gzdecode in the temporary file filter. - This seems more common. - - -0.2-alpha (2008-05-27) ----------------------- - -* Somewhat working in Windows clients -* Added: Working PROPPATCH method (doesn't support custom properties yet) -* Added: Temporary filename handling system -* Added: Sabre_DAV_IQuota to return quota information -* Added: PROPFIND now reads the request body and only supplies the requested - properties - - -0.1-alpha (2008-04-04) ----------------------- - -* First release! -* Passes litmus: basic, http and copymove test. -* Fully working in Finder and DavFS2. - -Project started: 2007-12-13 - -[vobj]: http://sabre.io/vobject/ -[evnt]: http://sabre.io/event/ -[http]: http://sabre.io/http/ -[uri]: http://sabre.io/uri/ -[xml]: http://sabre.io/xml/ -[mi20]: http://sabre.io/dav/upgrade/1.8-to-2.0/ -[rfc6638]: http://tools.ietf.org/html/rfc6638 "CalDAV Scheduling" -[rfc7240]: http://tools.ietf.org/html/rfc7240 -[calendar-availability]: https://tools.ietf.org/html/draft-daboo-calendar-availability-05 diff --git a/htdocs/includes/sabre/sabre/dav/CONTRIBUTING.md b/htdocs/includes/sabre/sabre/dav/CONTRIBUTING.md deleted file mode 100644 index b937db64f32..00000000000 --- a/htdocs/includes/sabre/sabre/dav/CONTRIBUTING.md +++ /dev/null @@ -1,109 +0,0 @@ -Contributing to sabre projects -============================== - -Want to contribute to sabre/dav? Here are some guidelines to ensure your patch -gets accepted. - - -Building a new feature? Contact us first ----------------------------------------- - -We may not want to accept every feature that comes our way. Sometimes -features are out of scope for our projects. - -We don't want to waste your time, so by having a quick chat with us first, -you may find out quickly if the feature makes sense to us, and we can give -some tips on how to best build the feature. - -If we don't accept the feature, it could be for a number of reasons. For -instance, we've rejected features in the past because we felt uncomfortable -assuming responsibility for maintaining the feature. - -In those cases, it's often possible to keep the feature separate from the -sabre projects. sabre/dav for instance has a plugin system, and there's no -reason the feature can't live in a project you own. - -In that case, definitely let us know about your plugin as well, so we can -feature it on [sabre.io][4]. - -We are often on [IRC][5], in the #sabredav channel on freenode. If there's -no one there, post a message on the [mailing list][6]. - - -Coding standards ----------------- - -sabre projects follow: - -1. [PSR-1][1] -2. [PSR-4][2] - -sabre projects don't follow [PSR-2][3]. - -In addition to that, here's a list of basic rules: - -1. PHP 5.4 array syntax must be used every where. This means you use `[` and - `]` instead of `array(` and `)`. -2. Use PHP namespaces everywhere. -3. Use 4 spaces for indentation. -4. Try to keep your lines under 80 characters. This is not a hard rule, as - there are many places in the source where it felt more sensibile to not - do so. In particular, function declarations are never split over multiple - lines. -5. Opening braces (`{`) are _always_ on the same line as the `class`, `if`, - `function`, etc. they belong to. -6. `public` must be omitted from method declarations. It must also be omitted - for static properties. -7. All files should use unix-line endings (`\n`). -8. Files must omit the closing php tag (`?>`). -9. `true`, `false` and `null` are always lower-case. -10. Constants are always upper-case. -11. Any of the rules stated before may be broken where this is the pragmatic - thing to do. - - -Unit test requirements ----------------------- - -Any new feature or change requires unittests. We use [PHPUnit][7] for all our -tests. - -Adding unittests will greatly increase the likelyhood of us quickly accepting -your pull request. If unittests are not included though for whatever reason, -we'd still _love_ your pull request. - -We may have to write the tests ourselves, which can increase the time it takes -to accept the patch, but we'd still really like your contribution! - -To run the testsuite jump into the directory `cd tests` and trigger `phpunit`. -Make sure you did a `composer install` beforehand. - -Release process ---------------- - -Generally, these are the steps taken to do releases. - -1. Update the changelog. Every repo will have a `CHANGELOG.md` file. This file - should have a new version, and contain all the changes since the last - release. I generally run a `git diff` to figure out if I missed any changes. - This file should also have the current date. -2. If there were BC breaks, this usually now means a major version bump. -3. Ensure that `lib/Version.php` or `lib/DAV/Version.php` also matches this - version number. -4. Tag the release (Example `git tag 3.0.1` and push the tag (`git push --tags`). -5. (only for the sabre/dav project), create a zip distribution. Run - `php bin/build.php`. -6. For the relevant project, go to github and click the 'releases' tab. On this - tab I create the release with the relevant version. I also set the - description of the release to the same information of the changelog. In the - case of the `sabre/dav` project I also upload the zip distribution here. -7. Write a blog post on sabre.io. This also automatically updates twitter. - - -[1]: http://www.php-fig.org/psr/psr-1/ -[2]: http://www.php-fig.org/psr/psr-4/ -[3]: http://www.php-fig.org/psr/psr-2/ -[4]: http://sabre.io/ -[5]: irc://freenode.net/#sabredav -[6]: http://groups.google.com/group/sabredav-discuss -[7]: http://phpunit.de/ diff --git a/htdocs/includes/sabre/sabre/dav/README.md b/htdocs/includes/sabre/sabre/dav/README.md index a06805443ae..32ca1c3fa7b 100644 --- a/htdocs/includes/sabre/sabre/dav/README.md +++ b/htdocs/includes/sabre/sabre/dav/README.md @@ -14,16 +14,17 @@ http://sabre.io/ Build status ------------ -| branch | status | minimum PHP version | -| ------------ | ------ | ------------------- | -| master | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=master)](https://travis-ci.org/sabre-io/dav) | PHP 7.0 | -| 3.1 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=3.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.5 | -| 3.0 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=3.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 | -| 2.1 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=2.1)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 | -| 2.0 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=2.0)](https://travis-ci.org/sabre-io/dav) | PHP 5.4 | -| 1.8 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.8)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 | -| 1.7 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.7)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 | -| 1.6 | [![Build Status](https://travis-ci.org/sabre-io/dav.svg?branch=1.6)](https://travis-ci.org/sabre-io/dav) | PHP 5.3 | +| branch | status | PHP version | +|------------|---------------------------------------------------------------------------|--------------------| +| master 4.* | ![CI](https://github.com/sabre-io/dav/actions/workflows/ci.yml/badge.svg) | PHP 7.1 up, 8.0 up | +| 3.2 | unmaintained | PHP 5.5 to 7.1 | +| 3.1 | unmaintained | PHP 5.5 | +| 3.0 | unmaintained | PHP 5.4 | +| 2.1 | unmaintained | PHP 5.4 | +| 2.0 | unmaintained | PHP 5.4 | +| 1.8 | unmaintained | PHP 5.3 | +| 1.7 | unmaintained | PHP 5.3 | +| 1.6 | unmaintained | PHP 5.3 | Documentation ------------- diff --git a/htdocs/includes/sabre/sabre/dav/bin/build.php b/htdocs/includes/sabre/sabre/dav/bin/build.php index 54174a777d9..4dd25d9c959 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/build.php +++ b/htdocs/includes/sabre/sabre/dav/bin/build.php @@ -32,7 +32,7 @@ if ($argc > 2) { if (!isset($tasks[$currentTask])) { echo 'Task not found: ', $currentTask, "\n"; - die(1); + exit(1); } // Creating the dependency graph @@ -43,7 +43,7 @@ while (count($oldTaskList) > 0) { foreach ($oldTaskList as $task => $foo) { if (!isset($tasks[$task])) { echo 'Dependency not found: '.$task, "\n"; - die(1); + exit(1); } $dependencies = $tasks[$task]; @@ -107,7 +107,7 @@ function test() system(__DIR__.'/phpunit --configuration '.$baseDir.'/tests/phpunit.xml.dist --stop-on-failure', $code); if (0 != $code) { echo "PHPUnit reported error code $code\n"; - die(1); + exit(1); } } @@ -139,7 +139,7 @@ function buildzip() system('cd build/SabreDAV; composer install -n', $code); if (0 !== $code) { echo "Composer reported error code $code\n"; - die(1); + exit(1); } echo " Removing pointless files\n"; diff --git a/htdocs/includes/sabre/sabre/dav/bin/migrateto20.php b/htdocs/includes/sabre/sabre/dav/bin/migrateto20.php index c7a8d9e350d..fb24fe599d1 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/migrateto20.php +++ b/htdocs/includes/sabre/sabre/dav/bin/migrateto20.php @@ -72,7 +72,7 @@ switch ($driver) { break; default: echo 'Error: unsupported driver: '.$driver."\n"; - die(-1); + exit(-1); } foreach (['calendar', 'addressbook'] as $itemType) { @@ -130,7 +130,6 @@ foreach (['calendar', 'addressbook'] as $itemType) { break; case 'sqlite': - $pdo->exec("ALTER TABLE $tableName RENAME TO $tableNameOld"); switch ($itemType) { @@ -370,7 +369,6 @@ CREATE TABLE cards ( break; case 'sqlite': - $pdo->exec(' CREATE TABLE cards ( id integer primary key asc, @@ -395,7 +393,6 @@ CREATE TABLE cards ( break; case 'sqlite': - $pdo->exec(' ALTER TABLE cards ADD etag text; ALTER TABLE cards ADD size integer; diff --git a/htdocs/includes/sabre/sabre/dav/bin/migrateto21.php b/htdocs/includes/sabre/sabre/dav/bin/migrateto21.php index 90964358380..2c15b0a217e 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/migrateto21.php +++ b/htdocs/includes/sabre/sabre/dav/bin/migrateto21.php @@ -73,7 +73,7 @@ switch ($driver) { break; default: echo 'Error: unsupported driver: '.$driver."\n"; - die(-1); + exit(-1); } echo "Upgrading 'calendarobjects'\n"; diff --git a/htdocs/includes/sabre/sabre/dav/bin/migrateto30.php b/htdocs/includes/sabre/sabre/dav/bin/migrateto30.php index 25e544c2ad2..9798cadd259 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/migrateto30.php +++ b/htdocs/includes/sabre/sabre/dav/bin/migrateto30.php @@ -72,7 +72,7 @@ switch ($driver) { break; default: echo 'Error: unsupported driver: '.$driver."\n"; - die(-1); + exit(-1); } echo "Upgrading 'propertystorage'\n"; diff --git a/htdocs/includes/sabre/sabre/dav/bin/migrateto32.php b/htdocs/includes/sabre/sabre/dav/bin/migrateto32.php index 57fd3550761..09ac55d13ee 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/migrateto32.php +++ b/htdocs/includes/sabre/sabre/dav/bin/migrateto32.php @@ -75,7 +75,7 @@ switch ($driver) { break; default: echo 'Error: unsupported driver: '.$driver."\n"; - die(-1); + exit(-1); } echo "Creating 'calendarinstances'\n"; diff --git a/htdocs/includes/sabre/sabre/dav/bin/sabredav.php b/htdocs/includes/sabre/sabre/dav/bin/sabredav.php index 28341b587c9..71047b8f8b9 100755 --- a/htdocs/includes/sabre/sabre/dav/bin/sabredav.php +++ b/htdocs/includes/sabre/sabre/dav/bin/sabredav.php @@ -20,7 +20,7 @@ class CliLog $log = new CliLog(); if ('cli-server' !== php_sapi_name()) { - die('This script is intended to run on the built-in php webserver'); + exit('This script is intended to run on the built-in php webserver'); } // Finding composer diff --git a/htdocs/includes/sabre/sabre/dav/composer.json b/htdocs/includes/sabre/sabre/dav/composer.json index c7e6184a32b..6e9b9cb6b39 100644 --- a/htdocs/includes/sabre/sabre/dav/composer.json +++ b/htdocs/includes/sabre/sabre/dav/composer.json @@ -14,10 +14,10 @@ } ], "require": { - "php": ">=7.0.0", - "sabre/vobject": "^4.2.2", - "sabre/event" : "^5.0", - "sabre/xml" : "^2.2.5", + "php": "^7.1.0 || ^8.0", + "sabre/vobject": "^4.5.1", + "sabre/event" : "^5.0.0", + "sabre/xml" : "^2.5.5", "sabre/http" : "^5.0.5", "sabre/uri" : "^2.2.3", "ext-dom": "*", @@ -29,11 +29,13 @@ "ext-date" : "*", "ext-iconv" : "*", "lib-libxml" : ">=2.7.0", - "psr/log": "^1.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", "ext-json": "*" }, "require-dev" : { - "phpunit/phpunit" : "^6", + "friendsofphp/php-cs-fixer": "^2.17.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0", "evert/phpdoc-md" : "~0.1.0", "monolog/monolog": "^1.18" }, @@ -50,6 +52,17 @@ "Sabre\\CardDAV\\" : "lib/CardDAV/" } }, + "autoload-dev" : { + "psr-4" : { + "Sabre\\" : "tests/Sabre/", + "Sabre\\CalDAV\\" : "tests/Sabre/CalDAV", + "Sabre\\CardDAV\\" : "tests/Sabre/CardDAV", + "Sabre\\DAV\\" : "tests/Sabre/DAV", + "Sabre\\DAV\\Property\\" : "tests/Sabre/DAV/Xml/Property", + "Sabre\\DAVACL\\" : "tests/Sabre/DAVACL", + "Sabre\\HTTP\\" : "tests/Sabre/HTTP" + } + }, "support" : { "forum" : "https://groups.google.com/group/sabredav-discuss", "source" : "https://github.com/fruux/sabre-dav" @@ -58,7 +71,20 @@ "bin/sabredav", "bin/naturalselection" ], - "config" : { - "bin-dir" : "./bin" + "scripts": { + "phpstan": [ + "phpstan analyse lib tests" + ], + "cs-fixer": [ + "php-cs-fixer fix" + ], + "phpunit": [ + "phpunit --configuration tests/phpunit.xml" + ], + "test": [ + "composer phpstan", + "composer cs-fixer", + "composer phpunit" + ] } } diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php index 336e104c8ed..c32c86489da 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/AbstractBackend.php @@ -30,8 +30,7 @@ abstract class AbstractBackend implements BackendInterface * * Read the PropPatch documentation for more info and examples. * - * @param mixed $calendarId - * @param \Sabre\DAV\PropPatch $propPatch + * @param mixed $calendarId */ public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch) { @@ -46,7 +45,6 @@ abstract class AbstractBackend implements BackendInterface * If the backend supports this, it may allow for some speed-ups. * * @param mixed $calendarId - * @param array $uris * * @return array */ @@ -103,7 +101,6 @@ abstract class AbstractBackend implements BackendInterface * to think of. * * @param mixed $calendarId - * @param array $filters * * @return array */ @@ -125,9 +122,6 @@ abstract class AbstractBackend implements BackendInterface * This method validates if a filter (as passed to calendarQuery) matches * the given object. * - * @param array $object - * @param array $filters - * * @return bool */ protected function validateFilterForObject(array $object, array $filters) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/BackendInterface.php index 7d125cf895c..8bfa7446abc 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/BackendInterface.php @@ -51,7 +51,6 @@ interface BackendInterface * * @param string $principalUri * @param string $calendarUri - * @param array $properties * * @return mixed */ @@ -69,8 +68,7 @@ interface BackendInterface * * Read the PropPatch documentation for more info and examples. * - * @param mixed $calendarId - * @param \Sabre\DAV\PropPatch $propPatch + * @param mixed $calendarId */ public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch); @@ -143,7 +141,6 @@ interface BackendInterface * If the backend supports this, it may allow for some speed-ups. * * @param mixed $calendarId - * @param array $uris * * @return array */ @@ -247,7 +244,6 @@ interface BackendInterface * to think of. * * @param mixed $calendarId - * @param array $filters * * @return array */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php index 0ba493305fb..6e48d54547f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/NotificationSupport.php @@ -40,8 +40,7 @@ interface NotificationSupport extends BackendInterface * * This may be called by a client once it deems a notification handled. * - * @param string $principalUri - * @param NotificationInterface $notification + * @param string $principalUri */ public function deleteNotification($principalUri, NotificationInterface $notification); diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/PDO.php index 003dc139236..2f48ab9828d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/PDO.php @@ -7,6 +7,7 @@ namespace Sabre\CalDAV\Backend; use Sabre\CalDAV; use Sabre\DAV; use Sabre\DAV\Exception\Forbidden; +use Sabre\DAV\PropPatch; use Sabre\DAV\Xml\Element\Sharee; use Sabre\VObject; @@ -117,8 +118,6 @@ class PDO extends AbstractBackend implements SyncSupport, SubscriptionSupport, S /** * Creates the backend. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -220,7 +219,6 @@ SQL * * @param string $principalUri * @param string $calendarUri - * @param array $properties * * @return string */ @@ -290,10 +288,9 @@ SQL * * Read the PropPatch documentation for more info and examples. * - * @param mixed $calendarId - * @param \Sabre\DAV\PropPatch $propPatch + * @param mixed $calendarId */ - public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch) + public function updateCalendar($calendarId, PropPatch $propPatch) { if (!is_array($calendarId)) { throw new \InvalidArgumentException('The value passed to $calendarId is expected to be an array with a calendarId and an instanceId'); @@ -483,7 +480,6 @@ SQL * If the backend supports this, it may allow for some speed-ups. * * @param mixed $calendarId - * @param array $uris * * @return array */ @@ -760,7 +756,6 @@ SQL * specific components, and VEVENT time-ranges. * * @param mixed $calendarId - * @param array $filters * * @return array */ @@ -785,17 +780,20 @@ SQL $componentType = $filters['comp-filters'][0]['name']; // Checking if we need post-filters - if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['time-range'] && !$filters['comp-filters'][0]['prop-filters']) { + $has_time_range = array_key_exists('time-range', $filters['comp-filters'][0]) && $filters['comp-filters'][0]['time-range']; + if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$has_time_range && !$filters['comp-filters'][0]['prop-filters']) { $requirePostFilter = false; } // There was a time-range filter - if ('VEVENT' == $componentType && isset($filters['comp-filters'][0]['time-range'])) { + if ('VEVENT' == $componentType && $has_time_range) { $timeRange = $filters['comp-filters'][0]['time-range']; // If start time OR the end time is not specified, we can do a // 100% accurate mysql query. - if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['prop-filters'] && (!$timeRange['start'] || !$timeRange['end'])) { - $requirePostFilter = false; + if (!$filters['prop-filters'] && !$filters['comp-filters'][0]['comp-filters'] && !$filters['comp-filters'][0]['prop-filters'] && $timeRange) { + if ((array_key_exists('start', $timeRange) && !$timeRange['start']) || (array_key_exists('end', $timeRange) && !$timeRange['end'])) { + $requirePostFilter = false; + } } } } @@ -815,11 +813,11 @@ SQL $values['componenttype'] = $componentType; } - if ($timeRange && $timeRange['start']) { + if ($timeRange && array_key_exists('start', $timeRange) && $timeRange['start']) { $query .= ' AND lastoccurence > :startdate'; $values['startdate'] = $timeRange['start']->getTimeStamp(); } - if ($timeRange && $timeRange['end']) { + if ($timeRange && array_key_exists('end', $timeRange) && $timeRange['end']) { $query .= ' AND firstoccurence < :enddate'; $values['enddate'] = $timeRange['end']->getTimeStamp(); } @@ -874,6 +872,8 @@ WHERE calendar_instances.principaluri = ? AND calendarobjects.uid = ? + AND + calendar_instances.access = 1 SQL; $stmt = $this->pdo->prepare($query); @@ -948,42 +948,46 @@ SQL; } list($calendarId, $instanceId) = $calendarId; - // Current synctoken - $stmt = $this->pdo->prepare('SELECT synctoken FROM '.$this->calendarTableName.' WHERE id = ?'); - $stmt->execute([$calendarId]); - $currentToken = $stmt->fetchColumn(0); - - if (is_null($currentToken)) { - return null; - } - $result = [ - 'syncToken' => $currentToken, 'added' => [], 'modified' => [], 'deleted' => [], ]; if ($syncToken) { - $query = 'SELECT uri, operation FROM '.$this->calendarChangesTableName.' WHERE synctoken >= ? AND synctoken < ? AND calendarid = ? ORDER BY synctoken'; + $query = 'SELECT uri, operation, synctoken FROM '.$this->calendarChangesTableName.' WHERE synctoken >= ? AND calendarid = ? ORDER BY synctoken'; if ($limit > 0) { - $query .= ' LIMIT '.(int) $limit; + // Fetch one more raw to detect result truncation + $query .= ' LIMIT '.((int) $limit + 1); } // Fetching all changes $stmt = $this->pdo->prepare($query); - $stmt->execute([$syncToken, $currentToken, $calendarId]); + $stmt->execute([$syncToken, $calendarId]); $changes = []; // This loop ensures that any duplicates are overwritten, only the // last change on a node is relevant. while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - $changes[$row['uri']] = $row['operation']; + $changes[$row['uri']] = $row; } + $currentToken = null; + $result_count = 0; foreach ($changes as $uri => $operation) { - switch ($operation) { + if (!is_null($limit) && $result_count >= $limit) { + $result['result_truncated'] = true; + break; + } + + if (null === $currentToken || $currentToken < $operation['synctoken'] + 1) { + // SyncToken in CalDAV perspective is consistently the next number of the last synced change event in this class. + $currentToken = $operation['synctoken'] + 1; + } + + ++$result_count; + switch ($operation['operation']) { case 1: $result['added'][] = $uri; break; @@ -995,7 +999,24 @@ SQL; break; } } + + if (!is_null($currentToken)) { + $result['syncToken'] = $currentToken; + } else { + // This means returned value is equivalent to syncToken + $result['syncToken'] = $syncToken; + } } else { + // Current synctoken + $stmt = $this->pdo->prepare('SELECT synctoken FROM '.$this->calendarTableName.' WHERE id = ?'); + $stmt->execute([$calendarId]); + $currentToken = $stmt->fetchColumn(0); + + if (is_null($currentToken)) { + return null; + } + $result['syncToken'] = $currentToken; + // No synctoken supplied, this is the initial sync. $query = 'SELECT uri FROM '.$this->calendarObjectTableName.' WHERE calendarid = ?'; $stmt = $this->pdo->prepare($query); @@ -1107,7 +1128,6 @@ SQL; * * @param string $principalUri * @param string $uri - * @param array $properties * * @return mixed */ @@ -1158,10 +1178,9 @@ SQL; * * Read the PropPatch documentation for more info and examples. * - * @param mixed $subscriptionId - * @param \Sabre\DAV\PropPatch $propPatch + * @param mixed $subscriptionId */ - public function updateSubscription($subscriptionId, DAV\PropPatch $propPatch) + public function updateSubscription($subscriptionId, PropPatch $propPatch) { $supportedProperties = array_keys($this->subscriptionPropertyMap); $supportedProperties[] = '{http://calendarserver.org/ns/}source'; @@ -1286,13 +1305,18 @@ SQL; /** * Creates a new scheduling object. This should land in a users' inbox. * - * @param string $principalUri - * @param string $objectUri - * @param string $objectData + * @param string $principalUri + * @param string $objectUri + * @param string|resource $objectData */ public function createSchedulingObject($principalUri, $objectUri, $objectData) { $stmt = $this->pdo->prepare('INSERT INTO '.$this->schedulingObjectTableName.' (principaluri, calendardata, uri, lastmodified, etag, size) VALUES (?, ?, ?, ?, ?, ?)'); + + if (is_resource($objectData)) { + $objectData = stream_get_contents($objectData); + } + $stmt->execute([$principalUri, $objectData, $objectUri, time(), md5($objectData), strlen($objectData)]); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php index 7986d8c33f1..69467e55473 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SchedulingSupport.php @@ -58,9 +58,9 @@ interface SchedulingSupport extends BackendInterface /** * Creates a new scheduling object. This should land in a users' inbox. * - * @param string $principalUri - * @param string $objectUri - * @param string $objectData + * @param string $principalUri + * @param string $objectUri + * @param string|resource $objectData */ public function createSchedulingObject($principalUri, $objectUri, $objectData); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SimplePDO.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SimplePDO.php index b6f3c8bef65..8f42072c9e5 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SimplePDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SimplePDO.php @@ -44,8 +44,6 @@ class SimplePDO extends AbstractBackend /** * Creates the backend. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -103,7 +101,6 @@ class SimplePDO extends AbstractBackend * * @param string $principalUri * @param string $calendarUri - * @param array $properties * * @return string */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php index 2aaf95cdb73..7655c2e11ab 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Backend/SubscriptionSupport.php @@ -58,7 +58,6 @@ interface SubscriptionSupport extends BackendInterface * * @param string $principalUri * @param string $uri - * @param array $properties * * @return mixed */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Calendar.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Calendar.php index 717f04f940b..6e989314dcf 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Calendar.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Calendar.php @@ -39,8 +39,7 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, /** * Constructor. * - * @param Backend\BackendInterface $caldavBackend - * @param array $calendarInfo + * @param array $calendarInfo */ public function __construct(Backend\BackendInterface $caldavBackend, $calendarInfo) { @@ -66,8 +65,6 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. - * - * @param PropPatch $propPatch */ public function propPatch(PropPatch $propPatch) { @@ -350,8 +347,6 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * The list of filters are specified as an array. The exact array is * documented by Sabre\CalDAV\CalendarQueryParser. * - * @param array $filters - * * @return array */ public function calendarQuery(array $filters) @@ -401,7 +396,8 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * 'deleted' => [ * 'foo.php.bak', * 'old.txt' - * ] + * ], + * 'result_truncated' : true * ]; * * The syncToken property should reflect the *current* syncToken of the @@ -411,6 +407,9 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * If the syncToken is specified as null, this is an initial sync, and all * members should be reported. * + * If result is truncated due to server limitation or limit by client, + * set result_truncated to true, otherwise set to false or do not add the key. + * * The modified property is an array of nodenames that have changed since * the last token. * @@ -427,12 +426,17 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection, * should be treated as infinite. * * If the limit (infinite or not) is higher than you're willing to return, - * you should throw a Sabre\DAV\Exception\TooMuchMatches() exception. + * the result should be truncated to fit the limit. + * Note that even when the result is truncated, syncToken must be consistent + * with the truncated result, not the result before truncation. + * (See RFC6578 Section 3.6 for detail) * * If the syncToken is expired (due to data cleanup) or unknown, you must * return null. * * The limit is 'suggestive'. You are free to ignore it. + * TODO: RFC6578 Setion 3.7 says that the server must fail when the server + * cannot truncate according to the limit, so it may not be just suggestive. * * @param string $syncToken * @param int $syncLevel diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarHome.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarHome.php index 663d449bf5c..159ddcc67c1 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarHome.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarHome.php @@ -43,8 +43,7 @@ class CalendarHome implements DAV\IExtendedCollection, DAVACL\IACL /** * Constructor. * - * @param Backend\BackendInterface $caldavBackend - * @param array $principalInfo + * @param array $principalInfo */ public function __construct(Backend\BackendInterface $caldavBackend, $principalInfo) { @@ -216,7 +215,6 @@ class CalendarHome implements DAV\IExtendedCollection, DAVACL\IACL * Creates a new calendar or subscription. * * @param string $name - * @param MkCol $mkCol * * @throws DAV\Exception\InvalidResourceType */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarObject.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarObject.php index 3f28ee7f7d2..671f4b5dbc1 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarObject.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarObject.php @@ -49,10 +49,6 @@ class CalendarObject extends \Sabre\DAV\File implements ICalendarObject, \Sabre\ * * size - (optional) The size of the data in bytes. * * lastmodified - (optional) format as a unix timestamp. * * acl - (optional) Use this to override the default ACL for the node. - * - * @param Backend\BackendInterface $caldavBackend - * @param array $calendarInfo - * @param array $objectData */ public function __construct(Backend\BackendInterface $caldavBackend, array $calendarInfo, array $objectData) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarQueryValidator.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarQueryValidator.php index 0e7f1307d1a..ee525da7a5c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarQueryValidator.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarQueryValidator.php @@ -27,9 +27,6 @@ class CalendarQueryValidator * * The list of filters must be formatted as parsed by \Sabre\CalDAV\CalendarQueryParser * - * @param VObject\Component\VCalendar $vObject - * @param array $filters - * * @return bool */ public function validate(VObject\Component\VCalendar $vObject, array $filters) @@ -52,9 +49,6 @@ class CalendarQueryValidator * component we're checking should be specified, not the component to check * itself. * - * @param VObject\Component $parent - * @param array $filters - * * @return bool */ protected function validateCompFilters(VObject\Component $parent, array $filters) @@ -73,9 +67,17 @@ class CalendarQueryValidator return false; } - if ($filter['time-range']) { + if (array_key_exists('time-range', $filter) && $filter['time-range']) { foreach ($parent->{$filter['name']} as $subComponent) { - if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) { + $start = null; + $end = null; + if (array_key_exists('start', $filter['time-range'])) { + $start = $filter['time-range']['start']; + } + if (array_key_exists('end', $filter['time-range'])) { + $end = $filter['time-range']['end']; + } + if ($this->validateTimeRange($subComponent, $start, $end)) { continue 2; } } @@ -116,9 +118,6 @@ class CalendarQueryValidator * property we're checking should be specified, not the property to check * itself. * - * @param VObject\Component $parent - * @param array $filters - * * @return bool */ protected function validatePropFilters(VObject\Component $parent, array $filters) @@ -137,9 +136,17 @@ class CalendarQueryValidator return false; } - if ($filter['time-range']) { + if (array_key_exists('time-range', $filter) && $filter['time-range']) { foreach ($parent->{$filter['name']} as $subComponent) { - if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) { + $start = null; + $end = null; + if (array_key_exists('start', $filter['time-range'])) { + $start = $filter['time-range']['start']; + } + if (array_key_exists('end', $filter['time-range'])) { + $end = $filter['time-range']['end']; + } + if ($this->validateTimeRange($subComponent, $start, $end)) { continue 2; } } @@ -181,9 +188,6 @@ class CalendarQueryValidator * parameter we're checking should be specified, not the parameter to check * itself. * - * @param VObject\Property $parent - * @param array $filters - * * @return bool */ protected function validateParamFilters(VObject\Property $parent, array $filters) @@ -231,8 +235,7 @@ class CalendarQueryValidator * A single text-match should be specified as well as the specific property * or parameter we need to validate. * - * @param VObject\Node|string $check value to check against - * @param array $textMatch + * @param VObject\Node|string $check value to check against * * @return bool */ @@ -253,9 +256,8 @@ class CalendarQueryValidator * This is all based on the rules specified in rfc4791, which are quite * complex. * - * @param VObject\Node $component - * @param DateTime $start - * @param DateTime $end + * @param DateTime $start + * @param DateTime $end * * @return bool */ @@ -272,11 +274,9 @@ class CalendarQueryValidator case 'VEVENT': case 'VTODO': case 'VJOURNAL': - return $component->isInTimeRange($start, $end); case 'VALARM': - // If the valarm is wrapped in a recurring event, we need to // expand the recursions, and validate each. // diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarRoot.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarRoot.php index 42f1a44d577..3038d218fcc 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarRoot.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/CalendarRoot.php @@ -38,9 +38,7 @@ class CalendarRoot extends \Sabre\DAVACL\AbstractPrincipalCollection * actually located in a different path, use the $principalPrefix argument * to override this. * - * @param PrincipalBackend\BackendInterface $principalBackend - * @param Backend\BackendInterface $caldavBackend - * @param string $principalPrefix + * @param string $principalPrefix */ public function __construct(PrincipalBackend\BackendInterface $principalBackend, Backend\BackendInterface $caldavBackend, $principalPrefix = 'principals') { @@ -68,8 +66,6 @@ class CalendarRoot extends \Sabre\DAVACL\AbstractPrincipalCollection * at least contain a uri item. Other properties may or may not be * supplied by the authentication backend. * - * @param array $principal - * * @return \Sabre\DAV\INode */ public function getChildForPrincipal(array $principal) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Exception/InvalidComponentType.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Exception/InvalidComponentType.php index 3385ad8fe85..e94378a689b 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Exception/InvalidComponentType.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Exception/InvalidComponentType.php @@ -20,9 +20,6 @@ class InvalidComponentType extends DAV\Exception\Forbidden * Adds in extra information in the xml response. * * This method adds the {CALDAV:}supported-calendar-component as defined in rfc4791 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICSExportPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICSExportPlugin.php index 717d3a9c92c..9171e36e79b 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICSExportPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICSExportPlugin.php @@ -74,9 +74,6 @@ class ICSExportPlugin extends DAV\ServerPlugin /** * Intercepts GET requests on calendar urls ending with ?export. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @throws BadRequest * @throws DAV\Exception\NotFound * @throws VObject\InvalidDataException @@ -164,14 +161,13 @@ class ICSExportPlugin extends DAV\ServerPlugin /** * This method is responsible for generating the actual, full response. * - * @param string $path - * @param DateTime|null $start - * @param DateTime|null $end - * @param bool $expand - * @param string $componentType - * @param string $format - * @param array $properties - * @param ResponseInterface $response + * @param string $path + * @param DateTime|null $start + * @param DateTime|null $end + * @param bool $expand + * @param string $componentType + * @param string $format + * @param array $properties * * @throws DAV\Exception\NotFound * @throws VObject\InvalidDataException @@ -283,8 +279,7 @@ class ICSExportPlugin extends DAV\ServerPlugin /** * Merges all calendar objects, and builds one big iCalendar blob. * - * @param array $properties Some CalDAV properties - * @param array $inputObjects + * @param array $properties Some CalDAV properties * * @return VObject\Component\VCalendar */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICalendarObjectContainer.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICalendarObjectContainer.php index d9346f31172..c08a05a8f79 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICalendarObjectContainer.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/ICalendarObjectContainer.php @@ -33,8 +33,6 @@ interface ICalendarObjectContainer extends \Sabre\DAV\ICollection * The list of filters are specified as an array. The exact array is * documented by \Sabre\CalDAV\CalendarQueryParser. * - * @param array $filters - * * @return array */ public function calendarQuery(array $filters); diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Collection.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Collection.php index 884f205e403..e2e899683d6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Collection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Collection.php @@ -43,8 +43,7 @@ class Collection extends DAV\Collection implements ICollection, DAVACL\IACL /** * Constructor. * - * @param CalDAV\Backend\NotificationSupport $caldavBackend - * @param string $principalUri + * @param string $principalUri */ public function __construct(CalDAV\Backend\NotificationSupport $caldavBackend, $principalUri) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Node.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Node.php index b1ec13ff42e..7d3a3f46bd2 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Node.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Node.php @@ -48,9 +48,7 @@ class Node extends DAV\File implements INode, DAVACL\IACL /** * Constructor. * - * @param CalDAV\Backend\NotificationSupport $caldavBackend - * @param string $principalUri - * @param NotificationInterface $notification + * @param string $principalUri */ public function __construct(CalDAV\Backend\NotificationSupport $caldavBackend, $principalUri, NotificationInterface $notification) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Plugin.php index 182b70c8ec3..56b2fe93848 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Notifications/Plugin.php @@ -60,8 +60,6 @@ class Plugin extends ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param Server $server */ public function initialize(Server $server) { @@ -80,9 +78,6 @@ class Plugin extends ServerPlugin /** * PropFind. - * - * @param PropFind $propFind - * @param BaseINode $node */ public function propFind(PropFind $propFind, BaseINode $node) { @@ -112,9 +107,6 @@ class Plugin extends ServerPlugin * * We use this to intercept GET calls to notification nodes, and return the * proper response. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpGet(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Plugin.php index 04eaedf73aa..98f4f554c25 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Plugin.php @@ -183,8 +183,6 @@ class Plugin extends DAV\ServerPlugin /** * Initializes the plugin. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -245,7 +243,7 @@ class Plugin extends DAV\ServerPlugin * @param mixed $report * @param mixed $path * - * @return bool + * @return bool|null */ public function report($reportName, $report, $path) { @@ -272,9 +270,6 @@ class Plugin extends DAV\ServerPlugin * This function handles the MKCALENDAR HTTP method, which creates * a new calendar. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpMkCalendar(RequestInterface $request, ResponseInterface $response) @@ -323,9 +318,6 @@ class Plugin extends DAV\ServerPlugin * This method handler is invoked before any after properties for a * resource are fetched. This allows us to add in any CalDAV specific * properties. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFind(DAV\PropFind $propFind, DAV\INode $node) { @@ -641,8 +633,6 @@ class Plugin extends DAV\ServerPlugin /** * This method is responsible for parsing the request and generating the * response for the CALDAV:free-busy-query REPORT. - * - * @param Xml\Request\FreeBusyQueryReport $report */ protected function freeBusyQueryReport(Xml\Request\FreeBusyQueryReport $report) { @@ -719,11 +709,10 @@ class Plugin extends DAV\ServerPlugin * This plugin uses this method to ensure that CalDAV objects receive * valid calendar data. * - * @param string $path - * @param DAV\IFile $node - * @param resource $data - * @param bool $modified should be set to true, if this event handler - * changed &$data + * @param string $path + * @param resource $data + * @param bool $modified should be set to true, if this event handler + * changed &$data */ public function beforeWriteContent($path, DAV\IFile $node, &$data, &$modified) { @@ -757,11 +746,10 @@ class Plugin extends DAV\ServerPlugin * This plugin uses this method to ensure that newly created calendar * objects contain valid calendar data. * - * @param string $path - * @param resource $data - * @param DAV\ICollection $parentNode - * @param bool $modified should be set to true, if this event handler - * changed &$data + * @param string $path + * @param resource $data + * @param bool $modified should be set to true, if this event handler + * changed &$data */ public function beforeCreateFile($path, &$data, DAV\ICollection $parentNode, &$modified) { @@ -927,9 +915,6 @@ class Plugin extends DAV\ServerPlugin /** * This method is triggered whenever a subsystem reqeuests the privileges * that are supported on a particular node. - * - * @param INode $node - * @param array $supportedPrivilegeSet */ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilegeSet) { @@ -946,8 +931,7 @@ class Plugin extends DAV\ServerPlugin * DAV\Browser\Plugin. This allows us to generate an interface users * can use to create new calendars. * - * @param DAV\INode $node - * @param string $output + * @param string $output * * @return bool */ @@ -974,9 +958,6 @@ class Plugin extends DAV\ServerPlugin * This event is triggered after GET requests. * * This is used to transform data into jCal, if this was requested. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpAfterGet(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/Collection.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/Collection.php index cae29c752a9..6d0230331d9 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/Collection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/Collection.php @@ -23,8 +23,6 @@ class Collection extends DAVACL\PrincipalCollection /** * Returns a child object based on principal information. * - * @param array $principalInfo - * * @return User */ public function getChildForPrincipal(array $principalInfo) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyRead.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyRead.php index 1b24984bd51..7cf70268e86 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyRead.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyRead.php @@ -38,9 +38,6 @@ class ProxyRead implements IProxyRead * Creates the object. * * Note that you MUST supply the parent principal information. - * - * @param DAVACL\PrincipalBackend\BackendInterface $principalBackend - * @param array $principalInfo */ public function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo) { @@ -143,8 +140,6 @@ class ProxyRead implements IProxyRead * The list of members is always overwritten, never appended to. * * This method should throw an exception if the members could not be set. - * - * @param array $principals */ public function setGroupMemberSet(array $principals) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyWrite.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyWrite.php index 7b9c78e0ab2..2d1ce7c4655 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyWrite.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Principal/ProxyWrite.php @@ -38,9 +38,6 @@ class ProxyWrite implements IProxyWrite * Creates the object. * * Note that you MUST supply the parent principal information. - * - * @param DAVACL\PrincipalBackend\BackendInterface $principalBackend - * @param array $principalInfo */ public function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, array $principalInfo) { @@ -143,8 +140,6 @@ class ProxyWrite implements IProxyWrite * The list of members is always overwritten, never appended to. * * This method should throw an exception if the members could not be set. - * - * @param array $principals */ public function setGroupMemberSet(array $principals) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/IMipPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/IMipPlugin.php index d71b3c0f8f6..e050ac273d2 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -81,8 +81,6 @@ class IMipPlugin extends DAV\ServerPlugin /** * Event handler for the 'schedule' event. - * - * @param ITip\Message $iTipMessage */ public function schedule(ITip\Message $iTipMessage) { @@ -132,6 +130,7 @@ class IMipPlugin extends DAV\ServerPlugin $headers = [ 'Reply-To: '.$sender, 'From: '.$iTipMessage->senderName.' <'.$this->senderEmail.'>', + 'MIME-Version: 1.0', 'Content-Type: text/calendar; charset=UTF-8; method='.$iTipMessage->method, ]; if (DAV\Server::$exposeVersion) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Inbox.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Inbox.php index d92f1dd4cb9..46206909698 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Inbox.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Inbox.php @@ -38,8 +38,7 @@ class Inbox extends DAV\Collection implements IInbox /** * Constructor. * - * @param Backend\SchedulingSupport $caldavBackend - * @param string $principalUri + * @param string $principalUri */ public function __construct(Backend\SchedulingSupport $caldavBackend, $principalUri) { @@ -176,8 +175,6 @@ class Inbox extends DAV\Collection implements IInbox * The list of filters are specified as an array. The exact array is * documented by \Sabre\CalDAV\CalendarQueryParser. * - * @param array $filters - * * @return array */ public function calendarQuery(array $filters) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Plugin.php index d2c9b68e94e..3cc360f1d45 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/Plugin.php @@ -94,8 +94,6 @@ class Plugin extends ServerPlugin /** * Initializes the plugin. - * - * @param Server $server */ public function initialize(Server $server) { @@ -158,9 +156,6 @@ class Plugin extends ServerPlugin /** * This method handles POST request for the outbox. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpPost(RequestInterface $request, ResponseInterface $response) @@ -195,9 +190,6 @@ class Plugin extends ServerPlugin * This method handler is invoked during fetching of properties. * * We use this event to add calendar-auto-schedule-specific properties. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { @@ -297,8 +289,7 @@ class Plugin extends ServerPlugin /** * This method is called during property updates. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatch($path, PropPatch $propPatch) { @@ -353,8 +344,6 @@ class Plugin extends ServerPlugin /** * This method is responsible for delivering the ITip message. - * - * @param ITip\Message $iTipMessage */ public function deliver(ITip\Message $iTipMessage) { @@ -413,8 +402,6 @@ class Plugin extends ServerPlugin * * This handler attempts to look at local accounts to deliver the * scheduling object. - * - * @param ITip\Message $iTipMessage */ public function scheduleLocalDelivery(ITip\Message $iTipMessage) { @@ -499,6 +486,7 @@ class Plugin extends ServerPlugin $currentObject = null; $objectNode = null; + $oldICalendarData = null; $isNewNode = false; $result = $home->getCalendarObjectByUID($uid); @@ -557,9 +545,6 @@ class Plugin extends ServerPlugin * that are supported on a particular node. * * We need to add a number of privileges for scheduling purposes. - * - * @param INode $node - * @param array $supportedPrivilegeSet */ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilegeSet) { @@ -621,13 +606,11 @@ class Plugin extends ServerPlugin * This method may update $newObject to add any status changes. * * @param VCalendar|string $oldObject - * @param VCalendar $newObject - * @param array $addresses * @param array $ignore any addresses to not send messages to * @param bool $modified a marker to indicate that the original object * modified by this process */ - protected function processICalendarChange($oldObject = null, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false) + protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false) { $broker = new ITip\Broker(); $messages = $broker->parseEvent($newObject, $addresses, $oldObject); @@ -700,10 +683,6 @@ class Plugin extends ServerPlugin * The latter is from an expired early draft of the CalDAV scheduling * extensions, but iCal depends on a feature from that spec, so we * implement it. - * - * @param IOutbox $outboxNode - * @param RequestInterface $request - * @param ResponseInterface $response */ public function outboxRequest(IOutbox $outboxNode, RequestInterface $request, ResponseInterface $response) { @@ -756,14 +735,7 @@ class Plugin extends ServerPlugin /** * This method is responsible for parsing a free-busy query request and - * returning it's result. - * - * @param IOutbox $outbox - * @param VObject\Component $vObject - * @param RequestInterface $request - * @param ResponseInterface $response - * - * @return string + * returning its result in $response. */ protected function handleFreeBusyRequest(IOutbox $outbox, VObject\Component $vObject, RequestInterface $request, ResponseInterface $response) { @@ -852,10 +824,7 @@ class Plugin extends ServerPlugin * * 2.0;description * * 3.7;description * - * @param string $email address - * @param \DateTimeInterface $start - * @param \DateTimeInterface $end - * @param VObject\Component $request + * @param string $email address * * @return array */ @@ -998,8 +967,6 @@ class Plugin extends ServerPlugin * This method checks the 'Schedule-Reply' header * and returns false if it's 'F', otherwise true. * - * @param RequestInterface $request - * * @return bool */ private function scheduleReply(RequestInterface $request) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php index d34c9232708..b40f28a9476 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Schedule/SchedulingObject.php @@ -29,9 +29,6 @@ class SchedulingObject extends \Sabre\CalDAV\CalendarObject implements IScheduli * * size - (optional) The size of the data in bytes. * * lastmodified - (optional) format as a unix timestamp. * * acl - (optional) Use this to override the default ACL for the node. - * - * @param Backend\SchedulingSupport $caldavBackend - * @param array $objectData */ public function __construct(Backend\SchedulingSupport $caldavBackend, array $objectData) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/SharingPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/SharingPlugin.php index be8c46a9eeb..f7dca9be699 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/SharingPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/SharingPlugin.php @@ -67,8 +67,6 @@ class SharingPlugin extends DAV\ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -99,9 +97,6 @@ class SharingPlugin extends DAV\ServerPlugin * node. * * This allows us to inject any properties early. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFindEarly(DAV\PropFind $propFind, DAV\INode $node) { @@ -118,9 +113,6 @@ class SharingPlugin extends DAV\ServerPlugin * This method is triggered *after* all properties have been retrieved. * This allows us to inject the correct resourcetype for calendars that * have been shared. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFindLate(DAV\PropFind $propFind, DAV\INode $node) { @@ -154,8 +146,7 @@ class SharingPlugin extends DAV\ServerPlugin * Even though this is no longer in the current spec, we keep this around * because OS X 10.7 may still make use of this feature. * - * @param string $path - * @param DAV\PropPatch $propPatch + * @param string $path */ public function propPatch($path, DAV\PropPatch $propPatch) { @@ -183,9 +174,6 @@ class SharingPlugin extends DAV\ServerPlugin /** * We intercept this to handle POST requests on calendars. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool|null */ public function httpPost(RequestInterface $request, ResponseInterface $response) @@ -225,7 +213,6 @@ class SharingPlugin extends DAV\ServerPlugin // Both the DAV:share-resource and CALENDARSERVER:share requests // behave identically. case '{'.Plugin::NS_CALENDARSERVER.'}share': - $sharingPlugin = $this->server->getPlugin('sharing'); $sharingPlugin->shareResource($path, $message->sharees); @@ -240,7 +227,6 @@ class SharingPlugin extends DAV\ServerPlugin // The invite-reply document is sent when the user replies to an // invitation of a calendar share. case '{'.Plugin::NS_CALENDARSERVER.'}invite-reply': - // This only works on the calendar-home-root node. if (!$node instanceof CalendarHome) { return; @@ -284,7 +270,6 @@ class SharingPlugin extends DAV\ServerPlugin return false; case '{'.Plugin::NS_CALENDARSERVER.'}publish-calendar': - // We can only deal with IShareableCalendar objects if (!$node instanceof ISharedCalendar) { return; @@ -312,7 +297,6 @@ class SharingPlugin extends DAV\ServerPlugin return false; case '{'.Plugin::NS_CALENDARSERVER.'}unpublish-calendar': - // We can only deal with IShareableCalendar objects if (!$node instanceof ISharedCalendar) { return; diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php index 238866894b3..6cfcc1a7b06 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Plugin.php @@ -28,8 +28,6 @@ class Plugin extends ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param Server $server */ public function initialize(Server $server) { @@ -57,9 +55,6 @@ class Plugin extends ServerPlugin /** * Triggered after properties have been fetched. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php index 0b0282abe6d..8d56e64418a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Subscriptions/Subscription.php @@ -40,9 +40,6 @@ class Subscription extends Collection implements ISubscription, IACL /** * Constructor. - * - * @param SubscriptionSupport $caldavBackend - * @param array $subscriptionInfo */ public function __construct(SubscriptionSupport $caldavBackend, array $subscriptionInfo) { @@ -78,7 +75,7 @@ class Subscription extends Collection implements ISubscription, IACL /** * Returns the last modification time. * - * @return int + * @return int|null */ public function getLastModified() { @@ -115,8 +112,6 @@ class Subscription extends Collection implements ISubscription, IACL * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. - * - * @param PropPatch $propPatch */ public function propPatch(PropPatch $propPatch) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php index 0d53aeda30f..c9656d8a30e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php @@ -47,8 +47,6 @@ class CalendarData implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -62,7 +60,6 @@ class CalendarData implements XmlDeserializable foreach ($elems as $elem) { switch ($elem['name']) { case '{'.Plugin::NS_CALDAV.'}expand': - $result['expand'] = [ 'start' => isset($elem['attributes']['start']) ? DateTimeParser::parseDateTime($elem['attributes']['start']) : null, 'end' => isset($elem['attributes']['end']) ? DateTimeParser::parseDateTime($elem['attributes']['end']) : null, diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CompFilter.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CompFilter.php index 832346eea54..929000bb8bd 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CompFilter.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/CompFilter.php @@ -44,8 +44,6 @@ class CompFilter implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php index ec9ff753c7d..1e6dd5946da 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php @@ -42,8 +42,6 @@ class ParamFilter implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/PropFilter.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/PropFilter.php index f4600574e50..c9a3cb5acfa 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/PropFilter.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Filter/PropFilter.php @@ -44,8 +44,6 @@ class PropFilter implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/Invite.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/Invite.php index 926656674bd..2dbb0f49840 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/Invite.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/Invite.php @@ -181,8 +181,6 @@ class Invite implements NotificationInterface * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -192,8 +190,6 @@ class Invite implements NotificationInterface /** * This method serializes the entire notification, as it is used in the * response body. - * - * @param Writer $writer */ public function xmlSerializeFull(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/InviteReply.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/InviteReply.php index abcbde1511c..dbdba3b0277 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/InviteReply.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/InviteReply.php @@ -89,8 +89,6 @@ class InviteReply implements NotificationInterface * * hostUrl - A url to the shared calendar. * * summary - Description of the share, can be the same as the * calendar, but may also be modified (optional). - * - * @param array $values */ public function __construct(array $values) { @@ -132,8 +130,6 @@ class InviteReply implements NotificationInterface * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -143,8 +139,6 @@ class InviteReply implements NotificationInterface /** * This method serializes the entire notification, as it is used in the * response body. - * - * @param Writer $writer */ public function xmlSerializeFull(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/NotificationInterface.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/NotificationInterface.php index be749053315..e1b393f8b42 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/NotificationInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/NotificationInterface.php @@ -19,8 +19,6 @@ interface NotificationInterface extends XmlSerializable /** * This method serializes the entire notification, as it is used in the * response body. - * - * @param Writer $writer */ public function xmlSerializeFull(Writer $writer); diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/SystemStatus.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/SystemStatus.php index 3c656df3453..6d196b30c6c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/SystemStatus.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Notification/SystemStatus.php @@ -90,8 +90,6 @@ class SystemStatus implements NotificationInterface * * Important note 2: If you are writing any new elements, you are also * responsible for closing them. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -116,8 +114,6 @@ class SystemStatus implements NotificationInterface /** * This method serializes the entire notification, as it is used in the * response body. - * - * @param Writer $writer */ public function xmlSerializeFull(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php index 224f52c969c..58acb6d5402 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php @@ -68,8 +68,6 @@ class AllowedSharingModes implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php index 6b28d5df205..84f7ae02f19 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php @@ -30,8 +30,6 @@ class EmailAddressSet implements XmlSerializable /** * __construct. - * - * @param array $emails */ public function __construct(array $emails) { @@ -63,8 +61,6 @@ class EmailAddressSet implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/Invite.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/Invite.php index db456617cb7..c389ca827d6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/Invite.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/Invite.php @@ -67,8 +67,6 @@ class Invite implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php index 7809071699e..15952202504 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php @@ -76,8 +76,6 @@ class ScheduleCalendarTransp implements Element * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -109,8 +107,6 @@ class ScheduleCalendarTransp implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php index 56fa61b137f..d86e7b77c48 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php @@ -36,8 +36,6 @@ class SupportedCalendarComponentSet implements Element /** * Creates the property. - * - * @param array $components */ public function __construct(array $components) { @@ -69,8 +67,6 @@ class SupportedCalendarComponentSet implements Element * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -99,8 +95,6 @@ class SupportedCalendarComponentSet implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php index 1c9c4779fc5..5b089330584 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php @@ -39,8 +39,6 @@ class SupportedCalendarData implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php index b88cd0d924d..c5ffeee3859 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php @@ -38,8 +38,6 @@ class SupportedCollationSet implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php index 8231de6bda2..3b3a94b268f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarMultiGetReport.php @@ -81,8 +81,6 @@ class CalendarMultiGetReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php index e85eccd2dc4..b3cc299d3d7 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/CalendarQueryReport.php @@ -81,8 +81,6 @@ class CalendarQueryReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/FreeBusyQueryReport.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/FreeBusyQueryReport.php index a4d98a8d432..17df05a78a7 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/FreeBusyQueryReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/FreeBusyQueryReport.php @@ -55,8 +55,6 @@ class FreeBusyQueryReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php index 710095bb296..166721eb363 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php @@ -98,8 +98,6 @@ class InviteReply implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php index 7cad98da535..b5701e2ead0 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/MkCalendar.php @@ -55,8 +55,6 @@ class MkCalendar implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/Share.php b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/Share.php index 60bd579d5e6..d597b76f1ed 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/Share.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CalDAV/Xml/Request/Share.php @@ -57,8 +57,6 @@ class Share implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBook.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBook.php index 434801554c8..86994f2d5f6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBook.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBook.php @@ -36,9 +36,6 @@ class AddressBook extends DAV\Collection implements IAddressBook, DAV\IPropertie /** * Constructor. - * - * @param Backend\BackendInterface $carddavBackend - * @param array $addressBookInfo */ public function __construct(Backend\BackendInterface $carddavBackend, array $addressBookInfo) { @@ -181,8 +178,6 @@ class AddressBook extends DAV\Collection implements IAddressBook, DAV\IPropertie * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. - * - * @param DAV\PropPatch $propPatch */ public function propPatch(DAV\PropPatch $propPatch) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookHome.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookHome.php index fb03000aa54..884e9b24e08 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookHome.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookHome.php @@ -39,8 +39,7 @@ class AddressBookHome extends DAV\Collection implements DAV\IExtendedCollection, /** * Constructor. * - * @param Backend\BackendInterface $carddavBackend - * @param string $principalUri + * @param string $principalUri */ public function __construct(Backend\BackendInterface $carddavBackend, $principalUri) { @@ -152,7 +151,6 @@ class AddressBookHome extends DAV\Collection implements DAV\IExtendedCollection, * Creates a new address book. * * @param string $name - * @param MkCol $mkCol * * @throws DAV\Exception\InvalidResourceType */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookRoot.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookRoot.php index 219f98906cc..ee1721a45da 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookRoot.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/AddressBookRoot.php @@ -41,9 +41,7 @@ class AddressBookRoot extends DAVACL\AbstractPrincipalCollection * actually located in a different path, use the $principalPrefix argument * to override this. * - * @param DAVACL\PrincipalBackend\BackendInterface $principalBackend - * @param Backend\BackendInterface $carddavBackend - * @param string $principalPrefix + * @param string $principalPrefix */ public function __construct(DAVACL\PrincipalBackend\BackendInterface $principalBackend, Backend\BackendInterface $carddavBackend, $principalPrefix = 'principals') { @@ -68,8 +66,6 @@ class AddressBookRoot extends DAVACL\AbstractPrincipalCollection * at least contain a uri item. Other properties may or may not be * supplied by the authentication backend. * - * @param array $principal - * * @return \Sabre\DAV\INode */ public function getChildForPrincipal(array $principal) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/AbstractBackend.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/AbstractBackend.php index 6b041ade4e0..a900c62562f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/AbstractBackend.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/AbstractBackend.php @@ -26,7 +26,6 @@ abstract class AbstractBackend implements BackendInterface * If the backend supports this, it may allow for some speed-ups. * * @param mixed $addressBookId - * @param array $uris * * @return array */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/BackendInterface.php index 804f09a362b..6ef34d173c5 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/BackendInterface.php @@ -51,8 +51,7 @@ interface BackendInterface * * Read the PropPatch documentation for more info and examples. * - * @param string $addressBookId - * @param \Sabre\DAV\PropPatch $propPatch + * @param string $addressBookId */ public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch); @@ -64,7 +63,6 @@ interface BackendInterface * * @param string $principalUri * @param string $url just the 'basename' of the url - * @param array $properties * * @return mixed */ @@ -123,7 +121,6 @@ interface BackendInterface * If the backend supports this, it may allow for some speed-ups. * * @param mixed $addressBookId - * @param array $uris * * @return array */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/PDO.php index 0659455e554..966d7ba095d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Backend/PDO.php @@ -6,6 +6,7 @@ namespace Sabre\CardDAV\Backend; use Sabre\CardDAV; use Sabre\DAV; +use Sabre\DAV\PropPatch; /** * PDO CardDAV backend. @@ -44,8 +45,6 @@ class PDO extends AbstractBackend implements SyncSupport /** * Sets up the object. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -93,10 +92,9 @@ class PDO extends AbstractBackend implements SyncSupport * * Read the PropPatch documentation for more info and examples. * - * @param string $addressBookId - * @param \Sabre\DAV\PropPatch $propPatch + * @param string $addressBookId */ - public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) + public function updateAddressBook($addressBookId, PropPatch $propPatch) { $supportedProperties = [ '{DAV:}displayname', @@ -143,7 +141,6 @@ class PDO extends AbstractBackend implements SyncSupport * * @param string $principalUri * @param string $url just the 'basename' of the url - * @param array $properties * * @return int Last insert id */ @@ -269,7 +266,6 @@ class PDO extends AbstractBackend implements SyncSupport * If the backend supports this, it may allow for some speed-ups. * * @param mixed $addressBookId - * @param array $uris * * @return array */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Card.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Card.php index 1d544f4aa0f..c9cd2bbf61a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Card.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Card.php @@ -41,10 +41,6 @@ class Card extends DAV\File implements ICard, DAVACL\IACL /** * Constructor. - * - * @param Backend\BackendInterface $carddavBackend - * @param array $addressBookInfo - * @param array $cardData */ public function __construct(Backend\BackendInterface $carddavBackend, array $addressBookInfo, array $cardData) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Plugin.php index 10398a4d286..c2d31d9dfe0 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Plugin.php @@ -59,8 +59,6 @@ class Plugin extends DAV\ServerPlugin /** * Initializes the plugin. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -131,9 +129,6 @@ class Plugin extends DAV\ServerPlugin /** * Adds all CardDAV-specific properties. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFindEarly(DAV\PropFind $propFind, DAV\INode $node) { @@ -267,11 +262,10 @@ class Plugin extends DAV\ServerPlugin * This plugin uses this method to ensure that Card nodes receive valid * vcard data. * - * @param string $path - * @param DAV\IFile $node - * @param resource $data - * @param bool $modified should be set to true, if this event handler - * changed &$data + * @param string $path + * @param resource $data + * @param bool $modified should be set to true, if this event handler + * changed &$data */ public function beforeWriteContent($path, DAV\IFile $node, &$data, &$modified) { @@ -288,11 +282,10 @@ class Plugin extends DAV\ServerPlugin * This plugin uses this method to ensure that Card nodes receive valid * vcard data. * - * @param string $path - * @param resource $data - * @param DAV\ICollection $parentNode - * @param bool $modified should be set to true, if this event handler - * changed &$data + * @param string $path + * @param resource $data + * @param bool $modified should be set to true, if this event handler + * changed &$data */ public function beforeCreateFile($path, &$data, DAV\ICollection $parentNode, &$modified) { @@ -481,7 +474,6 @@ class Plugin extends DAV\ServerPlugin * Validates if a vcard makes it throught a list of filters. * * @param string $vcardData - * @param array $filters * @param string $test anyof or allof (which means OR or AND) * * @return bool @@ -565,8 +557,6 @@ class Plugin extends DAV\ServerPlugin * property. Any subsequence parameters with the same name are * ignored. * - * @param array $vProperties - * @param array $filters * @param string $test * * @return bool @@ -597,14 +587,21 @@ class Plugin extends DAV\ServerPlugin foreach ($vProperties as $vProperty) { // If we got all the way here, we'll need to validate the // text-match filter. - $success = DAV\StringUtil::textMatch($vProperty[$filter['name']]->getValue(), $filter['text-match']['value'], $filter['text-match']['collation'], $filter['text-match']['match-type']); + if (isset($vProperty[$filter['name']])) { + $success = DAV\StringUtil::textMatch( + $vProperty[$filter['name']]->getValue(), + $filter['text-match']['value'], + $filter['text-match']['collation'], + $filter['text-match']['match-type'] + ); + if ($filter['text-match']['negate-condition']) { + $success = !$success; + } + } if ($success) { break; } } - if ($filter['text-match']['negate-condition']) { - $success = !$success; - } } // else // There are two conditions where we can already determine whether @@ -628,8 +625,6 @@ class Plugin extends DAV\ServerPlugin /** * Validates if a text-filter can be applied to a specific property. * - * @param array $texts - * @param array $filters * @param string $test * * @return bool @@ -640,15 +635,15 @@ class Plugin extends DAV\ServerPlugin $success = false; foreach ($texts as $haystack) { $success = DAV\StringUtil::textMatch($haystack, $filter['value'], $filter['collation'], $filter['match-type']); + if ($filter['negate-condition']) { + $success = !$success; + } // Breaking on the first match if ($success) { break; } } - if ($filter['negate-condition']) { - $success = !$success; - } if ($success && 'anyof' === $test) { return true; @@ -672,9 +667,6 @@ class Plugin extends DAV\ServerPlugin * * This event is scheduled late in the process, after most work for * propfind has been done. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFindLate(DAV\PropFind $propFind, DAV\INode $node) { @@ -699,8 +691,7 @@ class Plugin extends DAV\ServerPlugin * Sabre\DAV\Browser\Plugin. This allows us to generate an interface users * can use to create new addressbooks. * - * @param DAV\INode $node - * @param string $output + * @param string $output * * @return bool */ @@ -727,9 +718,6 @@ class Plugin extends DAV\ServerPlugin * This event is triggered after GET requests. * * This is used to transform data into jCal, if this was requested. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpAfterGet(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/VCFExportPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/VCFExportPlugin.php index 194927c5312..431391e0408 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/VCFExportPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/VCFExportPlugin.php @@ -32,8 +32,6 @@ class VCFExportPlugin extends DAV\ServerPlugin /** * Initializes the plugin and registers event handlers. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -49,9 +47,6 @@ class VCFExportPlugin extends DAV\ServerPlugin /** * Intercepts GET requests on addressbook urls ending with ?export. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpGet(RequestInterface $request, ResponseInterface $response) @@ -112,8 +107,6 @@ class VCFExportPlugin extends DAV\ServerPlugin /** * Merges all vcard objects, and builds one big vcf export. * - * @param array $nodes - * * @return string */ public function generateVCF(array $nodes) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php index f1b651e7687..b60fcebb630 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php @@ -43,8 +43,6 @@ class AddressData implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/ParamFilter.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/ParamFilter.php index 2d39dea7f7e..0a7ec065906 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/ParamFilter.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/ParamFilter.php @@ -43,8 +43,6 @@ abstract class ParamFilter implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/PropFilter.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/PropFilter.php index a22a577c9bc..5dedac8007c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/PropFilter.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Filter/PropFilter.php @@ -43,8 +43,6 @@ class PropFilter implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php index 9d005169850..fe5f976a039 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php @@ -33,8 +33,6 @@ class SupportedAddressData implements XmlSerializable /** * Creates the property. - * - * @param array|null $supportedData */ public function __construct(array $supportedData = null) { @@ -64,8 +62,6 @@ class SupportedAddressData implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedCollationSet.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedCollationSet.php index 66e451a91c4..b19eddd9c2b 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedCollationSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Property/SupportedCollationSet.php @@ -34,8 +34,6 @@ class SupportedCollationSet implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php index 845796760e6..c11d2dd7368 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookMultiGetReport.php @@ -71,8 +71,6 @@ class AddressBookMultiGetReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php index 0e6f26d3855..e1096fe28e1 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/CardDAV/Xml/Request/AddressBookQueryReport.php @@ -115,8 +115,6 @@ class AddressBookQueryReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -148,7 +146,6 @@ class AddressBookQueryReport implements XmlDeserializable } break; case '{'.Plugin::NS_CARDDAV.'}filter': - if (!is_null($newProps['filters'])) { throw new BadRequest('You can only include 1 {'.Plugin::NS_CARDDAV.'}filter element'); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php index aa8b1f573d1..3132333b7fc 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php @@ -86,9 +86,6 @@ abstract class AbstractBasic implements BackendInterface * * principals/users/[username] * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response) @@ -126,9 +123,6 @@ abstract class AbstractBasic implements BackendInterface * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function challenge(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBearer.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBearer.php index a2653b2b046..b6817479fd2 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBearer.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractBearer.php @@ -79,9 +79,6 @@ abstract class AbstractBearer implements BackendInterface * * principals/users/[username] * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response) @@ -120,9 +117,6 @@ abstract class AbstractBearer implements BackendInterface * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function challenge(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractDigest.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractDigest.php index 06c9ed3a489..297655da3d8 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractDigest.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/AbstractDigest.php @@ -89,9 +89,6 @@ abstract class AbstractDigest implements BackendInterface * * principals/users/[username] * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response) @@ -143,9 +140,6 @@ abstract class AbstractDigest implements BackendInterface * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function challenge(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/Apache.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/Apache.php index 201fe615cfa..ebf67cab228 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/Apache.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/Apache.php @@ -52,9 +52,6 @@ class Apache implements BackendInterface * * principals/users/[username] * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response) @@ -89,9 +86,6 @@ class Apache implements BackendInterface * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function challenge(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BackendInterface.php index 8598791fb7d..133eac9269a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BackendInterface.php @@ -40,9 +40,6 @@ interface BackendInterface * * principals/users/[username] * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response); @@ -63,9 +60,6 @@ interface BackendInterface * WWW-Authenticate headers may already have been set, and you'll want to * append your own WWW-Authenticate header instead of overwriting the * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function challenge(RequestInterface $request, ResponseInterface $response); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BasicCallBack.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BasicCallBack.php index aab3c5e1c83..5a8bb98ce69 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BasicCallBack.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/BasicCallBack.php @@ -30,8 +30,6 @@ class BasicCallBack extends AbstractBasic * * A callback must be provided to handle checking the username and * password. - * - * @param callable $callBack */ public function __construct(callable $callBack) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDO.php index 87ead6fcd93..9a06912d10a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDO.php @@ -31,8 +31,6 @@ class PDO extends AbstractDigest * Creates the backend object. * * If the filename argument is passed in, it will parse out the specified file fist. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php new file mode 100644 index 00000000000..39324e4db8a --- /dev/null +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Backend/PDOBasicAuth.php @@ -0,0 +1,114 @@ +pdo = $pdo; + if (isset($options['tableName'])) { + $this->tableName = $options['tableName']; + } else { + $this->tableName = 'users'; + } + if (isset($options['digestColumn'])) { + $this->digestColumn = $options['digestColumn']; + } else { + $this->digestColumn = 'digest'; + } + if (isset($options['uuidColumn'])) { + $this->uuidColumn = $options['uuidColumn']; + } else { + $this->uuidColumn = 'username'; + } + if (isset($options['digestPrefix'])) { + $this->digestPrefix = $options['digestPrefix']; + } + } + + /** + * Validates a username and password. + * + * This method should return true or false depending on if login + * succeeded. + * + * @param string $username + * @param string $password + * + * @return bool + */ + public function validateUserPass($username, $password) + { + $stmt = $this->pdo->prepare('SELECT '.$this->digestColumn.' FROM '.$this->tableName.' WHERE '.$this->uuidColumn.' = ?'); + $stmt->execute([$username]); + $result = $stmt->fetchAll(); + + if (!count($result)) { + return false; + } else { + $digest = $result[0][$this->digestColumn]; + + if (isset($this->digestPrefix)) { + $digest = substr($digest, strlen($this->digestPrefix)); + } + + if (password_verify($password, $digest)) { + return true; + } + + return false; + } + } +} diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Plugin.php index 9be90283fc5..eb4f27ca679 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Auth/Plugin.php @@ -67,8 +67,6 @@ class Plugin extends ServerPlugin /** * Adds an authentication backend to the plugin. - * - * @param Backend\BackendInterface $authBackend */ public function addBackend(Backend\BackendInterface $authBackend) { @@ -77,8 +75,6 @@ class Plugin extends ServerPlugin /** * Initializes the plugin. This function is automatically called by the server. - * - * @param Server $server */ public function initialize(Server $server) { @@ -117,11 +113,6 @@ class Plugin extends ServerPlugin /** * This method is called before any HTTP method and forces users to be authenticated. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * - * @return bool */ public function beforeMethod(RequestInterface $request, ResponseInterface $response) { @@ -176,9 +167,6 @@ class Plugin extends ServerPlugin * unsuccessful. For every auth backend there will be one reason, so usually * there's just one. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return array */ public function check(RequestInterface $request, ResponseInterface $response) @@ -214,11 +202,6 @@ class Plugin extends ServerPlugin * This method will for example cause a HTTP Basic backend to set a * WWW-Authorization header, indicating to the client that it should * authenticate. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * - * @return array */ public function challenge(RequestInterface $request, ResponseInterface $response) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/GuessContentType.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/GuessContentType.php index 7466babb307..5cda0b8428d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/GuessContentType.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/GuessContentType.php @@ -49,8 +49,6 @@ class GuessContentType extends DAV\ServerPlugin /** * Initializes the plugin. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -63,9 +61,6 @@ class GuessContentType extends DAV\ServerPlugin * Our PROPFIND handler. * * Here we set a contenttype, if the node didn't already have one. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { @@ -85,10 +80,12 @@ class GuessContentType extends DAV\ServerPlugin */ protected function getContentType($fileName) { - // Just grabbing the extension - $extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1)); - if (isset($this->extensionMap[$extension])) { - return $this->extensionMap[$extension]; + if (null !== $fileName) { + // Just grabbing the extension + $extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1)); + if (isset($this->extensionMap[$extension])) { + return $this->extensionMap[$extension]; + } } return 'application/octet-stream'; diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutput.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutput.php index 59b3f560481..be5a2845697 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutput.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutput.php @@ -28,8 +28,6 @@ interface HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutputHelper.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutputHelper.php index a7c7474379f..0a881abad68 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutputHelper.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/HtmlOutputHelper.php @@ -42,7 +42,6 @@ class HtmlOutputHelper * that can be used to make output a lot shorter. * * @param string $baseUri - * @param array $namespaceMap */ public function __construct($baseUri, array $namespaceMap) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php index 25e061128ec..0bbe70c6682 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/MapGetToPropFind.php @@ -29,8 +29,6 @@ class MapGetToPropFind extends DAV\ServerPlugin /** * Initializes the plugin and subscribes to events. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -41,9 +39,6 @@ class MapGetToPropFind extends DAV\ServerPlugin /** * This method intercepts GET requests to non-files, and changes it into an HTTP PROPFIND request. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpGet(RequestInterface $request, ResponseInterface $response) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/Plugin.php index e2fab4b79f0..89495e5dbd7 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Browser/Plugin.php @@ -70,8 +70,6 @@ class Plugin extends DAV\ServerPlugin /** * Initializes the plugin and subscribes to events. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -87,11 +85,6 @@ class Plugin extends DAV\ServerPlugin /** * This method intercepts GET requests that have ?sabreAction=info * appended to the URL. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * - * @return bool */ public function httpGetEarly(RequestInterface $request, ResponseInterface $response) { @@ -104,9 +97,6 @@ class Plugin extends DAV\ServerPlugin /** * This method intercepts GET requests to collections and returns the html. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpGet(RequestInterface $request, ResponseInterface $response) @@ -160,14 +150,14 @@ class Plugin extends DAV\ServerPlugin /** * Handles POST requests for tree operations. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpPOST(RequestInterface $request, ResponseInterface $response) { $contentType = $request->getHeader('Content-Type'); + if (!\is_string($contentType)) { + return; + } list($contentType) = explode(';', $contentType); if ('application/x-www-form-urlencoded' !== $contentType && 'multipart/form-data' !== $contentType) { @@ -220,7 +210,6 @@ class Plugin extends DAV\ServerPlugin // @codeCoverageIgnoreStart case 'put': - if ($_FILES) { $file = current($_FILES); } else { @@ -499,9 +488,8 @@ HTML; * This specifically generates the interfaces for creating new files, and * creating new directories. * - * @param DAV\INode $node - * @param mixed $output - * @param string $path + * @param mixed $output + * @param string $path */ public function htmlActionsPanel(DAV\INode $node, &$output, $path) { @@ -630,7 +618,6 @@ HTML; /** * Maps a resource type to a human-readable string and icon. * - * @param array $resourceTypes * @param DAV\INode $node * * @return array diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Client.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Client.php index cfa24cd2992..a9de71cdbb5 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Client.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Client.php @@ -112,8 +112,6 @@ class Client extends HTTP\Client * requests to 'discover' this information. * * Encoding is a bitmap with one of the ENCODING constants. - * - * @param array $settings */ public function __construct(array $settings) { @@ -192,7 +190,6 @@ class Client extends HTTP\Client * made to the server to also return all child resources. * * @param string $url - * @param array $properties * @param int $depth * * @return array @@ -261,7 +258,6 @@ class Client extends HTTP\Client * attempt is made to delete the property. * * @param string $url - * @param array $properties * * @return bool */ @@ -359,7 +355,6 @@ class Client extends HTTP\Client * @param string $method * @param string $url * @param string|resource|null $body - * @param array $headers * * @throws clientException, in case a curl error occurred * @@ -415,7 +410,6 @@ class Client extends HTTP\Client * ] * ] * - * * @param string $body xml body * * @return array diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/CorePlugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/CorePlugin.php index ef1dfceb65b..dbd8976b174 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/CorePlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/CorePlugin.php @@ -27,8 +27,6 @@ class CorePlugin extends ServerPlugin /** * Sets up the plugin. - * - * @param Server $server */ public function initialize(Server $server) { @@ -70,9 +68,6 @@ class CorePlugin extends ServerPlugin /** * This is the default implementation for the GET method. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpGet(RequestInterface $request, ResponseInterface $response) @@ -210,9 +205,6 @@ class CorePlugin extends ServerPlugin /** * HTTP OPTIONS. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpOptions(RequestInterface $request, ResponseInterface $response) @@ -245,9 +237,6 @@ class CorePlugin extends ServerPlugin * determine if a remote file was changed, so they can use a local cached * version, instead of downloading it again * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpHead(RequestInterface $request, ResponseInterface $response) @@ -281,9 +270,6 @@ class CorePlugin extends ServerPlugin * HTTP Delete. * * The HTTP delete method, deletes a given uri - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpDelete(RequestInterface $request, ResponseInterface $response) { @@ -314,9 +300,6 @@ class CorePlugin extends ServerPlugin * The response body is also an xml document, containing information about every uri resource and the requested properties * * It has to return a HTTP 207 Multi-status status code - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpPropFind(RequestInterface $request, ResponseInterface $response) { @@ -374,9 +357,6 @@ class CorePlugin extends ServerPlugin * This method is called to update properties on a Node. The request is an XML body with all the mutations. * In this XML body it is specified which properties should be set/updated and/or deleted * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpPropPatch(RequestInterface $request, ResponseInterface $response) @@ -443,9 +423,6 @@ class CorePlugin extends ServerPlugin * * If a new resource was created, a 201 Created status code should be returned. If an existing resource is updated, it's a 204 No Content * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpPut(RequestInterface $request, ResponseInterface $response) @@ -546,9 +523,6 @@ class CorePlugin extends ServerPlugin * * The MKCOL method is used to create a new collection (directory) on the server * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpMkcol(RequestInterface $request, ResponseInterface $response) @@ -607,9 +581,6 @@ class CorePlugin extends ServerPlugin * * This method moves one uri to a different uri. A lot of the actual request processing is done in getCopyMoveInfo * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpMove(RequestInterface $request, ResponseInterface $response) @@ -663,9 +634,6 @@ class CorePlugin extends ServerPlugin * This method copies one uri to a different uri, and works much like the MOVE request * A lot of the actual request processing is done in getCopyMoveInfo * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpCopy(RequestInterface $request, ResponseInterface $response) @@ -677,6 +645,10 @@ class CorePlugin extends ServerPlugin if (!$this->server->emit('beforeBind', [$copyInfo['destination']])) { return false; } + if (!$this->server->emit('beforeCopy', [$path, $copyInfo['destination']])) { + return false; + } + if ($copyInfo['destinationExists']) { if (!$this->server->emit('beforeUnbind', [$copyInfo['destination']])) { return false; @@ -685,6 +657,7 @@ class CorePlugin extends ServerPlugin } $this->server->tree->copy($path, $copyInfo['destination']); + $this->server->emit('afterCopy', [$path, $copyInfo['destination']]); $this->server->emit('afterBind', [$copyInfo['destination']]); // If a resource was overwritten we should send a 204, otherwise a 201 @@ -702,9 +675,6 @@ class CorePlugin extends ServerPlugin * Although the REPORT method is not part of the standard WebDAV spec (it's from rfc3253) * It's used in a lot of extensions, so it made sense to implement it into the core. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpReport(RequestInterface $request, ResponseInterface $response) @@ -733,8 +703,7 @@ class CorePlugin extends ServerPlugin * Here we check if a user attempted to update a protected property and * ensure that the process fails if this is the case. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatchProtectedPropertyCheck($path, PropPatch $propPatch) { @@ -757,8 +726,7 @@ class CorePlugin extends ServerPlugin * Here we check if a node implements IProperties and let the node handle * updating of (some) properties. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatchNodeUpdate($path, PropPatch $propPatch) { @@ -774,9 +742,6 @@ class CorePlugin extends ServerPlugin * This method is called when properties are retrieved. * * Here we add all the default properties. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { @@ -832,9 +797,6 @@ class CorePlugin extends ServerPlugin * * This event is called a bit later, so plugins have a chance first to * populate the result. - * - * @param PropFind $propFind - * @param INode $node */ public function propFindNode(PropFind $propFind, INode $node) { @@ -851,9 +813,6 @@ class CorePlugin extends ServerPlugin * * This specific handler is called very late in the process, because we * want other systems to first have a chance to handle the properties. - * - * @param PropFind $propFind - * @param INode $node */ public function propFindLate(PropFind $propFind, INode $node) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception.php index e1d9906234b..9fc1d16bbfc 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception.php @@ -31,9 +31,6 @@ class Exception extends \Exception /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param Server $server - * @param \DOMElement $errorNode */ public function serialize(Server $server, \DOMElement $errorNode) { @@ -44,8 +41,6 @@ class Exception extends \Exception * * The headers must be returned as an array. * - * @param Server $server - * * @return array */ public function getHTTPHeaders(Server $server) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ConflictingLock.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ConflictingLock.php index c1a4914edbc..7ceed266f57 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ConflictingLock.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ConflictingLock.php @@ -20,9 +20,6 @@ class ConflictingLock extends Locked { /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidResourceType.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidResourceType.php index 99baeb8bcfb..4fabd24ad5c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidResourceType.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidResourceType.php @@ -20,9 +20,6 @@ class InvalidResourceType extends Forbidden { /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param \Sabre\DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php index 6c5f1c4358e..37b28ca544a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php @@ -25,9 +25,6 @@ class InvalidSyncToken extends Forbidden { /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php index 1c740238496..a813b1a3865 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php @@ -27,9 +27,6 @@ class LockTokenMatchesRequestUri extends Conflict /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/Locked.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/Locked.php index 632bafc6081..28263cf13ed 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/Locked.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/Locked.php @@ -51,9 +51,6 @@ class Locked extends DAV\Exception /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php index a3d9c56f2d4..dbf42ed9fb4 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Sabre\DAV\Exception; use Sabre\DAV; +use Sabre\DAV\Server; /** * MethodNotAllowed. @@ -32,11 +33,9 @@ class MethodNotAllowed extends DAV\Exception * * The headers must be returned as an array. * - * @param \Sabre\DAV\Server $server - * * @return array */ - public function getHTTPHeaders(\Sabre\DAV\Server $server) + public function getHTTPHeaders(Server $server) { $methods = $server->getAllowedMethods($server->getRequestUri()); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/PreconditionFailed.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/PreconditionFailed.php index 20d8a2a3097..7240f369642 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/PreconditionFailed.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/PreconditionFailed.php @@ -53,9 +53,6 @@ class PreconditionFailed extends DAV\Exception /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ReportNotSupported.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ReportNotSupported.php index cecfec12d9b..a483838e66b 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ReportNotSupported.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/ReportNotSupported.php @@ -19,9 +19,6 @@ class ReportNotSupported extends UnsupportedMediaType { /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/TooManyMatches.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/TooManyMatches.php index 7dbe878b957..3f7d2d5fb58 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/TooManyMatches.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Exception/TooManyMatches.php @@ -25,9 +25,6 @@ class TooManyMatches extends Forbidden { /** * This method allows the exception to include additional information into the WebDAV error response. - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/FSExt/File.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/FSExt/File.php index 060ef5a4857..74849b564ea 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/FSExt/File.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/FSExt/File.php @@ -41,7 +41,7 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport * * The second argument is the type of update we're doing. * This is either: - * * 1. append + * * 1. append (default) * * 2. update based on a start byte * * 3. update based on an end byte *; @@ -75,6 +75,9 @@ class File extends Node implements DAV\PartialUpdate\IPatchSupport $f = fopen($this->path, 'c'); fseek($f, $offset, SEEK_END); break; + default: + $f = fopen($this->path, 'a'); + break; } if (is_string($data)) { fwrite($f, $data); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/IExtendedCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/IExtendedCollection.php index d43b44bcb75..fcf12a27e2d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/IExtendedCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/IExtendedCollection.php @@ -36,7 +36,6 @@ interface IExtendedCollection extends ICollection * property for you. * * @param string $name - * @param MkCol $mkCol * * @throws Exception\InvalidResourceType */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/IProperties.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/IProperties.php index d50fdff2024..a69c178c02d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/IProperties.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/IProperties.php @@ -23,8 +23,6 @@ interface IProperties extends INode * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. - * - * @param PropPatch $propPatch */ public function propPatch(PropPatch $propPatch); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/BackendInterface.php index 9a6919f506c..4d21beb2e4c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/BackendInterface.php @@ -35,8 +35,7 @@ interface BackendInterface /** * Locks a uri. * - * @param string $uri - * @param Locks\LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -45,8 +44,7 @@ interface BackendInterface /** * Removes a lock from a uri. * - * @param string $uri - * @param Locks\LockInfo $lockInfo + * @param string $uri * * @return bool */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/File.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/File.php index 5957f35dd84..b3818949993 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/File.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/File.php @@ -82,8 +82,7 @@ class File extends AbstractBackend /** * Locks a uri. * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -113,8 +112,7 @@ class File extends AbstractBackend /** * Removes a lock from a uri. * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -166,8 +164,6 @@ class File extends AbstractBackend /** * Saves the lockdata. - * - * @param array $newData */ protected function putData(array $newData) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/PDO.php index 36a12d1abb6..3f425f98db8 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Backend/PDO.php @@ -34,8 +34,6 @@ class PDO extends AbstractBackend /** * Constructor. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -111,8 +109,7 @@ class PDO extends AbstractBackend /** * Locks a uri. * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -161,8 +158,7 @@ class PDO extends AbstractBackend /** * Removes a lock from a uri. * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Plugin.php index 6d3e9b883e6..2443f204c3f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Locks/Plugin.php @@ -40,8 +40,6 @@ class Plugin extends DAV\ServerPlugin /** * __construct. - * - * @param Backend\BackendInterface $locksBackend */ public function __construct(Backend\BackendInterface $locksBackend) { @@ -52,8 +50,6 @@ class Plugin extends DAV\ServerPlugin * Initializes the plugin. * * This method is automatically called by the Server class after addPlugin. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -84,9 +80,6 @@ class Plugin extends DAV\ServerPlugin /** * This method is called after most properties have been found * it allows us to add in any Lock-related properties. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFind(DAV\PropFind $propFind, DAV\INode $node) { @@ -159,9 +152,6 @@ class Plugin extends DAV\ServerPlugin * * Additionally, a lock can be requested for a non-existent file. In these case we're obligated to create an empty file as per RFC4918:S7.3 * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpLock(RequestInterface $request, ResponseInterface $response) @@ -260,9 +250,6 @@ class Plugin extends DAV\ServerPlugin * * This WebDAV method allows you to remove a lock from a node. The client should provide a valid locktoken through the Lock-token http header * The server should return 204 (No content) on success - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpUnlock(RequestInterface $request, ResponseInterface $response) { @@ -308,6 +295,10 @@ class Plugin extends DAV\ServerPlugin { $locks = $this->getLocks($path, $includeChildren = true); foreach ($locks as $lock) { + // don't delete a lock on a parent dir + if (0 !== strpos($lock->uri, $path)) { + continue; + } $this->unlockNode($path, $lock); } } @@ -318,8 +309,7 @@ class Plugin extends DAV\ServerPlugin * All the locking information is supplied in the lockInfo object. The object has a suggested timeout, but this can be safely ignored * It is important that if the existing timeout is ignored, the property is overwritten, as this needs to be sent back to the client * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -337,8 +327,7 @@ class Plugin extends DAV\ServerPlugin * * This method removes a lock from a uri. It is assumed all the supplied information is correct and verified * - * @param string $uri - * @param LockInfo $lockInfo + * @param string $uri * * @return bool */ @@ -380,15 +369,13 @@ class Plugin extends DAV\ServerPlugin /** * Generates the response for successful LOCK requests. * - * @param LockInfo $lockInfo - * * @return string */ protected function generateLockResponse(LockInfo $lockInfo) { return $this->server->xml->write('{DAV:}prop', [ '{DAV:}lockdiscovery' => new DAV\Xml\Property\LockDiscovery([$lockInfo]), - ]); + ], $this->server->getBaseUri()); } /** @@ -401,8 +388,7 @@ class Plugin extends DAV\ServerPlugin * must be present in the request, and reject requests without the proper * tokens. * - * @param RequestInterface $request - * @param mixed $conditions + * @param mixed $conditions */ public function validateTokens(RequestInterface $request, &$conditions) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Mount/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Mount/Plugin.php index 5eaa4d4629c..b7f4851f68e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Mount/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Mount/Plugin.php @@ -28,8 +28,6 @@ class Plugin extends DAV\ServerPlugin /** * Initializes the plugin and registers event handles. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -41,9 +39,6 @@ class Plugin extends DAV\ServerPlugin * 'beforeMethod' event handles. This event handles intercepts GET requests ending * with ?mount. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpGet(RequestInterface $request, ResponseInterface $response) @@ -67,8 +62,7 @@ class Plugin extends DAV\ServerPlugin /** * Generates the davmount response. * - * @param ResponseInterface $response - * @param string $uri absolute uri + * @param string $uri absolute uri */ public function davMount(ResponseInterface $response, $uri) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PartialUpdate/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PartialUpdate/Plugin.php index f8ffc370606..d6f4d32bd12 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PartialUpdate/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PartialUpdate/Plugin.php @@ -39,8 +39,6 @@ class Plugin extends DAV\ServerPlugin * Initializes the plugin. * * This method is automatically called by the Server class after addPlugin. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -106,9 +104,6 @@ class Plugin extends DAV\ServerPlugin * The WebDAV patch request can be used to modify only a part of an * existing resource. If the resource does not exist yet and the first * offset is not 0, the request fails - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function httpPatch(RequestInterface $request, ResponseInterface $response) { @@ -191,8 +186,6 @@ class Plugin extends DAV\ServerPlugin * [2,10,null] - update bytes 10 until the end of the patch body * [3,-5] - update from 5 bytes from the end of the file. * - * @param RequestInterface $request - * * @return array|null */ public function getHTTPUpdateRange(RequestInterface $request) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropFind.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropFind.php index 4b6fe28ebf7..e9ffb07cbcb 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropFind.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropFind.php @@ -38,7 +38,6 @@ class PropFind * Creates the PROPFIND object. * * @param string $path - * @param array $properties * @param int $depth * @param int $requestType */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropPatch.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropPatch.php index 160bdb1a886..092909dea87 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropPatch.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropPatch.php @@ -82,7 +82,6 @@ class PropPatch * code associated with the operation. * * @param string|string[] $properties - * @param callable $callback */ public function handle($properties, callable $callback) { @@ -112,8 +111,6 @@ class PropPatch * Call this function if you wish to handle _all_ properties that haven't * been handled by anything else yet. Note that you effectively claim with * this that you promise to process _all_ properties that are coming in. - * - * @param callable $callback */ public function handleRemaining(callable $callback) { @@ -250,8 +247,7 @@ class PropPatch /** * Executes a property callback with the single-property syntax. * - * @param string $propertyName - * @param callable $callback + * @param string $propertyName */ private function doCallBackSingleProp($propertyName, callable $callback) { @@ -281,9 +277,6 @@ class PropPatch /** * Executes a property callback with the multi-property syntax. - * - * @param array $propertyList - * @param callable $callback */ private function doCallBackMultiProp(array $propertyList, callable $callback) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/BackendInterface.php index 4bdc447758c..64a8825cbbd 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/BackendInterface.php @@ -32,8 +32,7 @@ interface BackendInterface * However, you can also support the 'allprops' property here. In that * case, you should check for $propFind->isAllProps(). * - * @param string $path - * @param PropFind $propFind + * @param string $path */ public function propFind($path, PropFind $propFind); @@ -46,8 +45,7 @@ interface BackendInterface * Usually you would want to call 'handleRemaining' on this object, to get; * a list of all properties that need to be stored. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatch($path, PropPatch $propPatch); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php index e640f420ef1..89603319268 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php @@ -53,8 +53,6 @@ class PDO implements BackendInterface /** * Creates the PDO property storage engine. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -74,8 +72,7 @@ class PDO implements BackendInterface * However, you can also support the 'allprops' property here. In that * case, you should check for $propFind->isAllProps(). * - * @param string $path - * @param PropFind $propFind + * @param string $path */ public function propFind($path, PropFind $propFind) { @@ -115,8 +112,7 @@ class PDO implements BackendInterface * Usually you would want to call 'handleRemaining' on this object, to get; * a list of all properties that need to be stored. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatch($path, PropPatch $propPatch) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Plugin.php index aa8610eb824..da47ec9a931 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/PropertyStorage/Plugin.php @@ -46,8 +46,6 @@ class Plugin extends ServerPlugin /** * Creates the plugin. - * - * @param Backend\BackendInterface $backend */ public function __construct(Backend\BackendInterface $backend) { @@ -61,8 +59,6 @@ class Plugin extends ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param Server $server */ public function initialize(Server $server) { @@ -77,9 +73,6 @@ class Plugin extends ServerPlugin * * If there's any requested properties that don't have a value yet, this * plugin will look in the property storage backend to find them. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { @@ -97,8 +90,7 @@ class Plugin extends ServerPlugin * If there's any updated properties that haven't been stored, the * propertystorage backend can handle it. * - * @param string $path - * @param PropPatch $propPatch + * @param string $path */ public function propPatch($path, PropPatch $propPatch) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Server.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Server.php index 09760e9d111..1f8300d4a58 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Server.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Server.php @@ -14,6 +14,7 @@ use Sabre\HTTP; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; use Sabre\Uri; +use Sabre\Xml\Writer; /** * Main DAV server class. @@ -24,8 +25,8 @@ use Sabre\Uri; */ class Server implements LoggerAwareInterface, EmitterInterface { - use WildcardEmitterTrait; use LoggerAwareTrait; + use WildcardEmitterTrait; /** * Infinity is used for some request supporting the HTTP Depth header and indicates that the operation should traverse the entire tree. @@ -184,6 +185,15 @@ class Server implements LoggerAwareInterface, EmitterInterface */ public static $exposeVersion = true; + /** + * If this setting is turned on, any multi status response on any PROPFIND will be streamed to the output buffer. + * This will be beneficial for large result sets which will no longer consume a large amount of memory as well as + * send back data to the client earlier. + * + * @var bool + */ + public static $streamMultiStatus = false; + /** * Sets up the server. * @@ -198,8 +208,10 @@ class Server implements LoggerAwareInterface, EmitterInterface * the nodes in the array as top-level children. * * @param Tree|INode|array|null $treeOrNode The tree object + * + * @throws Exception */ - public function __construct($treeOrNode = null) + public function __construct($treeOrNode = null, HTTP\Sapi $sapi = null) { if ($treeOrNode instanceof Tree) { $this->tree = $treeOrNode; @@ -216,7 +228,7 @@ class Server implements LoggerAwareInterface, EmitterInterface } $this->xml = new Xml\Service(); - $this->sapi = new HTTP\Sapi(); + $this->sapi = $sapi ?? new HTTP\Sapi(); $this->httpResponse = new HTTP\Response(); $this->httpRequest = $this->sapi->getRequest(); $this->addPlugin(new CorePlugin()); @@ -383,8 +395,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * Adds a plugin to the server. * * For more information, console the documentation of Sabre\DAV\ServerPlugin - * - * @param ServerPlugin $plugin */ public function addPlugin(ServerPlugin $plugin) { @@ -437,9 +447,7 @@ class Server implements LoggerAwareInterface, EmitterInterface /** * Handles a http request, and execute a method based on its name. * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param bool $sendResponse whether to send the HTTP response to the DAV client + * @param bool $sendResponse whether to send the HTTP response to the DAV client */ public function invokeMethod(RequestInterface $request, ResponseInterface $response, $sendResponse = true) { @@ -698,8 +706,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * * destination - Destination path * * destinationExists - Whether or not the destination is an existing url (and should therefore be overwritten) * - * @param RequestInterface $request - * * @throws Exception\BadRequest upon missing or broken request headers * @throws Exception\UnsupportedMediaType when trying to copy into a * non-collection @@ -872,8 +878,7 @@ class Server implements LoggerAwareInterface, EmitterInterface /** * Small helper to support PROPFIND with DEPTH_INFINITY. * - * @param PropFind $propFind - * @param array $yieldFirst + * @param array $yieldFirst * * @return \Traversable */ @@ -890,7 +895,7 @@ class Server implements LoggerAwareInterface, EmitterInterface } $propertyNames = $propFind->getRequestedProperties(); - $propFindType = !empty($propertyNames) ? PropFind::NORMAL : PropFind::ALLPROPS; + $propFindType = !$propFind->isAllProps() ? PropFind::NORMAL : PropFind::ALLPROPS; foreach ($this->tree->getChildren($path) as $childNode) { if ('' !== $path) { @@ -1004,9 +1009,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * The result is returned as an array, with paths for it's keys. * The result may be returned out of order. * - * @param array $paths - * @param array $propertyNames - * * @return array */ public function getPropertiesForMultiplePaths(array $paths, array $propertyNames = []) @@ -1043,9 +1045,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * target node and simply want to run through the system to get a correct * list of properties. * - * @param PropFind $propFind - * @param INode $node - * * @return bool */ public function getPropertiesByNode(PropFind $propFind, INode $node) @@ -1076,7 +1075,12 @@ class Server implements LoggerAwareInterface, EmitterInterface return false; } - $parent = $this->tree->getNodeForPath($dir); + try { + $parent = $this->tree->getNodeForPath($dir); + } catch (Exception\NotFound $e) { + throw new Exception\Conflict('Files cannot be created in non-existent collections'); + } + if (!$parent instanceof ICollection) { throw new Exception\Conflict('Files can only be created as children of collections'); } @@ -1152,8 +1156,7 @@ class Server implements LoggerAwareInterface, EmitterInterface /** * Use this method to create a new collection. * - * @param string $uri The new uri - * @param MkCol $mkCol + * @param string $uri The new uri * * @return array|null */ @@ -1234,6 +1237,7 @@ class Server implements LoggerAwareInterface, EmitterInterface $this->tree->markDirty($parentUri); $this->emit('afterBind', [$uri]); + $this->emit('afterCreateCollection', [$uri]); } /** @@ -1250,7 +1254,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * as their values. * * @param string $path - * @param array $properties * * @return array */ @@ -1281,9 +1284,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * related to If-None-Match, If-Match and If-Unmodified Since. It will * set the status to 304 Not Modified for If-Modified_since. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function checkPreconditions(RequestInterface $request, ResponseInterface $response) @@ -1554,8 +1554,6 @@ class Server implements LoggerAwareInterface, EmitterInterface * ], * ] * - * @param RequestInterface $request - * * @return array */ public function getIfConditions(RequestInterface $request) @@ -1608,8 +1606,6 @@ class Server implements LoggerAwareInterface, EmitterInterface /** * Returns an array with resourcetypes for a node. * - * @param INode $node - * * @return array */ public function getResourceTypeForNode(INode $node) @@ -1628,19 +1624,36 @@ class Server implements LoggerAwareInterface, EmitterInterface // {{{ XML Readers & Writers /** - * Generates a WebDAV propfind response body based on a list of nodes. + * Returns a callback generating a WebDAV propfind response body based on a list of nodes. * * If 'strip404s' is set to true, all 404 responses will be removed. * * @param array|\Traversable $fileProperties The list with nodes * @param bool $strip404s * - * @return string + * @return callable|string */ public function generateMultiStatus($fileProperties, $strip404s = false) { $w = $this->xml->getWriter(); + if (self::$streamMultiStatus) { + return function () use ($fileProperties, $strip404s, $w) { + $w->openUri('php://output'); + $this->writeMultiStatus($w, $fileProperties, $strip404s); + $w->flush(); + }; + } $w->openMemory(); + $this->writeMultiStatus($w, $fileProperties, $strip404s); + + return $w->outputMemory(); + } + + /** + * @param $fileProperties + */ + private function writeMultiStatus(Writer $w, $fileProperties, bool $strip404s) + { $w->contextUri = $this->baseUri; $w->startDocument(); @@ -1662,7 +1675,6 @@ class Server implements LoggerAwareInterface, EmitterInterface ]); } $w->endElement(); - - return $w->outputMemory(); + $w->endDocument(); } } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/ServerPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/ServerPlugin.php index 9aefa7f72dc..70acb01eb56 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/ServerPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/ServerPlugin.php @@ -22,8 +22,6 @@ abstract class ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param Server $server */ abstract public function initialize(Server $server); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Sharing/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Sharing/Plugin.php index 5706fabf178..e7adbeee664 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Sharing/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Sharing/Plugin.php @@ -79,8 +79,6 @@ class Plugin extends ServerPlugin * addPlugin is called. * * This method should set up the required event subscriptions. - * - * @param Server $server */ public function initialize(Server $server) { @@ -139,9 +137,6 @@ class Plugin extends ServerPlugin * This event is triggered when properties are requested for nodes. * * This allows us to inject any sharings-specific properties. - * - * @param PropFind $propFind - * @param INode $node */ public function propFind(PropFind $propFind, INode $node) { @@ -161,9 +156,6 @@ class Plugin extends ServerPlugin /** * We intercept this to handle POST requests on shared resources. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool|null */ public function httpPost(RequestInterface $request, ResponseInterface $response) @@ -187,7 +179,6 @@ class Plugin extends ServerPlugin switch ($documentType) { case '{DAV:}share-resource': - $this->shareResource($path, $message->sharees); $response->setStatus(200); // Adding this because sending a response body may cause issues, @@ -207,9 +198,6 @@ class Plugin extends ServerPlugin * hat are supported on a particular node. * * We need to add a number of privileges for scheduling purposes. - * - * @param INode $node - * @param array $supportedPrivilegeSet */ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilegeSet) { @@ -245,7 +233,6 @@ class Plugin extends ServerPlugin * This method is used to generate HTML output for the * DAV\Browser\Plugin. * - * @param INode $node * @param string $output * @param string $path * diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/SimpleCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/SimpleCollection.php index 1fbb6982dc6..3cd14d9ba80 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/SimpleCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/SimpleCollection.php @@ -58,8 +58,6 @@ class SimpleCollection extends Collection /** * Adds a new childnode to this collection. - * - * @param INode $child */ public function addChild(INode $child) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/StringUtil.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/StringUtil.php index 13a4399e30d..edfb7fa5c29 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/StringUtil.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/StringUtil.php @@ -77,10 +77,8 @@ class StringUtil */ public static function ensureUTF8($input) { - $encoding = mb_detect_encoding($input, ['UTF-8', 'ISO-8859-1'], true); - - if ('ISO-8859-1' === $encoding) { - return utf8_encode($input); + if (!mb_check_encoding($input, 'UTF-8') && mb_check_encoding($input, 'ISO-8859-1')) { + return mb_convert_encoding($input, 'UTF-8', 'ISO-8859-1'); } else { return $input; } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Sync/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Sync/Plugin.php index f76827fe38e..8609f759e5e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Sync/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Sync/Plugin.php @@ -48,8 +48,6 @@ class Plugin extends DAV\ServerPlugin * Initializes the plugin. * * This is when the plugin registers it's hooks. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -97,8 +95,7 @@ class Plugin extends DAV\ServerPlugin /** * This method handles the {DAV:}sync-collection HTTP REPORT. * - * @param string $uri - * @param SyncCollectionReport $report + * @param string $uri */ public function syncCollection($uri, SyncCollectionReport $report) { @@ -127,6 +124,10 @@ class Plugin extends DAV\ServerPlugin throw new DAV\Exception\InvalidSyncToken('Invalid or unknown sync token'); } + if (!array_key_exists('result_truncated', $changeInfo)) { + $changeInfo['result_truncated'] = false; + } + // Encoding the response $this->sendSyncCollectionResponse( $changeInfo['syncToken'], @@ -134,7 +135,8 @@ class Plugin extends DAV\ServerPlugin $changeInfo['added'], $changeInfo['modified'], $changeInfo['deleted'], - $report->properties + $report->properties, + $changeInfo['result_truncated'] ); } @@ -143,12 +145,8 @@ class Plugin extends DAV\ServerPlugin * * @param string $syncToken * @param string $collectionUrl - * @param array $added - * @param array $modified - * @param array $deleted - * @param array $properties */ - protected function sendSyncCollectionResponse($syncToken, $collectionUrl, array $added, array $modified, array $deleted, array $properties) + protected function sendSyncCollectionResponse($syncToken, $collectionUrl, array $added, array $modified, array $deleted, array $properties, bool $resultTruncated = false) { $fullPaths = []; @@ -171,6 +169,10 @@ class Plugin extends DAV\ServerPlugin $fullPath = $collectionUrl.'/'.$item; $responses[] = new DAV\Xml\Element\Response($fullPath, [], 404); } + if ($resultTruncated) { + $responses[] = new DAV\Xml\Element\Response($collectionUrl.'/', [], 507); + } + $multiStatus = new DAV\Xml\Response\MultiStatus($responses, self::SYNCTOKEN_PREFIX.$syncToken); $this->server->httpResponse->setStatus(207); @@ -183,9 +185,6 @@ class Plugin extends DAV\ServerPlugin /** * This method is triggered whenever properties are requested for a node. * We intercept this to see if we must return a {DAV:}sync-token. - * - * @param DAV\PropFind $propFind - * @param DAV\INode $node */ public function propFind(DAV\PropFind $propFind, DAV\INode $node) { @@ -204,8 +203,7 @@ class Plugin extends DAV\ServerPlugin * It's a moment where this plugin can check all the supplied lock tokens * in the If: header, and check if they are valid. * - * @param RequestInterface $request - * @param array $conditions + * @param array $conditions */ public function validateTokens(RequestInterface $request, &$conditions) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/TemporaryFileFilterPlugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/TemporaryFileFilterPlugin.php index 6cf772f445a..9f8ec5b54e8 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/TemporaryFileFilterPlugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/TemporaryFileFilterPlugin.php @@ -90,8 +90,6 @@ class TemporaryFileFilterPlugin extends ServerPlugin * * This is called automatically be the Server class after this plugin is * added with Sabre\DAV\Server::addPlugin() - * - * @param Server $server */ public function initialize(Server $server) { @@ -106,9 +104,6 @@ class TemporaryFileFilterPlugin extends ServerPlugin * This method intercepts any GET, DELETE, PUT and PROPFIND calls to * filenames that are known to match the 'temporary file' regex. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function beforeMethod(RequestInterface $request, ResponseInterface $response) @@ -137,11 +132,10 @@ class TemporaryFileFilterPlugin extends ServerPlugin * This is used to deal with HTTP LOCK requests which create a new * file. * - * @param string $uri - * @param resource $data - * @param ICollection $parent - * @param bool $modified should be set to true, if this event handler - * changed &$data + * @param string $uri + * @param resource $data + * @param bool $modified should be set to true, if this event handler + * changed &$data * * @return bool */ @@ -190,9 +184,7 @@ class TemporaryFileFilterPlugin extends ServerPlugin * If the file doesn't exist, it will return false which will kick in * the regular system for the GET method. * - * @param RequestInterface $request - * @param ResponseInterface $hR - * @param string $tempLocation + * @param string $tempLocation * * @return bool */ @@ -214,9 +206,7 @@ class TemporaryFileFilterPlugin extends ServerPlugin /** * This method handles the PUT method. * - * @param RequestInterface $request - * @param ResponseInterface $hR - * @param string $tempLocation + * @param string $tempLocation * * @return bool */ @@ -242,9 +232,7 @@ class TemporaryFileFilterPlugin extends ServerPlugin * If the file didn't exist, it will return false, which will make the * standard HTTP DELETE handler kick in. * - * @param RequestInterface $request - * @param ResponseInterface $hR - * @param string $tempLocation + * @param string $tempLocation * * @return bool */ @@ -268,9 +256,7 @@ class TemporaryFileFilterPlugin extends ServerPlugin * for which properties were requested, and just sends back a default * set of properties. * - * @param RequestInterface $request - * @param ResponseInterface $hR - * @param string $tempLocation + * @param string $tempLocation * * @return bool */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Tree.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Tree.php index 7a5a25f8707..8215e2c3985 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Tree.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Tree.php @@ -37,8 +37,6 @@ class Tree * Creates the object. * * This method expects the rootObject to be passed as a parameter - * - * @param ICollection $rootNode */ public function __construct(ICollection $rootNode) { @@ -143,8 +141,6 @@ class Tree * * @param string $sourcePath The path to the file which should be moved * @param string $destinationPath The full destination path, so not just the destination parent node - * - * @return int */ public function move($sourcePath, $destinationPath) { @@ -230,7 +226,7 @@ class Tree // flushing the entire cache $path = trim($path, '/'); foreach ($this->cache as $nodePath => $node) { - if ('' === $path || $nodePath == $path || 0 === strpos($nodePath, $path.'/')) { + if ('' === $path || $nodePath == $path || 0 === strpos((string) $nodePath, $path.'/')) { unset($this->cache[$nodePath]); } } @@ -288,9 +284,7 @@ class Tree /** * copyNode. * - * @param INode $source - * @param ICollection $destinationParent - * @param string $destinationName + * @param string $destinationName */ protected function copyNode(INode $source, ICollection $destinationParent, $destinationName = null) { @@ -298,6 +292,8 @@ class Tree $destinationName = $source->getName(); } + $destination = null; + if ($source instanceof IFile) { $data = $source->get(); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Version.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Version.php index c002558810e..c6273ef7266 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Version.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '4.0.2'; + public const VERSION = '4.4.0'; } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Prop.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Prop.php index 52a04cf083b..9c214792f12 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Prop.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Prop.php @@ -39,8 +39,6 @@ class Prop implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -79,8 +77,6 @@ class Prop implements XmlDeserializable * * name - A clark-notation XML element name. * * value - The parsed value. * - * @param Reader $reader - * * @return array */ private static function parseCurrentElement(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Response.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Response.php index a110918094d..79f06a09bf8 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Response.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Response.php @@ -59,7 +59,6 @@ class Response implements Element * deleted. * * @param string $href - * @param array $responseProperties * @param string $httpStatus */ public function __construct($href, array $responseProperties, $httpStatus = null) @@ -110,8 +109,6 @@ class Response implements Element * * Important note 2: If you are writing any new elements, you are also * responsible for closing them. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -124,7 +121,7 @@ class Response implements Element foreach ($this->getResponseProperties() as $status => $properties) { // Skipping empty lists - if (!$properties || (!ctype_digit($status) && !is_int($status))) { + if (!$properties || (!is_int($status) && !ctype_digit($status))) { continue; } $empty = false; @@ -167,8 +164,6 @@ class Response implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -191,8 +186,21 @@ class Response implements Element return []; } + + if (!$reader->read()) { + $reader->next(); + + return []; + } + + if (Reader::END_ELEMENT === $reader->nodeType) { + $reader->next(); + + return []; + } + $values = []; - $reader->read(); + do { if (Reader::ELEMENT === $reader->nodeType) { $clark = $reader->getClark(); @@ -204,9 +212,12 @@ class Response implements Element $values[$clark] = $reader->parseCurrentElement()['value']; } } else { - $reader->read(); + if (!$reader->read()) { + break; + } } } while (Reader::END_ELEMENT !== $reader->nodeType); + $reader->read(); return $values; diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Sharee.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Sharee.php index e0db3bf3725..33564d8f24f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Sharee.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Element/Sharee.php @@ -84,8 +84,6 @@ class Sharee implements Element * Creates the object. * * $properties will be used to populate all internal properties. - * - * @param array $properties */ public function __construct(array $properties = []) { @@ -113,8 +111,6 @@ class Sharee implements Element * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -157,8 +153,6 @@ class Sharee implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Complex.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Complex.php index 99030205488..787d30d954a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Complex.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Complex.php @@ -37,8 +37,6 @@ class Complex extends XmlFragment * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php index 05a00c5e560..efc15c293a0 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php @@ -68,8 +68,6 @@ class GetLastModified implements Element * * Important note 2: If you are writing any new elements, you are also * responsible for closing them. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -96,13 +94,10 @@ class GetLastModified implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) { - return - new self(new DateTime($reader->parseInnerTree())); + return new self(new DateTime($reader->parseInnerTree())); } } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Href.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Href.php index c479c1602b7..f88ce814ad6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Href.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Href.php @@ -39,9 +39,6 @@ class Href implements Element, HtmlOutput * * You must either pass a string for a single href, or an array of hrefs. * - * If auto-prefix is set to false, the hrefs will be treated as absolute - * and not relative to the servers base uri. - * * @param string|string[] $hrefs */ public function __construct($hrefs) @@ -87,8 +84,6 @@ class Href implements Element, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -109,8 +104,6 @@ class Href implements Element, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) @@ -141,8 +134,6 @@ class Href implements Element, HtmlOutput * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Invite.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Invite.php index b5e2dae46d6..e3f0a611bfa 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Invite.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/Invite.php @@ -56,8 +56,6 @@ class Invite implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LockDiscovery.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LockDiscovery.php index c33812b3e60..ec4cbc0c6c7 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LockDiscovery.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/LockDiscovery.php @@ -62,8 +62,6 @@ class LockDiscovery implements XmlSerializable * * Important note 2: If you are writing any new elements, you are also * responsible for closing them. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ResourceType.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ResourceType.php index ce07d438258..75ddcba3fe3 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ResourceType.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ResourceType.php @@ -90,14 +90,11 @@ class ResourceType extends Element\Elements implements HtmlOutput * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) { - return - new self(parent::xmlDeserialize($reader)); + return new self(parent::xmlDeserialize($reader)); } /** @@ -111,8 +108,6 @@ class ResourceType extends Element\Elements implements HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php index 95175053ac9..fdd55558c99 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/ShareAccess.php @@ -71,8 +71,6 @@ class ShareAccess implements Element * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -113,8 +111,6 @@ class ShareAccess implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedLock.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedLock.php index 26e7d646efb..100829c60a6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedLock.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedLock.php @@ -37,8 +37,6 @@ class SupportedLock implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php index 06ab28c942d..6344010932d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedMethodSet.php @@ -81,8 +81,6 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -104,8 +102,6 @@ class SupportedMethodSet implements XmlSerializable, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedReportSet.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedReportSet.php index 4c25d23d976..0b4990e961a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedReportSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Property/SupportedReportSet.php @@ -109,8 +109,6 @@ class SupportedReportSet implements XmlSerializable, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -134,8 +132,6 @@ class SupportedReportSet implements XmlSerializable, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/Lock.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/Lock.php index 8d934816253..57d12ef93ee 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/Lock.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/Lock.php @@ -56,8 +56,6 @@ class Lock implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/MkCol.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/MkCol.php index 7713646eaf2..e0d7e90a260 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/MkCol.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/MkCol.php @@ -56,8 +56,6 @@ class MkCol implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropFind.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropFind.php index b4cce423e32..505e7c79ce6 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropFind.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropFind.php @@ -53,8 +53,6 @@ class PropFind implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropPatch.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropPatch.php index 55e154ec766..4a270950258 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropPatch.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/PropPatch.php @@ -45,8 +45,6 @@ class PropPatch implements Element * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -81,8 +79,6 @@ class PropPatch implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/ShareResource.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/ShareResource.php index e1985b8c351..79d7dc82645 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/ShareResource.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/ShareResource.php @@ -56,8 +56,6 @@ class ShareResource implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php index acf0039ce22..8dd95765b63 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php @@ -68,8 +68,6 @@ class SyncCollectionReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php index 423d0b56908..e824cda4294 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAV/Xml/Response/MultiStatus.php @@ -80,8 +80,6 @@ class MultiStatus implements Element * * Important note 2: If you are writing any new elements, you are also * responsible for closing them. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -111,8 +109,6 @@ class MultiStatus implements Element * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/ACLTrait.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/ACLTrait.php index d9bf4e1e085..98c1ce33852 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/ACLTrait.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/ACLTrait.php @@ -69,8 +69,6 @@ trait ACLTrait * Updates the ACL. * * This method will receive a list of new ACE's as an array argument. - * - * @param array $acl */ public function setACL(array $acl) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/AbstractPrincipalCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/AbstractPrincipalCollection.php index 1160dd7acb3..d26f7d27b48 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/AbstractPrincipalCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/AbstractPrincipalCollection.php @@ -51,9 +51,7 @@ abstract class AbstractPrincipalCollection extends DAV\Collection implements IPr * default is 'principals', if your principals are stored in a different * collection, override $principalPrefix * - * - * @param PrincipalBackend\BackendInterface $principalBackend - * @param string $principalPrefix + * @param string $principalPrefix */ public function __construct(PrincipalBackend\BackendInterface $principalBackend, $principalPrefix = 'principals') { @@ -68,8 +66,6 @@ abstract class AbstractPrincipalCollection extends DAV\Collection implements IPr * at least contain a uri item. Other properties may or may not be * supplied by the authentication backend. * - * @param array $principalInfo - * * @return DAV\INode */ abstract public function getChildForPrincipal(array $principalInfo); @@ -142,7 +138,6 @@ abstract class AbstractPrincipalCollection extends DAV\Collection implements IPr * This method should simply return a list of 'child names', which may be * used to call $this->getChild in the future. * - * @param array $searchProperties * @param string $test * * @return array diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/AceConflict.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/AceConflict.php index 7756d472858..0fc3f778d0e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/AceConflict.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/AceConflict.php @@ -20,9 +20,6 @@ class AceConflict extends DAV\Exception\Conflict * Adds in extra information in the xml response. * * This method adds the {DAV:}no-ace-conflict element as defined in rfc3744 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NeedPrivileges.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NeedPrivileges.php index 19e0dac9d11..af1f01c2b74 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NeedPrivileges.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NeedPrivileges.php @@ -36,7 +36,6 @@ class NeedPrivileges extends DAV\Exception\Forbidden * Constructor. * * @param string $uri - * @param array $privileges */ public function __construct($uri, array $privileges) { @@ -50,9 +49,6 @@ class NeedPrivileges extends DAV\Exception\Forbidden * Adds in extra information in the xml response. * * This method adds the {DAV:}need-privileges element as defined in rfc3744 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NoAbstract.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NoAbstract.php index d90b01ffd43..b9c66169e2b 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NoAbstract.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NoAbstract.php @@ -20,9 +20,6 @@ class NoAbstract extends DAV\Exception\PreconditionFailed * Adds in extra information in the xml response. * * This method adds the {DAV:}no-abstract element as defined in rfc3744 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php index b005c55d8b0..d4e728497f2 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php @@ -20,9 +20,6 @@ class NotRecognizedPrincipal extends DAV\Exception\PreconditionFailed * Adds in extra information in the xml response. * * This method adds the {DAV:}recognized-principal element as defined in rfc3744 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotSupportedPrivilege.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotSupportedPrivilege.php index dda2e62815e..c04c5faa20e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotSupportedPrivilege.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Exception/NotSupportedPrivilege.php @@ -20,9 +20,6 @@ class NotSupportedPrivilege extends DAV\Exception\PreconditionFailed * Adds in extra information in the xml response. * * This method adds the {DAV:}not-supported-privilege element as defined in rfc3744 - * - * @param DAV\Server $server - * @param \DOMElement $errorNode */ public function serialize(DAV\Server $server, \DOMElement $errorNode) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/FS/HomeCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/FS/HomeCollection.php index c896d8e25ea..fa476e0946f 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/FS/HomeCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/FS/HomeCollection.php @@ -42,9 +42,8 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL /** * Creates the home collection. * - * @param BackendInterface $principalBackend - * @param string $storagePath where the actual files are stored - * @param string $principalPrefix list of principals to iterate + * @param string $storagePath where the actual files are stored + * @param string $principalPrefix list of principals to iterate */ public function __construct(BackendInterface $principalBackend, $storagePath, $principalPrefix = 'principals') { @@ -71,8 +70,6 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL * at least contain a uri item. Other properties may or may not be * supplied by the authentication backend. * - * @param array $principalInfo - * * @return \Sabre\DAV\INode */ public function getChildForPrincipal(array $principalInfo) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IACL.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IACL.php index d19a075be74..291fb24ae03 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IACL.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IACL.php @@ -53,8 +53,6 @@ interface IACL extends DAV\INode * Updates the ACL. * * This method will receive a list of new ACE's as an array argument. - * - * @param array $acl */ public function setACL(array $acl); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipal.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipal.php index c804096de11..43e23d0a776 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipal.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipal.php @@ -60,8 +60,6 @@ interface IPrincipal extends DAV\INode * The list of members is always overwritten, never appended to. * * This method should throw an exception if the members could not be set. - * - * @param array $principals */ public function setGroupMemberSet(array $principals); diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipalCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipalCollection.php index 1003730d608..7a3009be525 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipalCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/IPrincipalCollection.php @@ -37,7 +37,6 @@ interface IPrincipalCollection extends DAV\ICollection * This method should simply return a list of 'child names', which may be * used to call $this->getChild in the future. * - * @param array $searchProperties * @param string $test * * @return array diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Plugin.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Plugin.php index c1ea6027cad..46d680e1547 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Plugin.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Plugin.php @@ -214,7 +214,7 @@ class Plugin extends DAV\ServerPlugin $this->server->httpRequest, $this->server->httpResponse ); - throw new notAuthenticated(implode(', ', $reasons).'. Login was needed for privilege: '.implode(', ', $failed).' on '.$uri); + throw new NotAuthenticated(implode(', ', $reasons).'. Login was needed for privilege: '.implode(', ', $failed).' on '.$uri); } if ($throwExceptions) { throw new NeedPrivileges($uri, $failed); @@ -269,8 +269,6 @@ class Plugin extends DAV\ServerPlugin * Sets the default ACL rules. * * These rules are used for all nodes that don't implement the IACL interface. - * - * @param array $acl */ public function setDefaultAcl(array $acl) { @@ -763,8 +761,6 @@ class Plugin extends DAV\ServerPlugin * Sets up the plugin. * * This method is automatically called by the server class. - * - * @param DAV\Server $server */ public function initialize(DAV\Server $server) { @@ -829,9 +825,6 @@ class Plugin extends DAV\ServerPlugin /** * Triggered before any method is handled. - * - * @param RequestInterface $request - * @param ResponseInterface $response */ public function beforeMethod(RequestInterface $request, ResponseInterface $response) { @@ -923,8 +916,7 @@ class Plugin extends DAV\ServerPlugin /** * Triggered before a node is unlocked. * - * @param string $uri - * @param DAV\Locks\LockInfo $lock + * @param string $uri * @TODO: not yet implemented */ public function beforeUnlock($uri, DAV\Locks\LockInfo $lock) @@ -934,11 +926,7 @@ class Plugin extends DAV\ServerPlugin /** * Triggered before properties are looked up in specific nodes. * - * @param DAV\PropFind $propFind - * @param DAV\INode $node * @TODO really should be broken into multiple methods, or even a class. - * - * @return bool */ public function propFind(DAV\PropFind $propFind, DAV\INode $node) { @@ -1044,8 +1032,7 @@ class Plugin extends DAV\ServerPlugin * This method intercepts PROPPATCH methods and make sure the * group-member-set is updated correctly. * - * @param string $path - * @param DAV\PropPatch $propPatch + * @param string $path */ public function propPatch($path, DAV\PropPatch $propPatch) { @@ -1081,8 +1068,6 @@ class Plugin extends DAV\ServerPlugin * @param string $reportName * @param mixed $report * @param mixed $path - * - * @return bool */ public function report($reportName, $report, $path) { @@ -1118,9 +1103,6 @@ class Plugin extends DAV\ServerPlugin /** * This method is responsible for handling the 'ACL' event. * - * @param RequestInterface $request - * @param ResponseInterface $response - * * @return bool */ public function httpAcl(RequestInterface $request, ResponseInterface $response) @@ -1211,8 +1193,7 @@ class Plugin extends DAV\ServerPlugin * or a principal URL, the principal URL and principal URLs of groups that * principal belongs to. * - * @param string $path - * @param Xml\Request\PrincipalMatchReport $report + * @param string $path */ protected function principalMatchReport($path, Xml\Request\PrincipalMatchReport $report) { @@ -1434,8 +1415,7 @@ class Plugin extends DAV\ServerPlugin * clients to search for groups of principals, based on the value of one * or more properties. * - * @param string $path - * @param Xml\Request\PrincipalPropertySearchReport $report + * @param string $path */ protected function principalPropertySearchReport($path, Xml\Request\PrincipalPropertySearchReport $report) { @@ -1473,8 +1453,7 @@ class Plugin extends DAV\ServerPlugin * is used to for example generate a UI with ACL rules, allowing you * to show names for principals for every entry. * - * @param string $path - * @param Xml\Request\AclPrincipalPropSetReport $report + * @param string $path */ protected function aclPrincipalPropSetReport($path, Xml\Request\AclPrincipalPropSetReport $report) { @@ -1520,8 +1499,7 @@ class Plugin extends DAV\ServerPlugin * DAV\Browser\Plugin. This allows us to generate an interface users * can use to create new calendars. * - * @param DAV\INode $node - * @param string $output + * @param string $output * * @return bool */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Principal.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Principal.php index e2df1c35e57..ada38ab7252 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Principal.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Principal.php @@ -42,9 +42,6 @@ class Principal extends DAV\Node implements IPrincipal, DAV\IProperties, IACL /** * Creates the principal object. - * - * @param PrincipalBackend\BackendInterface $principalBackend - * @param array $principalProperties */ public function __construct(PrincipalBackend\BackendInterface $principalBackend, array $principalProperties = []) { @@ -119,8 +116,6 @@ class Principal extends DAV\Node implements IPrincipal, DAV\IProperties, IACL * The list of members is always overwritten, never appended to. * * This method should throw an exception if the members could not be set. - * - * @param array $groupMembers */ public function setGroupMemberSet(array $groupMembers) { @@ -181,8 +176,6 @@ class Principal extends DAV\Node implements IPrincipal, DAV\IProperties, IACL * * To update specific properties, call the 'handle' method on this object. * Read the PropPatch documentation for more information. - * - * @param DAV\PropPatch $propPatch */ public function propPatch(DAV\PropPatch $propPatch) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php index 03a9c4badd2..f61a0c9533a 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/AbstractBackend.php @@ -33,7 +33,7 @@ abstract class AbstractBackend implements BackendInterface * @param string $uri * @param string $principalPrefix * - * @return string + * @return string|null */ public function findByUri($uri, $principalPrefix) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php index 40ac272b5a6..7140a929544 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php @@ -59,8 +59,7 @@ interface BackendInterface * * Read the PropPatch documentation for more info and examples. * - * @param string $path - * @param \Sabre\DAV\PropPatch $propPatch + * @param string $path */ public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch); @@ -89,7 +88,6 @@ interface BackendInterface * from working. * * @param string $prefixPath - * @param array $searchProperties * @param string $test * * @return array @@ -112,7 +110,7 @@ interface BackendInterface * @param string $uri * @param string $principalPrefix * - * @return string + * @return string|null */ public function findByUri($uri, $principalPrefix); @@ -140,7 +138,6 @@ interface BackendInterface * The principals should be passed as a list of uri's. * * @param string $principal - * @param array $members */ public function setGroupMemberSet($principal, array $members); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/CreatePrincipalSupport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/CreatePrincipalSupport.php index ee418e49b64..7de36928951 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/CreatePrincipalSupport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/CreatePrincipalSupport.php @@ -24,7 +24,6 @@ interface CreatePrincipalSupport extends BackendInterface * of the principal. * * @param string $path - * @param MkCol $mkCol */ public function createPrincipal($path, MkCol $mkCol); } diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php index 350ecb1459a..17bc245c5f2 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php @@ -11,7 +11,6 @@ use Sabre\Uri; /** * PDO principal backend. * - * * This backend assumes all principals are in a single collection. The default collection * is 'principals/', but this can be overridden. * @@ -65,8 +64,6 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport /** * Sets up the backend. - * - * @param \PDO $pdo */ public function __construct(\PDO $pdo) { @@ -176,8 +173,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport * * Read the PropPatch documentation for more info and examples. * - * @param string $path - * @param DAV\PropPatch $propPatch + * @param string $path */ public function updatePrincipal($path, DAV\PropPatch $propPatch) { @@ -233,7 +229,6 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport * from working. * * @param string $prefixPath - * @param array $searchProperties * @param string $test * * @return array @@ -301,34 +296,46 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport */ public function findByUri($uri, $principalPrefix) { - $value = null; - $scheme = null; - list($scheme, $value) = explode(':', $uri, 2); - if (empty($value)) { + $uriParts = Uri\parse($uri); + + // Only two types of uri are supported : + // - the "mailto:" scheme with some non-empty address + // - a principals uri, in the form "principals/NAME" + // In both cases, `path` must not be empty. + if (empty($uriParts['path'])) { return null; } $uri = null; - switch ($scheme) { - case 'mailto': - $query = 'SELECT uri FROM '.$this->tableName.' WHERE lower(email)=lower(?)'; - $stmt = $this->pdo->prepare($query); - $stmt->execute([$value]); + if ('mailto' === $uriParts['scheme']) { + $query = 'SELECT uri FROM '.$this->tableName.' WHERE lower(email)=lower(?)'; + $stmt = $this->pdo->prepare($query); + $stmt->execute([$uriParts['path']]); - while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { - // Checking if the principal is in the prefix - list($rowPrefix) = Uri\split($row['uri']); - if ($rowPrefix !== $principalPrefix) { - continue; - } - - $uri = $row['uri']; - break; //Stop on first match + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + // Checking if the principal is in the prefix + list($rowPrefix) = Uri\split($row['uri']); + if ($rowPrefix !== $principalPrefix) { + continue; } - break; - default: - //unsupported uri scheme - return null; + + $uri = $row['uri']; + break; //Stop on first match + } + } else { + $pathParts = Uri\split($uriParts['path']); // We can do this since $uriParts['path'] is not null + + if (2 === count($pathParts) && $pathParts[0] === $principalPrefix) { + // Checking that this uri exists + $query = 'SELECT * FROM '.$this->tableName.' WHERE uri = ?'; + $stmt = $this->pdo->prepare($query); + $stmt->execute([$uriParts['path']]); + $rows = $stmt->fetchAll(); + + if (count($rows) > 0) { + $uri = $uriParts['path']; + } + } } return $uri; @@ -388,7 +395,6 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport * The principals should be passed as a list of uri's. * * @param string $principal - * @param array $members */ public function setGroupMemberSet($principal, array $members) { @@ -427,7 +433,6 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport * of the principal. * * @param string $path - * @param MkCol $mkCol */ public function createPrincipal($path, MkCol $mkCol) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalCollection.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalCollection.php index 4fae96e0cfe..b823b6ceb9c 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalCollection.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/PrincipalCollection.php @@ -29,8 +29,6 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * at least contain a uri item. Other properties may or may not be * supplied by the authentication backend. * - * @param array $principal - * * @return \Sabre\DAV\INode */ public function getChildForPrincipal(array $principal) @@ -58,7 +56,6 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * property for you. * * @param string $name - * @param MkCol $mkCol * * @throws InvalidResourceType */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Acl.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Acl.php index 372f62ab3d7..c6e236dc598 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Acl.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Acl.php @@ -58,8 +58,7 @@ class Acl implements Element, HtmlOutput * are already full urls. If this is kept to true, the servers base url * will automatically be prefixed. * - * @param array $privileges - * @param bool $prefixBaseUrl + * @param bool $prefixBaseUrl */ public function __construct(array $privileges, $prefixBaseUrl = true) { @@ -92,8 +91,6 @@ class Acl implements Element, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -113,8 +110,6 @@ class Acl implements Element, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) @@ -161,8 +156,6 @@ class Acl implements Element, HtmlOutput * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -226,9 +219,6 @@ class Acl implements Element, HtmlOutput /** * Serializes a single access control entry. - * - * @param Writer $writer - * @param array $ace */ private function serializeAce(Writer $writer, array $ace) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php index 0bf16b43173..b5629c80968 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php @@ -33,8 +33,6 @@ class AclRestrictions implements XmlSerializable * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php index 08385633025..e38a45c61e8 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php @@ -33,8 +33,6 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput * Creates the object. * * Pass the privileges in clark-notation - * - * @param array $privileges */ public function __construct(array $privileges) { @@ -56,8 +54,6 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -109,8 +105,6 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) @@ -139,8 +133,6 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Principal.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Principal.php index e304a2aed1e..52092128f33 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Principal.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/Principal.php @@ -98,8 +98,6 @@ class Principal extends DAV\Xml\Property\Href * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -130,8 +128,6 @@ class Principal extends DAV\Xml\Property\Href * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) @@ -146,6 +142,8 @@ class Principal extends DAV\Xml\Property\Href case self::ALL: return 'all'; } + + return 'unknown'; } /** @@ -166,8 +164,6 @@ class Principal extends DAV\Xml\Property\Href * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php index 1762391d989..6e7514bd95d 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php @@ -34,8 +34,6 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput /** * Constructor. - * - * @param array $privileges */ public function __construct(array $privileges) { @@ -67,8 +65,6 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput * This allows serializers to be re-used for different element names. * * If you are opening new elements, you must also close them again. - * - * @param Writer $writer */ public function xmlSerialize(Writer $writer) { @@ -86,8 +82,6 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput * The baseUri parameter is a url to the root of the application, and can * be used to construct local links. * - * @param HtmlOutputHelper $html - * * @return string */ public function toHtml(HtmlOutputHelper $html) @@ -124,7 +118,6 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput * * This is a recursive function. * - * @param Writer $writer * @param string $privName * @param array $privilege */ diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php index 17b37afabbf..4fc61273afb 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php @@ -41,8 +41,6 @@ class AclPrincipalPropSetReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php index 393308cd2d7..70a7e220003 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php @@ -52,8 +52,6 @@ class ExpandPropertyReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php index f868cc9df64..b49582450d4 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php @@ -72,8 +72,6 @@ class PrincipalMatchReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php index 26468fd2163..bddceca8dac 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php @@ -73,8 +73,6 @@ class PrincipalPropertySearchReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php index 37bc2cfbfac..7f15d8a4e7e 100644 --- a/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php +++ b/htdocs/includes/sabre/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php @@ -40,8 +40,6 @@ class PrincipalSearchPropertySetReport implements XmlDeserializable * $reader->parseInnerTree() will parse the entire sub-tree, and advance to * the next element. * - * @param Reader $reader - * * @return mixed */ public static function xmlDeserialize(Reader $reader) diff --git a/htdocs/includes/sabre/sabre/dav/phpstan.neon b/htdocs/includes/sabre/sabre/dav/phpstan.neon deleted file mode 100644 index e50c5be6e0d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/phpstan.neon +++ /dev/null @@ -1,3 +0,0 @@ -parameters: - level: 0 - bootstrap: %currentWorkingDirectory%/vendor/autoload.php diff --git a/htdocs/includes/sabre/sabre/vobject/.gitignore b/htdocs/includes/sabre/sabre/vobject/.gitignore deleted file mode 100644 index f723749ef5f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Composer stuff -vendor/ -composer.lock -tests/cov/ -tests/temp - -#vim -.*.swp - -#binaries -bin/phpunit -bin/phpcs -bin/php-cs-fixer -bin/sabre-cs-fixer -bin/hoa - -# Development stuff -testdata/ -.php_cs.cache -.idea - -# OS X -.DS_Store diff --git a/htdocs/includes/sabre/sabre/vobject/.php_cs.dist b/htdocs/includes/sabre/sabre/vobject/.php_cs.dist deleted file mode 100644 index 8d61ee25924..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/.php_cs.dist +++ /dev/null @@ -1,12 +0,0 @@ -getFinder() - ->exclude('vendor') - ->in(__DIR__); -$config->setRules([ - '@PSR1' => true, - '@Symfony' =>true -]); - -return $config; \ No newline at end of file diff --git a/htdocs/includes/sabre/sabre/vobject/.travis.yml b/htdocs/includes/sabre/sabre/vobject/.travis.yml deleted file mode 100644 index a36b67c4795..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php -php: - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -matrix: - fast_finish: true - allow_failures: - - php: 5.5 - -install: - - if [[ $TRAVIS_PHP_VERSION =~ ^7\.1|7\.2|7\.3|7\.4$ ]]; then wget https://github.com/phpstan/phpstan/releases/download/0.12.5/phpstan.phar; fi - -before_script: - - composer install - -script: - - if [[ $TRAVIS_PHP_VERSION =~ ^7\.1|7\.2|7\.3|7\.4$ ]]; then php phpstan.phar analyse -c phpstan.neon lib tests; fi - - ./bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml - -after_success: - - bash <(curl -s https://codecov.io/bash) - -cache: - directories: - - $HOME/.composer/cache diff --git a/htdocs/includes/sabre/sabre/vobject/CHANGELOG.md b/htdocs/includes/sabre/sabre/vobject/CHANGELOG.md deleted file mode 100644 index 4ddee77f18a..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/CHANGELOG.md +++ /dev/null @@ -1,843 +0,0 @@ -ChangeLog -========= - -4.2.2 (2020-01-14) ------------------- - -* #465: Add TZ in iTip REPLY iTip messages -* #486: Add PHONE-NUMBER value type (used for TEL in vCard 3.0) - -4.2.1 (2019-12-18) ------------------- - -* #469, #451: fix compat with php 7.4 -* #443: prevent running in indefinte loop -* #449: Preventing creating a component for a root document -* #450: Fix parse with option Forgiving with trailing equal -* #459: fixed typo in VCalendar which resulting in usage of the wrong TimeZone -* #462: Broker::parseEventForOrganizer copies DTSTAMP from $eventInfo that causes broken scheduling - -4.2.0 (2019-02-19) ------------------- - -* #432: DTSTAMP must be specified in UTC -* #435: ORGANIZER e-mail address are case-insensitive -* #441: Repairing BASE64 encoded vCard version 3 - -4.2.0-alpha1 (2018-09-26) -------------------------- - -* #412: Broker: add timezone to CANCEL messages -* #424: Support php7.3 - -4.1.6 (2018-04-20) ------------------- - -* #406, #407, #408, #409: Another round of performance improvements in serialization of properties (@gharlan, @staabm) -* #410: Fixes in iTip for handling `BYDAY=SA,SO` (@gharlan) -* #381: Fixes in iTip handling of `SCHEDULE-FORCE-SEND` (@alecpl) - -4.1.5 (2018-03-08) ------------------- - -* #404: Serialization: Performance boost for long properties (@gharlan) - -4.1.4 (2017-12-22) ------------------- - -* #383: Fix possible infinite loop in RRuleIterator, when the RRule FREQ - is YEARLY and it uses BYYEARDAY only (@mvdnes). -* #392: Improved significant change detection. This should reduce the number of - unneeded update emails in scheduling systems. (@alecpl). -* #395: Removed `Canada/East-Saskatchewan` timezone, as it got removed - from PHP as well. (@remicollet). - - -4.1.3 (2017-10-18) ------------------- - -* #363: Repair script and de-duplicate properties that are only allowed once, - but appear more than once. (@ddolcimascolo). -* #377: Added Pacific Time (US & Canada) as exchange timezone -* #384: Added fallback for VCards without `FN` - - -4.1.2 (2016-12-15) ------------------- - -* #340: Support for `BYYEARDAY` recurrence when `FREQ=YEARLY`. (@PHPGangsta) -* #341: Support for `BYWEEKNO` recurrence when `FREQ=YEARLY`. (@PHPGangsta) -* Updated to the latest windows timezone data mappings. -* #344: Auto-detecting more Outlook 365-generated timezone identifiers. - (@jpirkey) -* #348: `FreeBusyGenerator` can now accept streams. -* Support sabre/xml 1.5 and 2.0. -* #355: Support `DateTimeInterface` in more places where only `DateTime` was - supported. (@gharlan). -* #351: Fixing an inclusive/exclusive problem with `isInTimeRange` and - `fastForward` with all-day events. (@strokyl, thanks you are brilliant). - - -4.1.1 (2016-07-15) ------------------- - -* #327: Throwing `InvalidDataException` in more cases where invalid iCalendar - dates and times were provided. (@rsto) -* #331: Fix dealing with multiple overridden instances falling on the same - date/time (@afedyk-sugarcrm). -* #333: Fix endless loop on invalid `BYMONTH` values in recurrence. - (@PHPGangsta) -* #339: Fixed a few `validate()` results when repair is off. (@PHPGangsta) -* #338: Stripping invalid `BYMONTH=` rules during `validate()` (@PHPGangsta) -* #336: Fix incorrect `BYSECOND=` validation. (@PHPGangsta) - - -4.1.0 (2016-04-06) ------------------- - -* #309: When expanding recurring events, the first event should also have a - `RECURRENCE-ID` property. -* #306: iTip REPLYs to the first instance of a recurring event was not handled - correctly. -* Slightly better error message during validation of `N` and `ADR` properties. -* #312: Correctly extracing timezone in the iTip broker, even when we don't - have a master event. (@vkomrakov-sugar). -* When validating a component's property that must appear once and which could - automatically be repaired, make sure we report the change as 'repaired'. -* Added a PHPUnitAssertions trait. This trait makes it easy to compare two - vcards or iCalendar objects semantically. -* Better error message when parsing objects with an invalid `VALUE` parameter. - - -4.0.3 (2016-03-12) ------------------- - -* #300: Added `VCard::getByType()` to quickly get a property with a specific - `TYPE` parameter. (@kbond) -* #302: `UNTIL` was not encoded correctly when converting to jCal. - (@GrahamLinagora) -* #303: `COUNT` is now encoded as an int in jCal instead of a string. (@strokyl) -* #295: `RRULE` now has more validation and repair rules. - - -4.0.2 (2016-01-11) ------------------- - -* #288: Only decode `CHARSET` if we're reading vCard 2.1. If it appears - in any other document, we must ignore it. - - -4.0.1 (2016-01-04) ------------------- - -* #284: When generating `CANCEL` iTip messages, we now include `DTEND`. - (@kewisch) - - -4.0.0 (2015-12-11) ------------------- - -* #274: When creating new vCards, the default vCard version is now 4.0. -* #275: `VEVENT`, `VTODO` and `VCARD` now automatically get a `UID` and - `DTSTAMP` property if this was not already specified. -* `ParseException` now extends `\Exception`. -* `Sabre\VObject\Reader::read` now has a `$charset` argument. -* #272: `Sabre\VObject\Recur\EventIterator::$maxInstances` is now - `Sabre\VObject\Settings::$maxRecurrences` and is also honored by the - FreeBusyGenerator. -* #278: `expand()` did not work correctly on events with sub-components. - - -4.0.0-beta1 (2015-12-02) ------------------------- - -* #258: Support for expanding events that use `RDATE`. (@jabdoa2) -* #258: Correctly support TZID for events that use `RDATE`. (@jabdoa2) -* #240: `Component\VCalendar::expand()` now returns a new expanded `VCalendar` - object, instead of editing the existing `VCalendar` in-place. This is a BC - break. -* #265: Using the new `InvalidDataException` in place of - `InvalidArgumentException` and `LogicException` in all places where we fail - because there was something wrong with input data. -* #227: Always add `VALUE=URI` to `PHOTO` properties. -* #235: Always add `VALUE=URI` to `URL` properties. -* It's now possible to override which class is used instead of - `Component\VCalendar` or `Component\VCard` during parsing. -* #263: Lots of small cleanups. (@jakobsack) -* #220: Automatically stop recurring after 3500 recurrences. -* #41: Allow user to set different encoding than UTF-8 when decoding vCards. -* #41: Support the `ENCODING` parameter from vCard 2.1. - Both ISO-8859-1 and Windows-1252 are currently supported. -* #185: Fix encoding/decoding of `TIME` values in jCal/jCard. - - -4.0.0-alpha2 (2015-09-04) -------------------------- - -* Updated windows timezone file to support new mexican timezone. -* #239: Added a `BirthdayCalendarGenerator`. (@DominikTo) -* #250: `isInTimeRange()` now considers the timezone for floating dates and - times. (@armin-hackmann) -* Added a duplicate vcard merging tool for the command line. -* #253: `isInTimeRange()` now correctly handles events that throw the - `NoInstancesException` exception. (@migrax, @DominikTo) -* #254: The parser threw an `E_NOTICE` for certain invalid objects. It now - correctly throws a `ParseException`. - - -4.0.0-alpha1 (2015-07-17) -------------------------- - -* sabre/vobject now requires PHP 5.5. -* #244: PHP7 support. -* Lots of speedups and reduced memory usage! -* #160: Support for xCal a.k.a. RFC6321! (@Hywan) -* #192: Support for xCard a.k.a. RFC6351! (@Hywan) -* #139: We now accept `DateTimeInterface` wherever it accepted `DateTime` - before in arguments. This means that either `DateTime` or - `DateTimeImmutable` may be used everywhere. -* #242: Full support for the `VAVAILABILITY` component, and calculating - `VFREEBUSY` based on `VAVAILABILITY` data. -* #186: Fixing conversion of `UTC-OFFSET` properties when going back and - forward between jCal and iCalendar. -* Properties, Components and Parameters now implement PHP's `JsonSerializable` - interface. -* #139: We now _always_ return `DateTimeImmutable` from any method. This could - potentially have big implications if you manipulate Date objects anywhere. -* #161: Simplified `ElementList` by extending `ArrayIterator`. -* Removed `RecurrenceIterator` (use Recur\EventIterator instead). -* Now using php-cs-fixer to automatically enforce and correct CS. -* #233: The `+00:00` timezone is now recognized as UTC. (@c960657) -* #237: Added a `destroy()` method to all documents. This method breaks any - circular references, allowing PHP to free up memory. -* #197: Made accessing properties and objects by their name a lot faster. This - especially helps objects that have a lot of sub-components or properties, - such as large iCalendar objects. -* #197: The `$children` property on components has been changed from `public` - to `protected`. Use the `children()` method instead to get a flat list of - objects. -* #244: The `Float` and `Integer` classes have been renamed to `FloatValue` - and `IntegerValue` to allow PHP 7 compatibility. - - -3.5.3 (2016-10-06) ------------------- - -* #331: Fix dealing with multiple overridden instances falling on the same - date/time (@afedyk-sugarcrm). - - -3.5.2 (2016-04-24) ------------------ - -* #312: Backported a fix related to iTip processing of events with timezones, - without a master event. - - -3.5.1 (2016-04-06) ------------------- - -* #309: When expanding recurring events, the first event should also have a - `RECURRENCE-ID` property. -* #306: iTip REPLYs to the first instance of a recurring event was not handled - correctly. - - -3.5.0 (2016-01-11) ------------------- - -* This release supports PHP 7, contrary to 3.4.x versions. -* BC Break: `Sabre\VObject\Property\Float` has been renamed to - `Sabre\VObject\Property\FloatValue`. -* BC Break: `Sabre\VObject\Property\Integer` has been renamed to - `Sabre\VObject\Property\IntegerValue`. - - -3.4.9 (2016-01-11) ------------------- - -* This package now specifies in composer.json that it does not support PHP 7. - For PHP 7, use version 3.5.x or 4.x. - - -3.4.8 (2016-01-04) ------------------- - -* #284: When generating `CANCEL` iTip messages, we now include `DTEND`. - (@kewisch). - - -3.4.7 (2015-09-05) ------------------- - -* #253: Handle `isInTimeRange` for recurring events that have 0 valid - instances. (@DominikTo, @migrax). - - -3.4.6 (2015-08-06) ------------------- - -* #250: Recurring all-day events are incorrectly included in time range - requests when not using UTC in the time range. (@armin-hackmann) - - -3.4.5 (2015-06-02) ------------------- - -* #229: Converting vcards from 3.0 to 4.0 that contained a `LANG` property - would throw an error. - - -3.4.4 (2015-05-27) ------------------- - -* #228: Fixed a 'party crasher' bug in the iTip broker. This would break - scheduling in some cases. - - -3.4.3 (2015-05-19) ------------------- - -* #219: Corrected validation of `EXDATE` properties with more than one value. -* #212: `BYSETPOS` with values below `-1` was broken and could cause infinite - loops. -* #211: Fix `BYDAY=-5TH` in recurrence iterator. (@lindquist) -* #216: `ENCODING` parameter is now validated for all document types. -* #217: Initializing vCard `DATE` objects with a PHP DateTime object will now - work correctly. (@thomascube) - - -3.4.2 (2015-02-25) ------------------- - -* #210: iTip: Replying to an event without a master event was broken. - - -3.4.1 (2015-02-24) ------------------- - -* A minor change to ensure that unittests work correctly in the sabre/dav - test-suite. - - -3.4.0 (2015-02-23) ------------------- - -* #196: Made parsing recurrence rules a lot faster on big calendars. -* Updated windows timezone mappings to latest unicode version. -* #202: Support for parsing and validating `VAVAILABILITY` components. (@Hywan) -* #195: PHP 5.3 compatibility in 'generatevcards' script. (@rickdenhaan) -* #205: Improving handling of multiple `EXDATE` when processing iTip changes. - (@armin-hackmann) -* #187: Fixed validator rules for `LAST-MODIFIED` properties. -* #188: Retain floating times when generating instances using - `Recur\EventIterator`. -* #203: Skip tests for timezones that are not supported on older PHP versions, - instead of a hard fail. -* #204: Dealing a bit better with vCard date-time values that contained - milliseconds. (which is normally invalid). (@armin-hackmann) - - -3.3.5 (2015-01-09) ------------------- - -* #168: Expanding calendars now removes objects with recurrence rules that - don't have a valid recurrence instance. -* #177: SCHEDULE-STATUS should not contain a reason phrase, only a status - code. -* #175: Parser can now read and skip the UTF-8 BOM. -* #179: Added `isFloating` to `DATE-TIME` properties. -* #179: Fixed jCal serialization of floating `DATE-TIME` properties. -* #173: vCard converter failed for `X-ABDATE` properties that had no - `X-ABLABEL`. -* #180: Added `PROFILE_CALDAV` and `PROFILE_CARDDAV` to enable validation rules - specific for CalDAV/CardDAV servers. -* #176: A missing `UID` is no longer an error, but a warning for the vCard - validator, unless `PROFILE_CARDDAV` is specified. - - -3.3.4 (2014-11-19) ------------------- - -* #154: Converting `ANNIVERSARY` to `X-ANNIVERSARY` and `X-ABDATE` and - vice-versa when converting to/from vCard 4. -* #154: It's now possible to easily select all vCard properties belonging to - a single group with `$vcard->{'ITEM1.'}` syntax. (@armin-hackmann) -* #156: Simpler way to check if a string is UTF-8. (@Hywan) -* Unittest improvements. -* #159: The recurrence iterator, freebusy generator and iCalendar DATE and - DATE-TIME properties can now all accept a reference timezone when working - floating times or all-day events. -* #159: Master events will no longer get a `RECURRENCE-ID` when expanding. -* #159: `RECURRENCE-ID` for all-day events will now be correct when expanding. -* #163: Added a `getTimeZone()` method to `VTIMEZONE` components. - - -3.3.3 (2014-10-09) ------------------- - -* #142: `CANCEL` and `REPLY` messages now include the `DTSTART` from the - original event. -* #143: `SCHEDULE-AGENT` on the `ORGANIZER` property is respected. -* #144: `PARTSTAT=NEEDS-ACTION` is now set for new invites, if no `PARTSTAT` is - set to support the inbox feature of iOS. -* #147: Bugs related to scheduling all-day events. -* #148: Ignore events that have attendees but no organizer. -* #149: Avoiding logging errors during timezone detection. This is a workaround - for a PHP bug. -* Support for "Line Islands Standard Time" windows timezone. -* #154: Correctly work around vCard parameters that have a value but no name. - - -3.3.2 (2014-09-19) ------------------- - -* Changed: iTip broker now sets RSVP status to false when replies are received. -* #118: iTip Message now has a `getScheduleStatus()` method. -* #119: Support for detecting 'significant changes'. -* #120: Support for `SCHEDULE-FORCE-SEND`. -* #121: iCal demands parameters containing the + sign to be quoted. -* #122: Don't generate REPLY messages for events that have been cancelled. -* #123: Added `SUMMARY` to iTip messages. -* #130: Incorrect validation rules for `RELATED` (should be `RELATED-TO`). -* #128: `ATTACH` in iCalendar is `URI` by default, not `BINARY`. -* #131: RRULE that doesn't provide a single valid instance now throws an - exception. -* #136: Validator rejects *all* control characters. We were missing a few. -* #133: Splitter objects will throw exceptions when receiving incompatible - objects. -* #127: Attendees who delete recurring event instances events they had already - declined earlier will no longer generate another reply. -* #125: Send CANCEL messages when ORGANIZER property gets deleted. - - -3.3.1 (2014-08-18) ------------------- - -* Changed: It's now possible to pass DateTime objects when using the magic - setters on properties. (`$event->DTSTART = new DateTime('now')`). -* #111: iTip Broker does not process attendee adding events to EXDATE. -* #112: EventIterator now sets TZID on RECURRENCE-ID. -* #113: Timezone support during creation of iTip REPLY messages. -* #114: VTIMEZONE is retained when generating new REQUEST objects. -* #114: Support for 'MAILTO:' style email addresses (in uppercase) in the iTip - broker. This improves evolution support. -* #115: Using REQUEST-STATUS from REPLY messages and now propegating that into - SCHEDULE-STATUS. - - -3.3.0 (2014-08-07) ------------------- - -* We now use PSR-4 for the directory structure. This means that everything - that was used to be in the `lib/Sabre/VObject` directory is now moved to - `lib/`. If you use composer to load this library, you shouldn't have to do - anything about that though. -* VEVENT now get populated with a DTSTAMP and UID property by default. -* BC Break: Removed the 'includes.php' file. Use composer instead. -* #103: Added support for processing [iTip][iTip] messages. This allows a user - to parse incoming iTip messages and apply the result on existing calendars, - or automatically generate invites/replies/cancellations based on changes that - a user made on objects. -* #75, #58, #18: Fixes related to overriding the first event in recurrences. -* Added: VCalendar::getBaseComponent to find the 'master' component in a - calendar. -* #51: Support for iterating RDATE properties. -* Fixed: Issue #101: RecurrenceIterator::nextMonthly() shows events that are - excluded events with wrong time - - -3.2.4 (2014-07-14) ------------------- - -* Added: Issue #98. The VCardConverter now takes `X-APPLE-OMIT-YEAR` into - consideration when converting between vCard 3 and 4. -* Fixed: Issue #96. Some support for Yahoo's broken vcards. -* Fixed: PHP 5.3 support was broken in the cli tool. - - -3.2.3 (2014-06-12) ------------------- - -* Validator now checks if DUE and DTSTART are of the same type in VTODO, and - ensures that DUE is always after DTSTART. -* Removed documentation from source repository, to http://sabre.io/vobject/ -* Expanded the vobject cli tool validation output to make it easier to find - issues. -* Fixed: vobject repair. It was not working for iCalendar objects. - - -3.2.2 (2014-05-07) ------------------- - -* Minor tweak in unittests to make it run on PHP 5.5.12. Json-prettifying - slightly changed which caused the test to fail. - - -3.2.1 (2014-05-03) ------------------- - -* Minor tweak to make the unittests run with the latest hhvm on travis. -* Updated timezone definitions. -* Updated copyright links to point to http://sabre.io/ - - -3.2.0 (2014-04-02) ------------------- - -* Now hhvm compatible! -* The validator can now detect a _lot_ more problems. Many rules for both - iCalendar and vCard were added. -* Added: bin/generate_vcards, a utility to generate random vcards for testing - purposes. Patches are welcome to add more data. -* Updated: Windows timezone mapping to latest version from unicode.org -* Changed: The timezone maps are now loaded in from external files, in - lib/Sabre/VObject/timezonedata. -* Added: Fixing badly encoded URL's from google contacts vcards. -* Fixed: Issue #68. Couldn't decode properties ending in a colon. -* Fixed: Issue #72. RecurrenceIterator should respect timezone in the UNTIL - clause. -* Fixed: Issue #67. BYMONTH limit on DAILY recurrences. -* Fixed: Issue #26. Return a more descriptive error when coming across broken - BYDAY rules. -* Fixed: Issue #28. Incorrect timezone detection for some timezones. -* Fixed: Issue #70. Casting a parameter with a null value to string would fail. -* Added: Support for rfc6715 and rfc6474. -* Added: Support for DateTime objects in the VCard DATE-AND-OR-TIME property. -* Added: UUIDUtil, for easily creating unique identifiers. -* Fixed: Issue #83. Creating new VALUE=DATE objects using php's DateTime. -* Fixed: Issue #86. Don't go into an infinite loop when php errors are - disabled and an invalid file is read. - - -3.1.4 (2014-03-30) ------------------- - -* Fixed: Issue #87: Several compatibility fixes related to timezone handling - changes in PHP 5.5.10. - - -3.1.3 (2013-10-02) ------------------- - -* Fixed: Support from properties from draft-daboo-valarm-extensions-04. Issue - #56. -* Fixed: Issue #54. Parsing a stream of multiple vcards separated by more than - one newline. Thanks @Vedmak for the patch. -* Fixed: Serializing vcard 2.1 parameters with no name caused a literal '1' to - be inserted. -* Added: VCardConverter removed properties that are no longer supported in vCard - 4.0. -* Added: vCards with a minimum number of values (such as N), but don't have that - many, are now automatically padded with empty components. -* Added: The vCard validator now also checks for a minimum number of components, - and has the ability to repair these. -* Added: Some support for vCard 2.1 in the VCard converter, to upgrade to vCard - 3.0 or 4.0. -* Fixed: Issue 60 Use Document::$componentMap when instantiating the top-level - VCalendar and VCard components. -* Fixed: Issue 62: Parsing iCalendar parameters with no value. -* Added: --forgiving option to vobject utility. -* Fixed: Compound properties such as ADR were not correctly split up in vCard - 2.1 quoted printable-encoded properties. -* Fixed: Issue 64: Encoding of binary properties of converted vCards. Thanks - @DominikTo for the patch. - - -3.1.2 (2013-08-13) ------------------- - -* Fixed: Setting correct property group on VCard conversion - - -3.1.1 (2013-08-02) ------------------- - -* Fixed: Issue #53. A regression in RecurrenceIterator. - - -3.1.0 (2013-07-27) ------------------- - -* Added: bad-ass new cli debugging utility (in bin/vobject). -* Added: jCal and jCard parser. -* Fixed: URI properties should not escape ; and ,. -* Fixed: VCard 4 documents now correctly use URI as a default value-type for - PHOTO and others. BINARY no longer exists in vCard 4. -* Added: Utility to convert between 2.1, 3.0 and 4.0 vCards. -* Added: You can now add() multiple parameters to a property in one call. -* Added: Parameter::has() for easily checking if a parameter value exists. -* Added: VCard::preferred() to find a preferred email, phone number, etc for a - contact. -* Changed: All $duration properties are now public. -* Added: A few validators for iCalendar documents. -* Fixed: Issue #50. RecurrenceIterator gives incorrect result when exception - events are out of order in the iCalendar file. -* Fixed: Issue #48. Overridden events in the recurrence iterator that were past - the UNTIL date were ignored. -* Added: getDuration for DURATION values such as TRIGGER. Thanks to - @SimonSimCity. -* Fixed: Issue #52. vCard 2.1 parameters with no name may lose values if there's - more than 1. Thanks to @Vedmak. - - -3.0.0 (2013-06-21) ------------------- - -* Fixed: includes.php file was still broken. Our tool to generate it had some - bugs. - - -3.0.0-beta4 (2013-06-21) ------------------------- - -* Fixed: includes.php was no longer up to date. - - -3.0.0-beta3 (2013-06-17) ------------------------- - -* Added: OPTION_FORGIVING now also allows slashes in property names. -* Fixed: DateTimeParser no longer fails on dates with years < 1000 & > 4999 -* Fixed: Issue 36: Workaround for the recurrenceiterator and caldav events with - a missing base event. -* Fixed: jCard encoding of TIME properties. -* Fixed: jCal encoding of REQUEST-STATUS, GEO and PERIOD values. - - -3.0.0-beta2 (2013-06-10) ------------------------- - -* Fixed: Corrected includes.php file. -* Fixed: vCard date-time parser supported extended-format dates as well. -* Changed: Properties have been moved to an ICalendar or VCard directory. -* Fixed: Couldn't parse vCard 3 extended format dates and times. -* Fixed: Couldn't export jCard DATE values correctly. -* Fixed: Recursive loop in ICalendar\DateTime property. - - -3.0.0-beta1 (2013-06-07) ------------------------- - -* Added: jsonSerialize() for creating jCal and jCard documents. -* Added: helper method to parse vCard dates and times. -* Added: Specialized classes for FLOAT, LANGUAGE-TAG, TIME, TIMESTAMP, - DATE-AND-OR-TIME, CAL-ADDRESS, UNKNOWN and UTC-OFFSET properties. -* Removed: CommaSeparatedText property. Now included into Text. -* Fixed: Multiple parameters with the same name are now correctly encoded. -* Fixed: Parameter values containing a comma are now enclosed in double-quotes. -* Fixed: Iterating parameter values should now fully work as expected. -* Fixed: Support for vCard 2.1 nameless parameters. -* Changed: $valueMap, $componentMap and $propertyMap now all use fully-qualified - class names, so they are actually overridable. -* Fixed: Updating DATE-TIME to DATE values now behaves like expected. - - -3.0.0-alpha4 (2013-05-31) -------------------------- - -* Added: It's now possible to send parser options to the splitter classes. -* Added: A few tweaks to improve component and property creation. - - -3.0.0-alpha3 (2013-05-13) -------------------------- - -* Changed: propertyMap, valueMap and componentMap are now static properties. -* Changed: Component::remove() will throw an exception when trying to a node - that's not a child of said component. -* Added: Splitter objects are now faster, line numbers are accurately reported - and use less memory. -* Added: MimeDir parser can now continue parsing with the same stream buffer. -* Fixed: vobjectvalidate.php is operational again. -* Fixed: \r is properly stripped in text values. -* Fixed: QUOTED-PRINTABLE is now correctly encoded as well as encoded, for - vCards 2.1. -* Fixed: Parser assumes vCard 2.1, if no version was supplied. - - -3.0.0-alpha2 (2013-05-22) -------------------------- - -* Fixed: vCard URL properties were referencing a non-existant class. - - -3.0.0-alpha1 (2013-05-21) -------------------------- - -* Fixed: Now correctly dealing with escaping of properties. This solves the - problem with double-backslashes where they don't belong. -* Added: Easy support for properties with more than one value, using setParts - and getParts. -* Added: Support for broken 2.1 vCards produced by microsoft. -* Added: Automatically decoding quoted-printable values. -* Added: Automatically decoding base64 values. -* Added: Decoding RFC6868 parameter values (uses ^ as an escape character). -* Added: Fancy new MimeDir parser that can also parse streams. -* Added: Automatically mapping many, many properties to a property-class with - specialized API's. -* Added: remove() method for easily removing properties and sub-components - components. -* Changed: Components, Properties and Parameters can no longer be created with - Component::create, Property::create and Parameter::create. They must instead - be created through the root component. (A VCalendar or VCard object). -* Changed: API for DateTime properties has slightly changed. -* Changed: the ->value property is now protected everywhere. Use getParts() and - getValue() instead. -* BC Break: No support for mac newlines (\r). Never came across these anyway. -* Added: add() method to the Property class. -* Added: It's now possible to easy set multi-value properties as arrays. -* Added: When setting date-time properties you can just pass PHP's DateTime - object. -* Added: New components automatically get a bunch of default properties, such as - VERSION and CALSCALE. -* Added: You can add new sub-components much quicker with the magic setters, and - add() method. - - -2.1.7 (2015-01-21) ------------------- - -* Fixed: Issue #94, a workaround for bad escaping of ; and , in compound - properties. It's not a full solution, but it's an improvement for those - stuck in the 2.1 versions. - - -2.1.6 (2014-12-10) ------------------- - -* Fixed: Minor change to make sure that unittests succeed on every PHP version. - - -2.1.5 (2014-06-03) ------------------- - -* Fixed: #94: Better parameter escaping. -* Changed: Documentation cleanups. - - -2.1.4 (2014-03-30) ------------------- - -* Fixed: Issue #87: Several compatibility fixes related to timezone handling - changes in PHP 5.5.10. - - -2.1.3 (2013-10-02) ------------------- - -* Fixed: Issue #55. \r must be stripped from property values. -* Fixed: Issue #65. Putting quotes around parameter values that contain a colon. - - -2.1.2 (2013-08-02) ------------------- - -* Fixed: Issue #53. A regression in RecurrenceIterator. - - -2.1.1 (2013-07-27) ------------------- - -* Fixed: Issue #50. RecurrenceIterator gives incorrect result when exception - events are out of order in the iCalendar file. -* Fixed: Issue #48. Overridden events in the recurrence iterator that were past - the UNTIL date were ignored. - - -2.1.0 (2013-06-17) ------------------- - -* This version is fully backwards compatible with 2.0.\*. However, it contains a - few new API's that mimic the VObject 3 API. This allows it to be used a - 'bridge' version. Specifically, this new version exists so SabreDAV 1.7 and - 1.8 can run with both the 2 and 3 versions of this library. -* Added: Property\DateTime::hasTime(). -* Added: Property\MultiDateTime::hasTime(). -* Added: Property::getValue(). -* Added: Document class. -* Added: Document::createComponent and Document::createProperty. -* Added: Parameter::getValue(). - - -2.0.7 (2013-03-05) ------------------- - -* Fixed: Microsoft re-uses their magic numbers for different timezones, - specifically id 2 for both Sarajevo and Lisbon). A workaround was added to - deal with this. - - -2.0.6 (2013-02-17) ------------------- - -* Fixed: The reader now properly parses parameters without a value. - - -2.0.5 (2012-11-05) ------------------- - -* Fixed: The FreeBusyGenerator is now properly using the factory methods for - creation of components and properties. - - -2.0.4 (2012-11-02) ------------------- - -* Added: Known Lotus Notes / Domino timezone id's. - - -2.0.3 (2012-10-29) ------------------- - -* Added: Support for 'GMT+????' format in TZID's. -* Added: Support for formats like SystemV/EST5EDT in TZID's. -* Fixed: RecurrenceIterator now repairs recurrence rules where UNTIL < DTSTART. -* Added: Support for BYHOUR in FREQ=DAILY (@hollodk). -* Added: Support for BYHOUR and BYDAY in FREQ=WEEKLY. - - -2.0.2 (2012-10-06) ------------------- - -* Added: includes.php file, to load the entire library in one go. -* Fixed: A problem with determining alarm triggers for TODO's. - - -2.0.1 (2012-09-22) ------------------- - -* Removed: Element class. It wasn't used. -* Added: Basic validation and repair methods for broken input data. -* Fixed: RecurrenceIterator could infinitely loop when an INTERVAL of 0 was - specified. -* Added: A cli script that can validate and automatically repair vcards and - iCalendar objects. -* Added: A new 'Compound' property, that can automatically split up parts for - properties such as N, ADR, ORG and CATEGORIES. -* Added: Splitter classes, that can split up large objects (such as exports) - into individual objects (thanks @DominikTo and @armin-hackmann). -* Added: VFREEBUSY component, which allows easily checking wether timeslots are - available. -* Added: The Reader class now has a 'FORGIVING' option, which allows it to parse - properties with incorrect characters in the name (at this time, it just allows - underscores). -* Added: Also added the 'IGNORE_INVALID_LINES' option, to completely disregard - any invalid lines. -* Fixed: A bug in Windows timezone-id mappings for times created in Greenlands - timezone (sorry Greenlanders! I do care!). -* Fixed: DTEND was not generated correctly for VFREEBUSY reports. -* Fixed: Parser is at least 25% faster with real-world data. - - -2.0.0 (2012-08-08) ------------------- - -* VObject is now a separate project from SabreDAV. See the SabreDAV changelog - for version information before 2.0. -* New: VObject library now uses PHP 5.3 namespaces. -* New: It's possible to specify lists of parameters when constructing - properties. -* New: made it easier to construct the FreeBusyGenerator. - -[iTip]: http://tools.ietf.org/html/rfc5546 diff --git a/htdocs/includes/sabre/sabre/vobject/README.md b/htdocs/includes/sabre/sabre/vobject/README.md index 5030cf27658..659e3fa83be 100644 --- a/htdocs/includes/sabre/sabre/vobject/README.md +++ b/htdocs/includes/sabre/sabre/vobject/README.md @@ -4,7 +4,7 @@ sabre/vobject The VObject library allows you to easily parse and manipulate [iCalendar](https://tools.ietf.org/html/rfc5545) and [vCard](https://tools.ietf.org/html/rfc6350) objects using PHP. -The goal of the VObject library is to create a very complete library, with an easy to use API. +The goal of the VObject library is to create a very complete library, with an easy-to-use API. Installation diff --git a/htdocs/includes/sabre/sabre/vobject/bin/bench_freebusygenerator.php b/htdocs/includes/sabre/sabre/vobject/bin/bench_freebusygenerator.php index 1299c14fb6a..963623d18d7 100644 --- a/htdocs/includes/sabre/sabre/vobject/bin/bench_freebusygenerator.php +++ b/htdocs/includes/sabre/sabre/vobject/bin/bench_freebusygenerator.php @@ -11,7 +11,7 @@ if ($argc < 2) { echo "The process will be repeated 100 times to get accurate stats\n"; echo "\n"; echo 'Usage: '.$argv[0]." inputfile.ics\n"; - die(); + exit(); } list(, $inputFile) = $argv; diff --git a/htdocs/includes/sabre/sabre/vobject/bin/bench_manipulatevcard.php b/htdocs/includes/sabre/sabre/vobject/bin/bench_manipulatevcard.php index f229091db25..df6d9f23d66 100644 --- a/htdocs/includes/sabre/sabre/vobject/bin/bench_manipulatevcard.php +++ b/htdocs/includes/sabre/sabre/vobject/bin/bench_manipulatevcard.php @@ -10,7 +10,7 @@ if ($argc < 2) { echo 'system.'; echo "\n"; echo 'Usage: '.$argv[0]." inputfile.vcf\n"; - die(); + exit(); } list(, $inputFile) = $argv; diff --git a/htdocs/includes/sabre/sabre/vobject/bin/fetch_windows_zones.php b/htdocs/includes/sabre/sabre/vobject/bin/fetch_windows_zones.php index 9c4e51abd28..2361dc3093f 100755 --- a/htdocs/includes/sabre/sabre/vobject/bin/fetch_windows_zones.php +++ b/htdocs/includes/sabre/sabre/vobject/bin/fetch_windows_zones.php @@ -1,13 +1,12 @@ #!/usr/bin/env php validate(); if ($result) { fwrite(STDERR, "Errors!\n"); fwrite(STDERR, print_r($result, true)); - die(-1); + exit(-1); } fwrite(STDERR, "Serializing this beast\n"); diff --git a/htdocs/includes/sabre/sabre/vobject/bin/mergeduplicates.php b/htdocs/includes/sabre/sabre/vobject/bin/mergeduplicates.php index e6cde73dd00..31b2c14ab61 100755 --- a/htdocs/includes/sabre/sabre/vobject/bin/mergeduplicates.php +++ b/htdocs/includes/sabre/sabre/vobject/bin/mergeduplicates.php @@ -19,7 +19,7 @@ foreach ($paths as $path) { if (!class_exists('Sabre\\VObject\\Version')) { fwrite(STDERR, "Composer autoloader could not be loaded.\n"); - die(1); + exit(1); } echo 'sabre/vobject ', Version::VERSION, " duplicate contact merge tool\n"; @@ -27,7 +27,7 @@ echo 'sabre/vobject ', Version::VERSION, " duplicate contact merge tool\n"; if ($argc < 3) { echo "\n"; echo 'Usage: ', $argv[0], " input.vcf output.vcf [debug.log]\n"; - die(1); + exit(1); } $input = fopen($argv[1], 'r'); diff --git a/htdocs/includes/sabre/sabre/vobject/bin/rrulebench.php b/htdocs/includes/sabre/sabre/vobject/bin/rrulebench.php index 583da574cfd..69008002e33 100644 --- a/htdocs/includes/sabre/sabre/vobject/bin/rrulebench.php +++ b/htdocs/includes/sabre/sabre/vobject/bin/rrulebench.php @@ -9,7 +9,7 @@ if ($argc < 4) { echo 'system.'; echo "\n"; echo 'Usage: '.$argv[0]." inputfile.ics startdate enddate\n"; - die(); + exit(); } list(, $inputFile, $startDate, $endDate) = $argv; diff --git a/htdocs/includes/sabre/sabre/vobject/composer.json b/htdocs/includes/sabre/sabre/vobject/composer.json index bd7892464d7..b745b1fa6a9 100644 --- a/htdocs/includes/sabre/sabre/vobject/composer.json +++ b/htdocs/includes/sabre/sabre/vobject/composer.json @@ -32,12 +32,15 @@ "homepage" : "http://sabre.io/vobject/", "license" : "BSD-3-Clause", "require" : { - "php" : ">=5.5", + "php" : "^7.1 || ^8.0", "ext-mbstring" : "*", - "sabre/xml" : ">=1.5 <3.0" + "sabre/xml" : "^2.1" }, "require-dev" : { - "phpunit/phpunit" : "> 4.8.35, <6.0.0" + "friendsofphp/php-cs-fixer": "~2.17.1", + "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0", + "phpunit/php-invoker" : "^2.0 || ^3.1", + "phpstan/phpstan": "^0.12" }, "suggest" : { "hoa/bench" : "If you would like to run the benchmark scripts" @@ -85,7 +88,20 @@ "dev-master" : "4.0.x-dev" } }, - "config" : { - "bin-dir" : "bin" + "scripts": { + "phpstan": [ + "phpstan analyse lib tests" + ], + "cs-fixer": [ + "php-cs-fixer fix" + ], + "phpunit": [ + "phpunit --configuration tests/phpunit.xml" + ], + "test": [ + "composer phpstan", + "composer cs-fixer", + "composer phpunit" + ] } } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Cli.php b/htdocs/includes/sabre/sabre/vobject/lib/Cli.php index be795e9e25e..3bde16f9c3a 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Cli.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Cli.php @@ -2,8 +2,7 @@ namespace Sabre\VObject; -use - InvalidArgumentException; +use InvalidArgumentException; /** * This is the CLI interface for sabre-vobject. @@ -137,17 +136,14 @@ class Cli // jcard/jcal documents case 'jcard': case 'jcal': - // specific document versions case 'vcard21': case 'vcard30': case 'vcard40': case 'icalendar20': - // specific formats case 'json': case 'mimedir': - // icalendar/vcad case 'icalendar': case 'vcard': @@ -183,7 +179,6 @@ class Cli case 'vcard30': case 'vcard40': case 'icalendar20': - $this->inputFormat = 'mimedir'; break; @@ -211,7 +206,7 @@ class Cli } if (!in_array($positional[0], ['validate', 'repair', 'convert', 'color'])) { - throw new InvalidArgumentException('Uknown command: '.$positional[0]); + throw new InvalidArgumentException('Unknown command: '.$positional[0]); } } catch (InvalidArgumentException $e) { $this->showHelp(); @@ -312,8 +307,6 @@ HELP /** * Validates a VObject file. * - * @param Component $vObj - * * @return int */ protected function validate(Component $vObj) @@ -354,8 +347,6 @@ HELP /** * Repairs a VObject file. * - * @param Component $vObj - * * @return int */ protected function repair(Component $vObj) @@ -462,12 +453,10 @@ HELP * Colorizes a file. * * @param Component $vObj - * - * @return int */ protected function color($vObj) { - fwrite($this->stdout, $this->serializeComponent($vObj)); + $this->serializeComponent($vObj); } /** @@ -582,8 +571,6 @@ HELP /** * Colorizes a property. - * - * @param Property $property */ protected function serializeProperty(Property $property) { @@ -642,8 +629,6 @@ HELP /** * Parses the list of arguments. - * - * @param array $argv */ protected function parseArguments(array $argv) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component.php b/htdocs/includes/sabre/sabre/vobject/lib/Component.php index d4d8506d8b4..a929387a3ce 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component.php @@ -28,7 +28,7 @@ class Component extends Node /** * A list of properties and/or sub-components. * - * @var array + * @var array */ protected $children = []; @@ -43,14 +43,12 @@ class Component extends Node * an iCalendar object, this may be something like CALSCALE:GREGORIAN. To * ensure that this does not happen, set $defaults to false. * - * @param Document $root - * @param string $name such as VCALENDAR, VEVENT - * @param array $children - * @param bool $defaults + * @param string|null $name such as VCALENDAR, VEVENT + * @param bool $defaults */ public function __construct(Document $root, $name, array $children = [], $defaults = true) { - $this->name = strtoupper($name); + $this->name = isset($name) ? strtoupper($name) : ''; $this->root = $root; if ($defaults) { @@ -162,9 +160,9 @@ class Component extends Node return; } } - } - throw new \InvalidArgumentException('The item you passed to remove() was not a child of this component'); + throw new \InvalidArgumentException('The item you passed to remove() was not a child of this component'); + } } /** @@ -240,7 +238,7 @@ class Component extends Node return array_filter( $result, function ($child) use ($group) { - return $child instanceof Property && strtoupper($child->group) === $group; + return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group; } ); } @@ -251,7 +249,7 @@ class Component extends Node $result = []; foreach ($this->children as $childGroup) { foreach ($childGroup as $child) { - if ($child instanceof Property && strtoupper($child->group) === $group) { + if ($child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group) { $result[] = $child; } } @@ -341,6 +339,7 @@ class Component extends Node * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { $components = []; @@ -433,7 +432,7 @@ class Component extends Node * * @param string $name * - * @return Property + * @return Property|null */ public function __get($name) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VAvailability.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VAvailability.php index 6f3e7f13c94..04ec38dcb7c 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VAvailability.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VAvailability.php @@ -26,9 +26,6 @@ class VAvailability extends VObject\Component * * https://tools.ietf.org/html/draft-daboo-calendar-availability-05#section-3.1 * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * * @return bool */ public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VCalendar.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VCalendar.php index e21ae077a38..4db31813571 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VCalendar.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VCalendar.php @@ -37,15 +37,15 @@ class VCalendar extends VObject\Document * @var array */ public static $componentMap = [ - 'VCALENDAR' => 'Sabre\\VObject\\Component\\VCalendar', - 'VALARM' => 'Sabre\\VObject\\Component\\VAlarm', - 'VEVENT' => 'Sabre\\VObject\\Component\\VEvent', - 'VFREEBUSY' => 'Sabre\\VObject\\Component\\VFreeBusy', - 'VAVAILABILITY' => 'Sabre\\VObject\\Component\\VAvailability', - 'AVAILABLE' => 'Sabre\\VObject\\Component\\Available', - 'VJOURNAL' => 'Sabre\\VObject\\Component\\VJournal', - 'VTIMEZONE' => 'Sabre\\VObject\\Component\\VTimeZone', - 'VTODO' => 'Sabre\\VObject\\Component\\VTodo', + 'VCALENDAR' => self::class, + 'VALARM' => VAlarm::class, + 'VEVENT' => VEvent::class, + 'VFREEBUSY' => VFreeBusy::class, + 'VAVAILABILITY' => VAvailability::class, + 'AVAILABLE' => Available::class, + 'VJOURNAL' => VJournal::class, + 'VTIMEZONE' => VTimeZone::class, + 'VTODO' => VTodo::class, ]; /** @@ -54,21 +54,21 @@ class VCalendar extends VObject\Document * @var array */ public static $valueMap = [ - 'BINARY' => 'Sabre\\VObject\\Property\\Binary', - 'BOOLEAN' => 'Sabre\\VObject\\Property\\Boolean', - 'CAL-ADDRESS' => 'Sabre\\VObject\\Property\\ICalendar\\CalAddress', - 'DATE' => 'Sabre\\VObject\\Property\\ICalendar\\Date', - 'DATE-TIME' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DURATION' => 'Sabre\\VObject\\Property\\ICalendar\\Duration', - 'FLOAT' => 'Sabre\\VObject\\Property\\FloatValue', - 'INTEGER' => 'Sabre\\VObject\\Property\\IntegerValue', - 'PERIOD' => 'Sabre\\VObject\\Property\\ICalendar\\Period', - 'RECUR' => 'Sabre\\VObject\\Property\\ICalendar\\Recur', - 'TEXT' => 'Sabre\\VObject\\Property\\Text', - 'TIME' => 'Sabre\\VObject\\Property\\Time', - 'UNKNOWN' => 'Sabre\\VObject\\Property\\Unknown', // jCard / jCal-only. - 'URI' => 'Sabre\\VObject\\Property\\Uri', - 'UTC-OFFSET' => 'Sabre\\VObject\\Property\\UtcOffset', + 'BINARY' => VObject\Property\Binary::class, + 'BOOLEAN' => VObject\Property\Boolean::class, + 'CAL-ADDRESS' => VObject\Property\ICalendar\CalAddress::class, + 'DATE' => VObject\Property\ICalendar\Date::class, + 'DATE-TIME' => VObject\Property\ICalendar\DateTime::class, + 'DURATION' => VObject\Property\ICalendar\Duration::class, + 'FLOAT' => VObject\Property\FloatValue::class, + 'INTEGER' => VObject\Property\IntegerValue::class, + 'PERIOD' => VObject\Property\ICalendar\Period::class, + 'RECUR' => VObject\Property\ICalendar\Recur::class, + 'TEXT' => VObject\Property\Text::class, + 'TIME' => VObject\Property\Time::class, + 'UNKNOWN' => VObject\Property\Unknown::class, // jCard / jCal-only. + 'URI' => VObject\Property\Uri::class, + 'UTC-OFFSET' => VObject\Property\UtcOffset::class, ]; /** @@ -78,78 +78,78 @@ class VCalendar extends VObject\Document */ public static $propertyMap = [ // Calendar properties - 'CALSCALE' => 'Sabre\\VObject\\Property\\FlatText', - 'METHOD' => 'Sabre\\VObject\\Property\\FlatText', - 'PRODID' => 'Sabre\\VObject\\Property\\FlatText', - 'VERSION' => 'Sabre\\VObject\\Property\\FlatText', + 'CALSCALE' => VObject\Property\FlatText::class, + 'METHOD' => VObject\Property\FlatText::class, + 'PRODID' => VObject\Property\FlatText::class, + 'VERSION' => VObject\Property\FlatText::class, // Component properties - 'ATTACH' => 'Sabre\\VObject\\Property\\Uri', - 'CATEGORIES' => 'Sabre\\VObject\\Property\\Text', - 'CLASS' => 'Sabre\\VObject\\Property\\FlatText', - 'COMMENT' => 'Sabre\\VObject\\Property\\FlatText', - 'DESCRIPTION' => 'Sabre\\VObject\\Property\\FlatText', - 'GEO' => 'Sabre\\VObject\\Property\\FloatValue', - 'LOCATION' => 'Sabre\\VObject\\Property\\FlatText', - 'PERCENT-COMPLETE' => 'Sabre\\VObject\\Property\\IntegerValue', - 'PRIORITY' => 'Sabre\\VObject\\Property\\IntegerValue', - 'RESOURCES' => 'Sabre\\VObject\\Property\\Text', - 'STATUS' => 'Sabre\\VObject\\Property\\FlatText', - 'SUMMARY' => 'Sabre\\VObject\\Property\\FlatText', + 'ATTACH' => VObject\Property\Uri::class, + 'CATEGORIES' => VObject\Property\Text::class, + 'CLASS' => VObject\Property\FlatText::class, + 'COMMENT' => VObject\Property\FlatText::class, + 'DESCRIPTION' => VObject\Property\FlatText::class, + 'GEO' => VObject\Property\FloatValue::class, + 'LOCATION' => VObject\Property\FlatText::class, + 'PERCENT-COMPLETE' => VObject\Property\IntegerValue::class, + 'PRIORITY' => VObject\Property\IntegerValue::class, + 'RESOURCES' => VObject\Property\Text::class, + 'STATUS' => VObject\Property\FlatText::class, + 'SUMMARY' => VObject\Property\FlatText::class, // Date and Time Component Properties - 'COMPLETED' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DTEND' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DUE' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DTSTART' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DURATION' => 'Sabre\\VObject\\Property\\ICalendar\\Duration', - 'FREEBUSY' => 'Sabre\\VObject\\Property\\ICalendar\\Period', - 'TRANSP' => 'Sabre\\VObject\\Property\\FlatText', + 'COMPLETED' => VObject\Property\ICalendar\DateTime::class, + 'DTEND' => VObject\Property\ICalendar\DateTime::class, + 'DUE' => VObject\Property\ICalendar\DateTime::class, + 'DTSTART' => VObject\Property\ICalendar\DateTime::class, + 'DURATION' => VObject\Property\ICalendar\Duration::class, + 'FREEBUSY' => VObject\Property\ICalendar\Period::class, + 'TRANSP' => VObject\Property\FlatText::class, // Time Zone Component Properties - 'TZID' => 'Sabre\\VObject\\Property\\FlatText', - 'TZNAME' => 'Sabre\\VObject\\Property\\FlatText', - 'TZOFFSETFROM' => 'Sabre\\VObject\\Property\\UtcOffset', - 'TZOFFSETTO' => 'Sabre\\VObject\\Property\\UtcOffset', - 'TZURL' => 'Sabre\\VObject\\Property\\Uri', + 'TZID' => VObject\Property\FlatText::class, + 'TZNAME' => VObject\Property\FlatText::class, + 'TZOFFSETFROM' => VObject\Property\UtcOffset::class, + 'TZOFFSETTO' => VObject\Property\UtcOffset::class, + 'TZURL' => VObject\Property\Uri::class, // Relationship Component Properties - 'ATTENDEE' => 'Sabre\\VObject\\Property\\ICalendar\\CalAddress', - 'CONTACT' => 'Sabre\\VObject\\Property\\FlatText', - 'ORGANIZER' => 'Sabre\\VObject\\Property\\ICalendar\\CalAddress', - 'RECURRENCE-ID' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'RELATED-TO' => 'Sabre\\VObject\\Property\\FlatText', - 'URL' => 'Sabre\\VObject\\Property\\Uri', - 'UID' => 'Sabre\\VObject\\Property\\FlatText', + 'ATTENDEE' => VObject\Property\ICalendar\CalAddress::class, + 'CONTACT' => VObject\Property\FlatText::class, + 'ORGANIZER' => VObject\Property\ICalendar\CalAddress::class, + 'RECURRENCE-ID' => VObject\Property\ICalendar\DateTime::class, + 'RELATED-TO' => VObject\Property\FlatText::class, + 'URL' => VObject\Property\Uri::class, + 'UID' => VObject\Property\FlatText::class, // Recurrence Component Properties - 'EXDATE' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'RDATE' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'RRULE' => 'Sabre\\VObject\\Property\\ICalendar\\Recur', - 'EXRULE' => 'Sabre\\VObject\\Property\\ICalendar\\Recur', // Deprecated since rfc5545 + 'EXDATE' => VObject\Property\ICalendar\DateTime::class, + 'RDATE' => VObject\Property\ICalendar\DateTime::class, + 'RRULE' => VObject\Property\ICalendar\Recur::class, + 'EXRULE' => VObject\Property\ICalendar\Recur::class, // Deprecated since rfc5545 // Alarm Component Properties - 'ACTION' => 'Sabre\\VObject\\Property\\FlatText', - 'REPEAT' => 'Sabre\\VObject\\Property\\IntegerValue', - 'TRIGGER' => 'Sabre\\VObject\\Property\\ICalendar\\Duration', + 'ACTION' => VObject\Property\FlatText::class, + 'REPEAT' => VObject\Property\IntegerValue::class, + 'TRIGGER' => VObject\Property\ICalendar\Duration::class, // Change Management Component Properties - 'CREATED' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'DTSTAMP' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'LAST-MODIFIED' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'SEQUENCE' => 'Sabre\\VObject\\Property\\IntegerValue', + 'CREATED' => VObject\Property\ICalendar\DateTime::class, + 'DTSTAMP' => VObject\Property\ICalendar\DateTime::class, + 'LAST-MODIFIED' => VObject\Property\ICalendar\DateTime::class, + 'SEQUENCE' => VObject\Property\IntegerValue::class, // Request Status - 'REQUEST-STATUS' => 'Sabre\\VObject\\Property\\Text', + 'REQUEST-STATUS' => VObject\Property\Text::class, // Additions from draft-daboo-valarm-extensions-04 - 'ALARM-AGENT' => 'Sabre\\VObject\\Property\\Text', - 'ACKNOWLEDGED' => 'Sabre\\VObject\\Property\\ICalendar\\DateTime', - 'PROXIMITY' => 'Sabre\\VObject\\Property\\Text', - 'DEFAULT-ALARM' => 'Sabre\\VObject\\Property\\Boolean', + 'ALARM-AGENT' => VObject\Property\Text::class, + 'ACKNOWLEDGED' => VObject\Property\ICalendar\DateTime::class, + 'PROXIMITY' => VObject\Property\Text::class, + 'DEFAULT-ALARM' => VObject\Property\Boolean::class, // Additions from draft-daboo-calendar-availability-05 - 'BUSYTYPE' => 'Sabre\\VObject\\Property\\Text', + 'BUSYTYPE' => VObject\Property\Text::class, ]; /** @@ -276,10 +276,8 @@ class VCalendar extends VObject\Document * In addition, this method will cause timezone information to be stripped, * and normalized to UTC. * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * @param DateTimeZone $timeZone reference timezone for floating dates and - * times + * @param DateTimeZone $timeZone reference timezone for floating dates and + * times * * @return VCalendar */ @@ -311,7 +309,7 @@ class VCalendar extends VObject\Document foreach ($this->children() as $child) { if ($child instanceof Property && 'PRODID' !== $child->name) { - // We explictly want to ignore PRODID, because we want to + // We explicitly want to ignore PRODID, because we want to // overwrite it with our own. $newChildren[] = clone $child; } elseif ($child instanceof Component && 'VTIMEZONE' !== $child->name) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VCard.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VCard.php index 4d7e861a23a..90a6df72f76 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VCard.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VCard.php @@ -39,7 +39,7 @@ class VCard extends VObject\Document * @var array */ public static $componentMap = [ - 'VCARD' => 'Sabre\\VObject\\Component\\VCard', + 'VCARD' => VCard::class, ]; /** @@ -48,23 +48,23 @@ class VCard extends VObject\Document * @var array */ public static $valueMap = [ - 'BINARY' => 'Sabre\\VObject\\Property\\Binary', - 'BOOLEAN' => 'Sabre\\VObject\\Property\\Boolean', - 'CONTENT-ID' => 'Sabre\\VObject\\Property\\FlatText', // vCard 2.1 only - 'DATE' => 'Sabre\\VObject\\Property\\VCard\\Date', - 'DATE-TIME' => 'Sabre\\VObject\\Property\\VCard\\DateTime', - 'DATE-AND-OR-TIME' => 'Sabre\\VObject\\Property\\VCard\\DateAndOrTime', // vCard only - 'FLOAT' => 'Sabre\\VObject\\Property\\FloatValue', - 'INTEGER' => 'Sabre\\VObject\\Property\\IntegerValue', - 'LANGUAGE-TAG' => 'Sabre\\VObject\\Property\\VCard\\LanguageTag', - 'PHONE-NUMBER' => 'Sabre\\VObject\\Property\\VCard\\PhoneNumber', // vCard 3.0 only - 'TIMESTAMP' => 'Sabre\\VObject\\Property\\VCard\\TimeStamp', - 'TEXT' => 'Sabre\\VObject\\Property\\Text', - 'TIME' => 'Sabre\\VObject\\Property\\Time', - 'UNKNOWN' => 'Sabre\\VObject\\Property\\Unknown', // jCard / jCal-only. - 'URI' => 'Sabre\\VObject\\Property\\Uri', - 'URL' => 'Sabre\\VObject\\Property\\Uri', // vCard 2.1 only - 'UTC-OFFSET' => 'Sabre\\VObject\\Property\\UtcOffset', + 'BINARY' => VObject\Property\Binary::class, + 'BOOLEAN' => VObject\Property\Boolean::class, + 'CONTENT-ID' => VObject\Property\FlatText::class, // vCard 2.1 only + 'DATE' => VObject\Property\VCard\Date::class, + 'DATE-TIME' => VObject\Property\VCard\DateTime::class, + 'DATE-AND-OR-TIME' => VObject\Property\VCard\DateAndOrTime::class, // vCard only + 'FLOAT' => VObject\Property\FloatValue::class, + 'INTEGER' => VObject\Property\IntegerValue::class, + 'LANGUAGE-TAG' => VObject\Property\VCard\LanguageTag::class, + 'PHONE-NUMBER' => VObject\Property\VCard\PhoneNumber::class, // vCard 3.0 only + 'TIMESTAMP' => VObject\Property\VCard\TimeStamp::class, + 'TEXT' => VObject\Property\Text::class, + 'TIME' => VObject\Property\Time::class, + 'UNKNOWN' => VObject\Property\Unknown::class, // jCard / jCal-only. + 'URI' => VObject\Property\Uri::class, + 'URL' => VObject\Property\Uri::class, // vCard 2.1 only + 'UTC-OFFSET' => VObject\Property\UtcOffset::class, ]; /** @@ -74,68 +74,68 @@ class VCard extends VObject\Document */ public static $propertyMap = [ // vCard 2.1 properties and up - 'N' => 'Sabre\\VObject\\Property\\Text', - 'FN' => 'Sabre\\VObject\\Property\\FlatText', - 'PHOTO' => 'Sabre\\VObject\\Property\\Binary', - 'BDAY' => 'Sabre\\VObject\\Property\\VCard\\DateAndOrTime', - 'ADR' => 'Sabre\\VObject\\Property\\Text', - 'LABEL' => 'Sabre\\VObject\\Property\\FlatText', // Removed in vCard 4.0 - 'TEL' => 'Sabre\\VObject\\Property\\FlatText', - 'EMAIL' => 'Sabre\\VObject\\Property\\FlatText', - 'MAILER' => 'Sabre\\VObject\\Property\\FlatText', // Removed in vCard 4.0 - 'GEO' => 'Sabre\\VObject\\Property\\FlatText', - 'TITLE' => 'Sabre\\VObject\\Property\\FlatText', - 'ROLE' => 'Sabre\\VObject\\Property\\FlatText', - 'LOGO' => 'Sabre\\VObject\\Property\\Binary', + 'N' => VObject\Property\Text::class, + 'FN' => VObject\Property\FlatText::class, + 'PHOTO' => VObject\Property\Binary::class, + 'BDAY' => VObject\Property\VCard\DateAndOrTime::class, + 'ADR' => VObject\Property\Text::class, + 'LABEL' => VObject\Property\FlatText::class, // Removed in vCard 4.0 + 'TEL' => VObject\Property\FlatText::class, + 'EMAIL' => VObject\Property\FlatText::class, + 'MAILER' => VObject\Property\FlatText::class, // Removed in vCard 4.0 + 'GEO' => VObject\Property\FlatText::class, + 'TITLE' => VObject\Property\FlatText::class, + 'ROLE' => VObject\Property\FlatText::class, + 'LOGO' => VObject\Property\Binary::class, // 'AGENT' => 'Sabre\\VObject\\Property\\', // Todo: is an embedded vCard. Probably rare, so // not supported at the moment - 'ORG' => 'Sabre\\VObject\\Property\\Text', - 'NOTE' => 'Sabre\\VObject\\Property\\FlatText', - 'REV' => 'Sabre\\VObject\\Property\\VCard\\TimeStamp', - 'SOUND' => 'Sabre\\VObject\\Property\\FlatText', - 'URL' => 'Sabre\\VObject\\Property\\Uri', - 'UID' => 'Sabre\\VObject\\Property\\FlatText', - 'VERSION' => 'Sabre\\VObject\\Property\\FlatText', - 'KEY' => 'Sabre\\VObject\\Property\\FlatText', - 'TZ' => 'Sabre\\VObject\\Property\\Text', + 'ORG' => VObject\Property\Text::class, + 'NOTE' => VObject\Property\FlatText::class, + 'REV' => VObject\Property\VCard\TimeStamp::class, + 'SOUND' => VObject\Property\FlatText::class, + 'URL' => VObject\Property\Uri::class, + 'UID' => VObject\Property\FlatText::class, + 'VERSION' => VObject\Property\FlatText::class, + 'KEY' => VObject\Property\FlatText::class, + 'TZ' => VObject\Property\Text::class, // vCard 3.0 properties - 'CATEGORIES' => 'Sabre\\VObject\\Property\\Text', - 'SORT-STRING' => 'Sabre\\VObject\\Property\\FlatText', - 'PRODID' => 'Sabre\\VObject\\Property\\FlatText', - 'NICKNAME' => 'Sabre\\VObject\\Property\\Text', - 'CLASS' => 'Sabre\\VObject\\Property\\FlatText', // Removed in vCard 4.0 + 'CATEGORIES' => VObject\Property\Text::class, + 'SORT-STRING' => VObject\Property\FlatText::class, + 'PRODID' => VObject\Property\FlatText::class, + 'NICKNAME' => VObject\Property\Text::class, + 'CLASS' => VObject\Property\FlatText::class, // Removed in vCard 4.0 // rfc2739 properties - 'FBURL' => 'Sabre\\VObject\\Property\\Uri', - 'CAPURI' => 'Sabre\\VObject\\Property\\Uri', - 'CALURI' => 'Sabre\\VObject\\Property\\Uri', - 'CALADRURI' => 'Sabre\\VObject\\Property\\Uri', + 'FBURL' => VObject\Property\Uri::class, + 'CAPURI' => VObject\Property\Uri::class, + 'CALURI' => VObject\Property\Uri::class, + 'CALADRURI' => VObject\Property\Uri::class, // rfc4770 properties - 'IMPP' => 'Sabre\\VObject\\Property\\Uri', + 'IMPP' => VObject\Property\Uri::class, // vCard 4.0 properties - 'SOURCE' => 'Sabre\\VObject\\Property\\Uri', - 'XML' => 'Sabre\\VObject\\Property\\FlatText', - 'ANNIVERSARY' => 'Sabre\\VObject\\Property\\VCard\\DateAndOrTime', - 'CLIENTPIDMAP' => 'Sabre\\VObject\\Property\\Text', - 'LANG' => 'Sabre\\VObject\\Property\\VCard\\LanguageTag', - 'GENDER' => 'Sabre\\VObject\\Property\\Text', - 'KIND' => 'Sabre\\VObject\\Property\\FlatText', - 'MEMBER' => 'Sabre\\VObject\\Property\\Uri', - 'RELATED' => 'Sabre\\VObject\\Property\\Uri', + 'SOURCE' => VObject\Property\Uri::class, + 'XML' => VObject\Property\FlatText::class, + 'ANNIVERSARY' => VObject\Property\VCard\DateAndOrTime::class, + 'CLIENTPIDMAP' => VObject\Property\Text::class, + 'LANG' => VObject\Property\VCard\LanguageTag::class, + 'GENDER' => VObject\Property\Text::class, + 'KIND' => VObject\Property\FlatText::class, + 'MEMBER' => VObject\Property\Uri::class, + 'RELATED' => VObject\Property\Uri::class, // rfc6474 properties - 'BIRTHPLACE' => 'Sabre\\VObject\\Property\\FlatText', - 'DEATHPLACE' => 'Sabre\\VObject\\Property\\FlatText', - 'DEATHDATE' => 'Sabre\\VObject\\Property\\VCard\\DateAndOrTime', + 'BIRTHPLACE' => VObject\Property\FlatText::class, + 'DEATHPLACE' => VObject\Property\FlatText::class, + 'DEATHDATE' => VObject\Property\VCard\DateAndOrTime::class, // rfc6715 properties - 'EXPERTISE' => 'Sabre\\VObject\\Property\\FlatText', - 'HOBBY' => 'Sabre\\VObject\\Property\\FlatText', - 'INTEREST' => 'Sabre\\VObject\\Property\\FlatText', - 'ORG-DIRECTORY' => 'Sabre\\VObject\\Property\\FlatText', + 'EXPERTISE' => VObject\Property\FlatText::class, + 'HOBBY' => VObject\Property\FlatText::class, + 'INTEREST' => VObject\Property\FlatText::class, + 'ORG-DIRECTORY' => VObject\Property\FlatText::class, ]; /** @@ -291,6 +291,11 @@ class VCard extends VObject\Document $this->FN = (string) $this->ORG; $repaired = true; + // Otherwise, the NICKNAME property may work + } elseif (isset($this->NICKNAME)) { + $this->FN = (string) $this->NICKNAME; + $repaired = true; + // Otherwise, the EMAIL property may work } elseif (isset($this->EMAIL)) { $this->FN = (string) $this->EMAIL; @@ -373,7 +378,7 @@ class VCard extends VObject\Document /** * Returns a preferred field. * - * VCards can indicate wether a field such as ADR, TEL or EMAIL is + * VCards can indicate whether a field such as ADR, TEL or EMAIL is * preferred by specifying TYPE=PREF (vcard 2.1, 3) or PREF=x (vcard 4, x * being a number between 1 and 100). * @@ -445,6 +450,7 @@ class VCard extends VObject\Document * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { // A vcard does not have sub-components, so we're overriding this @@ -526,8 +532,8 @@ class VCard extends VObject\Document $className = parent::getClassNameForPropertyName($propertyName); // In vCard 4, BINARY no longer exists, and we need URI instead. - if ('Sabre\\VObject\\Property\\Binary' == $className && self::VCARD40 === $this->getDocumentType()) { - return 'Sabre\\VObject\\Property\\Uri'; + if (VObject\Property\Binary::class == $className && self::VCARD40 === $this->getDocumentType()) { + return VObject\Property\Uri::class; } return $className; diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VEvent.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VEvent.php index 4a53a7561ab..6ea93ed5ef1 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VEvent.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VEvent.php @@ -25,9 +25,6 @@ class VEvent extends VObject\Component * The rules used to determine if an event falls within the specified * time-range is based on the CalDAV specification. * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * * @return bool */ public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VFreeBusy.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VFreeBusy.php index 558a8523316..fef418b53a1 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VFreeBusy.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VFreeBusy.php @@ -21,9 +21,6 @@ class VFreeBusy extends VObject\Component * Checks based on the contained FREEBUSY information, if a timeslot is * available. * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * * @return bool */ public function isFree(DateTimeInterface $start, DatetimeInterface $end) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VJournal.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VJournal.php index 9bd336776c1..9b7f1b87336 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VJournal.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VJournal.php @@ -23,9 +23,6 @@ class VJournal extends VObject\Component * The rules used to determine if an event falls within the specified * time-range is based on the CalDAV specification. * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * * @return bool */ public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Component/VTodo.php b/htdocs/includes/sabre/sabre/vobject/lib/Component/VTodo.php index 9de77e841f3..6f022ba6d57 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Component/VTodo.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Component/VTodo.php @@ -23,9 +23,6 @@ class VTodo extends VObject\Component * The rules used to determine if an event falls within the specified * time-range is based on the CalDAV specification. * - * @param DateTimeInterface $start - * @param DateTimeInterface $end - * * @return bool */ public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Document.php b/htdocs/includes/sabre/sabre/vobject/lib/Document.php index 0cb2e0978b5..14a77c911e2 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Document.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Document.php @@ -160,7 +160,7 @@ abstract class Document extends Component public function createComponent($name, array $children = null, $defaults = true) { $name = strtoupper($name); - $class = 'Sabre\\VObject\\Component'; + $class = Component::class; if (isset(static::$componentMap[$name])) { $class = static::$componentMap[$name]; @@ -258,7 +258,7 @@ abstract class Document extends Component if (isset(static::$propertyMap[$propertyName])) { return static::$propertyMap[$propertyName]; } else { - return 'Sabre\\VObject\\Property\\Unknown'; + return Property\Unknown::class; } } } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/ElementList.php b/htdocs/includes/sabre/sabre/vobject/lib/ElementList.php index 56058cbd5ac..860512649cc 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/ElementList.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/ElementList.php @@ -25,6 +25,7 @@ class ElementList extends ArrayIterator * @param int $offset * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw new LogicException('You can not add new objects to an ElementList'); @@ -37,6 +38,7 @@ class ElementList extends ArrayIterator * * @param int $offset */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw new LogicException('You can not remove objects from an ElementList'); diff --git a/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyData.php b/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyData.php index d05dfc799c9..4d9f441ceec 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyData.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyData.php @@ -84,7 +84,7 @@ class FreeBusyData 'type' => $type, ]; - $preceedingItem = $this->data[$insertStartIndex - 1]; + $precedingItem = $this->data[$insertStartIndex - 1]; if ($this->data[$insertStartIndex - 1]['start'] === $start) { // The old item starts at the exact same point as the new item. --$insertStartIndex; @@ -122,11 +122,11 @@ class FreeBusyData // between. if (-1 === $itemsToDelete) { $itemsToDelete = 0; - if ($newItem['end'] < $preceedingItem['end']) { + if ($newItem['end'] < $precedingItem['end']) { $newItems[] = [ 'start' => $newItem['end'] + 1, - 'end' => $preceedingItem['end'], - 'type' => $preceedingItem['type'], + 'end' => $precedingItem['end'], + 'type' => $precedingItem['type'], ]; } } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyGenerator.php b/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyGenerator.php index adb214c08fd..81b8126d55c 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyGenerator.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/FreeBusyGenerator.php @@ -109,8 +109,6 @@ class FreeBusyGenerator * for setting things like the METHOD, CALSCALE, VERSION, etc.. * * The VFREEBUSY object will be automatically added though. - * - * @param Document $vcalendar */ public function setBaseObject(Document $vcalendar) { @@ -119,8 +117,6 @@ class FreeBusyGenerator /** * Sets a VAVAILABILITY document. - * - * @param Document $vcalendar */ public function setVAvailability(Document $vcalendar) { @@ -130,7 +126,7 @@ class FreeBusyGenerator /** * Sets the input objects. * - * You must either specify a valendar object as a string, or as the parse + * You must either specify a vcalendar object as a string, or as the parse * Component. * It's also possible to specify multiple objects as an array. * @@ -176,8 +172,6 @@ class FreeBusyGenerator /** * Sets the reference timezone for floating times. - * - * @param DateTimeZone $timeZone */ public function setTimeZone(DateTimeZone $timeZone) { @@ -208,9 +202,6 @@ class FreeBusyGenerator /** * This method takes a VAVAILABILITY component and figures out all the * available times. - * - * @param FreeBusyData $fbData - * @param VCalendar $vavailability */ protected function calculateAvailability(FreeBusyData $fbData, VCalendar $vavailability) { @@ -363,8 +354,7 @@ class FreeBusyGenerator * This method takes an array of iCalendar objects and applies its busy * times on fbData. * - * @param FreeBusyData $fbData - * @param VCalendar[] $objects + * @param VCalendar[] $objects */ protected function calculateBusy(FreeBusyData $fbData, array $objects) { @@ -372,7 +362,6 @@ class FreeBusyGenerator foreach ($object->getBaseComponents() as $component) { switch ($component->name) { case 'VEVENT': - $FBTYPE = 'BUSY'; if (isset($component->TRANSP) && ('TRANSPARENT' === strtoupper($component->TRANSP))) { break; diff --git a/htdocs/includes/sabre/sabre/vobject/lib/ITip/Broker.php b/htdocs/includes/sabre/sabre/vobject/lib/ITip/Broker.php index ea27b3b3e76..b66a59f545f 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/ITip/Broker.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/ITip/Broker.php @@ -104,7 +104,6 @@ class Broker * * If the iTip message was not supported, we will always return false. * - * @param Message $itipMessage * @param VCalendar $existingObject * * @return VCalendar|null @@ -163,7 +162,7 @@ class Broker * * @return array */ - public function parseEvent($calendar = null, $userHref, $oldCalendar = null) + public function parseEvent($calendar, $userHref, $oldCalendar = null) { if ($oldCalendar) { if (is_string($oldCalendar)) { @@ -263,8 +262,6 @@ class Broker * This is message from an organizer, and is either a new event * invite, or an update to an existing one. * - * - * @param Message $itipMessage * @param VCalendar $existingObject * * @return VCalendar|null @@ -300,7 +297,6 @@ class Broker * attendee got removed from an event, or an event got cancelled * altogether. * - * @param Message $itipMessage * @param VCalendar $existingObject * * @return VCalendar|null @@ -326,7 +322,6 @@ class Broker * The message is a reply. This is for example an attendee telling * an organizer he accepted the invite, or declined it. * - * @param Message $itipMessage * @param VCalendar $existingObject * * @return VCalendar|null @@ -452,10 +447,6 @@ class Broker * We will detect which attendees got added, which got removed and create * specific messages for these situations. * - * @param VCalendar $calendar - * @param array $eventInfo - * @param array $oldEventInfo - * * @return array */ protected function parseEventForOrganizer(VCalendar $calendar, array $eventInfo, array $oldEventInfo) @@ -556,9 +547,13 @@ class Broker // properties changed in the event, or simply if there's a // difference in instances that the attendee is invited to. + $oldAttendeeInstances = array_keys($attendee['oldInstances']); + $newAttendeeInstances = array_keys($attendee['newInstances']); + $message->significantChange = 'REQUEST' === $attendee['forceSend'] || - array_keys($attendee['oldInstances']) != array_keys($attendee['newInstances']) || + count($oldAttendeeInstances) != count($newAttendeeInstances) || + count(array_diff($oldAttendeeInstances, $newAttendeeInstances)) > 0 || $oldEventInfo['significantChangeHash'] !== $eventInfo['significantChangeHash']; foreach ($attendee['newInstances'] as $instanceId => $instanceInfo) { @@ -620,10 +615,7 @@ class Broker * * This function figures out if we need to send a reply to an organizer. * - * @param VCalendar $calendar - * @param array $eventInfo - * @param array $oldEventInfo - * @param string $attendee + * @param string $attendee * * @return Message[] */ @@ -828,7 +820,10 @@ class Broker $instances = []; $exdate = []; + $significantChangeEventProperties = []; + foreach ($calendar->VEVENT as $vevent) { + $eventSignificantChangeHash = ''; $rrule = []; if (is_null($uid)) { @@ -942,19 +937,26 @@ class Broker if (isset($vevent->$prop)) { $propertyValues = $vevent->select($prop); - $significantChangeHash .= $prop.':'; + $eventSignificantChangeHash .= $prop.':'; if ('EXDATE' === $prop) { - $significantChangeHash .= implode(',', $exdate).';'; + $eventSignificantChangeHash .= implode(',', $exdate).';'; } elseif ('RRULE' === $prop) { - $significantChangeHash .= implode(',', $rrule).';'; + $eventSignificantChangeHash .= implode(',', $rrule).';'; } else { foreach ($propertyValues as $val) { - $significantChangeHash .= $val->getValue().';'; + $eventSignificantChangeHash .= $val->getValue().';'; } } } } + $significantChangeEventProperties[] = $eventSignificantChangeHash; + } + + asort($significantChangeEventProperties); + + foreach ($significantChangeEventProperties as $eventSignificantChangeHash) { + $significantChangeHash .= $eventSignificantChangeHash; } $significantChangeHash = md5($significantChangeHash); diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Node.php b/htdocs/includes/sabre/sabre/vobject/lib/Node.php index 154a7fac569..2041b2ac7b9 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Node.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Node.php @@ -73,6 +73,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @return array */ + #[\ReturnTypeWillChange] abstract public function jsonSerialize(); /** @@ -102,6 +103,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @return ElementList */ + #[\ReturnTypeWillChange] public function getIterator() { if (!is_null($this->iterator)) { @@ -115,8 +117,6 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * Sets the overridden iterator. * * Note that this is not actually part of the iterator interface - * - * @param ElementList $iterator */ public function setIterator(ElementList $iterator) { @@ -159,6 +159,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @return int */ + #[\ReturnTypeWillChange] public function count() { $it = $this->getIterator(); @@ -179,6 +180,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { $iterator = $this->getIterator(); @@ -195,6 +197,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { $iterator = $this->getIterator(); @@ -210,6 +213,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * @param int $offset * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $iterator = $this->getIterator(); @@ -230,6 +234,7 @@ abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \Js * * @param int $offset */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $iterator = $this->getIterator(); diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Parameter.php b/htdocs/includes/sabre/sabre/vobject/lib/Parameter.php index 2c9a8e7fd82..c27b2aa47cb 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Parameter.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Parameter.php @@ -52,11 +52,12 @@ class Parameter extends Node */ public function __construct(Document $root, $name, $value = null) { - $this->name = strtoupper($name); $this->root = $root; if (is_null($name)) { $this->noName = true; $this->name = static::guessParameterNameByValue($value); + } else { + $this->name = strtoupper($name); } // If guessParameterNameByValue() returns an empty string @@ -95,13 +96,11 @@ class Parameter extends Node case 'WORK': case 'HOME': case 'PREF': - // Delivery Label Type case 'DOM': case 'INTL': case 'POSTAL': case 'PARCEL': - // Telephone types case 'VOICE': case 'FAX': @@ -113,7 +112,6 @@ class Parameter extends Node case 'CAR': case 'ISDN': case 'VIDEO': - // EMAIL types (lol) case 'AOL': case 'APPLELINK': @@ -127,7 +125,6 @@ class Parameter extends Node case 'PRODIGY': case 'TLX': case 'X400': - // Photo / Logo format types case 'GIF': case 'CGM': @@ -143,12 +140,10 @@ class Parameter extends Node case 'MPEG2': case 'AVI': case 'QTIME': - // Sound Digital Audio Type case 'WAVE': case 'PCM': case 'AIFF': - // Key types case 'X509': case 'PGP': @@ -201,8 +196,6 @@ class Parameter extends Node /** * Sets multiple values for this parameter. - * - * @param array $value */ public function setParts(array $value) { @@ -301,7 +294,7 @@ class Parameter extends Node // https://tools.ietf.org/html/rfc6868 // // But we've found that iCal (7.0, shipped with OSX 10.9) - // severaly trips on + characters not being quoted, so we + // severely trips on + characters not being quoted, so we // added + as well. if (!preg_match('#(?: [\n":;\^,\+] )#x', $item)) { return $out.$item; @@ -329,6 +322,7 @@ class Parameter extends Node * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { return $this->value; @@ -362,6 +356,7 @@ class Parameter extends Node * * @return ElementList */ + #[\ReturnTypeWillChange] public function getIterator() { if (!is_null($this->iterator)) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Parser/Json.php b/htdocs/includes/sabre/sabre/vobject/lib/Parser/Json.php index 3fd307e9780..f3360320751 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Parser/Json.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Parser/Json.php @@ -7,6 +7,8 @@ use Sabre\VObject\Component\VCard; use Sabre\VObject\Document; use Sabre\VObject\EofException; use Sabre\VObject\ParseException; +use Sabre\VObject\Property\FlatText; +use Sabre\VObject\Property\Text; /** * Json Parser. @@ -87,8 +89,6 @@ class Json extends Parser /** * Parses a component. * - * @param array $jComp - * * @return \Sabre\VObject\Component */ public function parseComponent(array $jComp) @@ -124,8 +124,6 @@ class Json extends Parser /** * Parses properties. * - * @param array $jProp - * * @return \Sabre\VObject\Property */ public function parseProperty(array $jProp) @@ -160,8 +158,8 @@ class Json extends Parser // represents TEXT values. We have to normalize these here. In the // future we can get rid of FlatText once we're allowed to break BC // again. - if ('Sabre\VObject\Property\FlatText' === $defaultPropertyClass) { - $defaultPropertyClass = 'Sabre\VObject\Property\Text'; + if (FlatText::class === $defaultPropertyClass) { + $defaultPropertyClass = Text::class; } // If the value type we received (e.g.: TEXT) was not the default value diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Parser/MimeDir.php b/htdocs/includes/sabre/sabre/vobject/lib/Parser/MimeDir.php index ea5ac03260f..513f7bd0ca0 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Parser/MimeDir.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Parser/MimeDir.php @@ -167,7 +167,11 @@ class MimeDir extends Parser while (true) { // Reading until we hit END: - $line = $this->readLine(); + try { + $line = $this->readLine(); + } catch (EofException $oEx) { + $line = 'END:'.$this->root->name; + } if ('END:' === strtoupper(substr($line, 0, 4))) { break; } @@ -343,7 +347,7 @@ class MimeDir extends Parser ) (?=[;:,]) /xi"; - //echo $regex, "\n"; die(); + //echo $regex, "\n"; exit(); preg_match_all($regex, $line, $matches, PREG_SET_ORDER); $property = [ @@ -372,12 +376,22 @@ class MimeDir extends Parser $value = $this->unescapeParam($value); if (is_null($lastParam)) { + if ($this->options & self::OPTION_IGNORE_INVALID_LINES) { + // When the property can't be matched and the configuration + // option is set to ignore invalid lines, we ignore this line + // This can happen when servers provide faulty data as iCloud + // frequently does with X-APPLE-STRUCTURED-LOCATION + continue; + } throw new ParseException('Invalid Mimedir file. Line starting at '.$this->startLine.' did not follow iCalendar/vCard conventions'); } if (is_null($property['parameters'][$lastParam])) { $property['parameters'][$lastParam] = $value; } elseif (is_array($property['parameters'][$lastParam])) { $property['parameters'][$lastParam][] = $value; + } elseif ($property['parameters'][$lastParam] === $value) { + // When the current value of the parameter is the same as the + // new one, then we can leave the current parameter as it is. } else { $property['parameters'][$lastParam] = [ $property['parameters'][$lastParam], @@ -439,7 +453,7 @@ class MimeDir extends Parser $propObj->add(null, $namelessParameter); } - if ('QUOTED-PRINTABLE' === strtoupper($propObj['ENCODING'])) { + if (isset($propObj['ENCODING']) && 'QUOTED-PRINTABLE' === strtoupper($propObj['ENCODING'])) { $propObj->setQuotedPrintableValue($this->extractQuotedPrintableValue()); } else { $charset = $this->charset; @@ -450,10 +464,8 @@ class MimeDir extends Parser switch (strtolower($charset)) { case 'utf-8': break; - case 'iso-8859-1': - $property['value'] = utf8_encode($property['value']); - break; case 'windows-1252': + case 'iso-8859-1': $property['value'] = mb_convert_encoding($property['value'], 'UTF-8', $charset); break; default: @@ -518,7 +530,7 @@ class MimeDir extends Parser * * Now for the parameters * - * If delimiter is not set (null) this method will just return a string. + * If delimiter is not set (empty string) this method will just return a string. * If it's a comma or a semi-colon the string will be split on those * characters, and always return an array. * diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Parser/XML.php b/htdocs/includes/sabre/sabre/vobject/lib/Parser/XML.php index 90f262d9e20..78773173df1 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Parser/XML.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Parser/XML.php @@ -112,8 +112,6 @@ class XML extends Parser /** * Parse a xCalendar component. - * - * @param Component $parentComponent */ protected function parseVCalendarComponents(Component $parentComponent) { @@ -134,8 +132,6 @@ class XML extends Parser /** * Parse a xCard component. - * - * @param Component $parentComponent */ protected function parseVCardComponents(Component $parentComponent) { @@ -146,8 +142,7 @@ class XML extends Parser /** * Parse xCalendar and xCard properties. * - * @param Component $parentComponent - * @param string $propertyNamePrefix + * @param string $propertyNamePrefix */ protected function parseProperties(Component $parentComponent, $propertyNamePrefix = '') { @@ -302,8 +297,6 @@ class XML extends Parser /** * Parse a component. - * - * @param Component $parentComponent */ protected function parseComponent(Component $parentComponent) { @@ -327,11 +320,10 @@ class XML extends Parser /** * Create a property. * - * @param Component $parentComponent - * @param string $name - * @param array $parameters - * @param string $type - * @param mixed $value + * @param string $name + * @param array $parameters + * @param string $type + * @param mixed $value */ protected function createProperty(Component $parentComponent, $name, $parameters, $type, $value) { @@ -359,9 +351,9 @@ class XML extends Parser if (is_string($input)) { $reader = new SabreXml\Reader(); $reader->elementMap['{'.self::XCAL_NAMESPACE.'}period'] - = 'Sabre\VObject\Parser\XML\Element\KeyValue'; + = XML\Element\KeyValue::class; $reader->elementMap['{'.self::XCAL_NAMESPACE.'}recur'] - = 'Sabre\VObject\Parser\XML\Element\KeyValue'; + = XML\Element\KeyValue::class; $reader->xml($input); $input = $reader->parse(); } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property.php b/htdocs/includes/sabre/sabre/vobject/lib/Property.php index 6105cb0f07a..56096dafea6 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property.php @@ -30,7 +30,7 @@ abstract class Property extends Node * * This is only used in vcards * - * @var string + * @var string|null */ public $group; @@ -52,7 +52,7 @@ abstract class Property extends Node * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ public $delimiter = ';'; @@ -123,8 +123,6 @@ abstract class Property extends Node /** * Sets a multi-valued property. - * - * @param array $parts */ public function setParts(array $parts) { @@ -262,8 +260,6 @@ abstract class Property extends Node * Sets the JSON value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { @@ -280,6 +276,7 @@ abstract class Property extends Node * * @return array */ + #[\ReturnTypeWillChange] public function jsonSerialize() { $parameters = []; @@ -309,8 +306,6 @@ abstract class Property extends Node /** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. - * - * @param array $value */ public function setXmlValue(array $value) { @@ -393,6 +388,7 @@ abstract class Property extends Node * * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($name) { if (is_int($name)) { @@ -419,6 +415,7 @@ abstract class Property extends Node * * @return Node */ + #[\ReturnTypeWillChange] public function offsetGet($name) { if (is_int($name)) { @@ -439,6 +436,7 @@ abstract class Property extends Node * @param string $name * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($name, $value) { if (is_int($name)) { @@ -459,6 +457,7 @@ abstract class Property extends Node * * @param string $name */ + #[\ReturnTypeWillChange] public function offsetUnset($name) { if (is_int($name)) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/Binary.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/Binary.php index 830dd902887..1262dd054ed 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/Binary.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/Binary.php @@ -24,9 +24,9 @@ class Binary extends Property * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Updates the current value. @@ -100,8 +100,6 @@ class Binary extends Property * Sets the json value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/Boolean.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/Boolean.php index 0e7bc666e23..4bd6ffdfe22 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/Boolean.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/Boolean.php @@ -2,8 +2,7 @@ namespace Sabre\VObject\Property; -use - Sabre\VObject\Property; +use Sabre\VObject\Property; /** * Boolean property. @@ -59,8 +58,6 @@ class Boolean extends Property /** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. - * - * @param array $value */ public function setXmlValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/FloatValue.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/FloatValue.php index 208d7451656..e780ae6c172 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/FloatValue.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/FloatValue.php @@ -21,7 +21,7 @@ class FloatValue extends Property * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ public $delimiter = ';'; @@ -93,8 +93,6 @@ class FloatValue extends Property /** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. - * - * @param array $value */ public function setXmlValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/CalAddress.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/CalAddress.php index e89bb31f960..c90967d7939 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/CalAddress.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/CalAddress.php @@ -2,8 +2,7 @@ namespace Sabre\VObject\Property\ICalendar; -use - Sabre\VObject\Property\Text; +use Sabre\VObject\Property\Text; /** * CalAddress property. @@ -20,9 +19,9 @@ class CalAddress extends Text * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. @@ -54,7 +53,11 @@ class CalAddress extends Text return $input; } list($schema, $everythingElse) = explode(':', $input, 2); + $schema = strtolower($schema); + if ('mailto' === $schema) { + $everythingElse = strtolower($everythingElse); + } - return strtolower($schema).':'.$everythingElse; + return $schema.':'.$everythingElse; } } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/DateTime.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/DateTime.php index 7eb3e0bb78f..ca71633b946 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/DateTime.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/DateTime.php @@ -38,8 +38,6 @@ class DateTime extends Property * Sets a multi-valued property. * * You may also specify DateTime objects here. - * - * @param array $parts */ public function setParts(array $parts) { @@ -175,7 +173,6 @@ class DateTime extends Property /** * Sets the property as a DateTime object. * - * @param DateTimeInterface $dt * @param bool isFloating If set to true, timezones will be ignored */ public function setDateTime(DateTimeInterface $dt, $isFloating = false) @@ -187,7 +184,7 @@ class DateTime extends Property * Sets the property as multiple date-time objects. * * The first value will be used as a reference for the timezones, and all - * the otehr values will be adjusted for that timezone + * the other values will be adjusted for that timezone * * @param DateTimeInterface[] $dt * @param bool isFloating If set to true, timezones will be ignored @@ -279,8 +276,6 @@ class DateTime extends Property * Sets the json value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { @@ -305,6 +300,7 @@ class DateTime extends Property * @param string $name * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($name, $value) { parent::offsetSet($name, $value); @@ -343,8 +339,8 @@ class DateTime extends Property $messages = parent::validate($options); $valueType = $this->getValueType(); $values = $this->getParts(); - try { - foreach ($values as $value) { + foreach ($values as $value) { + try { switch ($valueType) { case 'DATE': DateTimeParser::parseDate($value); @@ -353,13 +349,14 @@ class DateTime extends Property DateTimeParser::parseDateTime($value); break; } + } catch (InvalidDataException $e) { + $messages[] = [ + 'level' => 3, + 'message' => 'The supplied value ('.$value.') is not a correct '.$valueType, + 'node' => $this, + ]; + break; } - } catch (InvalidDataException $e) { - $messages[] = [ - 'level' => 3, - 'message' => 'The supplied value ('.$value.') is not a correct '.$valueType, - 'node' => $this, - ]; } return $messages; diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Duration.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Duration.php index 87f00816061..e18fe191e4a 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Duration.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Duration.php @@ -22,7 +22,7 @@ class Duration extends Property * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ public $delimiter = ','; diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Period.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Period.php index 17bfa5c5c6f..ae8a78911e3 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Period.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Period.php @@ -23,7 +23,7 @@ class Period extends Property * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ public $delimiter = ','; @@ -67,8 +67,6 @@ class Period extends Property * Sets the json value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Recur.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Recur.php index baeda781e90..3d632fec141 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Recur.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/ICalendar/Recur.php @@ -88,8 +88,6 @@ class Recur extends Property /** * Sets a multi-valued property. - * - * @param array $parts */ public function setParts(array $parts) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/IntegerValue.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/IntegerValue.php index 24a46fb07ca..3ae775214ec 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/IntegerValue.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/IntegerValue.php @@ -2,8 +2,7 @@ namespace Sabre\VObject\Property; -use - Sabre\VObject\Property; +use Sabre\VObject\Property; /** * Integer property. @@ -68,8 +67,6 @@ class IntegerValue extends Property /** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. - * - * @param array $value */ public function setXmlValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/Text.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/Text.php index ac8aa066b32..16d2c07f4c4 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/Text.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/Text.php @@ -136,16 +136,18 @@ class Text extends Property } foreach ($item as &$subItem) { - $subItem = strtr( - $subItem, - [ - '\\' => '\\\\', - ';' => '\;', - ',' => '\,', - "\n" => '\n', - "\r" => '', - ] - ); + if (!is_null($subItem)) { + $subItem = strtr( + $subItem, + [ + '\\' => '\\\\', + ';' => '\;', + ',' => '\,', + "\n" => '\n', + "\r" => '', + ] + ); + } } $item = implode(',', $item); } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/Time.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/Time.php index 7aeafc8d08d..1b81609aa38 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/Time.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/Time.php @@ -19,9 +19,9 @@ class Time extends Text * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. @@ -40,8 +40,6 @@ class Time extends Text * Sets the JSON value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { @@ -119,8 +117,6 @@ class Time extends Text /** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. - * - * @param array $value */ public function setXmlValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/Uri.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/Uri.php index 830cd3f1892..1ad1fb1997b 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/Uri.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/Uri.php @@ -20,9 +20,9 @@ class Uri extends Text * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/UtcOffset.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/UtcOffset.php index 732239e2307..04b88447fc8 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/UtcOffset.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/UtcOffset.php @@ -17,9 +17,9 @@ class UtcOffset extends Text * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. @@ -38,8 +38,6 @@ class UtcOffset extends Text * Sets the JSON value, as it would appear in a jCard or jCal object. * * The value must always be an array. - * - * @param array $value */ public function setJsonValue(array $value) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/Date.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/Date.php index a018ccbb8dc..fc679d5722a 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/Date.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/Date.php @@ -28,8 +28,6 @@ class Date extends DateAndOrTime /** * Sets the property as a DateTime object. - * - * @param \DateTimeInterface $dt */ public function setDateTime(\DateTimeInterface $dt) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/DateAndOrTime.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/DateAndOrTime.php index b7e17492a6e..7bf79c48cea 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/DateAndOrTime.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/DateAndOrTime.php @@ -24,9 +24,9 @@ class DateAndOrTime extends Property /** * Field separator. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. @@ -45,8 +45,6 @@ class DateAndOrTime extends Property * Sets a multi-valued property. * * You may also specify DateTimeInterface objects here. - * - * @param array $parts */ public function setParts(array $parts) { @@ -80,8 +78,6 @@ class DateAndOrTime extends Property /** * Sets the property as a DateTime object. - * - * @param DateTimeInterface $dt */ public function setDateTime(DateTimeInterface $dt) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/LanguageTag.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/LanguageTag.php index 697273989f9..318ea02315d 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/LanguageTag.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/LanguageTag.php @@ -2,8 +2,7 @@ namespace Sabre\VObject\Property\VCard; -use - Sabre\VObject\Property; +use Sabre\VObject\Property; /** * LanguageTag property. diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/TimeStamp.php b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/TimeStamp.php index fccf2d600a5..da6ea3d4451 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/TimeStamp.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Property/VCard/TimeStamp.php @@ -21,9 +21,9 @@ class TimeStamp extends Text * In case this is a multi-value property. This string will be used as a * delimiter. * - * @var string|null + * @var string */ - public $delimiter = null; + public $delimiter = ''; /** * Returns the type of value. diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Recur/EventIterator.php b/htdocs/includes/sabre/sabre/vobject/lib/Recur/EventIterator.php index 135ecf00e4f..61f05d7de3c 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Recur/EventIterator.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Recur/EventIterator.php @@ -83,7 +83,7 @@ class EventIterator implements \Iterator * 2. You can pass an array of VEVENTs (all UIDS should match). * 3. You can pass a single VEVENT component. * - * Only the second method is recomended. The other 1 and 3 will be removed + * Only the second method is recommended. The other 1 and 3 will be removed * at some point in the future. * * The $uid parameter is only required for the first method. @@ -198,6 +198,7 @@ class EventIterator implements \Iterator * * @return DateTimeImmutable */ + #[\ReturnTypeWillChange] public function current() { if ($this->currentDate) { @@ -229,9 +230,13 @@ class EventIterator implements \Iterator if (!$this->valid()) { return; } - $end = clone $this->currentDate; + if ($this->currentOverriddenEvent && $this->currentOverriddenEvent->DTEND) { + return $this->currentOverriddenEvent->DTEND->getDateTime($this->timeZone); + } else { + $end = clone $this->currentDate; - return $end->modify('+'.$this->eventDuration.' seconds'); + return $end->modify('+'.$this->eventDuration.' seconds'); + } } /** @@ -281,6 +286,7 @@ class EventIterator implements \Iterator * * @return int */ + #[\ReturnTypeWillChange] public function key() { // The counter is always 1 ahead. @@ -293,6 +299,7 @@ class EventIterator implements \Iterator * * @return bool */ + #[\ReturnTypeWillChange] public function valid() { if ($this->counter > Settings::$maxRecurrences && -1 !== Settings::$maxRecurrences) { @@ -304,7 +311,10 @@ class EventIterator implements \Iterator /** * Sets the iterator back to the starting point. + * + * @return void */ + #[\ReturnTypeWillChange] public function rewind() { $this->recurIterator->rewind(); @@ -327,7 +337,10 @@ class EventIterator implements \Iterator /** * Advances the iterator with one step. + * + * @return void */ + #[\ReturnTypeWillChange] public function next() { $this->currentOverriddenEvent = null; @@ -380,8 +393,6 @@ class EventIterator implements \Iterator /** * Quickly jump to a date in the future. - * - * @param DateTimeInterface $dateTime */ public function fastForward(DateTimeInterface $dateTime) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Recur/RDateIterator.php b/htdocs/includes/sabre/sabre/vobject/lib/Recur/RDateIterator.php index 013694b953e..5d56657faba 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Recur/RDateIterator.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Recur/RDateIterator.php @@ -24,8 +24,7 @@ class RDateIterator implements Iterator /** * Creates the Iterator. * - * @param string|array $rrule - * @param DateTimeInterface $start + * @param string|array $rrule */ public function __construct($rrule, DateTimeInterface $start) { @@ -36,6 +35,7 @@ class RDateIterator implements Iterator /* Implementation of the Iterator interface {{{ */ + #[\ReturnTypeWillChange] public function current() { if (!$this->valid()) { @@ -50,6 +50,7 @@ class RDateIterator implements Iterator * * @return int */ + #[\ReturnTypeWillChange] public function key() { return $this->counter; @@ -61,6 +62,7 @@ class RDateIterator implements Iterator * * @return bool */ + #[\ReturnTypeWillChange] public function valid() { return $this->counter <= count($this->dates); @@ -68,7 +70,10 @@ class RDateIterator implements Iterator /** * Resets the iterator. + * + * @return void */ + #[\ReturnTypeWillChange] public function rewind() { $this->currentDate = clone $this->startDate; @@ -77,7 +82,10 @@ class RDateIterator implements Iterator /** * Goes on to the next iteration. + * + * @return void */ + #[\ReturnTypeWillChange] public function next() { ++$this->counter; @@ -107,8 +115,6 @@ class RDateIterator implements Iterator /** * This method allows you to quickly go to the next occurrence after the * specified date. - * - * @param DateTimeInterface $dt */ public function fastForward(DateTimeInterface $dt) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Recur/RRuleIterator.php b/htdocs/includes/sabre/sabre/vobject/lib/Recur/RRuleIterator.php index 7bd4b086e7a..4f0e9070d38 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Recur/RRuleIterator.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Recur/RRuleIterator.php @@ -24,11 +24,17 @@ use Sabre\VObject\Property; */ class RRuleIterator implements Iterator { + /** + * Constant denoting the upper limit on how long into the future + * we want to iterate. The value is a unix timestamp and currently + * corresponds to the datetime 9999-12-31 11:59:59 UTC. + */ + const dateUpperLimit = 253402300799; + /** * Creates the Iterator. * - * @param string|array $rrule - * @param DateTimeInterface $start + * @param string|array $rrule */ public function __construct($rrule, DateTimeInterface $start) { @@ -39,6 +45,7 @@ class RRuleIterator implements Iterator /* Implementation of the Iterator interface {{{ */ + #[\ReturnTypeWillChange] public function current() { if (!$this->valid()) { @@ -53,6 +60,7 @@ class RRuleIterator implements Iterator * * @return int */ + #[\ReturnTypeWillChange] public function key() { return $this->counter; @@ -65,6 +73,7 @@ class RRuleIterator implements Iterator * * @return bool */ + #[\ReturnTypeWillChange] public function valid() { if (null === $this->currentDate) { @@ -79,7 +88,10 @@ class RRuleIterator implements Iterator /** * Resets the iterator. + * + * @return void */ + #[\ReturnTypeWillChange] public function rewind() { $this->currentDate = clone $this->startDate; @@ -88,7 +100,10 @@ class RRuleIterator implements Iterator /** * Goes on to the next iteration. + * + * @return void */ + #[\ReturnTypeWillChange] public function next() { // Otherwise, we find the next event in the normal RRULE @@ -132,8 +147,6 @@ class RRuleIterator implements Iterator /** * This method allows you to quickly go to the next occurrence after the * specified date. - * - * @param DateTimeInterface $dt */ public function fastForward(DateTimeInterface $dt) { @@ -325,14 +338,17 @@ class RRuleIterator implements Iterator return; } + $recurrenceHours = []; if (!empty($this->byHour)) { $recurrenceHours = $this->getHours(); } + $recurrenceDays = []; if (!empty($this->byDay)) { $recurrenceDays = $this->getDays(); } + $recurrenceMonths = []; if (!empty($this->byMonth)) { $recurrenceMonths = $this->getMonths(); } @@ -357,6 +373,12 @@ class RRuleIterator implements Iterator // Current hour of the day $currentHour = $this->currentDate->format('G'); + + if ($this->currentDate->getTimestamp() > self::dateUpperLimit) { + $this->currentDate = null; + + return; + } } while ( ($this->byDay && !in_array($currentDay, $recurrenceDays)) || ($this->byHour && !in_array($currentHour, $recurrenceHours)) || @@ -375,10 +397,12 @@ class RRuleIterator implements Iterator return; } + $recurrenceHours = []; if ($this->byHour) { $recurrenceHours = $this->getHours(); } + $recurrenceDays = []; if ($this->byDay) { $recurrenceDays = $this->getDays(); } @@ -439,6 +463,7 @@ class RRuleIterator implements Iterator return; } + $occurrence = -1; while (true) { $occurrences = $this->getMonthlyOccurrences(); @@ -465,9 +490,16 @@ class RRuleIterator implements Iterator // beginning. $currentDayOfMonth = 0; + // For some reason the "until" parameter was not being used here, + // that's why the workaround of the 10000 year bug was needed at all + // let's stop it before the "until" parameter date + if ($this->until && $this->currentDate->getTimestamp() >= $this->until->getTimestamp()) { + return; + } + // To prevent running this forever (better: until we hit the max date of DateTimeImmutable) we simply // stop at 9999-12-31. Looks like the year 10000 problem is not solved in php .... - if ($this->currentDate->getTimestamp() > 253402300799) { + if ($this->currentDate->getTimestamp() > self::dateUpperLimit) { $this->currentDate = null; return; @@ -533,7 +565,7 @@ class RRuleIterator implements Iterator foreach ($this->byWeekNo as $byWeekNo) { foreach ($dayOffsets as $dayOffset) { $date = clone $this->currentDate; - $date->setISODate($currentYear, $byWeekNo, $dayOffset); + $date = $date->setISODate($currentYear, $byWeekNo, $dayOffset); if ($date > $this->currentDate) { $checkDates[] = $date; @@ -570,11 +602,12 @@ class RRuleIterator implements Iterator // loop through all YearDay and Days to check all the combinations foreach ($this->byYearDay as $byYearDay) { $date = clone $this->currentDate; - $date = $date->setDate($currentYear, 1, 1); if ($byYearDay > 0) { - $date = $date->add(new \DateInterval('P'.$byYearDay.'D')); + $date = $date->setDate($currentYear, 1, 1); + $date = $date->add(new \DateInterval('P'.($byYearDay - 1).'D')); } else { - $date = $date->sub(new \DateInterval('P'.abs($byYearDay).'D')); + $date = $date->setDate($currentYear, 12, 31); + $date = $date->sub(new \DateInterval('P'.abs($byYearDay + 1).'D')); } if ($date > $this->currentDate && in_array($date->format('N'), $dayOffsets)) { @@ -608,6 +641,7 @@ class RRuleIterator implements Iterator // If we got a byDay or getMonthDay filter, we must first expand // further. if ($this->byDay || $this->byMonthDay) { + $occurrence = -1; while (true) { $occurrences = $this->getMonthlyOccurrences(); @@ -638,6 +672,14 @@ class RRuleIterator implements Iterator (int) $currentMonth, (int) $currentDayOfMonth ); + + // To prevent running this forever (better: until we hit the max date of DateTimeImmutable) we simply + // stop at 9999-12-31. Looks like the year 10000 problem is not solved in php .... + if ($this->currentDate->getTimestamp() > self::dateUpperLimit) { + $this->currentDate = null; + + return; + } } // If we made it here, it means we got a valid occurrence @@ -713,7 +755,6 @@ class RRuleIterator implements Iterator break; case 'INTERVAL': - case 'COUNT': $val = (int) $value; if ($val < 1) { @@ -873,7 +914,7 @@ class RRuleIterator implements Iterator foreach ($this->byMonthDay as $monthDay) { // Removing values that are out of range for this month if ($monthDay > $startDate->format('t') || - $monthDay < 0 - $startDate->format('t')) { + $monthDay < 0 - $startDate->format('t')) { continue; } if ($monthDay > 0) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/StringUtil.php b/htdocs/includes/sabre/sabre/vobject/lib/StringUtil.php index 2333d6ab9d7..b04539e4ad1 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/StringUtil.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/StringUtil.php @@ -40,23 +40,11 @@ class StringUtil */ public static function convertToUTF8($str) { - $encoding = mb_detect_encoding($str, ['UTF-8', 'ISO-8859-1', 'WINDOWS-1252'], true); - - switch ($encoding) { - case 'ISO-8859-1': - $newStr = utf8_encode($str); - break; - /* Unreachable code. Not sure yet how we can improve this - * situation. - case 'WINDOWS-1252' : - $newStr = iconv('cp1252', 'UTF-8', $str); - break; - */ - default: - $newStr = $str; + if (!mb_check_encoding($str, 'UTF-8') && mb_check_encoding($str, 'ISO-8859-1')) { + $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1'); } // Removing any control characters - return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $newStr); + return preg_replace('%(?:[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', '', $str); } } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimeZoneUtil.php b/htdocs/includes/sabre/sabre/vobject/lib/TimeZoneUtil.php index 2c407fee63b..6422c093040 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/TimeZoneUtil.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimeZoneUtil.php @@ -2,6 +2,16 @@ namespace Sabre\VObject; +use DateTimeZone; +use InvalidArgumentException; +use Sabre\VObject\TimezoneGuesser\FindFromOffset; +use Sabre\VObject\TimezoneGuesser\FindFromTimezoneIdentifier; +use Sabre\VObject\TimezoneGuesser\FindFromTimezoneMap; +use Sabre\VObject\TimezoneGuesser\GuessFromLicEntry; +use Sabre\VObject\TimezoneGuesser\GuessFromMsTzId; +use Sabre\VObject\TimezoneGuesser\TimezoneFinder; +use Sabre\VObject\TimezoneGuesser\TimezoneGuesser; + /** * Time zone name translation. * @@ -14,17 +24,136 @@ namespace Sabre\VObject; */ class TimeZoneUtil { + /** @var self */ + private static $instance = null; + + /** @var TimezoneGuesser[] */ + private $timezoneGuessers = []; + + /** @var TimezoneFinder[] */ + private $timezoneFinders = []; + + private function __construct() + { + $this->addGuesser('lic', new GuessFromLicEntry()); + $this->addGuesser('msTzId', new GuessFromMsTzId()); + $this->addFinder('tzid', new FindFromTimezoneIdentifier()); + $this->addFinder('tzmap', new FindFromTimezoneMap()); + $this->addFinder('offset', new FindFromOffset()); + } + + private static function getInstance(): self + { + if (null === self::$instance) { + self::$instance = new self(); + } + + return self::$instance; + } + + private function addGuesser(string $key, TimezoneGuesser $guesser): void + { + $this->timezoneGuessers[$key] = $guesser; + } + + private function addFinder(string $key, TimezoneFinder $finder): void + { + $this->timezoneFinders[$key] = $finder; + } + + /** + * This method will try to find out the correct timezone for an iCalendar + * date-time value. + * + * You must pass the contents of the TZID parameter, as well as the full + * calendar. + * + * If the lookup fails, this method will return the default PHP timezone + * (as configured using date_default_timezone_set, or the date.timezone ini + * setting). + * + * Alternatively, if $failIfUncertain is set to true, it will throw an + * exception if we cannot accurately determine the timezone. + */ + private function findTimeZone(string $tzid, Component $vcalendar = null, bool $failIfUncertain = false): DateTimeZone + { + foreach ($this->timezoneFinders as $timezoneFinder) { + $timezone = $timezoneFinder->find($tzid, $failIfUncertain); + if (!$timezone instanceof DateTimeZone) { + continue; + } + + return $timezone; + } + + if ($vcalendar) { + // If that didn't work, we will scan VTIMEZONE objects + foreach ($vcalendar->select('VTIMEZONE') as $vtimezone) { + if ((string) $vtimezone->TZID === $tzid) { + foreach ($this->timezoneGuessers as $timezoneGuesser) { + $timezone = $timezoneGuesser->guess($vtimezone, $failIfUncertain); + if (!$timezone instanceof DateTimeZone) { + continue; + } + + return $timezone; + } + } + } + } + + if ($failIfUncertain) { + throw new InvalidArgumentException('We were unable to determine the correct PHP timezone for tzid: '.$tzid); + } + + // If we got all the way here, we default to whatever has been set as the PHP default timezone. + return new DateTimeZone(date_default_timezone_get()); + } + + public static function addTimezoneGuesser(string $key, TimezoneGuesser $guesser): void + { + self::getInstance()->addGuesser($key, $guesser); + } + + public static function addTimezoneFinder(string $key, TimezoneFinder $finder): void + { + self::getInstance()->addFinder($key, $finder); + } + + /** + * @param string $tzid + * @param false $failIfUncertain + * + * @return DateTimeZone + */ + public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false) + { + return self::getInstance()->findTimeZone($tzid, $vcalendar, $failIfUncertain); + } + + public static function clean(): void + { + self::$instance = null; + } + + // Keeping things for backwards compatibility + /** + * @var array|null + * + * @deprecated + */ public static $map = null; /** * List of microsoft exchange timezone ids. * * Source: http://msdn.microsoft.com/en-us/library/aa563018(loband).aspx + * + * @deprecated */ public static $microsoftExchangeMap = [ 0 => 'UTC', 31 => 'Africa/Casablanca', - // Insanely, id #2 is used for both Europe/Lisbon, and Europe/Sarajevo. // I'm not even kidding.. We handle this special case in the // getTimeZone method. @@ -103,135 +232,11 @@ class TimeZoneUtil 39 => 'Pacific/Kwajalein', ]; - /** - * This method will try to find out the correct timezone for an iCalendar - * date-time value. - * - * You must pass the contents of the TZID parameter, as well as the full - * calendar. - * - * If the lookup fails, this method will return the default PHP timezone - * (as configured using date_default_timezone_set, or the date.timezone ini - * setting). - * - * Alternatively, if $failIfUncertain is set to true, it will throw an - * exception if we cannot accurately determine the timezone. - * - * @param string $tzid - * @param Sabre\VObject\Component $vcalendar - * - * @return \DateTimeZone - */ - public static function getTimeZone($tzid, Component $vcalendar = null, $failIfUncertain = false) - { - // First we will just see if the tzid is a support timezone identifier. - // - // The only exception is if the timezone starts with (. This is to - // handle cases where certain microsoft products generate timezone - // identifiers that for instance look like: - // - // (GMT+01.00) Sarajevo/Warsaw/Zagreb - // - // Since PHP 5.5.10, the first bit will be used as the timezone and - // this method will return just GMT+01:00. This is wrong, because it - // doesn't take DST into account. - if ('(' !== $tzid[0]) { - // PHP has a bug that logs PHP warnings even it shouldn't: - // https://bugs.php.net/bug.php?id=67881 - // - // That's why we're checking if we'll be able to successfully instantiate - // \DateTimeZone() before doing so. Otherwise we could simply instantiate - // and catch the exception. - $tzIdentifiers = \DateTimeZone::listIdentifiers(); - - try { - if ( - (in_array($tzid, $tzIdentifiers)) || - (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) || - (in_array($tzid, self::getIdentifiersBC())) - ) { - return new \DateTimeZone($tzid); - } - } catch (\Exception $e) { - } - } - - self::loadTzMaps(); - - // Next, we check if the tzid is somewhere in our tzid map. - if (isset(self::$map[$tzid])) { - return new \DateTimeZone(self::$map[$tzid]); - } - - // Some Microsoft products prefix the offset first, so let's strip that off - // and see if it is our tzid map. We don't want to check for this first just - // in case there are overrides in our tzid map. - if (preg_match('/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/', $tzid, $matches)) { - $tzidAlternate = $matches[3]; - if (isset(self::$map[$tzidAlternate])) { - return new \DateTimeZone(self::$map[$tzidAlternate]); - } - } - - // Maybe the author was hyper-lazy and just included an offset. We - // support it, but we aren't happy about it. - if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) { - // Note that the path in the source will never be taken from PHP 5.5.10 - // onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it - // already gets returned early in this function. Once we drop support - // for versions under PHP 5.5.10, this bit can be taken out of the - // source. - // @codeCoverageIgnoreStart - return new \DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0')); - // @codeCoverageIgnoreEnd - } - - if ($vcalendar) { - // If that didn't work, we will scan VTIMEZONE objects - foreach ($vcalendar->select('VTIMEZONE') as $vtimezone) { - if ((string) $vtimezone->TZID === $tzid) { - // Some clients add 'X-LIC-LOCATION' with the olson name. - if (isset($vtimezone->{'X-LIC-LOCATION'})) { - $lic = (string) $vtimezone->{'X-LIC-LOCATION'}; - - // Libical generators may specify strings like - // "SystemV/EST5EDT". For those we must remove the - // SystemV part. - if ('SystemV/' === substr($lic, 0, 8)) { - $lic = substr($lic, 8); - } - - return self::getTimeZone($lic, null, $failIfUncertain); - } - // Microsoft may add a magic number, which we also have an - // answer for. - if (isset($vtimezone->{'X-MICROSOFT-CDO-TZID'})) { - $cdoId = (int) $vtimezone->{'X-MICROSOFT-CDO-TZID'}->getValue(); - - // 2 can mean both Europe/Lisbon and Europe/Sarajevo. - if (2 === $cdoId && false !== strpos((string) $vtimezone->TZID, 'Sarajevo')) { - return new \DateTimeZone('Europe/Sarajevo'); - } - - if (isset(self::$microsoftExchangeMap[$cdoId])) { - return new \DateTimeZone(self::$microsoftExchangeMap[$cdoId]); - } - } - } - } - } - - if ($failIfUncertain) { - throw new \InvalidArgumentException('We were unable to determine the correct PHP timezone for tzid: '.$tzid); - } - - // If we got all the way here, we default to UTC. - return new \DateTimeZone(date_default_timezone_get()); - } - /** * This method will load in all the tz mapping information, if it's not yet * done. + * + * @deprecated */ public static function loadTzMaps() { @@ -257,6 +262,8 @@ class TimeZoneUtil * (See timezonedata/php-bc.php and timezonedata php-workaround.php) * * @return array + * + * @deprecated */ public static function getIdentifiersBC() { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php new file mode 100644 index 00000000000..990ac969291 --- /dev/null +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php @@ -0,0 +1,31 @@ +getIdentifiersBC())) + ) { + return new DateTimeZone($tzid); + } + } catch (Exception $e) { + } + + return null; + } + + /** + * This method returns an array of timezone identifiers, that are supported + * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers(). + * + * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because: + * - It's not supported by some PHP versions as well as HHVM. + * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions. + * (See timezonedata/php-bc.php and timezonedata php-workaround.php) + * + * @return array + */ + private function getIdentifiersBC() + { + return include __DIR__.'/../timezonedata/php-bc.php'; + } +} diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php new file mode 100644 index 00000000000..b52ba6a19c5 --- /dev/null +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php @@ -0,0 +1,78 @@ +hasTzInMap($tzid)) { + return new DateTimeZone($this->getTzFromMap($tzid)); + } + + // Some Microsoft products prefix the offset first, so let's strip that off + // and see if it is our tzid map. We don't want to check for this first just + // in case there are overrides in our tzid map. + foreach ($this->patterns as $pattern) { + if (!preg_match($pattern, $tzid, $matches)) { + continue; + } + $tzidAlternate = $matches[3]; + if ($this->hasTzInMap($tzidAlternate)) { + return new DateTimeZone($this->getTzFromMap($tzidAlternate)); + } + } + + return null; + } + + /** + * This method returns an array of timezone identifiers, that are supported + * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers(). + * + * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because: + * - It's not supported by some PHP versions as well as HHVM. + * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions. + * (See timezonedata/php-bc.php and timezonedata php-workaround.php) + * + * @return array + */ + private function getTzMaps() + { + if ([] === $this->map) { + $this->map = array_merge( + include __DIR__.'/../timezonedata/windowszones.php', + include __DIR__.'/../timezonedata/lotuszones.php', + include __DIR__.'/../timezonedata/exchangezones.php', + include __DIR__.'/../timezonedata/php-workaround.php' + ); + } + + return $this->map; + } + + private function getTzFromMap(string $tzid): string + { + return $this->getTzMaps()[$tzid]; + } + + private function hasTzInMap(string $tzid): bool + { + return isset($this->getTzMaps()[$tzid]); + } +} diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php new file mode 100644 index 00000000000..f340a396231 --- /dev/null +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php @@ -0,0 +1,33 @@ +{'X-LIC-LOCATION'})) { + return null; + } + + $lic = (string) $vtimezone->{'X-LIC-LOCATION'}; + + // Libical generators may specify strings like + // "SystemV/EST5EDT". For those we must remove the + // SystemV part. + if ('SystemV/' === substr($lic, 0, 8)) { + $lic = substr($lic, 8); + } + + return TimeZoneUtil::getTimeZone($lic, null, $failIfUncertain); + } +} diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php new file mode 100644 index 00000000000..b11ce1832c9 --- /dev/null +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromMsTzId.php @@ -0,0 +1,119 @@ + 'UTC', + 31 => 'Africa/Casablanca', + + // Insanely, id #2 is used for both Europe/Lisbon, and Europe/Sarajevo. + // I'm not even kidding.. We handle this special case in the + // getTimeZone method. + 2 => 'Europe/Lisbon', + 1 => 'Europe/London', + 4 => 'Europe/Berlin', + 6 => 'Europe/Prague', + 3 => 'Europe/Paris', + 69 => 'Africa/Luanda', // This was a best guess + 7 => 'Europe/Athens', + 5 => 'Europe/Bucharest', + 49 => 'Africa/Cairo', + 50 => 'Africa/Harare', + 59 => 'Europe/Helsinki', + 27 => 'Asia/Jerusalem', + 26 => 'Asia/Baghdad', + 74 => 'Asia/Kuwait', + 51 => 'Europe/Moscow', + 56 => 'Africa/Nairobi', + 25 => 'Asia/Tehran', + 24 => 'Asia/Muscat', // Best guess + 54 => 'Asia/Baku', + 48 => 'Asia/Kabul', + 58 => 'Asia/Yekaterinburg', + 47 => 'Asia/Karachi', + 23 => 'Asia/Calcutta', + 62 => 'Asia/Kathmandu', + 46 => 'Asia/Almaty', + 71 => 'Asia/Dhaka', + 66 => 'Asia/Colombo', + 61 => 'Asia/Rangoon', + 22 => 'Asia/Bangkok', + 64 => 'Asia/Krasnoyarsk', + 45 => 'Asia/Shanghai', + 63 => 'Asia/Irkutsk', + 21 => 'Asia/Singapore', + 73 => 'Australia/Perth', + 75 => 'Asia/Taipei', + 20 => 'Asia/Tokyo', + 72 => 'Asia/Seoul', + 70 => 'Asia/Yakutsk', + 19 => 'Australia/Adelaide', + 44 => 'Australia/Darwin', + 18 => 'Australia/Brisbane', + 76 => 'Australia/Sydney', + 43 => 'Pacific/Guam', + 42 => 'Australia/Hobart', + 68 => 'Asia/Vladivostok', + 41 => 'Asia/Magadan', + 17 => 'Pacific/Auckland', + 40 => 'Pacific/Fiji', + 67 => 'Pacific/Tongatapu', + 29 => 'Atlantic/Azores', + 53 => 'Atlantic/Cape_Verde', + 30 => 'America/Noronha', + 8 => 'America/Sao_Paulo', // Best guess + 32 => 'America/Argentina/Buenos_Aires', + 60 => 'America/Godthab', + 28 => 'America/St_Johns', + 9 => 'America/Halifax', + 33 => 'America/Caracas', + 65 => 'America/Santiago', + 35 => 'America/Bogota', + 10 => 'America/New_York', + 34 => 'America/Indiana/Indianapolis', + 55 => 'America/Guatemala', + 11 => 'America/Chicago', + 37 => 'America/Mexico_City', + 36 => 'America/Edmonton', + 38 => 'America/Phoenix', + 12 => 'America/Denver', // Best guess + 13 => 'America/Los_Angeles', // Best guess + 14 => 'America/Anchorage', + 15 => 'Pacific/Honolulu', + 16 => 'Pacific/Midway', + 39 => 'Pacific/Kwajalein', + ]; + + public function guess(VTimeZone $vtimezone, bool $throwIfUnsure = false): ?DateTimeZone + { + // Microsoft may add a magic number, which we also have an + // answer for. + if (!isset($vtimezone->{'X-MICROSOFT-CDO-TZID'})) { + return null; + } + $cdoId = (int) $vtimezone->{'X-MICROSOFT-CDO-TZID'}->getValue(); + + // 2 can mean both Europe/Lisbon and Europe/Sarajevo. + if (2 === $cdoId && false !== strpos((string) $vtimezone->TZID, 'Sarajevo')) { + return new DateTimeZone('Europe/Sarajevo'); + } + + if (isset(self::$microsoftExchangeMap[$cdoId])) { + return new DateTimeZone(self::$microsoftExchangeMap[$cdoId]); + } + + return null; + } +} diff --git a/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php new file mode 100644 index 00000000000..5aa880a1c39 --- /dev/null +++ b/htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/TimezoneFinder.php @@ -0,0 +1,10 @@ +createProperty('X-ADDRESSBOOKSERVER-KIND', 'GROUP'); break; } + } elseif ('MEMBER' === $property->name) { + $newProperty = $output->createProperty('X-ADDRESSBOOKSERVER-MEMBER', $property->getValue()); } } elseif (Document::VCARD40 === $targetVersion) { // These properties were removed in vCard 4.0 @@ -177,6 +175,9 @@ class VCardConverter $newProperty = $output->createProperty('KIND', 'GROUP'); } break; + case 'X-ADDRESSBOOKSERVER-MEMBER': + $newProperty = $output->createProperty('MEMBER', $property->getValue()); + break; case 'X-ANNIVERSARY': $newProperty->name = 'ANNIVERSARY'; // If we already have an anniversary property with the same @@ -245,8 +246,7 @@ class VCardConverter * * vCard 4.0 no longer supports BINARY properties. * - * @param Component\VCard $output - * @param Property\Uri $property the input property + * @param Property\Uri $property the input property * @param $parameters list of parameters that will eventually be added to * the new property * @@ -299,8 +299,7 @@ class VCardConverter * be valid in vCard 3.0 as well, we should convert those to BINARY if * possible, to improve compatibility. * - * @param Component\VCard $output - * @param Property\Uri $property the input property + * @param Property\Uri $property the input property * * @return Property\Binary|null */ @@ -347,9 +346,6 @@ class VCardConverter /** * Adds parameters to a new property for vCard 4.0. - * - * @param Property $newProperty - * @param array $parameters */ protected function convertParameters40(Property $newProperty, array $parameters) { @@ -386,9 +382,6 @@ class VCardConverter /** * Adds parameters to a new property for vCard 3.0. - * - * @param Property $newProperty - * @param array $parameters */ protected function convertParameters30(Property $newProperty, array $parameters) { diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Version.php b/htdocs/includes/sabre/sabre/vobject/lib/Version.php index e040dd4d95d..92882f2f1e2 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Version.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Version.php @@ -14,5 +14,5 @@ class Version /** * Full version number. */ - const VERSION = '4.2.2'; + const VERSION = '4.5.1'; } diff --git a/htdocs/includes/sabre/sabre/vobject/lib/Writer.php b/htdocs/includes/sabre/sabre/vobject/lib/Writer.php index c70a6ae4d4f..cbd22022e8c 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/Writer.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/Writer.php @@ -19,8 +19,6 @@ class Writer /** * Serializes a vCard or iCalendar object. * - * @param Component $component - * * @return string */ public static function write(Component $component) @@ -31,8 +29,7 @@ class Writer /** * Serializes a jCal or jCard object. * - * @param Component $component - * @param int $options + * @param int $options * * @return string */ @@ -44,8 +41,6 @@ class Writer /** * Serializes a xCal or xCard object. * - * @param Component $component - * * @return string */ public static function writeXml(Component $component) diff --git a/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/php-bc.php b/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/php-bc.php index 83f38f507f0..3116c6868e6 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/php-bc.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/php-bc.php @@ -147,7 +147,6 @@ return [ 'US/Michigan', 'US/Mountain', 'US/Pacific', - 'US/Pacific-New', 'US/Samoa', 'WET', ]; diff --git a/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/windowszones.php b/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/windowszones.php index af3904b122e..2049a95c185 100644 --- a/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/windowszones.php +++ b/htdocs/includes/sabre/sabre/vobject/lib/timezonedata/windowszones.php @@ -3,14 +3,14 @@ /** * Automatically generated timezone file. * - * Last update: 2016-08-24T17:35:38-04:00 - * Source: http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml + * Last update: 2020-12-13T17:38:12+05:45 + * Source: https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml * - * @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/). + * @copyright Copyright (C) fruux GmbH (https://fruux.com/). * @license http://sabre.io/license/ Modified BSD License */ -return [ +return [ 'AUS Central Standard Time' => 'Australia/Darwin', 'AUS Eastern Standard Time' => 'Australia/Sydney', 'Afghanistan Standard Time' => 'Asia/Kabul', @@ -74,6 +74,7 @@ return [ 'Line Islands Standard Time' => 'Pacific/Kiritimati', 'Lord Howe Standard Time' => 'Australia/Lord_Howe', 'Magadan Standard Time' => 'Asia/Magadan', + 'Magallanes Standard Time' => 'America/Punta_Arenas', 'Marquesas Standard Time' => 'Pacific/Marquesas', 'Mauritius Standard Time' => 'Indian/Mauritius', 'Middle East Standard Time' => 'Asia/Beirut', @@ -91,11 +92,13 @@ return [ 'North Asia East Standard Time' => 'Asia/Irkutsk', 'North Asia Standard Time' => 'Asia/Krasnoyarsk', 'North Korea Standard Time' => 'Asia/Pyongyang', + 'Omsk Standard Time' => 'Asia/Omsk', 'Pacific SA Standard Time' => 'America/Santiago', 'Pacific Standard Time' => 'America/Los_Angeles', 'Pacific Standard Time (Mexico)' => 'America/Tijuana', 'Pakistan Standard Time' => 'Asia/Karachi', 'Paraguay Standard Time' => 'America/Asuncion', + 'Qyzylorda Standard Time' => 'Asia/Qyzylorda', 'Romance Standard Time' => 'Europe/Paris', 'Russia Time Zone 10' => 'Asia/Srednekolymsk', 'Russia Time Zone 11' => 'Asia/Kamchatka', @@ -108,9 +111,12 @@ return [ 'Saint Pierre Standard Time' => 'America/Miquelon', 'Sakhalin Standard Time' => 'Asia/Sakhalin', 'Samoa Standard Time' => 'Pacific/Apia', + 'Sao Tome Standard Time' => 'Africa/Sao_Tome', + 'Saratov Standard Time' => 'Europe/Saratov', 'Singapore Standard Time' => 'Asia/Singapore', 'South Africa Standard Time' => 'Africa/Johannesburg', 'Sri Lanka Standard Time' => 'Asia/Colombo', + 'Sudan Standard Time' => 'Africa/Khartoum', 'Syria Standard Time' => 'Asia/Damascus', 'Taipei Standard Time' => 'Asia/Taipei', 'Tasmania Standard Time' => 'Australia/Hobart', @@ -125,6 +131,7 @@ return [ 'US Mountain Standard Time' => 'America/Phoenix', 'UTC' => 'Etc/GMT', 'UTC+12' => 'Etc/GMT-12', + 'UTC+13' => 'Etc/GMT-13', 'UTC-02' => 'Etc/GMT+2', 'UTC-08' => 'Etc/GMT+8', 'UTC-09' => 'Etc/GMT+9', @@ -132,6 +139,7 @@ return [ 'Ulaanbaatar Standard Time' => 'Asia/Ulaanbaatar', 'Venezuela Standard Time' => 'America/Caracas', 'Vladivostok Standard Time' => 'Asia/Vladivostok', + 'Volgograd Standard Time' => 'Europe/Volgograd', 'W. Australia Standard Time' => 'Australia/Perth', 'W. Central Africa Standard Time' => 'Africa/Lagos', 'W. Europe Standard Time' => 'Europe/Berlin', @@ -140,4 +148,5 @@ return [ 'West Bank Standard Time' => 'Asia/Hebron', 'West Pacific Standard Time' => 'Pacific/Port_Moresby', 'Yakutsk Standard Time' => 'Asia/Yakutsk', + 'Yukon Standard Time' => 'America/Whitehorse', ]; diff --git a/htdocs/includes/sabre/sabre/vobject/phpstan.neon b/htdocs/includes/sabre/sabre/vobject/phpstan.neon deleted file mode 100644 index e50c5be6e0d..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/phpstan.neon +++ /dev/null @@ -1,3 +0,0 @@ -parameters: - level: 0 - bootstrap: %currentWorkingDirectory%/vendor/autoload.php diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index ef728cde87b..8dffa42813b 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -466,3 +466,9 @@ ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -- VMYSQL4.1 DROP INDEX uk_commande_fournisseur_ref on llx_commande_fournisseur; -- VPGSQL8.2 DROP INDEX uk_commande_fournisseur_ref; ALTER TABLE llx_commande_fournisseur ADD UNIQUE INDEX uk_commande_fournisseur_ref (ref, entity); + +-- Drop the composite unique index that exists on llx_actioncomm to rebuild a new one without unique feature. +-- The old design introduced a deadlock over traffic intense Dolibarr instance. +-- VMYSQL4.1 DROP INDEX uk_actioncomm_ref on llx_actioncomm; +-- VPGSQL8.2 DROP INDEX uk_actioncomm_ref; +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref (ref, entity); diff --git a/htdocs/install/mysql/tables/llx_actioncomm.key.sql b/htdocs/install/mysql/tables/llx_actioncomm.key.sql index 944471620ae..3859f90c78d 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.key.sql @@ -29,4 +29,4 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_percent (percent); -ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity); +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref (ref, entity); diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index b3ae1a0d8de..96ef500d642 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -31,7 +31,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -93,7 +93,7 @@ if ($id > 0) { $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->loadLangs(array("projects")); $morehtmlref .= '
'.$langs->trans('Project').' : '; if ($user->rights->loan->write) { diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 61d763b693e..510ec062269 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -150,7 +150,7 @@ $morehtmlref = '
'; $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->loadLangs(array("projects")); $morehtmlref .= '
'.$langs->trans('Project').' : '; if ($user->rights->loan->write) { diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index db84a8d0317..91a85f95f9b 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -252,7 +252,7 @@ class MyObject extends CommonObject $this->db = $db; - if (getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { + if (!getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { $this->fields['rowid']['visible'] = 0; } if (!isModEnabled('multicompany') && isset($this->fields['entity'])) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index fec79373ec9..d3c717bcd3c 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -294,7 +294,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetFont(pdf_getPDFFont($outputlangs)); // Set path to the background PDF File - if (getDolGlobalInt('MAIN_ADD_PDF_BACKGROUND')) { + if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); $tplidx = $pdf->importPage(1); } @@ -937,7 +937,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfTitle"); - if (!empty(getDolGlobalInt('MAIN_ODT_AS_PDF')) && is_object($outputlangsbis)) { + if (getDolGlobalInt('MAIN_ODT_AS_PDF') && is_object($outputlangsbis)) { $title .= ' - '; $title .= $outputlangsbis->transnoentities("PdfTitle"); } diff --git a/htdocs/partnership/partnership_agenda.php b/htdocs/partnership/partnership_agenda.php index f4b8275a8f6..64a5c0ea5c2 100644 --- a/htdocs/partnership/partnership_agenda.php +++ b/htdocs/partnership/partnership_agenda.php @@ -158,7 +158,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/partnership/partnership_contact.php b/htdocs/partnership/partnership_contact.php index 270645c0d52..415b24c3fdf 100644 --- a/htdocs/partnership/partnership_contact.php +++ b/htdocs/partnership/partnership_contact.php @@ -141,7 +141,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/partnership/partnership_document.php b/htdocs/partnership/partnership_document.php index 8651590e37a..481bf2793de 100644 --- a/htdocs/partnership/partnership_document.php +++ b/htdocs/partnership/partnership_document.php @@ -136,7 +136,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index 3fc15e362ac..e75e28e273e 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -115,7 +115,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 874c1918de2..7db7f5af6a4 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -314,7 +314,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index f6a852b0c63..8f595abcc53 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -493,7 +493,7 @@ $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $ // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index bb8b15d7c10..1fcd4e11792 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -280,7 +280,7 @@ $form = new Form($db); $formproduct = new FormProduct($db); $formcompany = new FormCompany($db); $formfile = new FormFile($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -318,7 +318,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); @@ -330,7 +330,7 @@ if ($action == 'create') { print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('desc', (!empty($object->description) ? $object->description : ''), '', 180, 'dolibarr_notes', 'In', false, true, empty($conf->fckeditor->enabled) ? '' : $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor('desc', (!empty($object->description) ? $object->description : ''), '', 180, 'dolibarr_notes', 'In', false, true, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); print ''; @@ -440,7 +440,7 @@ if ($action == 'create') { $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; if ($usercancreate) { @@ -887,7 +887,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $projectid = $object->fk_project; $langs->load('projects'); print ''.$langs->trans('Project').''; @@ -900,7 +900,7 @@ if ($action == 'create') { print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('desc', $object->description, '', 180, 'dolibarr_notes', 'In', false, true, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor('desc', $object->description, '', 180, 'dolibarr_notes', 'In', false, true, isModEnabled('fckeditor'), ROWS_5, '90%'); $doleditor->Create(); print ''; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 29965516498..6bed56acd0d 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -60,7 +60,7 @@ $morehtmlref = '
'; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; if ($usercancreate) { diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 571ff25a753..7cc649428c2 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -426,7 +426,7 @@ $userstatic = new User($db); $form = new Form($db); $formother = new FormOther($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 92bf74fa104..e0366f48eb2 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -593,7 +593,7 @@ if ($action == "transfert_stock" && !$cancel) { $form = new Form($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } $productlot = new ProductLot($db); @@ -795,7 +795,7 @@ if ($object->id > 0) { $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; if ($usercancreate && 1 == 2) { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7befa095142..7047ca7391c 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productstockentrepot.class. if (isModEnabled('productbatch')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -531,7 +531,7 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans("Save")) { $form = new Form($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php index 55545a6868c..1f416982b66 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_agenda.php @@ -135,7 +135,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 171408df070..5dade5dc874 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -563,7 +563,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= $langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '').'
'; } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_contact.php b/htdocs/product/stock/stocktransfer/stocktransfer_contact.php index 045af2dd42a..7265fd992a1 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_contact.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_contact.php @@ -134,7 +134,7 @@ if ($object->id > 0) { $morehtmlref .= '
' . $langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'customer'); } // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; if ($user->rights->stocktransfer->stocktransfer->write) { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_document.php b/htdocs/product/stock/stocktransfer/stocktransfer_document.php index 7220581bc52..d4d3bc2d91d 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_document.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_document.php @@ -122,7 +122,7 @@ if ($object->id) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_note.php b/htdocs/product/stock/stocktransfer/stocktransfer_note.php index 2176af2803a..0aee6e59124 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_note.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_note.php @@ -95,7 +95,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 793c0dcd1e4..e13ac6d7c23 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -182,7 +182,7 @@ if (ismodEnabled('productbatch') && print ''; print ''.$langs->trans("UnitPurchaseValue").''; print ''; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { print ''.$langs->trans('Project').''; print ''; print img_picto('', 'project'); diff --git a/htdocs/public/users/view.php b/htdocs/public/users/view.php index c28175b898d..2df1404ab92 100644 --- a/htdocs/public/users/view.php +++ b/htdocs/public/users/view.php @@ -207,15 +207,25 @@ $arrayofcss = array(); $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
' : '').'
'; llxHeader($head, $object->getFullName($langs).' - '.$langs->trans("PublicVirtualCard"), '', '', 0, 0, '', '', '', 'onlinepaymentbody'.(GETPOST('mode')=='preview' ? ' scalepreview cursorpointer virtualcardpreview' : ''), $replacemainarea, 1, 1); +print ' + +'; + print ''."\n"; print '
'."\n"; + print '
'."\n"; print ''."\n"; print ''."\n"; print ''."\n"; print ''; print "\n"; -print ''."\n"; // Output html code for logo print '
'; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index f1b7d98b5b3..d1de39c049d 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -56,7 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class if (isModEnabled('productbatch')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -742,7 +742,7 @@ llxHeader('', $title, 'Reception'); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -829,7 +829,7 @@ if ($action == 'create') { print ''; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; if (empty($projectid) && !empty($objectsrc->fk_project)) { $projectid = $objectsrc->fk_project; @@ -1062,10 +1062,10 @@ if ($action == 'create') { print ''.$langs->trans("QtyOrdered").''; print ''.$langs->trans("QtyReceived").''; print ''.$langs->trans("QtyToReceive"); - if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION || $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { + if (getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION') || getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION_CLOSE')) { print ''.$langs->trans("BuyingPrice").''; } - if (empty($conf->productbatch->enabled)) { + if (isModEnabled('productbatch')) { print '
('.$langs->trans("Fill").''; print ' / '.$langs->trans("Reset").')'; } @@ -1075,10 +1075,10 @@ if ($action == 'create') { } if (isModEnabled('productbatch')) { print ''.$langs->trans("batch_number").''; - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (!getDolGlobalInt('PRODUCT_DISABLE_SELLBY')) { print ''.$langs->trans("SellByDate").''; } - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + if (!getDolGlobalInt('PRODUCT_DISABLE_EATBY')) { print ''.$langs->trans("EatByDate").''; } } @@ -1208,10 +1208,12 @@ if ($action == 'create') { $warehouseObject = null; - if (isModEnabled('stock')) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection + if (isModEnabled('stock')) { + // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection print ''; - - $stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number + if (array_key_exists($dispatchLines[$indiceAsked]['ent'], $product->stock_warehouse)) { + $stock = +$product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number + } $deliverableQty = $dispatchLines[$indiceAsked]['qty']; $cost_price = $dispatchLines[$indiceAsked]['pu']; @@ -1422,7 +1424,7 @@ if ($action == 'create') { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index d60c286ecf6..5281e890cc5 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -739,7 +739,9 @@ class Reception extends CommonObject } else { // build array with quantity received by product in all supplier orders (origin) foreach ($supplierorderdispatch->lines as $dispatch_line) { - $qty_received[$dispatch_line->fk_product] += $dispatch_line->qty; + if (array_key_exists($dispatch_line->fk_product, $qty_received)) { + $qty_received[$dispatch_line->fk_product] += $dispatch_line->qty; + } } // qty wished in order supplier (origin) diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 57bfa8bbf4d..e33885d0d51 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -164,7 +164,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/reception/dispatch.php b/htdocs/reception/dispatch.php index 9c0842442ca..112a6d51cd0 100644 --- a/htdocs/reception/dispatch.php +++ b/htdocs/reception/dispatch.php @@ -354,7 +354,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/reception/document.php b/htdocs/reception/document.php index 6641cfaecf6..3acadddec74 100644 --- a/htdocs/reception/document.php +++ b/htdocs/reception/document.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; @@ -155,7 +155,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 3f83d8d2b2f..b227a3e4a43 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -28,7 +28,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -136,7 +136,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { // Do not change on reception diff --git a/htdocs/recruitment/recruitmentcandidature_agenda.php b/htdocs/recruitment/recruitmentcandidature_agenda.php index b01a7233f76..4c047eae251 100644 --- a/htdocs/recruitment/recruitmentcandidature_agenda.php +++ b/htdocs/recruitment/recruitmentcandidature_agenda.php @@ -154,7 +154,7 @@ if ($object->id > 0) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (!empty($conf->project->enabled)) + /*if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index af6983e26c6..5a6f8a58443 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -442,7 +442,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project') . ' '; diff --git a/htdocs/recruitment/recruitmentcandidature_document.php b/htdocs/recruitment/recruitmentcandidature_document.php index 8b4b7fbdcd2..4517eeabd04 100644 --- a/htdocs/recruitment/recruitmentcandidature_document.php +++ b/htdocs/recruitment/recruitmentcandidature_document.php @@ -130,7 +130,7 @@ if ($object->id) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (!empty($conf->project->enabled)) + /*if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index a878aab0c22..77577627dce 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -432,7 +432,7 @@ if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index b26d4310688..931f7d0627a 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - /*if (!empty($conf->project->enabled)) + /*if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project') . ' '; diff --git a/htdocs/recruitment/recruitmentjobposition_agenda.php b/htdocs/recruitment/recruitmentjobposition_agenda.php index 3e365a350ca..30aa43ad6cd 100644 --- a/htdocs/recruitment/recruitmentjobposition_agenda.php +++ b/htdocs/recruitment/recruitmentjobposition_agenda.php @@ -152,7 +152,7 @@ if ($object->id > 0) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/recruitment/recruitmentjobposition_applications.php b/htdocs/recruitment/recruitmentjobposition_applications.php index 0447ace7979..76250a20b8d 100644 --- a/htdocs/recruitment/recruitmentjobposition_applications.php +++ b/htdocs/recruitment/recruitmentjobposition_applications.php @@ -222,7 +222,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index 3555a75d030..9b47b7fe71d 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -322,7 +322,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/recruitment/recruitmentjobposition_document.php b/htdocs/recruitment/recruitmentjobposition_document.php index 55c8785073a..aa8630f7108 100644 --- a/htdocs/recruitment/recruitmentjobposition_document.php +++ b/htdocs/recruitment/recruitmentjobposition_document.php @@ -131,7 +131,7 @@ if ($object->id) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index d4eb1f05615..f6e5eec721d 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -108,7 +108,7 @@ if ($id > 0 || !empty($ref)) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; if ($permissiontoadd) { diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index cd0f51df4d3..53482cb18b8 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_proposal/modules_supplier require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -1173,7 +1173,7 @@ $formother = new FormOther($db); $formfile = new FormFile($db); $formmargin = new FormMargin($db); $companystatic = new Societe($db); -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $formproject = new FormProjets($db); } @@ -1361,7 +1361,7 @@ if ($action == 'create') { print ""; // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $formproject = new FormProjets($db); diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index 04d4e03b052..5b303182419 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index dbd58b49921..319724679f3 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page @@ -123,7 +123,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index bcf38168692..3dd6060f528 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -29,7 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -74,7 +74,7 @@ $morehtmlref = '
'; // Thirdparty $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if (0) { diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 3105a88450b..dcc9070a1d2 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index bc65f6450fb..147b1299e22 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -30,7 +30,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page @@ -109,7 +109,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= '
'; if ($usercancreate) { diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 3bd180989b3..800ae0f1e8f 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -193,7 +193,7 @@ $tmparray['index.php'] = array('label'=>'Dashboard', 'picto'=>'graph'); if (isModEnabled("societe")) { $tmparray['societe/index.php?mainmenu=companies&leftmenu='] = array('label'=>'ThirdPartiesArea', 'picto'=>'company'); } -if (!empty($conf->project->enabled)) { +if (isModEnabled('project')) { $tmparray['projet/index.php?mainmenu=project&leftmenu='] = array('label'=>'ProjectsArea', 'picto'=>'project'); if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { $tmparray['projet/list.php?mainmenu=project&leftmenu=&search_usage_opportunity=1&search_status=99&search_opp_status=openedopp&contextpage=lead'] = array('label'=>'ListOpenLeads', 'picto'=>'project'); diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index a9fabffba3c..f7658a28a97 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -226,7 +226,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); // Project - if (!empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' ';