예제 #1
0
 function deleteAction()
 {
     $id = AF::get($_POST, 'id', 0);
     $ids = explode('_', $id);
     $errors = FALSE;
     $model = new ProfileGateway();
     if (!$model->loadByIds($ids[0], $ids[1], $ids[2])) {
         echoJsonError('Error occurred.  Gateway not deleted');
     }
     $rank = $model->getRank();
     $model->delete();
     $model->decreaseRanksByOne($rank);
     unset($model);
     Message::echoJsonRedirect("/lj3/profiles/update/id=" . $ids[0]);
 }