com web/doc: Don't compare revision numbers to recognize file as old/critical: include/lib_revcheck.inc.php
[email protected] Mon, 23 Jun 2014 06:52:25 +0000
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
Commit: 0c34ec2edb304f216417b230a942a05f1bf0f704 Author: Sobak <[email protected]> Mon, 23 Jun 2014 08:52:25 +0200 Parents: 1c63160f1e42f9f8ce9ecf438aaf6b1f19469aee Branches: master Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=0c34ec2edb304f216417b230a942a05f1bf0f704 Log: Don't compare revision numbers to recognize file as old/critical It's silly criterion and results were incorrect. Changed paths: M include/lib_revcheck.inc.php Diff: diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php index 61a86bb..3dd1be4 100644 --- a/include/lib_revcheck.inc.php +++ b/include/lib_revcheck.inc.php @@ -3,7 +3,7 @@ +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ -| Copyright (c) 1997-2011 The PHP Group | +| Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,6 @@ */ // A file is criticaly "outdated' if -define("ALERT_REV", 10); // translation is 10 or more revisions behind the en one define("ALERT_SIZE", 3); // translation is 3 or more kB smaller than the en one define("ALERT_DATE", -30); // translation is 30 or more days older than the en one @@ -286,8 +285,6 @@ function translator_get_old($idx, $lang) AND b.lang="en" AND - b.revision - a.revision < ' . ALERT_REV . ' - AND b.revision != a.revision AND b.size - a.size < ' . ALERT_SIZE . ' @@ -323,19 +320,13 @@ function translator_get_critical($idx, $lang) a.lang="' . $lang . '" AND b.lang="en" - AND - ( - b.revision - a.revision >= ' . ALERT_REV . ' - OR - ( - b.revision != a.revision - AND - ( - b.size - a.size >= ' . (1024 * ALERT_SIZE) . ' - OR - (b.mdate - a.mdate) / 86400 >= ' . ALERT_DATE . ' - ) - ) + AND ( + b.revision != a.revision + AND ( + b.size - a.size >= ' . (1024 * ALERT_SIZE) . ' + OR + (b.mdate - a.mdate) / 86400 >= ' . ALERT_DATE . ' + ) ) AND a.size is not NULL @@ -439,19 +430,14 @@ function get_stats_critical($idx, $lang) a.lang="' . $lang .'" AND b.lang="en" - AND - ( - b.revision - a.revision >= ' . ALERT_REV . ' - OR - ( - b.revision != a.revision - AND - ( - (b.size - a.size) >= ' . ALERT_SIZE . ' - OR - (b.mdate - a.mdate) / 86400 >= ' . ALERT_DATE . ' - ) - ) + AND ( + b.revision != a.revision + AND + ( + (b.size - a.size) >= ' . ALERT_SIZE . ' + OR + (b.mdate - a.mdate) / 86400 >= ' . ALERT_DATE . ' + ) ) AND a.revision != "n/a" @@ -487,8 +473,6 @@ function get_stats_old($idx, $lang) AND b.lang="en" AND - (b.revision - a.revision) < ' . ALERT_REV . ' - AND b.revision != a.revision AND (b.size - a.size) < ' . ALERT_SIZE . '