Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
32836d03
Commit
32836d03
authored
4 years ago
by
Cloud User
Browse files
Options
Downloads
Patches
Plain Diff
fix preg_replace syntax, first char is separator
parent
827d3093
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Resolve "Ta inn endringer fra skeivt arkiv lodspeakr"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/modules/uriModule.php
+2
-2
2 additions, 2 deletions
classes/modules/uriModule.php
with
2 additions
and
2 deletions
classes/modules/uriModule.php
+
2
−
2
View file @
32836d03
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment