Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -773,6 +773,8 @@ |
774 | 774 | |
775 | 775 | static $loadedThreads = array(); |
776 | 776 | |
| 777 | + static $thread_children = array(); |
| 778 | + |
777 | 779 | static function newThread( $root, $article, $superthread = null, $type = self::TYPE_NORMAL ) { |
778 | 780 | |
779 | 781 | // SCHEMA changes must be reflected here. |
— | — | @@ -889,33 +891,7 @@ |
890 | 892 | } |
891 | 893 | return $top_level_threads; |
892 | 894 | } |
893 | | - |
894 | | - /* |
895 | | - private function splitIncrementFromSubject($subject_string) { |
896 | | - preg_match('/^(.*) \((\d+)\)$/', $subject_string, $matches); |
897 | | - if( count($matches) != 3 ) |
898 | | - throw new MWException( __METHOD__ . ": thread subject has no increment: " . $subject_string ); |
899 | | - else |
900 | | - return $matches; |
901 | | - } |
902 | | - */ |
903 | | - |
904 | | - static $thread_children = array(); |
905 | 895 | |
906 | | - private static function buildThread( $lines, $l ) { |
907 | | - $children = array(); |
908 | | - $l_path = preg_quote($l->thread_path); |
909 | | - foreach( $lines as $key => $m ) { |
910 | | - if ( preg_match( "/^{$l_path}\.\d+$/", $m->thread_path ) ) { |
911 | | -// unset($lines[$key]); |
912 | | - $children[] = Threads::buildThread( $lines, $m ); |
913 | | - } |
914 | | - } |
915 | | - $t = new Thread($l, $children); |
916 | | - Threads::$loadedThreads[$l->thread_id] = $t; |
917 | | - return $t; |
918 | | - } |
919 | | - |
920 | 896 | private static function databaseError( $msg ) { |
921 | 897 | // TODO tie into MW's error reporting facilities. |
922 | 898 | echo("Corrupt liquidthreads database: $msg"); |