fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14837] Merge 14835:14836 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [14837] Merge 14835:14836 from trunk
Date: Tue, 15 Mar 2016 08:40:14 +0000

Revision: 14837
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14837
Author:   sigurdne
Date:     2016-03-15 08:40:14 +0000 (Tue, 15 Mar 2016)
Log Message:
-----------
Merge 14835:14836 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
    
branches/Version-2_0-branch/booking/inc/class.uicompleted_reservation_export.inc.php
    branches/Version-2_0-branch/booking/inc/class.uidashboard.inc.php
    branches/Version-2_0-branch/booking/inc/class.uipermission.inc.php
    branches/Version-2_0-branch/booking/inc/class.uipermission_root.inc.php
    branches/Version-2_0-branch/booking/inc/class.uiseason.inc.php

Property Changed:
----------------
    branches/Version-2_0-branch/
    branches/Version-2_0-branch/booking/


Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834
   + /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836


Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834
   + /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836

Modified: branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php 
2016-03-14 15:43:16 UTC (rev 14836)
+++ branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php 
2016-03-15 08:40:14 UTC (rev 14837)
@@ -254,7 +254,8 @@
                        }
                        else
                        {
-                               $where_clauses[] = "(%%table%%.case_officer_id 
= " . intval($for_case_officer_id[1]) . ')';
+                               $where_clauses[] = 
"(%%table%%.display_in_dashboard = 1)";
+//                             $where_clauses[] = "(%%table%%.case_officer_id 
= " . intval($for_case_officer_id[1]) . ')';
                        }
 
                        if ($building_id = phpgw::get_var('filter_building_id', 
'int', 'REQUEST', 0))
@@ -269,7 +270,7 @@
                        {
                                $params['filters']['status'] = 
phpgw::get_var('status');
                        }
-
+       
                        $params['filters']['where'] = $where_clauses;
 
                        return $this->so->read($params);

Modified: 
branches/Version-2_0-branch/booking/inc/class.uicompleted_reservation_export.inc.php
===================================================================
--- 
branches/Version-2_0-branch/booking/inc/class.uicompleted_reservation_export.inc.php
        2016-03-14 15:43:16 UTC (rev 14836)
+++ 
branches/Version-2_0-branch/booking/inc/class.uicompleted_reservation_export.inc.php
        2016-03-15 08:40:14 UTC (rev 14837)
@@ -211,9 +211,6 @@
 
                public function query() //index_json
                {
-                       $this->db = $GLOBALS['phpgw']->db;
-
-
                        $search = phpgw::get_var('search');
                        $order = phpgw::get_var('order');
                        $columns = phpgw::get_var('columns');
@@ -273,10 +270,6 @@
                                $filters['where'][] = "%%table%%" . 
sprintf(".to_ <= '%s 23:59:59'", 
$GLOBALS['phpgw']->db->db_addslashes($filter_to));
                        }
 
-
-
-
-
                        $params = array(
                                'start' => $start,
                                'results' => $results,
@@ -286,8 +279,6 @@
                                'filters' => $filters
                        );
 
-
-
                        $exports = $this->bo->so->read($params);
                        array_walk($exports["results"], array($this, 
"_add_links"), $this->module . ".uicompleted_reservation_export.show");
 
@@ -295,12 +286,10 @@
                        {
                                $export = 
$this->bo->so->initialize_entity($export);
                                $this->add_default_display_data($export);
-
-                               $sql = "SELECT account_lastname, 
account_firstname FROM phpgw_accounts WHERE account_lid = '" . 
$export['created_by_name'] . "'";
-                               $this->db->query($sql);
-                               while ($record = 
array_shift($this->db->resultSet))
+                               $account_id = 
$GLOBALS['phpgw']->accounts->name2id($export['created_by_name']);
+                               if($account_id)
                                {
-                                       $export['created_by_name'] = 
$record['account_firstname'] . " " . $record['account_lastname'];
+                                       $export['created_by_name'] = 
$GLOBALS['phpgw']->accounts->get($account_id)->__toString();
                                }
                        }
                        $results = $this->jquery_results($exports);

Modified: branches/Version-2_0-branch/booking/inc/class.uidashboard.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uidashboard.inc.php   
2016-03-14 15:43:16 UTC (rev 14836)
+++ branches/Version-2_0-branch/booking/inc/class.uidashboard.inc.php   
2016-03-15 08:40:14 UTC (rev 14837)
@@ -178,11 +178,8 @@
 
                public function query()
                {
-//            Analizar luego esta variable -> $this->current_account_id()
-                       $this->db = $GLOBALS['phpgw']->db;
                        $applications = 
$this->bo->read_dashboard_data($this->show_all_dashboard_applications() ? array(
-                                       null, 7) : array(1, 7));
-//            echo '<pre>'; print_r($applications); echo '</pre>';exit('saul');
+                                       null, $this->current_account_id()) : 
array(1, $this->current_account_id()));
                        foreach ($applications['results'] as &$application)
                        {
                                $application['status'] = 
lang($application['status']);
@@ -202,12 +199,10 @@
                                        }
                                        $application['what'] = 
