Skip to content
Snippets Groups Projects
Commit 32836d03 authored by Cloud User's avatar Cloud User
Browse files

fix preg_replace syntax, first char is separator

parent 827d3093
No related branches found
No related tags found
1 merge request!1Resolve "Ta inn endringer fra skeivt arkiv lodspeakr"
......@@ -21,8 +21,8 @@ class UriModule extends abstractModule{
$pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb);
#Stripping html to look up and write correct url in database if not exists
#Fix to handle pages that have not been loaded after cleaning out database
$localUri_stripped = preg_replace("^(.+)\.html$", "\\1", $localUri);
$uri_stripped = preg_replace("^(.+)\.html$", "\\1", $uri);
$localUri_stripped = preg_replace("/^(.+)\.html$/i", "\\1", $localUri);
$uri_stripped = preg_replace("/^(.+)\.html$/i", "\\1", $uri);
if($pair == NULL){ // Original URI is not in metadata
if(Queries::uriExist($uri_stripped, $endpoints['local'])){
$page = Queries::createPage($uri_stripped, $localUri_stripped, $acceptContentType, $metaDb);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment