File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -609,21 +609,11 @@ function __construct($return = FALSE)
609609
610610 public function has_role ($ roles , $ strict = FALSE )
611611 {
612- if (ee ()->session ->userdata ('member_id ' ) == 0 ) {
613- return FALSE ;
614- }
615-
616612 if (ee ('Permission ' )->isSuperAdmin () && $ strict == FALSE ) {
617613 return TRUE ;
618614 }
619-
620- $ user_role_ids = $ this ->get_role_ids ();
621-
622- if (empty ($ user_role_ids )) {
623- return FALSE ;
624- }
625-
626- if (! empty (array_intersect ($ user_role_ids , $ roles ))) {
615+
616+ if (ee ('Permission ' )->hasAnyRole ($ roles )) {
627617 return TRUE ;
628618 }
629619
@@ -4849,7 +4839,7 @@ function upload_form()
48494839 $ config = array (
48504840 'file_name ' => $ new_name ,
48514841 'upload_path ' => $ server_path ,
4852- 'max_size ' => round ($ upload_prefs ['max_size ' ]/1024 , 3 ),
4842+ 'max_size ' => round (( int ) $ upload_prefs ['max_size ' ]/1024 , 3 ),
48534843 'max_width ' => $ upload_prefs ['max_width ' ],
48544844 'max_height ' => $ upload_prefs ['max_height ' ],
48554845 );
You can’t perform that action at this time.
0 commit comments