madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21506: LJSV-2014: Ability to rename support tag...

Committer: sbelyaev
LJSV-2014: Ability to rename support tags
U   trunk/cgi-bin/LJ/Support/Request/Tag.pm
Modified: trunk/cgi-bin/LJ/Support/Request/Tag.pm
===================================================================
--- trunk/cgi-bin/LJ/Support/Request/Tag.pm	2012-03-22 09:06:35 UTC (rev 21505)
+++ trunk/cgi-bin/LJ/Support/Request/Tag.pm	2012-03-22 09:39:23 UTC (rev 21506)
@@ -138,6 +138,9 @@
 
     # Get curret name 
     my $old_name = LJ::Support::Request::Tag::tag_id_to_name($sptagid);
+    if (!$old_name) {
+        return;
+    }
 
     #
     # Receive all categories where rename will be done
@@ -163,7 +166,7 @@
                                    $new_name );
 
     # Does name exist already?
-    if (!%$destination) {
+    if (!$destination || !%$destination) {
 
         # Just rename 
         $dbh->do( "UPDATE supporttag SET name=? WHERE name=?",

Tags: livejournal, madeon, pm, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments