phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc/class.uiproject.inc.php, 1.3


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.uiproject.inc.php, 1.3
Date: Wed, 30 Jun 2004 20:02:37 +0200

Update of /property/inc
Modified Files:
        Branch: 
          class.uiproject.inc.php

date: 2004/06/30 18:02:37;  author: sigurdne;  state: Exp;  lines: +34 -1

Log Message:
no message
=====================================================================
Index: property/inc/class.uiproject.inc.php
diff -u property/inc/class.uiproject.inc.php:1.2 
property/inc/class.uiproject.inc.php:1.3
--- property/inc/class.uiproject.inc.php:1.2    Wed Jun  2 18:54:28 2004
+++ property/inc/class.uiproject.inc.php        Wed Jun 30 18:02:37 2004
@@ -713,6 +713,38 @@
                        {
                                $values = $this->bo->read_single($id);
 
+                               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'];
+
+                                               
foreach($receipt['notice_owner'] as $notice)
+                                               {
+                                                       $body .= $notice . "\n";
+                                               }
+
+                                               if 
(!is_object($GLOBALS['phpgw']->send))
+                                               {
+                                                       $GLOBALS['phpgw']->send 
= CreateObject('phpgwapi.send');
+                                               }
+                                               $returncode = 
$GLOBALS['phpgw']->send->msg('email',$to,$subject=lang('Project %1 is 
altered',$id),$body);
+
+                                               if (!$returncode)       // not 
nice, but better than failing silently
+                                               {
+                                                       echo 
"<p>bocalendar::send_update: sending message to '$to' subject='$subject' failed 
!!!<br>\n";
+                                                       echo 
$GLOBALS['phpgw']->send->err['desc']."</p>\n";
+                                               }
+                                               else
+                                               {
+                                                       
$receipt['message'][]=array('msg'=>lang('%1 is notified',$to));
+                                               }
+                                       }
+                               }
+
+
                                if(!$values['workorder_budget'] && $save)
                                {
                                        
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&project_id='
 . $id);
@@ -747,7 +779,8 @@
                                'lang_workorder_id'     => lang('Workorder'),
                                'lang_budget'           => lang('Budget'),
                                'lang_calculation'      => lang('Calculation'),
-                               'lang_vendor'   => lang('Vendor')
+                               'lang_vendor'   => lang('Vendor'),
+                               'lang_email'    => lang('Email')
                        );
 
                        if ($id)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]