(Re)move deprecated functions

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

(Re)move deprecated functions

Post by cmb » Thu May 15, 2014 8:37 pm

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
Christoph M. Becker – Plugins for CMSimple_XH

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: (Re)move deprecated functions

Post by manu » Fri May 16, 2014 6:38 am

good idea! for 1.7.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: (Re)move deprecated functions

Post by cmb » Fri May 16, 2014 11:35 am

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. :)
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Move deprecated functions

Post by cmb » Thu Feb 26, 2015 2:59 pm

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?
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: (Re)move deprecated functions

Post by svasti » Thu Feb 26, 2015 3:11 pm

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']

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: (Re)move deprecated functions

Post by cmb » Thu Feb 26, 2015 3:14 pm

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?
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: (Re)move deprecated functions

Post by Holger » Thu Feb 26, 2015 5:42 pm

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 ?

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: (Re)move deprecated functions

Post by cmb » Thu Feb 26, 2015 5:50 pm

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.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: (Re)move deprecated functions

Post by cmb » Mon Mar 23, 2015 12:15 pm

cmb wrote:I have written a respective patch.
Applied (r1521).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply