Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php |
— | — | @@ -29,16 +29,16 @@ |
30 | 30 | $dbr =& wfGetDB( DB_SLAVE ); |
31 | 31 | $all_properties = array(); |
32 | 32 | |
33 | | - $res = $dbr->query("SELECT distinct attribute_title FROM " . |
34 | | - $dbr->tableName('smw_attributes')); |
| 33 | + $res = $dbr->query("SELECT page_title FROM " . $dbr->tableName('page') . |
| 34 | + " WHERE page_namespace = " . SMW_NS_ATTRIBUTE); |
35 | 35 | while ($row = $dbr->fetchRow($res)) { |
36 | 36 | $attribute_name = str_replace('_', ' ', $row[0]); |
37 | 37 | $all_properties[$attribute_name . ":="] = $attribute_name; |
38 | 38 | } |
39 | 39 | $dbr->freeResult($res); |
40 | 40 | |
41 | | - $res = $dbr->query("SELECT distinct relation_title FROM " . |
42 | | - $dbr->tableName('smw_relations')); |
| 41 | + $res = $dbr->query("SELECT page_title FROM " . $dbr->tableName('page') . |
| 42 | + " WHERE page_namespace = " . SMW_NS_RELATION); |
43 | 43 | while ($row = $dbr->fetchRow($res)) { |
44 | 44 | $relation_name = str_replace('_', ' ', $row[0]); |
45 | 45 | $all_properties[$relation_name . "::"] = $relation_name; |