Added check if curl is enabled

This commit is contained in:
BNoiZe
2013-11-21 09:56:06 +01:00
parent dc09840f99
commit df95189e87
2 changed files with 13 additions and 9 deletions

View File

@@ -35,12 +35,16 @@ if ($action == "newsfeed") {
if (ini_get('allow_url_fopen')) {
$news = simplexml_load_file($feed, null, LIBXML_NOCDATA);
} else {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $feed);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
$news = simplexml_load_file(trim($output));
if (function_exists('curl_version')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $feed);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
$news = simplexml_load_file(trim($output));
} else {
$news = false;
}
}
if ($news !== false) {

View File

@@ -588,7 +588,7 @@ table thead:first-child th {
}
table tbody td {
border-bottom:1px dotted #ccc;
border-bottom:1px solid #f1f2f3;
}
table tbody tr:last-child td {
border-bottom: 0;
@@ -604,7 +604,7 @@ table tbody tr:last-child td {
.formtable tbody td {
border:0;
border-bottom:1px dotted #ccc;
border-bottom:1px solid #f1f2f3;
min-height: 20px;
}
@@ -811,7 +811,7 @@ select[multiple="multiple"] {
.dboarditem td,.dboarditemfull td {
border-right:0;
border-bottom:1px dotted #ccc;
border-bottom:1px solid #f1f2f3;
padding: 4px 0px 4px 8px;
}