No, no, no... It is dynamically generated, but you're not supposed to concat strings.
From PHP you use the Title class:
$title = Title::newFromText( 'Foo' ); if ( $title ) { // Invalid titles may be null $title->getLocalURL(); }
And from JS make sure that the 'mediawiki.Title' is loaded and use mw.Title: var title = Title::newFromText( 'Foo' ); if ( title ) { // Invalid titles may be null title->getUrl(); }
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
On 2013-11-21 7:56 AM, Bill Traynor wrote:
Figured it out myself. I just used concat to prepend the wiki's URI to each page name.
On Thu, Nov 21, 2013 at 9:20 AM, Bill Traynor btraynor@gmail.com wrote:
I've written an SQL query to extract some data from our wikidb as follows:
select page_title, u.user_name, u.user_email, rev_timestamp, c.cl_to from page p join revision r on p.page_id = r.rev_page join user u on r.rev_user = u.user_id left join categorylinks c on p.page_id = c.cl_from where page_latest = r.rev_id into outfile "/tmp/report.txt";
I need to obtain the full page URI, not just the Page Title. I can't seem to find that stored in the wikidb. Am I just missing it or is it always dynamically generated?
Thanks Bill
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l