mirror of
https://github.com/ivuorinen/xkcd-Mailer.git
synced 2026-03-22 08:06:46 +00:00
Indenting and PSR2 styling
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
// Use config.example.php as base for your configurations.
|
// Use config.example.php as base for your configurations.
|
||||||
$lastfile = "last.txt";
|
$lastfile = "last.txt";
|
||||||
|
|
||||||
$here = dirname( __FILE__ );
|
$here = dirname(__FILE__);
|
||||||
if( !is_readable($here . '/config.php') ) {
|
if (! is_readable($here . '/config.php')) {
|
||||||
die("Please configure me. I don't know where I should sent the comic. (Config file {$here}/config.php missing.)");
|
die("Please configure me. I don't know where I should sent the comic. (Config file {$here}/config.php missing.)");
|
||||||
} else {
|
} else {
|
||||||
include_once($here . '/config.php');
|
include_once($here . '/config.php');
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
$feed = "http://xkcd.com/atom.xml";
|
$feed = "http://xkcd.com/atom.xml";
|
||||||
|
|
||||||
// Check if http:// wrapper is allowed
|
// Check if http:// wrapper is allowed
|
||||||
if( ini_get('allow_url_fopen') ) {
|
if (ini_get('allow_url_fopen')) {
|
||||||
$data = simplexml_load_file($feed);
|
$data = simplexml_load_file($feed);
|
||||||
} else {
|
} else {
|
||||||
// If http:// wrapper is disabled (by allow_url_fopen=0, for example), then fall back on cURL
|
// If http:// wrapper is disabled (by allow_url_fopen=0, for example), then fall back on cURL
|
||||||
|
|||||||
Reference in New Issue
Block a user