Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r10924: LJSUP-9610 (Incorrect insert link to Sel...

Committer: ailyin
LJSUP-9610 (Incorrect insert link to Self promo)
U   trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2011-08-25 08:28:00 UTC (rev 10923)
+++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm	2011-08-25 09:01:45 UTC (rev 10924)
@@ -97,6 +97,10 @@
     };
 
     my $entry_url = LJ::Request->post_param('entry_link');
+    unless ( $entry_url =~ m{^https?://} ) {
+        $entry_url = 'http://' . $entry_url;
+    }
+
     my $entry     = LJ::Entry->new_from_url($entry_url);
 
     unless ($entry) {
@@ -148,6 +152,10 @@
     my ($self) = @_;
 
     my $entry_url = LJ::Request->post_param('entry_link');
+    unless ( $entry_url =~ m{^https?://} ) {
+        $entry_url = 'http://' . $entry_url;
+    }
+
     my $entry     = LJ::Entry->new_from_url($entry_url);
 
     unless ($entry) {

Tags: andy, ljcom, pm
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