Upgrade to 2024-02-06b "Kaos"

This commit is contained in:
Derick Rethans
2024-08-20 10:41:16 +01:00
parent ac07a6641d
commit 5ccdaa2a32
7 changed files with 26 additions and 36 deletions

View File

@ -1 +1 @@
2024-02-06a "Kaos"
2024-02-06b "Kaos"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -13,7 +13,7 @@ use dokuwiki\ChangeLog\PageChangeLog;
use dokuwiki\Extension\Event;
// update message version - always use a string to avoid localized floats!
$updateVersion = "55.1";
$updateVersion = "55.2";
// xdebug_start_profiling();

View File

@ -86,6 +86,9 @@ class Export extends AbstractAction
$headers['Content-Type'] = 'text/html; charset=utf-8';
$output = p_wiki_xhtml($ID, $REV, false);
break;
case 'metadata':
// metadata should not be exported
break;
default:
$output = p_cached_output(wikiFN($ID, $REV), $mode, $ID);
$headers = p_get_metadata($ID, "format $mode");

View File

@ -108,6 +108,8 @@ class Doku_Renderer_metadata extends Doku_Renderer
if (!isset($this->meta['date']['modified'])) {
$this->meta['date']['modified'] = filemtime(wikiFN($ID));
}
$this->doc = '';
}
/**

View File

@ -15,13 +15,13 @@
*/
class helper_plugin_authplain_escaping_test extends DokuWikiTest {
protected $pluginsEnabled = array('authplainharness');
/** @var auth_plugin_authplain|auth_plugin_authplainharness */
protected $pluginsEnabled = array('authplain');
/** @var auth_plugin_authplain */
protected $auth;
protected function reloadUsers() {
/* auth caches data loaded from file, but recreated object forces reload */
$this->auth = new auth_plugin_authplainharness();
$this->auth = new auth_plugin_authplain();
}
function setUp() : void {
@ -66,6 +66,14 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
$this->assertEquals($name,$user['name']);
}
public function testNameWithHash() {
$name = "Hash # User";
$this->auth->createUser("slashuser", "password", $name, "me@example.com");
$this->reloadUsers();
$user = $this->auth->getUserData("slashuser");
$this->assertEquals($name,$user['name']);
}
public function testModifyUser() {
global $conf;
$conf['passcrypt'] = 'mediawiki';
@ -83,8 +91,6 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
// really only required for developers to ensure this plugin will
// work with systems running on PCRE 6.6 and lower.
public function testLineSplit(){
$this->auth->setPregsplit_safe(false);
$names = array(
'plain',
'ut-fठ8',
@ -98,7 +104,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
foreach ($names as $testname) {
$escaped = str_replace(array('\\',':'),array('\\\\','\\:'),$testname); // escape : & \
$test_line = $userpass.$escaped.$other_user_data;
$result = $this->auth->splitUserData($test_line);
$result = $this->callInaccessibleMethod($this->auth, 'splitUserData', [$test_line]);
$this->assertEquals($escaped, $result[2]);
}
@ -129,31 +135,3 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
$this->assertEquals($expected, $this->auth->cleanGroup($input));
}
}
/**
* Class auth_plugin_authplainharness
*/
class auth_plugin_authplainharness extends auth_plugin_authplain {
/**
* @param boolean $bool
*/
public function setPregsplit_safe($bool) {
$this->pregsplit_safe = $bool;
}
/**
* @return bool|mixed
*/
public function getPregsplit_safe(){
return $this->pregsplit_safe;
}
/**
* @param string $line
* @return array
*/
public function splitUserData($line){
return parent::splitUserData($line);
}
}

View File

@ -60,4 +60,11 @@ class WriterTest extends \DokuWikiTest {
clearstatcache($config);
$this->assertGreaterThan($old, filemtime($config));
}
public function testEmpty() {
$writer = new Writer();
$this->expectException(\Exception::class);
$this->expectErrorMessage('empty config');
$writer->save([]);
}
}