}\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
{\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
*/\r
public function parse_time($format = '')\r
{\r
- if ( $format === '' )\r
+ if ( $format !== '' )
{\r
/* do nothing */\r
;\r
*/\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
}\r
\r
/**\r
- * ItemActions::checkCondition()\r
+ * CommentActions::checkCondition()\r
* Checks conditions for if statements\r
*\r
* @param string $field type of <%if%>\r
* @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