瀏覽代碼

fixing youtube videos with default url

vbracco 17 年之前
父節點
當前提交
9c8ed8d653
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      classes/functions.php

+ 1 - 1
classes/functions.php 查看文件

135
 	
135
 	
136
 	function isYoutubeVideo($videoUrl) {
136
 	function isYoutubeVideo($videoUrl) {
137
 		$url = explode("?", $videoUrl);
137
 		$url = explode("?", $videoUrl);
138
-		if (beginsWith($url[0], "http://") && endsWith($url[0], ".youtube.com/watch"))
138
+		if((beginsWith($url[0], "http://") && endsWith($url[0], ".youtube.com/watch")) || beginsWith($url[0], "http://youtube.com/watch"))
139
 			return true;
139
 			return true;
140
 		else
140
 		else
141
 			return false;
141
 			return false;