cvs: pear /HTML_AJAX/AJAX Server.php

From: Date: Wed, 26 Oct 2005 16:43:51 +0000
Subject: cvs: pear /HTML_AJAX/AJAX Server.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35874@lists.php.net to get a copy of this message
jeichorn Wed Oct 26 12:43:51 2005 EDT Modified files: /pear/HTML_AJAX/AJAX Server.php Log: fix for bug 5788 , client options not an array when generating a stub, also strtolower stub names since were comparing them against strtolowered classes http://cvs.php.net/diff.php/pear/HTML_AJAX/AJAX/Server.php?r1=1.7&r2=1.8&ty=u Index: pear/HTML_AJAX/AJAX/Server.php diff -u pear/HTML_AJAX/AJAX/Server.php:1.7 pear/HTML_AJAX/AJAX/Server.php:1.8 --- pear/HTML_AJAX/AJAX/Server.php:1.7 Mon Oct 24 23:26:13 2005 +++ pear/HTML_AJAX/AJAX/Server.php Wed Oct 26 12:43:49 2005 @@ -221,6 +221,9 @@ // create a list list of js files were going to need to output $fileList = array(); + if(!is_array($this->options['client'])) { + $this->options['client'] = array(); + } foreach($this->options['client'] as $library) { if (isset($this->javascriptLibraries[$library])) { $lib = (array)$this->javascriptLibraries[$library]; @@ -393,7 +396,7 @@ */ function _loadOptions() { - $this->options = array('client'=>false,'stub'=>false); + $this->options = array('client'=>array(),'stub'=>array()); if (isset($_GET['client'])) { $this->options['client'] = array(); if (strstr($_GET['client'],',')) { @@ -412,8 +415,6 @@ if (count($client) > 0) { $this->options['client'] = $client; - } else { - $this->options['client'] = false; } } if (isset($_GET['stub'])) { @@ -426,14 +427,12 @@ foreach($stubs as $val) { $cleanVal = $this->_cleanIdentifier($val); if (!empty($cleanVal)) { - $stub[] = $cleanVal; + $stub[] = strtolower($cleanVal); } } if (count($stub) > 0) { $this->options['stub'] = $stub; - } else { - $this->options['stub'] = false; } } }

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