aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2016-12-17 14:12:36 +0100
committerMaZderMind2016-12-17 14:12:36 +0100
commitf4b2cb58b2e62e365103cbcffc3d8c2999b3f300 (patch)
treea88aa64269bff22adfed956a52973d2dfeb7f90b
parent3384e963da66e9089b71c546750c8981be8c6ed8 (diff)
warn on old-style paths
-rw-r--r--command/download.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/command/download.php b/command/download.php
index 17ae7c9..c9fc5cd 100644
--- a/command/download.php
+++ b/command/download.php
@@ -98,6 +98,18 @@ function get_file_cache($conference, $filename)
function download($what, $conference, $url, $cache)
{
+ $info = parse_url($url);
+ if(!isset($info['scheme']) || !isset($info['host']))
+ {
+ stderr(
+ ' !! %s url for conference %s does look like an old-style path: "%s". please update to a full http/https url',
+ $what,
+ $conference->getSlug(),
+ $url
+ );
+ return false;
+ }
+
stdout(
' downloading %s from %s to %s',
$what,