Changeset 1364


Ignore:
Timestamp:
Sep 12, 2010, 2:43:08 AM (10 years ago)
Author:
teymour
Message:

Correction d'un bug si pas de save dans la tache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/lib/task/indexSolrTask.class.php

    r1343 r1364  
    2020    $this->addOption('app', null, sfCommandOption::PARAMETER_OPTIONAL, 'Changes the environment this task is run in', 'frontend');
    2121    $this->addOption('removeAll', null, sfCommandOption::PARAMETER_OPTIONAL, 'Drop solr database (=no|yes no default)', 'no');
     22    $this->addOption('all', null, sfCommandOption::PARAMETER_OPTIONAL, 'Reindex all the database (=no|yes no default)', 'no');
    2223
    2324    $this->file_conf = sys_get_temp_dir().DIRECTORY_SEPARATOR."reindex_slor.db";
     
    3637    if ($options['removeAll'] == 'yes') {
    3738      $solr->deleteAll();
     39    }
     40
     41    if ($options['all'] == 'no') {
     42      $solr->updateFromCommands();
     43      return;
    3844    }
    3945
     
    6167      }
    6268    }
    63     unlink($this->file_conf);
     69    //    unlink($this->file_conf);
    6470  }
    6571 
Note: See TracChangeset for help on using the changeset viewer.