glensc / dokuwiki-plugin-pageredirect

Redirects page requests based on content
https://www.dokuwiki.org/plugin:pageredirect
19 stars 19 forks source link

_hooks array is protected. Use new sorting mechanism #10

Closed Klap-in closed 10 years ago

Klap-in commented 10 years ago

Since https://github.com/splitbrain/dokuwiki/pull/555 the _hooks attribute is protected (in development release). A new sorting mechanism is introduced as well, please implement it.

Chris--S commented 10 years ago

To remain compatible with DW versions both before and after PR#555 change, you could do something like: $controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'handle_pageredirect_note', null, -PHP_INT_MAX); // ... if (isset($controller->_hook)) { // your current lines 24 - 28 }