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
Simplify by using ?: operator
[lhc/web/wiklou.git]
/
includes
/
search
/
SearchDatabase.php
diff --git
a/includes/search/SearchDatabase.php
b/includes/search/SearchDatabase.php
index
54bfd28
..
230cded
100644
(file)
--- a/
includes/search/SearchDatabase.php
+++ b/
includes/search/SearchDatabase.php
@@
-38,11
+38,7
@@
abstract class SearchDatabase extends SearchEngine {
* @param IDatabase|null $db The database to search from
*/
public function __construct( IDatabase $db = null ) {
- if ( $db ) {
- $this->db = $db;
- } else {
- $this->db = wfGetDB( DB_REPLICA );
- }
+ $this->db = $db ?: wfGetDB( DB_REPLICA );
}
/**