]> git.mxchange.org Git - friendica.git/commitdiff
Remove database update, use fallback solution instead.
authorDomovoy <domovoy@errlock.org>
Sun, 5 Aug 2012 13:08:31 +0000 (15:08 +0200)
committerDomovoy <domovoy@errlock.org>
Sun, 5 Aug 2012 13:08:31 +0000 (15:08 +0200)
boot.php
include/conversation.php
update.php

index 014b840f2783ba539d26d0585bc16c2d88f06b8c..7e3e9fee7b089261a9e728603ef4270591c1bf8b 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -13,7 +13,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_VERSION',      '3.0.1425' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1155      );
+define ( 'DB_UPDATE_VERSION',      1154      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
index 345bb34ad8faded39700af8ee92a626907407ba6..706bcdde6739bc87208456f1c52dc61e1205a652 100644 (file)
@@ -1151,7 +1151,12 @@ function get_item_children($arr, $parent) {
        foreach($arr as $item) {
                if($item['id'] != $item['parent']) {
                        if(get_config('system','thread_allow')) {
-                               if($item['thr-parent'] == $parent['uri']) {
+                               // Fallback to parent-uri if thr-parent is not set
+                               $thr_parent = $item['thr-parent'];
+                               if($thr_parent == '')
+                                       $thr_parent = $item['parent-uri'];
+                               
+                               if($thr_parent == $parent['uri']) {
                                        $item['children'] = get_item_children($arr, $item);
                                        $children[] = $item;
                                }
index c41acf6fbcf5e8d8c9d86209dae9e4f02f53ae3e..19e6cf3bdf78c06eae128ee1f383eb4f902d3492 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1155 );
+define( 'UPDATE_VERSION' , 1154 );
 
 /**
  *
@@ -1343,10 +1343,3 @@ function update_1153() {
        if(!$r) return UPDATE_FAILED;
        return UPDATE_SUCCESS;
 }
-
-function update_1154() {
-       $r = q("UPDATE `item` SET `thr-parent`=`parent-uri` WHERE `id`!=`parent` AND `thr-parent`=''");
-       
-       if(!$r) return UPDATE_FAILED;
-       return UPDATE_SUCCESS;
-}