diff options
author | root <root@diekershoff.homeunix.net> | 2011-01-20 08:17:07 +0100 |
---|---|---|
committer | root <root@diekershoff.homeunix.net> | 2011-01-20 08:17:07 +0100 |
commit | 030f6f306cba0f025d124fc7a2912a2bafb291be (patch) | |
tree | 7643c61b5d25671b3d79ba2d8c28fd7c9bb60b4a /boot.php | |
parent | 8e22c669a0668fc0498e9c1d822dcefd97bae1e5 (diff) | |
parent | 2ffe0d0b1d9589b6b37d8ade0114caef31339001 (diff) | |
download | volse-hubzilla-030f6f306cba0f025d124fc7a2912a2bafb291be.tar.gz volse-hubzilla-030f6f306cba0f025d124fc7a2912a2bafb291be.tar.bz2 volse-hubzilla-030f6f306cba0f025d124fc7a2912a2bafb291be.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -3,7 +3,7 @@ set_time_limit(0); define ( 'BUILD_ID', 1033 ); -define ( 'FRIENDIKA_VERSION', '2.01.1004' ); +define ( 'FRIENDIKA_VERSION', '2.01.1005' ); define ( 'DFRN_PROTOCOL_VERSION', '2.0' ); define ( 'EOL', "<br />\r\n" ); @@ -2191,3 +2191,22 @@ function get_birthdays() { }} +/** + * + * Compare two URLs to see if they are the same, but ignore + * slight but hopefully insignificant differences such as if one + * is https and the other isn't, or if one is www.something and + * the other isn't - and also ignore case differences. + * + * Return true if the URLs match, otherwise false. + * + */ + +if(! function_exists('link_compare')) { +function link_compare($a,$b) { + $a1 = str_replace(array('https:','//www.'), array('http:','//'), $a); + $b1 = str_replace(array('https:','//www.'), array('http:','//'), $b); + if(strcasecmp($a1,$b1) === 0) + return true; + return false; +}} |