1 | <?php |
||
336 | class Subscription { |
||
337 | |||
338 | /** |
||
339 | * Check if subscription system is enabled |
||
340 | * |
||
341 | * @return bool |
||
342 | * |
||
343 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::isenabled |
||
344 | */ |
||
345 | public function isenabled() { |
||
350 | |||
351 | /** |
||
352 | * Recursively search for matching subscriptions |
||
353 | * |
||
354 | * This function searches all relevant subscription files for a page or |
||
355 | * namespace. |
||
356 | * |
||
357 | * @author Adrian Lang <[email protected]> |
||
358 | * |
||
359 | * @param string $page The target object’s (namespace or page) id |
||
360 | * @param string|array $user |
||
361 | * @param string|array $style |
||
362 | * @param string|array $data |
||
363 | * @return array |
||
364 | * |
||
365 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::subscribers |
||
366 | */ |
||
367 | public function subscribers($page, $user = null, $style = null, $data = null) { |
||
372 | |||
373 | /** |
||
374 | * Adds a new subscription for the given page or namespace |
||
375 | * |
||
376 | * This will automatically overwrite any existent subscription for the given user on this |
||
377 | * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces. |
||
378 | * |
||
379 | * @param string $id The target page or namespace, specified by id; Namespaces |
||
380 | * are identified by appending a colon. |
||
381 | * @param string $user |
||
382 | * @param string $style |
||
383 | * @param string $data |
||
384 | * @throws Exception when user or style is empty |
||
385 | * @return bool |
||
386 | * |
||
387 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::add |
||
388 | */ |
||
389 | public function add($id, $user, $style, $data = '') { |
||
394 | |||
395 | /** |
||
396 | * Removes a subscription for the given page or namespace |
||
397 | * |
||
398 | * This removes all subscriptions matching the given criteria on the given page or |
||
399 | * namespace. It will *not* modify any subscriptions that may exist in higher |
||
400 | * namespaces. |
||
401 | * |
||
402 | * @param string $id The target object’s (namespace or page) id |
||
403 | * @param string|array $user |
||
404 | * @param string|array $style |
||
405 | * @param string|array $data |
||
406 | * @return bool |
||
407 | * |
||
408 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::remove |
||
409 | */ |
||
410 | public function remove($id, $user = null, $style = null, $data = null) { |
||
415 | |||
416 | /** |
||
417 | * Get data for $INFO['subscribed'] |
||
418 | * |
||
419 | * $INFO['subscribed'] is either false if no subscription for the current page |
||
420 | * and user is in effect. Else it contains an array of arrays with the fields |
||
421 | * “target”, “style”, and optionally “data”. |
||
422 | * |
||
423 | * @param string $id Page ID, defaults to global $ID |
||
424 | * @param string $user User, defaults to $_SERVER['REMOTE_USER'] |
||
425 | * @return array|false |
||
426 | * @author Adrian Lang <[email protected]> |
||
427 | * |
||
428 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::userSubscription |
||
429 | */ |
||
430 | public function user_subscription($id = '', $user = '') { |
||
435 | |||
436 | /** |
||
437 | * Send digest and list subscriptions |
||
438 | * |
||
439 | * This sends mails to all subscribers that have a subscription for namespaces above |
||
440 | * the given page if the needed $conf['subscribe_time'] has passed already. |
||
441 | * |
||
442 | * This function is called form lib/exe/indexer.php |
||
443 | * |
||
444 | * @param string $page |
||
445 | * @return int number of sent mails |
||
446 | * |
||
447 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk |
||
448 | */ |
||
449 | public function send_bulk($page) { |
||
454 | |||
455 | /** |
||
456 | * Send the diff for some page change |
||
457 | * |
||
458 | * @param string $subscriber_mail The target mail address |
||
459 | * @param string $template Mail template ('subscr_digest', 'subscr_single', 'mailtext', ...) |
||
460 | * @param string $id Page for which the notification is |
||
461 | * @param int|null $rev Old revision if any |
||
462 | * @param string $summary Change summary if any |
||
463 | * @return bool true if successfully sent |
||
464 | * |
||
465 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff |
||
466 | */ |
||
467 | public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') { |
||
472 | |||
473 | /** |
||
474 | * Send the diff for some media change |
||
475 | * |
||
476 | * @fixme this should embed thumbnails of images in HTML version |
||
477 | * |
||
478 | * @param string $subscriber_mail The target mail address |
||
479 | * @param string $template Mail template ('uploadmail', ...) |
||
480 | * @param string $id Media file for which the notification is |
||
481 | * @param int|bool $rev Old revision if any |
||
482 | * |
||
483 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff |
||
484 | */ |
||
485 | public function send_media_diff($subscriber_mail, $template, $id, $rev = false) { |
||
490 | |||
491 | /** |
||
492 | * Send a notify mail on new registration |
||
493 | * |
||
494 | * @author Andreas Gohr <[email protected]> |
||
495 | * |
||
496 | * @param string $login login name of the new user |
||
497 | * @param string $fullname full name of the new user |
||
498 | * @param string $email email address of the new user |
||
499 | * @return bool true if a mail was sent |
||
500 | * |
||
501 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister |
||
502 | */ |
||
503 | public function send_register($login, $fullname, $email) { |
||
508 | |||
509 | |||
510 | /** |
||
511 | * Default callback for COMMON_NOTIFY_ADDRESSLIST |
||
512 | * |
||
513 | * Aggregates all email addresses of user who have subscribed the given page with 'every' style |
||
514 | * |
||
515 | * @author Steven Danz <[email protected]> |
||
516 | * @author Adrian Lang <[email protected]> |
||
517 | * |
||
518 | * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead, |
||
519 | * use an array for the addresses within it |
||
520 | * |
||
521 | * @param array &$data Containing the entries: |
||
522 | * - $id (the page id), |
||
523 | * - $self (whether the author should be notified, |
||
524 | * - $addresslist (current email address list) |
||
525 | * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value) |
||
526 | * |
||
527 | * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::notifyAddresses |
||
528 | */ |
||
529 | public function notifyaddresses(&$data) { |
||
534 | } |
||
535 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.