diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-10-05 11:25:39 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-10-05 11:25:39 +0200 |
commit | 5be9477f21626469dedcff4f96243be2bfafdb71 (patch) | |
tree | fcf56e3e85e6d28d8901ef3a0a638bfb40212b51 /include | |
parent | 6f88d5e92be06ad8fa61f900e8a4fb41ba54135e (diff) | |
parent | 15b9a67c01964b83ac724945fe416dd35f66e914 (diff) | |
download | volse-hubzilla-5be9477f21626469dedcff4f96243be2bfafdb71.tar.gz volse-hubzilla-5be9477f21626469dedcff4f96243be2bfafdb71.tar.bz2 volse-hubzilla-5be9477f21626469dedcff4f96243be2bfafdb71.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 2 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 21 | ||||
-rw-r--r-- | include/text.php | 2 |
3 files changed, 23 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index cc209aacf..dd8b394d3 100755 --- a/include/items.php +++ b/include/items.php @@ -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(); diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 17ca81419..5eb1f9113 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -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); diff --git a/include/text.php b/include/text.php index bd802b2c1..80914747b 100644 --- a/include/text.php +++ b/include/text.php @@ -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) === '#"') && (substr($tag,-6,6) === '"')) { $basetag = substr($tag,7); |