[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18656] update and stabilize
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] [18656] update and stabilize |
Date: |
Mon, 01 Sep 2008 18:56:49 +0000 |
Revision: 18656
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18656
Author: sigurdne
Date: 2008-09-01 18:56:48 +0000 (Mon, 01 Sep 2008)
Log Message:
-----------
update and stabilize
Modified Paths:
--------------
trunk/property/inc/class.custom_functions.inc.php
trunk/property/inc/class.socommon.inc.php
trunk/property/inc/class.solookup.inc.php
trunk/property/inc/class.uientity.inc.php
trunk/property/inc/class.uiwo_hour.inc.php
trunk/property/inc/cron/forward_mail_as_sms.php
trunk/property/setup/tables_update.inc.php
trunk/property/templates/base/config.tpl
trunk/property/templates/base/entity.xsl
trunk/property/templates/base/wo_hour.xsl
Modified: trunk/property/inc/class.custom_functions.inc.php
===================================================================
--- trunk/property/inc/class.custom_functions.inc.php 2008-08-29 19:04:50 UTC
(rev 18655)
+++ trunk/property/inc/class.custom_functions.inc.php 2008-09-01 18:56:48 UTC
(rev 18656)
@@ -82,7 +82,8 @@
return;
}
- $file = realpath(PHPGW_APP_INC .
"/cron/{$function}.php"); // realpath overkill here?
+ $file = PHPGW_SERVER_ROOT .
"/property/inc/cron/{$function}.php";
+
if (is_file($file))
{
require_once $file;
Modified: trunk/property/inc/class.socommon.inc.php
===================================================================
--- trunk/property/inc/class.socommon.inc.php 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/inc/class.socommon.inc.php 2008-09-01 18:56:48 UTC (rev
18656)
@@ -155,7 +155,7 @@
function reset_fm_cache_userlist()
{
- $this->db->query("DELETE FROM fm_cache WHERE name
$this->like 'acl_userlist_%'",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM fm_cache WHERE name
$this->like 'acl_userlist_%'",__LINE__,__FILE__, true);
return $this->db->affected_rows();
}
Modified: trunk/property/inc/class.solookup.inc.php
===================================================================
--- trunk/property/inc/class.solookup.inc.php 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/inc/class.solookup.inc.php 2008-09-01 18:56:48 UTC (rev
18656)
@@ -38,11 +38,9 @@
function property_solookup()
{
- // $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bocommon =
CreateObject('property.bocommon');
$this->db = $this->bocommon->new_db();
- $this->db2 =
$this->bocommon->new_db($this->db);
$this->join = $this->bocommon->join;
$this->like = $this->bocommon->like;
@@ -52,19 +50,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) && $data['sort']
? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
@@ -88,24 +79,24 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
- $querymethod = " $where (id $this->like
'%$query%' or org_name $this->like '%$query%')";
+ $querymethod = " $where org_name $this->like
'%$query%'";
}
$sql = "SELECT person_id,first_name,last_name FROM
phpgw_contact_person $filtermethod $querymethod";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $contact = array();
while ($this->db->next_record())
{
$contact[] = array
(
'id' =>
$this->db->f('person_id'),
- 'contact_name' =>
$this->db->f('last_name') . ', ' . $this->db->f('first_name'),
+ 'contact_name' =>
$this->db->f('last_name',true) . ', ' . $this->db->f('first_name',true),
);
}
//_debug_array($vendor);
@@ -117,22 +108,14 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
-
if ($order)
{
$ordermethod = " order by $order $sort";
@@ -153,24 +136,24 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
- $querymethod = " $where (id $this->like
'%$query%' or org_name $this->like '%$query%')";
+ $querymethod = " $where (id = ". (int)$query .
"OR org_name $this->like '%$query%')";
}
$sql = "SELECT id,org_name FROM fm_vendor $filtermethod
$querymethod";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $vendor = array();
while ($this->db->next_record())
{
$vendor[] = array
(
- 'id' => $this->db->f('id'),
- 'org_name' =>
$this->db->f('org_name'),
+ 'id' => $this->db->f('id'),
+ 'org_name' =>
$this->db->f('org_name',true),
);
}
//_debug_array($vendor);
@@ -183,19 +166,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
if ($order)
@@ -209,24 +185,24 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
- $querymethod = " where (id $this->like
'%$query%' or descr $this->like '%$query%')";
+ $querymethod = " WHERE (id $this->like
'%$query%' OR descr $this->like '%$query%')";
}
$sql = "SELECT * FROM fm_b_account $querymethod ";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $b_account = array();
while ($this->db->next_record())
{
$b_account[] = array
(
'id' =>
$this->db->f('id'),
- 'descr' => $this->db->f('descr')
+ 'descr' =>
$this->db->f('descr',true)
);
}
@@ -238,19 +214,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
if ($order)
@@ -264,25 +233,25 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
$querymethod = " where ( descr $this->like
'%$query%')";
}
$sql = "SELECT * FROM fm_streetaddress $querymethod ";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $street = array();
while ($this->db->next_record())
{
$street[] = array
(
- 'id' => $this->db->f('id'),
- 'street_name' =>
stripslashes($this->db->f('descr'))
- );
+ 'id' =>
$this->db->f('id'),
+ 'street_name' =>
$this->db->f('descr',true)
+ );
}
return $street;
@@ -292,19 +261,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
if ($order)
@@ -318,25 +280,25 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
$querymethod = " where ( last_name $this->like
'%$query%' or first_name $this->like '%$query%')";
}
$sql = "SELECT * FROM fm_tenant $querymethod ";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $tenant = array();
while ($this->db->next_record())
{
$tenant[] = array
(
'id' =>
$this->db->f('id'),
- 'last_name' =>
$this->db->f('last_name'),
- 'first_name' =>
$this->db->f('first_name')
+ 'last_name' =>
$this->db->f('last_name',true),
+ 'first_name' =>
$this->db->f('first_name',true)
);
}
@@ -347,19 +309,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
if ($order)
@@ -373,25 +328,25 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
$querymethod = " where ( tekst1 $this->like
'%$query%' or tekst2 $this->like '%$query%' or tekst3 $this->like '%$query%' or
tekst4 $this->like '%$query%' or tekst5 $this->like '%$query%' or tekst6
$this->like '%$query%')";
}
$sql = "SELECT * FROM fm_ns3420 $querymethod ";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $ns3420 = array();
while ($this->db->next_record())
{
$ns3420[] = array
(
'id' =>
$this->db->f('id'),
- 'ns3420_descr' =>
$this->db->f('tekst1') . ' ' .$this->db->f('tekst2') . ' '
.$this->db->f('tekst3') . ' ' .$this->db->f('tekst4') . ' '
.$this->db->f('tekst5') . ' ' .$this->db->f('tekst6')
- );
+ 'ns3420_descr' =>
$this->db->f('tekst1',true) . ' ' .$this->db->f('tekst2',true) . ' '
.$this->db->f('tekst3',true) . ' ' .$this->db->f('tekst4',true) . ' '
.$this->db->f('tekst5',true) . ' ' .$this->db->f('tekst6',true)
+ );
}
return $ns3420;
@@ -401,19 +356,12 @@
{
if(is_array($data))
{
- if ($data['start'])
- {
- $start=$data['start'];
- }
- else
- {
- $start=0;
- }
- $filter =
(isset($data['filter'])?$data['filter']:'none');
- $query =
(isset($data['query'])?$data['query']:'');
- $sort =
(isset($data['sort'])?$data['sort']:'DESC');
- $order =
(isset($data['order'])?$data['order']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:0);
+ $start = isset($data['start']) &&
$data['start'] ? $data['start'] : 0;
+ $filter =
isset($data['filter'])?$data['filter']:'none';
+ $query =
isset($data['query'])?$data['query']:'';
+ $sort = isset($data['sort']) &&
$data['sort'] ? $data['sort']:'DESC';
+ $order =
isset($data['order'])?$data['order']:'';
+ $cat_id =
isset($data['cat_id'])?$data['cat_id']:0;
}
if ($order)
@@ -427,25 +375,25 @@
if($query)
{
- $query = preg_replace("/'/",'',$query);
- $query = preg_replace('/"/','',$query);
+ $query = $this->db->db_addslashes($query);
$querymethod = " AND ( account_lastname
$this->like '%$query%' or account_firstname $this->like '%$query%')";
}
$sql = "SELECT * FROM phpgw_accounts WHERE
account_status = 'A' AND account_type = 'u' $querymethod ";
- $this->db2->query($sql,__LINE__,__FILE__);
- $this->total_records = $this->db2->num_rows();
+ $this->db->query($sql,__LINE__,__FILE__);
+ $this->total_records = $this->db->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $phpgw_user = array();
while ($this->db->next_record())
{
$phpgw_user[] = array
(
'id' =>
$this->db->f('account_id'),
- 'last_name' =>
$this->db->f('account_lastname'),
- 'first_name' =>
$this->db->f('account_firstname')
+ 'last_name' =>
$this->db->f('account_lastname',true),
+ 'first_name' =>
$this->db->f('account_firstname',true)
);
}
return $phpgw_user;
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/inc/class.uientity.inc.php 2008-09-01 18:56:48 UTC (rev
18656)
@@ -1403,8 +1403,15 @@
}
else
{
- echo 'Nothing';
- return;
+ if($this->cat_id)
+ {
+ $values =
$this->bo->read_single(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
+ }
+ else
+ {
+ echo 'Nothing';
+ return;
+ }
}
if (isset($values['cat_id']) && $values['cat_id'])
@@ -1429,7 +1436,7 @@
$location_data=$bolocation->initiate_ui_location(array(
'values' =>
$values['location_data'],
- 'type_id' =>
count(explode('-',$values['location_data']['location_code'])),
+ 'type_id' =>
$category['location_level'],
'no_link' => false, //
disable lookup links for location type less than type_id
'lookup_type' => 'view',
'tenant' =>
$category['lookup_tenant'],
@@ -1515,13 +1522,19 @@
{
if(isset($entry['choice']) &&
is_array($entry['choice']))
{
+ $values = array();
foreach($entry['choice'] as
$choice)
{
if(isset($choice['checked']) && $choice['checked'])
{
- $value =
$choice['value'];
+ $values[] =
"[*{$choice['value']}*]";
}
+ else
+ {
+ $values[] =
$choice['value'];
+ }
}
+ $value = implode(' , ',$values);
}
else
{
@@ -1534,6 +1547,23 @@
'sep' => '-',
'value' =>
$value
);
+
+ if ($entry['datatype'] == 'T' ||
$entry['datatype'] == 'V')
+ {
+ $content[] = array
+ (
+ 'name' => '|',
+ 'sep' => '',
+ 'value' => ''
+ );
+ $content[] = array
+ (
+ 'name' => '|',
+ 'sep' => '',
+ 'value' => ''
+ );
+
+ }
}
$pdf->ezTable($content,'','',
array('xPos'=>50,'xOrientation'=>'right','width'=>500,0,'shaded'=>0,'fontSize'
=> 10,'showLines'=> 0,'titleFontSize' =>
12,'outerLineThickness'=>2,'showHeadings'=>0
Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/inc/class.uiwo_hour.inc.php 2008-09-01 18:56:48 UTC (rev
18656)
@@ -602,13 +602,14 @@
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
'files'));
$show_cost = phpgw::get_var('show_cost',
'bool');
- $show_details =
phpgw::get_var('show_details', 'bool');
- $workorder_id =
phpgw::get_var('workorder_id', 'int');
+ $show_details = phpgw::get_var('show_details',
'bool');
+ $workorder_id = phpgw::get_var('workorder_id', 'int');
$to_email = phpgw::get_var('to_email',
'email');
- $update_email =
phpgw::get_var('update_email', 'bool');
+ $update_email = phpgw::get_var('update_email',
'bool');
$send_order = phpgw::get_var('send_order',
'bool');
$no_email = phpgw::get_var('no_email',
'bool');
- $values = phpgw::get_var('values');
+ $values = phpgw::get_var('values');
+ $print = phpgw::get_var('print',
'bool');
if($update_email)
{
@@ -676,18 +677,21 @@
);
- $table_send[] = array
- (
- 'lang_send_order' => lang('Send
Order'),
- 'lang_send_order_statustext' => lang('Send
this order by email')
- );
+ if( !$print && !$no_email)
+ {
+ $table_send[] = array
+ (
+ 'lang_send_order' =>
lang('Send Order'),
+ 'lang_send_order_statustext' =>
lang('Send this order by email')
+ );
- $table_done[] = array
- (
- 'lang_done' => lang('Done'),
- 'lang_done_statustext' => lang('Back
to calculation'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uiwo_hour.index', 'workorder_id'=> $workorder_id))
- );
+ $table_done[] = array
+ (
+ 'lang_done' =>
lang('Done'),
+ 'lang_done_statustext' =>
lang('Back to calculation'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uiwo_hour.index', 'workorder_id'=> $workorder_id))
+ );
+ }
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$date =
$GLOBALS['phpgw']->common->show_date(time(),$dateformat);
@@ -714,9 +718,10 @@
}
}
-
+
$email_data = array
(
+ 'org_name'
=> isset($this->config->config_data['org_name']) ?
"{$this->config->config_data['org_name']}::" : '',
'location_data'
=> $location_data,
'lang_workorder'
=> lang('Workorder ID'),
'workorder_id'
=> $workorder_id,
@@ -787,10 +792,10 @@
$receipt['error'][]=array('msg'=>lang('No mailaddress is selected'));
}
- if($to_email)
+ if($to_email || $print)
{
-
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . '/' . 'property' . '/' .
'templates' . '/' . 'base' . '/' . 'wo_hour'));
-
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . '/' . 'property' . '/' .
'templates' . '/' . 'base' . '/' . 'location_view'));
+
$this->create_html->add_file(array(PHPGW_SERVER_ROOT .
'/property/templates/base/wo_hour'));
+
$this->create_html->add_file(array(PHPGW_SERVER_ROOT .
'/property/templates/base/location_view'));
$this->create_html->set_var('phpgw',array('email_data' => $email_data));
@@ -809,7 +814,19 @@
$html = $proc->transformToXML($xml);
-// print $html;
+ if($print)
+ {
+ echo <<<HTML
+ <script
language="Javascript1.2">
+ <!--
+
document.write("<form><input type=button "
+ +"value=\"Print Page\"
onClick=\"window.print();\"></form>");
+ //-->
+ </script>
+HTML;
+ echo $html;
+ exit;
+ }
$headers = "Return-Path: <". $from_email
.">\r\n";
$headers .= "From: " . $from_name . "<" .
$from_email .">\r\n";
@@ -905,7 +922,18 @@
'lang_filename'
=> lang('Filename'),
'lang_file_action'
=> lang('attach file'),
'lang_view_file_statustext' =>
lang('click to view file'),
- 'lang_file_action_statustext' => lang('Check
to attach file')
+ 'lang_file_action_statustext' => lang('Check
to attach file'),
+ 'lang_print'
=> lang('print'),
+ 'lang_print_statustext' =>
lang('open this page as printerfrendly'),
+ 'print_action'
=> "javascript:openwindow('"
+
. $GLOBALS['phpgw']->link('/index.php', array
+
(
+
'menuaction' => 'property.uiwo_hour.view',
+
'workorder_id' => $workorder_id,
+
'show_cost' => $show_cost,
+
'show_details' => $show_details,
+
'print' => true
+
)) . "','700','600')"
);
//_debug_array($data);
Modified: trunk/property/inc/cron/forward_mail_as_sms.php
===================================================================
--- trunk/property/inc/cron/forward_mail_as_sms.php 2008-08-29 19:04:50 UTC
(rev 18655)
+++ trunk/property/inc/cron/forward_mail_as_sms.php 2008-09-01 18:56:48 UTC
(rev 18656)
@@ -23,7 +23,6 @@
function forward_mail_as_sms()
{
- // $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->bocommon =
CreateObject('property.bocommon');
$this->db = &
$GLOBALS['phpgw']->db;
}
@@ -140,25 +139,31 @@
$pref =
$GLOBALS['phpgw']->preferences->read_repository();
$GLOBALS['phpgw_info']['user']['preferences']['felamimail'] =
isset($pref['felamimail']) ? $pref['felamimail'] : '';
+ $boPreferences =
CreateObject('felamimail.bopreferences');
+ $boPreferences->setProfileActive(true,2); //2 for
selected user
$bofelamimail =
CreateObject('felamimail.bofelamimail');
+
$connectionStatus = $bofelamimail->openConnection();
- $headers = $bofelamimail->getHeaders(0, $maxMessages =
15, $sort = 6);
+ $headers = $bofelamimail->getHeaders('INBOX', 1,
$maxMessages = 15, $sort = 0, $_reverse = 1, $_filter = array('string' => '',
'type' => 'quick', 'status' => 'unseen'));
$j = 0;
- foreach ($headers['header'] as $header)
+ if (isset($headers['header']) &&
is_array($headers['header']))
{
- if($header['seen'] == 0)
+ foreach ($headers['header'] as $header)
{
- $sms[$j]['message'] =
$header['subject'];
- $bodyParts =
$bofelamimail->getMessageBody($header['uid']);
- $sms[$j]['message'] .= "\n";
- for($i=0; $i<count($bodyParts); $i++ )
+ if($header['seen'] == 0)
{
- $sms[$j]['message'] .=
$bodyParts[$i]['body'] . "\n";
+ $sms[$j]['message'] =
utf8_encode($header['subject']);
+ $bodyParts =
$bofelamimail->getMessageBody($header['uid']);
+ $sms[$j]['message'] .= "\n";
+ for($i=0; $i<count($bodyParts);
$i++ )
+ {
+ $sms[$j]['message'] .=
utf8_encode($bodyParts[$i]['body']) . "\n";
+ }
+
+ $sms[$j]['message'] =
substr($sms[$j]['message'],0,160);
+ $j++;
}
-
- $sms[$j]['message'] =
substr($sms[$j]['message'],0,160);
- $j++;
}
}
if($connectionStatus == 'true')
@@ -188,4 +193,3 @@
}
}
}
-
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/setup/tables_update.inc.php 2008-09-01 18:56:48 UTC (rev
18656)
@@ -2667,6 +2667,7 @@
$levels = $GLOBALS['phpgw_setup']->oProc->f('levels');
//perform an update on all location_codes on all levels to make
sure they are consistent and unique
+ $locations = array();
for ($level=1;$level<($levels+1);$level++)
{
$sql = "SELECT * from fm_location{$level}";
@@ -2676,19 +2677,23 @@
{
$location_code = array();
$where = 'WHERE';
- $locations[$i]['condition'] = '';
+ $locations[$level][$i]['condition'] = '';
for ($j=1;$j<($level+1);$j++)
{
$loc =
$GLOBALS['phpgw_setup']->oProc->f("loc{$j}");
$location_code[] = $loc;
- $locations[$i]['condition'] .= "$where
loc{$j}='{$loc}'";
+ $locations[$level][$i]['condition'] .=
"$where loc{$j}='{$loc}'";
$where = 'AND';
}
- $locations[$i]['new_values']['location_code'] =
implode('-', $location_code);
+
$locations[$level][$i]['new_values']['location_code'] = implode('-',
$location_code);
$i++;
}
- foreach($locations as $location)
+ }
+
+ foreach($locations as $level => $location_at_leve)
+ {
+ foreach($location_at_leve as $location )
{
$sql = "UPDATE fm_location{$level} SET
location_code = '{$location['new_values']['location_code']}'
{$location['condition']}";
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
@@ -2708,12 +2713,14 @@
);
}
}
-
+
foreach ($locations as $location)
{
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_locations (level, location_code) VALUES ({$location['level']},
'{$location['location_code']}')");
}
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE phpgw_acl set
acl_grantor = -1 WHERE acl_grantor IS NULL",__LINE__,__FILE__);
+
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
$GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.546';
Modified: trunk/property/templates/base/config.tpl
===================================================================
--- trunk/property/templates/base/config.tpl 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/templates/base/config.tpl 2008-09-01 18:56:48 UTC (rev
18656)
@@ -13,6 +13,10 @@
<td
colspan="2"> <b>{lang_Workorder}/{lang_FM_settings}</b></font></td>
</tr>
<tr class="row_on">
+ <td>{lang_organisation}:</td>
+ <td><input name="newsettings[org_name]" value="{value_org_name}"></td>
+ </tr>
+ <tr class="row_on">
<td>{lang_Path_to_Invoice_Export_file}: ({lang_mandatory})<br>
{lang_On_windows_use}: "//computername/share" {lang_or}
"\\\\computername\share"</td>
<td><input name="newsettings[export_path]"
value="{value_export_path}"></td>
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/templates/base/entity.xsl 2008-09-01 18:56:48 UTC (rev
18656)
@@ -221,7 +221,7 @@
</xsl:when>
</xsl:choose>
<xsl:choose>
- <xsl:when test="value_id!=''">
+ <xsl:when test="attributes_values !=''">
<tr>
<td class="th_text" valign
="top">
<a href="{link_pdf}"
target="_blank">PDF</a>
Modified: trunk/property/templates/base/wo_hour.xsl
===================================================================
--- trunk/property/templates/base/wo_hour.xsl 2008-08-29 19:04:50 UTC (rev
18655)
+++ trunk/property/templates/base/wo_hour.xsl 2008-09-01 18:56:48 UTC (rev
18656)
@@ -304,6 +304,14 @@
</tr>
</xsl:when>
</xsl:choose>
+ <tr>
+ <td class="th_text"
align="left">
+ <a
href="{print_action}" title="{lang_print_statustext}"
style="cursor:help"><xsl:value-of select="lang_print"/></a>
+ </td>
+ <td>
+ </td>
+ </tr>
+
<xsl:choose>
<xsl:when test="email_list
!=''">
<tr>
@@ -403,13 +411,13 @@
</td>
</tr>
<xsl:choose>
- <xsl:when test="no_email =''">
+ <xsl:when test="table_send !=''">
<tr><td><xsl:apply-templates
select="table_send"/></td></tr>
</xsl:when>
</xsl:choose>
</form>
<xsl:choose>
- <xsl:when test="no_email =''">
+ <xsl:when test="table_send !=''">
<tr><td><xsl:apply-templates
select="table_done"/></td></tr>
</xsl:when>
</xsl:choose>
@@ -498,6 +506,7 @@
<xsl:value-of select="lang_from"/>
</td>
<td align="left" colspan="2">
+ <xsl:value-of select="org_name"/>
<xsl:value-of select="lang_district"/>
<xsl:text> </xsl:text>
<xsl:value-of select="district"/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18656] update and stabilize,
Sigurd Nes <=