cvs: php4 /pear/PEAR Registry.php

From: Date: Wed, 12 Dec 2001 01:29:27 +0000
Subject: cvs: php4 /pear/PEAR Registry.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1512@lists.php.net to get a copy of this message
ssb Tue Dec 11 20:29:27 2001 EDT Modified files: /php4/pear/PEAR Registry.php Log: * PEAR_Registry::updatePackage now takes an optional 2nd arg for replacing package info instead of merging Index: php4/pear/PEAR/Registry.php diff -u php4/pear/PEAR/Registry.php:1.11 php4/pear/PEAR/Registry.php:1.12 --- php4/pear/PEAR/Registry.php:1.11 Tue Dec 11 10:31:42 2001 +++ php4/pear/PEAR/Registry.php Tue Dec 11 20:29:27 2001 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.11 2001/12/11 15:31:42 sebastian Exp $ +// $Id: Registry.php,v 1.12 2001/12/12 01:29:27 ssb Exp $ require_once "System.php"; @@ -143,7 +143,7 @@ // }}} // {{{ updatePackage() - function updatePackage($package, $info) + function updatePackage($package, $info, $merge = true) { $oldinfo = $this->packageInfo($package); if (empty($oldinfo)) { @@ -153,7 +153,11 @@ if ($fp === null) { return false; } - fwrite($fp, serialize(array_merge($oldinfo, $info))); + if ($merge) { + fwrite($fp, serialize(array_merge($oldinfo, $info))); + } else { + fwrite($fp, serialize($info)); + } $this->_closePackageFile($fp); return true; }

« previous php.pear.cvs (#1512) next »