fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6787] SMS: fix timezone


From: Sigurd Nes
Subject: [Fmsystem-commits] [6787] SMS: fix timezone
Date: Mon, 17 Jan 2011 14:28:26 +0000

Revision: 6787
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6787
Author:   sigurdne
Date:     2011-01-17 14:28:25 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
SMS: fix timezone

Modified Paths:
--------------
    trunk/sms/inc/class.bosms.inc.php
    trunk/sms/inc/class.sosms.inc.php
    trunk/sms/inc/class.uisms.inc.php

Modified: trunk/sms/inc/class.bosms.inc.php
===================================================================
--- trunk/sms/inc/class.bosms.inc.php   2011-01-17 10:09:25 UTC (rev 6786)
+++ trunk/sms/inc/class.bosms.inc.php   2011-01-17 14:28:25 UTC (rev 6787)
@@ -1,22 +1,22 @@
 <?php
        /**
-       * phpGroupWare - HRM: a  human resource competence management system.
+       * phpGroupWare - SMS: a  human resource competence management system.
        *
        * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @copyright Copyright (C) 2003-2011 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package hrm
+       * @package sms
        * @subpackage place
        * @version $Id$
        */
 
        /**
         * Description
-        * @package hrm
+        * @package sms
         */
 
-       class bosms
+       class sms_bosms
        {
                var $start;
                var $query;
@@ -29,10 +29,10 @@
                var $public_functions = array
                (
                        'read'                  => true,
-                       'read_single'           => true,
+                       'read_single'   => true,
                        'save'                  => true,
                        'delete'                => true,
-                       'check_perms'           => true
+                       'check_perms'   => true
                );
 
                function __construct($session=false)
@@ -110,14 +110,25 @@
                        $inbox = $this->so->read_inbox(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'allrows'=>$this->allrows,'acl_location' =>$this->acl_location));
                        $this->total_records = $this->so->total_records;
+
+                       foreach($inbox as $dummy => &$msg)
+                       {
+                               $msg['entry_time'] = 
$GLOBALS['phpgw']->common->show_date(strtotime($msg['entry_time']));
+                       }
+
                        return $inbox;
                }
 
-
                function read_outbox()
                {
                        $outbox = $this->so->read_outbox(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                                                                                
        'allrows'=>$this->allrows,'acl_location' =>$this->acl_location));
+
+                       foreach($outbox as $dummy => &$msg)
+                       {
+                               $msg['entry_time'] = 
$GLOBALS['phpgw']->common->show_date(strtotime($msg['entry_time']));
+                       }
+
                        $this->total_records = $this->so->total_records;
                        return $outbox;
                }

Modified: trunk/sms/inc/class.sosms.inc.php
===================================================================
--- trunk/sms/inc/class.sosms.inc.php   2011-01-17 10:09:25 UTC (rev 6786)
+++ trunk/sms/inc/class.sosms.inc.php   2011-01-17 14:28:25 UTC (rev 6787)
@@ -114,22 +114,12 @@
 
                function read_outbox($data)
                {
-                       if(is_array($data))
-                       {
-                               if ($data['start'])
-                               {
-                                       $start=$data['start'];
-                               }
-                               else
-                               {
-                                       $start=0;
-                               }
-                               $query          = 
(isset($data['query'])?$data['query']:'');
-                               $sort           = 
(isset($data['sort'])?$data['sort']:'DESC');
-                               $order          = 
(isset($data['order'])?$data['order']:'');
-                               $allrows        = 
(isset($data['allrows'])?$data['allrows']:'');
-                               $acl_location   = 
(isset($data['acl_location'])?$data['acl_location']:'');
-                       }
+                       $query                  = isset($data['start']) && 
$data['start'] ? (int)$data['start']:0;
+                       $query                  = 
isset($data['query'])?$data['query']:'';
+                       $sort                   = 
isset($data['sort'])?$data['sort']:'DESC';
+                       $order                  = 
isset($data['order'])?$data['order']:'';
+                       $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
+                       $acl_location   = 
isset($data['acl_location'])?$data['acl_location']:'';
 
                        if($acl_location)
                        {
@@ -139,7 +129,6 @@
                        if ($order)
                        {
                                $ordermethod = " ORDER BY $order $sort";
-
                        }
                        else
                        {

Modified: trunk/sms/inc/class.uisms.inc.php
===================================================================
--- trunk/sms/inc/class.uisms.inc.php   2011-01-17 10:09:25 UTC (rev 6786)
+++ trunk/sms/inc/class.uisms.inc.php   2011-01-17 14:28:25 UTC (rev 6787)
@@ -201,12 +201,12 @@
                        {
                                $table_add[] = array
                                (
-                                       'lang_send'                     => 
lang('Send text SMS'),
+                                       'lang_send'                             
        => lang('Send text SMS'),
                                        'lang_send_statustext'          => 
lang('send single'),
-                                       'send_action'                   => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 'sms.uisms.send', 
'from'=>'index')),
-                                       'lang_send_group'               => 
lang('Send broadcast SMS'),
+                                       'send_action'                           
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 'sms.uisms.send', 
'from'=>'index')),
+                                       'lang_send_group'                       
=> lang('Send broadcast SMS'),
                                        'lang_send_group_statustext'    => 
lang('send group'),
-                                       'send_group_action'             => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'sms.uisms.send_group', 'from'=>'index')),
+                                       'send_group_action'                     
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'sms.uisms.send_group', 'from'=>'index')),
                                );
                        }
 
