$template =& $manager->getTemplate($templateName);
// create parser object & action handler
- $actions =& new ITEMACTIONS($this);
- $parser =& new PARSER($actions->getDefinedActions(),$actions);
+ $actions = new ITEMACTIONS($this);
+ $parser = new PARSER($actions->getDefinedActions(),$actions);
$actions->setTemplate($template);
$actions->setHighlight($highlight);
$actions->setLastVisit($lastVisit);
$timestamp = $item->timestamp;
if ($old_date != 0) {
$oldTS = strtotime($old_date);
- $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => $oldTS
+ );
+ $manager->notify('PreDateFoot', $param);
$tmp_footer = strftimejp(isset($template['DATE_FOOTER'])?$template['DATE_FOOTER']:'', $oldTS);
$parser->parse($tmp_footer);
- $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => $oldTS
+ );
+ $manager->notify('PostDateFoot', $param);
}
- $manager->notify('PreDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => $timestamp
+ );
+ $manager->notify('PreDateHead', $param);
// note, to use templatvars in the dateheader, the %-characters need to be doubled in
// order to be preserved by strftime
$tmp_header = strftimejp((isset($template['DATE_HEADER']) ? $template['DATE_HEADER'] : null), $timestamp);
$parser->parse($tmp_header);
- $manager->notify('PostDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => $timestamp
+ );
+ $manager->notify('PostDateHead', $param);
}
$old_date = $new_date;
}
// parse item
$parser->parse($template['ITEM_HEADER']);
- $manager->notify('PreItem', array('blog' => &$this, 'item' => &$item));
+ $param = array(
+ 'blog' => &$this,
+ 'item' => &$item
+ );
+ $manager->notify('PreItem', $param);
$parser->parse($template['ITEM']);
- $manager->notify('PostItem', array('blog' => &$this, 'item' => &$item));
+ $param = array(
+ 'blog' => &$this,
+ 'item' => &$item
+ );
+ $manager->notify('PostItem', $param);
$parser->parse($template['ITEM_FOOTER']);
}
// add another date footer if there was at least one item
if (($numrows > 0) && $dateheads) {
- $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => strtotime($old_date)
+ );
+ $manager->notify('PreDateFoot', $param);
$parser->parse($template['DATE_FOOTER']);
- $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
+ $param = array(
+ 'blog' => &$this,
+ 'timestamp' => strtotime($old_date)
+ );
+ $manager->notify('PostDateFoot', $param);
}
sql_free_result($items); // free memory
$timestamp = date('Y-m-d H:i:s',$timestamp);
- $manager->notify('PreAddItem',array('title' => &$title, 'body' => &$body, 'more' => &$more, 'blog' => &$this, 'authorid' => &$authorid, 'timestamp' => &$timestamp, 'closed' => &$closed, 'draft' => &$draft, 'catid' => &$catid));
+ $param = array(
+ 'title' => &$title,
+ 'body' => &$body,
+ 'more' => &$more,
+ 'blog' => &$this,
+ 'authorid' => &$authorid,
+ 'timestamp' => &$timestamp,
+ 'closed' => &$closed,
+ 'draft' => &$draft,
+ 'catid' => &$catid
+ );
+ $manager->notify('PreAddItem', $param);
$ititle = sql_real_escape_string($title);
$ibody = sql_real_escape_string($body);
sql_query($query);
$itemid = sql_insert_id();
- $manager->notify('PostAddItem',array('itemid' => $itemid));
+ $param = array('itemid' => $itemid);
+ $manager->notify('PostAddItem', $param);
if (!$draft)
$this->updateUpdateFile();
$frommail = $member->getNotifyFromMailAddress();
- $notify =& new NOTIFICATION($this->getNotifyAddress());
+ $notify = new NOTIFICATION($this->getNotifyAddress());
$notify->notify($mailto_title, $mailto_msg , $frommail);
$catName = $catName . $i;
}
- $manager->notify(
- 'PreAddCategory',
- array(
- 'blog' => &$this,
- 'name' => &$catName,
- 'description' => $catDescription
- )
+ $param = array(
+ 'blog' => &$this,
+ 'name' => &$catName,
+ 'description' => $catDescription
);
+ $manager->notify('PreAddCategory', $param);
$query = 'INSERT INTO '.sql_table('category').' (cblog, cname, cdesc) VALUES (' . $this->getID() . ", '" . sql_real_escape_string($catName) . "', '" . sql_real_escape_string($catDescription) . "')";
sql_query($query);
$catid = sql_insert_id();
- $manager->notify(
- 'PostAddCategory',
- array(
- 'blog' => &$this,
- 'name' => $catName,
- 'description' => $catDescription,
- 'catid' => $catid
- )
+ $param = array(
+ 'blog' => &$this,
+ 'name' => $catName,
+ 'description' => $catDescription,
+ 'catid' => $catid
);
+ $manager->notify('PostAddCategory', $param);
return $catid;
} else {
*/
function getSqlSearch($query, $amountMonths = 0, &$highlight, $mode = '')
{
- $searchclass =& new SEARCH($query);
+ $searchclass = new SEARCH($query);
$highlight = $searchclass->inclusive;
$archive['year'] = $data['year'];
$data['archivelink'] = createArchiveLink($this->getID(),$archivedate,$linkparams);
- $manager->notify(
- 'PreArchiveListItem',
- array(
- 'listitem' => &$data
- )
- );
+ $param = array('listitem' => &$data);
+ $manager->notify('PreArchiveListItem', $param);
$temp = TEMPLATE::fill($template['ARCHIVELIST_LISTITEM'],$data);
echo strftimejp($temp,$current->itime);
}
}
- $manager->notify(
- 'PreCategoryListItem',
- array(
- 'listitem' => &$data
- )
- );
+ $param = array('listitem' => &$data);
+ $manager->notify('PreCategoryListItem', $param);
echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
//$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
$list['blogname'] = $data['bname'];
}
- $manager->notify(
- 'PreBlogListItem',
- array(
- 'listitem' => &$list
- )
- );
+ $param = array('listitem' => &$list);
+ $manager->notify('PreBlogListItem', $param);
echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
if ($tmem->isTeamMember($this->getID()))
return 0;
- $manager->notify(
- 'PreAddTeamMember',
- array(
- 'blog' => &$this,
- 'member' => &$tmem,
- 'admin' => &$admin
- )
+ $param = array(
+ 'blog' => &$this,
+ 'member' => &$tmem,
+ 'admin' => &$admin
);
+ $manager->notify('PreAddTeamMember', $param);
// add to team
$query = 'INSERT INTO '.sql_table('team').' (TMEMBER, TBLOG, TADMIN) '
. 'VALUES (' . $memberid .', '.$this->getID().', "'.$admin.'")';
sql_query($query);
- $manager->notify(
- 'PostAddTeamMember',
- array(
- 'blog' => &$this,
- 'member' => &$tmem,
- 'admin' => $admin
- )
-
+
+ $param = array(
+ 'blog' => &$this,
+ 'member' => &$tmem,
+ 'admin' => $admin
);
+ $manager->notify('PostAddTeamMember', $param);
$logMsg = sprintf(_TEAM_ADD_NEWTEAMMEMBER, $tmem->getDisplayName(), $memberid, $this->getName());
ACTIONLOG::add(INFO, $logMsg);
// This $pinged is allow a plugin to tell other hook to the event that a ping is sent already
// Note that the plugins's calling order is subject to thri order in the plugin list
$pinged = false;
- $manager->notify(
- 'JustPosted',
- array('blogid' => $blogid,
- 'pinged' => &$pinged
- )
+ $param = array(
+ 'blogid' => $blogid,
+ 'pinged' => &$pinged
);
+ $manager->notify('JustPosted', $param);
// clear all expired future posts
sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()");