Browse Source

Minor fix

master
Said Achmiz 4 years ago
parent
commit
ddcabfc155
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      versioned-assets.php

+ 3
- 4
versioned-assets.php View File

* \brief Adds versions (modification timestamps) to attachment URLs, so that browser * \brief Adds versions (modification timestamps) to attachment URLs, so that browser
* caches invalidate properly when attachments are updated. * caches invalidate properly when attachments are updated.
*/ */
$RecipeInfo['VersionedAssets']['Version'] = '2017-12-13';
$RecipeInfo['VersionedAssets']['Version'] = '2021-12-12';


global $LinkFunctions; global $LinkFunctions;
$LinkFunctions['Attach:'] = 'LinkUploadVersioned'; $LinkFunctions['Attach:'] = 'LinkUploadVersioned';
global $VersionedAssetsReattachFileExtension; global $VersionedAssetsReattachFileExtension;
if ($VersionedAssetsReattachFileExtension == true) { if ($VersionedAssetsReattachFileExtension == true) {
## Re-attach the file extension, so that LinkIcons and such things work properly. ## Re-attach the file extension, so that LinkIcons and such things work properly.
preg_match("/\\.[^\\.]+$/", $path, $matches);
preg_match('/\.[^\.]+$/', $path, $matches);
$versioned_path .= $matches[0]; $versioned_path .= $matches[0];
} }
return LinkIMap($pagename, $imap, $versioned_path, $alt, $txt, $fmt); return LinkIMap($pagename, $imap, $versioned_path, $alt, $txt, $fmt);
}

}

Loading…
Cancel
Save