From: <var...@us...> - 2015-02-09 14:12:10
|
Revision: 9516 http://sourceforge.net/p/phpwiki/code/9516 Author: vargenau Date: 2015-02-09 14:12:08 +0000 (Mon, 09 Feb 2015) Log Message: ----------- Do not use void function result Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB/backend/ADODB_mssql.php trunk/lib/WikiDB/backend/ADODB_mssqlnative.php trunk/lib/WikiDB/backend/ADODB_mysql.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/ADODB_postgres7.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB/backend/PearDB_mysql.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiDB/backend/PearDB_pgsql.php trunk/lib/WikiDB/backend/PearDB_sqlite.php trunk/lib/WikiDB/backend/cvs.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend.php trunk/lib/plugin/RecentChanges.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/PageList.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -187,7 +187,8 @@ if ($this->_iscustom) { $this->_field = substr($field, 7); } elseif ($this->_need_rev) - $this->_field = substr($field, 4); else + $this->_field = substr($field, 4); + else $this->_field = $field; } Modified: trunk/lib/WikiDB/backend/ADODB_mssql.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/ADODB_mssql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -32,7 +32,7 @@ { // Do nothing here -- Leave that for the DB // Cost Based Optimizer tuning vary from version to version - return 1; + return true; } /** Modified: trunk/lib/WikiDB/backend/ADODB_mssqlnative.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -32,7 +32,7 @@ { // Do nothing here -- Leave that for the DB // Cost Based Optimizer tuning vary from version to version - return 1; + return true; } // Search callabcks Modified: trunk/lib/WikiDB/backend/ADODB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mysql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/ADODB_mysql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -80,7 +80,7 @@ foreach ($this->_table_names as $table) { $dbh->Execute("OPTIMIZE TABLE $table"); } - return 1; + return true; } /** Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -35,7 +35,7 @@ { // Do nothing here -- Leave that for the DBA // Cost Based Optimizer tuning vary from version to version - return 1; + return true; } /** Modified: trunk/lib/WikiDB/backend/ADODB_postgres7.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_postgres7.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/ADODB_postgres7.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -37,7 +37,7 @@ */ function optimize() { - return 0; // if the wikiuser is not the table owner + return false; // if the wikiuser is not the table owner /* foreach ($this->_table_names as $table) { Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -81,7 +81,7 @@ foreach ($this->_table_names as $table) { $this->query("OPTIMIZE TABLE $table"); } - return 1; + return true; } function listOfTables() Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -33,7 +33,7 @@ { // Do nothing here -- Leave that for the DBA // Cost Based Optimizer tuning vary from version to version - return 1; + return true; } /** Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -171,7 +171,6 @@ $dbh->query(sprintf("UPDATE %s SET hits=hits+1 WHERE pagename='%s'", $this->_table_names['page_tbl'], $dbh->escapeSimple($pagename))); - return; } /** Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -197,7 +197,7 @@ function set_cached_html($pagename, $data) { - return parent::set_cached_html(PAGE_PREFIX . $pagename, $data); + parent::set_cached_html(PAGE_PREFIX . $pagename, $data); } function _get_pageid($pagename, $create_if_missing = false) @@ -567,7 +567,7 @@ function increaseHitCount($pagename) { - return parent::increaseHitCount(PAGE_PREFIX . $pagename); + parent::increaseHitCount(PAGE_PREFIX . $pagename); } function _serialize($data) @@ -581,7 +581,7 @@ */ function optimize() { - return 0; + return true; } /** Modified: trunk/lib/WikiDB/backend/PearDB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_mysql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB_mysql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -166,7 +166,7 @@ foreach ($this->_table_names as $table) { $dbh->query("OPTIMIZE TABLE $table"); } - return 1; + return true; } /** @@ -201,7 +201,6 @@ $this->_table_names['page_tbl'], $dbh->escapeSimple($pagename), ($this->_serverinfo['version'] >= 323.0) ? "LIMIT 1" : "")); - return; } } Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -38,7 +38,7 @@ { // Do nothing here -- Leave that for the DBA // Cost Based Optimizer tuning vary from version to version - return 1; + return true; } /** Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -51,7 +51,7 @@ */ function optimize() { - return 0; // if the wikiuser is not the table owner + return true; // if the wikiuser is not the table owner /* foreach ($this->_table_names as $table) { @@ -97,13 +97,13 @@ $dbh = &$this->_dbh; $page_tbl = $this->_table_names['page_tbl']; if (USE_BYTEA) - $sth = $dbh->query(sprintf("UPDATE $page_tbl" + $dbh->query(sprintf("UPDATE $page_tbl" . " SET cached_html='%s'" . " WHERE pagename='%s'", $this->_quote($data), $dbh->escapeSimple($pagename))); else - $sth = $dbh->query("UPDATE $page_tbl" + $dbh->query("UPDATE $page_tbl" . " SET cached_html=?" . " WHERE pagename=?", // PearDB does NOT use pg_escape_string()! Oh dear. Modified: trunk/lib/WikiDB/backend/PearDB_sqlite.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_sqlite.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/PearDB_sqlite.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -27,6 +27,7 @@ */ function optimize() { + return true; // NOP } Modified: trunk/lib/WikiDB/backend/cvs.php =================================================================== --- trunk/lib/WikiDB/backend/cvs.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/cvs.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -510,6 +510,7 @@ function optimize() { + return true; } /** Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/dbaBase.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -78,6 +78,7 @@ function optimize() { $this->_db->optimize(); + return true; } function sync() Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend/file.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -657,7 +657,7 @@ */ function optimize() { - return 0; //trigger_error("optimize: Not Implemented", E_USER_WARNING); + return true; //trigger_error("optimize: Not Implemented", E_USER_WARNING); } /** Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/WikiDB/backend.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -469,9 +469,12 @@ /** * Optimize the database. + * + * @return bool */ function optimize() { + return true; } /** Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2015-02-09 10:23:25 UTC (rev 9515) +++ trunk/lib/plugin/RecentChanges.php 2015-02-09 14:12:08 UTC (rev 9516) @@ -770,6 +770,7 @@ function headline() { + return array(); } function authorLink($rev) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |