Reedy has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/348064 )
Change subject: Stop building query strings manually
......................................................................
Stop building query strings manually
Fix suggested by PeterBodifee
Bug: T162264
Change-Id: I6f69d5d9ed8b9608528a7d71a567e9223b717fba
---
M DiscussionThreading.class.php
1 file changed, 8 insertions(+), 6 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DiscussionThreading
refs/changes/64/348064/1
diff --git a/DiscussionThreading.class.php b/DiscussionThreading.class.php
index 3b2f841..07b4750 100644
--- a/DiscussionThreading.class.php
+++ b/DiscussionThreading.class.php
@@ -15,7 +15,8 @@
$spanOpen="<span class=\"mw-editsection\">";
$spanClose="</span>";
$strippedResults = substr( substr( $result, strlen(
$spanOpen ) ) , 0 , -strlen( $spanClose ) );
- $commenturl = '§ion='.$section.'&replyto=yes';
+
+ $commenturl = array('action' => 'edit', 'section' =>
$section, 'replyto' => 'yes' );
$hint = ( $hint == '' )
? ''
: array( 'title' => wfMessage(
'discussionthreading-replysectionhint', $hint )->escaped() );
@@ -23,27 +24,28 @@
$nt,
wfMessage( 'discussionthreading-replysection'
)->escaped(),
$hint,
- array( 'action' => 'edit' . $commenturl ),
+ $commenturl,
array( 'known' )
);
- $newthreadurl = '§ion=new';
+
+ $newthreadurl = array( 'action' => 'edit', 'section' =>
'new' );
$hint = ( $hint == '' )
? ''
- : array( 'title' => wfMessage(
'discussionthreading-threadnewsectionhint', $hint )->escaped() );
+ : array('title' => wfMessage(
'discussionthreading-threadnewsectionhint', $hint )->escaped() );
$nurl = Linker::link(
$nt,
wfMessage(
'discussionthreading-threadnewsection' )->escaped(),
$hint,
- array( 'action' => 'edit' . $newthreadurl ),
+ $newthreadurl,
array( 'known' )
);
+
$nurl = '<span class="mw-editsection-bracket">[</span>'
. $nurl . '<span class="mw-editsection-bracket">]</span>';
$curl = '<span class="mw-editsection-bracket">[</span>'
. $curl . '<span class="mw-editsection-bracket">]</span>';
$result = $spanOpen . $nurl . $strippedResults . $curl
. $spanClose;
}
return true;
}
-
/**
* This function is a hook used to test to see if empty, if so, start a
comment
--
To view, visit https://gerrit.wikimedia.org/r/348064
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f69d5d9ed8b9608528a7d71a567e9223b717fba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DiscussionThreading
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits