public function edit_post()
 {
     $Location = $this->obj;
     $LocationMan = new LocationManager();
     $this->HookManager->event[] = 'LOCATION_EDIT_POST';
     $this->HookManager->processEvent('LOCATION_EDIT_POST', array('Location' => &$Location));
     try {
         if ($_REQUEST['name'] != $Location->get('name') && $LocationMan->exists($_REQUEST['name'])) {
             throw new Exception('A location with that name already exists.');
         }
         if ($_REQUEST['update']) {
             if ($_REQUEST['storagegroup']) {
                 $Location->set('name', $_REQUEST['name'])->set('storageGroupID', $_REQUEST['storagegroup']);
             }
             $Location->set('storageNodeID', $_REQUEST['storagenode'])->set('tftp', $_REQUEST['tftp']);
             if ($Location->save()) {
                 $this->FOGCore->setMessage('Location Updated');
                 $this->FOGCore->redirect('?node=location&sub=edit&id=' . $Location->get('id'));
             }
         }
     } catch (Exception $e) {
         $this->FOGCore->setMessage($e->getMessage());
         $this->FOGCore->redirect($this->formAction);
     }
 }