mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 02:01:52 +02:00
* fix #1843 Remove categroy name-exists detecting * detect category-exists only in the same level
This commit is contained in:
parent
b989f24c5b
commit
8035b22347
@ -56,6 +56,7 @@ class Edit extends Metas implements ActionInterface
|
||||
|
||||
/**
|
||||
* 判断分类名称是否存在
|
||||
* fix #1843 将重复性判断限制在同一父分类下
|
||||
*
|
||||
* @param string $name 分类名称
|
||||
* @return boolean
|
||||
@ -73,6 +74,9 @@ class Edit extends Metas implements ActionInterface
|
||||
$select->where('mid <> ?', $this->request->get('mid'));
|
||||
}
|
||||
|
||||
// 只在同一父分类下判断重复性
|
||||
$select->where('parent = ?', $this->request->filter('int')->get('parent', 0));
|
||||
|
||||
$category = $this->db->fetchRow($select);
|
||||
return !$category;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user