OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher
The OJS Technical Reference
and the OJS API Reference
are both available from the OJS Documentation
You can access our public Git Repository here
. Comprehensive Git usage instructions are available on the wiki
You can access our Bugzilla report tracker here
You can use our Google Custom Search
to search across our main website, the support forum, and Bugzilla.
Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion
subforum; if you have a technical support question, try the OJS Technical Support
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: 9050
- Joined: Wed Aug 10, 2005 12:56 pm
Return to OJS Development
Who is online
Users browsing this forum: No registered users and 1 guest