OSDN Git Service

Merge branch 'skinnable-master' of ssh://shizuki@git.sourceforge.jp/gitroot/nucleus...
[nucleus-jp/nucleus-next.git] / nucleus / libs / COMMENTACTIONS.php
index 410b2f5..dd469f0 100644 (file)
@@ -88,27 +88,14 @@ class CommentActions extends BaseActions
        }\r
        \r
        /**\r
-        * CommentActions::getDefinedActions()\r
+        * CommentActions::getAvailableActions()\r
         * \r
-        * @static
         * @param       void\r
         * @return array        actions array\r
         */\r
-       static public function getDefinedActions()
+       public function getAvailableActions()\r
        {\r
-               return array_merge(self::$defined_actions, parent::getDefinedActions());
-       }\r
-       \r
-       /**\r
-        * CommentActions::setParser()\r
-        * \r
-        * @param       object  $parser instance of Parser class\r
-        * @return      void\r
-        */\r
-       public function setParser(&$parser)\r
-       {\r
-               $this->parser =& $parser;\r
-               return;\r
+               return array_merge(self::$defined_actions, parent::getAvailableActions());\r
        }\r
        \r
        /**\r
@@ -417,8 +404,8 @@ class CommentActions extends BaseActions
        {\r
                $data = array(\r
                        'itemid'        => $this->commentsObj->itemid,\r
-                       'timestamp'     => $this->commentsObj->itemActions->currentItem->timestamp,\r
-                       'title'         => $this->commentsObj->itemActions->currentItem->title,\r
+                       'timestamp'     => $this->commentsObj->itemActions->currentItem['timestamp'],\r
+                       'title'         => $this->commentsObj->itemActions->currentItem['title'],\r
                        'extra'         => $this->commentsObj->itemActions->linkparams\r
                );\r
                \r
@@ -487,7 +474,7 @@ class CommentActions extends BaseActions
         */\r
        public function parse_time($format = '')\r
        {\r
-               if ( $format === '' )\r
+               if ( $format !== '' )
                {\r
                        /* do nothing */\r
                        ;\r
@@ -654,7 +641,7 @@ class CommentActions extends BaseActions
         */\r
        public function parse_userlinkraw()\r
        {\r
-               echo $this->currentComment['userlinkraw'];\r
+               echo (array_key_exists('userlinkraw', $this->currentComment) && !empty($this->currentComment['userlinkraw'])) ? $this->currentComment['userlinkraw'] : '';\r
                return;\r
        }\r
        \r
@@ -695,7 +682,7 @@ class CommentActions extends BaseActions
        }\r
        \r
        /**\r
-        * ItemActions::checkCondition()\r
+        * CommentActions::checkCondition()\r
         * Checks conditions for if statements\r
         *\r
         * @param       string  $field  type of <%if%>\r
@@ -703,7 +690,7 @@ class CommentActions extends BaseActions
         * @param       string  $value  value of property\r
         * @return      boolean\r
         */\r
-       private function checkCondition($field, $name='', $value = '') {\r
+       protected function checkCondition($field, $name='', $value = '') {\r
                global $catid, $blog, $member, $itemidnext, $itemidprev, $manager, $archiveprevexists, $archivenextexists;\r
                $condition = 0;\r
                switch ( $field )\r