* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Package.php 313024 2011-07-06 19:51:24Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
*
* @access public
*/
- function PEAR_Command_Package(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function _displayValidationResults($err, $warn, $strict = false)
if (!class_exists('PEAR_Packager')) {
require_once 'PEAR/Packager.php';
}
- $a = &new PEAR_Packager;
+ $a = new PEAR_Packager;
return $a;
}
if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
- $a = &new PEAR_PackageFile($config, $debug);
+ $a = new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
$info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL);
} else {
$archive = $info->getArchiveFile();
- $tar = &new Archive_Tar($archive);
+ $tar = new Archive_Tar($archive);
$tar->extract(dirname($info->getPackageFile()));
$info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR .
$info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR .
'name' => 'modified',
'type' => 'yesno',
'default' => 'no',
- 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not commited, do you still want to tag ' . $version . '?',
+ 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not committed, do you still want to tag ' . $version . '?',
));
$answers = $this->ui->confirmDialog($params);
);
foreach ($deps as $type => $subd) {
$req = ($type == 'required') ? 'Yes' : 'No';
- if ($type == 'group') {
+ if ($type == 'group' && isset($subd['attribs']['name'])) {
$group = $subd['attribs']['name'];
} else {
$group = '';
if (!class_exists('PEAR_Installer')) {
require_once 'PEAR/Installer.php';
}
- $a = &new PEAR_Installer($ui);
+ $a = new PEAR_Installer($ui);
return $a;
}
}
if (class_exists('PEAR_Command_Packaging')) {
- $a = &new PEAR_Command_Packaging($ui, $config);
+ $a = new PEAR_Command_Packaging($ui, $config);
} else {
$a = null;
}
$this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"');
return true;
}
-}
\ No newline at end of file
+}