diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-18 13:00:43 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-18 13:00:43 +0100 |
commit | 498c021aec25d845c67150475294066113de6d20 (patch) | |
tree | c8934c83f6519bf58f27f410683e06cc6615a6a0 /include | |
parent | 5ee133843f166a58e0c6236e543204be8dae70d3 (diff) | |
parent | ef75d27afbbee4cfe7d4441269e350b8f7f432f9 (diff) | |
download | volse-hubzilla-498c021aec25d845c67150475294066113de6d20.tar.gz volse-hubzilla-498c021aec25d845c67150475294066113de6d20.tar.bz2 volse-hubzilla-498c021aec25d845c67150475294066113de6d20.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!5
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 5 | ||||
-rw-r--r-- | include/event.php | 12 | ||||
-rw-r--r-- | include/feedutils.php | 4 | ||||
-rwxr-xr-x | include/oembed.php | 2 | ||||
-rw-r--r-- | include/text.php | 3 |
5 files changed, 24 insertions, 2 deletions
diff --git a/include/channel.php b/include/channel.php index 29835eac6..32bd596fc 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2953,3 +2953,8 @@ function pchan_to_chan($pchan) { function channel_url($channel) { return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root()); } + +function get_channel_hashes() { + $r = q("SELECT channel_hash FROM channel WHERE channel_removed = 0"); + return flatten_array_recursive($r); +} diff --git a/include/event.php b/include/event.php index 6be1b6705..9d76aabd6 100644 --- a/include/event.php +++ b/include/event.php @@ -553,9 +553,19 @@ function event_store_event($arr) { dbesc($hash), intval($arr['uid']) ); - if($r) + if($r) { + + /** + * @hooks event_store_event_end + * Called after an event record was stored. + * * \e array \b event + */ + call_hooks('event_store_event_end', $r[0]); + return $r[0]; + } + return false; } diff --git a/include/feedutils.php b/include/feedutils.php index 9f4d732bb..6d14eb5c4 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1760,7 +1760,11 @@ function handle_feed($uid, $abook_id, $url) { if($z['success']) { consume_feed($z['body'], $channel, $x[0], 1); consume_feed($z['body'], $channel, $x[0], 2); + return true; } + + return false; + } diff --git a/include/oembed.php b/include/oembed.php index ee9e57c3f..eeae7a174 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -146,7 +146,7 @@ function oembed_fetch_url($embedurl){ $txt = Cache::get('[' . App::$videowidth . '] ' . $furl); } - if(strpos(strtolower($embedurl),'.pdf') !== false) { + if(strpos(strtolower($embedurl),'.pdf') !== false && get_config('system','inline_pdf')) { $action = 'allow'; $j = [ 'html' => '<object data="' . $embedurl . '" type="application/pdf" style="width: 100%; height: 300px;"></object>', diff --git a/include/text.php b/include/text.php index daa3c4c94..44af40810 100644 --- a/include/text.php +++ b/include/text.php @@ -2789,6 +2789,9 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) // select someone by attag or nick and the name passed in if(! $r) { + // strip user-supplied wildcards before running a wildcard search + $newname = str_replace('%','',$newname); + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE xchan_addr like ('%s') AND abook_channel = %d ", dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')), |