Ignore:
Timestamp:
Jul 30, 2011, 6:53:18 AM (13 years ago)
Author:
rvelices
Message:

feature 2387: addd a filter by tag in the batch manager (merge from trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/include/functions.php

    r11727 r11854  
    21162116      $taglist,
    21172117      array(
    2118         'name' => $row['tag_name'],
    2119         'id' => '~~'.$row['tag_id'].'~~',
     2118        'name' => $row['name'],
     2119        'id' => '~~'.$row['id'].'~~',
    21202120        )
    21212121      );
     
    21282128}
    21292129
    2130 function get_tag_ids($raw_tags)
     2130function get_tag_ids($raw_tags, $allow_create=true)
    21312131{
    21322132  // In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New
     
    21442144      array_push($tag_ids, $matches[1]);
    21452145    }
    2146     else
     2146    elseif ($allow_create)
    21472147    {
    21482148      // we have to create a new tag
    2149       array_push(
    2150         $tag_ids,
    2151         tag_id_from_tag_name($raw_tag)
    2152         );
     2149      $tag_ids[] = tag_id_from_tag_name($raw_tag);
    21532150    }
    21542151  }
Note: See TracChangeset for help on using the changeset viewer.