[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14844] booking: remove hardcoded test user
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14844] booking: remove hardcoded test user |
Date: |
Wed, 16 Mar 2016 11:57:35 +0000 |
Revision: 14844
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14844
Author: sigurdne
Date: 2016-03-16 11:57:29 +0000 (Wed, 16 Mar 2016)
Log Message:
-----------
booking: remove hardcoded test user
Modified Paths:
--------------
trunk/booking/inc/class.uiapplication.inc.php
trunk/booking/inc/class.uidashboard.inc.php
trunk/booking/inc/class.uisystem_message.inc.php
trunk/booking/templates/base/application.xsl
Modified: trunk/booking/inc/class.uiapplication.inc.php
===================================================================
--- trunk/booking/inc/class.uiapplication.inc.php 2016-03-16 10:09:17 UTC
(rev 14843)
+++ trunk/booking/inc/class.uiapplication.inc.php 2016-03-16 11:57:29 UTC
(rev 14844)
@@ -137,7 +137,7 @@
protected function is_assigned_to_current_user( &$application )
{
- $current_account_id = 7;
+ $current_account_id = $this->current_account_id();
if (empty($current_account_id) ||
!isset($application['case_officer_id']))
{
return false;
@@ -157,7 +157,7 @@
protected function assign_to_current_user( &$application )
{
- $current_account_id = 7;
+ $current_account_id = $this->current_account_id();
if (!empty($current_account_id) &&
is_array($application) &&
!isset($application['case_officer_id']) ||
$application['case_officer_id'] != $current_account_id)
@@ -250,6 +250,7 @@
}
$data = array(
+ 'datatable_name' => lang('application'),
'form' => array(
'toolbar' => array(
'item' => array(
@@ -655,7 +656,7 @@
'name' =>
$application['case_officer_name'],
);
- if ($application['case_officer_id'] == 7)
+ if ($application['case_officer_id'] ==
$this->current_account_id())
{
$application['case_officer']['is_current_user'] = true;
}
@@ -1278,10 +1279,14 @@
}
$from = array("data" => implode(',', $from));
$num_associations = $associations['total_records'];
- if ($this->is_assigned_to_current_user($application) &&
$GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, 'booking'))
+ if ($this->is_assigned_to_current_user($application) ||
$GLOBALS['phpgw']->acl->check('admin', phpgwapi_acl::ADD, 'booking'))
+ {
$application['currentuser'] = true;
+ }
else
+ {
$application['currentuser'] = false;
+ }
$collision_dates = array();
foreach ($application['dates'] as &$date)
Modified: trunk/booking/inc/class.uidashboard.inc.php
===================================================================
--- trunk/booking/inc/class.uidashboard.inc.php 2016-03-16 10:09:17 UTC (rev
14843)
+++ trunk/booking/inc/class.uidashboard.inc.php 2016-03-16 11:57:29 UTC (rev
14844)
@@ -81,6 +81,7 @@
phpgwapi_jquery::load_widget('autocomplete');
$data = array(
+ 'datatable_name' => lang('dashboard'),
'form' => array(
'toolbar' => array(
'item' => array(
Modified: trunk/booking/inc/class.uisystem_message.inc.php
===================================================================
--- trunk/booking/inc/class.uisystem_message.inc.php 2016-03-16 10:09:17 UTC
(rev 14843)
+++ trunk/booking/inc/class.uisystem_message.inc.php 2016-03-16 11:57:29 UTC
(rev 14844)
@@ -147,10 +147,9 @@
{
$this->db = & $GLOBALS['phpgw']->db;
-// $current_user = $this->current_account_id();
- $current_user = 7;
+ $current_user = (int)$this->current_account_id();
$current_user_building_data = array();
- $sql = "select object_id from bb_permission where
subject_id=" . $current_user . " and role='case_officer';";
+ $sql = "SELECT object_id FROM bb_permission WHERE
subject_id= {$current_user} AND role='case_officer';";
$this->db->query($sql);
while ($record = array_shift($this->db->resultSet))
{
@@ -221,8 +220,11 @@
$this->db->query($sql);
while ($record =
array_shift($this->db->resultSet))
{
- $building_case_officers_data[] =
array('account_id' => $record['account_id'],
- 'account_lid' =>
$record['account_lid'], 'account_name' => $record['account_firstname'] . " " .
$record['account_lastname']);
+ $building_case_officers_data[] = array(
+ 'account_id' =>
$record['account_id'],
+ 'account_lid' =>
$record['account_lid'],
+ 'account_name' =>
$record['account_firstname'] . " " . $record['account_lastname']
+ );
$building_case_officers[] =
$record['account_id'];
}
@@ -245,7 +247,9 @@
while ($case_officer =
array_shift($building_case_officers_data))
{
if
($system_message['case_officer_name'] = $case_officer['account_id'])
+ {
$system_message['case_officer_name'] = $case_officer['account_name'];
+ }
}
}
return $this->jquery_results($system_messages);
Modified: trunk/booking/templates/base/application.xsl
===================================================================
--- trunk/booking/templates/base/application.xsl 2016-03-16 10:09:17 UTC
(rev 14843)
+++ trunk/booking/templates/base/application.xsl 2016-03-16 11:57:29 UTC
(rev 14844)
@@ -429,16 +429,14 @@
<label>
<xsl:value-of select="php:function('lang', 'organization number')" />
</label>
- <span>
-
<xsl:value-of select="application/customer_organization_number"/>
- </span>
+ <br/>
+
<xsl:value-of select="application/customer_organization_number"/>
</xsl:if>
- </div>
- <div
class="pure-control-group">
<xsl:if
test="application/customer_identifier_type = 'ssn'">
<label>
<xsl:value-of select="php:function('lang', 'Date of birth or SSN')" />
</label>
+ <br/>
<xsl:value-of select="application/customer_ssn"/>
</xsl:if>
</div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14844] booking: remove hardcoded test user,
Sigurd Nes <=