Ljonka has uploaded a new change for review.
https://gerrit.wikimedia.org/r/266483
Change subject: Add Unique Option
......................................................................
Add Unique Option
Enable unique form for each article on arg[unique]=true
Change-Id: Ic1aeffa840a9ac265d0772b6718c847f30f56d41
---
M AJAXPoll_body.php
1 file changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AJAXPoll
refs/changes/83/266483/1
diff --git a/AJAXPoll_body.php b/AJAXPoll_body.php
index d2af185..2f6c166 100644
--- a/AJAXPoll_body.php
+++ b/AJAXPoll_body.php
@@ -41,13 +41,16 @@
$userName = $wgUser->getName();
}
- // ID of the poll
- if ( isset( $args["id"] ) ) {
- $id = $args["id"];
+ // ID of the poll, set from pagename if unique param is set
+
+ if( isset( $args["unique"] ) && $args["unique"] == true ){
+ $id = strtoupper( md5( $input .
$wgRequest->getText("title") ) );
+ } else if ( isset( $args["id"] ) ) {
+ $id = $args["id"];
} else {
- $id = strtoupper( md5( $input ) );
+ $id = strtoupper( md5( $input ) );
}
-
+
// get the input
$input = $parser->recursiveTagParse( $input, $frame );
$input = trim( strip_tags( $input ) );
--
To view, visit https://gerrit.wikimedia.org/r/266483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1aeffa840a9ac265d0772b6718c847f30f56d41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AJAXPoll
Gerrit-Branch: master
Gerrit-Owner: Ljonka <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits