diff options
author | friendica <info@friendica.com> | 2014-11-20 19:33:08 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-20 19:33:08 -0800 |
commit | f17ef6aa90bc283e122a88e627cb464f065af2a6 (patch) | |
tree | 30efcc4ffc922358b0c78dc82a71c3352da442f0 /include/widgets.php | |
parent | 03a457ed83c0cee5e8a766fa6394c18966688068 (diff) | |
download | volse-hubzilla-f17ef6aa90bc283e122a88e627cb464f065af2a6.tar.gz volse-hubzilla-f17ef6aa90bc283e122a88e627cb464f065af2a6.tar.bz2 volse-hubzilla-f17ef6aa90bc283e122a88e627cb464f065af2a6.zip |
allow the photo_rand widget to access photos from any channel (useful if the widget is used in sys-generated pages). You still need permission.
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/widgets.php b/include/widgets.php index 7193850ef..076a8fa91 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -828,7 +828,11 @@ function widget_photo_rand($arr) { else $album = ''; - $channel_id = get_app()->profile_uid; + $channel_id = 0; + if(array_key_exists('channel_id',$arr) && intval($arr['channel_id'])) + $channel_id = intval($arr['channel_id']); + if(! $channel_id) + $channel_id = get_app()->profile_uid; if(! $channel_id) return ''; |