OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca
This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
What is the meaning of the return value of manage() in a plugin? On what basis should I be deciding to return true or false?
The sample plugin in the OJS Technical Reference seems to return true if the verb was "managed" (more accurately, it returns true if one of the case statement switches matches, not based on the success or failure of the respective action); while the webFeed plugin is returns false if a verb matches the case statement (again, that's regardless of the success or failure of the get/set verb handling itself).
Aren't these opposing semantics? Have I misunderstood something? How will OJS interpret my return value?
- Posts: 113
- Joined: Fri Mar 30, 2007 3:32 pm
If the manage() function returns true, it indicates to the handler class (pages/manager/PluginHandler.inc.php) that the plugin has already provided the user with feedback, i.e. a redirect or a page display. If the manage() function returns false, the PluginHandler will take responsibility for redirecting the user somewhere else.
Public Knowledge Project Team
- Posts: 10015
- Joined: Wed Aug 10, 2005 12:56 pm
Return to OJS Development
Who is online
Users browsing this forum: No registered users and 2 guests