1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Fix for category title inline-editing affecting SEF url.

This commit is contained in:
Cameron
2016-10-17 10:15:24 -07:00
parent 3188a49cb4
commit bac3263e5b

View File

@@ -184,10 +184,11 @@ class news_cat_ui extends e_admin_ui
public function beforeUpdate($new_data, $old_data, $id)
{
if(empty($new_data['category_sef']))
if(isset($new_data['category_sef']) && empty($new_data['category_sef']))
{
$new_data['category_sef'] = eHelper::title2sef($new_data['category_name']);
}
$sef = e107::getParser()->toDB($new_data['category_sef']);
if(e107::getDb()->count('news_category', '(*)', "category_sef='{$sef}' AND category_id!=".intval($id)))
{