1<?php
2	if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../../').'/');
3	if(!defined('NOSESSION')) define('NOSESSION',true);
4	if(!defined('EPUB_DIR')) define('EPUB_DIR',realpath(dirname(__FILE__).'/../').'/');
5	require_once(DOKU_INC.'inc/init.php');
6	require_once(EPUB_DIR.'/helper.php');
7	global $INPUT;
8	$helper = new  helper_plugin_epub();
9	$id = rawurldecode($INPUT->str('remove'));
10    if(!$helper->is_inCache($id)) {
11	  echo htmlentities($id) . " is not in the book creator list; you may use it for other purposes.\n";
12	  echo "To restore it to the list you must make an edit, no matter how small, and re-save the page.";
13	  exit;
14	}
15
16	$helper->remove_page($id);
17
18    if(!$helper->is_inCache($id)) {
19	   echo "$id has been successfully removed from the book creator list.\nTo restore it to the list you must make an edit,\nno matter how small, and re-save the page.";
20	}
21	else {
22	 echo "$id was not removed from book creator list.\n";
23	}
24