Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -60,14 +60,18 @@ |
61 | 61 | } |
62 | 62 | |
63 | 63 | static function permalinkUrl( $thread, $method = null, $operand = null, |
64 | | - $uquery = array() ) { |
| 64 | + $uquery = array(), $relative = true ) { |
65 | 65 | list ( $title, $query ) = self::permalinkData( $thread, $method, $operand ); |
66 | 66 | |
67 | 67 | $query = array_merge( $query, $uquery ); |
68 | 68 | |
69 | 69 | $queryString = wfArrayToCGI( $query ); |
70 | 70 | |
71 | | - return $title->getLocalUrl( $queryString ); |
| 71 | + if( $relative ) { |
| 72 | + return $title->getLocalUrl( $queryString ); |
| 73 | + } else { |
| 74 | + return $title->getFullUrl( $queryString ); |
| 75 | + } |
72 | 76 | } |
73 | 77 | |
74 | 78 | /** Gets an array of (title, query-parameters) for a permalink **/ |
— | — | @@ -90,12 +94,12 @@ |
91 | 95 | |
92 | 96 | /* This is used for action=history so that the history tab works, which is |
93 | 97 | why we break the lqt_method paradigm. */ |
94 | | - static function permalinkUrlWithQuery( $thread, $query ) { |
| 98 | + static function permalinkUrlWithQuery( $thread, $query, $relative = true ) { |
95 | 99 | if ( !is_array( $query ) ) { |
96 | 100 | $query = wfCGIToArray( $query ); |
97 | 101 | } |
98 | 102 | |
99 | | - return self::permalinkUrl( $thread, null, null, $query ); |
| 103 | + return self::permalinkUrl( $thread, null, null, $query, $relative ); |
100 | 104 | } |
101 | 105 | |
102 | 106 | static function permalink( $thread, $text = null, $method = null, $operand = null, |
— | — | @@ -181,7 +185,7 @@ |
182 | 186 | |
183 | 187 | static function diffPermalinkURL( $thread, $revision ) { |
184 | 188 | $query = self::diffQuery( $thread, $revision ); |
185 | | - return self::permalinkUrl( $thread, null, null, $query ); |
| 189 | + return self::permalinkUrl( $thread, null, null, $query, false ); |
186 | 190 | } |
187 | 191 | |
188 | 192 | static function diffPermalink( $thread, $text, $revision ) { |