slug size should be configurable
This commit is contained in:
parent
a16538e82e
commit
3851087dce
@ -2432,6 +2432,8 @@ function diceRoller($post) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function slugify($post) {
|
function slugify($post) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
$slug = "";
|
$slug = "";
|
||||||
|
|
||||||
if (isset($post['subject']) && $post['subject'])
|
if (isset($post['subject']) && $post['subject'])
|
||||||
@ -2459,8 +2461,8 @@ function slugify($post) {
|
|||||||
// Strip dashes at the beginning and at the end
|
// Strip dashes at the beginning and at the end
|
||||||
$slug = preg_replace('/^-|-$/', '', $slug);
|
$slug = preg_replace('/^-|-$/', '', $slug);
|
||||||
|
|
||||||
// Slug should be 200 characters long, at max
|
// Slug should be X characters long, at max (80?)
|
||||||
$slug = substr($slug, 0, 200);
|
$slug = substr($slug, 0, $config['slug_max_size']);
|
||||||
|
|
||||||
// Slug is now ready
|
// Slug is now ready
|
||||||
return $slug;
|
return $slug;
|
||||||
|
Loading…
Reference in New Issue
Block a user