14cdb6842SAndreas Gohr<?php 2b78f68bcSAndreas Gohr// phpcs:ignoreFile -- this file violates PSR2 by definition 34cdb6842SAndreas Gohr/** 44cdb6842SAndreas Gohr * These classes and functions are deprecated and will be removed in future releases 54cdb6842SAndreas Gohr */ 64cdb6842SAndreas Gohr 7451969abSMichael Großeuse dokuwiki\Debug\DebugHelper; 8451969abSMichael Großeuse dokuwiki\Subscriptions\BulkSubscriptionSender; 9451969abSMichael Großeuse dokuwiki\Subscriptions\MediaSubscriptionSender; 10451969abSMichael Großeuse dokuwiki\Subscriptions\PageSubscriptionSender; 11451969abSMichael Großeuse dokuwiki\Subscriptions\RegistrationSubscriptionSender; 12451969abSMichael Großeuse dokuwiki\Subscriptions\SubscriberManager; 13451969abSMichael Große 144cdb6842SAndreas Gohr/** 154cdb6842SAndreas Gohr * @inheritdoc 164cdb6842SAndreas Gohr * @deprecated 2018-05-07 174cdb6842SAndreas Gohr */ 18d443762bSAndreas Gohrclass RemoteAccessDeniedException extends \dokuwiki\Remote\AccessDeniedException 19d443762bSAndreas Gohr{ 204cdb6842SAndreas Gohr /** @inheritdoc */ 21d443762bSAndreas Gohr public function __construct($message = "", $code = 0, Throwable $previous = null) 22d443762bSAndreas Gohr { 23a6e1db4aSAndreas Gohr dbg_deprecated(\dokuwiki\Remote\AccessDeniedException::class); 244cdb6842SAndreas Gohr parent::__construct($message, $code, $previous); 254cdb6842SAndreas Gohr } 264cdb6842SAndreas Gohr 274cdb6842SAndreas Gohr} 284cdb6842SAndreas Gohr 294cdb6842SAndreas Gohr/** 304cdb6842SAndreas Gohr * @inheritdoc 314cdb6842SAndreas Gohr * @deprecated 2018-05-07 324cdb6842SAndreas Gohr */ 33d443762bSAndreas Gohrclass RemoteException extends \dokuwiki\Remote\RemoteException 34d443762bSAndreas Gohr{ 354cdb6842SAndreas Gohr /** @inheritdoc */ 36d443762bSAndreas Gohr public function __construct($message = "", $code = 0, Throwable $previous = null) 37d443762bSAndreas Gohr { 38a6e1db4aSAndreas Gohr dbg_deprecated(\dokuwiki\Remote\RemoteException::class); 394cdb6842SAndreas Gohr parent::__construct($message, $code, $previous); 404cdb6842SAndreas Gohr } 414cdb6842SAndreas Gohr 424cdb6842SAndreas Gohr} 434cdb6842SAndreas Gohr 444cdb6842SAndreas Gohr/** 454cdb6842SAndreas Gohr * Escapes regex characters other than (, ) and / 464cdb6842SAndreas Gohr * 474cdb6842SAndreas Gohr * @param string $str 484cdb6842SAndreas Gohr * @return string 494cdb6842SAndreas Gohr * @deprecated 2018-05-04 504cdb6842SAndreas Gohr */ 51d443762bSAndreas Gohrfunction Doku_Lexer_Escape($str) 52d443762bSAndreas Gohr{ 53a6e1db4aSAndreas Gohr dbg_deprecated('\\dokuwiki\\Parsing\\Lexer\\Lexer::escape()'); 544cdb6842SAndreas Gohr return \dokuwiki\Parsing\Lexer\Lexer::escape($str); 554cdb6842SAndreas Gohr} 56a6e1db4aSAndreas Gohr 57a6e1db4aSAndreas Gohr/** 58a6e1db4aSAndreas Gohr * @inheritdoc 59a6e1db4aSAndreas Gohr * @deprecated 2018-06-01 60a6e1db4aSAndreas Gohr */ 61d443762bSAndreas Gohrclass setting extends \dokuwiki\plugin\config\core\Setting\Setting 62d443762bSAndreas Gohr{ 63a6e1db4aSAndreas Gohr /** @inheritdoc */ 64d443762bSAndreas Gohr public function __construct($key, array $params = null) 65d443762bSAndreas Gohr { 66a6e1db4aSAndreas Gohr dbg_deprecated(\dokuwiki\plugin\config\core\Setting\Setting::class); 67a6e1db4aSAndreas Gohr parent::__construct($key, $params); 68a6e1db4aSAndreas Gohr } 69a6e1db4aSAndreas Gohr} 70a6e1db4aSAndreas Gohr 71a6e1db4aSAndreas Gohr/** 72a6e1db4aSAndreas Gohr * @inheritdoc 73a6e1db4aSAndreas Gohr * @deprecated 2018-06-01 74a6e1db4aSAndreas Gohr */ 75d443762bSAndreas Gohrclass setting_authtype extends \dokuwiki\plugin\config\core\Setting\SettingAuthtype 76d443762bSAndreas Gohr{ 77a6e1db4aSAndreas Gohr /** @inheritdoc */ 78d443762bSAndreas Gohr public function __construct($key, array $params = null) 79d443762bSAndreas Gohr { 80a6e1db4aSAndreas Gohr dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingAuthtype::class); 81a6e1db4aSAndreas Gohr parent::__construct($key, $params); 82a6e1db4aSAndreas Gohr } 83a6e1db4aSAndreas Gohr} 84a6e1db4aSAndreas Gohr 85a6e1db4aSAndreas Gohr/** 86a6e1db4aSAndreas Gohr * @inheritdoc 87a6e1db4aSAndreas Gohr * @deprecated 2018-06-01 88a6e1db4aSAndreas Gohr */ 89d443762bSAndreas Gohrclass setting_string extends \dokuwiki\plugin\config\core\Setting\SettingString 90d443762bSAndreas Gohr{ 91a6e1db4aSAndreas Gohr /** @inheritdoc */ 92d443762bSAndreas Gohr public function __construct($key, array $params = null) 93d443762bSAndreas Gohr { 94a6e1db4aSAndreas Gohr dbg_deprecated(\dokuwiki\plugin\config\core\Setting\SettingString::class); 95a6e1db4aSAndreas Gohr parent::__construct($key, $params); 96a6e1db4aSAndreas Gohr } 97a6e1db4aSAndreas Gohr} 980c3a5702SAndreas Gohr 990c3a5702SAndreas Gohr/** 1000c3a5702SAndreas Gohr * @inheritdoc 1010c3a5702SAndreas Gohr * @deprecated 2018-06-15 1020c3a5702SAndreas Gohr */ 103d443762bSAndreas Gohrclass PageChangelog extends \dokuwiki\ChangeLog\PageChangeLog 104d443762bSAndreas Gohr{ 1050c3a5702SAndreas Gohr /** @inheritdoc */ 1060c3a5702SAndreas Gohr public function __construct($id, $chunk_size = 8192) 1070c3a5702SAndreas Gohr { 1080c3a5702SAndreas Gohr dbg_deprecated(\dokuwiki\ChangeLog\PageChangeLog::class); 1090c3a5702SAndreas Gohr parent::__construct($id, $chunk_size); 1100c3a5702SAndreas Gohr } 1110c3a5702SAndreas Gohr} 1120c3a5702SAndreas Gohr 1130c3a5702SAndreas Gohr/** 1140c3a5702SAndreas Gohr * @inheritdoc 1150c3a5702SAndreas Gohr * @deprecated 2018-06-15 1160c3a5702SAndreas Gohr */ 117d443762bSAndreas Gohrclass MediaChangelog extends \dokuwiki\ChangeLog\MediaChangeLog 118d443762bSAndreas Gohr{ 1190c3a5702SAndreas Gohr /** @inheritdoc */ 1200c3a5702SAndreas Gohr public function __construct($id, $chunk_size = 8192) 1210c3a5702SAndreas Gohr { 1220c3a5702SAndreas Gohr dbg_deprecated(\dokuwiki\ChangeLog\MediaChangeLog::class); 1230c3a5702SAndreas Gohr parent::__construct($id, $chunk_size); 1240c3a5702SAndreas Gohr } 1250c3a5702SAndreas Gohr} 126d443762bSAndreas Gohr 127d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */ 128d443762bSAndreas Gohrdefine('JSON_LOOSE_TYPE', 16); 129d443762bSAndreas Gohr 130d443762bSAndreas Gohr/** Behavior switch for JSON::decode() */ 131d443762bSAndreas Gohrdefine('JSON_STRICT_TYPE', 0); 132d443762bSAndreas Gohr 133d443762bSAndreas Gohr/** 134d443762bSAndreas Gohr * Encode/Decode JSON 135d443762bSAndreas Gohr * @deprecated 2018-07-27 136d443762bSAndreas Gohr */ 137d443762bSAndreas Gohrclass JSON 138d443762bSAndreas Gohr{ 139d443762bSAndreas Gohr protected $use = 0; 140d443762bSAndreas Gohr 141d443762bSAndreas Gohr /** 142d443762bSAndreas Gohr * @param int $use JSON_*_TYPE flag 143d443762bSAndreas Gohr * @deprecated 2018-07-27 144d443762bSAndreas Gohr */ 145d443762bSAndreas Gohr public function __construct($use = JSON_STRICT_TYPE) 146d443762bSAndreas Gohr { 147d443762bSAndreas Gohr $this->use = $use; 148d443762bSAndreas Gohr } 149d443762bSAndreas Gohr 150d443762bSAndreas Gohr /** 151d443762bSAndreas Gohr * Encode given structure to JSON 152d443762bSAndreas Gohr * 153d443762bSAndreas Gohr * @param mixed $var 154d443762bSAndreas Gohr * @return string 155d443762bSAndreas Gohr * @deprecated 2018-07-27 156d443762bSAndreas Gohr */ 157d443762bSAndreas Gohr public function encode($var) 158d443762bSAndreas Gohr { 159d443762bSAndreas Gohr dbg_deprecated('json_encode'); 160d443762bSAndreas Gohr return json_encode($var); 161d443762bSAndreas Gohr } 162d443762bSAndreas Gohr 163d443762bSAndreas Gohr /** 164d443762bSAndreas Gohr * Alias for encode() 165d443762bSAndreas Gohr * @param $var 166d443762bSAndreas Gohr * @return string 167d443762bSAndreas Gohr * @deprecated 2018-07-27 168d443762bSAndreas Gohr */ 169d443762bSAndreas Gohr public function enc($var) { 170d443762bSAndreas Gohr return $this->encode($var); 171d443762bSAndreas Gohr } 172d443762bSAndreas Gohr 173d443762bSAndreas Gohr /** 174d443762bSAndreas Gohr * Decode given string from JSON 175d443762bSAndreas Gohr * 176d443762bSAndreas Gohr * @param string $str 177d443762bSAndreas Gohr * @return mixed 178d443762bSAndreas Gohr * @deprecated 2018-07-27 179d443762bSAndreas Gohr */ 180d443762bSAndreas Gohr public function decode($str) 181d443762bSAndreas Gohr { 182d443762bSAndreas Gohr dbg_deprecated('json_encode'); 183d443762bSAndreas Gohr return json_decode($str, ($this->use == JSON_LOOSE_TYPE)); 184d443762bSAndreas Gohr } 185d443762bSAndreas Gohr 186d443762bSAndreas Gohr /** 187d443762bSAndreas Gohr * Alias for decode 188d443762bSAndreas Gohr * 189d443762bSAndreas Gohr * @param $str 190d443762bSAndreas Gohr * @return mixed 191d443762bSAndreas Gohr * @deprecated 2018-07-27 192d443762bSAndreas Gohr */ 193d443762bSAndreas Gohr public function dec($str) { 194d443762bSAndreas Gohr return $this->decode($str); 195d443762bSAndreas Gohr } 196d443762bSAndreas Gohr} 197ccc4c71cSAndreas Gohr 198ccc4c71cSAndreas Gohr/** 199ccc4c71cSAndreas Gohr * @inheritdoc 200ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 201ccc4c71cSAndreas Gohr */ 202ccc4c71cSAndreas Gohrclass Input extends \dokuwiki\Input\Input { 203ccc4c71cSAndreas Gohr /** 204ccc4c71cSAndreas Gohr * @inheritdoc 205ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 206ccc4c71cSAndreas Gohr */ 207ccc4c71cSAndreas Gohr public function __construct() 208ccc4c71cSAndreas Gohr { 209ccc4c71cSAndreas Gohr dbg_deprecated(\dokuwiki\Input\Input::class); 210ccc4c71cSAndreas Gohr parent::__construct(); 211ccc4c71cSAndreas Gohr } 212ccc4c71cSAndreas Gohr} 213ccc4c71cSAndreas Gohr 214ccc4c71cSAndreas Gohr/** 215ccc4c71cSAndreas Gohr * @inheritdoc 216ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 217ccc4c71cSAndreas Gohr */ 218ccc4c71cSAndreas Gohrclass PostInput extends \dokuwiki\Input\Post { 219ccc4c71cSAndreas Gohr /** 220ccc4c71cSAndreas Gohr * @inheritdoc 221ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 222ccc4c71cSAndreas Gohr */ 223ccc4c71cSAndreas Gohr public function __construct() 224ccc4c71cSAndreas Gohr { 225ccc4c71cSAndreas Gohr dbg_deprecated(\dokuwiki\Input\Post::class); 226ccc4c71cSAndreas Gohr parent::__construct(); 227ccc4c71cSAndreas Gohr } 228ccc4c71cSAndreas Gohr} 229ccc4c71cSAndreas Gohr 230ccc4c71cSAndreas Gohr/** 231ccc4c71cSAndreas Gohr * @inheritdoc 232ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 233ccc4c71cSAndreas Gohr */ 234ccc4c71cSAndreas Gohrclass GetInput extends \dokuwiki\Input\Get { 235ccc4c71cSAndreas Gohr /** 236ccc4c71cSAndreas Gohr * @inheritdoc 237ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 238ccc4c71cSAndreas Gohr */ 239ccc4c71cSAndreas Gohr public function __construct() 240ccc4c71cSAndreas Gohr { 241ccc4c71cSAndreas Gohr dbg_deprecated(\dokuwiki\Input\Get::class); 242ccc4c71cSAndreas Gohr parent::__construct(); 243ccc4c71cSAndreas Gohr } 244ccc4c71cSAndreas Gohr} 245ccc4c71cSAndreas Gohr 246ccc4c71cSAndreas Gohr/** 247ccc4c71cSAndreas Gohr * @inheritdoc 248ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 249ccc4c71cSAndreas Gohr */ 250ccc4c71cSAndreas Gohrclass ServerInput extends \dokuwiki\Input\Server { 251ccc4c71cSAndreas Gohr /** 252ccc4c71cSAndreas Gohr * @inheritdoc 253ccc4c71cSAndreas Gohr * @deprecated 2019-02-19 254ccc4c71cSAndreas Gohr */ 255ccc4c71cSAndreas Gohr public function __construct() 256ccc4c71cSAndreas Gohr { 257ccc4c71cSAndreas Gohr dbg_deprecated(\dokuwiki\Input\Server::class); 258ccc4c71cSAndreas Gohr parent::__construct(); 259ccc4c71cSAndreas Gohr } 260ccc4c71cSAndreas Gohr} 261c3cc6e05SAndreas Gohr 262c3cc6e05SAndreas Gohr/** 263c3cc6e05SAndreas Gohr * @inheritdoc 264c3cc6e05SAndreas Gohr * @deprecated 2019-03-06 265c3cc6e05SAndreas Gohr */ 266c3cc6e05SAndreas Gohrclass PassHash extends \dokuwiki\PassHash { 267c3cc6e05SAndreas Gohr /** 268c3cc6e05SAndreas Gohr * @inheritdoc 269c3cc6e05SAndreas Gohr * @deprecated 2019-03-06 270c3cc6e05SAndreas Gohr */ 271c3cc6e05SAndreas Gohr public function __construct() 272c3cc6e05SAndreas Gohr { 273c3cc6e05SAndreas Gohr dbg_deprecated(\dokuwiki\PassHash::class); 274c3cc6e05SAndreas Gohr } 275c3cc6e05SAndreas Gohr} 27660b9af73SMichael Große 27760b9af73SMichael Große/** 2785a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClientException instead! 27960b9af73SMichael Große */ 2805a8d6e48SMichael Großeclass HTTPClientException extends \dokuwiki\HTTP\HTTPClientException { 28160b9af73SMichael Große 28260b9af73SMichael Große /** 28360b9af73SMichael Große * @inheritdoc 28460b9af73SMichael Große * @deprecated 2019-03-17 28560b9af73SMichael Große */ 28660b9af73SMichael Große public function __construct($message = '', $code = 0, $previous = null) 28760b9af73SMichael Große { 2885a8d6e48SMichael Große DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClientException::class); 28960b9af73SMichael Große parent::__construct($message, $code, $previous); 29060b9af73SMichael Große } 29160b9af73SMichael Große} 29260b9af73SMichael Große 29360b9af73SMichael Große/** 2945a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\HTTPClient instead! 29560b9af73SMichael Große */ 2965a8d6e48SMichael Großeclass HTTPClient extends \dokuwiki\HTTP\HTTPClient { 29760b9af73SMichael Große 29860b9af73SMichael Große /** 29960b9af73SMichael Große * @inheritdoc 30060b9af73SMichael Große * @deprecated 2019-03-17 30160b9af73SMichael Große */ 30260b9af73SMichael Große public function __construct() 30360b9af73SMichael Große { 3045a8d6e48SMichael Große DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\HTTPClient::class); 30560b9af73SMichael Große parent::__construct(); 30660b9af73SMichael Große } 30760b9af73SMichael Große} 30860b9af73SMichael Große 30960b9af73SMichael Große/** 3105a8d6e48SMichael Große * @deprecated since 2019-03-17 use \dokuwiki\HTTP\DokuHTTPClient instead! 31160b9af73SMichael Große */ 312cbb44eabSAndreas Gohrclass DokuHTTPClient extends \dokuwiki\HTTP\DokuHTTPClient 313cbb44eabSAndreas Gohr{ 31460b9af73SMichael Große 31560b9af73SMichael Große /** 31660b9af73SMichael Große * @inheritdoc 31760b9af73SMichael Große * @deprecated 2019-03-17 31860b9af73SMichael Große */ 31960b9af73SMichael Große public function __construct() 32060b9af73SMichael Große { 3215a8d6e48SMichael Große DebugHelper::dbgDeprecatedFunction(dokuwiki\HTTP\DokuHTTPClient::class); 32260b9af73SMichael Große parent::__construct(); 32360b9af73SMichael Große } 324cbb44eabSAndreas Gohr} 32560b9af73SMichael Große 326cbb44eabSAndreas Gohr/** 327cbb44eabSAndreas Gohr * function wrapper to process (create, trigger and destroy) an event 328cbb44eabSAndreas Gohr * 329cbb44eabSAndreas Gohr * @param string $name name for the event 330cbb44eabSAndreas Gohr * @param mixed $data event data 331cbb44eabSAndreas Gohr * @param callback $action (optional, default=NULL) default action, a php callback function 332cbb44eabSAndreas Gohr * @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action 333cbb44eabSAndreas Gohr * 334cbb44eabSAndreas Gohr * @return mixed the event results value after all event processing is complete 335cbb44eabSAndreas Gohr * by default this is the return value of the default action however 336cbb44eabSAndreas Gohr * it can be set or modified by event handler hooks 337cbb44eabSAndreas Gohr * @deprecated 2018-06-15 338cbb44eabSAndreas Gohr */ 339cbb44eabSAndreas Gohrfunction trigger_event($name, &$data, $action=null, $canPreventDefault=true) { 340cbb44eabSAndreas Gohr dbg_deprecated('\dokuwiki\Extension\Event::createAndTrigger'); 341cbb44eabSAndreas Gohr return \dokuwiki\Extension\Event::createAndTrigger($name, $data, $action, $canPreventDefault); 34260b9af73SMichael Große} 3433a7140a1SAndreas Gohr 3443a7140a1SAndreas Gohr/** 3453a7140a1SAndreas Gohr * @inheritdoc 3463a7140a1SAndreas Gohr * @deprecated 2018-06-15 3473a7140a1SAndreas Gohr */ 3483a7140a1SAndreas Gohrclass Doku_Plugin_Controller extends \dokuwiki\Extension\PluginController { 3493a7140a1SAndreas Gohr /** @inheritdoc */ 3503a7140a1SAndreas Gohr public function __construct() 3513a7140a1SAndreas Gohr { 3523a7140a1SAndreas Gohr dbg_deprecated(\dokuwiki\Extension\PluginController::class); 3533a7140a1SAndreas Gohr parent::__construct(); 3543a7140a1SAndreas Gohr } 355dd87735dSAndreas Gohr} 356451969abSMichael Große 357451969abSMichael Große 358451969abSMichael Große/** 359451969abSMichael Große * Class for handling (email) subscriptions 360451969abSMichael Große * 361451969abSMichael Große * @author Adrian Lang <lang@cosmocode.de> 362451969abSMichael Große * @author Andreas Gohr <andi@splitbrain.org> 363451969abSMichael Große * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 364451969abSMichael Große * 365451969abSMichael Große * @deprecated 2019-04-22 Use the classes in the \dokuwiki\Subscriptions namespace instead! 366451969abSMichael Große */ 367451969abSMichael Großeclass Subscription { 368451969abSMichael Große 369451969abSMichael Große /** 370451969abSMichael Große * Check if subscription system is enabled 371451969abSMichael Große * 372451969abSMichael Große * @return bool 373451969abSMichael Große * 374451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::isenabled 375451969abSMichael Große */ 376451969abSMichael Große public function isenabled() { 377451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::isenabled'); 378451969abSMichael Große $subscriberManager = new SubscriberManager(); 379451969abSMichael Große return $subscriberManager->isenabled(); 380451969abSMichael Große } 381451969abSMichael Große 382451969abSMichael Große /** 383451969abSMichael Große * Recursively search for matching subscriptions 384451969abSMichael Große * 385451969abSMichael Große * This function searches all relevant subscription files for a page or 386451969abSMichael Große * namespace. 387451969abSMichael Große * 388451969abSMichael Große * @author Adrian Lang <lang@cosmocode.de> 389451969abSMichael Große * 390451969abSMichael Große * @param string $page The target object’s (namespace or page) id 391451969abSMichael Große * @param string|array $user 392451969abSMichael Große * @param string|array $style 393451969abSMichael Große * @param string|array $data 394451969abSMichael Große * @return array 395451969abSMichael Große * 396451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::subscribers 397451969abSMichael Große */ 398451969abSMichael Große public function subscribers($page, $user = null, $style = null, $data = null) { 399451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::subscribers'); 400451969abSMichael Große $manager = new SubscriberManager(); 401451969abSMichael Große return $manager->subscribers($page, $user, $style, $data); 402451969abSMichael Große } 403451969abSMichael Große 404451969abSMichael Große /** 405451969abSMichael Große * Adds a new subscription for the given page or namespace 406451969abSMichael Große * 407451969abSMichael Große * This will automatically overwrite any existent subscription for the given user on this 408451969abSMichael Große * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces. 409451969abSMichael Große * 410451969abSMichael Große * @param string $id The target page or namespace, specified by id; Namespaces 411451969abSMichael Große * are identified by appending a colon. 412451969abSMichael Große * @param string $user 413451969abSMichael Große * @param string $style 414451969abSMichael Große * @param string $data 415451969abSMichael Große * @throws Exception when user or style is empty 416451969abSMichael Große * @return bool 417451969abSMichael Große * 418451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::add 419451969abSMichael Große */ 420451969abSMichael Große public function add($id, $user, $style, $data = '') { 421451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::add'); 422451969abSMichael Große $manager = new SubscriberManager(); 423451969abSMichael Große return $manager->add($id, $user, $style, $data); 424451969abSMichael Große } 425451969abSMichael Große 426451969abSMichael Große /** 427451969abSMichael Große * Removes a subscription for the given page or namespace 428451969abSMichael Große * 429451969abSMichael Große * This removes all subscriptions matching the given criteria on the given page or 430451969abSMichael Große * namespace. It will *not* modify any subscriptions that may exist in higher 431451969abSMichael Große * namespaces. 432451969abSMichael Große * 433451969abSMichael Große * @param string $id The target object’s (namespace or page) id 434451969abSMichael Große * @param string|array $user 435451969abSMichael Große * @param string|array $style 436451969abSMichael Große * @param string|array $data 437451969abSMichael Große * @return bool 438451969abSMichael Große * 439451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::remove 440451969abSMichael Große */ 441451969abSMichael Große public function remove($id, $user = null, $style = null, $data = null) { 442451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::remove'); 443451969abSMichael Große $manager = new SubscriberManager(); 444451969abSMichael Große return $manager->remove($id, $user, $style, $data); 445451969abSMichael Große } 446451969abSMichael Große 447451969abSMichael Große /** 448451969abSMichael Große * Get data for $INFO['subscribed'] 449451969abSMichael Große * 450451969abSMichael Große * $INFO['subscribed'] is either false if no subscription for the current page 451451969abSMichael Große * and user is in effect. Else it contains an array of arrays with the fields 452451969abSMichael Große * “target”, “style”, and optionally “data”. 453451969abSMichael Große * 454451969abSMichael Große * @param string $id Page ID, defaults to global $ID 455451969abSMichael Große * @param string $user User, defaults to $_SERVER['REMOTE_USER'] 456451969abSMichael Große * @return array|false 457451969abSMichael Große * @author Adrian Lang <lang@cosmocode.de> 458451969abSMichael Große * 459451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::userSubscription 460451969abSMichael Große */ 461451969abSMichael Große public function user_subscription($id = '', $user = '') { 462451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::userSubscription'); 463451969abSMichael Große $manager = new SubscriberManager(); 464451969abSMichael Große return $manager->userSubscription($id, $user); 465451969abSMichael Große } 466451969abSMichael Große 467451969abSMichael Große /** 468451969abSMichael Große * Send digest and list subscriptions 469451969abSMichael Große * 470451969abSMichael Große * This sends mails to all subscribers that have a subscription for namespaces above 471451969abSMichael Große * the given page if the needed $conf['subscribe_time'] has passed already. 472451969abSMichael Große * 473451969abSMichael Große * This function is called form lib/exe/indexer.php 474451969abSMichael Große * 475451969abSMichael Große * @param string $page 476451969abSMichael Große * @return int number of sent mails 477451969abSMichael Große * 478451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk 479451969abSMichael Große */ 480451969abSMichael Große public function send_bulk($page) { 481451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\BulkSubscriptionSender::sendBulk'); 482451969abSMichael Große $subscriptionSender = new BulkSubscriptionSender(); 483451969abSMichael Große return $subscriptionSender->sendBulk($page); 484451969abSMichael Große } 485451969abSMichael Große 486451969abSMichael Große /** 487451969abSMichael Große * Send the diff for some page change 488451969abSMichael Große * 489451969abSMichael Große * @param string $subscriber_mail The target mail address 490451969abSMichael Große * @param string $template Mail template ('subscr_digest', 'subscr_single', 'mailtext', ...) 491451969abSMichael Große * @param string $id Page for which the notification is 492451969abSMichael Große * @param int|null $rev Old revision if any 493451969abSMichael Große * @param string $summary Change summary if any 494451969abSMichael Große * @return bool true if successfully sent 495451969abSMichael Große * 496451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff 497451969abSMichael Große */ 498451969abSMichael Große public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') { 499451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\PageSubscriptionSender::sendPageDiff'); 500451969abSMichael Große $subscriptionSender = new PageSubscriptionSender(); 501451969abSMichael Große return $subscriptionSender->sendPageDiff($subscriber_mail, $template, $id, $rev, $summary); 502451969abSMichael Große } 503451969abSMichael Große 504451969abSMichael Große /** 505451969abSMichael Große * Send the diff for some media change 506451969abSMichael Große * 507451969abSMichael Große * @fixme this should embed thumbnails of images in HTML version 508451969abSMichael Große * 509451969abSMichael Große * @param string $subscriber_mail The target mail address 510451969abSMichael Große * @param string $template Mail template ('uploadmail', ...) 511451969abSMichael Große * @param string $id Media file for which the notification is 512451969abSMichael Große * @param int|bool $rev Old revision if any 513451969abSMichael Große * 514451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff 515451969abSMichael Große */ 516451969abSMichael Große public function send_media_diff($subscriber_mail, $template, $id, $rev = false) { 517451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\MediaSubscriptionSender::sendMediaDiff'); 518451969abSMichael Große $subscriptionSender = new MediaSubscriptionSender(); 519451969abSMichael Große return $subscriptionSender->sendMediaDiff($subscriber_mail, $template, $id, $rev); 520451969abSMichael Große } 521451969abSMichael Große 522451969abSMichael Große /** 523451969abSMichael Große * Send a notify mail on new registration 524451969abSMichael Große * 525451969abSMichael Große * @author Andreas Gohr <andi@splitbrain.org> 526451969abSMichael Große * 527451969abSMichael Große * @param string $login login name of the new user 528451969abSMichael Große * @param string $fullname full name of the new user 529451969abSMichael Große * @param string $email email address of the new user 530451969abSMichael Große * @return bool true if a mail was sent 531451969abSMichael Große * 532451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister 533451969abSMichael Große */ 534451969abSMichael Große public function send_register($login, $fullname, $email) { 535451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\RegistrationSubscriptionSender::sendRegister'); 536451969abSMichael Große $subscriptionSender = new RegistrationSubscriptionSender(); 537451969abSMichael Große return $subscriptionSender->sendRegister($login, $fullname, $email); 538451969abSMichael Große } 539451969abSMichael Große 540451969abSMichael Große 541451969abSMichael Große /** 542451969abSMichael Große * Default callback for COMMON_NOTIFY_ADDRESSLIST 543451969abSMichael Große * 544451969abSMichael Große * Aggregates all email addresses of user who have subscribed the given page with 'every' style 545451969abSMichael Große * 546451969abSMichael Große * @author Steven Danz <steven-danz@kc.rr.com> 547451969abSMichael Große * @author Adrian Lang <lang@cosmocode.de> 548451969abSMichael Große * 549451969abSMichael Große * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead, 550451969abSMichael Große * use an array for the addresses within it 551451969abSMichael Große * 552451969abSMichael Große * @param array &$data Containing the entries: 553451969abSMichael Große * - $id (the page id), 554451969abSMichael Große * - $self (whether the author should be notified, 555451969abSMichael Große * - $addresslist (current email address list) 556451969abSMichael Große * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value) 557451969abSMichael Große * 558451969abSMichael Große * @deprecated 2019-04-20 \dokuwiki\Subscriptions\SubscriberManager::notifyAddresses 559451969abSMichael Große */ 560451969abSMichael Große public function notifyaddresses(&$data) { 561451969abSMichael Große DebugHelper::dbgDeprecatedFunction('\dokuwiki\Subscriptions\SubscriberManager::notifyAddresses'); 562451969abSMichael Große $manager = new SubscriberManager(); 563451969abSMichael Große $manager->notifyAddresses($data); 564451969abSMichael Große } 565451969abSMichael Große} 566*6225b270SMichael Große 567*6225b270SMichael Große/** 568*6225b270SMichael Große * @deprecated 2019-12-29 use \dokuwiki\Search\Indexer 569*6225b270SMichael Große */ 570*6225b270SMichael Großeclass Doku_Indexer extends \dokuwiki\Search\Indexer {}; 571