Firefox PHP

phorum_api_forums_delete($forum_id)

Posted by AbsolutelyFreeWeb 
phorum_api_forums_delete($forum_id)
July 08, 2011 05:09AM
Tell me if this bundle is desired or not :

Create phorum_api_forums_delete($forum_id)
move and rename phorum_admin_set_vroot to phorum_api_forums_set_vroot (used by method above)
change deletefolder.php to use phorum_api_forums_delete
change references to phorum_admin_set_vroot to use the new name instead

if not, please explain what piece of information I'm missing :)
Re: phorum_api_forums_delete($forum_id)
July 08, 2011 05:11AM
by the way, is there a refactoring tool for php ?
Re: phorum_api_forums_delete($forum_id)
July 08, 2011 05:22AM
Some IDE's (like phpStorm, Zend IDE, Eclipse PDT) are helping with refactoring. I've never trusted them on that though.

Well, there was no need to put that into the api because its used in the admin area only. What are you up to? ;-)

But I'm not against moving it into the general api.


Thomas Seifert
Re: phorum_api_forums_delete($forum_id)
July 08, 2011 06:02AM
Cool, thanks for the tips. ...and wow jetbrains gives it free for open source projects !!! I have good experience from their Java IDE

you know, for my external admin area of course ^^
Re: phorum_api_forums_delete($forum_id)
July 18, 2011 04:00PM
FYI: I updated your phorum_api_forums_delete() function. I pushed it into a direction that is more compatible with the rest of the API code. A lot of old code was copied into the forums API, but functionality was already covered by existing functionality in the API.

From a functional perspective, the changes are:
  • a changed return value (full $forum data array instead of only the folder_flag value from that array)
  • a new module hook "admin_folder_delete"

I have to update the code that is effected by the API change (i.e. the admin interface). That will follow in my next code push.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: phorum_api_forums_delete($forum_id)
July 18, 2011 10:14PM
Thanks.

I've had jet lag all week, and my suitcase has vanished in the trip, so I've been put off
Re: phorum_api_forums_delete($forum_id)
July 18, 2011 10:34PM
Hi, just looked at the code in github briefly,

shouldn't the admin_folder_delete hook be inside the folder/forum check, like admin_forum_delete is ?

otherwise a forum delete will trigger both admin_folder_delete and admin_forum_delete.... no?



Edited 1 time(s). Last edit at 07/18/2011 10:35PM by AbsolutelyFreeWeb.
Re: phorum_api_forums_delete($forum_id)
July 19, 2011 12:58AM
Yeah, correct. I saw it too when reviewing my change this morning. Thanks for the heads up. I moved the hook down a bit.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login