[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uiasync.inc.php class.uiadmi...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.uiasync.inc.php class.uiadmi... |
Date: |
Thu, 14 Sep 2006 17:40:38 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/09/14 17:40:38
Modified files:
inc : class.uiasync.inc.php
class.uiadmin_custom.inc.php
class.uistandard_3.inc.php
class.sostandard_3.inc.php
class.sostandard_2.inc.php
class.boactor.inc.php
Log message:
link
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiasync.inc.php?cvsroot=phpgroupware&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_custom.inc.php?cvsroot=phpgroupware&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uistandard_3.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.sostandard_3.inc.php?cvsroot=phpgroupware&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.sostandard_2.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boactor.inc.php?cvsroot=phpgroupware&r1=1.10&r2=1.11
Patches:
Index: class.uiasync.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiasync.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- class.uiasync.inc.php 14 Sep 2006 13:53:52 -0000 1.13
+++ class.uiasync.inc.php 14 Sep 2006 17:40:38 -0000 1.14
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uiasync.inc.php,v 1.13 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uiasync.inc.php,v 1.14 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -43,11 +43,25 @@
$this->bo =
CreateObject($this->currentapp.'.boasync',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
$this->order =
$this->bo->order;
$this->allrows =
$this->bo->allrows;
+
+ if(!$this->acl_manage)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl2_location));
+ }
+
}
function save_sessiondata()
@@ -65,6 +79,7 @@
function index()
{
+
$GLOBALS['phpgw']->xslttpl->add_file(array('async','nextmatchs','search_field'));
$method_list = $this->bo->read();
@@ -72,12 +87,14 @@
while (is_array($method_list) && list(,$method) =
each($method_list))
{
$data_set = unserialize($method['data']);
+ $run_data = array('menuaction'=>
$method['name']);
$method_data=array();
while (is_array($data_set) && list($key,$value)
= each($data_set))
{
$method_data[] = $key . '=' . $value;
+ $run_data[$key] = $value;
}
@@ -87,8 +104,7 @@
'name'
=> $method['name'],
'first'
=> $method['descr'],
'data'
=> @implode (',',$method_data),
- // FIX THIS !!
- //'link_run'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> $method['name'] .
'&' . @implode ('&',$method_data)),
+ 'link_run'
=> $GLOBALS['phpgw']->link('/index.php',$run_data),
'link_schedule'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uialarm.edit', 'method_id'=> $method['id'])),
'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.edit', 'id'=> $method['id'])),
'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.delete', 'id'=> $method['id'])),
Index: class.uiadmin_custom.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_custom.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- class.uiadmin_custom.inc.php 17 Jun 2006 08:45:56 -0000 1.5
+++ class.uiadmin_custom.inc.php 14 Sep 2006 17:40:38 -0000 1.6
@@ -10,7 +10,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uiadmin_custom.inc.php,v 1.5 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uiadmin_custom.inc.php,v 1.6 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -46,6 +46,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -74,6 +82,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$resort = get_var('resort',array('POST','GET'));
@@ -99,10 +112,10 @@
'descr'
=> $entry['descr'],
'sorting'
=> $entry['sorting'],
'active'
=> $entry['active']?'X':'',
- 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=up&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_down'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=down&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.delete&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id']),
+ 'link_up'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.index', 'resort'=>'up', 'cat_id'=>
$entry['acl_location'], 'id'=> $entry['id'], 'allrows'=> $this->allrows)),
+ 'link_down'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.index', 'resort'=>'down', 'cat_id'=>
$entry['acl_location'], 'id'=> $entry['id'], 'allrows'=> $this->allrows)),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.edit', 'cat_id'=> $entry['acl_location'],
'id'=> $entry['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.delete', 'cat_id'=> $entry['acl_location'],
'id'=> $entry['id'])),
'lang_up_text'
=> lang('shift up'),
'lang_down_text'
=> lang('shift down'),
'lang_edit_text'
=> lang('edit the custom_function'),
@@ -131,8 +144,8 @@
'var' => 'acl_location',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
-
'cat_id' =>$this->cat_id,
-
'allrows'=>$this->allrows)
+
'cat_id' => $this->cat_id,
+
'allrows' => $this->allrows)
)),
'sort_name' =>
$this->nextmatchs->show_sort_order(array
@@ -141,8 +154,8 @@
'var' => 'column_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
-
'cat_id' =>$this->cat_id,
-
'allrows'=>$this->allrows)
+
'cat_id' => $this->cat_id,
+
'allrows' => $this->allrows)
)),
'sort_sorting' =>
$this->nextmatchs->show_sort_order(array
(
@@ -150,8 +163,8 @@
'var' => 'custom_function_sort',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
-
'cat_id' =>$this->cat_id,
-
'allrows'=>$this->allrows)
+
'cat_id' => $this->cat_id,
+
'allrows' => $this->allrows)
)),
'lang_name' => lang('Name'),
);
@@ -160,7 +173,7 @@
(
'lang_add' => lang('add'),
'lang_add_custom_functiontext' => lang('add a
custom_function'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&cat_id='
. $this->cat_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.edit', 'cat_id'=> $this->cat_id)),
'lang_done' => lang('done'),
'lang_done_custom_functiontext' => lang('back
to admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php'),
@@ -178,10 +191,10 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'cat_id'
=>$this->cat_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'cat_id' => $this->cat_id
);
@@ -224,6 +237,11 @@
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$values = get_var('values',array('POST'));
@@ -298,7 +316,7 @@
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&cat_id='.$this->cat_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_custom.index', 'cat_id'=> $this->cat_id)),
'lang_id' =>
lang('Custom function ID'),
'lang_custom_type' =>
lang('Entity type'),
'lang_no_custom_type' =>
lang('No entity type'),
@@ -337,6 +355,11 @@
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
Index: class.uistandard_3.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uistandard_3.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- class.uistandard_3.inc.php 14 Sep 2006 13:53:52 -0000 1.12
+++ class.uistandard_3.inc.php 14 Sep 2006 17:40:38 -0000 1.13
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uistandard_3.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uistandard_3.inc.php,v 1.13 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -192,12 +192,10 @@
$values['id']=$id;
$action='edit';
}
- else
- {
- $id = $values['id'];
- }
$receipt =
$this->bo->save($values,$action,$type);
+
+ $id = $receipt['id'];
}
if ($id)
Index: class.sostandard_3.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.sostandard_3.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- class.sostandard_3.inc.php 30 Jan 2006 22:14:19 -0000 1.9
+++ class.sostandard_3.inc.php 14 Sep 2006 17:40:38 -0000 1.10
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.sostandard_3.inc.php,v 1.9 2006/01/30 22:14:19
sigurdne Exp $
+ * @version $Id: class.sostandard_3.inc.php,v 1.10 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -129,12 +129,15 @@
$table = $this->select_table($type);
$standard['id'] = $this->socommon->next_id($table);
- $standard['num'] =
$this->db->db_addslashes($standard['descr']);
+ $standard['num'] =
$this->db->db_addslashes($standard['num']);
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
+ $this->db->transaction_begin();
$this->db->query("INSERT INTO $table (id, num, descr) "
. "VALUES ('" . $standard['id'] . "','" .
$standard['num'] . "','" . $standard['descr']. "')",__LINE__,__FILE__);
+ $this->db->transaction_commit();
+ $receipt['id'] = $standard['id'];
$receipt['message'][] = array('msg' => lang('standard
has been saved'));
return $receipt;
@@ -147,9 +150,13 @@
$standard['num'] =
$this->db->db_addslashes($standard['num']);
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
+ $this->db->transaction_begin();
$this->db->query("UPDATE $table set descr='" .
$standard['descr'] . "', num='". $standard['num']
. "' WHERE id='" .
$standard['id']. "'",__LINE__,__FILE__);
+ $this->db->transaction_commit();
+
+ $receipt['id'] = $standard['id'];
$receipt['message'][] = array('msg' =>lang('standard
has been edited'));
return $receipt;
}
@@ -157,7 +164,9 @@
function delete($id,$type)
{
$table = $this->select_table($type);
- $this->db->query("DELETE FROM $table WHERE id='" . $id
. "'",__LINE__,__FILE__);
+ $this->db->transaction_begin();
+ $this->db->query("DELETE FROM $table WHERE id=" .
(int)$id ,__LINE__,__FILE__);
+ $this->db->transaction_commit();
}
}
?>
Index: class.sostandard_2.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- class.sostandard_2.inc.php 30 Jan 2006 22:14:19 -0000 1.8
+++ class.sostandard_2.inc.php 14 Sep 2006 17:40:38 -0000 1.9
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.sostandard_2.inc.php,v 1.8 2006/01/30 22:14:19
sigurdne Exp $
+ * @version $Id: class.sostandard_2.inc.php,v 1.9 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -149,9 +149,12 @@
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
+ $this->db->transaction_begin();
+
$this->db->query("INSERT INTO $table (id, descr) "
. "VALUES ('" . $standard['id'] . "','" .
$standard['descr']. "')",__LINE__,__FILE__);
+ $this->db->transaction_commit();
$receipt['message'][] = array('msg' => lang('standard
has been saved'));
return $receipt;
}
@@ -163,9 +166,12 @@
$standard['descr'] =
$this->db->db_addslashes($standard['descr']);
+ $this->db->transaction_begin();
+
$this->db->query("UPDATE $table set descr='" .
$standard['descr']
. "' WHERE id='" .
$standard['id']. "'",__LINE__,__FILE__);
+ $this->db->transaction_commit();
$receipt['message'][] = array('msg' => lang('standard
has been edited'));
return $receipt;
}
@@ -173,8 +179,9 @@
function delete($id,$type)
{
$table = $this->select_table($type);
-
- $this->db->query("DELETE FROM $table WHERE id='" . $id
. "'",__LINE__,__FILE__);
+ $this->db->transaction_begin();
+ $this->db->query("DELETE FROM $table WHERE id=" .
(int)$id,__LINE__,__FILE__);
+ $this->db->transaction_commit();
}
}
?>
Index: class.boactor.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boactor.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- class.boactor.inc.php 17 Apr 2006 11:36:05 -0000 1.10
+++ class.boactor.inc.php 14 Sep 2006 17:40:38 -0000 1.11
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.boactor.inc.php,v 1.10 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.boactor.inc.php,v 1.11 2006/09/14 17:40:38
sigurdne Exp $
*/
/**
@@ -192,7 +192,7 @@
}
$insert_record_actor[] =
$actor['attributes'][$i]['name'];
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.addressbook&column='
. $actor['attributes'][$i]['name']);
+ $lookup_link =
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uilookup.addressbook', 'column'=>
$actor['attributes'][$i]['name']));
$lookup_functions[$m]['name'] =
'lookup_'. $actor['attributes'][$i]['name'] .'()';
$lookup_functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
@@ -215,7 +215,7 @@
}
$insert_record_actor[] =
$actor['attributes'][$i]['name'];
- $lookup_link =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uilookup.vendor&column='
. $actor['attributes'][$i]['name']);
+ $lookup_link =
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uilookup.vendor', 'column'=>
$actor['attributes'][$i]['name']));
$lookup_functions[$m]['name'] =
'lookup_'. $actor['attributes'][$i]['name'] .'()';
$lookup_functions[$m]['action'] =
'Window1=window.open('."'" . $lookup_link ."'"
.',"Search","width=800,height=700,toolbar=no,scrollbars=yes,resizable=yes");';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.uiasync.inc.php class.uiadmi...,
Sigurd Nes <=