replace deprecated function calls #3266

This commit is contained in:
Andreas Gohr 2020-10-13 15:29:48 +02:00
parent a3bfbb3c10
commit a7e2efd2e2
2 changed files with 5 additions and 5 deletions

View File

@ -290,7 +290,7 @@ function auth_browseruid() {
$uid .= $INPUT->server->str('HTTP_USER_AGENT');
$uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET');
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
$uid = \dokuwiki\Utf8\PhpString::strtolower($uid);
return md5($uid);
}
@ -527,7 +527,7 @@ function auth_isMember($memberlist, $user, array $groups) {
// clean user and groups
if(!$auth->isCaseSensitive()) {
$user = \dokuwiki\Utf8\PhpString::strtolower($user);
$groups = array_map('utf8_strtolower', $groups);
$groups = array_map([\dokuwiki\Utf8\PhpString::class, 'strtolower'], $groups);
}
$user = $auth->cleanUser($user);
$groups = array_map(array($auth, 'cleanGroup'), $groups);

View File

@ -6,7 +6,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../');
if (!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../');
require_once(DOKU_INC . 'inc/init.php');
//close session
@ -17,8 +17,8 @@ header('Content-Type: text/html; charset=utf-8');
//call the requested function
global $INPUT;
if($INPUT->has('call')) {
$call = $INPUT->filter('utf8_stripspecials')->str('call');
if ($INPUT->has('call')) {
$call = $INPUT->filter([\dokuwiki\Utf8\Clean::class, 'stripspecials'])->str('call');
new \dokuwiki\Ajax($call);
} else {
http_status(404);