]> git.mjollnir.org Git - moodle.git/commitdiff
makes author completley unmentionned when no author
authordiml <diml>
Mon, 7 Apr 2008 21:12:29 +0000 (21:12 +0000)
committerdiml <diml>
Mon, 7 Apr 2008 21:12:29 +0000 (21:12 +0000)
search/LISEZMOI.txt
search/query.php

index 8780ee3f74102194bf71d2ab3e0b12ac41041658..55026e582367693c3e83fc44490d9ecf58563817 100644 (file)
@@ -1,5 +1,5 @@
 Cette distribution partielle contient une refonte du moteur de 
-recherche globalde Moodle.
+recherche globalde Moodle.
 
 Le moteur de recherche est capable d'indexer et de rechercher 
 des informations dans un grand nombre de contenus stockés
index 5d839891880e8ee597fc38795a5a704073653b81..47b4e78f04fcedee9c4babee544467be92511394 100644 (file)
@@ -43,7 +43,7 @@
     }
     
     if (empty($CFG->enableglobalsearch)) {
-        error(get_string('globalsearchdisabled', 'search'));
+        print_error('globalsearchdisabled', 'search');
     }
     
     $adv = new Object();
     
                 print "<li value='".($listing->number+1)."'><a href='".str_replace('DEFAULT_POPUP_SETTINGS', DEFAULT_POPUP_SETTINGS ,$listing->url)."'>$listing->title</a><br />\n"
                    ."<em>".search_shorten_url($listing->url, 70)."</em><br />\n"
-                   ."{$typestr}: ".$listing->doctype.", {$scorestr}: ".round($listing->score, 3).", {$authorstr}: ".$listing->author."\n"
-                   ."</li>\n";
-            }
-            
+                   ."{$typestr}: ".$listing->doctype.", {$scorestr}: ".round($listing->score, 3);
+                if (!empty($listing->author)){
+                    print ", {$authorstr}: ".$listing->author."\n"
+                        ."</li>\n";
+                }
+            }            
             print "</ol>";
             print $page_links;
-        } 
-    
+        }     
         print_box_end();
     ?>
     <div align="center">
     }
     print_box_end();
     print_footer();
-?>
\ No newline at end of file
+?>