com web/doc: Code cleanup: README.md scripts/rev.php www/revcheck.php
| From: | sobak@php.net | Date: | Sun, 03 Aug 2014 05:07:13 +0000 |
| Subject: | com web/doc: Code cleanup: README.md scripts/rev.php www/revcheck.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2411@lists.php.net to get a copy of this message | ||
Commit: 11bedb65e78e3216dcba91721950501f59957cc3
Author: Sobak <msobaczewski@gmail.com> Sun, 3 Aug 2014 07:07:13 +0200
Parents: d8dbad882a59e41d10bdcf03bed44d2a14b2f442
Branches: master
Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=11bedb65e78e3216dcba91721950501f59957cc3
Log:
Code cleanup
Changed paths:
M README.md
M scripts/rev.php
M www/revcheck.php
Diff:
diff --git a/README.md b/README.md
index 866d483..9c287d3 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,10 @@ Requirements:
3. Increase memory limit for PHP scripts to at least 32MB
4. Fill in two configuration files
-
build-ops.sample.php (rename it to build-ops.php)
- - @SVNDIR@ - absolute path to dir where scripts will clone SVN repos to and then use
them for generating data
+ - @SVNDIR@ - absolute path to dir where scripts will clone phpdoc-all
to and then use it for generating data
- build-ops-sample (rename it to build-ops [no ext])
- @PHP@ - path to the PHP executable file
- - @SVNDIR@ - absolute path to dir where scripts will clone SVN repos to and then use
them for generating data
+ - @SVNDIR@ - absolute path to dir where scripts will clone phpdoc-all
to and then use it for generating data
- @DOCDIR@ - path to the directory with documentation in SVN repo
- @DOCWEB@ - absolute path to directory with this website
- @SCRIPTSDIR@- absolute path to /scripts/ directory
diff --git a/scripts/rev.php b/scripts/rev.php
index 611c969..45d0fe5 100644
--- a/scripts/rev.php
+++ b/scripts/rev.php
@@ -30,7 +30,7 @@ set_time_limit(0);
include '../include/init.inc.php';
include '../include/lib_proj_lang.inc.php';
-$DOCS = SVN_DIR . 'phpdoc-all/';
+$DOCS = SVN_DIR;
// Test the languages:
$LANGS = array_keys($LANGUAGES);
diff --git a/www/revcheck.php b/www/revcheck.php
index e709246..b42b72c 100644
--- a/www/revcheck.php
+++ b/www/revcheck.php
@@ -179,7 +179,6 @@ TRANSLATORS_HEAD;
echo gen_date($DBLANG);
break;
-
case 'filesummary':
$file_types = array(
array (REV_UPTODATE, 'Up to date files'),
@@ -194,15 +193,14 @@ TRANSLATORS_HEAD;
REV_OUTDATED => array(0,0),
REV_NOREV => array(0,0),
REV_NOTRANS => array(0,0),
- REV_CREDIT => array(0,0),
REV_WIP => array(0,0)
);
- $file_summary_array[REV_WIP] = get_stats($dbhandle, $lang, 'wip');
- $file_summary_array[REV_OUTDATED] = get_stats($dbhandle, $lang, 'outdated');
$file_summary_array[REV_UPTODATE] = get_stats($dbhandle, $lang, 'uptodate');
+ $file_summary_array[REV_OUTDATED] = get_stats($dbhandle, $lang, 'outdated');
$file_summary_array[REV_NOREV] = get_stats($dbhandle, $lang, 'norev');
$file_summary_array[REV_NOTRANS] = get_stats($dbhandle, $lang, 'notrans');
+ $file_summary_array[REV_WIP] = get_stats($dbhandle, $lang, 'wip');
echo '<table border="0" cellpadding="4" cellspacing="1"
style="text-align:center;">';
echo '<tr><th>File status type</th><th>Number of
files</th><th>Percent of files</th><th>Size of files
(kB)</th><th>Percent of size</th></tr>';
@@ -248,9 +246,8 @@ TRANSLATORS_HEAD;
echo '<p>This tool allows you to check which files in your translation need update. To
show the list ';
echo 'choose a directory (it doesn\'t works recursively) or
translator.</p>';
echo '<p>When you click on the filename you will see plaintext diff showing changes
between revisions so ';
- echo 'you will know what has changed in English version and what informations you need to
update.<br>';
- echo 'You can also click on [diff] to show colored diff. If filename is not a link it means
that revision ';
- echo 'number in your translation is unavailable for this file (and you should fix
it).</p>';
+ echo 'you will know what has changed in English version and what informations you need to
update.';
+ echo 'You can also click on [diff] to show colored diff.</p>';
echo '<p>Choose a directory:</p>';
echo '<form method="get" action="revcheck.php"><p><select
name="dir">';
foreach ($dirs as $id => $name) {
@@ -326,19 +323,13 @@ END_OF_MULTILINE;
$r["maintainer"] = '<a href="?p=translators&lang=' . $lang
. '">' . $r["maintainer"] . '</a>';
}
- // If we have a 'numeric' revision diff and it is not zero,
- // make a link to the SVN repository's diff script
- if ($r['trans_rev'] !== 'n/a') {
- $r['short_name'] = '<a href="http://svn.php.net/viewvc/phpdoc/en/trunk'
. $r['name'] . '/' . $r['file'] .
- '?r1=' . $r['trans_rev'] . '&r2=' .
$r['en_rev'] . '&view=patch">' . $r['file'] .
'</a>';
+ // Make a link to the SVN repository's diff script
+ $r['short_name'] = '<a href="http://svn.php.net/viewvc/phpdoc/en/trunk'
. $r['name'] . '/' . $r['file'] .
+ '?r1=' . $r['trans_rev'] . '&r2=' .
$r['en_rev'] . '&view=patch">' . $r['file'] .
'</a>';
- // Add a [diff] link
- $r['short_name'] .= ' <a href="http://svn.php.net/viewvc/phpdoc/en/trunk'
. $r['name'] . '/' . $r['file'] .
- '?r1=' . $r['trans_rev'] . '&r2=' .
$r['en_rev'] . '">[diff]</a>';
- }
- else {
- $r['short_name'] = $r['file'];
- }
+ // Add a [diff] link
+ $r['short_name'] .= ' <a href="http://svn.php.net/viewvc/phpdoc/en/trunk'
. $r['name'] . '/' . $r['file'] .
+ '?r1=' . $r['trans_rev'] . '&r2=' .
$r['en_rev'] . '">[diff]</a>';
// Write out the line for the current file (get file name shorter)
echo '<tr>'.