From 168d18ee533d895d2ef3f881467e4c0c8fa9c077 Mon Sep 17 00:00:00 2001 From: skeeter Date: Thu, 27 Dec 2001 15:22:51 +0000 Subject: [PATCH] Reworked the action() function. --- filemanager/inc/class.uiphpwebhosting.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/filemanager/inc/class.uiphpwebhosting.inc.php b/filemanager/inc/class.uiphpwebhosting.inc.php index 429abc5837..608f57595b 100755 --- a/filemanager/inc/class.uiphpwebhosting.inc.php +++ b/filemanager/inc/class.uiphpwebhosting.inc.php @@ -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(