Commit 0f94679602671ab75b3180294e4b5b73c9532aae

Authored by kevin_fourie
1 parent 63eeead1

Merged in from DEV trunk...

KTC-378
"A Pear fatal error when attempting to create a new authentication provider"
Fixed. Made the isError function static as it inherits from PEAR::isError which was made static.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen

KTS-2579
"scripts not resolving paths correctly with stack installer"
Update. Adding changing to relative path so external user/scripts don't have to do this

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

KTS-3053
"TinyMCE WYSIWYG editor not loading on disclaimer and help edit pages"
In progress. Removed old version.

Committed By: Kevin Fourie
Reviewed By: Philip Arkcoll

KTS-2891
"Search widget is too big as it is invisible when the screen resolution is low"
Fixed. Add Dashlet widget was not catered for on dashboard.

Committed By: Conrad Vermeulen
Reviewed By: Megan Watson

KTS-3053
"TinyMCE WYSIWYG editor not loading on disclaimer and help edit pages"
Fixed. Updated to version 3.0.

Committed By: Kevin Fourie
Reviewed By: Philip Arkcoll

KTS-2849
"Document object has some uncorrects methods"

Fixed. Changed setMetadataVersion function.

Committed By: Jonathan Byrne
Reviewed By: Megan Watson


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8120 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/documentmanagement/Document.inc
... ... @@ -128,7 +128,7 @@ class Document {
128 128 function setMetadataStatusID($iNewValue) { $this->_oDocumentMetadataVersion->setStatusId($iNewValue); }
129 129  
130 130 function getMetadataVersion() { return $this->_oDocumentMetadataVersion->getMetadataVersion(); }
131   - function setMetadataVersion($iNewValue) { $this->_oDocumentMetadataVersion->getMetadataVersion($iNewValue); }
  131 + function setMetadataVersion($iNewValue) { $this->_oDocumentMetadataVersion->setMetadataVersion($iNewValue); }
132 132  
133 133 function getMetadataVersionId() { return $this->_oDocumentCore->getMetadataVersionId(); }
134 134 function setMetadataVersionId($iNewValue) { $this->_oDocumentCore->setMetadataVersionId($iNewValue); }
... ...
resources/js/dashboard.js
... ... @@ -43,7 +43,7 @@ KTDashlet.prototype = {
43 43 'getStatus' : function() {
44 44 return this.dashboard.getStatus(this.id);
45 45 }
46   -
  46 +
47 47 };
48 48  
49 49  
... ... @@ -74,7 +74,7 @@ KTDashboard.prototype = {
74 74 }, this.getDashletBlocks());
75 75  
76 76 // make add button
77   - var breadcrumbs = $('breadcrumbs');
  77 + var breadcrumbs = $('add-dashlet');
78 78 this.addButton = INPUT({'id':'add_dashlet', 'type':'submit', 'value':_('Add Dashlet')});
79 79 breadcrumbs.insertBefore(this.addButton, breadcrumbs.firstChild);
80 80 this.hideAddButton();
... ... @@ -86,7 +86,7 @@ KTDashboard.prototype = {
86 86 'mochikitInitializeDraggables' : function() {
87 87 var dashOpts = {
88 88 'tag':'div',
89   - 'constraint': false,
  89 + 'constraint': false,
90 90 'tree':true,
91 91 'only' : ['dashboard_block'],
92 92 'handle' : 'dashboard_block_handle'
... ... @@ -99,13 +99,13 @@ KTDashboard.prototype = {
99 99 if(e.id) {
100 100 new YAHOO.example.DDList(e.id);
101 101 //new YAHOO.util.DD(e.id);
102   - }
  102 + }
103 103 }, this.getDashletBlocks());
104 104 map(function(e) {
105 105 if(e.id) {
106 106 new YAHOO.example.DDList(e.id);
107 107 //new YAHOO.util.DD(e.id);
108   - }
  108 + }
109 109 }, this.getDashletBlockStoppers());
110 110 new YAHOO.example.DDListBoundary('copyrightbar');
111 111 new YAHOO.example.DDListBoundary('breadcrumbs');
... ... @@ -117,7 +117,7 @@ KTDashboard.prototype = {
117 117 'getDashletBlocks' : function() {
118 118 return getElementsByTagAndClassName('*', 'dashboard_block', this.element);
119 119 },
120   -
  120 +
121 121 'getDashletBlockStoppers' : function(){
122 122 return getElementsByTagAndClassName('*', 'dashboard_block_empty', this.element);
123 123 },
... ... @@ -150,7 +150,7 @@ KTDashboard.prototype = {
150 150 }
151 151 }
152 152 },
153   -
  153 +
