Append metadataPrefix to token name

This commit is contained in:
Sebastian Meyer 2017-12-22 10:47:40 +01:00
parent e5c96c160f
commit d6f61e46ea
1 changed files with 2 additions and 2 deletions

View File

@ -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.');
}