cvs: pear /Net_LDAP/LDAP Entry.php
| From: | Benedikt Hallinger | Date: | Thu, 30 Aug 2007 09:46:58 +0000 |
| Subject: | cvs: pear /Net_LDAP/LDAP Entry.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48517@lists.php.net to get a copy of this message | ||
beni Thu Aug 30 09:46:58 2007 UTC
Modified files:
/pear/Net_LDAP/LDAP Entry.php
Log:
* Reactivated perl compatible $ldap parameter in NEt_LDAP_Entry->update()
http://cvs.php.net/viewvc.cgi/pear/Net_LDAP/LDAP/Entry.php?r1=1.43&r2=1.44&diff_format=u
Index: pear/Net_LDAP/LDAP/Entry.php
diff -u pear/Net_LDAP/LDAP/Entry.php:1.43 pear/Net_LDAP/LDAP/Entry.php:1.44
--- pear/Net_LDAP/LDAP/Entry.php:1.43 Tue Jul 24 06:38:15 2007
+++ pear/Net_LDAP/LDAP/Entry.php Thu Aug 30 09:46:58 2007
@@ -22,7 +22,7 @@
// | Authors: Jan Wagner, Tarjej Huse |
// +--------------------------------------------------------------------------+
//
-// $Id: Entry.php,v 1.43 2007/07/24 06:38:15 beni Exp $
+// $Id: Entry.php,v 1.44 2007/08/30 09:46:58 beni Exp $
require_once("PEAR.php");
require_once('Util.php');
@@ -36,7 +36,7 @@
* @package Net_LDAP
* @author Jan Wagner <wagner@netsols.de>
* @author Tarjej Huse
- * @version $Revision: 1.43 $
+ * @version $Revision: 1.44 $
*/
class Net_LDAP_Entry extends PEAR
@@ -569,18 +569,19 @@
* Update the entry on the directory server
*
* @access public
- * @param Net_LDAP $ldap DEPRECIATED since RC3, use setLDAP() instead!
+ * @param Net_LDAP $ldap If passed, a call to setLDAP() is issued prior update, thus switching
the LDAP-server. This is for perl-ldap interface compliance
* @return true|Net_LDAP_Error
* @todo Entry rename with a DN containing special characters needs testing!
- * @todo remove depreciated $ldap parameter somewhere in the next future
*/
function update($ldap = null)
{
- if (null !== $ldap) {
- return PEAR::raiseError("Passing an Net_LDAP object to update() is depreciated
since 1.0.0-RC3! Please set the LDAP object using setLDAP() prior update.");
+ if ($ldap) {
+ $msg = $this->setLDAP($ldap);
+ if (Net_LDAP::isError($msg)) {
+ return PEAR::raiseError('You passed an invalid $ldap variable to
update()');
+ }
}
-
// ensure we have a valid LDAP object
$ldap =& $this->getLDAP();
if (!is_a($ldap, 'Net_LDAP')) {