[MediaWiki-commits] [Gerrit] Allow titles with falsy title text in suggestions - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Allow titles with falsy title text in suggestions .. Allow titles with falsy title text in suggestions A valid title, such as 0, would end up being ignored in this clause and not providing a title. Make the empty string check stricter to allow these titles through. Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588 --- M includes/search/SearchSuggestion.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: DCausse: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/search/SearchSuggestion.php b/includes/search/SearchSuggestion.php index cd9062b..80a437b 100644 --- a/includes/search/SearchSuggestion.php +++ b/includes/search/SearchSuggestion.php @@ -84,7 +84,7 @@ */ public function setText( $text, $setTitle = true ) { $this->text = $text; - if ( $setTitle && $text ) { + if ( $setTitle && $text !== '' && $text !== null ) { $this->setSuggestedTitle( Title::makeTitle( 0, $text ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/279555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: DCausse Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow titles with falsy title text in suggestions - change (mediawiki/core)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/279555 Change subject: Allow titles with falsy title text in suggestions .. Allow titles with falsy title text in suggestions A valid title, such as 0, would end up being ignored in this clause and not providing a title. Make the empty string check stricter to allow these titles through. Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588 --- M includes/search/SearchSuggestion.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/55/279555/1 diff --git a/includes/search/SearchSuggestion.php b/includes/search/SearchSuggestion.php index cd9062b..80a437b 100644 --- a/includes/search/SearchSuggestion.php +++ b/includes/search/SearchSuggestion.php @@ -84,7 +84,7 @@ */ public function setText( $text, $setTitle = true ) { $this->text = $text; - if ( $setTitle && $text ) { + if ( $setTitle && $text !== '' && $text !== null ) { $this->setSuggestedTitle( Title::makeTitle( 0, $text ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/279555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits