Spread work of computing getSnippets to all servers not just name server take 2, a=chris
Spread work of computing getSnippets to all servers not just name server take 2, a=chris
diff --git a/src/models/Model.php b/src/models/Model.php
index f873655ce..0eefba619 100755
--- a/src/models/Model.php
+++ b/src/models/Model.php
@@ -213,7 +213,7 @@ class Model implements CrawlConstants
}
}
$page = $this->formatSinglePageResult($page, $words,
- $description_length);
+ self::DEFAULT_DESCRIPTION_LENGTH);
$pages[$i] = $page;
}
}
diff --git a/src/models/PhraseModel.php b/src/models/PhraseModel.php
index f9f5158b6..0bef15fff 100755
--- a/src/models/PhraseModel.php
+++ b/src/models/PhraseModel.php
@@ -474,8 +474,7 @@ class PhraseModel extends ParallelModel
}
if ($raw == 0 && isset($results['TOTAL_ROWS']) &&
$results['TOTAL_ROWS'] > 0) {
- $results = $this->addEditedPageResults($results, $format_words,
- $description_length);
+ $results = $this->addEditedPageResults($results, $format_words);
if (!empty($answer_score_map)) {
arsort($answer_score_map);
reset($answer_score_map);
diff --git a/src/views/elements/GroupfeedElement.php b/src/views/elements/GroupfeedElement.php
index c6a654183..c2ac7be4e 100644
--- a/src/views/elements/GroupfeedElement.php
+++ b/src/views/elements/GroupfeedElement.php
@@ -256,6 +256,8 @@ class GroupfeedElement extends Element implements CrawlConstants
}?>
</div><?php
}
+ $data['TOTAL_ROWS'] = empty($data['TOTAL_ROWS']) : 0 ?
+ $data['TOTAL_ROWS'];
$this->view->helper("pagination")->render($paging_query,
$data['LIMIT'], $data['RESULTS_PER_PAGE'], $data['TOTAL_ROWS'],
false, $logged_in);
@@ -663,7 +665,9 @@ class GroupfeedElement extends Element implements CrawlConstants
*/
public function renderScripts($data)
{
- if ($data['LIMIT'] + $data['RESULTS_PER_PAGE'] == $data['TOTAL_ROWS']){
+ $data['TOTAL_ROWS'] = empty($data['TOTAL_ROWS']) : 0 ?
+ $data['TOTAL_ROWS'];
+ if ($data['LIMIT'] + $data['RESULTS_PER_PAGE'] == $data['TOTAL_ROWS']) {
$data['LIMIT'] += $data['RESULTS_PER_PAGE'] - 1;
}
$paging_query = $data['PAGING_QUERY'];