aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--database.sql12
-rw-r--r--include/api.php8
-rw-r--r--include/conversation.php20
-rw-r--r--include/delivery.php2
-rw-r--r--include/event.php4
-rwxr-xr-xinclude/items.php118
-rw-r--r--include/message.php6
-rw-r--r--include/notifier.php4
-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
-rw-r--r--update.php14
-rw-r--r--view/theme/diabook/theme.php10
-rw-r--r--view/tpl/api_timeline_atom.tpl8
-rw-r--r--view/tpl/follow_slap.tpl2
-rw-r--r--view/tpl/tag_slap.tpl6
21 files changed, 144 insertions, 144 deletions
diff --git a/database.sql b/database.sql
index dfa039559..00b3dc122 100644
--- a/database.sql
+++ b/database.sql
@@ -459,7 +459,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`wall` tinyint(1) NOT NULL DEFAULT '0',
`gravity` tinyint(1) NOT NULL DEFAULT '0',
`parent` int(10) unsigned NOT NULL DEFAULT '0',
- `parent-uri` char(255) CHARACTER SET ascii NOT NULL,
+ `parent_uri` char(255) CHARACTER SET ascii NOT NULL,
`thr-parent` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
@@ -477,9 +477,9 @@ CREATE TABLE IF NOT EXISTS `item` (
`app` char(255) NOT NULL,
`lang` char(64) NOT NULL,
`verb` char(255) NOT NULL,
- `object-type` char(255) NOT NULL,
+ `obj_type` char(255) NOT NULL,
`object` text NOT NULL,
- `target-type` char(255) NOT NULL,
+ `tgt_type` char(255) NOT NULL,
`target` text NOT NULL,
`postopts` text NOT NULL,
`plink` char(255) NOT NULL,
@@ -510,7 +510,7 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `contact-id` (`contact-id`),
KEY `type` (`type`),
KEY `parent` (`parent`),
- KEY `parent-uri` (`parent-uri`),
+ KEY `parent_uri` (`parent_uri`),
KEY `created` (`created`),
KEY `edited` (`edited`),
KEY `visible` (`visible`),
@@ -571,7 +571,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`replied` tinyint(1) NOT NULL,
`unknown` tinyint(1) NOT NULL DEFAULT '0',
`uri` char(255) NOT NULL,
- `parent-uri` char(255) NOT NULL,
+ `parent_uri` char(255) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `reply` (`reply`),
@@ -579,7 +579,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
KEY `guid` (`guid`),
KEY `seen` (`seen`),
KEY `uri` (`uri`),
- KEY `parent-uri` (`parent-uri`),
+ KEY `parent_uri` (`parent_uri`),
KEY `created` (`created`),
KEY `convid` (`convid`),
KEY `unknown` (`unknown`),
diff --git a/include/api.php b/include/api.php
index 456d984de..296fba1a7 100644
--- a/include/api.php
+++ b/include/api.php
@@ -1357,7 +1357,7 @@
'contributors' => '',
'annotations' => '',
'entities' => '',
- 'objecttype' => (($item['object-type']) ? $item['object-type'] : ACTIVITY_OBJ_NOTE),
+ 'objecttype' => (($item['obj_type']) ? $item['obj_type'] : ACTIVITY_OBJ_NOTE),
'verb' => (($item['verb']) ? $item['verb'] : ACTIVITY_POST),
'self' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
'edit' => $a->get_baseurl()."/api/statuses/show/".$item['id'].".".$type,
@@ -1573,10 +1573,10 @@
$replyto = '';
$sub = '';
if (x($_REQUEST,'replyto')) {
- $r = q('SELECT `parent-uri`, `title` FROM `mail` WHERE `uid`=%d AND `id`=%d',
+ $r = q('SELECT `parent_uri`, `title` FROM `mail` WHERE `uid`=%d AND `id`=%d',
intval(local_user()),
intval($_REQUEST['replyto']));
- $replyto = $r[0]['parent-uri'];
+ $replyto = $r[0]['parent_uri'];
$sub = $r[0]['title'];
}
else {
@@ -1628,7 +1628,7 @@
$sql_extra = "`from-url`='".dbesc( $profile_url )."'";
}
elseif ($box=="conversation") {
- $sql_extra = "`parent-uri`='".dbesc( $_GET["uri"] ) ."'";
+ $sql_extra = "`parent_uri`='".dbesc( $_GET["uri"] ) ."'";
}
elseif ($box=="all") {
$sql_extra = "true";
diff --git a/include/conversation.php b/include/conversation.php
index c41d00def..0d770ef40 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -93,7 +93,7 @@ function localize_item(&$item){
$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
- dbesc($item['parent-uri']));
+ dbesc($item['parent_uri']));
if(count($r)==0) return;
$obj=$r[0];
@@ -102,7 +102,7 @@ function localize_item(&$item){
switch($obj['verb']){
case ACTIVITY_POST:
- switch ($obj['object-type']){
+ switch ($obj['obj_type']){
case ACTIVITY_OBJ_EVENT:
$post_type = t('event');
break;
@@ -135,7 +135,7 @@ function localize_item(&$item){
}
if ($item['verb']=== ACTIVITY_FRIEND){
- if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
+ if ($item['obj_type']=="" || $item['obj_type']!== ACTIVITY_OBJ_PERSON) return;
$Aname = $item['author-name'];
$Alink = $item['author-link'];
@@ -167,7 +167,7 @@ function localize_item(&$item){
$verb = urldecode(substr($item['verb'],strpos($item['verb'],'#')+1));
if(! $verb)
return;
- if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
+ if ($item['obj_type']=="" || $item['obj_type']!== ACTIVITY_OBJ_PERSON) return;
$Aname = $item['author-name'];
$Alink = $item['author-link'];
@@ -209,7 +209,7 @@ function localize_item(&$item){
if ($item['verb']===ACTIVITY_TAG){
$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
- dbesc($item['parent-uri']));
+ dbesc($item['parent_uri']));
if(count($r)==0) return;
$obj=$r[0];
@@ -218,7 +218,7 @@ function localize_item(&$item){
switch($obj['verb']){
case ACTIVITY_POST:
- switch ($obj['object-type']){
+ switch ($obj['obj_type']){
case ACTIVITY_OBJ_EVENT:
$post_type = t('event');
break;
@@ -245,7 +245,7 @@ function localize_item(&$item){
}
if ($item['verb']=== ACTIVITY_FAVORITE){
- if ($item['object-type']== "")
+ if ($item['obj_type']== "")
return;
$Aname = $item['author-name'];
@@ -1402,7 +1402,7 @@ function like_puller($a,$item,&$arr,$mode) {
$url = zrl($url);
if(! $item['thr-parent'])
- $item['thr-parent'] = $item['parent-uri'];
+ $item['thr-parent'] = $item['parent_uri'];
if(! ((isset($arr[$item['thr-parent'] . '-l'])) && (is_array($arr[$item['thr-parent'] . '-l']))))
$arr[$item['thr-parent'] . '-l'] = array();
@@ -1570,10 +1570,10 @@ function get_item_children($arr, $parent) {
foreach($arr as $item) {
if($item['id'] != $item['parent']) {
if(get_config('system','thread_allow')) {
- // Fallback to parent-uri if thr-parent is not set
+ // Fallback to parent_uri if thr-parent is not set
$thr_parent = $item['thr-parent'];
if($thr_parent == '')
- $thr_parent = $item['parent-uri'];
+ $thr_parent = $item['parent_uri'];
if($thr_parent == $parent['uri']) {
$item['children'] = get_item_children($arr, $item);
diff --git a/include/delivery.php b/include/delivery.php
index 0d84b4626..f6ebe9ded 100644
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -148,7 +148,7 @@ function delivery_run($argv, $argc){
$item['deleted'] = 1;
}
- if((count($items) == 1) && ($items[0]['uri'] === $items[0]['parent-uri'])) {
+ if((count($items) == 1) && ($items[0]['uri'] === $items[0]['parent_uri'])) {
logger('delivery: top level post');
$top_level = true;
}
diff --git a/include/event.php b/include/event.php
index 8aef0a263..ea3631331 100644
--- a/include/event.php
+++ b/include/event.php
@@ -352,7 +352,7 @@ function event_store($arr) {
$item_arr['uid'] = $arr['uid'];
$item_arr['contact-id'] = $arr['cid'];
$item_arr['uri'] = $arr['uri'];
- $item_arr['parent-uri'] = $arr['uri'];
+ $item_arr['parent_uri'] = $arr['uri'];
$item_arr['type'] = 'activity';
$item_arr['wall'] = (($arr['cid']) ? 0 : 1);
$item_arr['contact-id'] = $contact['id'];
@@ -371,7 +371,7 @@ function event_store($arr) {
$item_arr['last-child'] = 1;
$item_arr['visible'] = 1;
$item_arr['verb'] = ACTIVITY_POST;
- $item_arr['object-type'] = ACTIVITY_OBJ_EVENT;
+ $item_arr['obj_type'] = ACTIVITY_OBJ_EVENT;
$item_arr['origin'] = ((intval($arr['cid']) == 0) ? 1 : 0);
$item_arr['body'] = format_event_bbcode($event);
diff --git a/include/items.php b/include/items.php
index 928cf3160..48f063ab7 100755
--- a/include/items.php
+++ b/include/items.php
@@ -224,7 +224,7 @@ function construct_activity_object($item) {
if(! $r)
return '';
if($r->type)
- $o .= '<as:object-type>' . xmlify($r->type) . '</as:object-type>' . "\r\n";
+ $o .= '<as:obj_type>' . xmlify($r->type) . '</as:obj_type>' . "\r\n";
if($r->id)
$o .= '<id>' . xmlify($r->id) . '</id>' . "\r\n";
if($r->title)
@@ -259,7 +259,7 @@ function construct_activity_target($item) {
if(! $r)
return '';
if($r->type)
- $o .= '<as:object-type>' . xmlify($r->type) . '</as:object-type>' . "\r\n";
+ $o .= '<as:obj_type>' . xmlify($r->type) . '</as:obj_type>' . "\r\n";
if($r->id)
$o .= '<id>' . xmlify($r->id) . '</id>' . "\r\n";
if($r->title)
@@ -420,13 +420,13 @@ function get_item_elements($j) {
$arr['title'] = (($j->title) ? htmlentities($j->title, ENT_COMPAT,'UTF-8') : '');
$arr['app'] = (($j->app) ? htmlentities($j->app, ENT_COMPAT,'UTF-8') : '');
$arr['uri'] = (($j->uri) ? htmlentities($j->uri, ENT_COMPAT,'UTF-8') : '');
- $arr['puri'] = (($j->puri) ? htmlentities($j->puri, ENT_COMPAT,'UTF-8') : '');
+ $arr['parent_uri'] = (($j->parent_uri) ? htmlentities($j->parent_uri, ENT_COMPAT,'UTF-8') : '');
$arr['plink'] = (($j->plink) ? htmlentities($j->plink, ENT_COMPAT,'UTF-8') : '');
$arr['location'] = (($j->location) ? htmlentities($j->location, ENT_COMPAT,'UTF-8') : '');
$arr['coord'] = (($j->coord) ? htmlentities($j->coord, ENT_COMPAT,'UTF-8') : '');
$arr['verb'] = (($j->verb) ? htmlentities($j->verb, ENT_COMPAT,'UTF-8') : '');
- $arr['objtype'] = (($j->objtype) ? htmlentities($j->objtype, ENT_COMPAT,'UTF-8') : '');
- $arr['tgttype'] = (($j->tgttype) ? htmlentities($j->tgttype, ENT_COMPAT,'UTF-8') : '');
+ $arr['obj_type'] = (($j->objtype) ? htmlentities($j->objtype, ENT_COMPAT,'UTF-8') : '');
+ $arr['tgt_type'] = (($j->tgttype) ? htmlentities($j->tgttype, ENT_COMPAT,'UTF-8') : '');
$arr['obj'] = $j->obj;
$arr['tgt'] = $j->tgt;
@@ -503,7 +503,7 @@ function get_atom_elements($feed,$item) {
$rawactor = $item->get_item_tags(NAMESPACE_ACTIVITY, 'actor');
- if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['object-type'][0]['data'],ACTIVITY_OBJ_PERSON)) {
+ if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['obj_type'][0]['data'],ACTIVITY_OBJ_PERSON)) {
$base = $rawactor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link'];
if($base && count($base)) {
foreach($base as $link) {
@@ -535,7 +535,7 @@ function get_atom_elements($feed,$item) {
$rawactor = $feed->get_feed_tags(NAMESPACE_ACTIVITY, 'subject');
- if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['object-type'][0]['data'],ACTIVITY_OBJ_PERSON)) {
+ if($rawactor && activity_match($rawactor[0]['child'][NAMESPACE_ACTIVITY]['obj_type'][0]['data'],ACTIVITY_OBJ_PERSON)) {
$base = $rawactor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link'];
if($base && count($base)) {
@@ -751,9 +751,9 @@ function get_atom_elements($feed,$item) {
if($rawobj) {
$res['object'] = '<object>' . "\n";
$child = $rawobj[0]['child'];
- if($child[NAMESPACE_ACTIVITY]['object-type'][0]['data']) {
- $res['object-type'] = $child[NAMESPACE_ACTIVITY]['object-type'][0]['data'];
- $res['object'] .= '<type>' . $child[NAMESPACE_ACTIVITY]['object-type'][0]['data'] . '</type>' . "\n";
+ if($child[NAMESPACE_ACTIVITY]['obj_type'][0]['data']) {
+ $res['obj_type'] = $child[NAMESPACE_ACTIVITY]['obj_type'][0]['data'];
+ $res['object'] .= '<type>' . $child[NAMESPACE_ACTIVITY]['obj_type'][0]['data'] . '</type>' . "\n";
}
if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'id') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'])
$res['object'] .= '<id>' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'] . '</id>' . "\n";
@@ -790,8 +790,8 @@ function get_atom_elements($feed,$item) {
if($rawobj) {
$res['target'] = '<target>' . "\n";
$child = $rawobj[0]['child'];
- if($child[NAMESPACE_ACTIVITY]['object-type'][0]['data']) {
- $res['target'] .= '<type>' . $child[NAMESPACE_ACTIVITY]['object-type'][0]['data'] . '</type>' . "\n";
+ if($child[NAMESPACE_ACTIVITY]['obj_type'][0]['data']) {
+ $res['target'] .= '<type>' . $child[NAMESPACE_ACTIVITY]['obj_type'][0]['data'] . '</type>' . "\n";
}
if(x($child[SIMPLEPIE_NAMESPACE_ATOM_10], 'id') && $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'])
$res['target'] .= '<id>' . $child[SIMPLEPIE_NAMESPACE_ATOM_10]['id'][0]['data'] . '</id>' . "\n";
@@ -893,7 +893,7 @@ function item_store($arr,$force_parent = false) {
if(x($arr, 'gravity'))
$arr['gravity'] = intval($arr['gravity']);
- elseif($arr['parent-uri'] === $arr['uri'])
+ elseif($arr['parent_uri'] === $arr['uri'])
$arr['gravity'] = 0;
elseif(activity_match($arr['verb'],ACTIVITY_POST))
$arr['gravity'] = 6;
@@ -942,11 +942,11 @@ function item_store($arr,$force_parent = false) {
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
$arr['visible'] = ((x($arr,'visible') !== false) ? intval($arr['visible']) : 1 );
$arr['deleted'] = 0;
- $arr['parent-uri'] = ((x($arr,'parent-uri')) ? notags(trim($arr['parent-uri'])) : '');
+ $arr['parent_uri'] = ((x($arr,'parent_uri')) ? notags(trim($arr['parent_uri'])) : '');
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : '');
- $arr['object-type'] = ((x($arr,'object-type')) ? notags(trim($arr['object-type'])) : '');
+ $arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
$arr['object'] = ((x($arr,'object')) ? trim($arr['object']) : '');
- $arr['target-type'] = ((x($arr,'target-type')) ? notags(trim($arr['target-type'])) : '');
+ $arr['tgt_type'] = ((x($arr,'tgt_type')) ? notags(trim($arr['tgt_type'])) : '');
$arr['target'] = ((x($arr,'target')) ? trim($arr['target']) : '');
$arr['plink'] = ((x($arr,'plink')) ? notags(trim($arr['plink'])) : '');
$arr['allow_cid'] = ((x($arr,'allow_cid')) ? trim($arr['allow_cid']) : '');
@@ -960,8 +960,8 @@ function item_store($arr,$force_parent = false) {
$arr['origin'] = ((x($arr,'origin')) ? intval($arr['origin']) : 0 );
- $arr['thr-parent'] = $arr['parent-uri'];
- if($arr['parent-uri'] === $arr['uri']) {
+ $arr['thr-parent'] = $arr['parent_uri'];
+ if($arr['parent_uri'] === $arr['uri']) {
$parent_id = 0;
$parent_deleted = 0;
$allow_cid = $arr['allow_cid'];
@@ -975,7 +975,7 @@ function item_store($arr,$force_parent = false) {
// and anything else we need to inherit
$r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d ORDER BY `id` ASC LIMIT 1",
- dbesc($arr['parent-uri']),
+ dbesc($arr['parent_uri']),
intval($arr['uid'])
);
@@ -985,12 +985,12 @@ function item_store($arr,$force_parent = false) {
// even though we don't support it now, preserve the info
// and re-attach to the conversation parent.
- if($r[0]['uri'] != $r[0]['parent-uri']) {
- $arr['parent-uri'] = $r[0]['parent-uri'];
- $z = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `parent-uri` = '%s' AND `uid` = %d
+ if($r[0]['uri'] != $r[0]['parent_uri']) {
+ $arr['parent_uri'] = $r[0]['parent_uri'];
+ $z = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `parent_uri` = '%s' AND `uid` = %d
ORDER BY `id` ASC LIMIT 1",
- dbesc($r[0]['parent-uri']),
- dbesc($r[0]['parent-uri']),
+ dbesc($r[0]['parent_uri']),
+ dbesc($r[0]['parent_uri']),
intval($arr['uid'])
);
if($z && count($z))
@@ -1027,7 +1027,7 @@ function item_store($arr,$force_parent = false) {
if($force_parent) {
logger('item_store: $force_parent=true, reply converted to top-level post.');
$parent_id = 0;
- $arr['parent-uri'] = $arr['uri'];
+ $arr['parent_uri'] = $arr['uri'];
$arr['gravity'] = 0;
}
else {
@@ -1097,7 +1097,7 @@ function item_store($arr,$force_parent = false) {
);
}
- if((! $parent_id) || ($arr['parent-uri'] === $arr['uri']))
+ if((! $parent_id) || ($arr['parent_uri'] === $arr['uri']))
$parent_id = $current_post;
if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid))
@@ -1737,7 +1737,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if(! $item['deleted'])
logger('consume_feed: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG);
- if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
+ if(($item['verb'] === ACTIVITY_TAG) && ($item['obj_type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($item['object'],false);
$xt = parse_xml_string($item['target'],false);
if($xt->type === ACTIVITY_OBJ_NOTE) {
@@ -1772,10 +1772,10 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
}
}
- if($item['uri'] == $item['parent-uri']) {
+ if($item['uri'] == $item['parent_uri']) {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
`body` = '', `title` = ''
- WHERE `parent-uri` = '%s' AND `uid` = %d",
+ WHERE `parent_uri` = '%s' AND `uid` = %d",
dbesc($when),
dbesc(datetime_convert()),
dbesc($item['uri']),
@@ -1870,14 +1870,14 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
}
- $datarray['parent-uri'] = $parent_uri;
+ $datarray['parent_uri'] = $parent_uri;
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
if((activity_match($datarray['verb'],ACTIVITY_LIKE)) || (activity_match($datarray['verb'],ACTIVITY_DISLIKE))) {
$datarray['type'] = 'activity';
$datarray['gravity'] = GRAVITY_LIKE;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent_uri` = '%s' OR `thr-parent` = '%s') limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
dbesc($datarray['verb']),
@@ -1888,7 +1888,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
}
- if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
+ if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['obj_type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($datarray['object'],false);
$xt = parse_xml_string($datarray['target'],false);
@@ -1941,7 +1941,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
// special handling for events
- if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) {
+ if((x($datarray,'obj_type')) && ($datarray['obj_type'] === ACTIVITY_OBJ_EVENT)) {
$ev = bbtoevent($datarray['body']);
if(x($ev,'desc') && x($ev,'start')) {
$ev['uid'] = $importer['uid'];
@@ -2020,7 +2020,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$datarray['wall'] = 1;
}
- $datarray['parent-uri'] = $item_id;
+ $datarray['parent_uri'] = $item_id;
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
@@ -2322,7 +2322,7 @@ function local_delivery($importer,$data) {
$msg['seen'] = 0;
$msg['replied'] = 0;
$msg['uri'] = notags(unxmlify($base['id'][0]['data']));
- $msg['parent-uri'] = notags(unxmlify($base['in-reply-to'][0]['data']));
+ $msg['parent_uri'] = notags(unxmlify($base['in-reply-to'][0]['data']));
$msg['created'] = datetime_convert(notags(unxmlify('UTC','UTC',$base['sentdate'][0]['data'])));
dbesc_array($msg);
@@ -2396,7 +2396,7 @@ function local_delivery($importer,$data) {
intval($importer['importer_uid'])
);
if(count($r)) {
- $parent_uri = $r[0]['parent-uri'];
+ $parent_uri = $r[0]['parent_uri'];
if($r[0]['id'] != $r[0]['parent'])
$is_reply = true;
}
@@ -2420,7 +2420,7 @@ function local_delivery($importer,$data) {
$r = q("select `item`.`id`, `item`.`uri`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
`contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
+ WHERE `item`.`uri` = '%s' AND (`item`.`parent_uri` = '%s' or `item`.`thr-parent` = '%s')
AND `item`.`uid` = %d
$sql_extra
LIMIT 1",
@@ -2464,7 +2464,7 @@ function local_delivery($importer,$data) {
logger('local_delivery: deleting item ' . $item['id'] . ' uri=' . $item['uri'], LOGGER_DEBUG);
- if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
+ if(($item['verb'] === ACTIVITY_TAG) && ($item['obj_type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($item['object'],false);
$xt = parse_xml_string($item['target'],false);
@@ -2501,10 +2501,10 @@ function local_delivery($importer,$data) {
}
}
- if($item['uri'] == $item['parent-uri']) {
+ if($item['uri'] == $item['parent_uri']) {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
`body` = '', `title` = ''
- WHERE `parent-uri` = '%s' AND `uid` = %d",
+ WHERE `parent_uri` = '%s' AND `uid` = %d",
dbesc($when),
dbesc(datetime_convert()),
dbesc($item['uri']),
@@ -2562,7 +2562,7 @@ function local_delivery($importer,$data) {
$r = q("select `item`.`id`, `item`.`uri`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
`contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
+ WHERE `item`.`uri` = '%s' AND (`item`.`parent_uri` = '%s' or `item`.`thr-parent` = '%s')
AND `item`.`uid` = %d
$sql_extra
LIMIT 1",
@@ -2642,7 +2642,7 @@ function local_delivery($importer,$data) {
$datarray['type'] = 'remote-comment';
$datarray['wall'] = 1;
- $datarray['parent-uri'] = $parent_uri;
+ $datarray['parent_uri'] = $parent_uri;
$datarray['uid'] = $importer['importer_uid'];
$datarray['owner-name'] = $own[0]['name'];
$datarray['owner-link'] = $own[0]['url'];
@@ -2655,19 +2655,19 @@ function local_delivery($importer,$data) {
$datarray['gravity'] = GRAVITY_LIKE;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`thr-parent` = '%s' or `parent-uri` = '%s') and deleted = 0 limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`thr-parent` = '%s' or `parent_uri` = '%s') and deleted = 0 limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
dbesc($datarray['verb']),
- dbesc($datarray['parent-uri']),
- dbesc($datarray['parent-uri'])
+ dbesc($datarray['parent_uri']),
+ dbesc($datarray['parent_uri'])
);
if($r && count($r))
continue;
}
- if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
+ if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['obj_type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($datarray['object'],false);
$xt = parse_xml_string($datarray['target'],false);
@@ -2717,13 +2717,13 @@ function local_delivery($importer,$data) {
$parent = 0;
if($posted_id) {
- $r = q("SELECT `parent`, `parent-uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ $r = q("SELECT `parent`, `parent_uri` FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($posted_id),
intval($importer['importer_uid'])
);
if(count($r)) {
$parent = $r[0]['parent'];
- $parent_uri = $r[0]['parent-uri'];
+ $parent_uri = $r[0]['parent_uri'];
}
if(! $is_like) {
@@ -2807,14 +2807,14 @@ function local_delivery($importer,$data) {
continue;
}
- $datarray['parent-uri'] = $parent_uri;
+ $datarray['parent_uri'] = $parent_uri;
$datarray['uid'] = $importer['importer_uid'];
$datarray['contact-id'] = $importer['id'];
if(($datarray['verb'] == ACTIVITY_LIKE) || ($datarray['verb'] == ACTIVITY_DISLIKE)) {
$datarray['type'] = 'activity';
$datarray['gravity'] = GRAVITY_LIKE;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent_uri` = '%s' OR `thr-parent` = '%s') limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
dbesc($datarray['verb']),
@@ -2826,7 +2826,7 @@ function local_delivery($importer,$data) {
}
- if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) {
+ if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['obj_type'] === ACTIVITY_OBJ_TAGTERM)) {
$xo = parse_xml_string($datarray['object'],false);
$xt = parse_xml_string($datarray['target'],false);
@@ -2857,7 +2857,7 @@ function local_delivery($importer,$data) {
if(!x($datarray['type']) || $datarray['type'] != 'activity') {
- $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0",
+ $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent_uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0",
dbesc($parent_uri),
intval($importer['importer_uid'])
);
@@ -2918,7 +2918,7 @@ function local_delivery($importer,$data) {
$item_id = $item->get_id();
$datarray = get_atom_elements($feed,$item);
- if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) {
+ if((x($datarray,'obj_type')) && ($datarray['obj_type'] === ACTIVITY_OBJ_EVENT)) {
$ev = bbtoevent($datarray['body']);
if(x($ev,'desc') && x($ev,'start')) {
$ev['cid'] = $importer['id'];
@@ -2970,7 +2970,7 @@ function local_delivery($importer,$data) {
if($importer['remote_self'])
$datarray['wall'] = 1;
- $datarray['parent-uri'] = $item_id;
+ $datarray['parent_uri'] = $item_id;
$datarray['uid'] = $importer['importer_uid'];
$datarray['contact-id'] = $importer['id'];
@@ -3250,8 +3250,8 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
if(strlen($item['owner-name']))
$o .= atom_author('dfrn:owner',$item['owner-name'],$item['owner-link'],80,80,$item['owner-avatar']);
- if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
- $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
+ if(($item['parent'] != $item['id']) || ($item['parent_uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
+ $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent_uri']);
$o .= '<thr:in-reply-to ref="' . xmlify($parent_item) . '" type="text/html" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['parent']) . '" />' . "\r\n";
}
@@ -3659,12 +3659,12 @@ function drop_item($id,$interactive = true) {
// If it's the parent of a comment thread, kill all the kids
- if($item['uri'] == $item['parent-uri']) {
+ if($item['uri'] == $item['parent_uri']) {
$r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = ''
- WHERE `parent-uri` = '%s' AND `uid` = %d ",
+ WHERE `parent_uri` = '%s' AND `uid` = %d ",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
- dbesc($item['parent-uri']),
+ dbesc($item['parent_uri']),
intval($item['uid'])
);
// ignore the result
diff --git a/include/message.php b/include/message.php
index 377d7c715..0f31b116a 100644
--- a/include/message.php
+++ b/include/message.php
@@ -36,7 +36,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
if(strlen($replyto)) {
$reply = true;
- $r = q("select convid from mail where uid = %d and ( uri = '%s' or `parent-uri` = '%s' ) limit 1",
+ $r = q("select convid from mail where uid = %d and ( uri = '%s' or `parent_uri` = '%s' ) limit 1",
intval(local_user()),
dbesc($replyto),
dbesc($replyto)
@@ -88,7 +88,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
$r = q("INSERT INTO `mail` ( `uid`, `guid`, `convid`, `from-name`, `from-photo`, `from-url`,
- `contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent-uri`, `created`)
+ `contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent_uri`, `created`)
VALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', '%s', '%s' )",
intval(local_user()),
dbesc(get_guid()),
@@ -217,7 +217,7 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
}
$r = q("INSERT INTO `mail` ( `uid`, `guid`, `convid`, `from-name`, `from-photo`, `from-url`,
- `contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent-uri`, `created`, `unknown`)
+ `contact-id`, `title`, `body`, `seen`, `reply`, `replied`, `uri`, `parent_uri`, `created`, `unknown`)
VALUES ( %d, '%s', %d, '%s', '%s', '%s', %d, '%s', '%s', %d, %d, %d, '%s', '%s', '%s', %d )",
intval($recipient['uid']),
dbesc(get_guid()),
diff --git a/include/notifier.php b/include/notifier.php
index e6523f147..27f178fe0 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -170,7 +170,7 @@ function notifier_run($argv, $argc){
$item['deleted'] = 1;
}
- if((count($items) == 1) && ($items[0]['id'] === $target_item['id']) && ($items[0]['uri'] === $items[0]['parent-uri'])) {
+ if((count($items) == 1) && ($items[0]['id'] === $target_item['id']) && ($items[0]['uri'] === $items[0]['parent_uri'])) {
logger('notifier: top level post');
$top_level = true;
}
@@ -365,7 +365,7 @@ function notifier_run($argv, $argc){
'$subject' => xmlify($item['title']),
'$created' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
'$content' => xmlify($body),
- '$parent_id' => xmlify($item['parent-uri'])
+ '$parent_id' => xmlify($item['parent_uri'])
));
}
elseif($fsuggest) {
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'];
diff --git a/update.php b/update.php
index 19e6cf3bd..756bc7a51 100644
--- a/update.php
+++ b/update.php
@@ -42,8 +42,8 @@ function update_1000() {
q("ALTER TABLE `item` DROP `like`, DROP `dislike` ");
q("ALTER TABLE `item` ADD `verb` CHAR( 255 ) NOT NULL AFTER `body` ,
- ADD `object-type` CHAR( 255 ) NOT NULL AFTER `verb` ,
- ADD `object` TEXT NOT NULL AFTER `object-type` ");
+ ADD `obj_type` CHAR( 255 ) NOT NULL AFTER `verb` ,
+ ADD `object` TEXT NOT NULL AFTER `obj_type` ");
q("ALTER TABLE `intro` ADD `duplex` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `knowyou` ");
q("ALTER TABLE `contact` ADD `duplex` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `rel` ");
@@ -136,8 +136,8 @@ function update_1012() {
}
function update_1013() {
- q("ALTER TABLE `item` ADD `target-type` CHAR( 255 ) NOT NULL
- AFTER `object` , ADD `target` TEXT NOT NULL AFTER `target-type`");
+ q("ALTER TABLE `item` ADD `tgt_type` CHAR( 255 ) NOT NULL
+ AFTER `object` , ADD `target` TEXT NOT NULL AFTER `tgt_type`");
}
function update_1014() {
@@ -221,7 +221,7 @@ function update_1019() {
function update_1020() {
q("ALTER TABLE `profile` DROP `showwith`");
- q("ALTER TABLE `item` ADD `thr-parent` CHAR( 255 ) NOT NULL AFTER `parent-uri` ");
+ q("ALTER TABLE `item` ADD `thr-parent` CHAR( 255 ) NOT NULL AFTER `parent_uri` ");
}
function update_1021() {
@@ -479,7 +479,7 @@ function update_1052() {
function update_1053() {
- q("ALTER TABLE `item` ADD `extid` CHAR( 255 ) NOT NULL AFTER `parent-uri` , ADD INDEX ( `extid` ) ");
+ q("ALTER TABLE `item` ADD `extid` CHAR( 255 ) NOT NULL AFTER `parent_uri` , ADD INDEX ( `extid` ) ");
}
function update_1054() {
@@ -940,7 +940,7 @@ function update_1109() {
function update_1110() {
q("ALTER TABLE `mail` ADD `reply` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `seen`,
ADD INDEX ( `reply` ), ADD INDEX ( `uid` ), ADD INDEX ( `guid` ), ADD INDEX ( `seen` ),
- ADD INDEX ( `uri` ), ADD INDEX ( `parent-uri`), ADD INDEX ( `created` ), ADD INDEX ( `convid` ) ");
+ ADD INDEX ( `uri` ), ADD INDEX ( `parent_uri`), ADD INDEX ( `created` ), ADD INDEX ( `convid` ) ");
}
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 53048df6c..2c8290344 100644
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -540,9 +540,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$aside['$like_title'] = t('Last likes');
$aside['$like_items'] = array();
$r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM
- (SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link`
- FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent-uri` ORDER BY `created` DESC) AS T1
- INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri`
+ (SELECT `parent_uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link`
+ FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent_uri` ORDER BY `created` DESC) AS T1
+ INNER JOIN `item` ON `item`.`uri`=`T1`.`parent_uri`
WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%'
GROUP BY `uri`
ORDER BY `T1`.`created` DESC
@@ -554,10 +554,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$author = '<a href="' . $rr['liker-link'] . '">' . $rr['liker'] . '</a>';
$objauthor = '<a href="' . $rr['author-link'] . '">' . $rr['author-name'] . '</a>';
- //var_dump($rr['verb'],$rr['object-type']); killme();
+ //var_dump($rr['verb'],$rr['obj_type']); killme();
switch($rr['verb']){
case 'http://activitystrea.ms/schema/1.0/post':
- switch ($rr['object-type']){
+ switch ($rr['obj_type']){
case 'http://activitystrea.ms/schema/1.0/event':
$post_type = t('event');
break;
diff --git a/view/tpl/api_timeline_atom.tpl b/view/tpl/api_timeline_atom.tpl
index fb4f51f59..9039220e7 100644
--- a/view/tpl/api_timeline_atom.tpl
+++ b/view/tpl/api_timeline_atom.tpl
@@ -10,7 +10,7 @@
<author>
- <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <activity:obj_type>http://activitystrea.ms/schema/1.0/person</activity:obj_type>
<uri>$user.url</uri>
<name>$user.name</name>
<link rel="alternate" type="text/html" href="$user.url"/>
@@ -31,7 +31,7 @@
<!--Deprecation warning: activity:subject is present only for backward compatibility. It will be removed in the next version of StatusNet.-->
<activity:subject>
- <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <activity:obj_type>http://activitystrea.ms/schema/1.0/person</activity:obj_type>
<id>$user.contact_url</id>
<title>$user.name</title>
<link rel="alternate" type="text/html" href="$user.url"/>
@@ -52,7 +52,7 @@
{{ for $statuses as $status }}
<entry>
- <activity:object-type>$status.objecttype</activity:object-type>
+ <activity:obj_type>$status.objecttype</activity:obj_type>
<id>$status.message_id</id>
<title>$status.text</title>
<content type="html">$status.statusnet_html</content>
@@ -67,7 +67,7 @@
</statusnet:notice_info>
<author>
- <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <activity:obj_type>http://activitystrea.ms/schema/1.0/person</activity:obj_type>
<uri>$status.user.url</uri>
<name>$status.user.name</name>
<link rel="alternate" type="text/html" href="$status.user.url"/>
diff --git a/view/tpl/follow_slap.tpl b/view/tpl/follow_slap.tpl
index 0d0889f7d..1b1443bee 100644
--- a/view/tpl/follow_slap.tpl
+++ b/view/tpl/follow_slap.tpl
@@ -12,7 +12,7 @@
<content type="$type" >$content</content>
<as:actor>
- <as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>
+ <as:obj_type>http://activitystrea.ms/schema/1.0/person</as:obj_type>
<id>$profile_page</id>
<title></title>
<link rel="avatar" type="image/jpeg" media:width="175" media:height="175" href="$photo"/>
diff --git a/view/tpl/tag_slap.tpl b/view/tpl/tag_slap.tpl
index 6449df496..231a13f10 100644
--- a/view/tpl/tag_slap.tpl
+++ b/view/tpl/tag_slap.tpl
@@ -12,7 +12,7 @@
<content type="$type" >$content</content>
<link rel="mentioned" href="$accturi" />
<as:actor>
- <as:object-type>http://activitystrea.ms/schema/1.0/person</as:object-type>
+ <as:obj_type>http://activitystrea.ms/schema/1.0/person</as:obj_type>
<id>$profile_page</id>
<title></title>
<link rel="avatar" type="image/jpeg" media:width="175" media:height="175" href="$photo"/>
@@ -22,9 +22,9 @@
</as:actor>
<as:verb>$verb</as:verb>
<as:object>
- <as:object-type></as:object-type>
+ <as:obj_type></as:obj_type>
</as:object>
<as:target>
- <as:object-type></as:object-type>
+ <as:obj_type></as:obj_type>
</as:target>
</entry>