Changeset 1873 for branches/release-34/lib/MT/Tag.pm
- Timestamp:
- 04/13/08 04:41:46 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-34/lib/MT/Tag.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-34/lib/MT/Tag.pm
r1657 r1873 95 95 if (!$tag->n8d_id) { 96 96 # normalized tag! we can't delete if others reference us 97 my $child_tags = MT::Tag-> count({n8d_id => $tag->id});97 my $child_tags = MT::Tag->exist({n8d_id => $tag->id}); 98 98 return $tag->error(MT->translate("This tag is referenced by others.")) 99 99 if $child_tags; … … 108 108 if ($n8d_tag) { 109 109 # Normalized tag, no longer referenced by other tags... 110 if (!MT::Tag-> count({n8d_id => $n8d_tag->id})) {110 if (!MT::Tag->exist({n8d_id => $n8d_tag->id})) { 111 111 # Noramlized tag that no longer has any object tag associations 112 112 require MT::ObjectTag; 113 if (!MT::ObjectTag-> count({tag_id => $n8d_tag->id})) {113 if (!MT::ObjectTag->exist({tag_id => $n8d_tag->id})) { 114 114 $n8d_tag->remove 115 115 or return $tag->error($n8d_tag->errstr); … … 412 412 my $this_tag_id = $otag->tag_id; 413 413 $otag->remove; 414 if (! MT::ObjectTag-> count({tag_id => $this_tag_id})) {414 if (! MT::ObjectTag->exist({tag_id => $this_tag_id})) { 415 415 # no more references to this tag... just delete it now 416 416 if (my $tag = MT::Tag->load($this_tag_id)) {
