Skip to content

Commit

Permalink
seo_cleanup: remove some duplicates and improve hyphen replacements #…
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylian committed Sep 30, 2018
1 parent 336fc68 commit d124977
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions zp-core/zp-extensions/seo_zenphoto.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ function handleOption($option, $currentValue) {
"" => "A",
"" => "A",
"" => "A",
"Å" => "A",
"Ä" => "AE",
"Æ" => "AE",
"Ǽ" => "AE",
Expand Down Expand Up @@ -165,7 +164,6 @@ function handleOption($option, $currentValue) {
"Į" => "I",
"Ȋ" => "I",
"" => "I",
"" => "I",
"Ɨ" => "I",
"" => "I",
"Ĵ" => "J",
Expand All @@ -177,7 +175,6 @@ function handleOption($option, $currentValue) {
"Ķ" => "K",
"" => "L",
"" => "L",
"" => "L",
"Ļ" => "L",
"" => "L",
"Ľ" => "L",
Expand Down Expand Up @@ -230,7 +227,6 @@ function handleOption($option, $currentValue) {
"Ǭ" => "O",
"" => "O",
"Ɔ" => "O",
"Ø" => "OE",
"Ǿ" => "OE",
"Œ" => "OE",
"" => "P",
Expand Down Expand Up @@ -576,7 +572,6 @@ function handleOption($option, $currentValue) {
"ǖ" => "u",
"ǜ" => "u",
"ǘ" => "u",
"ǖ" => "u",
"ǚ" => "u",
"" => "u",
"" => "u",
Expand Down Expand Up @@ -868,9 +863,6 @@ function handleOption($option, $currentValue) {
"" => "r",
"" => "r",
"" => "R",
"ŕ" => "r",
"ř" => "r",
"ŗ" => "r",
"" => "s",
"" => "sh",
"ſ" => "ss",
Expand All @@ -879,9 +871,6 @@ function handleOption($option, $currentValue) {
"" => "ts",
"" => "ts",
"" => "u",
"ü" => "u",
"ü" => "u",
"Ü" => "Ue",
"" => "v",
"" => "y",
"" => "y",
Expand Down Expand Up @@ -1086,7 +1075,7 @@ static function filter($string) {
$string = strtolower($string);
$string = preg_replace("/\s+/", "-", $string);
$string = preg_replace("/[^a-zA-Z0-9_.-]/", "-", $string);
$string = str_replace(array('---', '--'), '-', $string);
$string = preg_replace("/--+/", "-", $string);
return $string;
}

Expand Down Expand Up @@ -1121,6 +1110,4 @@ function seoFriendlyJS(fname) {
return $js;
}

}

?>
}

0 comments on commit d124977

Please sign in to comment.