require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1186' );
+define ( 'FRIENDICA_VERSION', '2.3.1187' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1110 );
if(substr($this->cmd,0,1) === '~')
$this->cmd = 'profile/' . substr($this->cmd,1);
+ // Diaspora style profile url
+
+ if(substr($this->cmd,0,2) === 'u/')
+ $this->cmd = 'profile/' . substr($this->cmd,2);
+
/**
*
* Break the URL path into C style argc/argv style arguments for our
}
}
}
-
+
+ $cnt = preg_match_all('/@\[url=(.*?)\[\/url\]/ism',$body,$matches,PREG_SET_ORDER);
+ if($cnt) {
+ foreach($matches as $mtch) {
+ if(strlen($str_tags))
+ $str_tags .= ',';
+ $str_tags .= '@[url=' . $mtch[1] . '[/url]';
+ }
+ }
+
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
$datarray['wall'] = 0;
$myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
$myurl = substr($myurl,strpos($myurl,'://')+3);
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
- $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' )) ",
+ $diasp_url = str_replace('/profile/','/u/',$myurl);
+ $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' or tag regexp '%s' )) ",
dbesc($myurl . '$'),
- dbesc($myurl . '\\]')
+ dbesc($myurl . '\\]'),
+ dbesc($diasp_url . '\\]')
);
}
$myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
$myurl = substr($myurl,strpos($myurl,'://')+3);
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
- $sql_extra .= sprintf(" AND ( `item`.`author-link` regexp '%s' or `item`.`tag` regexp '%s' ) ",
+ $diasp_url = str_replace('/profile/','/u/',$myurl);
+ $sql_extra .= sprintf(" AND ( `item`.`author-link` regexp '%s' or `item`.`tag` regexp '%s' or `item`.`tag` regexp '%s' ) ",
dbesc($myurl . '$'),
- dbesc($myurl . '\\]')
+ dbesc($myurl . '\\]'),
+ dbesc($diasp_url . '\\]')
);