whitespace normalization

This commit is contained in:
AD7six 2009-07-26 12:46:07 +02:00 committed by gwoo
parent 993643dd2a
commit a4bc755cc7
12 changed files with 39 additions and 43 deletions

View file

@ -746,7 +746,7 @@ class CakeSession extends Object {
return false; return false;
} }
return $row[$model->alias]['data']; return $row[$model->alias]['data'];
} }
/** /**

View file

@ -581,7 +581,7 @@ class RequestHandlerComponent extends Object {
} elseif (count($types) === 1) { } elseif (count($types) === 1) {
return ($types[0] === $accepts[0]); return ($types[0] === $accepts[0]);
} elseif (count($accepts) === 1) { } elseif (count($accepts) === 1) {
return $accepts[0]; return $accepts[0];
} }
$acceptedTypes = array(); $acceptedTypes = array();

View file

@ -165,7 +165,6 @@ class Debugger extends Object {
$this->_templates['js']['code'] = '<div id="{:id}-code" class="cake-code-dump" '; $this->_templates['js']['code'] = '<div id="{:id}-code" class="cake-code-dump" ';
$this->_templates['js']['code'] .= 'style="display: none;"><pre>{:code}</pre></div>'; $this->_templates['js']['code'] .= 'style="display: none;"><pre>{:code}</pre></div>';
$e = '<pre class="cake-debug"><b>{:error}</b> ({:code}) : {:description} '; $e = '<pre class="cake-debug"><b>{:error}</b> ({:code}) : {:description} ';
$e .= '[<b>{:path}</b>, line <b>{:line}]</b></pre>'; $e .= '[<b>{:path}</b>, line <b>{:line}]</b></pre>';
$this->_templates['html']['error'] = $e; $this->_templates['html']['error'] = $e;

View file

@ -367,7 +367,6 @@ class CakeSchema extends Object {
} }
$out .="}\n"; $out .="}\n";
$File =& new File($path . DS . $file, true); $File =& new File($path . DS . $file, true);
$header = '$Id'; $header = '$Id';
$content = "<?php \n/* SVN FILE: {$header}$ */\n/* {$name} schema generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; $content = "<?php \n/* SVN FILE: {$header}$ */\n/* {$name} schema generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>";

View file

@ -204,10 +204,11 @@ class DboOracle extends DboSource {
} }
return $this->connected; return $this->connected;
} }
/**
* Keeps track of the most recent Oracle error /**
* * Keeps track of the most recent Oracle error
*/ *
*/
function _setError($source = null, $clear = false) { function _setError($source = null, $clear = false) {
if ($source) { if ($source) {
$e = ocierror($source); $e = ocierror($source);
@ -1072,7 +1073,6 @@ class DboOracle extends DboSource {
$q = str_replace('= (', 'IN (', $q); $q = str_replace('= (', 'IN (', $q);
$q = str_replace(' WHERE 1 = 1', '', $q); $q = str_replace(' WHERE 1 = 1', '', $q);
$q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack); $q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack);
if ($q != false) { if ($q != false) {
$res = $this->fetchAll($q, $model->cacheQueries, $model->alias); $res = $this->fetchAll($q, $model->cacheQueries, $model->alias);
@ -1142,14 +1142,15 @@ class DboOracle extends DboSource {
} }
} }
} }
/**
* Generate a "drop table" statement for the given Schema object /**
* * Generate a "drop table" statement for the given Schema object
* @param object $schema An instance of a subclass of CakeSchema *
* @param string $table Optional. If specified only the table name given will be generated. * @param object $schema An instance of a subclass of CakeSchema
* Otherwise, all tables defined in the schema are generated. * @param string $table Optional. If specified only the table name given will be generated.
* @return string * Otherwise, all tables defined in the schema are generated.
*/ * @return string
*/
function dropSchema($schema, $table = null) { function dropSchema($schema, $table = null) {
if (!is_a($schema, 'CakeSchema')) { if (!is_a($schema, 'CakeSchema')) {
trigger_error(__('Invalid schema object', true), E_USER_WARNING); trigger_error(__('Invalid schema object', true), E_USER_WARNING);

View file

@ -1063,7 +1063,7 @@ class Multibyte extends Object {
* @return string * @return string
* @access private * @access private
*/ */
function __codepoint ($decimal) { function __codepoint($decimal) {
if ($decimal > 128 && $decimal < 256) { if ($decimal > 128 && $decimal < 256) {
$return = '0080_00ff'; // Latin-1 Supplement $return = '0080_00ff'; // Latin-1 Supplement
} elseif ($decimal < 384) { } elseif ($decimal < 384) {

View file

@ -45,12 +45,12 @@ class Security extends Object {
var $hashType = null; var $hashType = null;
/** /**
* Singleton implementation to get object instance. * Singleton implementation to get object instance.
* *
* @return object * @return object
* @access public * @access public
* @static * @static
*/ */
function &getInstance() { function &getInstance() {
static $instance = array(); static $instance = array();
if (!$instance) { if (!$instance) {
@ -60,12 +60,12 @@ class Security extends Object {
} }
/** /**
* Get allowed minutes of inactivity based on security level. * Get allowed minutes of inactivity based on security level.
* *
* @return integer Allowed inactivity in minutes * @return integer Allowed inactivity in minutes
* @access public * @access public
* @static * @static
*/ */
function inactiveMins() { function inactiveMins() {
$_this =& Security::getInstance(); $_this =& Security::getInstance();
switch (Configure::read('Security.level')) { switch (Configure::read('Security.level')) {
@ -83,12 +83,12 @@ class Security extends Object {
} }
/** /**
* Generate authorization hash. * Generate authorization hash.
* *
* @return string Hash * @return string Hash
* @access public * @access public
* @static * @static
*/ */
function generateAuthKey() { function generateAuthKey() {
if (!class_exists('String')) { if (!class_exists('String')) {
App::import('Core', 'String'); App::import('Core', 'String');

View file

@ -422,7 +422,7 @@ class Set extends Object {
$context['key'] = array_pop($context['trace']); $context['key'] = array_pop($context['trace']);
if (isset($context['trace'][1]) && $context['trace'][1] > 0) { if (isset($context['trace'][1]) && $context['trace'][1] > 0) {
$context['item'] = $context['item'][0]; $context['item'] = $context['item'][0];
} else if(!empty($context['item'][$key])){ } elseif (!empty($context['item'][$key])) {
$context['item'] = $context['item'][$key]; $context['item'] = $context['item'][$key];
} else { } else {
$context['item'] = array_shift($context['item']); $context['item'] = array_shift($context['item']);

View file

@ -778,7 +778,7 @@ class Validation extends Object {
* @return boolean Success * @return boolean Success
* @access public * @access public
*/ */
function range($check, $lower = null, $upper = null ) { function range($check, $lower = null, $upper = null) {
if (!is_numeric($check)) { if (!is_numeric($check)) {
return false; return false;
} }

View file

@ -508,7 +508,6 @@ class AjaxHelper extends AppHelper {
$options = $this->_optionsToString($options, array('paramName', 'indicator')); $options = $this->_optionsToString($options, array('paramName', 'indicator'));
$options = $this->_buildOptions($options, $this->autoCompleteOptions); $options = $this->_buildOptions($options, $this->autoCompleteOptions);
$text = $this->Form->text($field, $htmlOptions); $text = $this->Form->text($field, $htmlOptions);
$div = $this->Html->div(null, '', $divOptions); $div = $this->Html->div(null, '', $divOptions);
$script = "{$var}new Ajax.Autocompleter('{$htmlOptions['id']}', '{$divOptions['id']}', '"; $script = "{$var}new Ajax.Autocompleter('{$htmlOptions['id']}', '{$divOptions['id']}', '";
@ -903,7 +902,7 @@ class AjaxHelper extends AppHelper {
$callback = $this->remoteFunction($options); $callback = $this->remoteFunction($options);
$hasFrequency = !(!isset($options['frequency']) || intval($options['frequency']) == 0); $hasFrequency = !(!isset($options['frequency']) || intval($options['frequency']) == 0);
$frequency = $hasFrequency ? $options['frequency'] . ', ' : ''; $frequency = $hasFrequency ? $options['frequency'] . ', ' : '';
return "new $klass('$name', {$frequency}function(element, value) {{$callback}})"; return "new $klass('$name', {$frequency}function(element, value) {{$callback}})";
} }
@ -1018,5 +1017,4 @@ class AjaxHelper extends AppHelper {
} }
} }
} }
?> ?>

View file

@ -168,5 +168,4 @@ class XmlHelper extends AppHelper {
return $data->toString($options + array('header' => false)); return $data->toString($options + array('header' => false));
} }
} }
?> ?>

View file

@ -58,7 +58,7 @@ class ThemeView extends View {
* *
* @param unknown_type $controller * @param unknown_type $controller
*/ */
function __construct (&$controller) { function __construct(&$controller) {
parent::__construct($controller); parent::__construct($controller);
$this->theme =& $controller->theme; $this->theme =& $controller->theme;