Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php |
— | — | @@ -634,7 +634,7 @@ |
635 | 635 | $sql = 's_id=' . $db->addQuotes($sid) . ' AND p_id=smw_id' . $this->getSQLConditions($requestoptions,'smw_sortkey','smw_sortkey'); |
636 | 636 | |
637 | 637 | $result = array(); |
638 | | - // NOTE: the following also includes naries, which are now kepn in smw_rels2 |
| 638 | + // NOTE: the following also includes naries, which are now kept in smw_rels2 |
639 | 639 | foreach (array('smw_atts2','smw_text2','smw_rels2') as $table) { |
640 | 640 | $res = $db->select( array($table,'smw_ids'), 'DISTINCT smw_title', |
641 | 641 | $sql, 'SMW::getProperties', $this->getSQLOptions($requestoptions,'smw_sortkey') ); |
— | — | @@ -656,6 +656,7 @@ |
657 | 657 | if ($value->getTypeID() == '_wpg') { |
658 | 658 | $oid = $this->getSMWPageID($value->getDBkey(),$value->getNamespace(),$value->getInterwiki()); |
659 | 659 | $sql = 'p_id=smw_id AND o_id=' . $db->addQuotes($oid) . |
| 660 | + ' AND smw_iw=' . $db->addQuotes('') . // only local, non-internal properties |
660 | 661 | $this->getSQLConditions($requestoptions,'smw_sortkey','smw_sortkey'); |
661 | 662 | $res = $db->select( array('smw_rels2','smw_ids'), 'DISTINCT smw_title', |
662 | 663 | $sql, 'SMW::getInProperties', $this->getSQLOptions($requestoptions,'smw_sortkey') ); |