Skip to content

Commit

Permalink
Include digits in single photo URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Feb 26, 2024
1 parent bccd6b7 commit b03c4b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gallery/console/admin-server/library.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ function saveAccountsDb($db) {
}

function toUriCode($caption) {
return preg_replace("/\s+/", "-", trim(preg_replace("/[^a-z]/", " ", strtolower($caption))));
// Turns a caption, like "Mona Lisa (1503)", into a URL safe string, like "mona-lisa-1503".
return preg_replace("/\s+/", "-", trim(preg_replace("/[^a-z0-9]/", " ", strtolower($caption))));
}

function displayTrue($imageDb) {
Expand Down

0 comments on commit b03c4b4

Please sign in to comment.