Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | $this->propertystring = ''; |
79 | 79 | } else { |
80 | 80 | $this->propertystring = $this->property->getWikiValue(); |
81 | | - $this->value = SMWDataValueFactory::newPropertyObjectValue( $this->property, $this->valuestring ); |
| 81 | + $this->value = SMWDataValueFactory::newPropertyObjectValue( $this->property->getDataItem(), $this->valuestring ); |
82 | 82 | |
83 | 83 | if ( $this->value->isValid() ) { |
84 | 84 | $this->valuestring = $this->value->getWikiValue(); |
— | — | @@ -201,11 +201,10 @@ |
202 | 202 | |
203 | 203 | while ( $results && $number != 0 ) { |
204 | 204 | $result = array_shift( $results ); |
205 | | - $thing = $result[0]->getLongHTMLText( smwfGetLinker() ); |
206 | 205 | |
207 | | - $html .= '<li>' . $thing; |
| 206 | + $html .= '<li>' . $result[0]->getLongHTMLText( smwfGetLinker() ); |
208 | 207 | |
209 | | - if ( $result[0]->getTypeId() == '_wpg' ) { |
| 208 | + if ( $result[0]->getTypeID() == '_wpg' ) { |
210 | 209 | $html .= '  ' . SMWInfolink::newBrowsingLink( '+', $result[0]->getShortHTMLText() )->getHTML( smwfGetLinker() ); |
211 | 210 | } |
212 | 211 | |
— | — | @@ -294,11 +293,14 @@ |
295 | 294 | $options->offset = $this->offset; |
296 | 295 | $options->sort = true; |
297 | 296 | |
298 | | - $res = smwfGetStore()->getPropertySubjects( $this->property, $this->value, $options ); |
| 297 | + $res = smwfGetStore()->getPropertySubjects( $this->property->getDataItem(), $this->value->getDataItem(), $options ); |
299 | 298 | $results = array(); |
300 | 299 | |
301 | 300 | foreach ( $res as $result ) { |
302 | | - array_push( $results, array( $result, $this->value ) ); |
| 301 | + array_push( $results, array( |
| 302 | + SMWDataValueFactory::newDataItemValue( $result ), |
| 303 | + $this->value |
| 304 | + ) ); |
303 | 305 | } |
304 | 306 | |
305 | 307 | return $results; |
— | — | @@ -327,10 +329,10 @@ |
328 | 330 | $params['sort'] = $this->propertystring; |
329 | 331 | $params['order'] = 'DESC'; |
330 | 332 | if ( $greater ) $params['order'] = 'ASC'; |
331 | | - $cmp = "<"; |
332 | | - if ( $greater ) $cmp = ">"; |
| 333 | + $cmp = '<'; |
| 334 | + if ( $greater ) $cmp = '>'; |
333 | 335 | |
334 | | - $querystring = "[[" . $this->propertystring . "::" . $cmp . $this->valuestring . "]]"; |
| 336 | + $querystring = '[[' . $this->propertystring . '::' . $cmp . $this->valuestring . ']]'; |
335 | 337 | $queryobj = SMWQueryProcessor::createQuery( $querystring, $params, SMWQueryProcessor::SPECIAL_PAGE, 'ul', array( $printrequest ) ); |
336 | 338 | $queryobj->querymode = SMWQuery::MODE_INSTANCES; |
337 | 339 | $queryobj->setLimit( $this->limit ); |
Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DataValue.php |
— | — | @@ -60,7 +60,6 @@ |
61 | 61 | */ |
62 | 62 | protected $m_dataitem; |
63 | 63 | |
64 | | - |
65 | 64 | /** |
66 | 65 | * The text label of the respective property or false if none given. |
67 | 66 | * @var SMWDIProperty |
— | — | @@ -642,7 +641,7 @@ |
643 | 642 | */ |
644 | 643 | public function isValid() { |
645 | 644 | $this->unstub(); |
646 | | - return ( ( !$this->mHasErrors ) && isset( $this->m_dataitem ) ); |
| 645 | + return !$this->mHasErrors && isset( $this->m_dataitem ); |
647 | 646 | } |
648 | 647 | |
649 | 648 | /** |
Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Property.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | * original object's content. |
91 | 91 | */ |
92 | 92 | public function __clone() { |
93 | | - if ( $this->m_wikipage !== null ) $this->m_wikipage = clone $this->m_wikipage; |
| 93 | + if ( !is_null( $this->m_wikipage ) ) $this->m_wikipage = clone $this->m_wikipage; |
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |