Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin tutorial adaptations for GLPI v11 #169

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/plugins/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,11 @@ An optional constant declaration for your plugin version number used later in th
function plugin_init_myplugin() {
global $PLUGIN_HOOKS;

$PLUGIN_HOOKS['csrf_compliant']['myplugin'] = true;
//hooks declarations here...
}

This instanciation function is important, we will declare later here `Hooks` on GLPI internal API.
It's systematically called on **all** GLPI pages except if the ``_check_prerequisites`` fails (see below).
We declare here that our plugin forms are `CSRF <https://en.wikipedia.org/wiki/Cross-Site_Request_Forgery>`_ compliant even if for now our plugin does not contain any form.

**🗋 setup.php**

Expand Down