154 154  
155 155 'setStatus' : function(id, status) {
156 156 this.dashlets[id]['state'] = status;
... ... @@ -161,7 +161,7 @@ KTDashboard.prototype = {
161 161 return this.dashlets[id]['state'];
162 162 },
163 163  
164   - 'getDashletsInState' : function(state) {
  164 + 'getDashletsInState' : function(state) {
165 165 var ret = [];
166 166 for(var i in this.dashlets) {
167 167 if(this.dashlets[i]['state'] == state) {
... ... @@ -169,7 +169,7 @@ KTDashboard.prototype = {
169 169 }
170 170 }
171 171 return ret;
172   - },
  172 + },
173 173  
174 174 'getDashletTitle' : function(elm) {
175 175 var h2 = getElementsByTagAndClassName('H2', null, elm);
... ... @@ -191,7 +191,7 @@ KTDashboard.prototype = {
191 191 var dashletelm = $(id);
192 192 var dashlet = self.dashlets[id]['object'];
193 193  
194   - var link = A({'class':'dashletLink', 'href':'#'}, self.getDashletTitle(dashletelm));
  194 + var link = A({'class':'dashletLink', 'href':'#'}, self.getDashletTitle(dashletelm));
195 195 var linkli = LI(null, link);
196 196  
197 197 connect(link, 'onclick', function(event) {
... ... @@ -199,14 +199,14 @@ KTDashboard.prototype = {
199 199 dashlet.toggleClose(event);
200 200 if(hasElementClass(dashlet.elm, 'rolled-up')) {
201 201 self.setStatus(id, KTDashboard.ROLLEDUP);
202   - }
  202 + }
203 203 event.stop();
204 204 });
205 205 appendChildNodes(dashletList, linkli);
206 206 });
207 207 appendChildNodes(addDialog, H2(null, _('Add Dashlets')));
208 208 appendChildNodes(addDialog, dashletList);
209   -
  209 +
210 210 var closeLink = A({'class':'closeLink','href':'#'}, _('close'));
211 211 connect(closeLink, 'onclick', function(event) { removeElement(addDialogScreen); });
212 212  
... ... @@ -229,7 +229,7 @@ KTDashboard.prototype = {
229 229 ret[col] = [];
230 230 var container = this.getColumn(col);
231 231 forEach(getElementsByTagAndClassName('*', 'dashboard_block', container), function(e) {
232   - if(e.id) {
  232 + if(e.id) {
233 233 try {
234 234 ret[col].push({'id':e.id, 'state':self.dashlets[e.id]['state']});
235 235 } catch(e) {
... ... @@ -247,7 +247,7 @@ KTDashboard.prototype = {
247 247 if(d.id && !hasElementClass(d, 'empty')) {
248 248 appendChildNodes(bucket, d);
249 249 }});
250   -
  250 +
251 251 var hasClosed = false;
252 252  
253 253 for(var col in KTDashboard.columns) {
... ... @@ -264,7 +264,7 @@ KTDashboard.prototype = {
264 264 dobj.object.toggleClose();
265 265 hasClosed = true;
266 266 }
267   -
  267 +
268 268 appendChildNodes(container, elm);
269 269 }
270 270 appendChildNodes(container, $('end-'+col));
... ... @@ -280,12 +280,12 @@ KTDashboard.prototype = {
280 280 },
281 281  
282 282 'pushState' : function(event) {
283   - var args = {'action' : 'json',
284   - 'json_action' : 'saveDashboardState',
  283 + var args = {'action' : 'json',
  284 + 'json_action' : 'saveDashboardState',
285 285 'state' : serializeJSON(this.serialize()) };
286 286 var xmlreq = getXMLHttpRequest();
287 287 xmlreq.open('GET', this.getPushLocation() + '?' + queryString(args), false);
288   - xmlreq.send(null);
  288 + xmlreq.send(null);
289 289 }
290 290  
291 291 };
... ... @@ -308,4 +308,4 @@ addLoadEvent(
308 308 }
309 309 });
310 310  
311   -
  311 +
... ...
search2/indexing/bin/cronIndexer.php
... ... @@ -42,6 +42,7 @@
42 42 * This script is to be called periodically to index documents.
43 43 */
44 44  
  45 +chdir(dirname(__FILE__));
45 46 require_once(realpath('../../../config/dmsDefaults.php'));
46 47 require_once('indexing/indexerCore.inc.php');
47 48  
... ...
templates/kt3/standard_page.smarty
... ... @@ -209,6 +209,7 @@
209 209 <td width="5px">&nbsp;</td>
210 210 <td valign=top align=right width="100">
211 211 <div id="newSearchQuery" /></td>
  212 + <td id="add-dashlet"></td>
212 213 </tr>
213 214 </table>
214 215 </div>
... ...
thirdparty/pear/Net/LDAP.php
... ... @@ -31,7 +31,7 @@ require_once(&#39;LDAP/Search.php&#39;);
31 31  
32 32  
33 33 /**
34   - * Error constants for errors that are not LDAP errors
  34 + * Error constants for errors that are not LDAP errors
35 35 */
36 36  
37 37 define ('NET_LDAP_ERROR', 1000);
... ... @@ -89,7 +89,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
89 89 * @var string
90 90 */
91 91 var $_version = "0.6.6";
92   -
  92 +
93 93 /**
94 94 * Net_LDAP_Schema object
95 95 *
... ... @@ -97,7 +97,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
97 97 * @var object Net_LDAP_Schema
98 98 */
99 99 var $_schema = null;
100   -
  100 +
101 101 /**
102 102 * Cache for attribute encoding checks
103 103 *
... ... @@ -120,17 +120,17 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
120 120 function Net_LDAP($_config = array())
121 121 {
122 122 $this->PEAR('Net_LDAP_Error');
123   -
  123 +
124 124 foreach ($_config as $k => $v) {
125 125 $this->_config[$k] = $v;
126 126 }
127 127 }
128   -
  128 +
129 129 /**
130 130 * Creates the initial ldap-object
131 131 *
132 132 * Static function that returns either an error object or the new Net_LDAP object.
133   - * Something like a factory. Takes a config array with the needed parameters.
  133 + * Something like a factory. Takes a config array with the needed parameters.
134 134 *
135 135 * @access public
136 136 * @param array Configuration array
... ... @@ -173,20 +173,20 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
173 173 return $this->raiseError("Host not defined in config. {$this->_config['host']}");
174 174 }
175 175  
176   - if (!$this->_link) {
  176 + if (!$this->_link) {
177 177 // there is no good errorcode for this one! I chose 52.
178 178 return $this->raiseError("Could not connect to server. ldap_connect failed.", 52);
179 179 }
180 180 // You must set the version and start tls BEFORE binding!
181   -
  181 +
182 182 if ($this->_config['version'] != 2 && Net_LDAP::isError($msg = $this->setLDAPVersion())) {
183 183 return $msg;
184 184 }
185   -
  185 +
186 186 if ($this->_config['tls'] && Net_LDAP::isError($msg = $this->startTLS())) {
187 187 return $msg;
188 188 }
189   -
  189 +
190 190 if (isset($this->_config['options']) &&
191 191 is_array($this->_config['options']) &&
192 192 count($this->_config['options']))
... ... @@ -198,7 +198,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
198 198 }
199 199 }
200 200 }
201   -
  201 +
202 202 if (isset($this->_config['dn']) && isset($this->_config['password'])) {
203 203 $bind = @ldap_bind($this->_link, $this->_config['dn'], $this->_config['password']);
204 204 } else {
... ... @@ -223,10 +223,10 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
223 223 * @return mixed Net_LDAP_Error or true
224 224 * @see $_config
225 225 */
226   -
227   - function reBind ($dn = null, $password = null)
  226 +
  227 + function reBind ($dn = null, $password = null)
228 228 {
229   -
  229 +
230 230 if ($dn && $password ) {
231 231 $bind = @ldap_bind($this->_link, $dn, $password);
232 232 } else {
... ... @@ -238,7 +238,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
238 238 }
239 239 return true;
240 240 }
241   -
  241 +
242 242 /**
243 243 * Starts an encrypted session
244 244 *
... ... @@ -252,13 +252,13 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
252 252 }
253 253 return true;
254 254 }
255   -
  255 +
256 256 /**
257 257 * alias function of startTLS() for perl-ldap interface
258   - *
  258 + *
259 259 * @see startTLS()
260 260 */
261   - function start_tls()
  261 + function start_tls()
262 262 {
263 263 $args = func_get_args();
264 264 return call_user_func_array(array($this, 'startTLS' ), $args);
... ... @@ -314,7 +314,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
314 314 * @access public
315 315 * @param mixed string or Net_LDAP_Entry
316 316 * @param array
317   - * @return mixed Net_LDAP_Error or true
  317 + * @return mixed Net_LDAP_Error or true
318 318 */
319 319 function delete($dn, $param = array())
320 320 {
... ... @@ -323,13 +323,13 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
323 323 } else {
324 324 if (!is_string($dn)) {
325 325 // this is what the server would say: invalid_dn_syntax.
326   - return $this->raiseError("$dn not a string nor an entryobject!", 34);
  326 + return $this->raiseError("$dn not a string nor an entryobject!", 34);
327 327 }
328 328 }
329   -
  329 +
330 330 if ($param['recursive'] ) {
331 331 $searchresult = @ldap_list($this->_link, $dn, '(objectClass=*)', array());
332   -
  332 +
333 333 if ($searchresult) {
334 334 $entries = @ldap_get_entries($this->_link, $searchresult);
335 335  
... ... @@ -338,19 +338,19 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
338 338 if (!$result) {
339 339 $errno = @ldap_errno($this->_link);
340 340 return $this->raiseMessage ("Net_LDAP::delete: " . $this->errorMessage($errno), $errno);
341   - }
  341 + }
342 342 if(PEAR::isError($result)){
343 343 return $result;
344   - }
  344 + }
345 345 }
346 346 }
347 347 }
348 348 if (!@ldap_delete($this->_link, $dn)) {
349   - $error = ldap_errno($this->_link );
  349 + $error = ldap_errno($this->_link );
350 350 if ($error == 66) {
351 351 /* entry has subentries */
352 352 return $this->raiseError('Net_LDAP::delete: Cound not delete entry ' . $dn .
353   - ' because of subentries. Use the recursive param to delete them.');
  353 + ' because of subentries. Use the recursive param to delete them.');
354 354 } else {
355 355 return $this->raiseError("Net_LDAP::delete: Could not delete entry " . $dn ." because: ".
356 356 $this->errorMessage($error), $error);
... ... @@ -386,7 +386,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
386 386 * The <replace> option takes a argument in the same
387 387 * form as add, but will cause any existing
388 388 * attributes with the same name to be replaced. If
389   - * the value for any attribute in the รฅrray is a refยญ
  389 + * the value for any attribute in the รฏยฟยฝrray is a refรฏยฟยฝ
390 390 * erence to an empty string the all instances of the
391 391 * attribute will be deleted.
392 392 *
... ... @@ -462,7 +462,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
462 462 } // end foreach($_params['changes'] AS $option => $atrr) {
463 463 } // end if (is_array($_params['changes'])) {
464 464 // everything went fine :)
465   - return true;
  465 + return true;
466 466  
467 467 /* old broken code see bug#2987
468 468 if (isset($params['changes'])) {
... ... @@ -510,7 +510,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
510 510 // everything went fine :)
511 511 return true;
512 512 */
513   -
  513 +
514 514 }
515 515  
516 516 /**
... ... @@ -520,7 +520,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
520 520 * $base and $filter may be ommitted. BaseDN and default filter will then be used.
521 521 * Params may contain:
522 522 *
523   - * scope: The scope which will be used for searching
  523 + * scope: The scope which will be used for searching
524 524 * base - Just one entry
525 525 * sub - The whole tree
526 526 * one - Immediately below $base
... ... @@ -534,41 +534,41 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
534 534 * deref: By default aliases are dereferenced to locate the base object for the search, but not when
535 535 * searching subordinates of the base object. This may be changed by specifying one of the
536 536 * following values:
537   - *
  537 + *
538 538 * never - Do not dereference aliases in searching or in locating the base object of the search.
539   - * search - Dereference aliases in subordinates of the base object in searching, but not in
540   - * locating the base object of the search.
  539 + * search - Dereference aliases in subordinates of the base object in searching, but not in
  540 + * locating the base object of the search.
541 541 * find
542 542 * always
543 543 *
544 544 * @access public
545   - * @param string LDAP searchbase
  545 + * @param string LDAP searchbase
546 546 * @param string LDAP search filter
547 547 * @param array Array of options
548 548 * @return object mixed Net_LDAP_Search or Net_LDAP_Error
549 549 */
550 550 function search($base = null, $filter = null, $params = array())
551   - {
  551 + {
552 552 if (is_null($base)) {
553 553 $base = $this->_config['base'];
554 554 }
555 555 if (is_null($filter)) {
556 556 $filter = $this->_config['filter'];
557   - }
558   -
  557 + }
  558 +
559 559 /* setting searchparameters */
560 560 (isset($params['sizelimit'])) ? $sizelimit = $params['sizelimit'] : $sizelimit = 0;
561 561 (isset($params['timelimit'])) ? $timelimit = $params['timelimit'] : $timelimit = 0;
562   - (isset($params['attrsonly'])) ? $attrsonly = $params['attrsonly'] : $attrsonly = 0;
563   - (isset($params['attributes'])) ? $attributes = $params['attributes'] : $attributes = array('');
564   -
  562 + (isset($params['attrsonly'])) ? $attrsonly = $params['attrsonly'] : $attrsonly = 0;
  563 + (isset($params['attributes'])) ? $attributes = $params['attributes'] : $attributes = array('');
  564 +
565 565 if (!is_array($attributes)) {
566 566 $this->raiseError("The param attributes must be an array!");
567 567 }
568   -
569   - /* scoping makes searches faster! */
  568 +
  569 + /* scoping makes searches faster! */
570 570 $scope = (isset($params['scope']) ? $params['scope'] : $this->_config['scope']);
571   -
  571 +
572 572 switch ($scope) {
573 573 case 'one':
574 574 $search_function = 'ldap_list';
... ... @@ -578,9 +578,9 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
578 578 break;
579 579 default:
580 580 $search_function = 'ldap_search';
581   - }
582   -
583   - $search = @call_user_func($search_function,
  581 + }
  582 +
  583 + $search = @call_user_func($search_function,
584 584 $this->_link,
585 585 $base,
586 586 $filter,
... ... @@ -589,22 +589,22 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
589 589 $sizelimit,
590 590 $timelimit);
591 591  
592   - if ($err = ldap_errno($this->_link)) {
  592 + if ($err = ldap_errno($this->_link)) {
593 593  
594 594 if ($err == 32) {
595 595 // Errorcode 32 = no such object, i.e. a nullresult.
596   - return $obj =& new Net_LDAP_Search ($search, $this->_link);
597   -
  596 + return $obj =& new Net_LDAP_Search ($search, $this->_link);
  597 +
598 598 // Errorcode 4 = sizelimit exeeded. this will be handled better in time...
599 599 //} elseif ($err == 4) {
600   - // return $obj = & new Net_LDAP_Search ($search, $this->_link);
601   -
  600 + // return $obj = & new Net_LDAP_Search ($search, $this->_link);
  601 +
602 602 } elseif ($err == 87) {
603 603 // bad search filter
604 604 return $this->raiseError($this->errorMessage($err) . "($filter)", $err);
605 605 } else {
606 606 $msg = "\nParameters:\nBase: $base\nFilter: $filter\nScope: $scope";
607   - return $this->raiseError($this->errorMessage($err) . $msg, $err);
  607 + return $this->raiseError($this->errorMessage($err) . $msg, $err);
608 608 }
609 609 } else {
610 610 @$obj =& new Net_LDAP_Search($search, $this->_link);
... ... @@ -630,16 +630,16 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
630 630 } else {
631 631 $err = @ldap_errno($this->_link);
632 632 if ($err) {
633   - $msg = @ldap_err2str($err);
  633 + $msg = @ldap_err2str($err);
634 634 } else {
635 635 $err = NET_LDAP_ERROR;
636 636 $msg = $this->errorMessage($err);
637   - }
  637 + }
638 638 return $this->raiseError($msg, $err);
639 639 }
640 640 } else {
641 641 return $this->raiseError("Unkown Option requested");
642   - }
  642 + }
643 643 } else {
644 644 return $this->raiseError("No LDAP connection");
645 645 }
... ... @@ -661,16 +661,16 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
661 661 } else {
662 662 $err = @ldap_errno($this->_link);
663 663 if ($err) {
664   - $msg = @ldap_err2str($err);
  664 + $msg = @ldap_err2str($err);
665 665 } else {
666 666 $err = NET_LDAP_ERROR;
667 667 $msg = $this->errorMessage($err);
668   - }
  668 + }
