diff options
author | plegall <plg@piwigo.org> | 2011-01-28 22:54:22 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-01-28 22:54:22 +0000 |
commit | 4673305bb064b5d7c03f83972fb4413f7f47de10 (patch) | |
tree | 53b30be8148f16238a67b450f4068713c262f2e0 | |
parent | e02e7dd11616409f13b5378188b8a05273b1927a (diff) |
bug 2142 fixed: make sure you cannot move a category into itself
git-svn-id: http://piwigo.org/svn/branches/2.1@8966 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/include/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index 5d27c7865..a053c3a68 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1040,7 +1040,7 @@ SELECT uppercats { // 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'], |