Skip to content

Commit cac6d5a

Browse files
author
Igor Chepurnoy
committed
change .htaccess, update edit user in admin panel
1 parent 8343945 commit cac6d5a

File tree

4 files changed

+33
-13
lines changed

4 files changed

+33
-13
lines changed

modules/admin/views/layouts/column2.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
use app\assets\AdminAsset;
34
use kartik\alert\AlertBlock;
45
use kartik\sidenav\SideNav;
@@ -9,6 +10,7 @@
910

1011
/* @var $this \yii\web\View */
1112
/* @var $content string */
13+
1214
AdminAsset::register($this);
1315
?>
1416
<?php $this->beginPage() ?>
@@ -31,8 +33,7 @@
3133
]);
3234
?>
3335
<div class="wrap">
34-
<?php
35-
NavBar::begin([
36+
<?php NavBar::begin([
3637
'brandLabel' => 'Admin Panel',
3738
'brandUrl' => '/admin',
3839
'options' => [
@@ -57,7 +58,6 @@
5758
]
5859
]
5960
],
60-
6161
[
6262
'label' => '<i class="glyphicon glyphicon-cog"></i> Settings',
6363
'items' => [
@@ -116,8 +116,6 @@
116116
</div>
117117
</div>
118118
</div>
119-
</div>
120-
</div>
121119
<?php $this->endBody() ?>
122120
</body>
123121
</html>

modules/admin/views/user/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
/* @var $this yii\web\View */
1111
/* @var $dataProvider yii\data\ActiveDataProvider */
12+
/* @var $searchModel \app\models\UserModelSearch */
1213

1314
$this->title = 'Users';
1415
$this->params['breadcrumbs'][] = $this->title;

modules/admin/views/user/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* @var $this yii\web\View */
66
/* @var $model app\models\UserModel */
77

8-
$this->title = 'Update User: ' . ' ' . $model->id;
8+
$this->title = 'Update User: ' . ' ' . $model->username;
99
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
1010
$this->params['breadcrumbs'][] = 'Update';
1111
?>

web/.htaccess

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
AddDefaultCharset utf-8
2-
Options +FollowSymLinks
3-
IndexIgnore */*
1+
# Block access to "hidden" directories whose names begin with a period. This
2+
# includes directories used by version control systems such as Subversion or Git.
3+
<IfModule mod_rewrite.c>
4+
RewriteCond %{SCRIPT_FILENAME} -d
5+
RewriteCond %{SCRIPT_FILENAME} -f
6+
RewriteRule "(^|/)\." - [F]
7+
</IfModule>
48

9+
10+
# Block access to backup and source files
11+
# This files may be left by some text/html editors and
12+
# pose a great security danger, when someone can access them
13+
<FilesMatch "(\.(bak|bat|config|sql|fla|md|psd|ini|log|sh|inc|swp|dist)|~|init|composer\.json|composer\.lock)$">
14+
Order allow,deny
15+
Deny from all
16+
Satisfy All
17+
</FilesMatch>
18+
19+
# Increase cookie security
20+
<IfModule php5_module>
21+
php_value session.cookie_httponly true
22+
</IfModule>
23+
24+
# Settings to hide index.php and ensure pretty urls
525
RewriteEngine on
6-
RewriteRule ^favicon.ico$ - [F,L]
7-
# If a directory or a file exists, use it directly
26+
27+
# if a directory or a file exists, use it directly
828
RewriteCond %{REQUEST_FILENAME} !-f
929
RewriteCond %{REQUEST_FILENAME} !-d
10-
# Otherwise forward it to index.php
11-
RewriteRule ^([^/].*)$ /index.php/$1 [L]
30+
31+
# otherwise forward it to index.php
32+
RewriteRule ^([^/].*)$ /index.php/$1 [L]

0 commit comments

Comments
 (0)