669 669 return $this->raiseError($msg, $err);
670 670 }
671 671 } else {
672 672 $this->raiseError("Unkown Option requested");
673   - }
  673 + }
674 674 } else {
675 675 $this->raiseError("No LDAP connection");
676 676 }
... ... @@ -709,7 +709,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
709 709 }
710 710  
711 711 /**
712   - * Get the Net_LDAP version.
  712 + * Get the Net_LDAP version.
713 713 *
714 714 * Return the Net_LDAP version
715 715 *
... ... @@ -721,7 +721,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
721 721 }
722 722  
723 723 /**
724   - * Tell if a dn already exists
  724 + * Tell if a dn already exists
725 725 *
726 726 * @param string
727 727 * @return boolean
... ... @@ -731,9 +731,9 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
731 731 $dns = explode(",",$dn);
732 732 $filter = array_shift($dns);
733 733 $base= implode($dns,',');
734   - //$base = $dn;
  734 + //$base = $dn;
735 735 //$filter = '(objectclass=*)';
736   -
  736 +
737 737 $result = @ldap_list($this->_link, $base, $filter, array(), 1, 1);
738 738 if (ldap_errno($this->_link) == 32) {
739 739 return false;
... ... @@ -746,14 +746,14 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
746 746 }
747 747 return false;
748 748 }
749   -
  749 +
750 750  
751 751 /**
752 752 * Get a specific entry based on the dn
753 753 *
754 754 * @param string dn
755 755 * @param array Array of Attributes to select
756   - * @return object Net_LDAP_Entry or Net_LDAP_Error
  756 + * @return object Net_LDAP_Entry or Net_LDAP_Error
757 757 */
758 758 function &getEntry($dn, $attr = array(''))
759 759 {
... ... @@ -767,7 +767,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
767 767 }
768 768 return $entry;
769 769 }
770   -
  770 +
