aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-16 17:16:50 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-16 17:16:50 -0700
commit5e4df4b3f7782f8a82664d24b86d46a14b3d178b (patch)
tree3728d103be213e4b2965f066441af731b2aa5a72 /mod/item.php
parent059e090b53643cb07a2634b700ada5cf3b6894e8 (diff)
downloadvolse-hubzilla-5e4df4b3f7782f8a82664d24b86d46a14b3d178b.tar.gz
volse-hubzilla-5e4df4b3f7782f8a82664d24b86d46a14b3d178b.tar.bz2
volse-hubzilla-5e4df4b3f7782f8a82664d24b86d46a14b3d178b.zip
added network page
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php
index c7b5b4885..3340183b0 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -73,10 +73,12 @@ function item_post(&$a) {
if((x($_SESSION,'visitor_id')) && (intval($_SESSION['visitor_id'])))
$contact_id = $_SESSION['visitor_id'];
else {
- $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
- if(count($r))
+ if(count($r)) {
+ $contact_record = $r[0];
$contact_id = $r[0]['id'];
+ }
}
$notify_type = (($parent) ? 'comment-new' : 'wall-new' );
@@ -93,12 +95,15 @@ function item_post(&$a) {
} while($dups == true);
- $r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`created`,`edited`,`hash`,`body`,
+ $r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `created`,`edited`,`hash`,`body`,
`allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
- VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
+ VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($profile_uid),
"jot",
intval($contact_id),
+ dbesc($contact_record['name']),
+ dbesc($contact_record['url']),
+ dbesc($contact_record['thumb']),
datetime_convert(),
datetime_convert(),
dbesc($hash),