diff options
Diffstat (limited to 'includes/functions.php')
-rwxr-xr-x | includes/functions.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/functions.php b/includes/functions.php index 1ff5c41..6b5d8e9 100755 --- a/includes/functions.php +++ b/includes/functions.php | |||
@@ -90,6 +90,11 @@ function generateSlug($title,$table) | |||
90 | } | 90 | } |
91 | $title = strtolower($title); | 91 | $title = strtolower($title); |
92 | 92 | ||
93 | if (empty($title)) | ||
94 | { | ||
95 | $title = 'special-characters'; | ||
96 | } | ||
97 | |||
93 | $getprevs = "SELECT COUNT(*) FROM " . $table . " WHERE slug = \"" . $title . "\" OR slug LIKE \"" . $title . "-%\""; | 98 | $getprevs = "SELECT COUNT(*) FROM " . $table . " WHERE slug = \"" . $title . "\" OR slug LIKE \"" . $title . "-%\""; |
94 | $getprevs2 = mysql_query($getprevs); | 99 | $getprevs2 = mysql_query($getprevs); |
95 | @$getprevs3 = mysql_fetch_array($getprevs2); | 100 | @$getprevs3 = mysql_fetch_array($getprevs2); |