From: diml Date: Mon, 7 Apr 2008 21:12:29 +0000 (+0000) Subject: makes author completley unmentionned when no author X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b93b987d2caf19cfe34e85203e247653e7b9e2ec;p=moodle.git makes author completley unmentionned when no author --- diff --git a/search/LISEZMOI.txt b/search/LISEZMOI.txt index 8780ee3f74..55026e5823 100644 --- a/search/LISEZMOI.txt +++ b/search/LISEZMOI.txt @@ -1,5 +1,5 @@ Cette distribution partielle contient une refonte du moteur de -recherche globalde Moodle. +recherche globale de Moodle. Le moteur de recherche est capable d'indexer et de rechercher des informations dans un grand nombre de contenus stockés diff --git a/search/query.php b/search/query.php index 5d83989188..47b4e78f04 100644 --- a/search/query.php +++ b/search/query.php @@ -43,7 +43,7 @@ } if (empty($CFG->enableglobalsearch)) { - error(get_string('globalsearchdisabled', 'search')); + print_error('globalsearchdisabled', 'search'); } $adv = new Object(); @@ -335,14 +335,15 @@ print "
  • url)."'>$listing->title
    \n" ."".search_shorten_url($listing->url, 70)."
    \n" - ."{$typestr}: ".$listing->doctype.", {$scorestr}: ".round($listing->score, 3).", {$authorstr}: ".$listing->author."\n" - ."
  • \n"; - } - + ."{$typestr}: ".$listing->doctype.", {$scorestr}: ".round($listing->score, 3); + if (!empty($listing->author)){ + print ", {$authorstr}: ".$listing->author."\n" + ."\n"; + } + } print ""; print $page_links; - } - + } print_box_end(); ?>
    @@ -357,4 +358,4 @@ } print_box_end(); print_footer(); -?> \ No newline at end of file +?>