From: <var...@us...> - 2015-02-27 18:16:11
|
Revision: 9575 http://sourceforge.net/p/phpwiki/code/9575 Author: vargenau Date: 2015-02-27 18:16:08 +0000 (Fri, 27 Feb 2015) Log Message: ----------- Remove unused variables Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/ADODB_mysql.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/ADODB_sqlite.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PearDB_oci8.php Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/ADODB.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -466,7 +466,6 @@ $dbh->BeginTrans(); $dbh->CommitLock($version_tbl); $id = $this->_get_pageid($pagename, true); - $backend_type = $this->backendType(); $dbh->Execute(sprintf("DELETE FROM $version_tbl" . " WHERE id=%d AND version=%d", $id, $version)); @@ -1312,7 +1311,7 @@ $field_list = array(); $old_db = $this->database(); if ($database != $old_db) { - $conn = $this->_dbh->Connect($this->_parsedDSN['hostspec'], + $this->_dbh->Connect($this->_parsedDSN['hostspec'], DBADMIN_USER ? DBADMIN_USER : $this->_parsedDSN['username'], DBADMIN_PASSWD ? DBADMIN_PASSWD : $this->_parsedDSN['password'], $database); @@ -1322,7 +1321,7 @@ } if ($database != $old_db) { $this->_dbh->close(); - $conn = $this->_dbh->Connect($this->_parsedDSN['hostspec'], + $this->_dbh->Connect($this->_parsedDSN['hostspec'], $this->_parsedDSN['username'], $this->_parsedDSN['password'], $old_db); Modified: trunk/lib/WikiDB/backend/ADODB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mysql.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/ADODB_mysql.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -125,7 +125,7 @@ } if (DO_APP_LOCK) { $lock = join('-', $tables); - $result = $this->_dbh->Execute("SELECT RELEASE_LOCK('$lock')"); + $this->_dbh->Execute("SELECT RELEASE_LOCK('$lock')"); } if (DO_FULL_LOCK) { // if this is not enough: @@ -175,7 +175,7 @@ $row = $dbh->GetRow($query); if (!$row) { // have auto-incrementing, atomic version - $rs = $dbh->Execute(sprintf("INSERT INTO $page_tbl" + $dbh->Execute(sprintf("INSERT INTO $page_tbl" . " (id,pagename)" . " VALUES(NULL,%s)", $dbh->qstr($pagename))); @@ -210,7 +210,6 @@ $dbh->BeginTrans(); $dbh->CommitLock($version_tbl); $id = $this->_get_pageid($pagename, true); - $backend_type = $this->backendType(); // optimize: mysql can do this with one REPLACE INTO. $rs = $dbh->Execute(sprintf("REPLACE INTO $version_tbl" . " (id,version,mtime,minor_edit,content,versiondata)" Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -124,7 +124,6 @@ function write_accesslog(&$entry) { - global $request; $dbh = &$this->_dbh; $log_tbl = $entry->_accesslog->logtable; $dbh->query("INSERT INTO $log_tbl" Modified: trunk/lib/WikiDB/backend/ADODB_sqlite.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_sqlite.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/ADODB_sqlite.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -42,7 +42,7 @@ // atomic version // TODO: we have auto-increment since sqlite-2.3.4 // http://www.sqlite.org/faq.html#q1 - $rs = $dbh->Execute(sprintf("INSERT INTO $page_tbl" + $dbh->Execute(sprintf("INSERT INTO $page_tbl" . " (id,pagename)" . " VALUES((SELECT max(id) FROM $page_tbl)+1, %s)", $dbh->qstr($pagename))); Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/PDO.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -32,11 +32,6 @@ function __construct($dbparams) { - /** - * @var WikiRequest $request - */ - global $request; - $this->_dbparams = $dbparams; if (strstr($dbparams['dsn'], "://")) { // pear DB syntax $parsed = parseDSN($dbparams['dsn']); Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2015-02-27 17:54:34 UTC (rev 9574) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2015-02-27 18:16:08 UTC (rev 9575) @@ -75,7 +75,6 @@ function write_accesslog(&$entry) { - global $request; $dbh = &$this->_dbh; $log_tbl = $entry->_accesslog->logtable; // duration problem: sprintf "%f" might use comma e.g. "100,201" in european locales This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |