plugins/gallery/sidebar.php
changeset 13 f6ca7cead82c
parent 5 c0c324f0eeb5
child 42 7c6e2e97aa08
equal deleted inserted replaced
10:b38afb86dcad 13:f6ca7cead82c
    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]);