nlopess Wed Mar 24 11:14:23 2004 EDT
Added files:
/livedocs mk_smarty.php
Modified files:
/livedocs configure.in mk_peardoc.php
Log:
now smarty works with livedocs too
http://cvs.php.net/diff.php/livedocs/configure.in?r1=1.21&r2=1.22&ty=u
Index: livedocs/configure.in
diff -u livedocs/configure.in:1.21 livedocs/configure.in:1.22
--- livedocs/configure.in:1.21 Sun Mar 21 13:35:55 2004
+++ livedocs/configure.in Wed Mar 24 11:14:23 2004
@@ -1,5 +1,5 @@
## A configure script
-## $Id: configure.in,v 1.21 2004/03/21 18:35:55 nlopess Exp $
+## $Id: configure.in,v 1.22 2004/03/24 16:14:23 nlopess Exp $
AC_PREREQ(2.13)
AC_INIT(livedoc.php)
@@ -51,7 +51,7 @@
[BUILDLOG="$withval"],
[BUILDLOG="/var/log/livedocs-index"])
-AC_ARG_WITH(build-type,[ --with-build-type[=BUILD_TYPE] Build type (phpdoc|peardoc)
[default=phpdoc]],
+AC_ARG_WITH(build-type,[ --with-build-type[=BUILD_TYPE] Build type
(phpdoc|peardoc|smarty) [default=phpdoc]],
[BUILDTYPE="$withval"],
[BUILDTYPE="phpdoc"])
http://cvs.php.net/diff.php/livedocs/mk_peardoc.php?r1=1.2&r2=1.3&ty=u
Index: livedocs/mk_peardoc.php
diff -u livedocs/mk_peardoc.php:1.2 livedocs/mk_peardoc.php:1.3
--- livedocs/mk_peardoc.php:1.2 Wed Mar 17 09:05:56 2004
+++ livedocs/mk_peardoc.php Wed Mar 24 11:14:23 2004
@@ -18,11 +18,11 @@
// | Configuration file for peardoc build |
// +----------------------------------------------------------------------+
//
-// $Id: mk_peardoc.php,v 1.2 2004/03/17 14:05:56 didou Exp $
+// $Id: mk_peardoc.php,v 1.3 2004/03/24 16:14:23 nlopess Exp $
define('MK_VERSION', false);
-$parse_dirs = array('authoring', 'chapters', 'core', 'guide', 'package', 'pecl');
+$parse_dirs = array('chapters', 'core', 'guide', 'package', 'pecl');
$top_files = array('manual.xml');
http://cvs.php.net/co.php/livedocs/mk_smarty.php?r=1.1&p=1
Index: livedocs/mk_smarty.php
+++ livedocs/mk_smarty.php
<?php
/* vim: set tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 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 |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | [EMAIL PROTECTED] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Wez Furlong, Derick Rethans, Ilia Alshanetsky |
// +----------------------------------------------------------------------+
// | Configuration file for peardoc build |
// +----------------------------------------------------------------------+
//
// $Id: mk_smarty.php,v 1.1 2004/03/24 16:14:23 nlopess Exp $
define('MK_VERSION', false);
$parse_dirs = array('');
$top_files = array('manual.xml');
$entities_dir = 'entities';
function search_parse_dir($path, $section)
{
global $idx, $toca, $tocd;
$d = opendir($path);
readdir($d); readdir($d);
while (($f = readdir($d))) {
if ($f == 'CVS' || $f == '.cvsignore') {
continue;
}
switch (filetype($path . '/' . $f)) {
case 'file':
$docbook_id = substr($f, 0, -4);
if (isset($toca[$docbook_id])) {
$id = $toca[$docbook_id];
$wl = search_parse_file($path . '/' . $f, $descr);
if ($descr && !isset($tocd[$id])) {
$tocd[$id] = trim($descr);
}
$qry = '';
foreach ($wl as $w) {
if (strlen($w) > MIN_WORD_LEN) {
$qry .= "INSERT INTO full_search VALUES('{$w}', {$id});";
}
}
sqlite_query($idx, $qry);
} else {
echo "BAD ID: $docbook_id ($path, $f, $section)\n";
}
break;
case 'dir' :
search_parse_dir($path . '/' . $f, $section);
break;
}
}
closedir($d);
}