fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9992] Overwriting earlier commited formatting


From: Torstein
Subject: [Fmsystem-commits] [9992] Overwriting earlier commited formatting
Date: Tue, 11 Sep 2012 07:50:02 +0000

Revision: 9992
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9992
Author:   vator
Date:     2012-09-11 07:49:59 +0000 (Tue, 11 Sep 2012)
Log Message:
-----------
Overwriting earlier commited formatting

Modified Paths:
--------------
    trunk/controller/inc/helper/class.check_list_status_updater.inc.php
    trunk/controller/inc/helper/class.date_helper.inc.php
    trunk/controller/inc/helper/class.location_finder.inc.php

Modified: trunk/controller/inc/helper/class.check_list_status_updater.inc.php
===================================================================
--- trunk/controller/inc/helper/class.check_list_status_updater.inc.php 
2012-09-11 07:48:54 UTC (rev 9991)
+++ trunk/controller/inc/helper/class.check_list_status_updater.inc.php 
2012-09-11 07:49:59 UTC (rev 9992)
@@ -1,46 +1,46 @@
 <?php
+       phpgw::import_class('controller.socheck_list');
+       phpgw::import_class('controller.socheck_item');
+       
+       include_class('controller', 'check_list', 'inc/model/');
+       include_class('controller', 'check_item', 'inc/model/');
 
