aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-13 20:42:37 -0700
committerFriendika <info@friendika.com>2011-06-13 20:42:37 -0700
commit05eb9ceaba9f87776b61a51a49a967cc578ef58a (patch)
tree6b2de7d5638c7b0671b7462f308cd664e99a6bb8 /include/event.php
parentfb92dbf5d683c3d92a76216c09d23e338c7d3341 (diff)
downloadvolse-hubzilla-05eb9ceaba9f87776b61a51a49a967cc578ef58a.tar.gz
volse-hubzilla-05eb9ceaba9f87776b61a51a49a967cc578ef58a.tar.bz2
volse-hubzilla-05eb9ceaba9f87776b61a51a49a967cc578ef58a.zip
avoid returning events from getting posted again
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/event.php b/include/event.php
index 208ba1e1f..2cfc52408 100644
--- a/include/event.php
+++ b/include/event.php
@@ -193,6 +193,7 @@ function event_store($arr) {
$arr['edited'] = (($arr['edited']) ? $arr['edited'] : datetime_convert());
$arr['type'] = (($arr['type']) ? $arr['type'] : 'event' );
$arr['cid'] = ((intval($arr['cid'])) ? intval($arr['cid']) : 0);
+ $arr['uri'] = (x($arr,'uri') ? $arr['uri'] : item_new_uri($a->get_hostname(),$arr['uid']));
if($arr['cid'])
$c = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@@ -250,14 +251,12 @@ function event_store($arr) {
}
else {
- $uri = item_new_uri($a->get_hostname(),local_user());
-
$r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`,
`adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`)
VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
intval($arr['uid']),
intval($arr['cid']),
- dbesc($uri),
+ dbesc($arr['uri']),
dbesc($arr['created']),
dbesc($arr['edited']),
dbesc($arr['start']),