Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | |
7 | 7 | $wgExtensionCredits['other'][] = array( |
8 | 8 | 'name' => 'Liquid Threads', |
9 | | - 'version' => '1.1', |
| 9 | + 'version' => '1.2', |
10 | 10 | 'url' => 'http://www.mediawiki.org/wiki/Extension:LiquidThreads', |
11 | 11 | 'author' => 'David McCabe', |
12 | 12 | 'description' => 'Add threading discussions to talk pages', |
— | — | @@ -22,11 +22,13 @@ |
23 | 23 | define( 'LQT_NEWEST_THREADS', 2 ); |
24 | 24 | define( 'LQT_OLDEST_THREADS', 3 ); |
25 | 25 | |
| 26 | +// FIXME: would be neat if it was possible to somehow localise this. |
26 | 27 | $wgCanonicalNamespaceNames[NS_LQT_THREAD] = 'Thread'; |
27 | 28 | $wgCanonicalNamespaceNames[NS_LQT_THREAD_TALK] = 'Thread_talk'; |
28 | 29 | $wgCanonicalNamespaceNames[NS_LQT_SUMMARY] = 'Summary'; |
29 | 30 | $wgCanonicalNamespaceNames[NS_LQT_SUMMARY_TALK] = 'Summary_talk'; |
30 | 31 | |
| 32 | +// FIXME: would be neat if it was possible to somehow localise this. |
31 | 33 | $wgExtraNamespaces[NS_LQT_THREAD] = 'Thread'; |
32 | 34 | $wgExtraNamespaces[NS_LQT_THREAD_TALK] = 'Thread_talk'; |
33 | 35 | $wgExtraNamespaces[NS_LQT_SUMMARY] = 'Summary'; |
Index: trunk/extensions/LiquidThreads/classes/LqtThread.php |
— | — | @@ -76,16 +76,7 @@ |
77 | 77 | } |
78 | 78 | return $results; |
79 | 79 | } |
80 | | -/* |
81 | | - function ancestors() { |
82 | | - $id_clauses = array(); |
83 | | - foreach( explode('.', $this->path) as $id ) { |
84 | | - $id_clauses[] = "thread_id = $id"; |
85 | | - } |
86 | | - $where = implode(' OR ', $id_clauses); |
87 | | - return Threads::where($where); |
88 | | - } |
89 | | -*/ |
| 80 | + |
90 | 81 | private function bumpRevisionsOnAncestors( $change_type, $change_object, $change_reason, $timestamp ) { |
91 | 82 | global $wgUser; // TODO global. |
92 | 83 | |
— | — | @@ -247,7 +238,7 @@ |
248 | 239 | |
249 | 240 | # Purge old title from squid |
250 | 241 | # The new title, and links to the new title, are purged in Article::onArticleCreate() |
251 | | -# $this-->purgeSquid(); |
| 242 | + # $this-->purgeSquid(); |
252 | 243 | } |
253 | 244 | |
254 | 245 | |
Index: trunk/extensions/LiquidThreads/pages/SpecialDeleteThread.php |
— | — | @@ -30,13 +30,12 @@ |
31 | 31 | $deleting = $this->thread->type() != Threads::TYPE_DELETED; |
32 | 32 | |
33 | 33 | $operation_message = $deleting ? |
34 | | - wfMsg( 'lqt_delete_deleting', "<b>$thread_name</b>", '<b>' . wfMsg( 'lqt_delete_deleting_allreplies' ) . '</b>' ) |
35 | | - // "Deleting <b>$thread_name</b> and <b>all replies</b> to it." |
36 | | - : wfMsg( 'lqt_delete_undeleting', "<b>$thread_name</b>" ); |
| 34 | + wfMsg( 'lqt_delete_deleting', $thread_name ) |
| 35 | + : wfMsg( 'lqt_delete_undeleting', $thread_name ); |
37 | 36 | $button_label = $deleting ? |
38 | | - wfMsg( 'lqt_delete_deletethread' ) |
39 | | - : wfMsg( 'lqt_delete_undeletethread' ); |
40 | | - $part_of = wfMsg( 'lqt_delete_partof', '<b>' . $article_name . '</b>' ); |
| 37 | + wfMsg( 'lqt_delete_deletethread' ) |
| 38 | + : wfMsg( 'lqt_delete_undeletethread' ); |
| 39 | + $part_of = wfMsg( 'lqt_delete_partof', $article_name ); |
41 | 40 | $reason = wfMsg( 'movereason' ); // XXX arguably wrong to use movereason. |
42 | 41 | |
43 | 42 | $this->output->addHTML( <<<HTML |
— | — | @@ -95,7 +94,7 @@ |
96 | 95 | // TODO talkpageUrl should accept threads, and look up their talk pages. |
97 | 96 | $talkpage_url = LqtView::talkpageUrl( $this->thread->article()->getTitle()->getTalkpage() ); |
98 | 97 | $message = $is_deleted_already ? wfMsg( 'lqt_delete_undeleted' ) : wfMsg( 'lqt_delete_deleted' ); |
99 | | - $message .= ' '; |
| 98 | + $message .= wfMsg( 'word-separator' ); |
100 | 99 | $message .= wfMsg( 'lqt_delete_return', '<a href="' . $talkpage_url . '">' . wfMsg( 'lqt_delete_return_link' ) . '</a>' ); |
101 | 100 | $this->output->addHTML( $message ); |
102 | 101 | } |
Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php |
— | — | @@ -25,6 +25,8 @@ |
26 | 26 | $article_name = $this->thread->article()->getTitle()->getTalkPage()->getPrefixedText(); |
27 | 27 | $edit_url = LqtView::permalinkUrl( $this->thread, 'edit', $this->thread ); |
28 | 28 | $wfMsg = 'wfMsg'; // functions can only be called within string expansion by variable name. |
| 29 | + // FIXME: awkward message usage and fixed parameter formatting. Would be nicer if all formatting |
| 30 | + // was done in the message itself, and the below code would be deweirded. |
29 | 31 | $this->output->addHTML( <<<HTML |
30 | 32 | <p>{$wfMsg('lqt_move_movingthread', "<b>$thread_name</b>", "<b>$article_name</b>")}</p> |
31 | 33 | <p>{$wfMsg('lqt_move_torename', "<a href=\"$edit_url\">{$wfMsg('lqt_move_torename_edit')}</a>")}</p> |
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php |
— | — | @@ -102,7 +102,6 @@ |
103 | 103 | if ( count( $threadlinks ) > 0 ) { |
104 | 104 | $this->openDiv( 'lqt_archive_teaser' ); |
105 | 105 | $this->output->addHTML( '<h2 class="lqt_recently_archived">' . wfMsg( 'lqt_recently_archived' ) . '</h2>' ); |
106 | | - // $this->output->addHTML("<span class=\"lqt_browse_archive\">[<a href=\"$url\">".wfMsg('lqt_browse_archive_with_recent')."</a>]</span></h2>"); |
107 | 106 | $this->outputList( 'ul', '', '', $threadlinks ); |
108 | 107 | $this->closeDiv(); |
109 | 108 | } else { |
Index: trunk/extensions/LiquidThreads/pages/ThreadHistoricalRevisionView.php |
— | — | @@ -19,12 +19,17 @@ |
20 | 20 | global $wgLang; // TODO global. |
21 | 21 | wfLoadExtensionMessages( 'LiquidThreads' ); |
22 | 22 | $this->openDiv( 'lqt_history_info' ); |
23 | | - $this->output->addHTML( wfMsg( 'lqt_revision_as_of', $wgLang->timeanddate( $this->thread->modified() ) ) . '<br />' ); |
| 23 | + $this->output->addHTML( wfMsg( 'lqt_revision_as_of', |
| 24 | + $wgLang->timeanddate( $this->thread->modified() ), |
| 25 | + $wgLang->date( $this->thread->modified() ), |
| 26 | + $wgLang->time( $this->thread->modified() ) ) . '<br />' ); |
24 | 27 | |
25 | 28 | $ct = $this->thread->changeType(); |
26 | | - if ( $ct == Threads::CHANGE_NEW_THREAD ) $msg = wfMsg( 'lqt_change_new_thread' ); |
27 | | - else if ( $ct == Threads::CHANGE_REPLY_CREATED ) $msg = wfMsg( 'lqt_change_reply_created' ); |
28 | | - else if ( $ct == Threads::CHANGE_EDITED_ROOT ) { |
| 29 | + if ( $ct == Threads::CHANGE_NEW_THREAD ) { |
| 30 | + $msg = wfMsg( 'lqt_change_new_thread' ); |
| 31 | + } else if ( $ct == Threads::CHANGE_REPLY_CREATED ) { |
| 32 | + $msg = wfMsg( 'lqt_change_reply_created' ); |
| 33 | + } else if ( $ct == Threads::CHANGE_EDITED_ROOT ) { |
29 | 34 | $diff_url = $this->permalinkUrlWithDiff( $this->thread ); |
30 | 35 | $msg = wfMsg( 'lqt_change_edited_root' ) . " [<a href=\"$diff_url\">" . wfMsg( 'diff' ) . '</a>]'; |
31 | 36 | } |
Index: trunk/extensions/LiquidThreads/Lqt.i18n.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | 'lqt_hist_past_last_page_error' => 'You are beyond the number of pages of history that exist.', |
52 | 52 | 'lqt_hist_tooltip_newer_disabled' => 'This link is disabled because you are on the first page.', |
53 | 53 | 'lqt_hist_tooltip_older_disabled' => 'This link is disabled because you are on the last page.', |
54 | | - 'lqt_revision_as_of' => "Revision as of $1.", |
| 54 | + 'lqt_revision_as_of' => "Revision as of $2 at $3.", |
55 | 55 | 'lqt_change_new_thread' => 'This is the thread\'s initial revision.', |
56 | 56 | 'lqt_change_reply_created' => 'The highlighted comment was created in this revision.', |
57 | 57 | 'lqt_change_edited_root' => 'The highlighted comment was edited in this revision.', |
— | — | @@ -62,8 +62,7 @@ |
63 | 63 | 'lqt_noreason' => 'No reason given.', |
64 | 64 | 'lqt_move_placeholder' => 'This thread is a placeholder indicating that a thread, $1, was removed from this page to another talk page. |
65 | 65 | This move was made by $2 on $3 at $4.', |
66 | | - 'lqt_thread_deleted_for_sysops' => 'This thread has been $1 and is only visible to administrators.', |
67 | | - 'lqt_thread_deleted_for_sysops_deleted' => 'deleted', // substituted above in bold |
| 66 | + 'lqt_thread_deleted_for_sysops' => 'This thread has been \'\'\'deleted\'\'\' and is only visible to administrators.', |
68 | 67 | 'lqt_thread_deleted' => 'This thread has been deleted.', |
69 | 68 | 'lqt_summary_notice' => 'There have been no changes to this discussion for at least $2 days. |
70 | 69 | If it is concluded, you may want to $1.', |
— | — | @@ -77,24 +76,23 @@ |
78 | 77 | This thread is part of $2.', |
79 | 78 | 'lqt_move_torename' => 'To rename this thread, $1 and change the \'Subject\' field.', |
80 | 79 | 'lqt_move_torename_edit' => 'edit it', // substituted above as a link |
81 | | - 'lqt_move_destinationtitle' => 'Title of destination talkpage:', |
| 80 | + 'lqt_move_destinationtitle' => 'Title of destination talk page:', |
82 | 81 | 'lqt_move_move' => 'Move', |
83 | 82 | 'lqt_move_nodestination' => 'You must specify a destination.', |
84 | 83 | 'lqt_move_noreason' => 'No reason given.', |
85 | 84 | 'lqt_move_success' => 'The thread was moved to $1.', |
86 | | - 'lqt_delete_undeleting' => 'Undeleting $1.', |
| 85 | + 'lqt_delete_undeleting' => 'Undeleting \'\'\'$1\'\'\'.', |
87 | 86 | 'lqt_delete_undeletethread' => 'Undelete thread', |
88 | | - 'lqt_delete_partof' => 'This thread is part of $1.', |
89 | | - 'lqt_delete_deleting' => 'Deleting $1 and $2 to it.', |
90 | | - 'lqt_delete_deleting_allreplies' => 'all replies', // subst above in bold |
| 87 | + 'lqt_delete_partof' => 'This thread is part of \'\'\'$1\'\'\'.', |
| 88 | + 'lqt_delete_deleting' => 'Deleting \'\'\'$1\'\'\' and \'\'\'all replies\'\'\' to it.', |
91 | 89 | 'lqt_delete_deletethread' => 'Delete thread and replies', |
92 | 90 | 'lqt_delete_deleted' => 'The thread was deleted.', |
93 | 91 | 'lqt_delete_undeleted' => 'The thread was undeleted.', |
94 | 92 | 'lqt_delete_return' => 'Return to $1.', |
95 | | - 'lqt_delete_return_link' => 'the talkpage', // subst above |
| 93 | + 'lqt_delete_return_link' => 'the talk page', // subst above |
96 | 94 | 'lqt_delete_unallowed' => 'You are not allowed to delete threads.', |
97 | 95 | 'lqt_delete_show_checkbox' => 'Show deleted threads', |
98 | | - 'lqt_talkpage_autocreate_summary' => 'Talkpage autocreated when first thread was posted.', |
| 96 | + 'lqt_talkpage_autocreate_summary' => 'Talk page autocreated when first thread was posted.', |
99 | 97 | 'lqt_header_warning_before_big' => '', |
100 | 98 | 'lqt_header_warning_big' => 'You are editing a $1.', |
101 | 99 | 'lqt_header_warning_after_big' => 'Headers are for announcements and prefaces. |
Index: trunk/extensions/LiquidThreads/LqtBaseView.php |
— | — | @@ -943,8 +943,7 @@ |
944 | 944 | if ( $thread->type() == Threads::TYPE_DELETED ) { |
945 | 945 | wfLoadExtensionMessages( 'LiquidThreads' ); |
946 | 946 | if ( in_array( 'deletedhistory', $this->user->getRights() ) ) { |
947 | | - $this->output->addHTML( '<p>' . wfMsg( 'lqt_thread_deleted_for_sysops', |
948 | | - '<b>' . wfMsg( 'lqt_thread_deleted_for_sysops_deleted' ) . '</b>' ) . '</p>' ); |
| 947 | + $this->output->addHTML( '<p>' . wfMsg( 'lqt_thread_deleted_for_sysops' ) . '</p>' ); |
949 | 948 | } |
950 | 949 | else { |
951 | 950 | $this->output->addHTML( '<p><em>' . wfMsg( 'lqt_thread_deleted' ) . '</em></p>' ); |