Added some more timestamp measuring
This commit is contained in:
@@ -681,6 +681,8 @@ function bb_RemovePictureLinks($match) {
|
||||
if(is_null($text)){
|
||||
$a = get_app();
|
||||
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
$ch = @curl_init($match[1]);
|
||||
@curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
@@ -688,6 +690,8 @@ function bb_RemovePictureLinks($match) {
|
||||
@curl_exec($ch);
|
||||
$curl_info = @curl_getinfo($ch);
|
||||
|
||||
$a->save_timestamp($stamp1, "network");
|
||||
|
||||
if (substr($curl_info["content_type"], 0, 6) == "image/")
|
||||
$text = "[url=".$match[1]."]".$match[1]."[/url]";
|
||||
else {
|
||||
@@ -731,6 +735,8 @@ function bb_CleanPictureLinksSub($match) {
|
||||
if(is_null($text)){
|
||||
$a = get_app();
|
||||
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
$ch = @curl_init($match[1]);
|
||||
@curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
@@ -738,6 +744,8 @@ function bb_CleanPictureLinksSub($match) {
|
||||
@curl_exec($ch);
|
||||
$curl_info = @curl_getinfo($ch);
|
||||
|
||||
$a->save_timestamp($stamp1, "network");
|
||||
|
||||
// if its a link to a picture then embed this picture
|
||||
if (substr($curl_info["content_type"], 0, 6) == "image/")
|
||||
$text = "[img]".$match[1]."[/img]";
|
||||
|
||||
Reference in New Issue
Block a user