-phpgw::import_class('controller.socheck_list');
-phpgw::import_class('controller.socheck_item');
-
-include_class('controller', 'check_list', 'inc/model/');
-include_class('controller', 'check_item', 'inc/model/');
-
-class check_list_status_updater {
-
-  public function __construct() {
-    $this->so_check_list = CreateObject('controller.socheck_list');
-    $this->so_check_item = CreateObject('controller.socheck_item');
-  }
-
-  public function update_check_list_status($check_list_id) {
-    $check_list = $this->so_check_list->get_single($check_list_id);
-
-    $check_items = 
$this->so_check_item->get_check_items_with_cases($check_list_id, 
$control_item_type = null, $status = null, $messageStatus = null, 
"return_object");
-
-    $num_open_cases = 0;
-    $num_pending_cases = 0;
-
-    foreach ($check_items as $check_item) {
-      foreach ($check_item->get_cases_array() as $case) {
-
-        if ($case->get_status() == controller_check_item_case::STATUS_OPEN) {
-          $num_open_cases++;
-        }
-
-        if ($case->get_status() == controller_check_item_case::STATUS_PENDING) 
{
-          $num_pending_cases++;
-        }
-      }
-    }
-
-    if ($num_open_cases > 0)
-      $check_list->set_status(controller_check_list::STATUS_DONE);
-
-    $check_list->set_num_open_cases($num_open_cases);
-    $check_list->set_num_pending_cases($num_pending_cases);
-
-    $this->so_check_list->store($check_list);
-  }
-
+       class check_list_status_updater {
+               
+               public function __construct()
+               {
+                       $this->so_check_list = 
CreateObject('controller.socheck_list');
+                       $this->so_check_item = 
CreateObject('controller.socheck_item');
+               }
+                       
+               public function update_check_list_status( $check_list_id )
+               {
+                       $check_list = $this->so_check_list->get_single( 
$check_list_id );
+               
+                       $check_items = 
$this->so_check_item->get_check_items_with_cases($check_list_id, 
$control_item_type = null, $status = null, $messageStatus = null, 
"return_object");
+               
+                       $num_open_cases = 0;
+                       $num_pending_cases = 0;
+                                       
+                       foreach($check_items as $check_item){
+                               foreach($check_item->get_cases_array() as 
$case){
+                                       
+                                       if($case->get_status() == 
controller_check_item_case::STATUS_OPEN){
+                                               $num_open_cases++;
+                                       }
+                                       
+                                       if($case->get_status() == 
controller_check_item_case::STATUS_PENDING){
+                                               $num_pending_cases++;
+                                       }
+                               }       
+                       }
+                       
+                       if($num_open_cases > 0)
+                               
$check_list->set_status(controller_check_list::STATUS_DONE);
+                               
+                       $check_list->set_num_open_cases($num_open_cases);
+                       $check_list->set_num_pending_cases($num_pending_cases);
+                       
+                       $this->so_check_list->store($check_list);
+               }
 }
\ No newline at end of file

Modified: trunk/controller/inc/helper/class.date_helper.inc.php
===================================================================
--- trunk/controller/inc/helper/class.date_helper.inc.php       2012-09-11 
07:48:54 UTC (rev 9991)
+++ trunk/controller/inc/helper/class.date_helper.inc.php       2012-09-11 
07:49:59 UTC (rev 9992)
@@ -1,28 +1,24 @@
 <?php
+       class date_helper {
+       
+       public function __construct(){}
+               
+       public static function get_timestamp_from_date( $date_string, $format  
){
+               
+               if( $format == "d/m-Y" ){
+                       $pos_day = strpos($date_string, "/"); 
+                       $day = date_helper::substring($date_string, 0, 
$pos_day);
+                       
+                       $pos_month = strpos($date_string, "-");
+                       $month = date_helper::substring($date_string, 
$pos_day+1, $pos_month);
+                       
+                       $year = date_helper::substring($date_string, 
$pos_month+1, strlen($date_string));
 
-class date_helper {
-
-  public function __construct() {
-    
-  }
-
-  public static function get_timestamp_from_date($date_string, $format) {
-
-    if ($format == "d/m-Y") {
-      $pos_day = strpos($date_string, "/");
-      $day = date_helper::substring($date_string, 0, $pos_day);
-
-      $pos_month = strpos($date_string, "-");
-      $month = date_helper::substring($date_string, $pos_day + 1, $pos_month);
-
-      $year = date_helper::substring($date_string, $pos_month + 1, 
strlen($date_string));
-
-      return mktime(0, 0, 0, $month, $day, $year);
-    }
-  }
-
-  public function substring($string, $from, $to) {
-    return substr($string, $from, $to - $from);
-  }
-
+                       return mktime(0, 0, 0, $month, $day, $year);
+               }
+       }
+       
+       public function substring($string, $from, $to){
+       return substr($string, $from, $to - $from);
+       }
 }
\ No newline at end of file

Modified: trunk/controller/inc/helper/class.location_finder.inc.php
===================================================================
--- trunk/controller/inc/helper/class.location_finder.inc.php   2012-09-11 
07:48:54 UTC (rev 9991)
+++ trunk/controller/inc/helper/class.location_finder.inc.php   2012-09-11 
07:49:59 UTC (rev 9992)
@@ -1,50 +1,51 @@
 <?php
+       /**
+       * phpGroupWare - controller: a part of a Facilities Management System.
+       *
+       * @author Erink Holm-Larsen <address@hidden>
+       * @author Torstein Vadla <address@hidden>
+       * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @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/
+       * @package property
+       * @subpackage controller
+       * @version $Id: class.uicontrol_group.inc.php 8267 2011-12-11 12:27:18Z 
sigurdne $
+       */      
 
-/**
- * phpGroupWare - controller: a part of a Facilities Management System.
- *
- * @author Erink Holm-Larsen <address@hidden>
- * @author Torstein Vadla <address@hidden>
- * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
- * This file is part of phpGroupWare.
- *
- * phpGroupWare is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * phpGroupWare is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with phpGroupWare; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * @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/
- * @package property
- * @subpackage controller
- * @version $Id: class.uicontrol_group.inc.php 8267 2011-12-11 12:27:18Z 
sigurdne $
- */
-phpgw::import_class('property.solocation');
+       phpgw::import_class('property.solocation');
 
-class location_finder {
+       class location_finder
+       {
+               private $so;
+               
+               public function __construct()
+               {
+                       $this->so = CreateObject('property.solocation');
+               }
 
-  private $so;
-
-  public function __construct() {
-    $this->so = CreateObject('property.solocation');
-  }
-
-  function get_responsibilities($data = array()) {
-    $data['filter_role_on_contact'] = 
$GLOBALS['phpgw']->accounts->get($data['user_id'])->person_id;
-    $locations = $this->so->read($data);
-
-    $total_records = $this->so->total_records;
-
-    return $locations;
-  }
-
-}
+               function get_responsibilities($data = array())
+               {
+                       $data['filter_role_on_contact'] = 
$GLOBALS['phpgw']->accounts->get($data['user_id'])->person_id;
+                       $locations = $this->so->read($data);
+                       
+                       $total_records = $this->so->total_records;
+                       
+                       return $locations;
+               }
+       }




reply via email to

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