[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php,1.36
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php,1.36.2.15.2.4,1.36.2.15.2.5 |
Date: |
Tue, 01 Jul 2003 21:39:40 -0400 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv19934/inc
Modified Files:
Tag: Version-0_9_16-branch
class.uiaddressbook.inc.php
Log Message:
some fixes to be more .16 like:
- app-headers
- style-guide
- register globals off
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.4
retrieving revision 1.36.2.15.2.5
diff -C2 -r1.36.2.15.2.4 -r1.36.2.15.2.5
*** class.uiaddressbook.inc.php 2 Jul 2003 00:13:42 -0000 1.36.2.15.2.4
--- class.uiaddressbook.inc.php 2 Jul 2003 01:39:38 -0000 1.36.2.15.2.5
***************
*** 338,342 ****
else
{
! $this->limit = 30;
}
--- 338,342 ----
else
{
! $this->limit = 15;
}
***************
*** 431,435 ****
/*
$this->template->set_var('cats_link',$this->cat_option($this->cat_id)); */
$this->template->set_var('lang_cats',lang('Select'));
!
$this->template->set_var('lang_addressbook',lang('Address book'));
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$this->template->set_var('th_font',$GLOBALS['phpgw_info']['theme']['font']);
--- 431,435 ----
/*
$this->template->set_var('cats_link',$this->cat_option($this->cat_id)); */
$this->template->set_var('lang_cats',lang('Select'));
! //
$this->template->set_var('lang_addressbook',lang('Address book'));
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$this->template->set_var('th_font',$GLOBALS['phpgw_info']['theme']['font']);
***************
*** 540,546 ****
function add_email()
{
! $name = $GLOBALS['HTTP_POST_VARS']['name'] ?
$GLOBALS['HTTP_POST_VARS']['name'] : $GLOBALS['HTTP_GET_VARS']['name'];
! $referer = $GLOBALS['HTTP_POST_VARS']['referer'] ?
$GLOBALS['HTTP_POST_VARS']['referer'] : $GLOBALS['HTTP_GET_VARS']['referer'];
! $add_email = $GLOBALS['HTTP_POST_VARS']['add_email'] ?
$GLOBALS['HTTP_POST_VARS']['add_email'] :
$GLOBALS['HTTP_GET_VARS']['add_email'];
$named = explode(' ', $name);
--- 540,546 ----
function add_email()
{
! $name = $_POST['name'] ? $_POST['name'] :
$_GET['name'];
! $referer = $_POST['referer'] ? $_POST['referer'] :
$_GET['referer'];
! $add_email = $_POST['add_email'] ? $_POST['add_email']
: $_GET['add_email'];
$named = explode(' ', $name);
***************
*** 593,597 ****
function add()
{
! if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$fields = $this->get_form();
--- 593,597 ----
function add()
{
! if ($_POST['submit'])
{
$fields = $this->get_form();
***************
*** 623,629 ****
$this->addressbook_form('','menuaction=addressbook.uiaddressbook.add','Add','',$customfields,$this->cat_id);
! $this->template->set_var('lang_ok',lang('ok'));
! $this->template->set_var('lang_clear',lang('clear'));
! $this->template->set_var('lang_cancel',lang('cancel'));
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
$this->template->parse('out','add');
--- 623,628 ----
$this->addressbook_form('','menuaction=addressbook.uiaddressbook.add','Add','',$customfields,$this->cat_id);
! $this->template->set_var('lang_save',lang('Save'));
! $this->template->set_var('lang_cancel',lang('Cancel'));
$this->template->set_var('cancel_url',$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
$this->template->parse('out','add');
***************
*** 633,637 ****
function edit()
{
! if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$_fields = $this->get_form();
--- 632,636 ----
function edit()
{
! if ($_POST['submit'])
{
$_fields = $this->get_form();
***************
*** 661,665 ****
/* First, make sure they have permission to this entry
*/
! $check = $this->bo->read_entry(array('id' =>
$GLOBALS['HTTP_GET_VARS']['ab_id'], 'fields' => array('owner' => 'owner','tid'
=> 'tid')));
if (
!$this->contacts->check_perms($this->contacts->grants[$check[0]['owner']],PHPGW_ACL_EDIT)
&&
--- 660,664 ----
/* First, make sure they have permission to this entry
*/
! $check = $this->bo->read_entry(array('id' =>
$_GET['ab_id'], 'fields' => array('owner' => 'owner','tid' => 'tid')));
if (
!$this->contacts->check_perms($this->contacts->grants[$check[0]['owner']],PHPGW_ACL_EDIT)
&&
***************
*** 683,687 ****
/* merge in extra fields */
$qfields = $this->contacts->stock_contact_fields +
$this->extrafields + $customfields;
! $fields = $this->bo->read_entry(array('id' =>
$GLOBALS['HTTP_GET_VARS']['ab_id'], 'fields' => $qfields));
$this->addressbook_form('edit','menuaction=addressbook.uiaddressbook.edit',lang('Edit'),$fields[0],$customfields);
--- 682,686 ----
/* merge in extra fields */
$qfields = $this->contacts->stock_contact_fields +
$this->extrafields + $customfields;
! $fields = $this->bo->read_entry(array('id' =>
$_GET['ab_id'], 'fields' => $qfields));
$this->addressbook_form('edit','menuaction=addressbook.uiaddressbook.edit',lang('Edit'),$fields[0],$customfields);
***************
*** 690,700 ****
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$this->template->set_var('ab_id',$GLOBALS['HTTP_GET_VARS']['ab_id']);
$this->template->set_var('tid',$check[0]['tid']);
$this->template->set_var('referer',$referer);
! $this->template->set_var('lang_ok',lang('ok'));
! $this->template->set_var('lang_clear',lang('clear'));
! $this->template->set_var('lang_cancel',lang('cancel'));
! $this->template->set_var('lang_submit',lang('submit'));
$this->template->set_var('cancel_link','<form
method="POST" action="'
.
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')
. '">');
--- 689,697 ----
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
! $this->template->set_var('ab_id',$_GET['ab_id']);
$this->template->set_var('tid',$check[0]['tid']);
$this->template->set_var('referer',$referer);
! $this->template->set_var('lang_save',lang('Save'));
! $this->template->set_var('lang_cancel',lang('Cancel'));
$this->template->set_var('cancel_link','<form
method="POST" action="'
.
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index')
. '">');
***************
*** 711,721 ****
function delete()
{
! $ab_id = $GLOBALS['HTTP_POST_VARS']['entry']['ab_id'] ?
$GLOBALS['HTTP_POST_VARS']['entry']['ab_id'] :
$GLOBALS['HTTP_POST_VARS']['ab_id'];
! $confirm = $GLOBALS['HTTP_GET_VARS']['confirm'] ?
$GLOBALS['HTTP_GET_VARS']['confirm'] :$GLOBALS['HTTP_POST_VARS']['confirm'];
if (!$ab_id)
{
! $ab_id = $GLOBALS['HTTP_GET_VARS']['ab_id'];
// else plain Link in delete does not work
}
! if (!$ab_id)
{
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
--- 708,718 ----
function delete()
{
! $ab_id = $_POST['entry']['ab_id'] ?
$_POST['entry']['ab_id'] : $_POST['ab_id'];
! $confirm = $_GET['confirm'] ? $_GET['confirm']
:$_POST['confirm'];
if (!$ab_id)
{
! $ab_id = $_GET['ab_id']; // else
plain Link in delete does not work
}
! if (!$ab_id || $_POST['no'])
{
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index'));
***************
*** 732,737 ****
$this->template->set_file(array('delete' =>
'delete.tpl'));
! if ($confirm != 'true')
{
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
--- 729,735 ----
$this->template->set_file(array('delete' =>
'delete.tpl'));
! if (!$_POST['yes'])
{
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Addressbook').' - '.lang('Delete');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 754,760 ****
function view()
{
! $ab_id = $GLOBALS['HTTP_GET_VARS']['ab_id'];
! $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
! $referer = $GLOBALS['HTTP_GET_VARS']['referer'];
/* First, make sure they have permission to this entry
*/
--- 752,758 ----
function view()
{
! $ab_id = $_GET['ab_id'];
! $submit = $_POST['submit'];
! $referer = $_GET['referer'];
/* First, make sure they have permission to this entry
*/
***************
*** 777,780 ****
--- 775,779 ----
elseif (!$submit && $ab_id)
{
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('Address book - view');
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 820,825 ****
}
- $this->template->set_var('lang_viewpref',lang('Address
book - view'));
-
unset($qfields['email_type']); // noone is
useing that any more
unset($qfields['privat_email_type']);
--- 819,822 ----
***************
*** 1000,1007 ****
function preferences()
{
! $submit = $GLOBALS['HTTP_POST_VARS']['submit'];
! $prefs = $GLOBALS['HTTP_POST_VARS']['prefs'];
! $other = $GLOBALS['HTTP_POST_VARS']['other'];
! $fcat_id = (int) $GLOBALS['HTTP_POST_VARS']['fcat_id'];
$custom = $this->fields->read_custom_fields();
--- 997,1004 ----
function preferences()
{
! $submit = $_POST['submit'];
! $prefs = $_POST['prefs'];
! $other = $_POST['other'];
! $fcat_id = (int) $_POST['fcat_id'];
$custom = $this->fields->read_custom_fields();
***************
*** 1153,1160 ****
function get_form()
{
! $entry = $GLOBALS['HTTP_POST_VARS']['entry'];
! $fcat_id = $GLOBALS['HTTP_POST_VARS']['fcat_id'];
! $referer = $entry['referer'] ? $entry['referer'] :
$GLOBALS['HTTP_GET_VARS']['referer'];
! $referer = $referer ? $referer :
$GLOBALS['HTTP_POST_VARS']['referer'];
$test = @unserialize(rawurldecode($entry));
--- 1150,1157 ----
function get_form()
{
! $entry = $_POST['entry'];
! $fcat_id = $_POST['fcat_id'];
! $referer = $entry['referer'] ? $entry['referer'] :
$_GET['referer'];
! $referer = $referer ? $referer : $_POST['referer'];
$test = @unserialize(rawurldecode($entry));
***************
*** 1304,1308 ****
function
addressbook_form($format,$action,$title='',$fields='',$customfields='',$cat_id='')
{
! $referer = $GLOBALS['HTTP_GET_VARS']['referer'] ?
$GLOBALS['HTTP_GET_VARS']['referer'] : $GLOBALS['HTTP_POST_VARS']['referer'];
$this->template->set_file(array('form' => 'form.tpl'));
--- 1301,1305 ----
function
addressbook_form($format,$action,$title='',$fields='',$customfields='',$cat_id='')
{
! $referer = $_GET['referer'] ? $_GET['referer'] :
$_POST['referer'];
$this->template->set_file(array('form' => 'form.tpl'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php,1.36.2.15.2.4,1.36.2.15.2.5,
Ralf Becker <address@hidden> <=