http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95746
Revision: 95746
Author: nikerabbit
Date: 2011-08-30 09:42:25 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
*Use $this->getTitle()
*Fixed a bug where namespace was dropped on submit
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
Modified:
trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
===================================================================
---
trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
2011-08-30 09:33:43 UTC (rev 95745)
+++
trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
2011-08-30 09:42:25 UTC (rev 95746)
@@ -53,7 +53,7 @@
}
$subject = SMWDataValueFactory::newTypeIDValue( '_wpg',
$pagename );
- $pagename = $subject->isValid() ? $subject->getText() : '';
+ $pagename = $subject->isValid() ? $subject->getPrefixedText() :
'';
$property = SMWPropertyValue::makeUserProperty( $propname );
$propname = $property->isValid() ? $property->getWikiValue() :
'';
@@ -62,6 +62,7 @@
if ( ( $propname == '' ) ) { // no property given, show a
message
$html .= wfMsg( 'smw_pp_docu' ) . "\n";
} else { // property given, find and display results
+ // FIXME: very ugly, needs i18n
$wgOut->setPagetitle( ( $pagename != '' ? $pagename . '
':'' ) . $property->getWikiValue() );
// get results (get one more, to see if we have to add
a link to more)
@@ -77,7 +78,7 @@
$navigation = Html::element(
'a',
array(
- 'href' =>
SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( array(
+ 'href' =>
$this->getTitle()->getLocalURL( array(
'offset' =>
max( 0, $offset - $limit ),
'limit' =>
$limit,
'type' =>
$propname,
@@ -100,7 +101,7 @@
$navigation = Html::element(
'a',
array(
- 'href' =>
SpecialPage::getSafeTitleFor( 'PageProperty' )->getLocalURL( array(
+ 'href' =>
$this->getTitle()->getLocalURL( array(
'offset' => (
$offset + $limit ),
'limit' =>
$limit,
'type' =>
$propname,
@@ -146,7 +147,7 @@
}
// Display query form
- $spectitle = SpecialPage::getTitleFor( 'PageProperty' );
+ $spectitle = $this->getTitle();
$html .= '<p> </p>';
$html .= '<form name="pageproperty" action="' .
$spectitle->escapeLocalURL() . '" method="get">' . "\n" .
'<input type="hidden" name="title" value="' .
$spectitle->getPrefixedText() . '"/>' ;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs