<commit_before><?php

class habilitationActions extends sfActions {


  public function executeIndex(sfWebRequest $request)
  {
      $this->buildSearch($request);
      $nbResultatsParPage = 30;
      $this->nbResultats = count($this->docs);
      if (!$this->nbResultats) {
        return $this->redirect('habilitation/index?query=0');
      }
      $this->page = $request->getParameter('page', 1);
      $this->nbPage = ceil($this->nbResultats / $nbResultatsParPage);
      $this->docs = array_slice($this->docs, ($this->page - 1) * $nbResultatsParPage, $nbResultatsParPage);

      $this->form = new EtablissementChoiceForm('INTERPRO-declaration', array(), true);
<commit_msg>Evite de tourner en rond<commit_after><?php

class habilitationActions extends sfActions {


  public function executeIndex(sfWebRequest $request)
  {
      $this->buildSearch($request);
      $nbResultatsParPage = 30;
      $this->nbResultats = count($this->docs);
      if (!$this->nbResultats && !($request->getParameter('query') === '0')) {
        return $this->redirect('habilitation/index?query=0');
      }
      $this->page = $request->getParameter('page', 1);
      $this->nbPage = ceil($this->nbResultats / $nbResultatsParPage);
      $this->docs = array_slice($this->docs, ($this->page - 1) * $nbResultatsParPage, $nbResultatsParPage);

      $this->form = new EtablissementChoiceForm('INTERPRO-declaration', array(), true);

{'fraction_non_alphanumeric': 0.16584333098094567, 'fraction_numerical': 0.0077628793225123505, 'mean_word_length': 4.064285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2409144', 'n_tokens_mistral': 449, 'n_tokens_neox': 434, 'n_words': 76}