Skip to content
Snippets Groups Projects
Commit 057b0816 authored by Peter Rotich's avatar Peter Rotich
Browse files

thread: Add $options to postThreadEntry

parent 2cf05961
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,13 @@ class ThreadAjaxAPI extends AjaxController { ...@@ -120,7 +120,13 @@ class ThreadAjaxAPI extends AjaxController {
$thread->getObject()->postThreadEntry('N', $thread->getObject()->postThreadEntry('N',
array( array(
'title' => __('New Collaborator Added'), 'title' => __('New Collaborator Added'),
'note' => $note)); 'note' => $note
),
array(
'poster' => $thisstaff,
'alert' => false
)
);
$info = array('msg' => sprintf(__('%s added as a collaborator'), $info = array('msg' => sprintf(__('%s added as a collaborator'),
Format::htmlchars($c->getName()))); Format::htmlchars($c->getName())));
return self::_collaborators($thread, $info); return self::_collaborators($thread, $info);
......
...@@ -110,6 +110,10 @@ class Export { ...@@ -110,6 +110,10 @@ class Export {
return false; return false;
} }
static function saveTasks(sql, $filename, $how='csv') {
return false;
}
static function saveUsers($sql, $filename, $how='csv') { static function saveUsers($sql, $filename, $how='csv') {
$exclude = array('name', 'email'); $exclude = array('name', 'email');
......
...@@ -288,12 +288,14 @@ class Task extends TaskModel implements Threadable { ...@@ -288,12 +288,14 @@ class Task extends TaskModel implements Threadable {
return $thread; return $thread;
} }
function postThreadEntry($type, $vars) { function postThreadEntry($type, $vars, $options=array()) {
$errors = array(); $errors = array();
$poster = isset($options['poster']) ? $options['poster'] : null;
$alert = isset($options['alert']) ? $options['alert'] : true;
switch ($type) { switch ($type) {
case 'N': case 'N':
default: default:
return $this->postNote($vars, $errors); return $this->postNote($vars, $errors, $poster, $alert);
} }
} }
......
...@@ -1983,6 +1983,6 @@ abstract class ThreadEntryAction { ...@@ -1983,6 +1983,6 @@ abstract class ThreadEntryAction {
interface Threadable { interface Threadable {
function getThreadId(); function getThreadId();
function getThread(); function getThread();
function postThreadEntry($type, $vars); function postThreadEntry($type, $vars, $options=array());
} }
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment