mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
Fix incorrect slug generation for GiftCategory
This commit is contained in:
parent
20ca453e34
commit
c17c3382a0
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ namespace openvk\Web\Models\Entities;
|
||||||
use Chandler\Database\DatabaseConnection as DB;
|
use Chandler\Database\DatabaseConnection as DB;
|
||||||
use openvk\Web\Models\Repositories\Gifts;
|
use openvk\Web\Models\Repositories\Gifts;
|
||||||
use openvk\Web\Models\RowModel;
|
use openvk\Web\Models\RowModel;
|
||||||
|
use Transliterator;
|
||||||
|
|
||||||
class GiftCategory extends RowModel
|
class GiftCategory extends RowModel
|
||||||
{
|
{
|
||||||
|
@ -30,7 +31,7 @@ class GiftCategory extends RowModel
|
||||||
|
|
||||||
function getSlug(): string
|
function getSlug(): string
|
||||||
{
|
{
|
||||||
return \Transliterator::createFromRules(
|
return str_replace("ʹ", "-", Transliterator::createFromRules(
|
||||||
":: Any-Latin;"
|
":: Any-Latin;"
|
||||||
. ":: NFD;"
|
. ":: NFD;"
|
||||||
. ":: [:Nonspacing Mark:] Remove;"
|
. ":: [:Nonspacing Mark:] Remove;"
|
||||||
|
@ -38,7 +39,7 @@ class GiftCategory extends RowModel
|
||||||
. ":: [:Punctuation:] Remove;"
|
. ":: [:Punctuation:] Remove;"
|
||||||
. ":: Lower();"
|
. ":: Lower();"
|
||||||
. "[:Separator:] > '-'"
|
. "[:Separator:] > '-'"
|
||||||
)->transliterate($this->getName());
|
)->transliterate($this->getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function getThumbnailURL(): string
|
function getThumbnailURL(): string
|
||||||
|
|
Loading…
Reference in a new issue