original_string: public function update()
      {
          $sync = !empty($this->request->query['sync']) ? true : false;
          if (AcoManager::buildAcos(null, $sync)) {
              $this->Flash->success(__d('user', 'Permissions tree was successfully updated!'));
          } else {
              $this->Flash->danger(__d('user', 'Some errors occur while updating permissions tree.'));
          }
  
          $this->title(__d('user', 'Update Permissions'));
          $this->redirect($this->referer());
      }
code: public function update()
      {
          $sync = !empty($this->request->query['sync']) ? true : false;
          if (AcoManager::buildAcos(null, $sync)) {
              $this->Flash->success(__d('user', 'Permissions tree was successfully updated!'));
          } else {
              $this->Flash->danger(__d('user', 'Some errors occur while updating permissions tree.'));
          }
  
          $this->title(__d('user', 'Update Permissions'));
          $this->redirect($this->referer());
      }
code_tokens: public function update ( ) { $ sync = ! empty ( $ this -> request -> query [ 'sync' ] ) ? true : false ; if ( AcoManager :: buildAcos ( null , $ sync ) ) { $ this -> Flash -> success ( __d ( 'user' , 'Permissions tree was successfully updated!' ) ) ; } else { $ this -> Flash -> danger ( __d ( 'user' , 'Some errors occur while updating permissions tree.' ) ) ; } $ this -> title ( __d ( 'user' , 'Update Permissions' ) ) ; $ this -> redirect ( $ this -> referer ( ) ) ; }
docstring: Analyzes each plugin and adds any missing ACO path to the tree. It won't
  remove any invalid ACO unless 'sync' GET parameter is present in URL.
  
  @return void Redirects to previous page
docstring_tokens: Analyzes each plugin and adds any missing ACO path to the tree . It won t remove any invalid ACO unless sync GET parameter is present in URL .