com web/doc: Recognize n/a as a missing revision number; separate files without rev number and critical files: include/lib_revcheck .inc.php www/revcheck.php
[email protected] Mon, 23 Jun 2014 06:34:48 +0000
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
Commit: 1c63160f1e42f9f8ce9ecf438aaf6b1f19469aee Author: Sobak <[email protected]> Mon, 23 Jun 2014 08:34:48 +0200 Parents: 4c69106dc69541367d56202df82c1badcfb9651f Branches: master Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=1c63160f1e42f9f8ce9ecf438aaf6b1f19469aee Log: Recognize n/a as a missing revision number; separate files without rev number and critical files Changed paths: M include/lib_revcheck.inc.php M www/revcheck.php Diff: diff --git a/include/lib_revcheck.inc.php b/include/lib_revcheck.inc.php index be78041..61a86bb 100644 --- a/include/lib_revcheck.inc.php +++ b/include/lib_revcheck.inc.php @@ -235,7 +235,7 @@ function get_misstags($idx, $lang) d.name AS dir, b.size AS en_size, a.size AS trans_size, a.name AS name FROM files a, dirs d LEFT JOIN files b ON a.dir = b.dir AND a.name = b.name - WHERE a.lang="'.$lang.'" AND b.lang="en" AND a.revision IS NULL + WHERE a.lang="'.$lang.'" AND b.lang="en" AND (a.revision IS NULL OR a.revision = "n/a") AND a.size IS NOT NULL AND a.dir = d.id'; $result = $idx->query($sql); @@ -453,6 +453,8 @@ function get_stats_critical($idx, $lang) ) ) ) + AND + a.revision != "n/a" AND a.size is not NULL AND @@ -554,7 +556,7 @@ function get_stats_notag($idx, $lang) AND b.lang="en" AND - a.revision is NULL + (a.revision is NULL OR a.revision = "n/a") AND a.size is not NULL AND diff --git a/www/revcheck.php b/www/revcheck.php index 7bdce8b..fda0c0f 100644 --- a/www/revcheck.php +++ b/www/revcheck.php @@ -162,11 +162,11 @@ TRANSLATORS_HEAD; $misstags = get_misstags($dbhandle, $lang); $num = count($misstags); if (!$num) { - echo '<p>Good, all files contain revision comments.</p>'; + echo '<p>Good, all files contain revision numbers.</p>'; } else { echo '<table border="0" cellpadding="3" cellspacing="1" style="text-align:center">'; - echo '<tr><th rowspan="2">Files without Revision-comment ('.$num.' files):</th><th colspan="3">Sizes in kB</th></tr>'; + echo '<tr><th rowspan="2">Files without EN-Revision number ('.$num.' files):</th><th colspan="3">Sizes in kB</th></tr>'; echo '<tr><th>en</th><th>'.$lang.'</th><th>diff</th></</tr>'; $last_dir = false; @@ -191,16 +191,14 @@ TRANSLATORS_HEAD; array (REV_CRITICAL, 'Critical files'), array (REV_WIP, 'Work in progress'), array (REV_NOREV, 'Files without revision number'), - array (REV_NOTAG, 'Files without revision tag'), array (REV_NOTRANS, 'Files available for translation') ); $file_summary_array = array( REV_UPTODATE => array(0,0), - REV_NOREV => array(0,0), REV_CRITICAL => array(0,0), REV_OLD => array(0,0), - REV_NOTAG => array(0,0), + REV_NOREV => array(0,0), REV_NOTRANS => array(0,0), REV_CREDIT => array(0,0), REV_WIP => array(0,0) @@ -210,7 +208,7 @@ TRANSLATORS_HEAD; $file_summary_array[REV_CRITICAL] = get_stats_critical($dbhandle, $lang); $file_summary_array[REV_UPTODATE] = get_stats_uptodate($dbhandle, $lang); $file_summary_array[REV_OLD] = get_stats_old($dbhandle, $lang); - $file_summary_array[REV_NOTAG] = get_stats_notag($dbhandle, $lang); + $file_summary_array[REV_NOREV] = get_stats_notag($dbhandle, $lang); $file_summary_array[REV_NOTRANS] = get_stats_notrans($dbhandle, $lang); echo '<table border="0" cellpadding="4" cellspacing="1" style="text-align:center;">';