[web-wiki] master: Stop using deprecated methods
| From: | Derick Rethans | Date: | Fri, 04 Sep 2026 09:57:49 +0000 |
| Subject: | [web-wiki] master: Stop using deprecated methods | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-33997@lists.php.net to get a copy of this message | ||
Author: Derick Rethans (derickr)
Date: 2026-09-04T10:57:41+01:00
Commit: https://github.com/php/web-wiki/commit/cfcf758be8312d1d4915559d2cc7decaf554c9f3
Raw diff: https://github.com/php/web-wiki/commit/cfcf758be8312d1d4915559d2cc7decaf554c9f3.diff
Stop using deprecated methods
Changed paths:
M dokuwiki/lib/tpl/phpnet/main.php
M dokuwiki/lib/tpl/phpnet/tpl_header.php
Diff:
diff --git a/dokuwiki/lib/tpl/phpnet/main.php b/dokuwiki/lib/tpl/phpnet/main.php
index 7fce4e14..f52f9a2e 100644
--- a/dokuwiki/lib/tpl/phpnet/main.php
+++ b/dokuwiki/lib/tpl/phpnet/main.php
@@ -98,28 +98,7 @@
<h3 class="a11y"><?php echo $lang['page_tools'];
?></h3>
<div class="tools">
<ul>
- <?php
- $data = array(
- 'view' => 'main',
- 'items' => array(
- 'edit' => tpl_action('edit',
1, 'li', 1, '<span>', '</span>'),
- 'revert' => tpl_action('revert',
1, 'li', 1, '<span>', '</span>'),
- 'revisions' => tpl_action('revisions',
1, 'li', 1, '<span>', '</span>'),
- 'backlink' => tpl_action('backlink',
1, 'li', 1, '<span>', '</span>'),
- 'subscribe' => tpl_action('subscribe',
1, 'li', 1, '<span>', '</span>'),
- 'top' => tpl_action('top',
1, 'li', 1, '<span>', '</span>')
- )
- );
-
- // the page tools can be amended through a custom plugin hook
- $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
- if($evt->advise_before()){
- foreach($evt->data['items'] as $k => $html) echo
$html;
- }
- $evt->advise_after();
- unset($data);
- unset($evt);
- ?>
+ <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?>
</ul>
</div>
</div>
diff --git a/dokuwiki/lib/tpl/phpnet/tpl_header.php b/dokuwiki/lib/tpl/phpnet/tpl_header.php
index 3f192ce0..1ddd5cdc 100644
--- a/dokuwiki/lib/tpl/phpnet/tpl_header.php
+++ b/dokuwiki/lib/tpl/phpnet/tpl_header.php
@@ -47,10 +47,7 @@
tpl_userinfo(); * 'Logged in as ...' *
echo '</li>';
}
- tpl_action('admin', 1, 'li');
- tpl_action('profile', 1, 'li');
- tpl_action('register', 1, 'li');
- tpl_action('login', 1, 'li');
+ echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
?>
</ul>
</div>
@@ -61,14 +58,10 @@
<h3 class="a11y"><?php echo $lang['site_tools'];
?></h3>
<?php tpl_searchform(); ?>
<div class="mobileTools">
- <?php tpl_actiondropdown($lang['tools']); ?>
+ <?php echo (new
\dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?>
</div>
<ul>
- <?php
- tpl_action('recent', 1, 'li');
- tpl_action('media', 1, 'li');
- tpl_action('index', 1, 'li');
- ?>
+ <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ',
false); ?>
</ul>
</div>