mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 09:53:20 +01:00
GLOBALS and formatting work
This commit is contained in:
parent
1f88e43cda
commit
70ecf36bfe
@ -358,7 +358,7 @@
|
||||
$this->limit = 30;
|
||||
}
|
||||
|
||||
// global $filter;
|
||||
/*global $filter; */
|
||||
if (empty($this->filter) || !isset($this->filter))
|
||||
{
|
||||
if($this->prefs['default_filter'])
|
||||
@ -556,8 +556,9 @@
|
||||
|
||||
function add_email()
|
||||
{
|
||||
global $name,$referer,$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);
|
||||
for ($i=count($named);$i>=0;$i--) { $names[$i] = $named[$i]; }
|
||||
@ -707,12 +708,9 @@
|
||||
|
||||
function delete()
|
||||
{
|
||||
global $entry,$ab_id,$confirm;
|
||||
$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 = $entry['ab_id'];
|
||||
}
|
||||
if (!$ab_id)
|
||||
{
|
||||
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list'));
|
||||
@ -744,7 +742,6 @@
|
||||
else
|
||||
{
|
||||
$this->bo->delete_entry(array('id' => $ab_id));
|
||||
|
||||
@Header('Location: ' . $GLOBALS['phpgw']->link('/addressbook/index.php','menuaction=addressbook.uiaddressbook.get_list'));
|
||||
}
|
||||
}
|
||||
@ -755,7 +752,6 @@
|
||||
$submit = $GLOBALS['HTTP_POST_VARS']['submit'];
|
||||
$referer = $GLOBALS['HTTP_GET_VARS']['referer'];
|
||||
|
||||
|
||||
/* First, make sure they have permission to this entry */
|
||||
$check = $this->bo->read_entry(array('id' => $ab_id, 'fields' => array('owner' => 'owner','tid' => 'tid')));
|
||||
|
||||
@ -985,12 +981,6 @@
|
||||
$this->template->set_var('vcard_button',lang('no vcard'));
|
||||
}
|
||||
|
||||
# it's better to use $GLOBALS['phpgw_info']['server']['webserver_url'] instead of '/phpgroupware'
|
||||
# right?
|
||||
# and why do we replace /phpgroupware from the url, we already have a perfect url?
|
||||
|
||||
# $this->template->set_var('done_button',$this->html_1button_form('DoneForm','Done',
|
||||
# $referer ? ereg_replace('/phpgroupware','',$referer) : $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list')));
|
||||
$this->template->set_var('done_button',$this->html_1button_form('DoneForm','Done',
|
||||
$referer ? $referer : $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.get_list')));
|
||||
$this->template->set_var('access_link',$access_link);
|
||||
@ -1293,7 +1283,7 @@
|
||||
/* Following used for add/edit */
|
||||
function addressbook_form($format,$action,$title='',$fields='',$customfields='',$cat_id='')
|
||||
{
|
||||
global $referer;
|
||||
$referer = $GLOBALS['HTTP_GET_VARS']['referer'] ? $GLOBALS['HTTP_GET_VARS']['referer'] : $GLOBALS['HTTP_POST_VARS']['referer'];
|
||||
|
||||
$this->template->set_file(array('form' => 'form.tpl'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user