remove calls to deprecated methods and classes

This commit is contained in:
Andreas Gohr 2020-05-01 23:30:25 +02:00
parent 392db49b48
commit c1ec88ce7a
6 changed files with 10 additions and 11 deletions

View File

@ -72,7 +72,7 @@ if($DATE_AT) {
//check for existing $REV related to $DATE_AT
if($DATE_AT) {
$pagelog = new PageChangeLog($ID);
$pagelog = new \dokuwiki\ChangeLog\PageChangeLog($ID);
$rev_t = $pagelog->getLastRevisionAt($DATE_AT);
if($rev_t === '') { //current revision
$REV = null;

View File

@ -26,7 +26,7 @@ class CacheParser extends Cache
$this->file = $file;
$this->mode = $mode;
$this->_event = 'PARSER_CACHE_USE';
$this->setEvent('PARSER_CACHE_USE');
parent::__construct($file . $_SERVER['HTTP_HOST'] . $_SERVER['SERVER_PORT'], '.' . $mode);
}

View File

@ -5,7 +5,6 @@ namespace dokuwiki;
use dokuwiki\Extension\Event;
use dokuwiki\Sitemap\Mapper;
use dokuwiki\Subscriptions\BulkSubscriptionSender;
use Subscription;
/**
* Class TaskRunner

View File

@ -1175,9 +1175,9 @@ function parsePageTemplate(&$data) {
$id,
getNS($id),
curNS($id),
utf8_ucfirst(curNS($id)),
utf8_ucwords(curNS($id)),
utf8_strtoupper(curNS($id)),
\dokuwiki\Utf8\PhpString::ucfirst(curNS($id)),
\dokuwiki\Utf8\PhpString::ucwords(curNS($id)),
\dokuwiki\Utf8\PhpString::strtoupper(curNS($id)),
$file,
\dokuwiki\Utf8\PhpString::ucfirst($file),
\dokuwiki\Utf8\PhpString::strtoupper($file),
@ -1495,7 +1495,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$data = array('id' => $id, 'addresslist' => '', 'self' => false, 'replacements' => $replace);
Event::createAndTrigger(
'COMMON_NOTIFY_ADDRESSLIST', $data,
array(new Subscription(), 'notifyaddresses')
array(new \dokuwiki\Subscriptions\SubscriberManager(), 'notifyAddresses')
);
$to = $data['addresslist'];
if(empty($to)) return false;
@ -1665,7 +1665,7 @@ function obfuscate($email) {
return strtr($email, $obfuscate);
case 'hex' :
return utf8_tohtml($email, true);
return \dokuwiki\Utf8\Conversion::toHtml($email, true);
case 'none' :
default :

View File

@ -64,7 +64,7 @@ function plugin_isdisabled($plugin)
{
/** @var $plugin_controller PluginController */
global $plugin_controller;
return $plugin_controller->isdisabled($plugin);
return !$plugin_controller->isEnabled($plugin);
}
/**

View File

@ -175,7 +175,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin
/* @var PluginController $plugin_controller */
global $plugin_controller;
return !$plugin_controller->isdisabled($this->base);
return $plugin_controller->isEnabled($this->base);
}
/**
@ -367,7 +367,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin
$dependencies = $this->getDependencies();
$missing_dependencies = array();
foreach ($dependencies as $dependency) {
if ($plugin_controller->isdisabled($dependency)) {
if (!$plugin_controller->isEnabled($dependency)) {
$missing_dependencies[] = $dependency;
}
}