$application['resources'][0]['building_name'] . ' (' . join(', ', $names) . ')';
                                }
-
-                               $sql = "SELECT account_lastname, 
account_firstname FROM phpgw_accounts WHERE account_lid = '" . 
$application['case_officer_name'] . "'";
-                               $this->db->query($sql);
-                               while ($record = 
array_shift($this->db->resultSet))
+                               $account_id = 
$GLOBALS['phpgw']->accounts->name2id($application['case_officer_name']);
+                               if($account_id)
                                {
-                                       $application['case_officer_name'] = 
$record['account_firstname'] . " " . $record['account_lastname'];
+                                       $application['case_officer_name'] = 
$GLOBALS['phpgw']->accounts->get($account_id)->__toString();
                                }
                        }
                        array_walk($applications["results"], array($this, 
"_add_links"), "booking.uiapplication.show");

Modified: branches/Version-2_0-branch/booking/inc/class.uipermission.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uipermission.inc.php  
2016-03-14 15:43:16 UTC (rev 14836)
+++ branches/Version-2_0-branch/booking/inc/class.uipermission.inc.php  
2016-03-15 08:40:14 UTC (rev 14837)
@@ -194,8 +194,6 @@
 
                public function query()
                {
-                       $this->db = $GLOBALS['phpgw']->db;
-
                        $permissions = $this->bo->read();
                        foreach ($permissions['results'] as &$permission)
                        {
@@ -210,11 +208,10 @@
                                        $permission['opcion_delete'] = 
$this->get_object_typed_link('delete', array(
                                                'id' => $permission['id']));
 
-                               $sql = "SELECT account_lastname, 
account_firstname FROM phpgw_accounts WHERE account_lid = '" . 
$permission['subject_name'] . "'";
-                               $this->db->query($sql);
-                               while ($record = 
array_shift($this->db->resultSet))
+                               $account_id = 
$GLOBALS['phpgw']->accounts->name2id($permission['subject_name']);
+                               if($account_id)
                                {
-                                       $permission['subject_name'] = 
$record['account_firstname'] . " " . $record['account_lastname'];
+                                       $permission['subject_name'] = 
$GLOBALS['phpgw']->accounts->get($account_id)->__toString();
                                }
 
                                $permission['actions'] = $permission_actions;

Modified: 
branches/Version-2_0-branch/booking/inc/class.uipermission_root.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uipermission_root.inc.php     
2016-03-14 15:43:16 UTC (rev 14836)
+++ branches/Version-2_0-branch/booking/inc/class.uipermission_root.inc.php     
2016-03-15 08:40:14 UTC (rev 14837)
@@ -104,8 +104,6 @@
 
                public function query()
                {
-                       $this->db = $GLOBALS['phpgw']->db;
-
                        $permissions = $this->bo->read();
                        foreach ($permissions['results'] as &$permission)
                        {
@@ -115,11 +113,10 @@
                                        $this->generate_link('delete', 
array('id' => $permission['id'])),
                                );
 
-                               $sql = "SELECT account_lastname, 
account_firstname FROM phpgw_accounts WHERE account_lid = '" . 
$permission['subject_name'] . "'";
-                               $this->db->query($sql);
-                               while ($record = 
array_shift($this->db->resultSet))
+                               $account_id = 
$GLOBALS['phpgw']->accounts->name2id($permission['subject_name']);
+                               if($account_id)
                                {
-                                       $permission['subject_name'] = 
$record['account_firstname'] . " " . $record['account_lastname'];
+                                       $permission['subject_name'] = 
$GLOBALS['phpgw']->accounts->get($account_id)->__toString();
                                }
                        }
                        return $this->jquery_results($permissions);

Modified: branches/Version-2_0-branch/booking/inc/class.uiseason.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiseason.inc.php      
2016-03-14 15:43:16 UTC (rev 14836)
+++ branches/Version-2_0-branch/booking/inc/class.uiseason.inc.php      
2016-03-15 08:40:14 UTC (rev 14837)
@@ -44,8 +44,6 @@
 
                public function index()
                {
-                       $this->db = $GLOBALS['phpgw']->db;
-
                        if (phpgw::get_var('phpgw_return_as') == 'json')
                        {
                                return $this->query();
@@ -138,11 +136,10 @@
                                        $season['resource_list'] = implode(', 
', $temparray);
                                }
 
-                               $sql = "SELECT account_lastname, 
account_firstname FROM phpgw_accounts WHERE account_lid = '" . 
$season['officer_name'] . "'";
-                               $this->db->query($sql);
-                               while ($record = 
array_shift($this->db->resultSet))
+                               $account_id = 
$GLOBALS['phpgw']->accounts->name2id($season['officer_name']);
+                               if($account_id)
                                {
-                                       $season['officer_name'] = 
$record['account_firstname'] . " " . $record['account_lastname'];
+                                       $season['officer_name'] = 
$GLOBALS['phpgw']->accounts->get($account_id)->__toString();
                                }
                        }
                        return $this->jquery_results($seasons);




reply via email to

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