Development

Changeset 7108

You must first sign up to be able to contribute.

Changeset 7108

Show
Ignore:
Timestamp:
01/20/08 08:44:42 (10 months ago)
Author:
Carl.Vondrick
Message:

sfLucene: merging trunk changes to 1.1 branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfLucenePlugin/branches/1.1

    • Property svn:externals deleted
  • plugins/sfLucenePlugin/branches/1.1/CHANGELOG

    r6883 r7108  
    2020  * BC: sfLuceneCriteria constructor now requires sfLucene instance 
    2121  * Refactored highlighting system 
     22  * Added ability to lock the Propel behavior. 
    2223 
    2324Version 0.1.1 Beta 
  • plugins/sfLucenePlugin/branches/1.1/LICENSE

    r6247 r7108  
    33-------------------------------------------------------------------------------- 
    44 
    5 Copyright (c) 2007 Carl Vondrick 
     5Copyright (c) 2007 - 2008 Carl Vondrick 
    66 
    77Permission is hereby granted, free of charge, to any person obtaining a copy of 
  • plugins/sfLucenePlugin/branches/1.1/README

    r6890 r7108  
    154154after the class declaration.  So, for a blog, you would open project/lib/model/BlogPost.php and append the above, replacing "!MyModel" with "!BlogPost". 
    155155 
     156If you wish to disable the Propel behavior so that no indexing can occur, you can simply do: 
     157{{{ 
     158sfLucenePropelBehavior::setLock(true); // disables Propel behavior, no indexing 
     159sfLucenePropelBehavior::setLock(false); // enables Propel behavior, does index 
     160}}} 
     161 
     162By default, the behavior is not locked so indexing does occur. 
     163 
    156164== Advanced Model Settings == 
    157165You can configure the model even more.  If the peer does not follow symfony's naming conventions, you can specify a new one with in the project level search.yml: 
  • plugins/sfLucenePlugin/branches/1.1/data/skeleton/module/actions/actions.class.php

    r6395 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1313 * @package    sfLucenePlugin 
    1414 * @subpackage Module 
    15  * @author     Carl Vondrick <carlv@carlsoft.net> 
     15 * @author     Carl Vondrick <carl@carlsoft.net> 
    1616 * @version SVN: $Id: actions.class.php 6247 2007-12-01 03:25:13Z Carl.Vondrick $ 
    1717 */ 
  • plugins/sfLucenePlugin/branches/1.1/data/skeleton/module/actions/components.class.php

    r6395 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1414 * @package    sfLucenePlugin 
    1515 * @subpackage Module 
    16  * @author     Carl Vondrick <carlv@carlsoft.net> 
     16 * @author     Carl Vondrick <carl@carlsoft.net> 
    1717 * @version SVN: $Id: components.class.php 6247 2007-12-01 03:25:13Z Carl.Vondrick $ 
    1818 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/addon/Zend/sfLuceneDirectoryStorage.class.php

    r6680 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/addon/Zend/sfLuceneFileStorage.class.php

    r6680 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/addon/Zend/sfLuceneLowerCaseFilter.class.php

    r6681 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/behavior/sfLucenePropelBehavior.class.php

    r6733 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1212 * @package    sfLucenePlugin 
    1313 * @subpackage Behavior 
    14  * @author     Carl Vondrick <carlv@carlsoft.net> 
     14 * @author     Carl Vondrick <carl@carlsoft.net> 
    1515 * @version SVN: $Id$ 
    1616 */ 
     
    2626   */ 
    2727  protected $deleteQueue = array(); 
     28 
     29  /** 
     30   * If true, then nothing can be added to the queues. 
     31   */ 
     32  static protected $locked = false; 
    2833 
    2934  /** 
     
    3641  public function preSave($node) 
    3742  { 
     43    if (self::$locked) 
     44    { 
     45      return; 
     46    } 
     47 
    3848    if ($node->isModified() || $node->isNew()) 
    3949    { 
     
    7787  public function preDelete($node) 
    7888  { 
     89    if (self::$locked) 
     90    { 
     91      return; 
     92    } 
     93 
    7994    if (!$node->isNew()) 
    8095    { 
     
    126141    foreach ($this->getSearchInstances($node) as $instance) 
    127142    { 
    128       $instance->getIndexer()->getModel($node)->delete(); 
     143      $instance->getIndexerFactory()->getModel($node)->delete(); 
    129144    } 
    130145  } 
     
    137152    foreach ($this->getSearchInstances($node) as $instance) 
    138153    { 
    139       $instance->getIndexer()->getModel($node)->insert(); 
     154      $instance->getIndexerFactory()->getModel($node)->insert(); 
    140155    } 
    141156  } 
     
    192207    return sfLucenePropelInitializer::getInstance(); 
    193208  } 
     209 
     210  /** 
     211   * Locks the Propel behavior, so nothing can be queued. 
     212   * @param bool $to If true, the behavior is locked.  If false, the behavior is unlocked. 
     213   */ 
     214  static public function setLock($to) 
     215  { 
     216    self::$locked = (bool) $to; 
     217  } 
    194218} 
  • plugins/sfLucenePlugin/branches/1.1/lib/behavior/sfLucenePropelInitializer.class.php

    r6733 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1212 * @package    sfLucenePlugin 
    1313 * @subpackage Behavior 
    14  * @author     Carl Vondrick <carlv@carlsoft.net> 
     14 * @author     Carl Vondrick <carl@carlsoft.net> 
    1515 * @version SVN: $Id$ 
    1616 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/category/sfLuceneCategories.class.php

    r6489 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1212 * @package    sfLucenePlugin 
    1313 * @subpackage Category 
    14  * @author     Carl Vondrick <carlv@carlsoft.net> 
     14 * @author     Carl Vondrick <carl@carlsoft.net> 
    1515 * @version SVN: $Id$ 
    1616 */ 
     
    5858 
    5959    $this->load(); 
     60  } 
     61 
     62  public function __destruct() 
     63  { 
     64    $this->save(); 
    6065  } 
    6166 
  • plugins/sfLucenePlugin/branches/1.1/lib/category/sfLuceneCategory.class.php

    r6525 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1212 * @package    sfLucenePlugin 
    1313 * @subpackage Category 
    14  * @author     Carl Vondrick <carlv@carlsoft.net> 
     14 * @author     Carl Vondrick <carl@carlsoft.net> 
    1515 * @version SVN: $Id$ 
    1616 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/config/sfLuceneModuleConfigHandler.class.php

    r6696 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1111 * @package    sfLucenePlugin 
    1212 * @subpackage Config 
    13  * @author     Carl Vondrick <carlv@carlsoft.net> 
     13 * @author     Carl Vondrick <carl@carlsoft.net> 
    1414 * @version SVN: $Id$ 
    1515 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/config/sfLuceneProjectConfigHandler.class.php

    r6705 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1111 * @package    sfLucenePlugin 
    1212 * @subpackage Config 
    13  * @author     Carl Vondrick <carlv@carlsoft.net> 
     13 * @author     Carl Vondrick <carl@carlsoft.net> 
    1414 * @version SVN: $Id$ 
    1515 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/event/sfLuceneEventConnector.class.php

    r6792 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1414 * @package    sfLucenePlugin 
    1515 * @subpackage Event 
    16  * @author     Carl Vondrick <carlv@carlsoft.net> 
     16 * @author     Carl Vondrick <carl@carlsoft.net> 
    1717 * @version SVN: $Id$ 
    1818 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/event/sfLuceneEventConnectorLogger.class.php

    r6792 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1414 * @package    sfLucenePlugin 
    1515 * @subpackage Event 
    16  * @author     Carl Vondrick <carlv@carlsoft.net> 
     16 * @author     Carl Vondrick <carl@carlsoft.net> 
    1717 * @version SVN: $Id$ 
    1818 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/exception/sfLuceneException.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1010 * @package sfLucenePlugin 
    1111 * @subpackage Exception 
    12  * @author Carl Vondrick <carlv@carlsoft.net> 
     12 * @author Carl Vondrick <carl@carlsoft.net> 
    1313 * @version SVN: $Id$ 
    1414 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/exception/sfLuceneHighlighterException.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1010 * @package sfLucenePlugin 
    1111 * @subpackage Exception 
    12  * @author Carl Vondrick <carlv@carlsoft.net> 
     12 * @author Carl Vondrick <carl@carlsoft.net> 
    1313 * @version SVN: $Id$ 
    1414 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/exception/sfLuceneHighlighterXMLException.class.php

    r6911 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1010 * @package sfLucenePlugin 
    1111 * @subpackage Exception 
    12  * @author Carl Vondrick <carlv@carlsoft.net> 
     12 * @author Carl Vondrick <carl@carlsoft.net> 
    1313 * @version SVN: $Id$ 
    1414 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/exception/sfLuceneIndexerException.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1010 * @package sfLucenePlugin 
    1111 * @subpackage Exception 
    12  * @author Carl Vondrick <carlv@carlsoft.net> 
     12 * @author Carl Vondrick <carl@carlsoft.net> 
    1313 * @version SVN: $Id$ 
    1414 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/exception/sfLuceneResultsException.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1010 * @package sfLucenePlugin 
    1111 * @subpackage Exception 
    12  * @author Carl Vondrick <carlv@carlsoft.net> 
     12 * @author Carl Vondrick <carl@carlsoft.net> 
    1313 * @version SVN: $Id$ 
    1414 */ 
  • plugins/sfLucenePlugin/branches/1.1/lib/filter/browser/sfLuceneCacheFilter.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/filter/browser/sfLuceneExecutionFilter.class.php

    r6671 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/filter/browser/sfLuceneRenderingFilter.class.php

    r6247 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
  • plugins/sfLucenePlugin/branches/1.1/lib/filter/sfLuceneHighlightFilter.class.php

    r6911 r7108  
    22/* 
    33 * This file is part of the sfLucenePlugin package 
    4  * (c) 2007 Carl Vondrick <carlv@carlsoft.net> 
     4 * (c) 2007 - 2008 Carl Vondrick <carl@carlsoft.net> 
    55 * 
    66 * For the full copyright and license information, please view the LICENSE 
     
    1616 * @package sfLucenePlugin 
    1717 * @subpackage Filter 
    18  * @author Carl Vondrick &