Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/166419

Change subject: Anchor's toArray should produce full url
......................................................................

Anchor's toArray should produce full url

We use these urls in some messages. E.g.:

    "flow-revision-permalink-warning-post": "This is a permanent link to a 
single version of this post.\nThis version is from $1.\nYou can see the [$5 
differences from the previous version], or view other versions on the [$4 post 
history page].",

$4 and $5 in this message will be urls from an Anchor object. Only full urls
will be parsed, so the current loccal /index.php?... urls being generated will
cause those messages to be improperly parsed.

I don't think anything can go wrong anywhere else with having full URL.

Change-Id: I659057e882e6d13f9572315e925c4240690e98db
---
M includes/Model/Anchor.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/19/166419/1

diff --git a/includes/Model/Anchor.php b/includes/Model/Anchor.php
index b32c4df..a5ddce1 100644
--- a/includes/Model/Anchor.php
+++ b/includes/Model/Anchor.php
@@ -85,7 +85,7 @@
 
        public function toArray() {
                return array(
-                       'url' => $this->getLinkURL(),
+                       'url' => $this->getFullUrl(),
                        'title' => $this->message->text()
                );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/166419
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I659057e882e6d13f9572315e925c4240690e98db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to