$arr2 = $this->getAssignedTo();
$this->assignedto =& $arr;
- //If no one is assigned, then assign it to "100" - NOBODY
+ // If no one is assigned, then assign it to "100" - NOBODY
if (!$arr || count($arr) < 1 || ((count($arr)==1) && ($arr[0]==''))) {
$arr=array('100');
}
$assigned = array();
foreach ($old_assigned as $user_id) {
$assigned[] = user_get_object($user_id)->getRealName();
- }
+ }
$this->addHistory('assigned_to', join(', ', $assigned));
$arrChangedAndInNotice['assigned'] = ">";
- $has_changes = true;
+ $has_changes = true;
}
$old_array = array_keys($this->getDependentOn());
$body = "Task #". $this->getID() ." has been updated by $user.".
"\n\nProject: ". $this->ProjectGroup->Group->getPublicName();
- if (isset($arrChangedAndInNotice['subproject']))
- $body .= "\n". $arrChangedAndInNotice['subproject']."Subproject: ". $this->ProjectGroup->getName();
+ if (isset($arrChangedAndInNotice['subproject']))
+ $body .= "\n". $arrChangedAndInNotice['subproject']."Subproject: ". $this->ProjectGroup->getName();
- if (isset($arrChangedAndInNotice['summary']))
- $body .= "\n". $arrChangedAndInNotice['summary']. "Summary: ".util_unconvert_htmlspecialchars( $this->getSummary() );
+ if (isset($arrChangedAndInNotice['summary']))
+ $body .= "\n". $arrChangedAndInNotice['summary']. "Summary: ".util_unconvert_htmlspecialchars( $this->getSummary() );
- if (isset($arrChangedAndInNotice['complete']))
- $body .= "\n". $arrChangedAndInNotice['complete']. "Complete: ". $this->getPercentComplete() ."%";
+ if (isset($arrChangedAndInNotice['complete']))
+ $body .= "\n". $arrChangedAndInNotice['complete']. "Complete: ". $this->getPercentComplete() ."%";
- if (isset($arrChangedAndInNotice['status']))
- $body .= "\n". $arrChangedAndInNotice['status']. "Status: ". $this->getStatusName();
+ if (isset($arrChangedAndInNotice['status']))
+ $body .= "\n". $arrChangedAndInNotice['status']. "Status: ". $this->getStatusName();
if (isset($arrChangedAndInNotice['assigned'])) {
$assigned = array();
$body .= "\n". $arrChangedAndInNotice['assigned']. "Assigned: ". join(', ', $assigned);
}
- $body .= "\n\nDescription: ". util_unconvert_htmlspecialchars( $this->getDetails() );
+ $body .= "\n\nDescription: ". util_unconvert_htmlspecialchars( $this->getDetails() );
/*
Now get the followups to this task
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-$ath->adminHeader(array ('title'=>_('Customize Browse List'),'pagename'=>'tracker_admin_customize_liste','titlevals'=>array($ath->getName())));
+$ath->adminHeader(array('title'=>_('Customize Browse List'),'pagename'=>'tracker_admin_customize_liste','titlevals'=>array($ath->getName())));
/*
List of possible user built Selection Boxes for an ArtifactType
*/
-$ath->adminHeader(array ('title'=>sprintf(_('Delete a custom field for %s'),$ath->getName())));
+$ath->adminHeader(array('title'=>sprintf(_('Delete a custom field for %s'),$ath->getName())));
$id = getStringFromRequest('id');
$HTML->footer (array());
} else {
$HTML->header(array('title'=>_('Error - Choose a User To Monitor First')));
- $HTML->footer (array());
+ $HTML->footer(array());
}
}
session_require_login();
- $forum_id = getIntFromRequest('forum_id');
- $group_id = getIntFromRequest('group_id');
+$forum_id = getIntFromRequest('forum_id');
+$group_id = getIntFromRequest('group_id');
- if ($forum_id && $group_id) {
- //
- // Set up local objects
- //
+if ($forum_id && $group_id) {
+ //
+ // Set up local objects
+ //
$g = group_get_object($group_id);
- if (!$g || !is_object($g) || $g->isError()) {
- exit_no_group();
- }
+ if (!$g || !is_object($g) || $g->isError()) {
+ exit_no_group();
+ }
- $f=new Forum($g,$forum_id);
- if (!$f || !is_object($f)) {
- exit_error(_('Error Getting Forum'),'forums');
- } elseif ($f->isError()) {
- exit_error($f->getErrorMessage(),'forums');
- }
+ $f=new Forum($g,$forum_id);
+ if (!$f || !is_object($f)) {
+ exit_error(_('Error Getting Forum'),'forums');
+ } elseif ($f->isError()) {
+ exit_error($f->getErrorMessage(),'forums');
+ }
- if (getStringFromRequest('stop')) {
- $confirm = getStringFromRequest('confirm');
- $cancel = getStringFromRequest('cancel');
- if ($cancel) {
- session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id);
- }
- if (!$confirm) {
- forum_header(array('title'=>_('Stop Monitoring')));
+ if (getStringFromRequest('stop')) {
+ $confirm = getStringFromRequest('confirm');
+ $cancel = getStringFromRequest('cancel');
+ if ($cancel) {
+ session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id);
+ }
+ if (!$confirm) {
+ forum_header(array('title'=>_('Stop Monitoring'), 'modal' => 1));
echo $HTML->confirmBox(
sprintf(_('You are about to stop monitoring the %1$s forum.'),$f->getName()).
'<br/><br/>'.
_('Do you really want to unsubscribe ?'),
- array('group_id' => $group_id, 'forum_id' => $forum_id, 'stop' => 1),
- array('confirm' => _('Unsubscribe'), 'cancel' => _('Cancel')) );
- forum_footer(array());
- exit;
- }
- if (!$f->stopMonitor()) {
- exit_error($f->getErrorMessage(),'forums');
- } else {
- session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum monitoring deactivated')));
- }
- } elseif(getIntFromRequest('start')) {
- if (!$f->setMonitor()) {
- exit_error($f->getErrorMessage(),'forums');
- } else {
- session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum monitoring started')));
- }
+ array('group_id' => $group_id, 'forum_id' => $forum_id, 'stop' => 1),
+ array('confirm' => _('Unsubscribe'), 'cancel' => _('Cancel')) );
+ forum_footer(array());
+ exit;
+ }
+ if (!$f->stopMonitor()) {
+ exit_error($f->getErrorMessage(),'forums');
+ } else {
+ session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum monitoring deactivated')));
+ }
+ } elseif(getIntFromRequest('start')) {
+ if (!$f->setMonitor()) {
+ exit_error($f->getErrorMessage(),'forums');
+ } else {
+ session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum monitoring started')));
}
- } else {
- exit_missing_param('',array(_('Forum ID'),_('Project ID')),'forums');
+ }
+} else {
+ exit_missing_param('',array(_('Forum ID'),_('Project ID')),'forums');
}
?>
// If the link comes from the project, display the project header. If it comes from the user page, display the normal site header
if ($group_id) {
- forum_header(array('title'=>_('My Monitored Forums')));
+ forum_header(array('title'=>_('My Monitored Forums')));
} else {
- site_header(array('title'=>_('My Monitored Forums'), 'user_id' => $user_id));
+ site_header(array('title'=>_('My Monitored Forums'), 'user_id' => $user_id));
}
//get the user monitored forums
}
if (!is_object($f)) {
//just skip it - this object should never have been placed here
- } elseif ($f->isError()) {
+ } elseif ($f->isError()) {
echo $f->getErrorMessage();
- } else {
+ } else {
//check if the forum has new content
$fh = new ForumHTML($f);
if (!$fh || !is_object($fh)) {
exit_error(_('Error getting new ForumHTML'),'forums');
- } elseif ($fh->isError()) {
+ } elseif ($fh->isError()) {
exit_error($fh->getErrorMessage(),'forums');
}
$fmf = new ForumMessageFactory($f);
if (!$fmf || !is_object($fmf)) {
exit_error(_('Error getting new ForumMessageFactory'),'forums');
- } elseif ($fmf->isError()) {
+ } elseif ($fmf->isError()) {
exit_error($fmf->getErrorMessage(),'forums');
}
//anything that's new ( new thread or followup) is considered to be a "new thing" and the forum
//is considered to have new contents
if (!empty($msg_arr)) {
- foreach ($msg_arr as $forum_msg_arr) {
- foreach ($forum_msg_arr as $forum_msg) {
- if ($f->getSavedDate() < $forum_msg->getPostDate()) {
- //we've got ourselves a new message or followup for this forum. note that, exit the search
+ foreach ($msg_arr as $forum_msg_arr) {
+ foreach ($forum_msg_arr as $forum_msg) {
+ if ($f->getSavedDate() < $forum_msg->getPostDate()) {
+ //we've got ourselves a new message or followup for this forum. note that, exit the search
$newcontent = "<center>" . html_image('ic/new.png','', '', array('alt' => 'new')) . "</center>";
- break;
+ break;
+ }
}
- }
if ($newcontent != ' ') {
- break;
+ break;
+ }
}
}
- }
/*while (($j < $rows) && ($total_rows < $max_rows)) {
$msg =& $msg_arr["0"][$j];
$total_rows++;
html_image('ic/forum20w.png') .
' ' .
$f->getName() .'</a></td>
- <td style="text-align:center">'.$f->getThreadCount().'</td>
- <td style="text-align:center">'. $f->getMessageCount() .'</td>
- <td style="text-align:center">'. $date .'</td>
+ <td class="align-center">'.$f->getThreadCount().'</td>
+ <td class="align-center">'. $f->getMessageCount() .'</td>
+ <td class="align-center">'. $date .'</td>
<td>' . $newcontent . '</td></tr>';
}
}
if (session_loggedin() && !$f->savePlace()) {
exit_error($f->getErrorMessage(),'forums');
} else {
- forum_header(array('title'=> _('Start New Thread for: ') . $f->getName(),'forum_id'=>$forum_id));
+ forum_header(array('title'=> _('Start New Topic for: ') . $f->getName(), 'forum_id'=>$forum_id, 'modal' => 1));
$fh->showPostForm();
forum_footer(array());
}
// User obviously has to be logged in to save place
session_require_login();
- $forum_id = getIntFromRequest('forum_id');
- $group_id = getIntFromRequest('group_id');
+$forum_id = getIntFromRequest('forum_id');
+$group_id = getIntFromRequest('group_id');
- if ($forum_id && $group_id) {
- //
- // Set up local objects
- //
- $g = group_get_object($group_id);
- if (!$g || !is_object($g) || $g->isError()) {
- exit_no_group();
- }
+if ($forum_id && $group_id) {
+ //
+ // Set up local objects
+ //
+ $g = group_get_object($group_id);
+ if (!$g || !is_object($g) || $g->isError()) {
+ exit_no_group();
+ }
- $f=new Forum($g,$forum_id);
- if (!$f || !is_object($f)) {
- exit_error(_('Error Getting Forum'),'forums');
- } elseif ($f->isError()) {
- exit_error($f->getErrorMessage(),'forums');
- }
+ $f=new Forum($g,$forum_id);
+ if (!$f || !is_object($f)) {
+ exit_error(_('Error Getting Forum'),'forums');
+ } elseif ($f->isError()) {
+ exit_error($f->getErrorMessage(),'forums');
+ }
- if (!$f->savePlace()) {
- exit_error($f->getErrorMessage(),'forums');
- } else {
- session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum Position Saved. New messages will be highlighted when you return')));
- }
+ if (!$f->savePlace()) {
+ exit_error($f->getErrorMessage(),'forums');
} else {
- exit_missing_param('',array(_('Forum ID'),_('Project ID')),'forums');
+ session_redirect('/forum/forum.php?forum_id='.$forum_id.'&group_id='.$group_id.'&feedback='.urlencode(_('Forum Position Saved. New messages will be highlighted when you return')));
+ }
+} else {
+ exit_missing_param('',array(_('Forum ID'),_('Project ID')),'forums');
}
?>