iliaa Sun Jun 19 23:47:16 2005 EDT
Modified files:
/livedocs mkindex.php
Log:
broken link fixes
http://cvs.php.net/diff.php/livedocs/mkindex.php?r1=1.41&r2=1.42&ty=u
Index: livedocs/mkindex.php
diff -u livedocs/mkindex.php:1.41 livedocs/mkindex.php:1.42
--- livedocs/mkindex.php:1.41 Fri Jun 17 18:10:16 2005
+++ livedocs/mkindex.php Sun Jun 19 23:47:15 2005
@@ -19,7 +19,7 @@
// | construct an index |
// +----------------------------------------------------------------------+
//
-// $Id: mkindex.php,v 1.41 2005/06/17 22:10:16 iliaa Exp $
+// $Id: mkindex.php,v 1.42 2005/06/20 03:47:15 iliaa Exp $
/* just to be on the safe side */
@@ -118,7 +118,7 @@
$this->data .= "'');";
}
$this->data .= "INSERT INTO idents VALUES ('" .
strtolower($this->last_id) . "', {$this->fileid}, '" .
sqlite_escape_string(str_replace('||amp||', '&', trim($this->cdata))) . "',";
- $this->incomp = 1;
+ $this->incomp = $this->last_id;
} else {
$this->data .=
"'".sqlite_escape_string(str_replace('||amp||', '&', trim($this->cdata)))."');";
$this->incomp = 0;
@@ -200,8 +200,12 @@
if ($p->incomp) {
$p->data .= "'');";
}
- if (!sqlite_query($idx, $p->data)) {
- exit("Failed Query (".
sqlite_error_string(sqlite_last_error($idx))."): ".$p->data);
+ if (!sqlite_exec($idx, $p->data)) {
+ foreach(explode(';', $p->data) as $v) {
+ if ($v) {
+ sqlite_exec($idx, $v);
+ }
+ }
}
}
}