From: Geoffrey T. D. <da...@us...> - 2001-10-29 17:57:26
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend In directory usw-pr-cvs1:/tmp/cvs-serv14137/lib/WikiDB/backend Modified Files: PearDB.php Log Message: Cleanup to get rid of PHP warning. Index: PearDB.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** PearDB.php 2001/09/21 14:41:33 1.6 --- PearDB.php 2001/10/29 17:57:24 1.7 *************** *** 372,383 **** $dbh->query("DELETE FROM $link_tbl WHERE linkfrom=$pageid"); ! foreach($links as $link) { ! if (isset($linkseen[$link])) ! continue; ! $linkseen[$link] = true; ! $linkid = $this->_get_pageid($link, true); ! $dbh->query("INSERT INTO $link_tbl (linkfrom, linkto)" ! . " VALUES ($pageid, $linkid)"); ! } $this->unlock(); } --- 372,385 ---- $dbh->query("DELETE FROM $link_tbl WHERE linkfrom=$pageid"); ! if ($links) { ! foreach($links as $link) { ! if (isset($linkseen[$link])) ! continue; ! $linkseen[$link] = true; ! $linkid = $this->_get_pageid($link, true); ! $dbh->query("INSERT INTO $link_tbl (linkfrom, linkto)" ! . " VALUES ($pageid, $linkid)"); ! } ! } $this->unlock(); } |