On 1/19/15, Jeroen De Dauw jeroended...@gmail.com wrote:
Hey,
On my local wiki I have a page with the name File:Blue marker.png. The
following code returns false:
$title = Title::makeTitle( NS_FILE, $file );
$title-exists();
That used to return true in the past. Not sure what is broken -
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)
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,
Hey,
On my local wiki I have a page with the name File:Blue marker.png. The
following code returns false:
$title = Title::makeTitle( NS_FILE, $file );
$title-exists();
That used to return true in the past. Not sure what is broken - my wiki or
MediaWiki itself.
What I want to do is go from
Somebody can correct me, but:
$title = Title::makeTitle( NS_FILE, $filename );
$file = wfLocalFile( $title );
$file-getUrl();
// $file-getFullUrl();
// ...
*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
On Mon, Jan 19, 2015 at 1:45 PM, Jeroen De
Don't know, if that's the correct way, but it is done in SRF for the
excel format:
https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/formats/excel/SRF_Excel.php#L249
On 19 January 2015 at 19:45, Jeroen De Dauw jeroended...@gmail.com wrote:
Hey,
On my local wiki I have a