original_string: public function finish()
      {
          if ($this->request->data()) {
              if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                  snapshot();
                  $this->request->session()->delete('Startup');
  
                  if (!empty($this->request->data['home'])) {
                      $this->redirect('/');
                  } else {
                      $this->redirect('/admin');
                  }
              } else {
                  $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
              }
          }
  
          $this->title(__d('installer', 'Finish Installation'));
      }
code: public function finish()
      {
          if ($this->request->data()) {
              if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                  snapshot();
                  $this->request->session()->delete('Startup');
  
                  if (!empty($this->request->data['home'])) {
                      $this->redirect('/');
                  } else {
                      $this->redirect('/admin');
                  }
              } else {
                  $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
              }
          }
  
          $this->title(__d('installer', 'Finish Installation'));
      }
code_tokens: public function finish ( ) { if ( $ this -> request -> data ( ) ) { if ( rename ( ROOT . '/config/settings.php.tmp' , ROOT . '/config/settings.php' ) ) { snapshot ( ) ; $ this -> request -> session ( ) -> delete ( 'Startup' ) ; if ( ! empty ( $ this -> request -> data [ 'home' ] ) ) { $ this -> redirect ( '/' ) ; } else { $ this -> redirect ( '/admin' ) ; } } else { $ this -> Flash -> danger ( __d ( 'installer' , 'Unable to continue, check write permission for the "/config" directory.' ) ) ; } } $ this -> title ( __d ( 'installer' , 'Finish Installation' ) ) ; }
docstring: Last step of the installation process.
  
  Here we say "thanks" and redirect to site's frontend or backend.
  
  @return void
docstring_tokens: Last step of the installation process .