diff options
author | Vinzenz <vinzenz.rosenkranz@gmail.com> | 2016-03-04 23:22:07 +0300 |
---|---|---|
committer | Vinzenz <vinzenz.rosenkranz@gmail.com> | 2016-03-04 23:22:07 +0300 |
commit | 90fd6eb06d252eb8e672bb93a16e7364375f2888 (patch) | |
tree | cc9ccc20d6a0e1e37d4c5ccbb65d54daf9da840b /controller | |
parent | 8ec29ea0c56870fffd86506b0b9db24df49de29f (diff) |
only use display name in ui, not logic
Diffstat (limited to 'controller')
-rw-r--r-- | controller/pagecontroller.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index 90226374..aaf5dcf3 100644 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -198,10 +198,10 @@ class PageController extends Controller { if($accessValues->users !== null) $users = $accessValues->users; $accessType = ''; foreach ($groups as $gid) { - $accessType .= 'group_' . $gid . ';'; + $accessType .= $gid . ';'; } foreach ($users as $uid) { - $accessType .= 'user_' . $uid . ';'; + $accessType .= $uid . ';'; } } } @@ -268,10 +268,10 @@ class PageController extends Controller { if ($accessType === 'select') { $accessType = ''; foreach ($groups as $gid) { - $accessType .= 'group_' . $gid . ';'; + $accessType .= $gid . ';'; } foreach ($users as $uid) { - $accessType .= 'user_' . $uid . ';'; + $accessType .= $uid . ';'; } } $event->setAccess($accessType); @@ -392,7 +392,7 @@ class PageController extends Controller { if ($this->userId === null) return false; if ($access === 'registered') return true; if ($owner === $this->userId) return true; - $user_groups = OC_Group::getUserGroups($this->userId); + $user_groups = \OC_Group::getUserGroups($this->userId); $arr = explode(';', $access); foreach ($arr as $item) { if (strpos($item, 'group_') === 0) { @@ -403,7 +403,7 @@ class PageController extends Controller { } else if (strpos($item, 'user_') === 0) { $usr = substr($item, 5); - if ($usr === User::getUser()) return true; + if ($usr === \OCP\User::getUser()) return true; } } return false; |