aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php3
-rw-r--r--mod/item.php7
-rw-r--r--mod/notes.php8
3 files changed, 15 insertions, 3 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 44010efda..37c980c78 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -250,6 +250,7 @@ function admin_page_site_post(&$a){
$block_public = ((x($_POST,'block_public')) ? True : False);
$force_publish = ((x($_POST,'publish_all')) ? True : False);
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
+ $thread_allow = ((x($_POST,'thread_allow')) ? True : False);
$no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False);
$no_openid = !((x($_POST,'no_openid')) ? True : False);
$no_regfullname = !((x($_POST,'no_regfullname')) ? True : False);
@@ -342,6 +343,7 @@ function admin_page_site_post(&$a){
} else {
set_config('system','directory_submit_url', $global_directory);
}
+ set_config('system','thread_allow', $thread_allow);
set_config('system','block_extended_register', $no_multi_reg);
set_config('system','no_openid', $no_openid);
@@ -442,6 +444,7 @@ function admin_page_site(&$a) {
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
'$global_directory' => array('directory_submit_url', t("Global directory update URL"), get_config('system','directory_submit_url'), t("URL to update the global directory. If this is not set, the global directory is completely unavailable to the application.")),
+ '$thread_allow' => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")),
'$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
'$no_openid' => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")),
diff --git a/mod/item.php b/mod/item.php
index 87f7f75d9..757506bc4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -92,6 +92,7 @@ function item_post(&$a) {
// if this isn't the real parent of the conversation, find it
if($r !== false && count($r)) {
$parid = $r[0]['parent'];
+ $parent_uri = $r[0]['uri'];
if($r[0]['id'] != $r[0]['parent']) {
$r = q("SELECT * FROM `item` WHERE `id` = `parent` AND `parent` = %d LIMIT 1",
intval($parid)
@@ -109,7 +110,7 @@ function item_post(&$a) {
$parent = $r[0]['id'];
// multi-level threading - preserve the info but re-parent to our single level threading
- if(($parid) && ($parid != $parent))
+ //if(($parid) && ($parid != $parent))
$thr_parent = $parent_uri;
if($parent_item['contact-id'] && $uid) {
@@ -549,6 +550,10 @@ function item_post(&$a) {
$uri = item_new_uri($a->get_hostname(),$profile_uid);
+ // Fallback so that we alway have a thr-parent
+ if(!$thr_parent)
+ $thr_parent = $uri;
+
$datarray = array();
$datarray['uid'] = $profile_uid;
$datarray['type'] = $post_type;
diff --git a/mod/notes.php b/mod/notes.php
index 625bbd2ee..afaa60f70 100644
--- a/mod/notes.php
+++ b/mod/notes.php
@@ -129,9 +129,13 @@ function notes_content(&$a,$update = false) {
intval(local_user()),
dbesc($parents_str)
);
- }
- $o .= conversation($a,$r,'notes',$update);
+ if(count($r)) {
+ $items = conv_sort($r,"`commented`");
+
+ $o .= conversation($a,$items,'notes',$update);
+ }
+ }
$o .= paginate($a);