mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Add flag to keep dots
This commit is contained in:
@@ -1391,7 +1391,7 @@ class unicode
|
|||||||
return $no_diacritics;
|
return $no_diacritics;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove_nonazAZ09($string, $keep_underscores = true, $keep_minus = true)
|
public function remove_nonazAZ09($string, $keep_underscores = true, $keep_minus = true, $keep_dot = false)
|
||||||
{
|
{
|
||||||
$regexp = '/[a-zA-Z0-9';
|
$regexp = '/[a-zA-Z0-9';
|
||||||
if ($keep_minus === true)
|
if ($keep_minus === true)
|
||||||
@@ -1402,6 +1402,11 @@ class unicode
|
|||||||
{
|
{
|
||||||
$regexp .= '_';
|
$regexp .= '_';
|
||||||
}
|
}
|
||||||
|
if ($keep_dot === true)
|
||||||
|
{
|
||||||
|
$regexp .= '\.';
|
||||||
|
}
|
||||||
|
|
||||||
$regexp .= ']{1}/';
|
$regexp .= ']{1}/';
|
||||||
|
|
||||||
$string = $this->remove_diacritics($string);
|
$string = $this->remove_diacritics($string);
|
||||||
|
Reference in New Issue
Block a user