I used the search functions of dw inside a plugin to hierarchically list all/namespace pages in the wiki.
The plugin shows different content for normal users and admins. If "showhidden" is not supported, it is impossible to show a admin hidden pages, or only hidden pages of his wiki.
This was the motivation for this patch (better then create a new search function).
The "Duplicate"
https://bugs.dokuwiki.org/index.php?do=details&task_id=1670 is outdated and to old, it can be deleted. The dw code has changed since then.