Development

Changeset 10185 for plugins/dkGeshiPlugin

You must first sign up to be able to contribute.

Show
Ignore:
Timestamp:
07/09/08 14:00:58 (5 months ago)
Author:
hartym
Message:

dkGeshiPlugin: fixed wrong external

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/dkGeshiPlugin/branches/1.0.1_0_7_20.0/lib/dkGeshi.class.php

    r10183 r10185  
    1010 * @link http://www.dakrazy.net/document/1-SfGeshiDocumentation.html 
    1111 * @link http://qbnz.com/highlighter/ 
     12 * @version SVN: $Id: $ 
    1213 */ 
    1314class dkGeshi extends GeSHi 
    1415{ 
     16  /** 
     17   * Cache of plugin's path 
     18   */ 
    1519  protected static $plugin_path = null; 
    1620 
     21  /** 
     22   * Constructor  
     23   *  
     24   * @param string $source  
     25   * @param string $language  
     26   */ 
    1727  public function __construct($source, $language) 
    1828  { 
    1929    parent::__construct($source, $language); 
     30 
     31     
    2032  } 
    2133 
    22  
     34  /** 
     35   * getPluginPath  
     36   *  
     37   * @return string 
     38   */ 
    2339  public static function getPluginPath() 
    2440  { 
     
    2642    { 
    2743      $_tmp = array_reverse(explode('/', realpath(dirname(__FILE__)))); 
    28       self::$plugin_path = SF_ROOT_DIR . '/plugins/' . $_tmp[1]; 
     44      self::$plugin_path = sfConfig::get('sf_plugins_dir').'/'.$_tmp[1]; 
    2945    } 
    3046 
     
    5066      if ($_path === null) 
    5167      { 
    52         $_path = self::getPluginPath() . '/geshi/'; 
     68        $_path = self::getPluginPath().'/lib/vendor/geshi/geshi/'; 
    5369      } 
    5470 
     
    6177   * Returns an associative array of GeSHi language identifier => Human readable language name 
    6278   * 
     79   * @return array 
    6380   */ 
    6481  public static function getLanguages() 
     
    6885    if ($result === null) 
    6986    { 
    70       $cache_file = SF_ROOT_DIR . '/cache/sfGeshiLanguages.cache.php'; 
     87      $cache_file = sfConfig::get('sf_cache_dir').'/dkGeshiLanguages.cache.php'; 
    7188 
    7289      if (!file_exists($cache_file)) 
    7390      { 
    74         $files = sfFinder::type('file')->name('*.php')->in(self::getPluginPath().'/geshi/'); 
     91        $files = sfFinder::type('file')->name('*.php')->in(self::getPluginPath().'/lib/vendor/geshi/geshi/'); 
    7592        $result = array(); 
    7693