Commit 2b0f327a authored by redmatrix's avatar redmatrix

schema changes

parent b12ce433
......@@ -628,7 +628,7 @@ function diaspora_post($importer,$xml,$msg) {
if($success['replaced']) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => $success['termtype'],
'ttype' => $success['termtype'],
'otype' => TERM_OBJ_POST,
'term' => $success['term'],
'url' => $success['url']
......@@ -658,7 +658,7 @@ function diaspora_post($importer,$xml,$msg) {
foreach($matches as $mtch) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $mtch[2],
'url' => $mtch[1]
......@@ -673,7 +673,7 @@ function diaspora_post($importer,$xml,$msg) {
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'url' => $mtch[1]
......@@ -881,7 +881,7 @@ function diaspora_reshare($importer,$xml,$msg) {
if($success['replaced']) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => $success['termtype'],
'ttype' => $success['termtype'],
'otype' => TERM_OBJ_POST,
'term' => $success['term'],
'url' => $success['url']
......@@ -895,7 +895,7 @@ function diaspora_reshare($importer,$xml,$msg) {
foreach($matches as $mtch) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $mtch[2],
'url' => $mtch[1]
......@@ -910,7 +910,7 @@ function diaspora_reshare($importer,$xml,$msg) {
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'url' => $mtch[1]
......@@ -1250,7 +1250,7 @@ function diaspora_comment($importer,$xml,$msg) {
if($success['replaced']) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => $success['termtype'],
'ttype' => $success['termtype'],
'otype' => TERM_OBJ_POST,
'term' => $success['term'],
'url' => $success['url']
......@@ -1264,7 +1264,7 @@ function diaspora_comment($importer,$xml,$msg) {
foreach($matches as $mtch) {
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $mtch[2],
'url' => $mtch[1]
......@@ -1279,7 +1279,7 @@ function diaspora_comment($importer,$xml,$msg) {
$term = ((substr($mtch[2],-1,1) === '+') ? substr($mtch[2],0,-1) : $mtch[2]);
$datarray['term'][] = array(
'uid' => $importer['channel_id'],
'type' => TERM_MENTION,
'ttype' => TERM_MENTION,
'otype' => TERM_OBJ_POST,
'term' => $term,
'url' => $mtch[1]
......
......@@ -122,7 +122,7 @@ else {
}
function dirstats_cron(&$a, $b) {
// Some hublocs are immortal and won't ever die - they all have null date for hubloc_connected and hubloc_updated
$r = q("SELECT count(distinct hubloc_host) as total FROM `hubloc` where not (hubloc_flags & %d) > 0 and not (hubloc_connected = %d and hubloc_updated = %d)",
$r = q("SELECT count(distinct hubloc_host) as total FROM `hubloc` where not (hubloc_flags & %d) > 0 and not (hubloc_connected = '%s' and hubloc_updated = '%s')",
intval(HUBLOC_FLAGS_DELETED),
dbesc(NULL_DATE),
dbesc(NULL_DATE)
......@@ -132,7 +132,7 @@ function dirstats_cron(&$a, $b) {
set_config('dirstats','hubcount',$hubcount);
}
$r = q("SELECT count(distinct hubloc_host) as total FROM `hubloc` where hubloc_network = 'zot' and not (hubloc_flags & %d) > 0 and not (hubloc_connected = %d and hubloc_updated = %d)",
$r = q("SELECT count(distinct hubloc_host) as total FROM `hubloc` where hubloc_network = 'zot' and not (hubloc_flags & %d) > 0 and not (hubloc_connected = '%s' and hubloc_updated = '%s')",
intval(HUBLOC_FLAGS_DELETED),
dbesc(NULL_DATE),
dbesc(NULL_DATE)
......
......@@ -206,9 +206,9 @@ function wppost_send(&$a,&$b) {
if(is_array($b['term']) && $b['term']) {
foreach($b['term'] as $term) {
if($term['type'] == TERM_CATEGORY)
if($term['ttype'] == TERM_CATEGORY)
$categories[] = $term['term'];
if($term['type'] == TERM_HASHTAG)
if($term['ttype'] == TERM_HASHTAG)
$tags[] = $term['term'];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment