From: <var...@us...> - 2021-07-30 14:09:07
|
Revision: 10406 http://sourceforge.net/p/phpwiki/code/10406 Author: vargenau Date: 2021-07-30 14:09:05 +0000 (Fri, 30 Jul 2021) Log Message: ----------- lib/PageList.php: make <<AllPages info=content>> work Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2021-07-30 13:12:14 UTC (rev 10405) +++ trunk/lib/PageList.php 2021-07-30 14:09:05 UTC (rev 10406) @@ -407,11 +407,12 @@ ) { $revision_handle = $page_handle->getCurrentRevision(true); } + if (!empty($revision_handle->_data['%pagedata'])) { + $revision_handle->_data['%pagedata']['_cached_html'] = ''; + } + $c =&$revision_handle->getPackedContent(); if ($this->_field == 'hi_content') { - if (!empty($revision_handle->_data['%pagedata'])) { - $revision_handle->_data['%pagedata']['_cached_html'] = ''; - } $search = $this->search; $score = ''; if (is_object($page_handle) and !empty($page_handle->score)) @@ -435,7 +436,6 @@ // Remove special characters so that highlighting works $search = preg_replace('/^[\^\*]/', '', $search); $search = preg_replace('/[\^\*]$/', '', $search); - $c =& $revision_handle->getPackedContent(); if ($search and ($i = strpos(strtolower($c), strtolower($search))) !== false) { $l = strlen($search); $j = max(0, $i - ($this->bytes / 2)); @@ -453,8 +453,11 @@ return HTML::div(array('class' => 'align-center'), $c . " " . ($score ? sprintf("[%0.1f]", $score) : "")); } - } elseif (($len = strlen($c)) > $this->bytes) { - $c = substr($c, 0, $this->bytes); + } else { + $len = strlen($c); + if ($len > $this->bytes) { + $c = substr($c, 0, $this->bytes); + } } include_once 'lib/BlockParser.php'; // false --> don't bother processing hrefs for embedded WikiLinks This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |