Index: trunk/WikiWord/WikiWord/src/main/php/wikiword.php |
— | — | @@ -27,9 +27,11 @@ |
28 | 28 | if (!isset($weight) && isset($freq)) $weight = $freq; |
29 | 29 | if (!isset($weight) && isset($conf)) $weight = $conf; |
30 | 30 | if (!isset($concept_name) && isset($name)) $concept_name = $name; |
| 31 | + if (!isset($concept_name) && isset($name)) $concept_name = NULL; |
31 | 32 | if (!isset($concept) && isset($id)) $concept = $id; |
| 33 | + if (!isset($concept) && isset($id)) $concept = NULL; |
32 | 34 | |
33 | | - $wu = "http://$lang.wikipedia.org/wiki/" . urlencode($concept_name); |
| 35 | + $wu = $concept_name ? "http://$lang.wikipedia.org/wiki/" . urlencode($concept_name) : NULL; |
34 | 36 | $cu = "$wwSelf?id=" . urlencode($concept) . "&lang=" . urlencode($lang); |
35 | 37 | |
36 | 38 | ?> |
— | — | @@ -92,7 +94,10 @@ |
93 | 95 | $wu = "http://$lang.wikipedia.org/wiki/" . urlencode($concept_name); |
94 | 96 | $cu = "$wwSelf?id=" . urlencode($concept) . "&lang=" . urlencode($lang); |
95 | 97 | |
96 | | - if (!isset($weight) || !$weight) $wclass = "x"; |
| 98 | + if (!isset($weight) || !$weight) { |
| 99 | + $wclass = "x"; |
| 100 | + $weight = NULL; |
| 101 | + } |
97 | 102 | else if ($weight>1000) $wclass = "huge"; |
98 | 103 | else if ($weight>100) $wclass = "big"; |
99 | 104 | else if ($weight>10) $wclass = "normal"; |