771 771  
772 772 /**
773 773 * Returns the string for an ldap errorcode.
... ... @@ -843,7 +843,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
843 843 0x5f => "LDAP_MORE_RESULTS_TO_RETURN",
844 844 0x60 => "LDAP_CLIENT_LOOP",
845 845 0x61 => "LDAP_REFERRAL_LIMIT_EXCEEDED",
846   - 1000 => "Unknown Net_LDAP error"
  846 + 1000 => "Unknown Net_LDAP error"
847 847 );
848 848  
849 849 return isset($errorMessages[$errorcode]) ? $errorMessages[$errorcode] : $errorMessages[NET_LDAP_ERROR];
... ... @@ -853,10 +853,10 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
853 853 * Tell whether value is a Net_LDAP_Error or not
854 854 *
855 855 * @access public
856   - * @param mixed
  856 + * @param mixed
857 857 * @return boolean
858 858 */
859   - function isError($value)
  859 + static function isError($value)
860 860 {
861 861 return (is_a($value, "Net_LDAP_Error") || parent::isError($value));
862 862 }
... ... @@ -869,10 +869,10 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
869 869 * @param array Array of attributes to search for
870 870 * @return object mixed Net_LDAP_Error or Net_LDAP_RootDSE
871 871 */
872   - function &rootDse($attrs = null)
  872 + function &rootDse($attrs = null)
