plugins/gallery/sidebar.php
changeset 14 e47e4be549ad
parent 13 f6ca7cead82c
child 42 7c6e2e97aa08
equal deleted inserted replaced
12:3893b99cd443 14:e47e4be549ad
    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]);