cvs: docweb /cron/weekly checkent /include lib_general.inc.php /scripts checkent.php /www .cvsignore checkent.php
| From: | Nuno Lopes | Date: | Thu, 20 Jan 2005 22:29:47 +0000 |
| Subject: | cvs: docweb /cron/weekly checkent /include lib_general.inc.php /scripts checkent.php /www .cvsignore checkent.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-504@lists.php.net to get a copy of this message | ||
nlopess Thu Jan 20 17:29:47 2005 EDT
Added files:
/docweb/www checkent.php
Modified files:
/docweb/cron/weekly checkent
/docweb/include lib_general.inc.php
/docweb/scripts checkent.php
/docweb/www .cvsignore
Log:
generalize check: use it for phpdoc, peardoc and smarty
make it available just for english
bug fix
http://cvs.php.net/diff.php/docweb/cron/weekly/checkent?r1=1.1&r2=1.2&ty=u
Index: docweb/cron/weekly/checkent
diff -u docweb/cron/weekly/checkent:1.1 docweb/cron/weekly/checkent:1.2
--- docweb/cron/weekly/checkent:1.1 Tue Jan 18 07:03:29 2005
+++ docweb/cron/weekly/checkent Thu Jan 20 17:29:47 2005
@@ -3,4 +3,6 @@
.
dirname $0/../../build-ops
cd ${SCRIPTSDIR}
-${PHP} checkent.php > ${DOCWEB}/www/checkent.php
+${PHP} checkent.php phpdoc > ${DOCWEB}/www/checkent_php.php
+${PHP} checkent.php peardoc > ${DOCWEB}/www/checkent_pear.php
+${PHP} checkent.php smarty > ${DOCWEB}/www/checkent_smarty.php
http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.31&r2=1.32&ty=u
Index: docweb/include/lib_general.inc.php
diff -u docweb/include/lib_general.inc.php:1.31 docweb/include/lib_general.inc.php:1.32
--- docweb/include/lib_general.inc.php:1.31 Tue Jan 18 07:03:30 2005
+++ docweb/include/lib_general.inc.php Thu Jan 20 17:29:47 2005
@@ -18,7 +18,7 @@
| Gabor Hojtsy <goba@php.net> |
| Sean Coates <sean@php.net> |
+----------------------------------------------------------------------+
-$Id: lib_general.inc.php,v 1.31 2005/01/18 12:03:30 nlopess Exp $
+$Id: lib_general.inc.php,v 1.32 2005/01/20 22:29:47 nlopess Exp $
*/
function is_translation($project, $language)
@@ -200,9 +200,22 @@
}
if (SITE == 'php') {
$links['doc-howto'] = BASE_URL . '/dochowto/index.php';
- $links['checkent'] = BASE_URL . '/checkent.php';
- $links['orphan-notes'] = BASE_URL . '/orphan_notes.php';
}
+
+ // English only
+ if (LANGC == 'all' || LANGC == 'en') {
+
+ switch(SITE) {
+ case 'php':
+ $links['orphan-notes'] = BASE_URL . '/orphan_notes.php';
+
+ case 'pear':
+ case 'smarty':
+ $links['checkent'] = BASE_URL . '/checkent.php';
+ break;
+ }
+ }
+
return DocWeb_Template::get(
'shared/nav_links.tpl.php',
array('links' => $links, 'Language' =>
&$GLOBALS['Language'])
http://cvs.php.net/diff.php/docweb/scripts/checkent.php?r1=1.7&r2=1.8&ty=u
Index: docweb/scripts/checkent.php
diff -u docweb/scripts/checkent.php:1.7 docweb/scripts/checkent.php:1.8
--- docweb/scripts/checkent.php:1.7 Thu Jan 20 12:43:41 2005
+++ docweb/scripts/checkent.php Thu Jan 20 17:29:47 2005
@@ -18,14 +18,27 @@
* | Docweb port: Nuno Lopes <nlopess@php.net> |
* | Mehdi Achour <didou@php.net> |
* +----------------------------------------------------------------------+
- * $Id: checkent.php,v 1.7 2005/01/20 17:43:41 nlopess Exp $
+ * $Id: checkent.php,v 1.8 2005/01/20 22:29:47 nlopess Exp $
*/
set_time_limit(0);
$inCli = true;
include '../include/init.inc.php';
-$filename = CVS_DIR . '/phpdoc-all/entities/global.ent';
+switch($_SERVER['argv'][1]) {
+ case 'phpdoc':
+ $filename = CVS_DIR . '/phpdoc-all/entities/global.ent';
+ break;
+
+ case 'peardoc':
+ $filename = CVS_DIR . '/peardoc/global.ent';
+ break;
+
+ case 'smarty':
+ $filename = CVS_DIR . '/smarty/docs/entities/global.ent';
+ break;
+}
+
// Schemes currently supported
$schemes = array('http');
@@ -120,7 +133,7 @@
case 'http':
case 'https':
- if (isset($parsed_url['path'])) {
+ if (isset($url['path'])) {
$url['path'] = $url['path'] . (isset($url['query']) ?
'?' . $url['query'] : '');
} else {
$url['path'] = '/';
@@ -142,7 +155,7 @@
$errors[HTTP_CONNECT][] = array($num);
} else {
- fputs($fp, "HEAD {$url['path']} HTTP/1.0\r\nHost:
{$url['host']}\r\nConnection: close\r\nUser-agent: Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.0)\r\n\r\n");
+ fputs($fp, "HEAD {$url['path']} HTTP/1.0\r\nHost:
{$url['host']}\r\nUser-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0)\r\nConnection: close\r\n\r\n");
$str = '';
while (!feof($fp)) {
@@ -377,6 +390,10 @@
echo '</table>';
}
+if(!count($errors)) {
+ echo '<p><b>No problems found!</b></p>';
+}
+
echo '<p>Checked ' . $numb . ' urls</p>';
echo '<?php echo site_footer(); ?>';
http://cvs.php.net/diff.php/docweb/www/.cvsignore?r1=1.3&r2=1.4&ty=u
Index: docweb/www/.cvsignore
diff -u docweb/www/.cvsignore:1.3 docweb/www/.cvsignore:1.4
--- docweb/www/.cvsignore:1.3 Tue Jan 18 07:03:30 2005
+++ docweb/www/.cvsignore Thu Jan 20 17:29:47 2005
@@ -1,3 +1,5 @@
robots.txt
orphan_notes.php
-checkent.php
+checkent_php.php
+checkent_pear.php
+checkent_smarty.php
http://cvs.php.net/co.php/docweb/www/checkent.php?r=1.1&p=1
Index: docweb/www/checkent.php
+++ docweb/www/checkent.php
<?php
include '../include/init.inc.php';
if(is_file('checkent_' . SITE . '.php')) {
include 'checkent_' . SITE . '.php';
} else {
echo site_header('docweb.common.header.checkent');
echo '<p>checkent not found!</p>';
echo site_footer();
}
?>