[vhffs-dev] [993] Fixed statistics |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 993
Author: gradator
Date: 2007-10-16 13:58:00 +0000 (Tue, 16 Oct 2007)
Log Message:
-----------
Fixed statistics
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Stats.pm
trunk/vhffs-panel/templates/admin/misc/stats.tmpl
Modified: trunk/vhffs-api/src/Vhffs/Stats.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Stats.pm 2007-10-16 13:21:21 UTC (rev 992)
+++ trunk/vhffs-api/src/Vhffs/Stats.pm 2007-10-16 13:58:00 UTC (rev 993)
@@ -350,6 +350,29 @@
}
+sub get_git_in_moderation
+{
+ my $self = shift;
+ unless(defined $self->{svn}{awaiting_validation}) {
+ my $sql = 'SELECT COUNT(*) FROM vhffs_git w INNER JOIN vhffs_object o ON o.object_id=w.object_id WHERE o.state = ?';
+ ($self->{svn}{awaiting_validation}) = @{$self->{db}->selectrow_arrayref( $sql, undef, Vhffs::Constants::WAITING_FOR_VALIDATION )};
+
+ }
+ return $self->{svn}{awaiting_validation};
+}
+
+
+sub get_git_activated
+{
+ my $self = shift;
+ unless(defined $self->{svn}{activated}) {
+ my $sql = 'SELECT COUNT(*) FROM vhffs_git w INNER JOIN vhffs_object o ON o.object_id=w.object_id WHERE o.state='.Vhffs::Constants::ACTIVATED;
+ ($self->{'svn'}{activated}) = @{$self->{db}->selectrow_arrayref( $sql )};
+ }
+ return $self->{svn}{activated};
+}
+
+
sub get_mysql_in_moderation
{
my $self = shift;
Modified: trunk/vhffs-panel/templates/admin/misc/stats.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/stats.tmpl 2007-10-16 13:21:21 UTC (rev 992)
+++ trunk/vhffs-panel/templates/admin/misc/stats.tmpl 2007-10-16 13:58:00 UTC (rev 993)
@@ -55,6 +55,14 @@
</ul>
<h2>
+ <TMPL_VAR NAME="TEXT_GIT">:
+</h2>
+<ul>
+ <li><TMPL_VAR NAME="TEXT_TOTAL_GIT_IN_MODERATION">: <TMPL_VAR NAME="VALUE_TOTAL_GIT_IN_MODERATION"></li>
+ <li><TMPL_VAR NAME="TEXT_TOTAL_GIT_ACTIVATED">: <TMPL_VAR NAME="VALUE_TOTAL_GIT_ACTIVATED"></li>
+</ul>
+
+<h2>
<TMPL_VAR NAME="TEXT_MAIL">:
</h2>
<ul>