Use another token to split string

This commit is contained in:
Sebastian Meyer 2017-12-22 10:50:55 +01:00
parent d6f61e46ea
commit 0148400ecc
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ class OAI2Server {
private function createResumptionToken($deliveredRecords, $metadataPrefix, $from, $until) {
list($usec, $sec) = explode(' ', microtime());
$token = ((int)($usec*1000) + (int)($sec*1000)).'#'.$metadataPrefix;
$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.');

View File

@ -142,7 +142,7 @@
<xsl:variable name='metadataPrefix' select="/oai:OAI-PMH/oai:request/@metadataPrefix"/>
</xsl:if>
<xsl:if test="/oai:OAI-PMH/oai:request/@resumptionToken">
<xsl:variable name='metadataPrefix' select="substring-after(/oai:OAI-PMH/oai:request/@resumptionToken,'#')"/>
<xsl:variable name='metadataPrefix' select="substring-after(/oai:OAI-PMH/oai:request/@resumptionToken,'_')"/>
</xsl:if>
<xsl:variable name='from' select="/oai:OAI-PMH/oai:request/@from"/>
<xsl:variable name='until' select="/oai:OAI-PMH/oai:request/@until"/>