Changeset 511

Show
Ignore:
Timestamp:
04/14/07 12:37:45 (1 year ago)
Author:
mikey
Message:

load lib/starReader.php only if lib/stubbles.php should not be used
Point stubConfig::getSourcePath() to src/main instead of src/main/php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/config/php/config-dist.php

    r507 r511  
    2020     * this method should return the path to the source directory 
    2121     * 
    22      * By default its /path/to/stubbles/src/main/php
     22     * By default its /path/to/stubbles/src/main
    2323     * 
    2424     * @return  string 
     
    2626    public static function getSourcePath() 
    2727    { 
    28         return realpath(dirname(__FILE__) . '/../../src/main/php'); 
     28        return realpath(dirname(__FILE__) . '/../../src/main'); 
    2929    } 
    3030 
     
    4343    /** 
    4444     * this method should return the path to the cache directory 
     45     *  
     46     * By default its /path/to/stubbles/cache. 
    4547     * 
    4648     * @return  string 
     
    5355    /** 
    5456     * this method should return the path to the config directory 
     57     *  
     58     * By default its /path/to/stubbles/config. 
    5559     * 
    56      * @return unknown 
     60     * @return string 
    5761     */ 
    5862    public static function getConfigPath() 
  • trunk/config/php/config.php

    r507 r511  
    2020     * this method should return the path to the source directory 
    2121     * 
    22      * By default its /path/to/stubbles/src/main/php
     22     * By default its /path/to/stubbles/src/main
    2323     * 
    2424     * @return  string 
     
    2626    public static function getSourcePath() 
    2727    { 
    28         return realpath(dirname(__FILE__) . '/../../src/main/php'); 
     28        return realpath(dirname(__FILE__) . '/../../src/main'); 
    2929    } 
    3030 
     
    4343    /** 
    4444     * this method should return the path to the cache directory 
     45     *  
     46     * By default its /path/to/stubbles/cache. 
    4547     * 
    4648     * @return  string 
     
    5355    /** 
    5456     * this method should return the path to the config directory 
     57     *  
     58     * By default its /path/to/stubbles/config. 
    5559     * 
    5660     * @return unknown 
  • trunk/src/main/php/info/phing/tasks/stubInitTask.php

    r507 r511  
    44 * 
    55 * @author      Stephan Schmidt <schst@stubbles.net> 
     6 * @author      Frank Kleine <mikey@stubbles.net> 
    67 * @package     stubbles 
    78 * @subpackage  phing 
    89 */ 
    9  
    1010/** 
    1111 * Uses the Phing Task 
    1212 */ 
    1313require_once 'phing/Task.php'; 
    14  
    1514/** 
    1615 * Task to load stubbles 
    1716 * 
    18  * @author      Stephan Schmidt <schst@stubbles.net> 
    1917 * @package     stubbles 
    2018 * @subpackage  phing 
     
    2927    protected $configPath; 
    3028 
     29    /** 
     30     * set the config path 
     31     * 
     32     * @param  string  $configPath 
     33     */ 
    3134    public function setConfigPath($configPath) { 
    3235        $this->configPath = realpath($configPath); 
     
    4750    { 
    4851        require_once $this->configPath . '/php/config.php'; 
    49         require_once stubConfig::getLibPath() . '/starReader.php'; 
    50         if (stubConfig::useStar()) { 
    51             require_once stubConfig::getLibPath() . '/stubbles.php'; 
     52        if (stubConfig::useStar() == true) { 
     53            require_once stubConfig::getLibPath() . '/stubbles.php'; 
    5254        } else { 
    53             require_once stubConfig::getSourcePath() . '/net/stubbles/stubClassLoader.php'; 
     55            require_once stubConfig::getLibPath() . '/starReader.php'; 
     56            require_once stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php'; 
    5457        } 
     58         
    5559        stubClassLoader::load('net.stubbles.util.stubFactory'); 
    5660    }