Author: jfthomps
Date: Fri Aug 20 17:13:44 2010
New Revision: 987579

URL: http://svn.apache.org/viewvc?rev=987579&view=rev
Log:
VCL-325
removing a subimage from a cluster can result in all subimages getting removed

fixed bug in AJaddSubimage and AJremSubimage where checking access was using 
array_key_exists when it should have been in_array

Modified:
    incubator/vcl/trunk/web/.ht-inc/images.php

Modified: incubator/vcl/trunk/web/.ht-inc/images.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/images.php?rev=987579&r1=987578&r2=987579&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/images.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/images.php Fri Aug 20 17:13:44 2010
@@ -1201,7 +1201,7 @@ function AJaddSubimage() {
        $userimages = getContinuationVar('userimages');
        $subimages = getContinuationVar('subimages');
        $imagemetaid = getContinuationVar('imagemetaid');
-       if(! array_key_exists($imageid, $adminids)) {
+       if(! in_array($imageid, $adminids)) {
                $arr = array('error' => 'noimageaccess',
                        'msg' => 'You do not have access to manage this 
image.');
                sendJSON($arr);
@@ -1267,7 +1267,7 @@ function AJremSubimage() {
        $userimages = getContinuationVar('userimages');
        $subimages = getContinuationVar('subimages');
        $imagemetaid = getContinuationVar('imagemetaid');
-       if(! array_key_exists($imageid, $adminids)) {
+       if(! in_array($imageid, $adminids)) {
                $arr = array('error' => 'noimageaccess',
                        'msg' => 'You do not have access to manage this 
image.');
                sendJSON($arr);


Reply via email to