Skip to content

Commit

Permalink
merge r8966 from branch 2.1 to trunk
Browse files Browse the repository at this point in the history
bug 2142 fixed: make sure you cannot move a category into itself



git-svn-id: http://piwigo.org/svn/trunk@8967 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jan 28, 2011
1 parent ec169f1 commit 92fe29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/include/functions.php
Expand Up @@ -1135,7 +1135,7 @@ function move_categories($category_ids, $new_parent = -1)
{
// technically, you can't move a category with uppercats 12,125,13,14
// into a new parent category with uppercats 12,125,13,14,24
if (preg_match('/^'.$category['uppercats'].',/', $new_parent_uppercats))
if (preg_match('/^'.$category['uppercats'].'(,|$)/', $new_parent_uppercats))
{
array_push(
$page['errors'],
Expand Down

0 comments on commit 92fe29d

Please sign in to comment.