cvs: pear /HTML_AJAX/AJAX Server.php

From: Date: Fri, 19 Aug 2005 02:54:46 +0000
Subject: cvs: pear /HTML_AJAX/AJAX Server.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34147@lists.php.net to get a copy of this message
davidc Thu Aug 18 22:54:46 2005 EDT Modified files: /pear/HTML_AJAX/AJAX Server.php Log: PEAR CS and added $Id$ http://cvs.php.net/diff.php/pear/HTML_AJAX/AJAX/Server.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_AJAX/AJAX/Server.php diff -u pear/HTML_AJAX/AJAX/Server.php:1.1 pear/HTML_AJAX/AJAX/Server.php:1.2 --- pear/HTML_AJAX/AJAX/Server.php:1.1 Thu Aug 18 09:17:10 2005 +++ pear/HTML_AJAX/AJAX/Server.php Thu Aug 18 22:54:40 2005 @@ -93,8 +93,7 @@ if (!isset($_GET['c'])) { return $this->generateClient(); - } - else { + } else { $this->_init($_GET['c']); return $this->ajax->handleRequest(); } @@ -124,8 +123,7 @@ $this->_initAll(); } echo $this->ajax->generateJavaScriptClient($this->options['stub']); - } - else { + } else { if ($this->options['stub'] !== false) { $this->_init($this->options['stub']); echo $this->ajax->generateClassStub($this->options['stub']); @@ -134,30 +132,30 @@ $library = strtolower($this->options['client']); switch($library) { - case 'all': - case 'html_ajax': - $this->_readFile($this->clientJsLocation()."HTML_AJAX.js"); - break; - case 'json': - $this->_readFile($this->clientJsLocation()."JSON.js"); - break; - case 'request': - $this->_readFile($this->clientJsLocation()."Request.js"); - break; - case 'main': - $this->_readFile($this->clientJsLocation()."Main.js"); - break; - case 'httpclient': - $this->_readFile($this->clientJsLocation()."HttpClient.js"); - break; - case 'dispatcher': - $this->_readFile($this->clientJsLocation()."Dispatcher.js"); - break; - case false: - break; - default: - echo "alert('Unknown javascript library: $library');"; - break; + case 'all': + case 'html_ajax': + $this->_readFile($this->clientJsLocation()."HTML_AJAX.js"); + break; + case 'json': + $this->_readFile($this->clientJsLocation()."JSON.js"); + break; + case 'request': + $this->_readFile($this->clientJsLocation()."Request.js"); + break; + case 'main': + $this->_readFile($this->clientJsLocation()."Main.js"); + break; + case 'httpclient': + $this->_readFile($this->clientJsLocation()."HttpClient.js"); + break; + case 'dispatcher': + $this->_readFile($this->clientJsLocation()."Dispatcher.js"); + break; + case false: + break; + default: + echo "alert('Unknown javascript library: $library');"; + break; } } @@ -172,8 +170,7 @@ { if (file_exists($file)) { readfile($file); - } - else { + } else { echo "alert('Unable to find javascript file: $file');"; } } @@ -188,8 +185,7 @@ { if (!$this->clientJsLocation) { return '@data-dir@'.DIRECTORY_SEPARATOR.'HTML_AJAX'.DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR; - } - else { + } else { return $this->clientJsLocationRoot; } } @@ -210,8 +206,7 @@ $stub = trim(preg_replace('/[^A-Za-z_0-9]/','',$_GET['stub'])); if (!empty($stub)) { $this->options['stub'] = $stub; - } - else { + } else { $this->options['stub'] = false; } }

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