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

[ljcom] r11072: LJSUP-10071 (create a page with detailed...

Committer: ailyin
LJSUP-10071 (create a page with detailed status of svn repos on a server)
U   trunk/cgi-bin/LJ/Hooks/Support.pm
U   trunk/cgi-bin/LJ/Response/Template.pm
U   trunk/cgi-bin/LJ/Router.pm
Modified: trunk/cgi-bin/LJ/Hooks/Support.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Support.pm	2011-10-06 12:55:57 UTC (rev 11071)
+++ trunk/cgi-bin/LJ/Hooks/Support.pm	2011-10-07 09:08:00 UTC (rev 11072)
@@ -134,14 +134,13 @@
             foreach my $repo (qw/livejournal ljcom ljcomint/) {
                 my $info = LJ::Maint::SVN->find_local_info($repo);
                 push @revisions, $info->{'revision'};
-                if (!$date_of_latest_commit || $date_of_latest_commit lt $info->{'date'}) {
-                    $date_of_latest_commit = $info->{'date'};
+                if (!$date_of_latest_commit || $date_of_latest_commit < $info->{'date_unix'}) {
+                    $date_of_latest_commit = $info->{'date_unix'};
                 }
             }
             ## 2011-10-04T03:41:31.736347Z
-            $date_of_latest_commit =~ /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})\.\d+Z/ or die;
-            my $last_update = LJ::TimeUtil->ago_text($time - LJ::TimeUtil->mysqldate_to_time("$1 $2", 1));
-            ## cache for 15 seconds on dev servers and forever on omega 
+            my $last_update = LJ::TimeUtil->ago_text($time - $date_of_latest_commit);
+            ## cache for 15 seconds on dev servers and forever on omega
             $extra_info_cache->{'valid_till'} = ($LJ::IS_LJCOM_BETA) ? $time+1e6 : $time+15;
             $extra_info_cache->{'extra_info'} = " ($last_update, " . join("/", @revisions) . ")";
         }

Modified: trunk/cgi-bin/LJ/Response/Template.pm
===================================================================
--- trunk/cgi-bin/LJ/Response/Template.pm	2011-10-06 12:55:57 UTC (rev 11071)
+++ trunk/cgi-bin/LJ/Response/Template.pm	2011-10-07 09:08:00 UTC (rev 11072)
@@ -13,9 +13,11 @@
 sub output {
     my ($self) = @_;
 
+    my $path = $self->path || '';
+
     my $template = LJ::HTML::Template->new(
         { use_expr => 1 }, # force HTML::Template::Pro with Expr support
-        filename => $self->path . $self->file,
+        filename => $path . $self->file,
     );
 
     $template->param( %{ $self->params || {} } );

Modified: trunk/cgi-bin/LJ/Router.pm
===================================================================
--- trunk/cgi-bin/LJ/Router.pm	2011-10-06 12:55:57 UTC (rev 11071)
+++ trunk/cgi-bin/LJ/Router.pm	2011-10-07 09:08:00 UTC (rev 11072)
@@ -3,10 +3,12 @@
 use warnings;
 
 use LJ::Mob::Router;
+use LJ::Router::Misc;
 use LJ::Shop::Router;
 
 my @routers = qw(
     LJ::Mob::Router
+    LJ::Router::Misc
     LJ::Shop::Router
 );
 

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