X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=boot.php;h=05b33abd6ef93d1d4d3f5cea4e5e0e5d8e806065;hb=ffdcbd798f0253529fa373b59c769f9db49bf97c;hp=ac577887caee4e22967672e750c540c7b5e9c47a;hpb=d5ac7e938bf5a8737a2afdcf69f095b13bb7e5af;p=friendica.git
diff --git a/boot.php b/boot.php
index ac577887ca..05b33abd6e 100644
--- a/boot.php
+++ b/boot.php
@@ -2,8 +2,8 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1031 );
-define ( 'FRIENDIKA_VERSION', '2.01.1001' );
+define ( 'BUILD_ID', 1033 );
+define ( 'FRIENDIKA_VERSION', '2.01.1005' );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "
\r\n" );
@@ -945,6 +945,11 @@ function unxmlify($s) {
if(! function_exists('hex2bin')) {
function hex2bin($s) {
+ if(! ctype_xdigit($s)) {
+ logger('hex2bin: illegal input: ' . print_r(debug_backtrace(), true));
+ return($s);
+ }
+
return(pack("H*",$s));
}}
@@ -2004,8 +2009,12 @@ function profile_sidebar($profile) {
if((! is_array($profile)) && (! count($profile)))
return $o;
+ call_hooks('profile_sidebar_enter', $profile);
+
$fullname = '
' . $profile['name'] . '
';
+ $pdesc = '' . $profile['pdesc'] . '
';
+
$tabs = '';
$photo = '';
@@ -2044,6 +2053,7 @@ function profile_sidebar($profile) {
$o .= replace_macros($tpl, array(
'$fullname' => $fullname,
+ '$pdesc' => $pdesc,
'$tabs' => $tabs,
'$photo' => $photo,
'$connect' => $connect,
@@ -2054,7 +2064,10 @@ function profile_sidebar($profile) {
'$homepage' => $homepage
));
- call_hooks('profile_sidebar', $o);
+
+ $arr = array('profile' => $profile, 'entry' => $o);
+
+ call_hooks('profile_sidebar', $arr);
return $o;
}}
@@ -2163,7 +2176,7 @@ function get_birthdays() {
foreach($r as $rr) {
$now = strtotime('now');
- $today = (((strtotime($rr['start']) < $now) && (strtotime($rr['finish']) > $now)) ? true : false);
+ $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
$o .= '' . $rr['name'] . ' '
@@ -2178,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;
+}}