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
c676e92d
Commit
c676e92d
authored
May 16, 2013
by
Klimov Paul
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2 into asset-command
parents
2c930ae2
71c60b63
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
YiiBaseTest.php
tests/unit/framework/YiiBaseTest.php
+3
-0
YiiBase.php
yii/YiiBase.php
+4
-0
Toolbar.php
yii/debug/Toolbar.php
+3
-2
LinkPager.php
yii/widgets/LinkPager.php
+1
-1
ListPager.php
yii/widgets/ListPager.php
+1
-1
No files found.
tests/unit/framework/YiiBaseTest.php
View file @
c676e92d
...
@@ -45,6 +45,9 @@ class YiiBaseTest extends TestCase
...
@@ -45,6 +45,9 @@ class YiiBaseTest extends TestCase
Yii
::
setAlias
(
'@yii'
,
null
);
Yii
::
setAlias
(
'@yii'
,
null
);
$this
->
assertFalse
(
Yii
::
getAlias
(
'@yii'
,
false
));
$this
->
assertFalse
(
Yii
::
getAlias
(
'@yii'
,
false
));
$this
->
assertEquals
(
'/yii/gii/file'
,
Yii
::
getAlias
(
'@yii/gii/file'
));
$this
->
assertEquals
(
'/yii/gii/file'
,
Yii
::
getAlias
(
'@yii/gii/file'
));
Yii
::
setAlias
(
'@some/alias'
,
'/www'
);
$this
->
assertEquals
(
'/www'
,
Yii
::
getAlias
(
'@some/alias'
));
}
}
public
function
testGetVersion
()
public
function
testGetVersion
()
...
...
yii/YiiBase.php
View file @
c676e92d
...
@@ -287,7 +287,11 @@ class YiiBase
...
@@ -287,7 +287,11 @@ class YiiBase
if
(
$path
!==
null
)
{
if
(
$path
!==
null
)
{
$path
=
strncmp
(
$path
,
'@'
,
1
)
?
rtrim
(
$path
,
'\\/'
)
:
static
::
getAlias
(
$path
);
$path
=
strncmp
(
$path
,
'@'
,
1
)
?
rtrim
(
$path
,
'\\/'
)
:
static
::
getAlias
(
$path
);
if
(
!
isset
(
self
::
$aliases
[
$root
]))
{
if
(
!
isset
(
self
::
$aliases
[
$root
]))
{
if
(
$pos
===
false
)
{
self
::
$aliases
[
$root
]
=
$path
;
self
::
$aliases
[
$root
]
=
$path
;
}
else
{
self
::
$aliases
[
$root
]
=
array
(
$alias
=>
$path
);
}
}
elseif
(
is_string
(
self
::
$aliases
[
$root
]))
{
}
elseif
(
is_string
(
self
::
$aliases
[
$root
]))
{
if
(
$pos
===
false
)
{
if
(
$pos
===
false
)
{
self
::
$aliases
[
$root
]
=
$path
;
self
::
$aliases
[
$root
]
=
$path
;
...
...
yii/debug/Toolbar.php
View file @
c676e92d
...
@@ -26,8 +26,9 @@ class Toolbar extends Widget
...
@@ -26,8 +26,9 @@ class Toolbar extends Widget
$url
=
Yii
::
$app
->
getUrlManager
()
->
createUrl
(
$this
->
debugAction
,
array
(
$url
=
Yii
::
$app
->
getUrlManager
()
->
createUrl
(
$this
->
debugAction
,
array
(
'tag'
=>
Yii
::
getLogger
()
->
tag
,
'tag'
=>
Yii
::
getLogger
()
->
tag
,
));
));
$this
->
view
->
registerJs
(
"yii.debug.load('
$id
', '
$url
');"
);
$view
=
$this
->
getView
();
$this
->
view
->
registerAssetBundle
(
'yii/debug'
);
$view
->
registerJs
(
"yii.debug.load('
$id
', '
$url
');"
);
$view
->
registerAssetBundle
(
'yii/debug'
);
echo
Html
::
tag
(
'div'
,
''
,
array
(
echo
Html
::
tag
(
'div'
,
''
,
array
(
'id'
=>
$id
,
'id'
=>
$id
,
'style'
=>
'display: none'
,
'style'
=>
'display: none'
,
...
...
yii/widgets/LinkPager.php
View file @
c676e92d
...
@@ -122,7 +122,7 @@ class LinkPager extends Widget
...
@@ -122,7 +122,7 @@ class LinkPager extends Widget
{
{
$buttons
=
array
();
$buttons
=
array
();
$pageCount
=
$this
->
pagination
->
pageCount
;
$pageCount
=
$this
->
pagination
->
getPageCount
()
;
$currentPage
=
$this
->
pagination
->
getPage
();
$currentPage
=
$this
->
pagination
->
getPage
();
// first page
// first page
...
...
yii/widgets/ListPager.php
View file @
c676e92d
...
@@ -63,7 +63,7 @@ class ListPager extends Widget
...
@@ -63,7 +63,7 @@ class ListPager extends Widget
*/
*/
public
function
run
()
public
function
run
()
{
{
$pageCount
=
$this
->
pagination
->
pageCount
;
$pageCount
=
$this
->
pagination
->
getPageCount
()
;
$currentPage
=
$this
->
pagination
->
getPage
();
$currentPage
=
$this
->
pagination
->
getPage
();
$pages
=
array
();
$pages
=
array
();
...
...
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