diff options
author | zottel <github@zottel.net> | 2014-02-17 08:17:47 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2014-02-17 08:17:47 +0100 |
commit | 2bca2199112625593eb412584e17e874e71ca913 (patch) | |
tree | c6679ddb544217a10d8255578009c4ba8951bc6b /include/items.php | |
parent | 54727d3a66df92596378ea7f5c412d5e6037b037 (diff) | |
parent | f38ab0904101366bf536d46ab460dcd5cf4f60ca (diff) | |
download | volse-hubzilla-2bca2199112625593eb412584e17e874e71ca913.tar.gz volse-hubzilla-2bca2199112625593eb412584e17e874e71ca913.tar.bz2 volse-hubzilla-2bca2199112625593eb412584e17e874e71ca913.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/include/items.php b/include/items.php index 3c10b8f5c..c90bfb41c 100755 --- a/include/items.php +++ b/include/items.php @@ -145,7 +145,9 @@ function can_comment_on_post($observer_xchan,$item) { * @function red_zrl_callback * preg_match function when fixing 'naked' links in mod item.php * Check if we've got a hubloc for the site and use a zrl if we do, a url if we don't. - * + * Remove any existing zid= param which may have been pasted by mistake - and will have + * the author's credentials. zid's are dynamic and can't really be passed around like + * that. */ @@ -159,6 +161,13 @@ function red_zrl_callback($matches) { if($r) $zrl = true; } + + $t = strip_zids($matches[2]); + if($t !== $matches[2]) { + $zrl = true; + $matches[2] = $t; + } + if($matches[1] === '#^') $matches[1] = ''; if($zrl) @@ -2254,6 +2263,13 @@ function tag_deliver($uid,$item_id) { if(is_array($j_obj['link'])) $taglink = get_rel_link($j_obj['link'],'alternate'); store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j_obj['id']); + $x = q("update item set edited = '%s', received = '%s', changed = '%s' where mid = '%s' and uid = %d limit 1", + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + dbesc($j_tgt['id']), + intval($u[0]['channel_id']) + ); proc_run('php','include/notifier.php','edit_post',$p[0]['id']); } } @@ -3622,26 +3638,6 @@ function posted_dates($uid,$wall) { } -function posted_date_widget($url,$uid,$wall) { - $o = ''; - - if(! feature_enabled($uid,'archives')) - return $o; - - $ret = posted_dates($uid,$wall); - if(! count($ret)) - return $o; - - $o = replace_macros(get_markup_template('posted_date_widget.tpl'),array( - '$title' => t('Archives'), - '$size' => ((count($ret) > 6) ? 6 : count($ret)), - '$url' => $url, - '$dates' => $ret - )); - return $o; -} - - function fetch_post_tags($items,$link = false) { $tag_finder = array(); |