diff options
| author | czaks <marcin@6irc.net> | 2015-03-12 00:03:22 +0100 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-03-12 00:03:22 +0100 |
| commit | 3851087dce99d3f7368f501a1599564304b62bea (patch) | |
| tree | 81c91d9b4e1ba402ae936cd89fa95fb3c5243b04 /inc/functions.php | |
| parent | a16538e82ed011db722184626e49b7e040f93b23 (diff) | |
slug size should be configurable
Diffstat (limited to 'inc/functions.php')
| -rwxr-xr-x | inc/functions.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index 704c6600..ca918e0a 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2432,6 +2432,8 @@ function diceRoller($post) { } function slugify($post) { + global $config; + $slug = ""; if (isset($post['subject']) && $post['subject']) @@ -2459,8 +2461,8 @@ function slugify($post) { // Strip dashes at the beginning and at the end $slug = preg_replace('/^-|-$/', '', $slug); - // Slug should be 200 characters long, at max - $slug = substr($slug, 0, 200); + // Slug should be X characters long, at max (80?) + $slug = substr($slug, 0, $config['slug_max_size']); // Slug is now ready return $slug; |
