Пример #1
0
 public function actionInstall()
 {
     $method = $this->_input->filterSingle('shortName', XenForo_Input::STRING);
     if ($this->isConfirmedPost()) {
         $class = 'Shorten_URL_' . $method;
         XenForo_Application::autoload('Shorten_URL');
         if ($method == 'all') {
             $install = Shorten_URL::installAll();
         } else {
             $install = Shorten_URL::install($class, $method);
         }
         return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildAdminLink('shortURL/'));
     } else {
         $viewParams = array('method' => $method);
         return $this->responseView('XenForo_ViewAdmin_Su_Method_Install', 'su_method_install', $viewParams);
     }
 }