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 .= '' . xmlify($r->type) . '' . "\r\n";
+ $o .= '' . xmlify($r->type) . '' . "\r\n";
if($r->id)
$o .= '' . xmlify($r->id) . '' . "\r\n";
if($r->title)
@@ -259,7 +259,7 @@ function construct_activity_target($item) {
if(! $r)
return '';
if($r->type)
- $o .= '' . xmlify($r->type) . '' . "\r\n";
+ $o .= '' . xmlify($r->type) . '' . "\r\n";
if($r->id)
$o .= '' . xmlify($r->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'] = '