diff --git a/VERSION.txt b/VERSION.txt index d739a8886..51ca8fff8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -1.0.0.2449 \ No newline at end of file +1.0.0.2462 \ No newline at end of file diff --git a/app/config/inflections.php b/app/config/inflections.php index 0708c9e17..42c973e99 100644 --- a/app/config/inflections.php +++ b/app/config/inflections.php @@ -62,13 +62,13 @@ $singularRules = array(); * You should not have to change this value below if you do change it use same format * as the $uninflectedPlural above. */ -$uninflectedSingluar = $uninflectedPlural; +$uninflectedSingular = $uninflectedPlural; /** * This is a key => value array of singular irregular words. * Most of the time this will be a reverse of the above $irregularPlural array * You should not have to change this value below if you do change it use same format * - * $irregularSingluar = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother') + * $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother') */ -$irregularSingluar = array_flip($irregularPlural); +$irregularSingular = array_flip($irregularPlural); ?> \ No newline at end of file diff --git a/cake/basics.php b/cake/basics.php index 0fefc7e73..d040b651c 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -350,7 +350,7 @@ function listClasses($path) $classes = array(); while (false !== ($file = readdir($dir))) { - if ((substr($file, -3, 3) == 'php')) + if ((substr($file, -3, 3) == 'php') && substr($file, 0, 1) != '.') { $classes[] = $file; } @@ -753,7 +753,14 @@ function setUri() if (env('argv')) { $uri = env('argv'); - $uri = env('PHP_SELF') .'/'. $uri[0]; + if (defined('SERVER_IIS')) + { + $uri = BASE_URL.$uri[0]; + } + else + { + $uri = env('PHP_SELF') .'/'. $uri[0]; + } } else { diff --git a/cake/bootstrap.php b/cake/bootstrap.php index 5fdf75c11..32132e9d6 100644 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -59,7 +59,15 @@ if (empty($uri) && defined('BASE_URL')) } else { - $elements = explode('/index.php', $uri); + if (strpos($uri, 'index.php') !== false) + { + $uri = r ('?', '', $uri); + $elements = explode('/index.php', $uri); + } + else + { + $elements = explode('/?', $uri); + } if(!empty($elements[1])) { $_GET['url'] = $elements[1]; diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 7b90cbbd0..737995375 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -405,6 +405,7 @@ class Dispatcher extends Object return $base; } } + return $base; } function _restructureParams($params) diff --git a/cake/libs/controller/components/dbacl/models/aclnode.php b/cake/libs/controller/components/dbacl/models/aclnode.php index 1fbaff3e1..cc2fce99c 100644 --- a/cake/libs/controller/components/dbacl/models/aclnode.php +++ b/cake/libs/controller/components/dbacl/models/aclnode.php @@ -89,7 +89,8 @@ class AclNode extends AppModel $parent = $this->find($this->_resolveID($parent_id)); if($parent == null || count($parent) == 0) { - trigger_error("Null parent in {$class}::create()", E_USER_ERROR); + trigger_error("Null parent in {$class}::create()", E_USER_WARNING); + return null; } $parent = $parent[$class]; diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 271901862..e869984c2 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -419,7 +419,14 @@ class Controller extends Object header($codes[$status]); } } - header ('Location: '.$url); + if (defined('SERVER_IIS')) + { + header ('Location: '.FULL_BASE_URL . $url); + } + else + { + header ('Location: '.$url); + } } /** diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index e469c29ca..8e91d03e5 100644 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -248,8 +248,8 @@ class Inflector extends Object { include(CONFIGS.'inflections.php'); $singularRules = array_merge($singularRules, $coreSingularRules); - $uninflected = array_merge($uninflectedSingluar, $coreUninflectedSingular); - $irregular = array_merge($irregularSingluar, $coreIrregularSingular); + $uninflected = array_merge($uninflectedSingular, $coreUninflectedSingular); + $irregular = array_merge($irregularSingular, $coreIrregularSingular); } $regexUninflected = __enclose(join( '|', $uninflected)); diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 1af4a2e4c..3a3a0dfc1 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -388,7 +388,7 @@ class DboSource extends DataSource $count++; } - if($this->execute('INSERT INTO '.$model->table.' ('.join(',', $fieldInsert).') VALUES ('.join(',', $valueInsert).')')) + if($this->execute('INSERT INTO '.$this->name($model->table).' ('.join(',', $fieldInsert).') VALUES ('.join(',', $valueInsert).')')) { return true; } diff --git a/cake/libs/router.php b/cake/libs/router.php index b0c5db4c7..fbbb14faa 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -118,7 +118,10 @@ class Router extends Object { // Here's the fix. if ($url && ('/' != $url[0])) { - $url = '/'.$url; + if (!defined('SERVER_IIS')) + { + $url = '/'.$url; + } } $out = array(); diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 5f9527975..144c6543c 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -329,25 +329,25 @@ function url($url = null, $return = false) function checkbox($fieldName, $title = null, $htmlAttributes = null, $return = false) { $value = $this->tagValue($fieldName); - $model = new $this->model; - $db =& ConnectionManager::getDataSource($model->useDbConfig); - $value = $db->boolean($value); + $notCheckedValue = 0; - if($value === true || $value === 't') + if (isset($htmlAttributes['value'])) { - $htmlAttributes['checked'] = 'checked'; + $htmlAttributes['checked'] = ($htmlAttributes['value'] == $value)? 'checked': null; + if ($htmlAttributes['checked'] == '0') { + $notCheckedValue = -1; + } } else { - $htmlAttributes['checked'] = null; - } - - if(!isset($htmlAttributes['value'])) - { + $model = new $this->model; + $db =& ConnectionManager::getDataSource($model->useDbConfig); + $value = $db->boolean($value); + $htmlAttributes['checked'] = $value? 'checked': null; $htmlAttributes['value'] = 1; } - $output = $this->hidden($fieldName, array('value' => 0), true); + $output = $this->hidden($fieldName, array('value' => $notCheckedValue), true); $output .= sprintf($this->tags['checkbox'], $this->model, $this->field, $this->_parseAttributes($htmlAttributes, null, '', ' ')); return $output; @@ -601,7 +601,17 @@ function url($url = null, $return = false) function tagValue ($fieldName) { $this->setFormTag($fieldName); - return isset($this->params['data'][$this->model][$this->field])? htmlspecialchars($this->params['data'][$this->model][$this->field]): null; + + if(isset($this->params['data'][$this->model][$this->field])) + { + return h($this->params['data'][$this->model][$this->field]); + } + elseif(isset($this->data[$this->model][$this->field])) + { + return h($this->data[$this->model][$this->field]); + } + + return false; } /** diff --git a/index.php b/index.php index 9dd456310..f6d11db16 100644 --- a/index.php +++ b/index.php @@ -34,7 +34,7 @@ */ define ('APP_DIR', 'app'); define ('DS', DIRECTORY_SEPARATOR); -define ('ROOT', dirname(__FILE__).DS); +define ('ROOT', dirname(__FILE__)); define ('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', ROOT.APP_DIR.DS.WEBROOT_DIR.DS);