Ejemplo n.º 1
0
 public function actionUninstall()
 {
     $method = $this->_input->filterSingle('shortName', XenForo_Input::STRING);
     if ($this->isConfirmedPost()) {
         if ($method == XenForo_Application::get('options')->suDefaultShortener) {
             $viewParams = array();
             return $this->responseView('XenForo_ViewAdmin_Su_Method_Uninstall_Default', 'su_method_uninstall_default', $viewParams);
         }
         XenForo_Application::autoload('Shorten_URL');
         $uninstall = Shorten_URL::uninstall($method);
         if ($uninstall != false) {
             return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildAdminLink('shortURL/'));
         }
         //! Todo:: add fail redirect / error.
     } else {
         $viewParams = array('method' => $method);
         return $this->responseView('XenForo_ViewAdmin_Su_Method_Uninstall', 'su_method_uninstall', $viewParams);
     }
 }