Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311880

Change subject: Fix check for content text, so falsy values (e.g. the string 
'0') do not prevent metadata generation.
......................................................................

Fix check for content text, so falsy values (e.g. the string '0')
do not prevent metadata generation.

Change-Id: Ie505bfe26b7b52c843ef6dadc8777f22d147a36e
---
M includes/ArticleMetadata.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/80/311880/1

diff --git a/includes/ArticleMetadata.php b/includes/ArticleMetadata.php
index 75d1d3a..8bdcbe9 100755
--- a/includes/ArticleMetadata.php
+++ b/includes/ArticleMetadata.php
@@ -727,7 +727,7 @@
                        if ( $article ) {
                                $content = $article->getContent();
                                $text = ContentHandler::getContentText( 
$content );
-                               if ( $text ) {
+                               if ( $text !== null ) {
                                        $this->metadata[$pageId]['snippet'] = 
self::generateArticleSnippet( $text );
                                        $this->metadata[$pageId]['reference'] = 
self::checkReferenceTag( $text );
                                }

-- 
To view, visit https://gerrit.wikimedia.org/r/311880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie505bfe26b7b52c843ef6dadc8777f22d147a36e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to