/**
 Edits an existing permission.
 */
 function edit()
 {
     global $__in, $__out;
     $permission = new permission($__in['id']);
     if ($__in['__is_form_submitted']) {
         // if form is submitted
         if ($permission->edit($__in['permission']['controller'], $__in['permission']['action'], $__in['permission']['extra_params'], $__in['permission']['allow'], $__in['permission']['description'])) {
             // editted successfully
             return dispatcher::redirect(array("action" => "getall"), "updated_successfully");
         } else {
             // could not edit
             $__out['permission'] = $__in['permission'];
             $__in['permission']['id'] = $__in['id'];
             return false;
         }
     } else {
         // if form is not submitted
         $__out['permission'] = $permission->this_to_array();
         return true;
     }
     // end if form submitted
 }