Skip to content

Commit

Permalink
Fixed pagination urls for setups with non-standard cpTrigger
Browse files Browse the repository at this point in the history
Closes #43
  • Loading branch information
sjelfull committed Jun 8, 2018
1 parent fc5688d commit cc71340
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## Unreleased

## 1.0.1 - 2018-06-08

### Fixed
- Fixed first save of settings on install
- Fixed pagination urls for setups with non-standard cpTrigger

## 1.0.0 - 2018-04-04

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "superbig/craft-audit",
"description": "Log adding/updating/deleting of elements",
"type": "craft-plugin",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 2 additions & 1 deletion src/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace superbig\audit\controllers;

use craft\helpers\Template;
use craft\helpers\UrlHelper;
use craft\web\UrlManager;
use superbig\audit\Audit;

Expand Down Expand Up @@ -51,7 +52,7 @@ public function actionIndex()
{
$itemsPerPage = 20;
$currentPage = Craft::$app->getRequest()->getParam('page', 1);
$urlPattern = '/admin/audit?page=(:num)';
$urlPattern = UrlHelper::cpUrl('audit?page=(:num)');
$query = AuditRecord::find()
->orderBy('dateCreated desc')
->with('user')
Expand Down

0 comments on commit cc71340

Please sign in to comment.