Don't allow a category to be it's own parent. Props donncha. fixes #3278

git-svn-id: http://svn.automattic.com/wordpress/trunk@4490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-11-19 01:12:36 +00:00
parent 172bfb801f
commit 2390613e37
2 changed files with 8 additions and 2 deletions

View File

@@ -151,6 +151,9 @@ function wp_update_category($catarr) {
$cat_ID = (int) $catarr['cat_ID'];
if( $cat_ID == $catarr['category_parent'] )
return false;
// First, get all of the original fields
$category = get_category($cat_ID, ARRAY_A);