aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/importdoc.php22
-rw-r--r--include/taxonomy.php10
2 files changed, 21 insertions, 11 deletions
diff --git a/include/importdoc.php b/include/importdoc.php
index 9cce35c50..10f868697 100755
--- a/include/importdoc.php
+++ b/include/importdoc.php
@@ -1,17 +1,30 @@
<?php
+
+
require_once('include/cli_startup.php');
-cli_startup();
-require_once('mod/help.php');
+function importdoc_run($argv, $argc){
+
+ cli_startup();
+
+ require_once('mod/help.php');
+
+
+ update_docs_dir('doc/*');
+
+}
+if (array_search(__file__,get_included_files())===0){
+ importdoc_run($argv,$argc);
+ killme();
+}
function update_docs_dir($s) {
$f = basename($s);
$d = dirname($s);
if($s === 'doc/html')
return;
-
$files = glob("$d/$f");
if($files) {
foreach($files as $fi) {
@@ -25,7 +38,4 @@ function update_docs_dir($s) {
}
}
-update_docs_dir('doc/*');
-
-
diff --git a/include/taxonomy.php b/include/taxonomy.php
index b57cfc5c4..a82cf94f7 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -341,7 +341,7 @@ function get_things($profile_hash,$uid) {
$sql_extra = (($profile_hash) ? " and obj_page = '" . $profile_hash . "' " : '');
- $r = q("select * from obj left join term on obj_obj = term_hash where term_hash != '' and uid = %d and obj_type = %d $sql_extra order by obj_verb, term",
+ $r = q("select * from obj where obj_channel = %d and obj_type = %d $sql_extra order by obj_verb, obj_term",
intval($uid),
intval(TERM_OBJ_THING)
);
@@ -357,8 +357,8 @@ function get_things($profile_hash,$uid) {
foreach($r as $rr) {
$rr['profile_name'] = '';
- if(! in_array($rr['term_hash'],$profile_hashes))
- $profile_hashes[] = $rr['term_hash'];
+ if(! in_array($rr['obj_obj'],$profile_hashes))
+ $profile_hashes[] = $rr['obj_obj'];
}
stringify_array_elms($profile_hashes);
if(! $profile_hash) {
@@ -390,7 +390,7 @@ function get_things($profile_hash,$uid) {
$l = q("select xchan_name, xchan_url from likes left join xchan on likee = xchan_hash where
target_type = '%s' and target_id = '%s' and channel_id = %d",
dbesc(ACTIVITY_OBJ_THING),
- dbesc($rr['term_hash']),
+ dbesc($rr['obj_obj']),
intval($uid)
);
@@ -400,7 +400,7 @@ function get_things($profile_hash,$uid) {
if(! $things[$rr['obj_verb']])
$things[$rr['obj_verb']] = array();
- $things[$rr['obj_verb']][] = array('term' => $rr['term'],'url' => $rr['url'],'img' => $rr['imgurl'], 'profile' => $rr['profile_name'],'term_hash' => $rr['term_hash'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun'));
+ $things[$rr['obj_verb']][] = array('term' => $rr['obj_term'],'url' => $rr['obj_url'],'img' => $rr['obj_imgurl'], 'profile' => $rr['profile_name'],'term_hash' => $rr['obj_obj'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun'));
}
$sorted_things = array();
if($things) {