https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114483

Revision: 114483
Author:   schuellersa
Date:     2012-03-26 08:47:37 +0000 (Mon, 26 Mar 2012)
Log Message:
-----------
evate double output on searchresult (Institution), German Template

Modified Paths:
--------------
    trunk/extensions/SolrStore/templates/SolrSearchTemplate_FIS.php

Modified: trunk/extensions/SolrStore/templates/SolrSearchTemplate_FIS.php
===================================================================
--- trunk/extensions/SolrStore/templates/SolrSearchTemplate_FIS.php     
2012-03-26 02:28:38 UTC (rev 114482)
+++ trunk/extensions/SolrStore/templates/SolrSearchTemplate_FIS.php     
2012-03-26 08:47:37 UTC (rev 114483)
@@ -164,22 +164,30 @@
                        $this->makeHighlightText( $wgSolrFields, $textsnip ); 
// TEXTSNIP: Highlight the searching stuff:
                } else {
                        $this->mHighlightText = "";
-                       if ( $this->category == 'Institution' ) {
+                       if ( $this->category == 'Institution' ) { // 
Searchresult for Institutionen
                                $tmpmaind = 0;
-                               if ( $this->maindept != '' ) {
+                               
+                               // Wenn Fakultaet / Fachbereich == Universitaet 
+                               // dammit das ganze nur 1x ausgegeben wird
+                               if (strtolower($this->maindept) == 
strtolower($this->higherdept) && $this->higherdept !="") {
                                        $this->mHighlightText = $this->maindept;
+                                       $tmpmaind=2;
+                               }
+
+                               if ( $this->maindept != '' && $tmpmaind!=2) {
+                                       $this->mHighlightText = 
$this->maindept;        // Fakultaet / Fachbereich
                                        $tmpmaind = 1;
                                }
-                               if ( $this->higherdept != '' ) {
+                               if ( $this->higherdept != '' && $tmpmaind!=2) {
                                        if ( $tmpmaind == 1 ) {
-                                               $this->mHighlightText.="<br>";
+                                               $this->mHighlightText.="<br>";  
// Wenn Fakultaet nicht leer (umbruch)
                                        }
-                                       $this->mHighlightText.= 
$this->higherdept;
+                                       $this->mHighlightText.= 
$this->higherdept;      // Ubiversitaet
                                }
                                $textsnip = $this->mHighlightText;
                                $this->makeHighlightText( $wgSolrFields, 
$textsnip ); // TEXTSNIP: Highlight the searching stuff:
                        }
-                       if ( $this->category == 'Projekte' ) {
+                       if ( $this->category == 'Projekte' ) { // Searchresult 
for Projekte
                                $tmpmethode = "";
                                if ( count( $this->methode ) > 0 ) {
                                        for ( $i = 0; $i <= count( 
$this->methode ); $i++ ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to