[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6732] prepare for new app
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6732] prepare for new app |
Date: |
Fri, 07 Jan 2011 07:58:21 +0000 |
Revision: 6732
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6732
Author: sigurdne
Date: 2011-01-07 07:58:20 +0000 (Fri, 07 Jan 2011)
Log Message:
-----------
prepare for new app
Modified Paths:
--------------
trunk/phpgwapi/inc/class.historylog.inc.php
trunk/phpgwapi/inc/class.xslttemplates.inc.php
trunk/phpgwapi/setup/setup.inc.php
trunk/phpgwapi/setup/tables_update.inc.php
trunk/property/inc/class.bocommon.inc.php
trunk/property/inc/class.socommon.inc.php
trunk/property/inc/class.sogeneric.inc.php
trunk/property/inc/class.uitts.inc.php
Modified: trunk/phpgwapi/inc/class.historylog.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.historylog.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/phpgwapi/inc/class.historylog.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -15,10 +15,10 @@
* @package phpgwapi
* @subpackage application
*/
- class historylog
+ class phpgwapi_historylog
{
var $db;
- var $location_id;
+ protected $location_id;
var $template;
var $nextmatchs;
var $types = array(
@@ -28,7 +28,7 @@
);
var $alternate_handlers = array();
- function historylog($appname, $location = '.')
+ function __construct($appname, $location = '.')
{
if (! $appname)
{
@@ -50,12 +50,20 @@
{
if ($new_value != $old_value)
{
- $this->db->query("INSERT INTO phpgw_history_log
(history_record_id,"
- .
"location_id,history_owner,history_status,history_new_value,history_old_value,history_timestamp)
"
- . "VALUES ('".(int)$record_id."'," .
$this->location_id . ",'"
- .
$GLOBALS['phpgw_info']['user']['account_id'] . "','$status','"
- . $this->db->db_addslashes($new_value)
. "','" . $this->db->db_addslashes($old_value) . "','" .
date($this->db->datetime_format())
- . "')",__LINE__,__FILE__);
+
+ $value_set = array
+ (
+ 'history_record_id' =>
(int)$record_id,
+ 'location_id' =>
$this->location_id,
+ 'history_owner' =>
$GLOBALS['phpgw_info']['user']['account_id'],
+ 'history_status' => $status,
+ 'history_new_value' =>
$this->db->db_addslashes($new_value),
+ 'history_old_value' =>
$this->db->db_addslashes($old_value),
+ 'history_timestamp' =>
date($this->db->datetime_format())
+ );
+
+ $this->db->query( 'INSERT INTO
phpgw_history_log (' . implode( ',', array_keys( $value_set ) ) . ') VALUES
('
+ . $this->db->validate_insert( array_values(
$value_set ) ) . ')',__LINE__,__FILE__);
}
}
@@ -108,14 +116,15 @@
{
$return_values[] = array
(
- 'id' =>
$this->db->f('history_id'),
- 'record_id' =>
$this->db->f('history_record_id'),
- 'owner' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('history_owner')),
-// 'status' =>
lang($this->types[$this->db->f('history_status')]),
- 'status' => str_replace('
','',$this->db->f('history_status')),
- 'new_value' =>
htmlspecialchars_decode($this->db->f('history_new_value',true)),
- 'old_value' =>
htmlspecialchars_decode($this->db->f('history_old_value',true)),
- 'datetime' =>
$this->db->from_timestamp($this->db->f('history_timestamp'))
+ 'id' =>
$this->db->f('history_id'),
+ 'record_id' =>
$this->db->f('history_record_id'),
+ 'owner' =>
$GLOBALS['phpgw']->accounts->id2name($this->db->f('history_owner')),
+// 'status' =>
lang($this->types[$this->db->f('history_status')]),
+ 'status' => str_replace('
','',$this->db->f('history_status')),
+ 'new_value' =>
htmlspecialchars_decode($this->db->f('history_new_value',true)),
+ 'old_value' =>
htmlspecialchars_decode($this->db->f('history_old_value',true)),
+ 'datetime' =>
$this->db->from_timestamp($this->db->f('history_timestamp')),
+ 'publish' =>
$this->db->f('publish')
);
}
return $return_values;
Modified: trunk/phpgwapi/inc/class.xslttemplates.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.xslttemplates.inc.php 2011-01-05 14:53:57 UTC
(rev 6731)
+++ trunk/phpgwapi/inc/class.xslttemplates.inc.php 2011-01-07 07:58:20 UTC
(rev 6732)
@@ -130,7 +130,7 @@
{
foreach ( $filename as $file )
{
- $this->add_file($file);
+ $this->add_file($file, $rootdir);
}
return;
}
Modified: trunk/phpgwapi/setup/setup.inc.php
===================================================================
--- trunk/phpgwapi/setup/setup.inc.php 2011-01-05 14:53:57 UTC (rev 6731)
+++ trunk/phpgwapi/setup/setup.inc.php 2011-01-07 07:58:20 UTC (rev 6732)
@@ -12,7 +12,7 @@
// Basic information about this app
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
- $setup_info['phpgwapi']['version'] = '0.9.17.531';
+ $setup_info['phpgwapi']['version'] = '0.9.17.532';
$setup_info['phpgwapi']['versions']['current_header'] = '1.31';
$setup_info['phpgwapi']['versions']['system'] = '1.0';
$setup_info['phpgwapi']['enable'] = 3;
Modified: trunk/phpgwapi/setup/tables_update.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_update.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/phpgwapi/setup/tables_update.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -2843,3 +2843,24 @@
}
}
+
+ $test[] = '0.9.17.531';
+ /**
+ * Add publishing flag to history log
+ *
+ * @return string the new version number
+ */
+ function phpgwapi_upgrade0_9_17_531()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_history_log','publish',array('type'
=> 'int','precision' => 2,'nullable' => True));
+
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['phpgwapi']['currentver'] =
'0.9.17.532';
+ return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+ }
+ }
+
Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/property/inc/class.bocommon.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -43,8 +43,8 @@
var $order;
var $cat_id;
var $district_id;
+ var $xsl_rootdir;
-
var $public_functions = array
(
'confirm_session' => true,
@@ -87,7 +87,7 @@
$this->datetimeformat = "Y-m-d G:i:s";
break;
}
-
+ $this->xsl_rootdir = PHPGW_SERVER_ROOT .
'/property/templates/base';
}
function check_perms($rights, $required)
@@ -224,12 +224,12 @@
{
switch($format)
{
- case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_select'));
- break;
- case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_filter'));
- break;
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_select'),$this->xsl_rootdir);
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_filter'),$this->xsl_rootdir);
+ break;
}
if(!$selected && $default)
@@ -304,10 +304,10 @@
switch($format)
{
case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('group_select'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('group_select'), $this->xsl_rootdir);
break;
case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('group_filter'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('group_filter'), $this->xsl_rootdir);
break;
}
@@ -459,12 +459,12 @@
switch($format)
{
- case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_select'));
- break;
- case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_filter'));
- break;
+ case 'select':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_select'),
$this->xsl_rootdir);
+ break;
+ case 'filter':
+
$GLOBALS['phpgw']->xslttpl->add_file(array('user_id_filter'),
$this->xsl_rootdir);
+ break;
}
if(!$selected && $default)
@@ -534,11 +534,11 @@
if( isset($data['type']) && $data['type']=='view')
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_form'), $this->xsl_rootdir);
}
$vendor['value_vendor_id'] =
$data['vendor_id'];
@@ -583,11 +583,11 @@
$field = $data['field'];
if( isset($data['type']) && $data['type']=='view')
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('contact_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('contact_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('contact_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('contact_form'), $this->xsl_rootdir);
}
$contact['value_contact_id'] =
$data['contact_id'];
@@ -616,11 +616,11 @@
{
if($data['type']=='view')
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('tenant_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('tenant_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('tenant_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('tenant_form'), $this->xsl_rootdir);
}
$tenant['value_tenant_id'] =
$data['tenant_id'];
@@ -682,11 +682,11 @@
{
if( isset($data['type']) && $data['type']=='view')
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account_view'),
$this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account_form'),
$this->xsl_rootdir);
}
$b_account['value_b_account_id'] =
$data['b_account_id'];
@@ -729,11 +729,11 @@
return $project_group;
}
-
$GLOBALS['phpgw']->xslttpl->add_file(array('project_group_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('project_group_view'),
$this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('project_group_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('project_group_form'),
$this->xsl_rootdir);
}
$project_group['value_project_group']
= $data['project_group'];
@@ -763,11 +763,11 @@
return $ecodimb;
}
-
$GLOBALS['phpgw']->xslttpl->add_file(array('ecodimb_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('ecodimb_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('ecodimb_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('ecodimb_form'), $this->xsl_rootdir);
}
$ecodimb['value_ecodimb']
= $data['ecodimb'];
@@ -800,11 +800,11 @@
//
return $event;
}
-
$GLOBALS['phpgw']->xslttpl->add_file(array('event_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('event_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('event_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('event_form'), $this->xsl_rootdir);
}
// If the record is not saved - issue a warning
@@ -891,11 +891,11 @@
if($data['type']=='view')
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('alarm_view'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('alarm_view'), $this->xsl_rootdir);
}
else
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('alarm_form'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('alarm_form'), $this->xsl_rootdir);
}
$alarm['header'][] = array
@@ -1413,10 +1413,10 @@
switch($format)
{
case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('select_part_of_town'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('select_part_of_town'),
$this->xsl_rootdir);
break;
case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_part_of_town'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_part_of_town'),
$this->xsl_rootdir);
break;
}
@@ -1456,10 +1456,10 @@
switch($format)
{
case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('select_district'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('select_district'),
$this->xsl_rootdir);
break;
case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_district'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('filter_district'),
$this->xsl_rootdir);
break;
}
@@ -1474,10 +1474,10 @@
switch($data['format'])
{
case 'select':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'), $this->xsl_rootdir);
break;
case 'filter':
-
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_filter'), $this->xsl_rootdir);
break;
}
@@ -1993,7 +1993,7 @@
{
return;
}
- $GLOBALS['phpgw']->xslttpl->add_file(array('menu'));
+ $GLOBALS['phpgw']->xslttpl->add_file(array('menu'),
$this->xsl_rootdir);
if(!$menu =
$GLOBALS['phpgw']->session->appsession($GLOBALS['phpgw_info']['flags']['menu_selection'],
"menu_{$app}"))
{
@@ -2037,7 +2037,7 @@
function no_access()
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('no_access','menu'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('no_access','menu'),
$this->xsl_rootdir);
$receipt['error'][]=array('msg'=>lang('NO ACCESS'));
Modified: trunk/property/inc/class.socommon.inc.php
===================================================================
--- trunk/property/inc/class.socommon.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/property/inc/class.socommon.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -314,6 +314,10 @@
{
$name = 'workorder';
}
+ else if($name == 'helpdesk')
+ {
+ $name = 'workorder';
+ }
$this->db->query("SELECT value FROM fm_idgenerator
WHERE name='{$name}'");
$this->db->next_record();
$next_id = $this->db->f('value') +1;
Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/property/inc/class.sogeneric.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -1436,6 +1436,66 @@
'menu_selection' =>
'admin::property::ticket_status'
);
break;
+
+ case 'helpdesk_status':
+ // the helpdesk app
+ $info = array
+ (
+ 'table'
=> 'phpgw_helpdesk_status',
+ 'id'
=> array('name' => 'id', 'type' => 'auto'),
+ 'fields'
=> array
+ (
+ array
+ (
+ 'name' =>
'name',
+ 'descr' =>
lang('name'),
+ 'type' =>
'varchar'
+ ),
+ array
+ (
+ 'name' =>
'sorting',
+ 'descr' =>
lang('sorting'),
+ 'type' =>
'integer',
+ 'sortable'=>
true
+ ),
+ array
+ (
+ 'name' =>
'color',
+ 'descr' =>
lang('color'),
+ 'type' =>
'varchar'
+ ),
+ array
+ (
+ 'name' =>
'approved',
+ 'descr' =>
lang('approved'),
+ 'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'in_progress',
+ 'descr' =>
lang('In progress'),
+ 'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'delivered',
+ 'descr' =>
lang('delivered'),
+ 'type' =>
'checkbox'
+ ),
+ array
+ (
+ 'name' =>
'closed',
+ 'descr' =>
lang('closed'),
+ 'type' =>
'checkbox'
+ )
+ ),
+ 'edit_msg'
=> lang('edit'),
+ 'add_msg'
=> lang('add'),
+ 'name'
=> lang('event action'),
+ 'acl_location' =>
'.admin',
+ 'menu_selection' =>
'admin::helpdesk::ticket_status'
+ );
+ break;
case 'pending_action_type':
$info = array
(
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2011-01-05 14:53:57 UTC (rev
6731)
+++ trunk/property/inc/class.uitts.inc.php 2011-01-07 07:58:20 UTC (rev
6732)
@@ -2572,6 +2572,7 @@
foreach($additional_notes as &$note)
{
$note['order_text'] = '<input
type="checkbox" name="values[order_text][]" value="'.$note['value_note'].'"
title="'.lang('Check to add text to order').'">';
+
}
}
@@ -2752,6 +2753,7 @@
'lang_no_cat'
=> lang('no category'),
'value_cat_id'
=> $this->cat_id,
'cat_select'
=> $cat_select,
+
'value_category_name'
=> $ticket['category_name'],
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$form_link),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6732] prepare for new app,
Sigurd Nes <=