equal
deleted
inserted
replaced
36 while ( count($images) > 0 ) |
36 while ( count($images) > 0 ) |
37 { |
37 { |
38 $rand = array_rand($images); |
38 $rand = array_rand($images); |
39 $image = $images[$rand]; |
39 $image = $images[$rand]; |
40 $acl = $session->fetch_page_acl(strval($rand), 'Gallery'); |
40 $acl = $session->fetch_page_acl(strval($rand), 'Gallery'); |
41 if ( $acl->get_permissions('read') ) |
41 if ( is_object($acl) && $acl->get_permissions('read') ) |
42 { |
42 { |
43 $my_image = $image; |
43 $my_image = $image; |
44 break; |
44 break; |
45 } |
45 } |
46 unset($images[$rand]); |
46 unset($images[$rand]); |