Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
ad4f3c7d
Commit
ad4f3c7d
authored
12 years ago
by
colemanw
Browse files
Options
Downloads
Plain Diff
Merge pull request #258 from colemanw/groupEdit
Remove alpha sort from pager CRM-12212
parents
d904df2c
10824c72
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Utils/Pager.php
+17
-5
17 additions, 5 deletions
CRM/Utils/Pager.php
with
17 additions
and
5 deletions
CRM/Utils/Pager.php
+
17
−
5
View file @
ad4f3c7d
...
...
@@ -274,7 +274,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
*/
function
getPerPageLink
(
$perPage
)
{
if
(
$perPage
!=
$this
->
_perPage
)
{
$href
=
CRM_Utils_System
::
makeURL
(
self
::
PAGE_ROWCOUNT
)
.
$perPage
;
$href
=
$this
->
makeURL
(
self
::
PAGE_ROWCOUNT
,
$perPage
)
;
$link
=
sprintf
(
'<a href="%s" %s>%s</a>'
,
$href
,
$this
->
_classString
,
...
...
@@ -293,7 +293,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
return
''
;
}
$href
=
CRM_Utils_System
::
makeURL
(
self
::
PAGE_ID
)
.
1
;
$href
=
$this
->
makeURL
(
self
::
PAGE_ID
,
1
)
;
return
sprintf
(
'<a href="%s" title="%s">%s</a>'
,
$href
,
str_replace
(
'%d'
,
1
,
$this
->
_altFirst
),
...
...
@@ -306,7 +306,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
return
''
;
}
$href
=
CRM_Utils_System
::
makeURL
(
self
::
PAGE_ID
)
.
$this
->
_totalPages
;
$href
=
$this
->
makeURL
(
self
::
PAGE_ID
,
$this
->
_totalPages
)
;
return
sprintf
(
'<a href="%s" title="%s">%s</a>'
,
$href
,
str_replace
(
'%d'
,
$this
->
_totalPages
,
$this
->
_altLast
),
...
...
@@ -316,7 +316,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
function
getBackPageLink
()
{
if
(
$this
->
_currentPage
>
1
)
{
$href
=
CRM_Utils_System
::
makeURL
(
self
::
PAGE_ID
)
.
$this
->
getPreviousPageID
();
$href
=
$this
->
makeURL
(
self
::
PAGE_ID
,
$this
->
getPreviousPageID
()
)
;
return
sprintf
(
'<a href="%s" title="%s">%s</a>'
,
$href
,
$this
->
_altPrev
,
$this
->
_prevImg
...
...
@@ -327,7 +327,7 @@ class CRM_Utils_Pager extends Pager_Sliding {
function
getNextPageLink
()
{
if
(
$this
->
_currentPage
<
$this
->
_totalPages
)
{
$href
=
CRM_Utils_System
::
makeURL
(
self
::
PAGE_ID
)
.
$this
->
getNextPageID
();
$href
=
$this
->
makeURL
(
self
::
PAGE_ID
,
$this
->
getNextPageID
()
)
;
return
$this
->
_spacesAfter
.
sprintf
(
'<a href="%s" title="%s">%s</a>'
,
$href
,
$this
->
_altNext
,
$this
->
_nextImg
...
...
@@ -335,5 +335,17 @@ class CRM_Utils_Pager extends Pager_Sliding {
}
return
''
;
}
/**
* Build a url for pager links
*/
function
makeURL
(
$key
,
$value
)
{
$href
=
CRM_Utils_System
::
makeURL
(
$key
);
// CRM-12212 Remove alpha sort param
if
(
strpos
(
$href
,
'&sortByCharacter='
))
{
$href
=
preg_replace
(
'#(.*)\&sortByCharacter=[^&]*(.*)#'
,
'\1\2'
,
$href
);
}
return
$href
.
$value
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment