slartyblartfast (slartyblartfast) wrote in changelog,
slartyblartfast
slartyblartfast
changelog

[livejournal] r16846: LJSUP-6066: We need to change the widget...

Committer: mchernyshev
LJSUP-6066: We need to change the widget "Cool features on LiveJournal" for home page
- bug fixed: don't die if ExtBlock is empty.
U   trunk/htdocs/admin/marqueefeatures.bml
Modified: trunk/htdocs/admin/marqueefeatures.bml
===================================================================
--- trunk/htdocs/admin/marqueefeatures.bml	2010-06-21 07:44:53 UTC (rev 16845)
+++ trunk/htdocs/admin/marqueefeatures.bml	2010-06-21 08:00:44 UTC (rev 16846)
@@ -35,10 +35,11 @@
 
     ## Read old data
     my $marquee_features_json = LJ::ExtBlock->load_by_id('marquee_features');
-    $marquee_features_json = $marquee_features_json->blocktext if $marquee_features_json;
+    if ($marquee_features_json) {
+        $marquee_features_json = $marquee_features_json->blocktext;
+        @marquee_features = @{LJ::JSON->from_json($marquee_features_json)};
+    }
 
-    @marquee_features = @{LJ::JSON->from_json($marquee_features_json)};
-
     ## Page
     my $ret = qq|
         <div class="canyon">

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