Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
128c9067
Commit
128c9067
authored
Feb 11, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix languages urls
parent
fa5cab1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
common/components/LangRequest.php
common/components/LangRequest.php
+1
-2
common/modules/languages/widgets/views/languages.php
common/modules/languages/widgets/views/languages.php
+2
-2
No files found.
common/components/LangRequest.php
View file @
128c9067
...
...
@@ -22,8 +22,7 @@ class LangRequest extends Request
Languages
::
setCurrent
(
$lang_url
);
if
(
$lang_url
!==
null
&&
$lang_url
===
Languages
::
getCurrent
()
->
url
&&
strpos
(
$this
->
_lang_url
,
Languages
::
getCurrent
()
->
url
)
===
1
&&
!
Languages
::
getCurrent
()
->
default
)
strpos
(
$this
->
_lang_url
,
Languages
::
getCurrent
()
->
url
)
===
1
)
{
$this
->
_lang_url
=
substr
(
$this
->
_lang_url
,
strlen
(
Languages
::
getCurrent
()
->
url
)
+
1
);
}
...
...
common/modules/languages/widgets/views/languages.php
View file @
128c9067
...
...
@@ -6,14 +6,14 @@ use yii\helpers\Html;
<div
class=
"lang_check"
>
<?=
Html
::
a
(
'<i class="icon-arrowDown"></i>'
.
$current
->
name
,
'#'
,
[
'class'
=>
'd_menu'
])
?>
<?php
foreach
(
$langs
as
$i
=>
$lang
)
:
?>
<?=
Html
::
a
(
'<i class="icon-arrowRight"></i>'
.
$lang
->
name
,
(
!
$lang
->
default
?
'/'
.
$lang
->
url
:
''
)
.
Yii
::
$app
->
getRequest
()
->
getLangUrl
(
),
[
'class'
=>
'd_menu_hide'
])
?>
<?=
Html
::
a
(
'<i class="icon-arrowRight"></i>'
.
$lang
->
name
,
(
!
$lang
->
default
?
'/'
.
$lang
->
url
:
''
)
.
(
Yii
::
$app
->
getRequest
()
->
getLangUrl
()
==
''
?
'/'
:
Yii
::
$app
->
getRequest
()
->
getLangUrl
()
),
[
'class'
=>
'd_menu_hide'
])
?>
<?php
endforeach
;
?>
</div>
<?php
else
:
?>
<nav
class=
"top_nav clearfix"
>
<ul>
<?php
foreach
(
$langs
as
$lang
)
:
?>
<li>
<?=
Html
::
a
(
$lang
->
name
,
(
!
$lang
->
default
?
'/'
.
$lang
->
url
:
''
)
.
Yii
::
$app
->
getRequest
()
->
getLangUrl
(
))
?>
</li>
<li>
<?=
Html
::
a
(
$lang
->
name
,
(
!
$lang
->
default
?
'/'
.
$lang
->
url
:
''
)
.
(
Yii
::
$app
->
getRequest
()
->
getLangUrl
()
==
''
?
'/'
:
Yii
::
$app
->
getRequest
()
->
getLangUrl
()
))
?>
</li>
<?php
endforeach
;
?>
</ul>
</nav>
...
...
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