plugins/gallery/viewimage.php
changeset 23 43f9c64a7672
parent 22 593180f9eea9
child 24 7f3bd3030ae9
equal deleted inserted replaced
22:593180f9eea9 23:43f9c64a7672
   239       case 'get_tags':
   239       case 'get_tags':
   240         $response = snapr_json_decode($row['img_tags']);
   240         $response = snapr_json_decode($row['img_tags']);
   241         foreach ( $response as $key => $_ )
   241         foreach ( $response as $key => $_ )
   242         {
   242         {
   243           unset($_);
   243           unset($_);
   244           $tag =& $response[$key];
   244           $tag = $response[$key];
       
   245           unset($response[$key]);
   245           $tag['note_id'] = $key;
   246           $tag['note_id'] = $key;
   246           $tag['mode'] = 'add';
   247           $tag['mode'] = 'add';
   247           $tag['initial_hide'] = true;
   248           $tag['initial_hide'] = true;
   248           $tag['auth_delete'] = $perms->get_permissions('snapr_add_tag');
   249           $tag['auth_delete'] = $perms->get_permissions('snapr_add_tag');
       
   250           $response[intval($key)] = $tag;
   249         }
   251         }
   250         unset($tag);
   252         unset($tag);
   251         break;
   253         break;
   252     }
   254     }
   253     echo snapr_json_encode($response);
   255     echo snapr_json_encode($response);