core
core copied to clipboard
OCP\Util::addHeader() has a $text parameter that is never used
Steps to reproduce
- Use \OCP\Util::addHeader('title', array(), "Title Text");
- Check rendered HTML
Expected behaviour
Tell us what should happen
<title>Title Text</title>
Actual behaviour
Tell us what happens instead
<title />
Server configuration
ownCloud version: (see ownCloud admin page)
7.0.2
Updated from an older ownCloud or fresh install:
Updated from OC6
Client configuration
Browser:
Firefox
Operating system:
Fedora
Relevant Information
Sticking a die in \OCP\Util::addHeader() shows the parameter is being passed in correctly.
The problem appears to be in the template core/templates/layout.base.php
<?php foreach($_['headers'] as $header): ?>
<?php
print_unescaped('<'.$header['tag'].' ');
foreach($header['attributes'] as $name=>$value) {
print_unescaped("$name='$value' ");
};
print_unescaped('/>');
?>
<?php endforeach; ?>
Would you mind providing a PR for this if you have an idea how to fix it ?
We already have https://github.com/owncloud/core/pull/7316 - I'll rebase and test it.