Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vmusicchart-cms
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
vmusicchart-cms
Commits
7d6c8a47
Commit
7d6c8a47
authored
4 years ago
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug đổi lại tên file model
parent
23b51a36
master
…
dev
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
CmsSetting.php
application/controllers/backend/CmsSetting.php
+13
-11
No files found.
application/controllers/backend/CmsSetting.php
View file @
7d6c8a47
...
@@ -521,7 +521,8 @@ class CmsSetting extends CI_Controller
...
@@ -521,7 +521,8 @@ class CmsSetting extends CI_Controller
}
}
//==================================================================================================================
//==================================================================================================================
public
function
addGroup
(){
public
function
addGroup
()
{
$this
->
_data
[
'controllerList'
]
=
$this
->
accesscontroller_model
->
getList
(
true
);
$this
->
_data
[
'controllerList'
]
=
$this
->
accesscontroller_model
->
getList
(
true
);
// Thiết lập validate
// Thiết lập validate
...
@@ -581,9 +582,9 @@ class CmsSetting extends CI_Controller
...
@@ -581,9 +582,9 @@ class CmsSetting extends CI_Controller
'access_controller_id'
=>
$val
'access_controller_id'
=>
$val
);
);
}
}
$this
->
mgroupaccesscontroller
->
addBatch
(
$dataGroupController
);
$this
->
groupaccesscontroller_model
->
addBatch
(
$dataGroupController
);
// Ghi log
// Ghi log
$this
->
actionlog_model
->
add
(
'ADDED'
,
'Gán quyền truy cập cho nhóm'
,
'
mgroupaccesscontroller
'
,
'group_access_controller'
,
$id_insert
);
$this
->
actionlog_model
->
add
(
'ADDED'
,
'Gán quyền truy cập cho nhóm'
,
'
groupaccesscontroller_model
'
,
'group_access_controller'
,
$id_insert
);
//
//
}
}
...
@@ -594,8 +595,9 @@ class CmsSetting extends CI_Controller
...
@@ -594,8 +595,9 @@ class CmsSetting extends CI_Controller
}
}
//==================================================================================================================
//==================================================================================================================
public
function
editGroup
(
$id
){
public
function
editGroup
(
$id
)
$this
->
_data
[
'group_access_controller'
]
=
$this
->
mgroupaccesscontroller
->
getByGroupId
(
$id
);
{
$this
->
_data
[
'group_access_controller'
]
=
$this
->
groupaccesscontroller_model
->
getByGroupId
(
$id
);
$this
->
_data
[
'groupById'
]
=
$this
->
group_model
->
getById
(
$id
);
$this
->
_data
[
'groupById'
]
=
$this
->
group_model
->
getById
(
$id
);
$this
->
_data
[
'controllerList'
]
=
$this
->
accesscontroller_model
->
getList
(
true
);
$this
->
_data
[
'controllerList'
]
=
$this
->
accesscontroller_model
->
getList
(
true
);
...
@@ -661,7 +663,7 @@ class CmsSetting extends CI_Controller
...
@@ -661,7 +663,7 @@ class CmsSetting extends CI_Controller
$this
->
group_model
->
update
(
$id
,
$dataUpdate
);
$this
->
group_model
->
update
(
$id
,
$dataUpdate
);
// Ghi log
// Ghi log
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật nhóm người dùng'
,
'
MGroup
'
,
'group'
,
$id
);
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật nhóm người dùng'
,
'
Group_model
'
,
'group'
,
$id
);
//
//
// Insert quyền truy cập vào DB
// Insert quyền truy cập vào DB
...
@@ -678,25 +680,25 @@ class CmsSetting extends CI_Controller
...
@@ -678,25 +680,25 @@ class CmsSetting extends CI_Controller
'access_controller_id'
=>
$val
'access_controller_id'
=>
$val
);
);
}
}
$this
->
mgroupaccesscontroller
->
addBatch
(
$dataGroupController
);
$this
->
groupaccesscontroller_model
->
addBatch
(
$dataGroupController
);
}
}
// Xóa bớt quyền truy cập controller
// Xóa bớt quyền truy cập controller
$dataDelete
=
array_diff
(
$group_access_controller
,
$group_access_controller_submit
);
$dataDelete
=
array_diff
(
$group_access_controller
,
$group_access_controller_submit
);
if
(
count
(
$dataDelete
)
>
0
){
if
(
count
(
$dataDelete
)
>
0
){
foreach
(
$dataDelete
as
$val
){
foreach
(
$dataDelete
as
$val
){
$this
->
mgroupaccesscontroller
->
delete
(
$id
,
$val
);
$this
->
groupaccesscontroller_model
->
delete
(
$id
,
$val
);
}
}
}
}
// Ghi log
// Ghi log
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật gán quyền truy cập cho nhóm'
,
'
mgroupaccesscontroller
'
,
'group_access_controller'
,
$id
);
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật gán quyền truy cập cho nhóm'
,
'
Groupaccesscontroller_model
'
,
'group_access_controller'
,
$id
);
//
//
}
else
{
}
else
{
if
(
count
(
$group_access_controller
)
>
0
&&
!
is_array
(
$group_access_controller_submit
)){
if
(
count
(
$group_access_controller
)
>
0
&&
!
is_array
(
$group_access_controller_submit
)){
foreach
(
$group_access_controller
as
$val
){
foreach
(
$group_access_controller
as
$val
){
$this
->
mgroupaccesscontroller
->
delete
(
$id
,
$val
);
$this
->
groupaccesscontroller_model
->
delete
(
$id
,
$val
);
}
}
// Ghi log
// Ghi log
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật gán quyền truy cập cho nhóm'
,
'
mgroupaccesscontroller
'
,
'group_access_controller'
,
$id
);
$this
->
actionlog_model
->
add
(
'UPDATED'
,
'Cập nhật gán quyền truy cập cho nhóm'
,
'
Groupaccesscontroller_model
'
,
'group_access_controller'
,
$id
);
//
//
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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