Ignore:
Timestamp:
Aug 29, 2010, 6:52:52 PM (14 years ago)
Author:
nikrou
Message:

Fix incompatibility with PY GVideo (and Charlies')
Fix problem when deleting last related tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/user_tags/include/t4u_admin_action.inc.php

    r6813 r6818  
    2525
    2626if (!empty($_GET['action']) && ($_GET['action']=='add')
    27     && !empty($_POST['tags']) && $me->getPermission('add')) {
     27    && isset($_POST['tags']) && $me->getPermission('add')) {
    2828  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    29  
     29
     30  if (empty($_POST['tags'])) {
     31    $_POST['tags'] = array();
     32  }
    3033  $tag_ids = get_fckb_tag_ids($_POST['tags']);
    3134  set_tags($tag_ids, $_POST['image_id']);
     
    3336  if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
    3437    header("Content-Type: application/json");
     38    $message['info'] = l10n('Tags updated');
    3539
    36     $message['info'] = l10n('Tags updated');
    3740    echo json_encode($message);
     41    Log::getInstance()->debug('message envoyé');
    3842    exit();
    3943  } else {
Note: See TracChangeset for help on using the changeset viewer.