From: Fomafix Date: Wed, 24 Jun 2015 20:27:25 +0000 (+0000) Subject: Show {{DEFAULTSORT:0}} on info page X-Git-Tag: 1.31.0-rc.0~10967 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=bb3df25a3747a8234fa553fb1decc9c2ab77bb1e;p=lhc%2Fweb%2Fwiklou.git Show {{DEFAULTSORT:0}} on info page The info page of a page with {{DEFAULTSORT:0}} shows the page title as default sort value. Using empty() will consider the string '0' to be false, so use isset() instead. Bug: T103745 Change-Id: I56ea5a38dcd33e822e0fc5b8685777fe1d212b22 --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index bf86b51404..0c34ddb4e5 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -234,7 +234,7 @@ class InfoAction extends FormlessAction { // Display title $displayTitle = $title->getPrefixedText(); - if ( !empty( $pageProperties['displaytitle'] ) ) { + if ( isset( $pageProperties['displaytitle'] ) ) { $displayTitle = $pageProperties['displaytitle']; } @@ -259,7 +259,7 @@ class InfoAction extends FormlessAction { // Default sort key $sortKey = $title->getCategorySortkey(); - if ( !empty( $pageProperties['defaultsort'] ) ) { + if ( isset( $pageProperties['defaultsort'] ) ) { $sortKey = $pageProperties['defaultsort']; }