Changeset 20814


Ignore:
Timestamp:
02/18/13 19:55:16 (6 years ago)
Author:
flop25
Message:

bug:2845
added 'tags' as potential array for pwg.images.addSimple

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions.inc.php

    r20741 r20814  
    19781978  { 
    19791979    $tag_ids = array(); 
    1980     $tag_names = preg_split('~(?<!\\\),~', $params['tags']); 
    1981     foreach ($tag_names as $tag_name) 
    1982     { 
    1983       $tag_id = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name)); 
    1984       array_push($tag_ids, $tag_id); 
     1980    if (is_array($params[tags])) 
     1981    { 
     1982      foreach ($params[tags] as $tag_name) 
     1983      { 
     1984        $tag_id = tag_id_from_tag_name($tag_name); 
     1985        array_push($tag_ids, $tag_id); 
     1986      } 
     1987    } 
     1988    else 
     1989    { 
     1990      $tag_names = preg_split('~(?<!\\\),~', $params['tags']); 
     1991      foreach ($tag_names as $tag_name) 
     1992      { 
     1993        $tag_id = tag_id_from_tag_name(preg_replace('#\\\\*,#', ',', $tag_name)); 
     1994        array_push($tag_ids, $tag_id); 
     1995      } 
    19851996    } 
    19861997 
  • trunk/ws.php

    r19703 r20814  
    280280        'maxValue' => $conf['available_permission_levels'] 
    281281        ), 
    282       'tags' => array('default' => null), 
     282      'tags' => array('default' => null, 'flags' => WS_PARAM_ACCEPT_ARRAY), 
    283283      'image_id' => array('default' => null), 
    284284      ), 
Note: See TracChangeset for help on using the changeset viewer.