mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
Clean up a lot of GET/POST nonsense, moving to POST where possible
This commit is contained in:
parent
7be7aa0595
commit
36d417cbaa
@ -164,7 +164,7 @@
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("cancel_url",$phpgw->link("/addressbook/index.php","sort=$sort&order=$order&filter=$filter&start=$start&cat_id=$cat_id"));
|
||||
$t->set_var("cancel_url",$phpgw->link("/addressbook/index.php"));
|
||||
$t->parse("out","add");
|
||||
$t->pparse("out","add");
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
if (! $this->check_perms($this->grants[$fields[0]['owner']],PHPGW_ACL_DELETE) && $fields[0]['owner'] != $phpgw_info['user']['account_id'])
|
||||
{
|
||||
Header('Location: '
|
||||
. $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
. $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&ncat_id=$cat_id"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
$t->set_var(lang_sure,lang("Are you sure you want to delete this entry ?"));
|
||||
$t->set_var(no_link,$phpgw->link("/addressbook/index.php",
|
||||
"ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
"ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&ncat_id=$cat_id"));
|
||||
$t->set_var(lang_no,lang("NO"));
|
||||
$t->set_var(yes_link,$phpgw->link("/addressbook/delete.php",
|
||||
"ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
@ -57,6 +57,6 @@
|
||||
$this->account_id=$phpgw_info["user"]["account_id"];
|
||||
$this->delete($ab_id);
|
||||
@Header("Location: " . $phpgw->link("/addressbook/index.php",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query&ncat_id=$cat_id"));
|
||||
}
|
||||
?>
|
||||
|
@ -180,12 +180,11 @@
|
||||
$t->set_var("lang_clear",lang("clear"));
|
||||
$t->set_var("lang_cancel",lang("cancel"));
|
||||
$t->set_var("lang_submit",lang("submit"));
|
||||
$t->set_var("cancel_link",'<form method="POST" action="'
|
||||
. $phpgw->link("/addressbook/index.php","sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id") . '">');
|
||||
$t->set_var("cancel_link",'<form method="POST" action="' . $phpgw->link("/addressbook/index.php") . '">');
|
||||
|
||||
if ($this->grants[$check[0]['owner']] & PHPGW_ACL_DELETE || $check[0]['owner'] == $phpgw_info['user']['account_id'])
|
||||
if (($this->grants[$check[0]['owner']] & PHPGW_ACL_DELETE) || $check[0]['owner'] == $phpgw_info['user']['account_id'])
|
||||
{
|
||||
$t->set_var('delete_link','<form method="POST" action="'.$phpgw->link("/addressbook/delete.php","ab_id=$ab_id") . '">');
|
||||
$t->set_var('delete_link','<form method="POST" action="'.$phpgw->link("/addressbook/delete.php") . '">');
|
||||
$t->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">');
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
// Return a select form element with the categories option dialog in it
|
||||
function cat_option($cat_id='',$name='cat_id',$notall=False,$java=True) {
|
||||
function cat_option($cat_id='',$name='ncat_id',$notall=False,$java=False) {
|
||||
global $phpgw_info;
|
||||
if ($java) {
|
||||
$jselect = " onChange=\"this.form.submit();\"";
|
||||
@ -264,7 +264,7 @@
|
||||
$cat_id = $fields["cat_id"];
|
||||
}
|
||||
|
||||
$cats_link = cat_option($cat_id,'ncat_id',True,False);
|
||||
$cats_link = cat_option($cat_id,'ncat_id',True);
|
||||
|
||||
if ($access == 'private') {
|
||||
$access_check = ' checked';
|
||||
|
@ -44,6 +44,9 @@
|
||||
if ($cat_id=='') {
|
||||
$cat_id = $phpgw_info["user"]["preferences"]["addressbook"]["default_category"];
|
||||
}
|
||||
if($ncat_id || ($ncat_id==0)) {
|
||||
$cat_id = $ncat_id;
|
||||
}
|
||||
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["autosave_category"]) {
|
||||
$phpgw->preferences->delete("addressbook","default_category");
|
||||
@ -184,22 +187,21 @@
|
||||
$t->set_var(lang_showing,$lang_showing);
|
||||
$t->set_var(search_filter,$search_filter);
|
||||
$t->set_var(cats,lang('Category'));
|
||||
$t->set_var(cats_url,$phpgw->link("/addressbook/index.php",
|
||||
"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
$t->set_var(cats_link,cat_option($cat_id,'cat_id',False,False));
|
||||
$t->set_var(cats_url,$phpgw->link("/addressbook/index.php"));
|
||||
$t->set_var(cats_link,cat_option($cat_id));
|
||||
$t->set_var(lang_cats,lang('Select'));
|
||||
$t->set_var("lang_addressbook",lang("Address book"));
|
||||
$t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$t->set_var("th_font",$phpgw_info["theme"]["font"]);
|
||||
$t->set_var("th_text",$phpgw_info["theme"]["th_text"]);
|
||||
$t->set_var("lang_add",lang("Add"));
|
||||
$t->set_var("add_url",$phpgw->link("/addressbook/add.php"));
|
||||
$t->set_var("lang_addvcard",lang("AddVCard"));
|
||||
$t->set_var("vcard_url",$phpgw->link("/addressbook/vcardin.php"));
|
||||
$t->set_var("lang_import",lang("Import Contacts"));
|
||||
$t->set_var("import_url",$phpgw->link("/addressbook/import.php",
|
||||
"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
$t->set_var("import_url",$phpgw->link("/addressbook/import.php"));
|
||||
$t->set_var("lang_export",lang("Export Contacts"));
|
||||
$t->set_var("export_url",$phpgw->link("/addressbook/export.php",
|
||||
"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));
|
||||
$t->set_var("export_url",$phpgw->link("/addressbook/export.php"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("sort",$sort);
|
||||
$t->set_var("order",$order);
|
||||
@ -208,8 +210,6 @@
|
||||
$t->set_var("cat_id",$cat_id);
|
||||
$t->set_var("qfield",$qfield);
|
||||
$t->set_var("query",$query);
|
||||
$t->set_var("actionurl",$phpgw->link("/addressbook/add.php",
|
||||
"sort=$sort&order=$order&query=$query&filter=$filter&start=$start&cat_id=$cat_id"));
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("cols",$cols);
|
||||
|
@ -18,6 +18,13 @@
|
||||
<tr>
|
||||
<td width="8%">
|
||||
<form action="{cancel_url}" method="post">
|
||||
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="query" value="{query}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="ncat_id" value="{cat_id}">
|
||||
<input type="submit" name="Cancel" value="{lang_cancel}">
|
||||
</form>
|
||||
</td>
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
<!-- BEGIN edit -->
|
||||
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="query" value="{query}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<TABLE border="0" cellPadding="1" cellSpacing="1" width="95%">
|
||||
<TBODY>
|
||||
<tr>
|
||||
@ -14,14 +14,13 @@
|
||||
</TD>
|
||||
<TD align="left" width="7%">
|
||||
{cancel_link}
|
||||
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="query" value="{query}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="cancel" value="{lang_cancel}"></form>
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="query" value="{query}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="ncat_id" value="{cat_id}">
|
||||
<input type="submit" name="cancel" value="{lang_cancel}"></form>
|
||||
</TD>
|
||||
<TD align="right">
|
||||
{delete_link}
|
||||
|
@ -1,15 +1,26 @@
|
||||
<!-- BEGIN addressbook_footer -->
|
||||
</table>
|
||||
<form method="POST" action="{actionurl}">
|
||||
<table width="75%" border="0" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td width="16%">
|
||||
<div align="left">
|
||||
<form action="{add_url}" method="post">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="Add" value="{lang_add}">
|
||||
</div>
|
||||
</td>
|
||||
<td width="16%">
|
||||
<div align="left">
|
||||
<form action="{vcard_url}" method="post">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="AddVcard" value="{lang_addvcard}">
|
||||
</div>
|
||||
</td>
|
||||
@ -21,14 +32,24 @@
|
||||
<td width="16%">
|
||||
<div align="left">
|
||||
<form action="{import_url}" method="post">
|
||||
<input type="submit" name="Import" value="{lang_import}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="Import" value="{lang_import}">
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td width="16%">
|
||||
<div align="left">
|
||||
<form action="{export_url}" method="post">
|
||||
<input type="submit" name="Export" value="{lang_export}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="Export" value="{lang_export}">
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -5,6 +5,12 @@
|
||||
<br>{searchreturn}
|
||||
<form action="{cats_url}" method="POST">
|
||||
{cats}{cats_link}
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="query" value="{query}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="submit" name="cats" value="{lang_cats}">
|
||||
</form>
|
||||
{search_filter}
|
||||
|
@ -11,6 +11,7 @@
|
||||
<TR>
|
||||
<TD align="left">
|
||||
{edit_link}
|
||||
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||
{edit_button}
|
||||
</form>
|
||||
</TD>
|
||||
@ -21,6 +22,7 @@
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="fields" value="{copy_fields}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="submit" value="{lang_copy}">
|
||||
</form>
|
||||
</TD>
|
||||
@ -31,16 +33,17 @@
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="cat_id" value="{cat_id}">
|
||||
<input type="submit" name="VCardform" value="{lang_vcard}">
|
||||
</form>
|
||||
</TD>
|
||||
<TD align="left">
|
||||
{done_link}
|
||||
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||
<input type="hidden" name="sort" value="{sort}">
|
||||
<input type="hidden" name="order" value="{order}">
|
||||
<input type="hidden" name="filter" value="{filter}">
|
||||
<input type="hidden" name="start" value="{start}">
|
||||
<input type="hidden" name="ncat_id" value="{cat_id}">
|
||||
<input type="submit" name="Doneform" value="{lang_done}">
|
||||
</form>
|
||||
</TD>
|
||||
|
@ -115,10 +115,12 @@
|
||||
$cat = CreateObject('phpgwapi.categories');
|
||||
$catinfo = $cat->return_single($fields[0]['cat_id']);
|
||||
$catname = $catinfo[0]["name"];
|
||||
if ($fields[0]['cat_id']) { $cat_id = $fields[0]['cat_id']; }
|
||||
|
||||
$cat->app_name = "phpgw";
|
||||
$catinfo = $cat->return_single($fields[0]['cat_id']);
|
||||
$catname .= $catinfo[0]["name"];
|
||||
if ($fields[0]['cat_id']) { $cat_id = $fields[0]['cat_id']; }
|
||||
|
||||
if (!$catname) { $catname = lang('none'); }
|
||||
|
||||
@ -133,19 +135,15 @@
|
||||
|
||||
$sfields = rawurlencode(serialize($fields[0]));
|
||||
|
||||
if ($this->grants[$record_owner] & PHPGW_ACL_EDIT || $record_owner == $phpgw_info['user']['account_id'])
|
||||
if (($this->grants[$record_owner] & PHPGW_ACL_EDIT) || ($record_owner == $phpgw_info['user']['account_id']))
|
||||
{
|
||||
$t->set_var('edit_link','<form method="POST" action="'.$phpgw->link("/addressbook/edit.php","ab_id=$ab_id&start=$start&sort=$sort&order=$order&cat_id=$cat_id"
|
||||
. "&query=$query&sort=$sort").'">');
|
||||
$t->set_var('edit_link','<form method="POST" action="' . $phpgw->link("/addressbook/edit.php").'">');
|
||||
$t->set_var('edit_button','<input type="submit" name="edit" value="' . lang('Edit') . '">');
|
||||
}
|
||||
|
||||
$copylink = '<form method="POST" action="'
|
||||
. $phpgw->link("/addressbook/add.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id").'">';
|
||||
$vcardlink = '<form method="POST" action="'
|
||||
. $phpgw->link("/addressbook/vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id").'">';
|
||||
$donelink = '<form method="POST" action="'
|
||||
. $phpgw->link("/addressbook/index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort&cat_id=$cat_id").'">';
|
||||
$copylink = '<form method="POST" action="' . $phpgw->link("/addressbook/add.php").'">';
|
||||
$vcardlink = '<form method="POST" action="' . $phpgw->link("/addressbook/vcardout.php").'">';
|
||||
$donelink = '<form method="POST" action="' . $phpgw->link("/addressbook/index.php").'">';
|
||||
|
||||
$t->set_var("access_link",$access_link);
|
||||
$t->set_var("ab_id",$ab_id);
|
||||
@ -153,6 +151,7 @@
|
||||
$t->set_var("order",$order);
|
||||
$t->set_var("filter",$filter);
|
||||
$t->set_var("start",$start);
|
||||
$t->set_var("cat_id",$cat_id);
|
||||
$t->set_var("view_header",$view_header);
|
||||
$t->set_var("cols",$columns_html);
|
||||
$t->set_var("lang_ok",lang("ok"));
|
||||
|
Loading…
Reference in New Issue
Block a user