function ewiki_handler_cache_full($id, &$data, $action) { global $ewiki_config; if (in_array($action, $ewiki_config["cache.actions"]) && ($cache = ewiki_get_cache($action, $id))) { if ($cache["lastmodified"] >= $data["lastmodified"]) { $data =& $cache; ewiki_http_headers($data["content"], $id, $cache, $action); return $data["content"]; } } }
function GET($path) { #-- page name, look it up in database $id = $this->id($path); $version = NULL; $data = ewiki_db::GET($id, $version); #-- found? if ($id && $data && $data["version"]) { #-- headers ewiki_http_headers($data["content"], $id, $data, "view", $_saveasfn = 0); #-- send return $this->GET_response($data["content"], $data["lastmodified"], EWIKI_PAGE_CTYPE); } else { return "404 Not Found"; } }