Page 1 of 1

(Re)move deprecated functions

Posted: Thu May 15, 2014 8:37 pm
by cmb
Hello Community,

we have deprecated some functions:
  • 1.5.4: autogallery, rp, amp, guestbooklink
  • 1.5.8: legallink
  • 1.6: chkdl, rf, chkfile, preCallPlugins, writelog
At least those that have been deprecated since 1.5.4 (released 2012-09-22) might be removed for XH 1.7. However, I am somewhat reluctant to really remove them, as there are lots of plugins around which still use amp() (and these may never be fixed), and even the other functions may be used sometimes.

So we may consider to move these functions to a new file (say, cmsimple/compat.php), and to offer a hidden config option to include or exclude this file (not sure about the default). This way we may have a better chance to make users aware of the problem and maybe that will push plugin developers to get rid of these functions (resp. to replace old and unmaintained plugins). At least users which won't need this plugins can save a few kB of PHP code to be parsed on each request.

What do you think?

Christoph

Re: (Re)move deprecated functions

Posted: Fri May 16, 2014 6:38 am
by manu
good idea! for 1.7.

Re: (Re)move deprecated functions

Posted: Fri May 16, 2014 11:35 am
by cmb
BTW: I should have mentioned that something very similar was done for CMSimple 2.8 with the file cmsimple/functions.php; see http://forum.cmsimple-xh.dk/?f=1&t=5261. However, when I added new functions for XH 1.5, I've put these into functions.php, and unfortunately nobody pointed that out. So here we go again. :)

Re: Move deprecated functions

Posted: Thu Feb 26, 2015 2:59 pm
by cmb
I have written a respective patch. I'm quite convinced that the default of the setting should be to include the compatibility functions. I'm not sure, however, whether it's better to expose the config setting (i.e. don't hide it). I'm also quite unsure about the name (currently $cf['site']['compat']). Any thoughts?

Re: (Re)move deprecated functions

Posted: Thu Feb 26, 2015 3:11 pm
by svasti
cmb wrote:I'm not sure, however, whether it's better to expose the config setting (i.e. don't hide it).
I thought there was the idea to implement a dialog for advanced settings, where we would put all these settings which normally do not have to be changed, e.g.: $cf['mailform']['lf_only']

Re: (Re)move deprecated functions

Posted: Thu Feb 26, 2015 3:14 pm
by cmb
svasti wrote:I thought there was the idea to implement a dialog for advanced settings, where we would put all these settings which normally do not have to be changed, e.g.: $cf['mailform']['lf_only']
That doesn't appear to be on the roadmap. Do you have a link to the relevant discussion?

Re: (Re)move deprecated functions

Posted: Thu Feb 26, 2015 5:42 pm
by Holger
cmb wrote:That doesn't appear to be on the roadmap. Do you have a link to the relevant discussion?
Maybe this post: http://cmsimpleforum.com/viewtopic.php? ... 007#p43496 ?

Re: (Re)move deprecated functions

Posted: Thu Feb 26, 2015 5:50 pm
by cmb
Holger wrote:Maybe this post: viewtopic.php?f=29&t=8007#p43496 ?
Ah, thanks. I'll open a respective discussion thread, if noone beats me to it.

Re: (Re)move deprecated functions

Posted: Mon Mar 23, 2015 12:15 pm
by cmb
cmb wrote:I have written a respective patch.
Applied (r1521).