Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
c76d0fb6
Commit
c76d0fb6
authored
Jul 26, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use language in paginator class.
parent
7e439ab5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
system/lang.php
+6
-4
system/paginator.php
+2
-2
No files found.
system/lang.php
View file @
c76d0fb6
...
...
@@ -9,21 +9,21 @@ class Lang {
*
* @var array
*/
p
rivate
static
$lines
=
array
();
p
ublic
static
$lines
=
array
();
/**
* The key of the line that is being requested.
*
* @var string
*/
p
rivate
$key
;
p
ublic
$key
;
/**
* The place-holder replacements.
*
* @var array
*/
p
rivate
$replacements
=
array
();
p
ublic
$replacements
=
array
();
/**
* Create a new Lang instance.
...
...
@@ -117,7 +117,9 @@ class Lang {
*/
private
function
load
(
$file
,
$language
)
{
if
(
!
array_key_exists
(
$language
.
$file
,
static
::
$lines
)
and
file_exists
(
$path
=
APP_PATH
.
'lang/'
.
$language
.
'/'
.
$file
.
EXT
))
if
(
array_key_exists
(
$language
.
$file
,
static
::
$lines
))
return
;
if
(
file_exists
(
$path
=
APP_PATH
.
'lang/'
.
$language
.
'/'
.
$file
.
EXT
))
{
static
::
$lines
[
$language
.
$file
]
=
require
$path
;
}
...
...
system/paginator.php
View file @
c76d0fb6
...
...
@@ -150,7 +150,7 @@ class Paginator {
*/
public
function
previous
()
{
$text
=
Lang
::
line
(
'pagination.previous'
)
->
get
();
$text
=
Lang
::
line
(
'pagination.previous'
)
->
get
(
$this
->
language
);
return
(
$this
->
page
>
1
)
?
$this
->
link
(
$this
->
page
-
1
,
$text
,
'prev_page'
)
.
' '
:
HTML
::
span
(
$text
,
array
(
'class'
=>
'disabled prev_page'
))
.
' '
;
}
...
...
@@ -162,7 +162,7 @@ class Paginator {
*/
public
function
next
()
{
$text
=
Lang
::
line
(
'pagination.next'
)
->
get
();
$text
=
Lang
::
line
(
'pagination.next'
)
->
get
(
$this
->
language
);
return
(
$this
->
page
<
$this
->
last_page
)
?
$this
->
link
(
$this
->
page
+
1
,
$text
,
'next_page'
)
:
HTML
::
span
(
$text
,
array
(
'class'
=>
'disabled next_page'
));
}
...
...
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