wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18566: LJSUP-8192. Fix error in select categori...

Committer: gprochaev
LJSUP-8192. Fix error in select categories

U   trunk/htdocs/admin/browse/add_category.bml
U   trunk/htdocs/admin/browse/add_community.bml
U   trunk/htdocs/admin/browse/edit_community.bml
U   trunk/htdocs/admin/browse/manage_category.bml
U   trunk/htdocs/admin/browse/remove_category.bml
U   trunk/htdocs/admin/browse/remove_community.bml
Modified: trunk/htdocs/admin/browse/add_category.bml
===================================================================
--- trunk/htdocs/admin/browse/add_category.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/add_category.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -23,7 +23,7 @@
     my $vert_id;
 
     my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ } keys %POST;
-    my $cat_id = $POST{$ids[0]};
+    my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
     my $category = $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;
 
     if (LJ::did_post() and $POST{'add'}) {

Modified: trunk/htdocs/admin/browse/add_community.bml
===================================================================
--- trunk/htdocs/admin/browse/add_community.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/add_community.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -23,7 +23,7 @@
     my $tags = $POST{'tags'};
 
     my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ } keys %POST;
-    my $cat_id = $POST{$ids[0]};
+    my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
     my $category = $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;
 
     my $vertical = undef;

Modified: trunk/htdocs/admin/browse/edit_community.bml
===================================================================
--- trunk/htdocs/admin/browse/edit_community.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/edit_community.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -31,7 +31,7 @@
     my $j = $i - 1;
     ## which category the user wants to add a community?
     my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_\Q$i\E$/ } keys %POST;
-    my $cat_id = $POST{$ids[0]};
+    my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
     push @catid_, $cat_id if $cat_id;
     push @catrem, $POST{"catremove_$i"} if $POST{"catremove_$i"};
     push @cat_, $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;

Modified: trunk/htdocs/admin/browse/manage_category.bml
===================================================================
--- trunk/htdocs/admin/browse/manage_category.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/manage_category.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -30,7 +30,7 @@
     foreach my $i (1 .. 2) {
         ## which category the user wants to add a community?
         my @ids = sort { $b cmp $a } grep { $POST{$_} } grep { $_ =~ /^catid\d+\_\Q$i\E$/ } keys %POST;
-        my $cat_id = $POST{$ids[0]};
+        my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
         push @catid_, $cat_id if $cat_id;
         push @cat_, $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;
         my $vert_id = $POST{"vert_id_$i"} || 0;

Modified: trunk/htdocs/admin/browse/remove_category.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_category.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/remove_category.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -21,7 +21,7 @@
     my $vert_id = $POST{'vert_id'};
 
     my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ } keys %POST;
-    my $cat_id = $POST{$ids[0]};
+    my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
     my $category = $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;
 
     my $vertical = undef;

Modified: trunk/htdocs/admin/browse/remove_community.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_community.bml	2011-03-16 04:58:43 UTC (rev 18565)
+++ trunk/htdocs/admin/browse/remove_community.bml	2011-03-16 05:00:55 UTC (rev 18566)
@@ -28,7 +28,7 @@
     my $journals = $POST{'journals'};
 
     my @ids = sort { $b cmp $a } grep { $_ =~ /^catid\d+\_0$/ } keys %POST;
-    my $cat_id = $POST{$ids[0]};
+    my $cat_id = $POST{$ids[0]} ? $POST{$ids[0]} : $POST{$ids[1]};
     my $category = $cat_id ? LJ::Browse->load_by_id ($cat_id) : undef;
 
     my $vertical = undef;

Tags: bml, livejournal, wisest-owl
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