added mail properties

This commit is contained in:
JT Smith 2006-04-10 00:12:28 +00:00
parent 504de54d61
commit 47a79bf060
5 changed files with 152 additions and 3 deletions

View file

@ -183,6 +183,14 @@ sub updateCs {
$session->db->write("alter table Post_read drop column postId");
$session->db->write("alter table Post_read drop column readDate");
$session->db->write("alter table Post_read rename Thread_read");
print "\t\tAdding email to discussion support.\n";
$session->db->write("alter table Collaboration add column mailServer varchar(255)");
$session->db->write("alter table Collaboration add column mailAccount varchar(255)");
$session->db->write("alter table Collaboration add column mailPassword varchar(255)");
$session->db->write("alter table Collaboration add column mailAddress varchar(255)");
$session->db->write("alter table Collaboration add column mailPrefix varchar(255)");
$session->db->write("alter table Collaboration add column getMail int not null 0");
$session->db->write("alter table Collaboration add column getMailInterval int not null default 300");
}
#-------------------------------------------------

View file

@ -633,13 +633,15 @@ sub notifySubscribers {
groupId=>$self->getThread->getParent->get("subscriptionGroupId"),
status=>"completed",
subject=>$self->getThread->getParent->get("mailPrefix").$self->get("subject"),
message=>$message
message=>$message,
messageId=>"cs-".$self->getId
});
$inbox->addMessage({
groupId=>$self->getThread->get("subscriptionGroupId"),
status=>"completed",
subject=>$self->getThread->getParent->get("mailPrefix").$self->get("subject"),
message=>$message
message=>$message,
messageId=>"cs-".$self->getId
});
}

View file

@ -261,6 +261,30 @@ sub definition {
fieldType=>"workflow",
defaultValue=>"pbworkflow000000000003"
},
mailServer=>{
fieldType=>"text",
defaultValue=>undef
},
mailAccount=>{
fieldType=>"text",
defaultValue=>undef
},
mailPassword=>{
fieldType=>"password",
defaultValue=>undef
},
mailAddress=>{
fieldType=>"email",
defaultValue=>undef
},
getMail=>{
fieldType=>"yesNo",
defaultValue=>0
},
getMailInterval=>{
fieldType=>"interval",
defaultValue=>300
},
displayLastReply =>{
fieldType=>"yesNo",
defaultValue=>0
@ -419,6 +443,43 @@ sub getEditForm {
my $self = shift;
my $tabform = $self->SUPER::getEditForm;
my $i18n = WebGUI::International->new($self->session,"Asset_Collaboration");
$tabform->addTab("mail",$i18n->get("mail"), 9);
$tabform->getTab("mail")->yesNo(
name=>"getMail",
value=>$self->getValue("getMail"),
label=>$i18n->get("get mail"),
hoverHelp=>$i18n->get("get mail help"),
);
$tabform->getTab("mail")->text(
name=>"mailServer",
value=>$self->getValue("mailServer"),
label=>$i18n->get("mail server"),
hoverHelp=>$i18n->get("mail server help"),
);
$tabform->getTab("mail")->text(
name=>"mailAccount",
value=>$self->getValue("mailAccount"),
label=>$i18n->get("mail account"),
hoverHelp=>$i18n->get("mail account help"),
);
$tabform->getTab("mail")->password(
name=>"mailPassword",
value=>$self->getValue("mailPassword"),
label=>$i18n->get("mail password"),
hoverHelp=>$i18n->get("mail password help"),
);
$tabform->getTab("mail")->email(
name=>"mailAddress",
value=>$self->getValue("mailAddress"),
label=>$i18n->get("mail address"),
hoverHelp=>$i18n->get("mail address help"),
);
$tabform->getTab("mail")->interval(
name=>"getMailInterval",
value=>$self->getValue("getMailInterval"),
label=>$i18n->get("get mail interval"),
hoverHelp=>$i18n->get("get mail interval help"),
);
$tabform->getTab("display")->interval(
-name=>"visitorCacheTimeout",
-label=>$i18n->get('visitor cache timeout'),

View file

@ -163,7 +163,7 @@ sub execute {
}
my $post = undef;
if ($message->{inReplyTo}) {
$message->{inReplyTo} =~ m/WebGUI\-([\w_-]{22})/;
$message->{inReplyTo} =~ m/cs\-([\w_-]{22})/;
my $id = $1;
$post = WebGUI::Asset->newByDynamicClass($self->session, $id);
}

View file

@ -2,6 +2,84 @@ package WebGUI::i18n::English::Asset_Collaboration;
our $I18N = {
'get mail interval' => {
message => q|Check Mail Every|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'get mail interval help' => {
message => q|How often should we check for mail on the server?|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'mail password' => {
message => q|Password|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'mail password help' => {
message => q|The password of the account to log in to the server with.|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'mail address' => {
message => q|Address|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'mail address help' => {
message => q|The email address that users can send messages to in order to post messages.|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'mail account' => {
message => q|Account|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'mail account help' => {
message => q|The account name (username / email address) to use to log in to the mail server.|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'mail server' => {
message => q|Server|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'mail server help' => {
message => q|The hostname or IP address of the mail server to fetch mail from.|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'get mail' => {
message => q|Get mail?|,
lastUpdated => 0,
context => q|field label for mail setting|
},
'get mail help' => {
message => q|Do you want to have this Collaboration System fetch posts from an email account?|,
lastUpdated => 0,
context => q|help for mail setting field label|
},
'mail' => {
message => q|Mail|,
lastUpdated => 0,
context => q|the name of the email settings tab|
},
'rejected' => {
message => q|Rejected|,
lastUpdated => 0,