Task #2838 - URL protocol checking to avoid broken links

This commit is contained in:
simo 2005-06-30 23:17:50 +00:00
parent a60eb05f13
commit 01be3a4893

View file

@ -292,8 +292,14 @@ if ($_COOKIE["AURSID"]) {
# performed. Examples: #md5sums == #sources?, md5sums of any
# included files match?, install scriptlet file exists?
#
# Check for http:// or other protocol in url
#
$parsed_url = parse_url($pkgbuild['url']);
if (!$parsed_url['scheme']) {
$error = __("Package URL is missing a protocol (ie. http:// ,ftp://)");
}
# Now, run through the pkgbuild array and do any $pkgname/$pkgver
# substituions.
#