Also try using Title::makeTitleSafe instead of Title:makeTitle.
Your $fileName might not be in the proper dbKey format (use of spaces, etc...) in which case the Title you get would be corrupt since makeTitle doesn't sanitize the text you give.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
On 2015-01-20 11:46 AM, Brion Vibber wrote:
I think you have a double 'File:' prefix in there which may be confusing things. Try Title::newFromText($fileName) if $fileName already includes 'File:' prefix.
-- brion
On Tue, Jan 20, 2015 at 11:42 AM, Jeroen De Dauw jeroendedauw@gmail.com wrote:
Hey,
Now trying this code: wfFindFile( $title );
With this title object as input: http://pastebin.com/7B9n1NyN (constructed with Title::makeTitle( NS_FILE, $fileName ))
The output is still false. At the same time, the page definitely exists, and if I put "[[File:Blue marker.png]]" in a wiki page, it shows up just fine. I double checked my file permissions, and they seem fine. What am I missing?
Cheers
-- Jeroen De Dauw - http://www.bn2vs.com Software craftsmanship advocate Evil software architect at Wikimedia Germany ~=[,,_,,]:3 _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l