phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc/class.uialarm.inc.php, 1.4.2.8


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.uialarm.inc.php, 1.4.2.8
Date: Mon, 13 Dec 2004 17:09:09 +0100

Update of /property/inc
Modified Files:
        Branch: proposed-0_9_18-branch
          class.uialarm.inc.php

date: 2004/12/13 16:09:09;  author: sigurdne;  state: Exp;  lines: +27 -14

Log Message:
no message
=====================================================================
Index: property/inc/class.uialarm.inc.php
diff -u property/inc/class.uialarm.inc.php:1.4.2.7 
property/inc/class.uialarm.inc.php:1.4.2.8
--- property/inc/class.uialarm.inc.php:1.4.2.7  Sun Dec 12 22:38:38 2004
+++ property/inc/class.uialarm.inc.php  Mon Dec 13 16:09:09 2004
@@ -100,6 +100,10 @@
                        {
                                $receipt = 
$this->bo->enable_alarm('fm_async',$values['alarm'],$values['enable_alarm']);
                        }
+                       elseif($values['test_cron']):
+                       {
+                                       $this->bo->test_cron();
+                       }
                        endif;
 
                        $list = $this->bo->read();
@@ -128,6 +132,13 @@
 
                                }
 
+                               if (substr($alarm['id'],0,8)=='fm_async')
+                               {
+                                       $link_edit                              
        = 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uialarm.edit&async_id='
 . urlencode($alarm['id']));
+                                       $lang_edit_statustext           = 
lang('edit the alarm');
+                                       $text_edit                              
        = lang('edit');
+                               }
+
                                $content[] = array
                                (
                                        'id'                                    
        => $alarm['id'],
@@ -137,17 +148,16 @@
                                        'data'                                  
        => $data,
                                        'enabled'                               
        => $alarm['enabled'],
                                        'user'                                  
        => $alarm['user'],
-                                       'link_edit'                             
        => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uialarm.edit&async_id='
 . urlencode($alarm['id'])),
-                                       'lang_view_statustext'          => 
lang('view the alarm'),
-                                       'lang_edit_statustext'          => 
lang('edit the alarm'),
-                                       'lang_delete_statustext'        => 
lang('delete the alarm'),
-                                       'text_view'                             
        => lang('view'),
-                                       'text_edit'                             
        => lang('edit'),
-                                       'text_delete'                           
=> lang('delete')
+                                       'link_edit'                             
        => $link_edit,
+                                       'lang_edit_statustext'          => 
$lang_edit_statustext,
+                                       'text_edit'                             
        => $text_edit
                                );
                                unset($alarm);
                                unset($data);
                                unset($times);
+                               unset($link_edit);
+                               unset($lang_edit_statustext);
+                               unset($text_edit);
                        }
 
                        $table_header = array
@@ -207,7 +217,8 @@
                        (
                                'lang_enable'           => lang('Enable'),
                                'lang_disable'          => lang('Disable'),
-                               'lang_delete'           => lang('Delete')
+                               'lang_delete'           => lang('Delete'),
+                               'lang_test_cron'        => lang('test cron')
                                );
 
                        $table_add = array
@@ -318,12 +329,13 @@
                                        $values['alarm_id']     = $alarm_id;
 
                                        
$async=$this->boasync->read_single($this->method_id);
+//_debug_array($async);
                                        $data_set = unserialize($async['data']);
                                        $data_set['enabled']    = True;
-                                       $data_set['time']               = 
$times;
+                                       $data_set['times']              = 
$times;
                                        $data_set['owner']              = 
$this->account;
                                        $data_set['event_id']   = 
$this->method_id;
-
+                                       $data_set['id']                 = 
$async_id;
 
                                        $async_id = 
$this->bo->save_alarm($alarm_type='fm_async',$entity_id=$this->method_id,$alarm=$data_set,$async['name']);
 
@@ -344,7 +356,6 @@
                        {
                                $alarm = 
$this->bo->read_alarm($alarm_type='fm_async',$async_id);
                                $this->method_id = 
($alarm['event_id']?$alarm['event_id']:$this->method_id);
-
                        }
 
                        $link_data = array
@@ -355,6 +366,7 @@
 
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
 
+//_debug_array($alarm);
                        $data = array
                        (
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
@@ -380,14 +392,15 @@
                                'lang_day'                                      
        => lang('day'),
                                'value_day'                                     
        => $alarm['times']['day'],
                                'lang_dow'                                      
        => lang('Day of week (0-6, 0=Sun)'),
-                               'value_day'                                     
        => $alarm['times']['dow'],
+                               'value_dow'                                     
        => $alarm['times']['dow'],
                                'lang_hour'                                     
        => lang('hour'),
                                'value_hour'                                    
=> $alarm['times']['hour'],
                                'lang_minute'                                   
=> lang('minute'),
-                               'value_minute'                                  
=> $alarm['times']['minute'],
+                               'value_minute'                                  
=> $alarm['times']['min'],
                                'lang_data'                                     
        => lang('data'),
                                'lang_data_statustext'                  => 
lang('inputdata for the method')
                        );
+//_debug_array($data);
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('async') . ': ' . ($async_id?lang('edit timer'):lang('add timer'));
 
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));




reply via email to

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