Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
a446f3a5
Commit
a446f3a5
authored
Nov 16, 2013
by
egorpromo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminating
parent
b06caa29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Pagination.php
framework/yii/data/Pagination.php
+3
-3
No files found.
framework/yii/data/Pagination.php
View file @
a446f3a5
...
...
@@ -83,7 +83,7 @@ class Pagination extends Object
public
$route
;
/**
* @var array parameters (name => value) that should be used to obtain the current page number
* and to create new pagination URLs. If not set, $_GET will be used instead.
* and to create new pagination URLs. If not set,
all parameters from
$_GET will be used instead.
*
* The array element indexed by [[pageVar]] is considered to be the current page number.
* If the element does not exist, the current page number is considered 0.
...
...
@@ -131,7 +131,7 @@ class Pagination extends Object
public
function
getPage
(
$recalculate
=
false
)
{
if
(
$this
->
_page
===
null
||
$recalculate
)
{
$params
=
$this
->
params
===
null
?
$_GET
:
$this
->
params
;
$params
=
$this
->
params
===
null
?
Yii
::
$app
->
request
->
get
()
:
$this
->
params
;
if
(
isset
(
$params
[
$this
->
pageVar
])
&&
is_scalar
(
$params
[
$this
->
pageVar
]))
{
$this
->
_page
=
(
int
)
$params
[
$this
->
pageVar
]
-
1
;
if
(
$this
->
validatePage
)
{
...
...
@@ -169,7 +169,7 @@ class Pagination extends Object
*/
public
function
createUrl
(
$page
)
{
$params
=
$this
->
params
===
null
?
$_GET
:
$this
->
params
;
$params
=
$this
->
params
===
null
?
Yii
::
$app
->
request
->
get
()
:
$this
->
params
;
if
(
$page
>
0
||
$page
>=
0
&&
$this
->
forcePageVar
)
{
$params
[
$this
->
pageVar
]
=
$page
+
1
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment