Skip to content

addeditdate doesn't do what it says#32

Merged
Alexia merged 1 commit intoAlexia:masterfrom
cotto:addeditdate-fix
Mar 5, 2018
Merged

addeditdate doesn't do what it says#32
Alexia merged 1 commit intoAlexia:masterfrom
cotto:addeditdate-fix

Conversation

@cotto
Copy link

@cotto cotto commented Mar 13, 2017

In the following query, %DATE% won't contain an article's edit date, even though addeditdate=true and ordermethod=lastedit are part of the query. With this patch, addeditdate acts as one would expect. I'm not sure how addeditdate ever worked so there's a chance that this is just a misunderstanding on my part.

{{#dpl: 
 title={{PAGENAMEE}}
 |namespace={{NAMESPACE}}
 |skipthispage=false
 |addeditdate=true
 |ordermethod=lastedit
 |userdateformat=U
 |format=,%DATE%,,
 |allowcachedresults=false
 |count=1
 |debug=4
}

edit: all of this happens on master as of 3.1.0.

@Alexia
Copy link
Owner

Alexia commented Mar 5, 2018

Looks good to me! Looking through the Article.php class code it looks like it was relying on an older feature in an old version of MediaWiki to work. It has support in there for the newer MediaWiki versions, but as you said it was not selecting it from the database. Looks like order direction still is not working correctly, but I will merge this then fix that.

@Alexia Alexia merged commit 593b591 into Alexia:master Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants