Changed how determening if is administrator; pervious was was only for MU. refs #552
Showing
1 changed file
with
5 additions
and
1 deletions
| ... | @@ -48,7 +48,7 @@ class PagePermissions { | ... | @@ -48,7 +48,7 @@ class PagePermissions { |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | // Anyone has access, God has no limitations | 50 | // Anyone has access, God has no limitations |
| 51 | if ($data[self::ELE_SEL] == self::OPT_ALL || is_site_admin()) { | 51 | if ($data[self::ELE_SEL] == self::OPT_ALL || self::is_admin()) { |
| 52 | return true; | 52 | return true; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| ... | @@ -99,6 +99,10 @@ class PagePermissions { | ... | @@ -99,6 +99,10 @@ class PagePermissions { |
| 99 | return $user_role; | 99 | return $user_role; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | public static function is_admin($user = false) { | ||
| 103 | return (self::get_user_role($user) == 'administrator' ? true : false); | ||
| 104 | } | ||
| 105 | |||
| 102 | public static function getFieldNames() { | 106 | public static function getFieldNames() { |
| 103 | static $fields = false; | 107 | static $fields = false; |
| 104 | if (false !== $fields) { | 108 | if (false !== $fields) { | ... | ... |
-
Please register or sign in to post a comment