Skip to content

Commit

Permalink
Pequeno fix no Acontecimento::Trata_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
guaycuru committed Jul 10, 2017
1 parent 24bc469 commit f498838
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/GDE/Acontecimento.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ public function Listar_Respostas(Usuario $Usuario = null) { // Soh usada para Us
* @return mixed|string
*/
public static function TrataURL($url) {
if(is_array($url))
$url = $url[0];
if(preg_match('/(?:http:\/\/)?(?:www.|)youtube.com\/watch?(?:.*?)v=([a-z0-9_\-]+)(?:.*?)(&hd=1|).*/i', $url))
return preg_replace('/(?:http:\/\/)?(?:www.|)youtube.com\/watch?(?:.*?)v=([a-z0-9_\-]+)(?:.*?)(&hd=1|).*/i', '<br /><a href="#" id="youtube_${1}" class="video_youtube"><img src="'.CONFIG_URL.'web/images/play_video.png" style="background: url(http://i.ytimg.com/vi/${1}/default.jpg) transparent" alt="YouTube" border="0" height="90" width="120" /></a>', $url);
if(preg_match('/(?:http:\/\/)?(?:www.|)youtu.be\/([a-z0-9_\-]+)(?:.*?)(\?hd=1|).*/i', $url))
Expand Down

0 comments on commit f498838

Please sign in to comment.