Merge remote-tracking branch 'mike/master' into dev

This commit is contained in:
Mario Vavti 2018-07-29 06:43:55 +02:00
commit 3fcb6df0f1
3 changed files with 28 additions and 9 deletions

19
Zotlabs/Update/_1216.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace Zotlabs\Update;
class _1215 {
function run() {
$r = q("UPDATE xchan set xchan_name = 'unknown' where xchan_name like '%<%' ");
if($r) {
return UPDATE_SUCCESS;
}
else {
return UPDATE_FAILED;
}
}
}

View File

@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.7' );
define ( 'ZOT_REVISION', '6.0a' );
define ( 'DB_UPDATE_VERSION', 1215 );
define ( 'DB_UPDATE_VERSION', 1216 );
define ( 'PROJECT_BASE', __DIR__ );

View File

@ -1923,23 +1923,23 @@ function scrape_vcard($url) {
$level2 = $item->getElementsByTagName('*');
foreach($level2 as $x) {
if(attribute_contains($x->getAttribute('id'),'pod_location'))
$ret['pod_location'] = $x->textContent;
$ret['pod_location'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'fn'))
$ret['fn'] = $x->textContent;
$ret['fn'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'uid'))
$ret['uid'] = $x->textContent;
$ret['uid'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'nickname'))
$ret['nick'] = $x->textContent;
$ret['nick'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'searchable'))
$ret['searchable'] = $x->textContent;
$ret['searchable'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'key'))
$ret['public_key'] = $x->textContent;
if(attribute_contains($x->getAttribute('class'),'given_name'))
$ret['given_name'] = $x->textContent;
$ret['given_name'] = escape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'family_name'))
$ret['family_name'] = $x->textContent;
$ret['family_name'] = escxape_tags($x->textContent);
if(attribute_contains($x->getAttribute('class'),'url'))
$ret['url'] = $x->textContent;
$ret['url'] = escape_tags($x->textContent);
if((attribute_contains($x->getAttribute('class'),'photo'))
|| (attribute_contains($x->getAttribute('class'),'avatar'))) {