Ignore:
Timestamp:
Sep 12, 2010, 3:40:20 PM (11 years ago)
Author:
teymour
Message:

Correction bug index_if
+ clarification des droits sur le log solr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/lib/model/solr/SolrListener.php

    r1332 r1369  
    6161  {
    6262    $obj = $event->getInvoker();
    63    
    64     if ($t = $this->_options['index_if'] && $t && $obj->get($t))
     63
     64    $t = null;
     65    if (isset( $this->_options['index_if']) && $t = $this->_options['index_if'] && $t && !$obj->get($t))
    6566      return ;
    6667   
     
    7071    $json['object_name'] = get_class($obj);
    7172   
    72     if ($t = $this->_options['description']) {
     73    if (isset($this->_options['description']) && $t = $this->_options['description']) {
    7374      $content = $this->getObjFieldsValue($obj, $t);
    7475      $wordcount = str_word_count($content);
     
    99100     
    100101    // par default la date est la created_at
    101     if ( !($t = $this->_options['date'])) {
     102    if (!isset($this->_options['date']) || !($t = $this->_options['date'])) {
    102103      $t = 'created_at';
    103104    }
     
    114115    }catch (Exception $e) {}
    115116   
    116     if ($t = $this->_options['moretags']) {
     117    if (isset($this->_options['moretags']) && $t = $this->_options['moretags']) {
    117118      if (!is_array($t)) {
    118119        $s = $this->get_and_strip($obj, $t);
Note: See TracChangeset for help on using the changeset viewer.