register_hook('PLUGIN_MOVE_PAGE_RENAME', 'AFTER', $this, 'handle_move', true); } /** * Renames all occurances of a page ID in the database * * @param Doku_Event $event event object by reference * @param bool $ispage is this a page move operation? * @return bool */ public function handle_move(Doku_Event $event, $ispage) { $old = $event->data['src_id']; $new = $event->data['dst_id']; $db_helper = plugin_load('helper', 'ireadit_db'); $sqlite = $db_helper->getDB(); //move revision history $sqlite->query('UPDATE ireadit SET page=? WHERE page=?', $new, $old); } }