Newer
Older
* Drops all archive tables.
*/
public static function deleteArchiveTables()
foreach (ArchiveTableCreator::getTablesArchivesInstalled() as $table) {
Db::query("DROP TABLE IF EXISTS $table");
}
ArchiveTableCreator::refreshTableList($forceReload = true);
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
/**
* Removes content from PDF binary the content that changes with the datetime or other random Ids
*/
protected function normalizePdfContent($response)
{
// normalize date markups and document ID in pdf files :
// - /LastModified (D:20120820204023+00'00')
// - /CreationDate (D:20120820202226+00'00')
// - /ModDate (D:20120820202226+00'00')
// - /M (D:20120820202226+00'00')
// - /ID [ <0f5cc387dc28c0e13e682197f485fe65> <0f5cc387dc28c0e13e682197f485fe65> ]
$response = preg_replace('/\(D:[0-9]{14}/', '(D:19700101000000', $response);
$response = preg_replace('/\/ID \[ <.*> ]/', '', $response);
$response = preg_replace('/\/id:\[ <.*> ]/', '', $response);
$response = $this->removeXmlElement($response, "xmp:CreateDate");
$response = $this->removeXmlElement($response, "xmp:ModifyDate");
$response = $this->removeXmlElement($response, "xmp:MetadataDate");
$response = $this->removeXmlElement($response, "xmpMM:DocumentID");
$response = $this->removeXmlElement($response, "xmpMM:InstanceID");
return $response;
}