Commit 19ed1df0 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-5024 (Issues with Vimeo embeds)

parent 86351f4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ class Hook_media_rendering_vimeo extends Media_renderer_with_fallback
        if (is_object($url)) {
            $url = $url->evaluate();
        }
        $attributes['remote_id'] = preg_replace('#^https?://vimeo\.com/(.*/)?(\d+)#', '${1}', $url);
        $attributes['remote_id'] = preg_replace('#^https?://vimeo\.com/(.*/)?(\d+)#', '${2}', $url);
        return do_template('MEDIA_VIMEO', array('_GUID' => '490903ba659a899d70d3a2f5afa7d6cb', 'HOOK' => 'vimeo') + _create_media_template_parameters($url, $attributes, $as_admin, $source_member));
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ class Hook_video_syndication_vimeo

    public function recognises_as_remote($url)
    {
        $is_embed = (preg_match('#^https?://vimeo\.com/(\d+)#', $url) != 0);
        $is_embed = (preg_match('#^https?://vimeo\.com/(.*/)?(\d+)#', $url) != 0);
        if ($is_embed) {
            return true;
        }