From c9c7296009b1156e6f70b5e6c9507e1b8723a098 Mon Sep 17 00:00:00 2001 From: shizuki Date: Tue, 30 Oct 2007 16:43:30 +0000 Subject: [PATCH 1/1] judged variable type git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-3@346 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- utf8/nucleus/libs/ITEMACTIONS.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/utf8/nucleus/libs/ITEMACTIONS.php b/utf8/nucleus/libs/ITEMACTIONS.php index 7fb8647..fe03a99 100644 --- a/utf8/nucleus/libs/ITEMACTIONS.php +++ b/utf8/nucleus/libs/ITEMACTIONS.php @@ -14,8 +14,8 @@ * * @license http://nucleuscms.org/license.txt GNU General Public License * @copyright Copyright (C) 2002-2007 The Nucleus Group - * @version $Id: ITEMACTIONS.php,v 1.5.2.1 2007-09-05 06:59:47 kimitake Exp $ - * @version $NucleusJP: ITEMACTIONS.php,v 1.5 2007/03/22 03:30:14 kmorimatsu Exp $ + * @version $Id: ITEMACTIONS.php,v 1.5.2.2 2007-10-30 16:43:30 shizuki Exp $ + * @version $NucleusJP: ITEMACTIONS.php,v 1.5.2.1 2007/09/05 06:59:47 kimitake Exp $ */ class ITEMACTIONS extends BaseActions { @@ -206,18 +206,27 @@ class ITEMACTIONS extends BaseActions { } function parse_title($format = '') { + if (is_array($this->currentItem)) { + $itemtitle = $this->currentItem['title']; + } elseif (is_object($this->currentItem)) { + $itemtitle = $this->currentItem->title; + } switch ($format) { case 'xml': - echo stringToXML ($this->currentItem->title); +// echo stringToXML ($this->currentItem->title); + echo stringToXML ($itemtitle); break; case 'attribute': - echo stringToAttribute ($this->currentItem->title); +// echo stringToAttribute ($this->currentItem->title); + echo stringToAttribute ($itemtitle); break; case 'raw': - echo $this->currentItem->title; +// echo $this->currentItem->title; + echo $itemtitle; break; default: - $this->highlightAndParse($this->currentItem->title); +// $this->highlightAndParse($this->currentItem->title); + $this->highlightAndParse($itemtitle); break; } } -- 2.11.0