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

This commit is contained in:
Mario Vavti
2017-10-05 11:25:39 +02:00
9 changed files with 35 additions and 7 deletions

View File

@@ -4133,7 +4133,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
//$third = dba_timer();
$items = fetch_post_tags($items,true);
$items = fetch_post_tags($items,false);
//$fourth = dba_timer();

View File

@@ -518,6 +518,27 @@ function guess_image_type($filename, $headers = '') {
}
function delete_thing_photo($url,$ob_hash) {
$hash = basename($url);
$hash = substr($hash,0,strpos($hash,'-'));
// hashes should be 32 bytes.
if((! $ob_hash) || (strlen($hash) < 16))
return;
$r = q("delete from photo where xchan = '%s' and photo_usage = %d and resource_id = '%s'",
dbesc($ob_hash),
intval(PHOTO_THING),
dbesc($hash)
);
}
function import_xchan_photo($photo,$xchan,$thing = false) {
$flags = (($thing) ? PHOTO_THING : PHOTO_XCHAN);

View File

@@ -2412,7 +2412,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $d
}
if(! $replaced) {
//base tag has the tags name only
// base tag has the tags name only
if((substr($tag,0,7) === '#&quot;') && (substr($tag,-6,6) === '&quot;')) {
$basetag = substr($tag,7);