alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[livejournal] r20660: LJSUP-10508: Commenting form S1 (Lebedev...

Committer: afedorov
LJSUP-10508: Commenting form S1 (Lebedev's redesign). Move branch to trunk
U   trunk/cgi-bin/LJ/HTML/Template.pm
U   trunk/htdocs/talkpost_do.bml
Modified: trunk/cgi-bin/LJ/HTML/Template.pm
===================================================================
--- trunk/cgi-bin/LJ/HTML/Template.pm	2011-11-30 09:01:12 UTC (rev 20659)
+++ trunk/cgi-bin/LJ/HTML/Template.pm	2011-11-30 09:19:23 UTC (rev 20660)
@@ -117,6 +117,13 @@
             },
         );
 
+        HTML::Template::Pro->register_function(
+            'src2url' => sub {
+                my $src = shift;
+                return LJ::stat_src_to_url($src);
+            },
+        );
+
         my $template = HTML::Template::Pro->new(
             global_vars => 1, # normally variables declared outside a loop are not available inside
                               # a loop.  This option makes <TMPL_VAR>s like global variables in Perl

Modified: trunk/htdocs/talkpost_do.bml
===================================================================
--- trunk/htdocs/talkpost_do.bml	2011-11-30 09:01:12 UTC (rev 20659)
+++ trunk/htdocs/talkpost_do.bml	2011-11-30 09:19:23 UTC (rev 20660)
@@ -311,6 +311,7 @@
             return LJ::Talk::talkform_mobile($talkform_opts)
                 if $POST{'mobile_domain'} =~ qr/^\w\.$LJ::DOMAIN$/;
 
+<<<<<<< .working
 
             if ( $use_s1 and not $external_site_case and LJ::is_enabled('new_comments') ) {
                 return LJ::Widget::Form->render_body(
@@ -327,6 +328,24 @@
             } else {
                 return LJ::Talk::talkform($talkform_opts);
             }
+=======
+
+            if ( $use_s1 and not $external_site_case and LJ::is_enabled('new_comments') ) {
+                return LJ::Widget::Form->render_body(
+                    entry        => $entry,
+                    standalone   => 2,
+                    stylemine    => $GET{'style'} eq 'mine'? 1 : 0,
+                    replyto      => $talkform_opts->{'replyto'},
+                    editid       => $editid,
+                    form         => \%POST,
+                    parpost      => $parpost,
+                    errors       => [ map { error => $_ }, @errors ],
+                    parenttalkid => $talkform_opts->{'replyto'}, #ref $parpost eq 'HASH'? $init->{'ditemid'} : 0,
+                );
+            } else {
+                return LJ::Talk::talkform($talkform_opts);
+            }
+>>>>>>> .merge-right.r20657
         }
 
         # checked $POST{agree_tos} was checked above if it was necessary,

Tags: afedorov, bml, livejournal, pm, red_alf
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