Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r20060: LJSUP-9804: Problem with writing propert...

Committer: amyshkin
LJSUP-9804: Problem with writing properties data for entries on Omega/Alpha/Beta servers
U   trunk/htdocs/admin/entryprops.bml
Modified: trunk/htdocs/admin/entryprops.bml
===================================================================
--- trunk/htdocs/admin/entryprops.bml	2011-09-16 08:26:11 UTC (rev 20059)
+++ trunk/htdocs/admin/entryprops.bml	2011-09-16 08:27:13 UTC (rev 20060)
@@ -12,6 +12,7 @@
 
     my $remote = LJ::get_remote();
     my $is_admin = LJ::check_priv($remote, "canview", "entryprops");
+
     return BML::redirect("$LJ::SITEROOT/editjournal.bml")
         unless $is_admin || $LJ::IS_DEV_SERVER;
 
@@ -23,25 +24,30 @@
     $ret .= "<?hr?>";
 
     my $entry = LJ::Entry->new_from_url($GET{url});
+
     unless ($entry && $entry->valid) {
         $ret .= LJ::error_list("$POST{url} is not a valid entry URL.") if LJ::did_post();
         return $ret;
     }
 
-    # WE HAEV ENTRY!!
+    # WE HAVE ENTRY!!
 
     my $subject;
-    if ($entry->visible_to($remote)) {
+
+    if ( $entry->visible_to($remote) ) {
         $subject = $entry->subject_html ? $entry->subject_html : "<em>no subject</em>";
-    } else {
+    }
+    else {
         $subject = "<em>hidden</em>";
     }
 
     my $security = $entry->security;
-    if ($security eq "usemask") {
-        if ($entry->allowmask == 1) {
+
+    if ( $security eq "usemask" ) {
+        if ( $entry->allowmask == 1 ) {
             $security = "friends";
-        } else {
+        }
+        else {
             $security = "custom";
         }
     }
@@ -63,10 +69,13 @@
     return $ret unless %props;
 
     $ret .= "<ul>";
+
     foreach my $prop (sort keys %props) {
         my $extra = "";
-        if (my $p = LJ::get_prop("log", $prop)) {
+
+        if ( my $p = LJ::get_prop("log", $prop) ) {
             $extra = "<br /><small>$p->{des}</small>";
+
             # an ugly hack, i know
             $props{$prop} = LJ::TimeUtil->mysql_time($props{$prop}) if $p->{des} =~ /unix/i;
         }

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