madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21051: LJSUP-9832: Functionality restored.

Committer: sbelyaev
LJSUP-9832: Functionality restored.
U   trunk/cgi-bin/LJ/DelayedEntry.pm
U   trunk/htdocs/admin/entryprops.bml
Modified: trunk/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry.pm	2012-01-31 11:36:38 UTC (rev 21050)
+++ trunk/cgi-bin/LJ/DelayedEntry.pm	2012-01-31 12:08:55 UTC (rev 21051)
@@ -8,6 +8,23 @@
 
 #common methodss
 
+sub create_from_url {
+    my ($class, $url, $opts) = @_;
+
+    if ($url =~ m!(.+)/d(\d+)\.html!) {
+        my $username = $1;
+        my $delayed_id = $2;
+        my $u = LJ::User->new_from_url($username) or return undef;
+        return LJ::DelayedEntry->get_entry_by_id($u, $delayed_id, $opts);
+    }
+
+    return undef;
+}
+
+sub valid {
+    return 1;
+}
+
 sub is_delayed {
     return 1;
 }

Modified: trunk/htdocs/admin/entryprops.bml
===================================================================
--- trunk/htdocs/admin/entryprops.bml	2012-01-31 11:36:38 UTC (rev 21050)
+++ trunk/htdocs/admin/entryprops.bml	2012-01-31 12:08:55 UTC (rev 21051)
@@ -24,6 +24,9 @@
     $ret .= "<?hr?>";
 
     my $entry = LJ::Entry->new_from_url($GET{url});
+    if (!$entry) {
+        $entry = LJ::DelayedEntry->create_from_url($GET{url}, { 'delayed_visibility' => 1});
+    }
 
     unless ($entry && $entry->valid) {
         $ret .= LJ::error_list("$POST{url} is not a valid entry URL.") if LJ::did_post();
@@ -61,7 +64,10 @@
     $ret .= "<strong>Server Date/Time</strong>: " . $entry->logtime_mysql . "<br />";
     $ret .= "<strong>Journal Adult Content</strong>: " . ($entry->journal->adult_content || "none")
         . " (admin setting: " . ($entry->journal->admin_content_flag || "none") . ")<br />";
-    $ret .= "<strong>Skip/iNclude in recent entries</strong>: " . $entry->get_suspended_mark . "<br />";
+
+    if (!$entry->is_delayed) {
+        $ret .= "<strong>Skip/iNclude in recent entries</strong>: " . $entry->get_suspended_mark . "<br />";
+    }
     $ret .= "<br />";
 
     my %props = %{$entry->props || {}};

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