@@ -217,19 +217,19 @@
                                'msgbox_data'                                   
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'menu'                                          
        => execMethod('sms.menu.links'),
                                'allow_allrows'                                 
=> true,
-                               'allrows'                                       
=> $this->allrows,
+                               'allrows'                                       
        => $this->allrows,
                                'start_record'                                  
=> $this->start,
                                'record_limit'                                  
=> $record_limit,
                                'num_records'                                   
=> count($sms_info),
                                'all_records'                                   
=> $this->bo->total_records,
-                               'link_url'                                      
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
-                               'img_path'                                      
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
-                               'lang_searchfield_statustext'                   
=> lang('Enter the search string. To show all entries, empty this field and 
press the SUBMIT button again'),
-                               'lang_searchbutton_statustext'                  
=> lang('Submit the search string'),
-                               'query'                                         
=> $this->query,
+                               'link_url'                                      
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'img_path'                                      
        => $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
+                               'lang_searchfield_statustext'   => lang('Enter 
the search string. To show all entries, empty this field and press the SUBMIT 
button again'),
+                               'lang_searchbutton_statustext'  => lang('Submit 
the search string'),
+                               'query'                                         
        => $this->query,
                                'lang_search'                                   
=> lang('search'),
-                               'table_header_inbox'                            
=> $table_header,
-                               'table_add'                                     
=> $table_add,
+                               'table_header_inbox'                    => 
$table_header,
+                               'table_add'                                     
        => $table_add,
                                'values_inbox'                                  
=> $content
                        );
 
@@ -263,7 +263,7 @@
 
                        $sms_info = $this->bo->read_outbox();
 
-                       while (is_array($sms_info) && list(,$entry) = 
each($sms_info))
+                       foreach ($sms_info as $entry)
                        {
                                
if($this->bocommon->check_perms($entry['grants'], PHPGW_ACL_DELETE))
                                {
@@ -279,11 +279,11 @@
                                        'user'                                  
=> $entry['user'],
                                        'message'                               
=> $entry['message'],
                                        'dst_group'                             
=> $entry['dst_group'],
-                                       'entry_time'                            
=> $entry['entry_time'],
+                                       'entry_time'                    => 
$entry['entry_time'],
                                        'status'                                
=> $entry['status'],
-                                       'link_delete'                           
=> $link_delete,
-                                       'text_delete'                           
=> $text_delete,
-                                       'lang_delete_sms_text'                  
=> $lang_delete_sms_text,
+                                       'link_delete'                   => 
$link_delete,
+                                       'text_delete'                   => 
$text_delete,
+                                       'lang_delete_sms_text'  => 
$lang_delete_sms_text,
                                );
 
                                unset ($link_delete);




reply via email to

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