[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.boalarm.inc.php inc/class.bo...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.boalarm.inc.php inc/class.bo... |
Date: |
Sun, 14 Oct 2007 12:18:53 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 07/10/14 12:18:53
Modified files:
inc : class.boalarm.inc.php class.botts.inc.php
class.uiproject.inc.php class.uirequest.inc.php
class.uiwo_hour.inc.php
class.uiworkorder.inc.php
templates/base : config.tpl
Log message:
clean up mailsettings
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boalarm.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.botts.inc.php?cvsroot=phpgroupware&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uirequest.inc.php?cvsroot=phpgroupware&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiwo_hour.inc.php?cvsroot=phpgroupware&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/config.tpl?cvsroot=phpgroupware&r1=1.6&r2=1.7
Patches:
Index: inc/class.boalarm.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boalarm.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.boalarm.inc.php 26 Jan 2007 14:53:46 -0000 1.14
+++ inc/class.boalarm.inc.php 14 Oct 2007 12:18:52 -0000 1.15
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.boalarm.inc.php,v 1.14 2007/01/26 14:53:46
sigurdne Exp $
+ * @version $Id: class.boalarm.inc.php,v 1.15 2007/10/14 12:18:52
sigurdne Exp $
*/
/**
@@ -455,22 +455,14 @@
$to = current($toarray);
}
- $mail_method=
$this->config->config_data['fmwrkorder_mail'];
-// echo 'mail_method: '.$mail_method .'<BR>';
-
- if ($mail_method=='smtp'):
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
$rc = $this->send->msg('email', $to, $subject,
stripslashes($body), '', $cc,
$bcc,$current_user_address,$current_user_name,'txt');
}
- elseif ($mail_method=='sendmail'):
- {
- $rc= @mail($to,$subject,stripslashes($body),
$headers);
- }
- else:
+ else
{
- $receipt['error'][] = array('msg'=>
lang('Mailing method is not chosen! (admin section)'));
+ $receipt['error'][]=array('msg'=>lang('SMTP
server is not set! (admin section)'));
}
- endif;
// $rc=1;
if (!$rc)
Index: inc/class.botts.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- inc/class.botts.inc.php 24 Aug 2007 13:59:23 -0000 1.37
+++ inc/class.botts.inc.php 14 Oct 2007 12:18:52 -0000 1.38
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage helpdesk
- * @version $Id: class.botts.inc.php,v 1.37 2007/08/24 13:59:23 sigurdne
Exp $
+ * @version $Id: class.botts.inc.php,v 1.38 2007/10/14 12:18:52 sigurdne
Exp $
*/
/**
@@ -769,27 +769,16 @@
$to = current($toarray);
}
- $mail_method=
$this->config->config_data['fmwrkorder_mail'];
-// echo 'mail_method: '.$mail_method .'<BR>';
-
$body = str_replace("\n" ,"</br>",$body);
- if ($mail_method=='smtp'):
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
$rc = $this->send->msg('email', $to, $subject,
stripslashes($body), '', $cc,
$bcc,$current_user_address,$current_user_name,'html');
}
- elseif ($mail_method=='sendmail'):
- {
- $body = '<html><body>' . $body .
'</body></html>';
-
- $rc= @mail($to,$subject,stripslashes($body),
$headers);
- }
- else:
+ else
{
- $receipt['error'][] = array('msg'=>
lang('Mailing method is not chosen! (admin section)'));
+ $receipt['error'][] = array('msg'=>lang('SMTP
server is not set! (admin section)'));
}
- endif;
- // $rc=1;
if (!$rc &&
($this->config->config_data['groupnotification'] ||
$this->config->config_data['ownernotification'] ||
$this->config->config_data['groupnotification']))
{
$receipt['error'][] = array('msg'=> lang('Your
message could not be sent by mail!'));
Index: inc/class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- inc/class.uiproject.inc.php 30 Sep 2007 16:20:36 -0000 1.57
+++ inc/class.uiproject.inc.php 14 Oct 2007 12:18:52 -0000 1.58
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiproject.inc.php,v 1.57 2007/09/30 16:20:36
sigurdne Exp $
+ * @version $Id: class.uiproject.inc.php,v 1.58 2007/10/14 12:18:52
sigurdne Exp $
*/
/**
@@ -659,6 +659,13 @@
unset($values['project_id']);
}
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
+ {
+ if
(!is_object($GLOBALS['phpgw']->send))
+ {
+ $GLOBALS['phpgw']->send
= CreateObject('phpgwapi.send');
+ }
+
if ($values['approval'] &&
$values['mail_address'])
{
$from_name=$GLOBALS['phpgw_info']['user']['fullname'];
@@ -670,17 +677,9 @@
$headers .= "MIME-Version:
1.0\r\n";
$subject = lang(Approval).": ".
$values['project_id'];
- // $message = lang(Project) . " "
. $values['project_id'] ." ". lang('needs approval');
$message = '<a href ="http://'
. $GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiproject.edit','id'=> $values['project_id'])).'">' .
lang(Project) . " " . $values['project_id'] ." ". lang('needs approval')
.'</a>';
- $mail_method=
$config->config_data['fmwrkorder_mail'];
- if ($mail_method=='smtp'):
- {
$bcc = $from_email;
- if
(!is_object($GLOBALS['phpgw']->send))
- {
-
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
- }
$rcpt =
$GLOBALS['phpgw']->send->msg('email',$values['mail_address'], $subject,
stripslashes($message), '', $cc, $bcc, $from_email, $from_name, 'html');
@@ -694,26 +693,12 @@
{
$receipt['message'][]=array('msg'=>lang('%1 is
notified',$values['mail_address']));
}
-
- }
- elseif
($mail_method=='sendmail'):
- {
-
$rcpt=mail($values['mail_address'],$subject,$message, $headers);
- }
- else:
- {
-
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! (admin
section)'));
- $bypass_error=True;
- }
- endif;
- }
}
if (isset($receipt['notice_owner']) AND
is_array($receipt['notice_owner']))
{
if($this->account!=$values['coordinator'] &&
$config->config_data['workorder_approval'])
{
-
$prefs_coordinator =
$this->bocommon->create_preferences($this->currentapp,$values['coordinator']);
$to =
$prefs_coordinator['email'];
@@ -731,13 +716,6 @@
$body = nl2br($body);
- if
(!is_object($GLOBALS['phpgw']->send))
- {
- $GLOBALS['phpgw']->send
= CreateObject('phpgwapi.send');
- }
-
-
-
$returncode =
$GLOBALS['phpgw']->send->msg('email',$to,$subject=lang('project %1 has been
edited',$id),$body, False,False,False, $from_email, $from_name, 'html');
if (!$returncode) // not
nice, but better than failing silently
@@ -752,6 +730,13 @@
}
}
}
+ }
+ else
+ {
+
$receipt['error'][]=array('msg'=>lang('SMTP server is not set! (admin
section)'));
+ $bypass_error=True;
+ }
+ }
if($receipt['error'] && !isset($bypass_error))
{
Index: inc/class.uirequest.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- inc/class.uirequest.inc.php 8 Jun 2007 09:07:30 -0000 1.33
+++ inc/class.uirequest.inc.php 14 Oct 2007 12:18:52 -0000 1.34
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uirequest.inc.php,v 1.33 2007/06/08 09:07:30
sigurdne Exp $
+ * @version $Id: class.uirequest.inc.php,v 1.34 2007/10/14 12:18:52
sigurdne Exp $
*/
/**
@@ -722,22 +722,20 @@
$subject = lang(notify).": ".
$values['request_id'];
$message = lang(request) . " "
. $values['request_id'] ." ". lang('is registered');
- $mail_method=
$this->config->config_data['fmwrkorder_mail'];
- if ($mail_method=='smtp'):
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
$bcc =
$coordinator_email;
- $send =
CreateObject('phpgwapi.send');
- $rcpt =
$send->msg('email', $values['mail_address'], $subject, stripslashes($message),
'', $cc, $bcc, $coordinator_email, $coordinator_name, 'plain');
- }
- elseif
($mail_method=='sendmail'):
+ if
(!is_object($GLOBALS['phpgw']->send))
{
-
$rcpt=mail($values['mail_address'],$subject,$message, $headers);
+
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
+ }
+
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email', $values['mail_address'], $subject,
stripslashes($message), '', $cc, $bcc, $coordinator_email, $coordinator_name,
'plain');
}
- else:
+ else
{
-
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! (admin
section)'));
+
$receipt['error'][]=array('msg'=>lang('SMTP server is not set! (admin
section)'));
}
- endif;
}
if($rcpt)
Index: inc/class.uiwo_hour.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- inc/class.uiwo_hour.inc.php 28 Sep 2007 19:47:47 -0000 1.35
+++ inc/class.uiwo_hour.inc.php 14 Oct 2007 12:18:52 -0000 1.36
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiwo_hour.inc.php,v 1.35 2007/09/28 19:47:47
sigurdne Exp $
+ * @version $Id: class.uiwo_hour.inc.php,v 1.36 2007/10/14 12:18:52
sigurdne Exp $
*/
/**
@@ -839,22 +839,19 @@
$headers .= "MIME-Version: 1.0\r\n";
$subject = lang('Workorder').": ".$workorder_id;
- $mail_method=
$this->config->config_data['fmwrkorder_mail'];
- if ($mail_method=='smtp'):
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
- $send = CreateObject('phpgwapi.send');
- $rcpt = $send->msg('email', $to_email,
$subject, $html, '', $cc, $bcc, $from_email, $from_name, 'html');
- }
- elseif ($mail_method=='sendmail'):
+ if (!is_object($GLOBALS['phpgw']->send))
{
- $rcpt=mail($to_email,$subject,$html,
$headers);
+ $GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
+ }
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email', $to_email, $subject, $html, '', $cc,
$bcc, $from_email, $from_name, 'html');
}
- else:
+ else
{
-
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! (admin
section)'));
+
$receipt['error'][]=array('msg'=>lang('SMTP server is not set! (admin
section)'));
}
- endif;
if ($rcpt)
{
Index: inc/class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- inc/class.uiworkorder.inc.php 23 Mar 2007 16:02:48 -0000 1.43
+++ inc/class.uiworkorder.inc.php 14 Oct 2007 12:18:53 -0000 1.44
@@ -24,7 +24,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiworkorder.inc.php,v 1.43 2007/03/23 16:02:48
sigurdne Exp $
+ * @version $Id: class.uiworkorder.inc.php,v 1.44 2007/10/14 12:18:53
sigurdne Exp $
*/
/**
@@ -569,22 +569,19 @@
// $message = lang('Workorder %1
needs approval',$values['workorder_id']);
$message = '<a href ="http://'
. $GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiworkorder.edit', 'id'=> $values['project_id'])).'">' .
lang('Workorder %1 needs approval',$values['workorder_id']) .'</a>';
- $mail_method=
$config->config_data['fmwrkorder_mail'];
- if ($mail_method=='smtp'):
+ if
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server'])
{
- $bcc =
$coordinator_email;
- $send =
CreateObject('phpgwapi.send');
- $rcpt =
$send->msg('email', $values['mail_address'], $subject, stripslashes($message),
'', $cc, $bcc, $coordinator_email, $coordinator_name, 'plain');
- }
- elseif
($mail_method=='sendmail'):
+ if
(!is_object($GLOBALS['phpgw']->send))
{
-
$rcpt=mail($values['mail_address'],$subject,$message, $headers);
+
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
}
- else:
+ $bcc =
$coordinator_email;
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email', $values['mail_address'], $subject,
stripslashes($message), '', $cc, $bcc, $coordinator_email, $coordinator_name,
'plain');
+ }
+ else
{
-
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! (admin
section)'));
+
$receipt['error'][]=array('msg'=>lang('SMTP server is not set! (admin
section)'));
}
- endif;
}
if($rcpt)
Index: templates/base/config.tpl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/config.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- templates/base/config.tpl 19 May 2007 20:52:10 -0000 1.6
+++ templates/base/config.tpl 14 Oct 2007 12:18:53 -0000 1.7
@@ -17,12 +17,12 @@
{lang_On_windows_use}: "//computername/share" {lang_or}
"\\\\computername\share"</td>
<td><input name="newsettings[export_path]"
value="{value_export_path}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Path_to_Invoice_Export_preregistering}: ({lang_mandatory})<br>
{lang_On_windows_use}: "//computername/share" {lang_or}
"\\\\computername\share"</td>
<td><input name="newsettings[export_pre_path]"
value="{value_export_pre_path}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_invoice_export_method}:</td>
<td>
<select name="newsettings[invoice_export_method]">
@@ -31,74 +31,51 @@
</select>
</td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_invoice_ftp_host}:</td>
<td><input name="newsettings[invoice_ftp_host]"
value="{value_invoice_ftp_host}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_invoice_ftp_host_user}:</td>
<td><input name="newsettings[invoice_ftp_user]"
value="{value_invoice_ftp_user}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_invoice_ftp_host_pw}:</td>
<td><input type ="password" name="newsettings[invoice_ftp_pw]"
value="{value_invoice_ftp_pw}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_invoice_ftp_host_basedir_with_NO_trailing_slash}:</td>
<td><input name="newsettings[invoice_ftp_basedir]"
value="{value_invoice_ftp_basedir}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Default_municipal_number}:</td>
<td><input name="newsettings[default_municipal]"
value="{value_default_municipal}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Tax_[%]}:</td>
<td><input name="newsettings[fm_tax]" value="{value_fm_tax}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Enter_the_location_of_files_URL.} <br>
{lang_Example:_http://www.domain.com/files}:</td>
<td><input name="newsettings[files_url]" value="{value_files_url}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Enter_MAP_URL.} <br>
{lang_Example:_http://www.domain.com/map}:</td>
<td><input name="newsettings[map_url]" value="{value_map_url}"></td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Enter_GAB_Location_Level.} <br>
{lang_Default_value_is}: 3</td>
<td><input name="newsettings[gab_insert_level]"
value="{value_gab_insert_level}"></td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Enter_GAB_URL.} <br>
{lang_Example:_http://www.domain.com/gab}:</td>
<td><input name="newsettings[gab_url]" value="{value_gab_url}"></td>
</tr>
<tr class="row_off">
- <td>{lang_Select_how_you_want_to_send_workorder_by_mail}.</td>
- <td>
- <select name="newsettings[fmwrkorder_mail]">
- <option value="smtp" {selected_fmwrkorder_mail_smtp}>Remote SMTP
Server</option>
- <option value="sendmail" {selected_fmwrkorder_mail_sendmail}>Local
Sendmail(Only Linux)</option>
- </select>
- </td>
- </tr>
- <tr class="row_on">
-
<td>{lang_Enter_your_SMTP_server_hostname_or_IP_address_in_the} <BR><B>{lang_Email}</B> {lang_settings!}</td>
- <td></td>
- </tr>
-<!--<tr class="row_off">
- <td>{lang_Enter_your_SMTP_server_hostname_or_IP_address}:</td>
- <td><input name="newsettings[smtp_server]"
value="{value_smtp_server}"></td>
- </tr>
-
- <tr class="row_on">
- <td>{lang_Enter_your_SMTP_server_port}:</td>
- <td><input name="newsettings[smtp_port]" value="{value_smtp_port}"></td>
- </tr>
--->
- <tr class="row_off">
<td>{lang_TTS_file_upload}:</td>
<td>
<select name="newsettings[fmttsfileupload]">
@@ -107,7 +84,7 @@
</select>
</td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Mail_Notification_(TTS)}:</td>
<td>
<select name="newsettings[mailnotification]">
@@ -116,7 +93,7 @@
</select>
</td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Owner_Notification_(TTS)}.</td>
<td>
<select name="newsettings[ownernotification]">
@@ -125,7 +102,7 @@
</select>
</td>
</tr>
- <tr class="row_off">
+ <tr class="row_on">
<td>{lang_Assigned_Notification_(TTS)}.</td>
<td>
<select name="newsettings[assignednotification]">
@@ -134,7 +111,7 @@
</select>
</td>
</tr>
- <tr class="row_on">
+ <tr class="row_off">
<td>{lang_Group_Notification_(TTS)}.</td>
<td>
<select name="newsettings[groupnotification]">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.boalarm.inc.php inc/class.bo...,
Sigurd Nes <=