From d6f61e46ea1699ecd14e9b86e7e56057d145e956 Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Fri, 22 Dec 2017 10:47:40 +0100 Subject: [PATCH] Append metadataPrefix to token name --- oai2server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oai2server.php b/oai2server.php index b899986..0faabac 100644 --- a/oai2server.php +++ b/oai2server.php @@ -244,8 +244,8 @@ class OAI2Server { private function createResumptionToken($deliveredRecords, $metadataPrefix, $from, $until) { list($usec, $sec) = explode(' ', microtime()); - $token = ((int)($usec*1000) + (int)($sec*1000)); - $file = fopen($this->token_prefix.$token.'#'.$metadataPrefix, 'w'); + $token = ((int)($usec*1000) + (int)($sec*1000)).'#'.$metadataPrefix; + $file = fopen($this->token_prefix.$token, 'w'); if($file == false) { exit('Cannot write resumption token. Writing permission needs to be changed.'); }