diff --git a/VERSION.txt b/VERSION.txt index ef10ab617..4f04ccc0a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -1.1.2.2802 \ No newline at end of file +1.1.2.2887 \ No newline at end of file diff --git a/cake/config/tags.ini.php b/cake/config/tags.ini.php index df0d6ddd0..1006666f2 100644 --- a/cake/config/tags.ini.php +++ b/cake/config/tags.ini.php @@ -64,7 +64,7 @@ selectstart = "" ; Tag template for an empty select option tag. -selectempty = "" +selectempty = "" ; Tag template for a select option tag. selectoption = "" diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 77952cbb5..27c89a3db 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -220,9 +220,32 @@ class Dispatcher extends Object $controller->webroot = $this->webroot; $controller->params = $params; $controller->action = $params['action']; - $controller->data = empty($params['data'])? null: $params['data']; - $controller->passed_args = empty($params['pass'])? null: $params['pass']; - $controller->autoLayout = empty($params['bare'])?$controller->autoLayout:!$params['bare']; + if (!empty($controller->params['data'])) + { + $controller->data =& $controller->params['data']; + } + else + { + $controller->data = null; + } + if (!empty($controller->params['pass'])) + { + $controller->passed_args =& $controller->params['pass']; + $controller->passedArgs =& $controller->params['pass']; + } + else + { + $controller->passed_args = null; + $controller->passedArgs = null; + } + if (!empty($params['bare'])) + { + $controller->autoLayout = !$params['bare']; + } + else + { + $controller->autoLayout = $controller->autoLayout; + } $controller->webservices = $params['webservices']; $controller->plugin = $this->plugin; diff --git a/cake/libs/error.php b/cake/libs/error.php index 87d7ff74f..3f6837439 100644 --- a/cake/libs/error.php +++ b/cake/libs/error.php @@ -145,7 +145,9 @@ class ErrorHandler extends Object $this->controller->base = $base; $this->controller->webroot = $webroot; $this->controller->viewPath = 'errors'; + $controllerName = str_replace('Controller', '', $className); $this->controller->set(array('controller' => $className, + 'controllerName' => $controllerName, 'title' => 'Missing Controller')); $this->controller->render('missingController'); exit(); diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index 51c703242..3de9eba38 100644 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -155,7 +155,7 @@ class ConnectionManager extends Object } else { - trigger_error('Unable to load DataSource file ' . $filename . '.php', E_USER_ERROR); + trigger_error('Unable to load DataSource file ' . $conn['filename'] . '.php', E_USER_ERROR); return null; } } diff --git a/cake/libs/model/model_php4.php b/cake/libs/model/model_php4.php index ef807be1b..1412fa2e5 100644 --- a/cake/libs/model/model_php4.php +++ b/cake/libs/model/model_php4.php @@ -1020,7 +1020,7 @@ class Model extends Object } if(!empty($newValues)) { - $newValue[] = join(',', $newValues); + $newValue[] = $newValues; unset($newValues); } } @@ -1033,7 +1033,11 @@ class Model extends Object $db->execute("DELETE FROM {$joinTable[$count]} WHERE {$mainKey[$count]} = '{$id}'"); if(!empty($newValue[$count])) { - $db->execute("INSERT INTO {$joinTable[$count]} ({$fields[$count]}) VALUES {$newValue[$count]}"); + $secondCount = count($newValue[$count]); + for ($x = 0; $x < $secondCount; $x++) + { + $db->execute("INSERT INTO {$joinTable[$count]} ({$fields[$count]}) VALUES {$newValue[$count][$x]}"); + } } } } @@ -1462,7 +1466,7 @@ class Model extends Object return true; } - if (empty($data) && isset($this->data)) + if (isset($this->data)) { $data = $this->data; } diff --git a/cake/libs/model/model_php5.php b/cake/libs/model/model_php5.php index 7818e0e8b..c466248fc 100644 --- a/cake/libs/model/model_php5.php +++ b/cake/libs/model/model_php5.php @@ -1016,7 +1016,7 @@ class Model extends Object } if(!empty($newValues)) { - $newValue[] = join(',', $newValues); + $newValue[] = $newValues; unset($newValues); } } @@ -1029,7 +1029,11 @@ class Model extends Object $db->execute("DELETE FROM {$joinTable[$count]} WHERE {$mainKey[$count]} = '{$id}'"); if(!empty($newValue[$count])) { - $db->execute("INSERT INTO {$joinTable[$count]} ({$fields[$count]}) VALUES {$newValue[$count]}"); + $secondCount = count($newValue[$count]); + for ($x = 0; $x < $secondCount; $x++) + { + $db->execute("INSERT INTO {$joinTable[$count]} ({$fields[$count]}) VALUES {$newValue[$count][$x]}"); + } } } } @@ -1458,7 +1462,7 @@ class Model extends Object return true; } - if (empty($data) && isset($this->data)) + if (isset($this->data)) { $data = $this->data; } diff --git a/cake/libs/session.php b/cake/libs/session.php index db8c1157e..5f8c49618 100644 --- a/cake/libs/session.php +++ b/cake/libs/session.php @@ -430,20 +430,6 @@ class CakeSession extends Object require_once($config); } } - else - { - if(!isset($_SESSION)) - { - if(function_exists('ini_set')) - { - ini_set('session.use_trans_sid', 0); - ini_set('session.name', CAKE_SESSION_COOKIE); - ini_set('session.cookie_lifetime', $this->cookieLifeTime); - ini_set('session.cookie_path', $this->path); - ini_set('session.gc_probability', 1); - } - } - } break; } } @@ -645,11 +631,11 @@ class CakeSession extends Object if($row[0][0]['count'] > 0) { - $db->execute("UPDATE ".$db->name('cake_sessions')." SET ".$db->name('cake_sessions.data')." = ".$db->value($value).", ".$db->name('cake_sessions.expires')." = ".$db->value($expires)." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key)); + $db->execute("UPDATE ".$db->name('cake_sessions')." SET ".$db->name('data')." = ".$db->value($value).", ".$db->name('cake_sessions.expires')." = ".$db->value($expires)." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key)); } else { - $db->execute("INSERT INTO ".$db->name('cake_sessions')." (".$db->name('cake_sessions.data').",".$db->name('cake_sessions.expires').",".$db->name('cake_sessions.id').") VALUES (".$db->value($value).", ".$db->value($expires).", ".$db->value($key).")"); + $db->execute("INSERT INTO ".$db->name('cake_sessions')." (".$db->name('data').",".$db->name('cake_sessions.expires').",".$db->name('cake_sessions.id').") VALUES (".$db->value($value).", ".$db->value($expires).", ".$db->value($key).")"); } return true; } diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index b2c71e7f3..143a9e91d 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -1550,7 +1550,7 @@ function url($url = null, $return = false) $opt = $this->dayOptionTag( $tagName ,null ,$day, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->monthOptionTag( $tagName, null, $month, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->yearOptionTag( $tagName, null, null, null, $year, $selectAttr, $optionAttr, $showEmpty); break; case 'MDY' : - $opt = $this->monthOptionTag($tagName, null, $month, $selectAttr, $optionAttr, $showEmpty) .'-'.$this->dayOptionTag( $tagName, null, $day, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->yearOptionTag($tagName, null, null, null, $year, $optionAttr, $selectAttr, $showEmpty); + $opt = $this->monthOptionTag($tagName, null, $month, $selectAttr, $optionAttr, $showEmpty) .'-'.$this->dayOptionTag( $tagName, null, $day, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->yearOptionTag($tagName, null, null, null, $year, $selectAttr, $optionAttr, $showEmpty); break; case 'YMD' : $opt = $this->yearOptionTag($tagName, null, null, null, $year, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->monthOptionTag( $tagName, null, $month, $selectAttr, $optionAttr, $showEmpty) . '-' . $this->dayOptionTag( $tagName, null, $day, $selectAttr, $optionAttr, $showEmpty); diff --git a/cake/libs/view/helpers/javascript.php b/cake/libs/view/helpers/javascript.php index d1a077028..7449103da 100644 --- a/cake/libs/view/helpers/javascript.php +++ b/cake/libs/view/helpers/javascript.php @@ -273,7 +273,7 @@ class JavascriptHelper extends Helper } else { - $rt = 'new Array('.join(', ', $out).')'; + $rt = '['.join(', ', $out).']'; } $rt = $prefix.$rt.$postfix; diff --git a/cake/libs/view/templates/errors/missing_controller.thtml b/cake/libs/view/templates/errors/missing_controller.thtml index e612234b2..3a6e24320 100644 --- a/cake/libs/view/templates/errors/missing_controller.thtml +++ b/cake/libs/view/templates/errors/missing_controller.thtml @@ -44,11 +44,12 @@ view file, a user-customizable error page for handling invalid controller dispat

Fatal: Create Class:

-

+

<?php
-    class extends AppController
-    {
-    }
+class extends AppController
+{
+    var $name = '';
+}
?>

diff --git a/cake/libs/view/templates/errors/missing_model.thtml b/cake/libs/view/templates/errors/missing_model.thtml index 7881bb083..12e711dd9 100644 --- a/cake/libs/view/templates/errors/missing_model.thtml +++ b/cake/libs/view/templates/errors/missing_model.thtml @@ -34,4 +34,23 @@

Notice: this error is being rendered by the app/views/errors/missing_model.thtml view file, a user-customizable error page. +

+ +

+Fatal: Unable to load model +

+ +

+Fatal: Create Class: +

+
+

<?php
+class extends AppModel
+{
+    var $name = '';
+}
+?>
+

+

+in file :

\ No newline at end of file