Skip to content

Commit

Permalink
Fix the pagination menu in the versions overview (see #752)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Sep 24, 2019
1 parent 0fc7bfe commit 7b09ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/contao/classes/Versions.php
Expand Up @@ -666,7 +666,7 @@ public static function addToTemplate(BackendTemplate $objTemplate)
$objDatabase = \Database::getInstance();

// Get the total number of versions
$objTotal = $objDatabase->prepare("SELECT COUNT(*) AS count FROM tl_version WHERE version>1" . (!$objUser->isAdmin ? " AND userid=?" : ""))
$objTotal = $objDatabase->prepare("SELECT COUNT(*) AS count FROM tl_version" . (!$objUser->isAdmin ? " WHERE userid=?" : ""))
->execute($objUser->id);

$intLast = ceil($objTotal->count / 30);
Expand Down

0 comments on commit 7b09ee1

Please sign in to comment.