Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #437 from bossloper/patch-8
Browse files Browse the repository at this point in the history
Update ditto.class.inc.php for new dittoID placeholder
  • Loading branch information
Dmi3yy committed Aug 17, 2015
2 parents dcbf2b6 + ce883ea commit b178a78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/snippets/ditto/classes/ditto.class.inc.php
Expand Up @@ -1109,6 +1109,7 @@ function paginate($start, $stop, $total, $summarize, $tplPaginateNext, $tplPagin
$min_x = $max_x - $max_paginate + 1;
}

$modx->setPlaceholder("dittoID", $dittoID);
for ($x = 0; $x <= $totalpages -1; $x++) {
$inc = $x * $summarize;
$display = $x +1;
Expand Down Expand Up @@ -1143,6 +1144,7 @@ function noResults($text,$paginate) {
global $modx, $dittoID;
$set = $modx->getPlaceholder($dittoID."ditto_pagination_set");
if ($paginate && $set !== true) {
$modx->setPlaceholder("dittoID", $dittoID);
$modx->setPlaceholder($dittoID."next", "");
$modx->setPlaceholder($dittoID."previous", "");
$modx->setPlaceholder($dittoID."splitter", "");
Expand Down

0 comments on commit b178a78

Please sign in to comment.