cvs: docweb / INSTALL.txt /include lib_revcheck.inc.php /scripts gen_picture_info.php /www .cvsignore revcheck.php
| From: | Vincent Gevers | Date: | Sat, 30 Oct 2004 11:00:03 +0000 |
| Subject: | cvs: docweb / INSTALL.txt /include lib_revcheck.inc.php /scripts gen_picture_info.php /www .cvsignore revcheck.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-361@lists.php.net to get a copy of this message | ||
vincent Sat Oct 30 07:00:03 2004 EDT
Added files:
/docweb/www .cvsignore
Modified files:
/docweb INSTALL.txt
/docweb/include lib_revcheck.inc.php
/docweb/scripts gen_picture_info.php
/docweb/www revcheck.php
Log:
Been busy without committing..
- Added robots.txt in .cvsignore (I want to block them, others might not)
- Improved and fixed revcheck related scripts
http://cvs.php.net/diff.php/docweb/INSTALL.txt?r1=1.6&r2=1.7&ty=u
Index: docweb/INSTALL.txt
diff -u docweb/INSTALL.txt:1.6 docweb/INSTALL.txt:1.7
--- docweb/INSTALL.txt:1.6 Tue Sep 21 14:51:30 2004
+++ docweb/INSTALL.txt Sat Oct 30 07:00:02 2004
@@ -9,7 +9,9 @@
user who apache runs under.
4. The PEAR packages for the RFC System can be found at include/rfc/PACKAGES
5. A cronjob should be setup to run include/rfc/rfc-cron.php at 4am
-6. Configure the virtual host under apache. Current 'suggested settings' are:
+6. You may want to create a www/robots.txt to allow or disallow bots crawling
+ your local docweb development site.
+7. Configure the virtual host under apache. Current 'suggested settings' are:
<VirtualHost 127.0.0.1:80>
ServerName doc.php.net
http://cvs.php.net/diff.php/docweb/include/lib_revcheck.inc.php?r1=1.7&r2=1.8&ty=u
Index: docweb/include/lib_revcheck.inc.php
diff -u docweb/include/lib_revcheck.inc.php:1.7 docweb/include/lib_revcheck.inc.php:1.8
--- docweb/include/lib_revcheck.inc.php:1.7 Mon Sep 20 13:53:21 2004
+++ docweb/include/lib_revcheck.inc.php Sat Oct 30 07:00:03 2004
@@ -218,7 +218,7 @@
function get_description($idx, $lang)
{
- $sql = 'SELECT * FROM description WHERE lang = "' . $lang . '";';
+ $sql = 'SELECT intro FROM description WHERE lang = "' . $lang .
'";';
$result = sqlite_query($idx, $sql);
$row = sqlite_fetch_array($result, SQLITE_ASSOC);
return $row['intro'];
http://cvs.php.net/diff.php/docweb/scripts/gen_picture_info.php?r1=1.5&r2=1.6&ty=u
Index: docweb/scripts/gen_picture_info.php
diff -u docweb/scripts/gen_picture_info.php:1.5 docweb/scripts/gen_picture_info.php:1.6
--- docweb/scripts/gen_picture_info.php:1.5 Fri Oct 29 10:33:04 2004
+++ docweb/scripts/gen_picture_info.php Sat Oct 30 07:00:03 2004
@@ -1,5 +1,5 @@
<?php
-/* $Id: gen_picture_info.php,v 1.5 2004/10/29 14:33:04 vincent Exp $ */
+/* $Id: gen_picture_info.php,v 1.6 2004/10/30 11:00:03 vincent Exp $ */
include '../include/jpgraph/jpgraph.php';
include '../include/jpgraph/jpgraph_pie.php';
@@ -40,7 +40,7 @@
function generation_image($TYPE, $lang) {
- global $DOC_LANG;
+ global $LANGUAGES;
$idx = sqlite_open(SQLITE_DIR . 'rev.' . $TYPE . '.sqlite');
@@ -84,7 +84,7 @@
}
$legend = array($pourcent[0] . '%% up to date ('.$up_to_date.')', $pourcent[1]
. '%% critical ('.$critical.')', $pourcent[2] . '%% old
('.$old.')', $pourcent[3] . '%% missing ('.$missing.')',
$pourcent[4] . '%% without revtag ('.$no_tag.')');
-$title = ucfirst($TYPE). ' : Details for '.$DOC_LANG[$lang].' Doc';
+$title = ucfirst($TYPE). ' : Details for '.$LANGUAGES[$lang].' Doc';
$graph = new PieGraph(530,300);
$graph->SetShadow();
http://cvs.php.net/diff.php/docweb/www/revcheck.php?r1=1.6&r2=1.7&ty=u
Index: docweb/www/revcheck.php
diff -u docweb/www/revcheck.php:1.6 docweb/www/revcheck.php:1.7
--- docweb/www/revcheck.php:1.6 Fri Sep 24 13:32:19 2004
+++ docweb/www/revcheck.php Sat Oct 30 07:00:03 2004
@@ -1,5 +1,5 @@
<?php
-/* $Id: revcheck.php,v 1.6 2004/09/24 17:32:19 sean Exp $ */
+/* $Id: revcheck.php,v 1.7 2004/10/30 11:00:03 vincent Exp $ */
include '../include/init.inc.php';
include '../include/lib_revcheck.inc.php';
@@ -176,6 +176,7 @@
$cvsu = ' ';
$col = 'wip';
}
+ echo '<a name="maint-'.$nick."\">\n";
echo '<tr class="', $col, '">' .
"\n";
echo '<td>', $data['name'], '</td>',
"\n";
echo '<td>', $data['mail'], '</td>',
"\n";
@@ -212,13 +213,22 @@
MISSTAGS_HEAD;
$last_dir = false;
+ $total_size = 0;
foreach ($missfiles as $miss) {
if (!$last_dir || $last_dir != $miss['dir']) {
echo '<tr class="blue"><th
colspan="2">' . $miss['dir'] . '</th></tr>';
$last_dir = $miss['dir'];
}
echo '<tr class="wip"><td>',
$miss['file'], '</td><td class="r">',
$miss['size'], '</td></tr>';
+ $total_size += $miss['size'];
+ // flush every 200 kbytes
+ if (($total_size % 200) == 0) {
+ flush();
+ }
}
+ echo '<tr class="blue">
+ <th colspan="2">Total Size ('.$num.' files):
'.$total_size.' kB</th>
+ </tr>';
echo '</table></div>';
}
break;
@@ -394,7 +404,7 @@
}
// Make the maintainer a link, if we have that maintainer in the list
if ($r['maintainer'] && $r["maintainer"] !=
'nobody') {
- $r["maintainer"] = '<a href="#maint">'
. $r["maintainer"] . '</a>';
+ $r["maintainer"] = '<a
href="?p=translators#maint-' . $r['maintainer'] . '">' .
$r["maintainer"] . '</a>';
}
// If we have a 'numeric' revision diff and it is not zero,
@@ -406,8 +416,8 @@
"&f=h&num=10\">" . $r["file"] .
"</a>";
// Write out the line for the current file (get file name shorter)
- echo "<tr class=\"{$CSS[$status_mark]}\">
- <td>{$r['short_name']}</td>".
+ echo "<tr class=\"{$CSS[$status_mark]}\">".
+ "<td>{$r['short_name']}</td>".
"<td>1.{$r['en_rev']}</td>" .
"<td>1.{$r['trans_rev']}</td>" .
"<td align=\"right\"><strong>" . $rev_diff .
"</strong></td>" .
@@ -418,7 +428,7 @@
"<td> {$r['trans_date']}</td>" .
"<td align=\"right\"><strong>" . $date_diff .
"</strong></td>" .
"<td> {$r['maintainer']}</td>" .
- "<td> {$r['status']}</td></tr>";
+ "<td> {$r['status']}</td></tr>\n";
}
echo '</table></div>';
@@ -427,9 +437,13 @@
break;
case "graph" :
- echo "<p class=\"c\">
- <img src=\"/images/revcheck/info_revcheck_" . SITE . "_" . LANGC
. ".png\" alt=\"Info\" />
- </p>";
+ if (is_readable("images/revcheck/info_revcheck_" . SITE . "_" . LANGC .
".png")) {
+ echo "<p class=\"c\">
+ <img src=\"/images/revcheck/info_revcheck_" . SITE . "_" .
LANGC . ".png\" alt=\"Info\" />
+ </p>";
+ } else {
+ echo 'Can\'t find graph';
+ }
break;
default :
http://cvs.php.net/co.php/docweb/www/.cvsignore?r=1.1&p=1
Index: docweb/www/.cvsignore
+++ docweb/www/.cvsignore
robots.txt