New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 'returnonly' option to all xhtml link types #1239
Conversation
The inspection completed: 2 updated code elements |
Implements an significant point of an issue in old bug tracker as well: |
I'm generally very much in favour of this. But... I just wanted to write that these changes should be consistent with the core code but then discovered that we are not very consistent to begin with. I think this is what we mostly do => https://github.com/splitbrain/dokuwiki/blob/master/inc/template.php#L465-472 (i.e. variable is called |
Well, I used the variable name from the (already existing) internallink function and tried to copy its behaviour. While doing so, I noticed the same, i.e. that the variable is simply called $return in another function or that the handling is slightly different. |
Which approach is preferred? |
I think it's okay this way. |
Add a 'returnonly' option to all xhtml link types
Maybe a way would be if new functions would be defined, witch return the data and not use print/echo at all. And the old function can be used as a "wrapper" with the only function to print the data. In this way the functions can be deprecated, and anyway keep functional with plugins and old code. I don't know what makes more sense, parameter-$returnonly vs new-functions.(?) |
((Out off topic: i think since long time, if it would be possible to use a automatic patching system for deprecated functions or renamed/parameter-reordered functions. (i seen this by the software unity3d, the only software i know from, witch updates codes of costumers automatically.) |
There are lots of functions which would need to be deprecated then. |
Yes i seen this too and would prefer a array for the (at least optional) parameters. The large list of parameters is the reason why i put the idea here to use new functions, instead of a other parameter after a chain of already existing ones. (But maybe this would cause a to big rebuild of existing codes. (?) ) At least dw could use them, and the templates/plugins had do be updated, probably over many years. Or the old ones could be keeped for convenience. |
This PR adds a returnonly option to all xhtml link types, not just to internallink. In order to support different renderers in the data plugin, this is required.