aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-15 22:33:37 -0700
committerfriendica <info@friendica.com>2012-08-15 22:33:37 -0700
commitf7c6a6ff9071c120f5bd6efe51cdb934e0c30cc7 (patch)
tree586454a21f87a8f9a5e75073ac065cfbbae935a4 /mod
parent77b334efbce9eb9aef825b968a2c852da21bfe94 (diff)
downloadvolse-hubzilla-f7c6a6ff9071c120f5bd6efe51cdb934e0c30cc7.tar.gz
volse-hubzilla-f7c6a6ff9071c120f5bd6efe51cdb934e0c30cc7.tar.bz2
volse-hubzilla-f7c6a6ff9071c120f5bd6efe51cdb934e0c30cc7.zip
item table rename parent-uri, target-type, object-type (more to come later)
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_confirm.php8
-rw-r--r--mod/item.php2
-rwxr-xr-xmod/like.php6
-rw-r--r--mod/message.php22
-rw-r--r--mod/photos.php22
-rwxr-xr-xmod/poke.php4
-rw-r--r--mod/profiles.php4
-rw-r--r--mod/tagger.php6
8 files changed, 37 insertions, 37 deletions
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 274527bc2..eef80f8dd 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -439,7 +439,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
if(count($self)) {
$arr = array();
- $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $uid);
+ $arr['uri'] = $arr['parent_uri'] = item_new_uri($a->get_hostname(), $uid);
$arr['uid'] = $uid;
$arr['contact-id'] = $self[0]['id'];
$arr['wall'] = 1;
@@ -457,7 +457,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]';
$arr['verb'] = ACTIVITY_FRIEND;
- $arr['object-type'] = ACTIVITY_OBJ_PERSON;
+ $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
$arr['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
@@ -760,7 +760,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
if(count($self)) {
$arr = array();
- $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $local_uid);
+ $arr['uri'] = $arr['parent_uri'] = item_new_uri($a->get_hostname(), $local_uid);
$arr['uid'] = $local_uid;
$arr['contact-id'] = $self[0]['id'];
$arr['wall'] = 1;
@@ -778,7 +778,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$BPhoto = '[url=' . $combined['url'] . ']' . '[img]' . $combined['thumb'] . '[/img][/url]';
$arr['verb'] = ACTIVITY_JOIN;
- $arr['object-type'] = ACTIVITY_OBJ_GROUP;
+ $arr['obj_type'] = ACTIVITY_OBJ_GROUP;
$arr['body'] = sprintf( t('%1$s has joined %2$s'), $A, $B)."\n\n\n" .$BPhoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_GROUP . '</type><title>' . $combined['name'] . '</title>'
. '<id>' . $combined['url'] . '/' . $combined['name'] . '</id>';
diff --git a/mod/item.php b/mod/item.php
index e2fa5d06b..7c00aed18 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -813,7 +813,7 @@ function item_post(&$a) {
if(! $parent)
$parent = $post_id;
- $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `plink` = '%s', `changed` = '%s', `visible` = 1
+ $r = q("UPDATE `item` SET `parent` = %d, `parent_uri` = '%s', `plink` = '%s', `changed` = '%s', `visible` = 1
WHERE `id` = %d LIMIT 1",
intval($parent),
dbesc(($parent == $post_id) ? $uri : $parent_item['uri']),
diff --git a/mod/like.php b/mod/like.php
index 0ab516a16..13b56ec98 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -106,7 +106,7 @@ function like_content(&$a) {
$r = q("SELECT * FROM `item` WHERE `verb` = '%s' AND `deleted` = 0
- AND `contact-id` = %d AND ( `parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1",
+ AND `contact-id` = %d AND ( `parent` = '%s' OR `parent_uri` = '%s' OR `thr-parent` = '%s') LIMIT 1",
dbesc($activity),
intval($contact['id']),
dbesc($item_id),
@@ -163,7 +163,7 @@ EOT;
$arr['origin'] = 1;
$arr['gravity'] = GRAVITY_LIKE;
$arr['parent'] = $item['id'];
- $arr['parent-uri'] = $item['uri'];
+ $arr['parent_uri'] = $item['uri'];
$arr['thr-parent'] = $item['uri'];
$arr['owner-name'] = $remote_owner['name'];
$arr['owner-link'] = $remote_owner['url'];
@@ -178,7 +178,7 @@ EOT;
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
$arr['verb'] = $activity;
- $arr['object-type'] = $objtype;
+ $arr['obj_type'] = $objtype;
$arr['object'] = $obj;
$arr['allow_cid'] = $item['allow_cid'];
$arr['allow_gid'] = $item['allow_gid'];
diff --git a/mod/message.php b/mod/message.php
index 0be0c7055..7ebd4567a 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -200,15 +200,15 @@ function message_content(&$a) {
goaway($a->get_baseurl(true) . '/message' );
}
else {
- $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `parent_uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[2]),
intval(local_user())
);
if(count($r)) {
- $parent = $r[0]['parent-uri'];
+ $parent = $r[0]['parent_uri'];
$convid = $r[0]['convid'];
- $r = q("DELETE FROM `mail` WHERE `parent-uri` = '%s' AND `uid` = %d ",
+ $r = q("DELETE FROM `mail` WHERE `parent_uri` = '%s' AND `uid` = %d ",
dbesc($parent),
intval(local_user())
);
@@ -294,7 +294,7 @@ function message_content(&$a) {
$r = q("SELECT count(*) AS `total` FROM `mail`
- WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
+ WHERE `mail`.`uid` = %d GROUP BY `parent_uri` ORDER BY `created` DESC",
intval(local_user()),
dbesc($myprofile)
);
@@ -305,7 +305,7 @@ function message_content(&$a) {
`mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
count( * ) as count
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
- WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
+ WHERE `mail`.`uid` = %d GROUP BY `parent_uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ",
intval(local_user()),
//
intval($a->pager['start']),
@@ -362,10 +362,10 @@ function message_content(&$a) {
$contact_id = $r[0]['contact-id'];
$convid = $r[0]['convid'];
- $sql_extra = sprintf(" and `mail`.`parent-uri` = '%s' ", dbesc($r[0]['parent-uri']));
+ $sql_extra = sprintf(" and `mail`.`parent_uri` = '%s' ", dbesc($r[0]['parent_uri']));
if($convid)
- $sql_extra = sprintf(" and ( `mail`.`parent-uri` = '%s' OR `mail`.`convid` = '%d' ) ",
- dbesc($r[0]['parent-uri']),
+ $sql_extra = sprintf(" and ( `mail`.`parent_uri` = '%s' OR `mail`.`convid` = '%d' ) ",
+ dbesc($r[0]['parent_uri']),
intval($convid)
);
@@ -380,8 +380,8 @@ function message_content(&$a) {
return $o;
}
- $r = q("UPDATE `mail` SET `seen` = 1 WHERE `parent-uri` = '%s' AND `uid` = %d",
- dbesc($r[0]['parent-uri']),
+ $r = q("UPDATE `mail` SET `seen` = 1 WHERE `parent_uri` = '%s' AND `uid` = %d",
+ dbesc($r[0]['parent_uri']),
intval(local_user())
);
@@ -434,7 +434,7 @@ function message_content(&$a) {
$select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />';
- $parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
+ $parent = '<input type="hidden" name="replyto" value="' . $message['parent_uri'] . '" />';
$tpl = get_markup_template('mail_display.tpl');
$o = replace_macros($tpl, array(
diff --git a/mod/photos.php b/mod/photos.php
index 1a8d42143..5cd95573a 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -220,14 +220,14 @@ function photos_post(&$a) {
// find and delete the corresponding item with all the comments and likes/dislikes
- $r = q("SELECT `parent-uri` FROM `item` WHERE `resource-id` IN ( $str_res ) AND `uid` = %d",
+ $r = q("SELECT `parent_uri` FROM `item` WHERE `resource-id` IN ( $str_res ) AND `uid` = %d",
intval($page_owner_uid)
);
if(count($r)) {
foreach($r as $rr) {
- q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
+ q("UPDATE `item` SET `deleted` = 1, `changed` = '%s' WHERE `parent_uri` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
- dbesc($rr['parent-uri']),
+ dbesc($rr['parent_uri']),
intval($page_owner_uid)
);
@@ -271,7 +271,7 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
if(count($i)) {
- q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
+ q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_uri` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($i[0]['uri']),
@@ -399,7 +399,7 @@ function photos_post(&$a) {
$arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri;
- $arr['parent-uri'] = $uri;
+ $arr['parent_uri'] = $uri;
$arr['type'] = 'photo';
$arr['wall'] = 1;
$arr['resource-id'] = $p[0]['resource-id'];
@@ -564,7 +564,7 @@ function photos_post(&$a) {
$arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri;
- $arr['parent-uri'] = $uri;
+ $arr['parent_uri'] = $uri;
$arr['type'] = 'activity';
$arr['wall'] = 1;
$arr['contact-id'] = $owner_record['id'];
@@ -581,8 +581,8 @@ function photos_post(&$a) {
$arr['deny_gid'] = $p[0]['deny_gid'];
$arr['visible'] = 1;
$arr['verb'] = ACTIVITY_TAG;
- $arr['object-type'] = ACTIVITY_OBJ_PERSON;
- $arr['target-type'] = ACTIVITY_OBJ_PHOTO;
+ $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
+ $arr['tgt_type'] = ACTIVITY_OBJ_PHOTO;
$arr['tag'] = $tagged[4];
$arr['inform'] = $tagged[2];
$arr['origin'] = 1;
@@ -783,7 +783,7 @@ function photos_post(&$a) {
$arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri;
- $arr['parent-uri'] = $uri;
+ $arr['parent_uri'] = $uri;
$arr['type'] = 'photo';
$arr['wall'] = 1;
$arr['resource-id'] = $photo_hash;
@@ -1225,7 +1225,7 @@ function photos_content(&$a) {
$link_item = $linked_items[0];
$r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `parent-uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+ WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`uid` = %d
$sql_extra ",
@@ -1244,7 +1244,7 @@ function photos_content(&$a) {
`contact`.`rel`, `contact`.`thumb`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `parent-uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+ WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`uid` = %d
$sql_extra
diff --git a/mod/poke.php b/mod/poke.php
index 5dbbd1727..bb062308f 100755
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -82,7 +82,7 @@ function poke_init(&$a) {
$arr['uid'] = $uid;
$arr['uri'] = $uri;
- $arr['parent-uri'] = (($parent_uri) ? $parent_uri : $uri);
+ $arr['parent_uri'] = (($parent_uri) ? $parent_uri : $uri);
$arr['type'] = 'activity';
$arr['wall'] = 1;
$arr['contact-id'] = $poster['id'];
@@ -101,7 +101,7 @@ function poke_init(&$a) {
$arr['visible'] = 1;
$arr['verb'] = $activity;
$arr['private'] = $private;
- $arr['object-type'] = ACTIVITY_OBJ_PERSON;
+ $arr['obj_type'] = ACTIVITY_OBJ_PERSON;
$arr['origin'] = 1;
$arr['body'] = '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' . ' ' . t($verbs[$verb][0]) . ' ' . '[url=' . $target['url'] . ']' . $target['name'] . '[/url]';
diff --git a/mod/profiles.php b/mod/profiles.php
index 3539a8232..2390bc03c 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -327,7 +327,7 @@ function profile_activity($changed, $value) {
return;
$arr = array();
- $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), local_user());
+ $arr['uri'] = $arr['parent_uri'] = item_new_uri($a->get_hostname(), local_user());
$arr['uid'] = local_user();
$arr['contact-id'] = $self[0]['id'];
$arr['wall'] = 1;
@@ -338,7 +338,7 @@ function profile_activity($changed, $value) {
$arr['author-link'] = $arr['owner-link'] = $self[0]['url'];
$arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
$arr['verb'] = ACTIVITY_UPDATE;
- $arr['object-type'] = ACTIVITY_OBJ_PROFILE;
+ $arr['obj_type'] = ACTIVITY_OBJ_PROFILE;
$A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
diff --git a/mod/tagger.php b/mod/tagger.php
index a5ca44f56..0a477ddcd 100644
--- a/mod/tagger.php
+++ b/mod/tagger.php
@@ -116,7 +116,7 @@ EOT;
$arr['wall'] = $item['wall'];
$arr['gravity'] = GRAVITY_COMMENT;
$arr['parent'] = $item['id'];
- $arr['parent-uri'] = $item['uri'];
+ $arr['parent_uri'] = $item['uri'];
$arr['owner-name'] = $item['author-name'];
$arr['owner-link'] = $item['author-link'];
$arr['owner-avatar'] = $item['author-avatar'];
@@ -130,9 +130,9 @@ EOT;
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink, $termlink );
$arr['verb'] = ACTIVITY_TAG;
- $arr['target-type'] = $targettype;
+ $arr['tgt_type'] = $targettype;
$arr['target'] = $target;
- $arr['object-type'] = $objtype;
+ $arr['obj_type'] = $objtype;
$arr['object'] = $obj;
$arr['private'] = $item['private'];
$arr['allow_cid'] = $item['allow_cid'];