From 4c1cd515080dfa96e7dfeb231a1ec9ad55c4d293 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Sat, 18 Jun 2011 00:03:27 +0200 Subject: [PATCH] Display consistent information on table index's 'Null' field: 'Yes'/'No' instead of MySQL version dependent --- libraries/Index.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/Index.class.php b/libraries/Index.class.php index 13947ffb3a..7594f0c16a 100644 --- a/libraries/Index.class.php +++ b/libraries/Index.class.php @@ -504,7 +504,7 @@ class PMA_Index $r .= ''; $r .= '' . htmlspecialchars($column->getCardinality()) . ''; $r .= '' . htmlspecialchars($column->getCollation()) . ''; - $r .= '' . htmlspecialchars($column->getNull()) . ''; + $r .= '' . htmlspecialchars($column->getNull(true)) . ''; if ($column->getSeqInIndex() == 1) { $r .= '' @@ -679,9 +679,11 @@ class PMA_Index_Column return $this->_cardinality; } - public function getNull() + public function getNull($as_text = false) { - return $this->_null; + return $as_text + ? (!$this->_null || $this->_null == 'NO' ? __('No') : __('Yes')) + : $this->_null; } public function getSeqInIndex() -- 2.11.4.GIT