git.cweiske.de
/
phinde.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0b985217cc1ac3e61d8c033baa646303857e7776
[phinde.git]
/
src
/
phinde
/
Helper.php
1
<?php
2
namespace phinde;
3
4
class Helper
5
{
6
public static function isUrlAllowed($url)
7
{
8
$urlDomain = parse_url($url, PHP_URL_HOST);
9
if (!in_array($urlDomain, $GLOBALS['phinde']['domains'])) {
10
return false;
11
}
12
return true;
13
}
14
15
public static function noSchema($url)
16
{
17
return str_replace(
18
array('http://', 'https://'),
19
'',
20
$url
21
);
22
}
23
}
24
?>