873 873 {
874 874 require_once('Net/LDAP/RootDSE.php');
875   -
  875 +
876 876 if (is_array($attrs) && count($attrs) > 0 ) {
877 877 $attributes = $attrs;
878 878 } else {
... ... @@ -892,19 +892,19 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
892 892  
893 893 return new Net_LDAP_RootDSE($entry);
894 894 }
895   -
  895 +
896 896 /**
897 897 * alias function of rootDse() for perl-ldap interface
898 898 *
899 899 * @access public
900 900 * @see rootDse()
901 901 */
902   - function &root_dse()
  902 + function &root_dse()
903 903 {
904 904 $args = func_get_args();
905 905 return call_user_func_array(array($this, 'rootDse'), $args);
906 906 }
907   -
  907 +
908 908 /**
909 909 * get a schema object
910 910 *
... ... @@ -916,7 +916,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
916 916 function &schema($dn = null)
917 917 {
918 918 require_once('Net/LDAP/Schema.php');
919   -
  919 +
920 920 $schema =& new Net_LDAP_Schema();
921 921  
922 922 if (is_null($dn)) {
... ... @@ -931,8 +931,8 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
931 931 }
932 932 if (is_null($dn)) {
933 933 $dn = 'cn=Subschema';
934   - }
935   -
  934 + }
  935 +
936 936 // fetch the subschema entry
937 937 $result = $this->search($dn, '(objectClass=*)',
938 938 array('attributes' => array_values($schema->types), 'scope' => 'base'));
... ... @@ -944,7 +944,7 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
944 944 if (false === $entry) {
945 945 return $this->raiseError('Could not fetch Subschema entry');
946 946 }
947   -
  947 +
948 948 $schema->parse($entry);
949 949  
950 950 return $schema;
... ... @@ -997,9 +997,9 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
997 997 }
998 998  
999 999 if (is_array($attributes) && count($attributes) > 0) {
1000   -
  1000 +
1001 1001 foreach( $attributes as $k => $v ) {
1002   -
  1002 +
1003 1003 if (!isset($this->_schemaAttrs[$k])) {
1004 1004  
1005 1005 $attr = $this->_schema->get('attribute', $k);
... ... @@ -1011,9 +1011,9 @@ define (&#39;NET_LDAP_ERROR&#39;, 1000);
1011 1011 $encode = true;
1012 1012 } else {
1013 1013 $encode = false;
1014   - }
  1014 + }
1015 1015 $this->_schemaAttrs[$k] = $encode;
1016   -
  1016 +
1017 1017 } else {
1018 1018 $encode = $this->_schemaAttrs[$k];
1019 1019 }
... ...