dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check for null before calling a textResults method to (fixes T165091)
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialSearch.php
diff --git
a/includes/specials/SpecialSearch.php
b/includes/specials/SpecialSearch.php
index
139e4f7
..
2a5016f
100644
(file)
--- a/
includes/specials/SpecialSearch.php
+++ b/
includes/specials/SpecialSearch.php
@@
-352,12
+352,16
@@
class SpecialSearch extends SpecialPage {
$out->addHTML( $dymWidget->render( $term, $textMatches ) );
}
$out->addHTML( $dymWidget->render( $term, $textMatches ) );
}
- $out->addHTML( "<div class='searchresults'>" );
-
$hasErrors = $textStatus && $textStatus->getErrors();
$hasOtherResults = $textMatches &&
$textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
$hasErrors = $textStatus && $textStatus->getErrors();
$hasOtherResults = $textMatches &&
$textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
+ if ( $textMatches && $textMatches->hasInterwikiResults( SearchResultSet::SECONDARY_RESULTS ) ) {
+ $out->addHTML( '<div class="searchresults mw-searchresults-has-iw">' );
+ } else {
+ $out->addHTML( '<div class="searchresults">' );
+ }
+
if ( $hasErrors ) {
list( $error, $warning ) = $textStatus->splitByErrorType();
if ( $error->getErrors() ) {
if ( $hasErrors ) {
list( $error, $warning ) = $textStatus->splitByErrorType();
if ( $error->getErrors() ) {
@@
-475,7
+479,9
@@
class SpecialSearch extends SpecialPage {
if ( $title->isKnown() ) {
$messageName = 'searchmenu-exists';
$linkClass = 'mw-search-exists';
if ( $title->isKnown() ) {
$messageName = 'searchmenu-exists';
$linkClass = 'mw-search-exists';
- } elseif ( $title->quickUserCan( 'create', $this->getUser() ) ) {
+ } elseif ( ContentHandler::getForTitle( $title )->supportsDirectEditing()
+ && $title->quickUserCan( 'create', $this->getUser() )
+ ) {
$messageName = 'searchmenu-new';
}
}
$messageName = 'searchmenu-new';
}
}