From: <var...@us...> - 2021-07-30 08:59:38
|
Revision: 10401 http://sourceforge.net/p/phpwiki/code/10401 Author: vargenau Date: 2021-07-30 08:59:36 +0000 (Fri, 30 Jul 2021) Log Message: ----------- No need for default value Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2021-07-29 19:44:34 UTC (rev 10400) +++ trunk/lib/WikiDB/backend/PearDB.php 2021-07-30 08:59:36 UTC (rev 10401) @@ -192,7 +192,7 @@ return; } - $this->lock(array($page_tbl), true); + $this->lock(array($page_tbl)); $data = $this->get_pagedata($pagename); if (!$data) { $data = array(); @@ -271,7 +271,7 @@ $id = $dbh->getOne($query); if (empty($id)) { - $this->lock(array($page_tbl), true); // write lock + $this->lock(array($page_tbl)); // write lock $max_id = $dbh->getOne("SELECT MAX(id) FROM $page_tbl"); $id = $max_id + 1; // requires createSequence and on mysql lock the interim table ->getSequenceName @@ -458,7 +458,7 @@ extract($this->_table_names); $this->lock(); - if (($id = $this->_get_pageid($pagename, false))) { + if (($id = $this->_get_pageid($pagename))) { $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id"); $dbh->query("DELETE FROM $recent_tbl WHERE id=$id"); $dbh->query("DELETE FROM $version_tbl WHERE id=$id"); @@ -910,8 +910,8 @@ extract($this->_table_names); $this->lock(); - if (($id = $this->_get_pageid($pagename, false))) { - if ($new = $this->_get_pageid($to, false)) { + if (($id = $this->_get_pageid($pagename))) { + if ($new = $this->_get_pageid($to)) { // Cludge Alert! // This page does not exist (already verified before), but exists in the page table. // So we delete this page. Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-07-29 19:44:34 UTC (rev 10400) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-07-30 08:59:36 UTC (rev 10401) @@ -117,7 +117,7 @@ return; } - $this->lock(array($page_tbl), true); + $this->lock(array($page_tbl)); $data = $this->get_pagedata($pagename); if (!$data) { $data = array(); @@ -254,7 +254,7 @@ $id = $dbh->getOne($query); if (empty($id)) { - $this->lock(array($page_tbl), true); // write lock + $this->lock(array($page_tbl)); // write lock $max_id = $dbh->getOne("SELECT MAX(id) FROM $page_tbl"); $id = $max_id + 1; // requires createSequence and on mysql lock the interim table ->getSequenceName @@ -277,7 +277,7 @@ extract($this->_table_names); $this->lock(); - if (($id = $this->_get_pageid($pagename, false))) { + if (($id = $this->_get_pageid($pagename))) { $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id"); $dbh->query("DELETE FROM $recent_tbl WHERE id=$id"); $dbh->query("DELETE FROM $version_tbl WHERE id=$id"); @@ -583,8 +583,8 @@ extract($this->_table_names); $this->lock(); - if (($id = $this->_get_pageid($pagename, false))) { - if ($new = $this->_get_pageid($to, false)) { + if (($id = $this->_get_pageid($pagename))) { + if ($new = $this->_get_pageid($to)) { // Cludge Alert! // This page does not exist (already verified before), but exists in the page table. // So we delete this page. @@ -757,8 +757,6 @@ // $word = str_replace(" ", "&", $word); // phrase fix // @alu: use _quote maybe instead of direct pg_escape_string - $word = pg_escape_string($word); - - return $word; + return pg_escape_string($word); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |