<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -310,13 +310,16 @@
 					if ($clean != $_GET['clean'])
 						$cleans[] = &quot;{{&quot;.$clean.&quot;}}&quot;;
 
-				$sql-&gt;update(&quot;tags&quot;,
-				             &quot;id = :id&quot;,
-				             array(&quot;tags&quot; =&gt; &quot;:tags&quot;,
-				                   &quot;clean&quot; =&gt; &quot;:clean&quot;),
-				             array(&quot;:id&quot; =&gt; $tag[&quot;id&quot;],
-				                   &quot;:tags&quot; =&gt; join(&quot;,&quot;, $names),
-				                   &quot;:clean&quot; =&gt; join(&quot;,&quot;, $cleans)));
+				if (empty($names) or empty($cleans))
+					$sql-&gt;delete(&quot;tags&quot;, array(&quot;id&quot; =&gt; $tag[&quot;id&quot;]));
+				else
+					$sql-&gt;update(&quot;tags&quot;,
+					             &quot;id = :id&quot;,
+					             array(&quot;tags&quot; =&gt; &quot;:tags&quot;,
+					                   &quot;clean&quot; =&gt; &quot;:clean&quot;),
+					             array(&quot;:id&quot; =&gt; $tag[&quot;id&quot;],
+					                   &quot;:tags&quot; =&gt; join(&quot;,&quot;, $names),
+					                   &quot;:clean&quot; =&gt; join(&quot;,&quot;, $cleans)));
 			}
 
 			Flash::notice(__(&quot;Tag deleted.&quot;, &quot;tags&quot;), &quot;/admin/?action=manage_tags&quot;);</diff>
      <filename>modules/tags/tags.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a78f76381f44057814538388890bed5f3127c379</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/0ab14775db15b0805c1f2192b79edcc6247ad196</url>
  <id>0ab14775db15b0805c1f2192b79edcc6247ad196</id>
  <committed-date>2008-09-01T09:51:34-07:00</committed-date>
  <authored-date>2008-09-01T09:51:34-07:00</authored-date>
  <message>Deleting a tag should delete the row if it's the only tag.</message>
  <tree>29808ae1f236faefb2168d76613b0113d4ba22ef</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
