r69095 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69094‎ | r69095 | r69096 >
Date:14:07, 6 July 2010
Author:daniel
Status:deferred
Tags:
Comment:
strip down search response
Modified paths:
  • /trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql (modified) (history)
  • /trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php (modified) (history)
  • /trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordWeb/src/main/maintenance/concept-info-local.sql
@@ -59,3 +59,13 @@
6060 on X.concept = I.concept and I.lang = "{lang}"
6161 set I.related = X.related;
6262
 63+-- collect features
 64+update {collection}_{thesaurus}_concept_info as I
 65+join ( select concept1 as concept, group_concat(distinct concat(concept2, ":", if (local_concept_name is null, "", local_concept_name)) separator "|") as related
 66+from {collection}_{thesaurus}_features
 67+ left join {collection}_{thesaurus}_origin as O on O.global_concept = concept2 and O.lang = "{lang}"
 68+ where bilink >= 1
 69+ group by concept1 ) as X
 70+on X.concept = I.concept and I.lang = "{lang}"
 71+set I.features = X.features;
 72+
Index: trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/response.html.php
@@ -254,6 +254,8 @@
255255 <td colspan="3">
256256 <h1 class="name <?php print "weight_$wclass"; ?>"><?php print getConceptDetailsLink($langs, $concept); ?>:</h1>
257257 <p class="definition"><?php print htmlspecialchars($definition); ?></p>
 258+ <div class="wikipages"><?php printConceptPageList( $langs, $concept, $lclass, $terse ? $wwMaxPreviewLinks : $wwMaxDetailLinks ); ?></div>
 259+ <strong class="more">[<?php print getConceptDetailsLink($langs, $concept, "details..."); ?>]</strong>
258260 </td>
259261 </tr>
260262
@@ -264,14 +266,17 @@
265267 else $more = printConceptImageList( $gallery, $terse, $wwGalleryColumns, $terse ? $wwMaxPreviewImages : $wwMaxGalleryImages );
266268 ?>
267269 </td>
268 - <?php if ($gallery) { ?>
269 - <td class="cell_more_images" colspan="1" width="100%" style="vertical-align:bottom; padding: 1ex; font-size:normal;">
270 - <?php if ($terse) print " <div><strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "more/details...") . "]</strong></div>"; ?>
 270+ </tr>
 271+
 272+ <?php if ($gallery && $terse && $more) { ?>
 273+ <tr class="row_images row_more_images">
 274+ <td class="cell_more_images" colspan="3" width="100%" style="vertical-align:bottom; padding: 1ex; font-size:normal;">
 275+ <?php print " <div><strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "all ".count($gallery)." images...") . "]</strong></div>"; ?>
271276 </td>
272 - <?php } ?>
273277 </tr>
 278+ <?php } ?>
274279
275 - <?php if (@$concept['narrower']) { ?>
 280+ <?php if (!$terse && @$concept['narrower']) { ?>
276281 <tr class="row_narrower">
277282 <td class="cell_related" colspan="3">
278283 <strong class="label">Narrower:</strong>
@@ -283,6 +288,7 @@
284289 </tr>
285290 <?php } ?>
286291
 292+ <?php if (!$terse && @$concept['narrower']) { ?>
287293 <?php
288294 $related = getRelatedConceptList($concept);
289295 if ($related) {
@@ -297,8 +303,9 @@
298304 </td>
299305 </tr>
300306 <?php } ?>
 307+ <?php } ?>
301308
302 - <?php if (@$concept['broader']) { ?>
 309+ <?php if (!$terse && @$concept['broader']) { ?>
303310 <tr class="row_category">
304311 <td class="cell_related" colspan="3">
305312 <strong class="label">Broader:</strong>
@@ -310,15 +317,6 @@
311318 </tr>
312319 <?php } ?>
313320
314 - <?php if (!$terse && @$concept['pages']) { ?>
315 - <tr class="row_pages">
316 - <td class="cell_pages wikipages" colspan="3">
317 - <strong class="label">Wiki pages:</strong> <?php $more = printConceptPageList( $langs, $concept, $lclass, $terse ? $wwMaxPreviewLinks : $wwMaxDetailLinks ); ?>
318 - <?php if ($terse && $more) print " <strong class=\"more\">[" . getConceptDetailsLink($langs, $concept, "more...") . "]</strong>"; ?>
319 - </td>
320 - </tr>
321 - <?php } ?>
322 -
323321 <tr class="row_blank">
324322 <td class="cell_blank" colspan="3">
325323 &nbsp;
Index: trunk/WikiWord/WikiWordWeb/src/main/www/wikipics/search.php
@@ -253,7 +253,7 @@
254254 try {
255255 if ($lang && $conceptId) {
256256 $mode = "concept";
257 - $result = $thesaurus->getConceptInfo($conceptId, $lang, null, $allLanguages, $wwMax);
 257+ $result = $thesaurus->getConceptInfo($conceptId, $lang, null, $allLanguages);
258258 if ( $result ) $result = array( $result ); //hack
259259 } else if ($lang && $term) {
260260 $mode = "term";

Status & tagging log