com web/doc: get_dirs(): fetch only dirs with outdated files, not with missing rev numbers : include/lib_revcheck.inc.php

[email protected] Tue, 01 Jul 2014 04:17:42 +0000
Newsgroups php.doc.web
Message-ID <[email protected]>
Commit:    6cdcfb0be035691bd1c090abdbcba952d29c4d0c
Author:    Sobak <[email protected]>         Tue, 1 Jul 2014 06:17:42 +0200
Parents:   d0a797bfb36445a6a3e13b753f6ac117d0093619
Branches:  master

Link:       http://git.php.net/?p=web/doc.git;a=commitdiff;h=6cdcfb0be035691bd1c090abdbcba952d29c4d0c

Log:
get_dirs(): fetch only dirs with outdated files, not with missing rev numbers

Changed paths:
  M  include/lib_revcheck.inc.php


Diff:
diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php
index 506ac27..1cf40ae 100644
--- a/include/lib_revcheck.inc.php
+++ b/include/lib_revcheck.inc.php
@@ -26,7 +26,7 @@ define("ALERT_DATE", -30); // translation is 30 or more days older than the en o
 // Return an array of directory containing outdated files
 function get_dirs($idx, $lang) {
     $sql = 'SELECT
-        distinct b.name AS name, 
+        DISTINCT b.name AS name, 
         a.dir AS dir
     FROM 
         files a, 
@@ -45,6 +45,8 @@ function get_dirs($idx, $lang) {
         c.lang="en" 
     AND
         a.revision != c.revision 
+    AND
+        a.revision != "n/a"
     ORDER BY
         b.name';