$val) { if(preg_match('/^tcb([0-9]+)$/', $key, $match)) { if(($id = (int) $_REQUEST[$key]) > 0) { $ids[] = $id; } } } if(count($ids) > 0) { $sql = "delete from " . getTable("tag") . " where id in (".implode(',', $ids) . ")"; rss_query($sql); $sql = "delete from " . getTable("metatag") . " where tid in (".implode(',', $ids) . ")"; rss_query($sql); rss_invalidate_cache(); } } } else { list($tname) = rss_fetch_row(rss_query("select tag from " .getTable("tag") ." where id = $tid")); echo "
\n"; $ret__ = CST_ADMIN_DOMAIN_NONE; } break; case CST_ADMIN_SUBMIT_EDIT: // TBD $new_label = preg_replace(ALLOWED_TAGS_REGEXP,'', $_REQUEST['t_name']); // also replace whitespaces $new_label = str_replace(' ','',$new_label); if (is_numeric($tid) && strlen($new_label) > 0) { $res = rss_query("select count(*) as cnt from " . getTable("tag") ." where binary tag='".rss_real_escape_string($new_label)."'"); list($cnt) = rss_fetch_row($res); if ($cnt > 0) { rss_error(sprintf(__("You can't rename this item '%s' because such an item already exists."),$new_label), RSS_ERROR_ERROR,true); break; } rss_query("update " .getTable("tag") ." set tag='".rss_real_escape_string($new_label)."' where id=$tid"); rss_invalidate_cache(); } break; default: break; } echo "\n"; echo "