$channel_id), App::get_observer(), $album); $filtered = []; if ($ret['success'] && $ret['photos']) { foreach ($ret['photos'] as $p) { if ($p['imgscale'] == $scale) { $filtered[] = $p['src']; } } } if ($filtered) { $e = mt_rand(0, count($filtered) - 1); $url = $filtered[$e]; } if (strpos($url, 'http') !== 0) { return ''; } if (array_key_exists('style', $arr) && isset($arr['style'])) { $style = $arr['style']; } // ensure they can't sneak in an eval(js) function if (strpos($style, '(') !== false) { return ''; } $url = zid($url); $o = '
'; $o .= '' . t('photo/image') . ''; $o .= '
'; return $o; } }