aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-03 19:25:59 -0700
committerfriendica <info@friendica.com>2014-06-03 19:25:59 -0700
commit737d3f583665f24881e484b40acf0bbc5f498e48 (patch)
treebbf9dde7769ee740b54439b7182be4d64924ca47 /include
parent97a4479513130658fffdcc1f8ef0d349f08520bc (diff)
downloadvolse-hubzilla-737d3f583665f24881e484b40acf0bbc5f498e48.tar.gz
volse-hubzilla-737d3f583665f24881e484b40acf0bbc5f498e48.tar.bz2
volse-hubzilla-737d3f583665f24881e484b40acf0bbc5f498e48.zip
don't add a birthday event if the birthday channel doesn't have permission to send you posts.
Diffstat (limited to 'include')
-rw-r--r--include/datetime.php5
-rw-r--r--include/widgets.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/datetime.php b/include/datetime.php
index 4884cda11..0214b9e4c 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -484,11 +484,16 @@ function z_birthday($dob,$tz,$format="Y-m-d H:i:s") {
function update_birthdays() {
require_once('include/event.php');
+ require_once('include/permissions.php');
$r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
WHERE abook_dob > utc_timestamp() + interval 7 day and abook_dob < utc_timestamp() + interval 14 day");
if($r) {
foreach($r as $rr) {
+
+ if(! perm_is_allowed($rr['abook_channel'],$rr['xchan_hash'],'send_stream'))
+ continue;
+
$ev = array();
$ev['uid'] = $rr['abook_channel'];
$ev['account'] = $rr['abook_account'];
diff --git a/include/widgets.php b/include/widgets.php
index d197eb240..96bced87f 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -196,7 +196,7 @@ function widget_savedsearch($arr) {
$a = get_app();
$search = ((x($_GET,'search')) ? $_GET['search'] : '');
-
+
if(x($_GET,'searchsave') && $search) {
$r = q("select * from `term` where `uid` = %d and `type` = %d and `term` = '%s' limit 1",
intval(local_user()),