Changeset 29066 for trunk/admin/include
- Timestamp:
- Jul 21, 2014, 11:00:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r29052 r29066 1554 1554 if (count($existing_tags = query2array($query, null, 'id')) == 0) 1555 1555 { 1556 // search existing by case insensitive name 1556 $url_name = trigger_change('render_tag_url', $tag_name); 1557 // search existing by url name 1557 1558 $query = ' 1558 1559 SELECT id 1559 1560 FROM '.TAGS_TABLE.' 1560 WHERE CONVERT(name, CHAR) = \''.$tag_name.'\'1561 WHERE url_name = \''.$url_name.'\' 1561 1562 ;'; 1562 1563 if (count($existing_tags = query2array($query, null, 'id')) == 0) 1563 1564 { 1564 $url_name = trigger_change('render_tag_url', $tag_name); 1565 // search existing by url name 1566 $query = ' 1565 // search by extended description (plugin sub name) 1566 $sub_name_where = trigger_change('get_tag_name_like_where', array(), $tag_name); 1567 if (count($sub_name_where)) 1568 { 1569 $query = ' 1567 1570 SELECT id 1568 1571 FROM '.TAGS_TABLE.' 1569 WHERE url_name = \''.$url_name.'\' 1570 ;'; 1571 if (count($existing_tags = query2array($query, null, 'id')) == 0) 1572 { 1572 WHERE '.implode(' OR ', $sub_name_where).' 1573 ;'; 1574 $existing_tags = query2array($query, null, 'id'); 1575 } 1576 1577 if (count($existing_tags) == 0) 1578 {// finally create the tag 1573 1579 mass_inserts( 1574 1580 TAGS_TABLE,
Note: See TracChangeset
for help on using the changeset viewer.