From: <var...@us...> - 2015-09-07 16:28:16
|
Revision: 9720 http://sourceforge.net/p/phpwiki/code/9720 Author: vargenau Date: 2015-09-07 16:28:13 +0000 (Mon, 07 Sep 2015) Log Message: ----------- Fix fatal database error with multiple comma-delimited sortby args Modified Paths: -------------- trunk/lib/WikiDB/backend.php trunk/pgsrc/ReleaseNotes Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2015-09-07 09:29:25 UTC (rev 9719) +++ trunk/lib/WikiDB/backend.php 2015-09-07 16:28:13 UTC (rev 9720) @@ -589,16 +589,23 @@ */ global $request; - if (empty($column)) + if (empty($column)) { return ''; - //support multiple comma-delimited sortby args: "+hits,+pagename" + } + // Support multiple comma-delimited sortby args: "+hits,+pagename" if (strstr($column, ',')) { $result = array(); foreach (explode(',', $column) as $col) { - if (empty($this)) - $result[] = WikiDB_backend::sortby($col, $action); - else - $result[] = $this->sortby($col, $action); + if ($col) { + if (empty($this)) { + $res = WikiDB_backend::sortby($col, $action); + } else { + $res = $this->sortby($col, $action); + } + if ($res) { + $result[] = $res; + } + } } return join(",", $result); } Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2015-09-07 09:29:25 UTC (rev 9719) +++ trunk/pgsrc/ReleaseNotes 2015-09-07 16:28:13 UTC (rev 9720) @@ -1,4 +1,4 @@ -Date: Mon, 7 Sep 2015 11:28:19 +0000 +Date: Mon, 7 Sep 2015 18:26:37 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.4) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -13,6 +13,7 @@ * Fix tooltip translation in ~CreateToc plugin * Remove access keys * Check MAX_PAGENAME_LENGTH in CreatePage +* Fix fatal database error with multiple comma-delimited sortby args == 1.5.4 2015-06-29 Marc-Etienne Vargenau == This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |