svn: /web/doc-editor/trunk/php/ RepositoryManager.php TranslationStatistic.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Sat, 14 Nov 2009 22:04:14 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290759

Log:
Fix stats on file

Changed paths:
    U   web/doc-editor/trunk/php/RepositoryManager.php
    U   web/doc-editor/trunk/php/TranslationStatistic.php

Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php	2009-11-14 21:30:44 UTC (rev 290758)
+++ web/doc-editor/trunk/php/RepositoryManager.php	2009-11-14 22:04:14 UTC (rev 290759)
@@ -760,10 +760,9 @@
                         }
                     } else {
                         $s = sprintf(
-                            'INSERT INTO `files` (`lang`, `path`, `name`, `revision`, `size`, `mdate`, `maintainer`, `status`)
-                                VALUES ("%s", "%s", "%s", "%s", %s, %s, "%s", "%s")',
-                            $lang, $lang_file->path, $lang_file->name,
-                            'NULL', 'NULL', 'NULL', 'NULL', 'NULL'
+                            'INSERT INTO `files` (`lang`, `path`, `name`)
+                                VALUES ("%s", "%s", "%s")',
+                            $lang, $lang_file->path, $lang_file->name
                         );
                         DBConnection::getInstance()->query($s);
                     }

Modified: web/doc-editor/trunk/php/TranslationStatistic.php
===================================================================
--- web/doc-editor/trunk/php/TranslationStatistic.php	2009-11-14 21:30:44 UTC (rev 290758)
+++ web/doc-editor/trunk/php/TranslationStatistic.php	2009-11-14 22:04:14 UTC (rev 290759)
@@ -33,7 +33,8 @@
                 FROM
                     `files`
                 WHERE
-                    `lang`="' . AccountManager::getInstance()->vcsLang . '"
+                    `lang` = "' . AccountManager::getInstance()->vcsLang . '" AND
+                    ( `status` != "NotInEN" OR `status` IS NULL )
             ';
         $res = DBConnection::getInstance()->query($s);

@@ -147,7 +148,7 @@
             AND
                 b.lang="en"
             AND
-                (a.revision is NULL OR a.revision = 0)
+                a.revision is NULL
             AND
                 a.size is NULL';
         $result = DBConnection::getInstance()->query($s);
@@ -183,7 +184,7 @@
             AND
                 b.lang="en"
             AND
-                (a.revision is NULL OR a.revision=0)
+                a.revision is NULL
             AND
                 a.size is NULL';
         $result = DBConnection::getInstance()->query($s);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.