equal
deleted
inserted
replaced
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); |