Skip to content
Snippets Groups Projects
Commit 59d5aa2c authored by Robin Appelman's avatar Robin Appelman
Browse files

add function to safely end output buffering

parent c38a75e0
No related branches found
No related tags found
No related merge requests found
......@@ -594,22 +594,31 @@ class OC_Util {
$connected = @fsockopen("www.owncloud.org", 80);
if ($connected) {
fclose($connected);
return true;
return true;
}else{
// second try in case one server is down
$connected = @fsockopen("apps.owncloud.com", 80);
if ($connected) {
fclose($connected);
return true;
return true;
}else{
return false;
return false;
}
}
}
/**
* clear all levels of output buffering
*/
public static function obEnd(){
while (ob_get_level()) {
ob_end_clean();
}
}
/**
* @brief Generates a cryptographical secure pseudorandom string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment