Reworked the action() function.

This commit is contained in:
skeeter 2001-12-27 15:22:51 +00:00
parent 827eb9a223
commit 168d18ee53

View File

@ -195,11 +195,7 @@
'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index',
'path' => urlencode($this->bo->path)
);
if(is_array($errors))
{
$var['errors'] = urlencode(base64_encode(serialize($errors)));
}
elseif($function == 'newfile')
if($function == 'newfile')
{
$var = Array(
'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.edit',
@ -207,6 +203,10 @@
'file' => urlencode($this->bo->createfile)
);
}
elseif(is_array($errors))
{
$var['errors'] = urlencode(base64_encode(serialize($errors)));
}
Header('Location: '.$GLOBALS['phpgw']->link('/index.php',$var));
}
}
@ -646,7 +646,7 @@
$GLOBALS['tr_color'] = $GLOBALS['phpgw_info']['theme']['row_off'];
$var = Array(
'error' => (isset($this->bo->errors) && !empty($this->bo->errors)?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bo->errors)),'Results'):''),
'error' => (isset($this->bo->errors) && is_array(unserialize(base64_decode($this->bo->errors)))?$GLOBALS['phpgw']->common->error_list(unserialize(base64_decode($this->bo->errors)),'Results'):''),
'tr_extras' => ' bgcolor="'.$this->nextmatchs->alternate_row_color().'" border="0"',
'form_action' => $GLOBALS['phpgw']->link('/index.php',
Array(