cvs: pear /PEAR_PackageFileManager_Frontend Frontend.php
| From: | Laurent Laville | Date: | Sat, 19 Aug 2006 10:15:01 +0000 |
| Subject: | cvs: pear /PEAR_PackageFileManager_Frontend Frontend.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-41693@lists.php.net to get a copy of this message | ||
farell Sat Aug 19 10:15:01 2006 UTC
Modified files:
/pear/PEAR_PackageFileManager_Frontend Frontend.php
Log:
fixed warning errors when used frontend from scratch (no package imported)
http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager_Frontend/Frontend.php?r1=1.14&r2=1.15&diff_format=u
Index: pear/PEAR_PackageFileManager_Frontend/Frontend.php
diff -u pear/PEAR_PackageFileManager_Frontend/Frontend.php:1.14
pear/PEAR_PackageFileManager_Frontend/Frontend.php:1.15
--- pear/PEAR_PackageFileManager_Frontend/Frontend.php:1.14 Mon Jul 24 07:19:10 2006
+++ pear/PEAR_PackageFileManager_Frontend/Frontend.php Sat Aug 19 10:15:01 2006
@@ -15,7 +15,7 @@
* @author Laurent Laville <pear@laurent-laville.org>
* @copyright 2005-2006 Laurent Laville
* @license http://www.php.net/license/3_01.txt PHP License 3.01
- * @version CVS: $Id: Frontend.php,v 1.14 2006/07/24 07:19:10 farell Exp $
+ * @version CVS: $Id: Frontend.php,v 1.15 2006/08/19 10:15:01 farell Exp $
* @since File available since Release 0.1.0
*/
@@ -685,13 +685,16 @@
* @since 0.1.0
* @access public
*/
- function setFileList($plugin = 'file')
+ function setFileList($plugin)
{
$sess =& $this->container();
if (!isset($sess['pfm'])) {
$this->_getPackage();
}
$sess['files'] = array();
+ if (!isset($plugin)) {
+ $plugin = 'file';
+ }
$plugin = ucfirst(strtolower($plugin));
$pkg = $sess['pfm'];
@@ -700,6 +703,14 @@
$generatorclass = 'PEAR_PackageFileManager_'. $plugin;
$this->log('debug', __FUNCTION__ .'('. __LINE__ .') generator
plugin='.$generatorclass);
+
+ if (!class_exists($generatorclass)) {
+ $classSource = str_replace('_', '/', $generatorclass) .
'.php';
+ if (PEAR_PackageFileManager2::isIncludeable($classSource)) {
+ include_once $classSource;
+ }
+ }
+
// get dir list corresponding to generator plugin
$gen = new $generatorclass($pkg, $options);
$fsMap = $gen->dirList(substr($options['packagedirectory'], 0,
strlen($options['packagedirectory']) - 1));