Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/192775
Change subject: Support WikiLove
......................................................................
Support WikiLove
Meanwhile also remove our history override.
History used to be like Talk:Page?flow-action=board-history
(or similar) instead of ?action=history, so we had to override
the history link. We're now on ?action=history so I don't see
any other reason to not just use the already generated history
link.
The WikiLove part depends on I66fcea185f0852e8eee466465e01cf410d30f133
Change-Id: I14f91026b410d4e80f2df52545c65bee83cfa9f8
---
M Flow.php
M Hooks.php
2 files changed, 8 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/75/192775/1
diff --git a/Flow.php b/Flow.php
index 55f56d7..ecaecee 100644
--- a/Flow.php
+++ b/Flow.php
@@ -298,7 +298,7 @@
$wgFlowAbuseFilterEmergencyDisableAge = 86400; // One day.
// Actions that must pass through to MediaWiki on flow enabled pages
-$wgFlowCoreActionWhitelist = array( 'info', 'protect', 'unprotect', 'unwatch',
'watch' );
+$wgFlowCoreActionWhitelist = array( 'info', 'protect', 'unprotect', 'unwatch',
'watch', 'history', 'wikilove' );
// When set to true Flow will compile templates into their intermediate forms
// on every run. When set to false Flow will use the versions already written
diff --git a/Hooks.php b/Hooks.php
index 14a4a59..9cc5d02 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -405,23 +405,20 @@
// FIXME: Find more elegant standard way of doing this.
$wgMFPageActions = array();
- $skname = $template->getSkinName();
-
- $selected = $template->getRequest()->getVal( 'action' )
== 'history';
-
// watch star links are inside the topic itself
if ( $title->getNamespace() === NS_TOPIC ) {
unset( $links['actions']['watch'] );
unset( $links['actions']['unwatch'] );
}
- $links['views'] = array( array(
- 'class' => $selected ? 'selected' : '',
- 'text' => wfMessageFallback(
"$skname-view-history", "history_short" )->text(),
- 'href' => $title->getLinkURL( 'action=history'
),
- ) );
+ // hide all views unless whitelisted
+ foreach ( $links['views'] as $action => $data ) {
+ if ( !in_array( $action,
$wgFlowCoreActionWhitelist ) ) {
+ unset( $links['views'][$action] );
+ }
+ }
- // hide all ?action= links unless whitelisted
+ // hide all actions unless whitelisted
foreach ( $links['actions'] as $action => $data ) {
if ( !in_array( $action,
$wgFlowCoreActionWhitelist ) ) {
unset( $links['actions'][$action] );
--
To view, visit https://gerrit.wikimedia.org/r/192775
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I14f91026b410d4e80f2df52545c65bee83cfa9f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits