From 0d2a4911515604829909f96f47cdffd4a76975be Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 27 Mar 2009 10:54:37 -0600 Subject: [PATCH] Use is_null(). --- imp/lib/Search.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/imp/lib/Search.php b/imp/lib/Search.php index 5324e20fc..4363296f7 100644 --- a/imp/lib/Search.php +++ b/imp/lib/Search.php @@ -616,7 +616,9 @@ class IMP_Search */ public function isSearchMbox($id = null) { - return ($id === null) ? !empty($this->_id) : isset($_SESSION['imp']['search']['q'][$this->_strip($id)]); + return is_null($id) + ? !empty($this->_id) + : isset($_SESSION['imp']['search']['q'][$this->_strip($id)]); } /** @@ -641,7 +643,9 @@ class IMP_Search */ public function searchMboxID() { - return ($this->_id !== null) ? $this->_id : false; + return is_null($this->_id) + ? false + : $this->_id; } /** @@ -654,7 +658,9 @@ class IMP_Search */ protected function _strip($id) { - return ($id === null) ? $this->_id : ((strpos($id, IMP::SEARCH_MBOX) === 0) ? substr($id, strlen(IMP::SEARCH_MBOX)) : $id); + return is_null($id) + ? $this->_id + : ((strpos($id, IMP::SEARCH_MBOX) === 0) ? substr($id, strlen(IMP::SEARCH_MBOX)) : $id); } /** -- 2.11.0