OSDN Git Service

judged variable type
authorshizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 30 Oct 2007 16:43:30 +0000 (16:43 +0000)
committershizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Tue, 30 Oct 2007 16:43:30 +0000 (16:43 +0000)
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

index 7fb8647..fe03a99 100644 (file)
@@ -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;
                }
        }