iliaa Wed Jun 15 21:11:02 2005 EDT
Modified files:
/livedocs mkindex.php
Log:
Slight speed tune-up.
http://cvs.php.net/diff.php/livedocs/mkindex.php?r1=1.39&r2=1.40&ty=u
Index: livedocs/mkindex.php
diff -u livedocs/mkindex.php:1.39 livedocs/mkindex.php:1.40
--- livedocs/mkindex.php:1.39 Wed Feb 9 17:16:00 2005
+++ livedocs/mkindex.php Wed Jun 15 21:11:01 2005
@@ -19,7 +19,7 @@
// | construct an index |
// +----------------------------------------------------------------------+
//
-// $Id: mkindex.php,v 1.39 2005/02/09 22:16:00 iliaa Exp $
+// $Id: mkindex.php,v 1.40 2005/06/16 01:11:01 iliaa Exp $
/* just to be on the safe side */
@@ -87,13 +87,13 @@
}
function start_elem($parser, $name, $attrs) {
- static $titles = array('TITLE', 'REFNAME', 'QANDAENTRY',
'VARLISTENTRY');
+ static $titles = array('TITLE'=>1, 'REFNAME'=>1,
'QANDAENTRY'=>1, 'VARLISTENTRY'=>1);
// if there is an ID attribute, record it
if (isset($attrs['ID'])) {
$this->last_id = $attrs['ID'];
}
- if ($this->last_id !== false && in_array($name, $titles)) {
+ if ($this->last_id !== false && isset($titles[$name])) {
$this->title_depth = 1;
}
}