holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22496: LJINT-467: Comments for side projects (L...

Committer: akanashin
LJINT-467: Comments for side projects (Lenta.ru olympics)
U   trunk/htdocs/manage/subscriptions/entry.bml
U   trunk/htdocs/tools/content_flag.bml
U   trunk/htdocs/tools/memadd.bml
Modified: trunk/htdocs/manage/subscriptions/entry.bml
===================================================================
--- trunk/htdocs/manage/subscriptions/entry.bml	2012-07-25 11:47:53 UTC (rev 22495)
+++ trunk/htdocs/manage/subscriptions/entry.bml	2012-07-25 12:29:59 UTC (rev 22496)
@@ -36,6 +36,10 @@
 
     my $ret = '';
 
+    my $entry_url_ref;
+    LJ::run_hook( 'override_entry_url', $journal, $entry, \$entry_url_ref );     
+    return BML::redirect($entry_url_ref) if $entry_url_ref; 
+
     my $set = LJ::Subscription::GroupSet->fetch_for_user($u, sub {
         my ($subhash) = @_;
 

Modified: trunk/htdocs/tools/content_flag.bml
===================================================================
--- trunk/htdocs/tools/content_flag.bml	2012-07-25 11:47:53 UTC (rev 22495)
+++ trunk/htdocs/tools/content_flag.bml	2012-07-25 12:29:59 UTC (rev 22496)
@@ -18,6 +18,14 @@
     my $journal = LJ::load_user($user) or return $ML{'.error.invalidusername'};
     my $content = $ditemid ? LJ::Entry->new($journal, ditemid => $ditemid) : $journal;
 
+    my $entry_url_ref;
+    if ($ditemid) {
+        LJ::run_hook( 'override_entry_url', $journal, $content, \$entry_url_ref );     
+    } else {
+        LJ::run_hook( 'override_journal_url', $content, \$entry_url_ref );     
+    }
+    return BML::redirect($entry_url_ref) if $entry_url_ref; 
+
     return $ML{'.error.cantflag'}
         unless $remote->can_flag_content( content => $content );
 

Modified: trunk/htdocs/tools/memadd.bml
===================================================================
--- trunk/htdocs/tools/memadd.bml	2012-07-25 11:47:53 UTC (rev 22495)
+++ trunk/htdocs/tools/memadd.bml	2012-07-25 12:29:59 UTC (rev 22496)
@@ -98,6 +98,10 @@
      return;
  }
 
+ my $entry_url_ref;
+ LJ::run_hook( 'override_entry_url', $ju, LJ::Entry->new($ju, jitemid => $itemid), \$entry_url_ref );     
+ return BML::redirect($entry_url_ref) if $entry_url_ref; 
+
  my $dbcr = LJ::get_cluster_reader($ju);
 
  my $log = LJ::get_log2_row($ju, $itemid);
@@ -358,6 +362,7 @@
      $body .= "<?p $ML{'.body.added.text'} p?>";
 
      my $entry = LJ::Entry->new($ju, jitemid => $itemid);
+
      $body .= "<ul>";
      $body .= "<li><a href='" . $entry->url . "'>$ML{'.body.added.next.entry'}</a></li>";
      $body .= "<li><a href='$LJ::SITEROOT/tools/memories.bml?user=" . $memoryu->user . "'>"

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