Useful for AJAX requests which burns the token
public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin';
+ public static $GET_TOKEN = 'token';
+
/**
* Reproducing renderPage() if hell, to avoid regression.
*
return self::$PAGE_SAVE_PLUGINSADMIN;
}
+ if (startsWith($query, 'do='. self::$GET_TOKEN)) {
+ return self::$GET_TOKEN;
+ }
+
return self::$PAGE_LINKLIST;
}
}
exit;
}
+ // Get a fresh token
+ if ($targetPage == Router::$GET_TOKEN) {
+ header('Content-Type:text/plain');
+ echo getToken($conf);
+ exit;
+ }
+
// -------- Otherwise, simply display search form and links:
showLinkList($PAGE, $LINKSDB, $conf, $pluginManager);
exit;