Merge remote-tracking branch 'origin/develop' into fix-duplicate-so-ref

This commit is contained in:
Aloïs Micard 2023-06-09 16:29:46 +02:00
commit a586b1726a
335 changed files with 1664 additions and 5303 deletions

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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'=>'')
);

View file

@ -410,7 +410,7 @@ foreach ($dirmodels as $reldir) {
// Defaut
print '<td class="center">';
if ($conf->global->CONTRACT_ADDON_PDF == $name) {
if (getDolGlobalString('CONTRACT_ADDON_PDF') == $name) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View file

@ -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 '<td>';
print '<input type="hidden" name="'. $value .'" value="'.$hidden.'">';
@ -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) {

View file

@ -230,7 +230,7 @@ if ($action == 'edit') {
print "</textarea>\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);

View file

@ -221,7 +221,7 @@ if ($action != 'edit') {
echo '<td class="linecoltype">' . $form->selectExpense('', 'fk_c_type_fees', 0, 1, 1) . '</td>';
echo '<td class="linecoltyperule">' . $form->selectarray('code_expense_rules_type', $tab_rules_type, '', 0) . '</td>';
echo '<td class="linecoldatestart">' . $form->selectDate(strtotime(date('Y-m-01', dol_now())), 'start', '', '', 0, '', 1, 0) . '</td>';
echo '<td class="linecoldateend>' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . '</td>';
echo '<td class="linecoldateend">' . $form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0) . '</td>';
echo '<td class="linecolamount"><input type="text" value="" class="maxwidth100" name="amount" class="amount right" /></td>';
echo '<td class="linecolrestrictive">' . $form->selectyesno('restrictive', 0, 1) . '</td>';
echo '<td class="right linecolbutton"><input type="submit" class="button button-add" value="' . $langs->trans('Add') . '" /></td>';

View file

@ -171,7 +171,7 @@ print '</tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("ActivateCheckReadKey").'</td><td>';
print '<input class="minwidth100 maxwdith250 widthcentpercentminusx" type="text" name="MAILING_EMAIL_UNSUBSCRIBE_KEY" id="MAILING_EMAIL_UNSUBSCRIBE_KEY" value="'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY.'">';
print '<input class="minwidth100 maxwdith250 widthcentpercentminusx" type="text" name="MAILING_EMAIL_UNSUBSCRIBE_KEY" id="MAILING_EMAIL_UNSUBSCRIBE_KEY" value="'.getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY').'">';
if (!empty($conf->use_javascript_ajax)) {
print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
}

View file

@ -49,7 +49,7 @@ if ($action == 'test' || ($action == 'send' && $trackid = 'test')) {
$substitutionarrayfortest = array(
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedtag&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefinedtag", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0" />',
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedtag&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedtag", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0" />',
'__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

View file

@ -42,7 +42,7 @@ if ($action == 'test' || $action == 'send') {
$substitutionarrayfortest = array(
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedtag&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefinedtag", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedtag&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedtag", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__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

View file

@ -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'));
}

View file

@ -539,14 +539,14 @@ print '<br>';
print '<br>';
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')."<br>\n";
print '<br>';
}
if (!empty($conf->api->enabled)) {
if (isModEnabled('api')) {
print '<strong>API_ENDPOINT_RULES</strong> = '.getDolGlobalString('API_ENDPOINT_RULES', '<span class="opacitymedium">'.$langs->trans("Undefined").' &nbsp; ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>')."<br>\n";
print '<br>';
}

View file

@ -226,7 +226,7 @@ if ($action == 'edit') {
print "</textarea>\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);

View file

@ -477,7 +477,7 @@ if ($action == 'edit') {
print "</textarea>\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);

View file

@ -166,7 +166,7 @@ print '<tr>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>';
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 '</td></tr>';

View file

@ -2016,7 +2016,7 @@ if ($id > 0) {
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
// 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 '</td></tr>';

View file

@ -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__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($obj->tag).'&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY.'-'.$obj->tag.'-'.$obj->email.'-'.$obj->rowid, "md5").'&email='.urlencode($obj->email).'&mtid='.((int) $obj->rowid).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.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).'" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
$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__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.urlencode($obj->tag).'&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY').'-'.$obj->tag.'-'.$obj->email.'-'.$obj->rowid, "md5").'&email='.urlencode($obj->email).'&mtid='.((int) $obj->rowid).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.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).'" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
$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__'] = '<a href="mailto:'.$object->sendto.'">'.$object->sendto.'</a>';
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedintestmode&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.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" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
$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__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefinedintestmode&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefinedintestmode-".$obj->sendto."-0", 'md5').'&email='.urlencode($obj->sendto).'&mtid=0" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.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" target="_blank" rel="noopener noreferrer">'.$langs->trans("MailUnsubcribe").'</a>';
$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);

View file

@ -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;

View file

@ -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;
}

View file

@ -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__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$parameters = array('mode'=>'formemail');

View file

@ -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)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
$substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>' : '';
$parameters = array('mode'=>'formemail');
complete_substitutions_array($substitutionarray, $langs, $object, $parameters);

View file

@ -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') {

View file

@ -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);
}

View file

@ -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

View file

@ -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;
}

