Changeset 10185 for plugins/dkGeshiPlugin
- Timestamp:
- 07/09/08 14:00:58 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/dkGeshiPlugin/branches/1.0.1_0_7_20.0/lib/dkGeshi.class.php
r10183 r10185 10 10 * @link http://www.dakrazy.net/document/1-SfGeshiDocumentation.html 11 11 * @link http://qbnz.com/highlighter/ 12 * @version SVN: $Id: $ 12 13 */ 13 14 class dkGeshi extends GeSHi 14 15 { 16 /** 17 * Cache of plugin's path 18 */ 15 19 protected static $plugin_path = null; 16 20 21 /** 22 * Constructor 23 * 24 * @param string $source 25 * @param string $language 26 */ 17 27 public function __construct($source, $language) 18 28 { 19 29 parent::__construct($source, $language); 30 31 20 32 } 21 33 22 34 /** 35 * getPluginPath 36 * 37 * @return string 38 */ 23 39 public static function getPluginPath() 24 40 { … … 26 42 { 27 43 $_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]; 29 45 } 30 46 … … 50 66 if ($_path === null) 51 67 { 52 $_path = self::getPluginPath() . '/geshi/';68 $_path = self::getPluginPath().'/lib/vendor/geshi/geshi/'; 53 69 } 54 70 … … 61 77 * Returns an associative array of GeSHi language identifier => Human readable language name 62 78 * 79 * @return array 63 80 */ 64 81 public static function getLanguages() … … 68 85 if ($result === null) 69 86 { 70 $cache_file = SF_ROOT_DIR . '/cache/sfGeshiLanguages.cache.php';87 $cache_file = sfConfig::get('sf_cache_dir').'/dkGeshiLanguages.cache.php'; 71 88 72 89 if (!file_exists($cache_file)) 73 90 { 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/'); 75 92 $result = array(); 76 93