View file

@ -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&amp;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&amp;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, '');
}
}
}

View file

@ -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)
*/

View file

@ -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'...)

View file

@ -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;

View file

@ -269,7 +269,7 @@ if ($action == 'presend') {
if (is_object($object) && is_object($object->thirdparty)) {
$checkRead= '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php';
$checkRead.='?tag='.(!empty($object->thirdparty->tag)?urlencode($object->thirdparty->tag):"");
$checkRead.='&securitykey='.(!empty($conf->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;
}

View file

@ -282,7 +282,7 @@ if ($massaction == 'presend') {
$substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object);
$substitutionarray['__EMAIL__'] = $sendto;
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag=undefined&securitykey='.dol_hash(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')."-undefined", 'md5').'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
$substitutionarray['__PERSONALIZED__'] = ''; // deprecated
$substitutionarray['__CONTACTCIVNAME__'] = '';

View file

@ -382,7 +382,7 @@ if ($id > 0 || !empty($ref)) {
// Thirdparty
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
// Project
if (!empty($conf->project->enabled)) {
if (isModEnabled('project')) {
$langs->load("projects");
$morehtmlref .= '<br>';
if (0) { // Do not change on reception

View file

@ -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) {

View file

@ -723,7 +723,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<td class="right">';
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";

View file

@ -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

View file

@ -6,7 +6,7 @@ $config->getFinder()
->in(__DIR__);
$config->setRules([
'@PSR1' => true,
'@Symfony' =>true
'@Symfony' => true
]);
return $config;

View file

@ -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:

File diff suppressed because it is too large Load diff

View file

@ -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/

View file

@ -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
-------------

View file

@ -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";

View file

@ -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;

View file

@ -73,7 +73,7 @@ switch ($driver) {
break;
default:
echo 'Error: unsupported driver: '.$driver."\n";
die(-1);
exit(-1);
}
echo "Upgrading 'calendarobjects'\n";

View file

@ -72,7 +72,7 @@ switch ($driver) {
break;
default:
echo 'Error: unsupported driver: '.$driver."\n";
die(-1);
exit(-1);
}
echo "Upgrading 'propertystorage'\n";

View file

@ -75,7 +75,7 @@ switch ($driver) {
break;
default:
echo 'Error: unsupported driver: '.$driver."\n";
die(-1);
exit(-1);
}
echo "Creating 'calendarinstances'\n";

View file

@ -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

View file

@ -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"
]
}
}

View file

@ -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)

View file

@ -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
*/

View file

@ -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);

View file

@ -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)]);
}

View file

@ -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);
}

View file

@ -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
*/

View file

@ -58,7 +58,6 @@ interface SubscriptionSupport extends BackendInterface
*
* @param string $principalUri
* @param string $uri
* @param array $properties
*
* @return mixed
*/

View file

@ -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

View file

@ -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
*/

View file

@ -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)
{

View file

@ -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.
//

View file

@ -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)

View file

@ -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)
{

View file

@ -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
*/

View file

@ -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);

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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) {

View file

@ -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)

View file

@ -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)

View file

@ -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)
{

View file

@ -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;

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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,

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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);

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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)

View file

@ -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)

View file

@ -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)
{

View file

@ -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)
{

Some files were not shown because too many files have changed in this diff Show more