mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 05:22:41 +00:00
Merge branch '2.1' into 2.2
This commit is contained in:
commit
4eea72205b
4 changed files with 7 additions and 6 deletions
|
@ -390,11 +390,10 @@ class HttpSocket extends CakeSocket {
|
||||||
}
|
}
|
||||||
|
|
||||||
list($plugin, $responseClass) = pluginSplit($this->responseClass, true);
|
list($plugin, $responseClass) = pluginSplit($this->responseClass, true);
|
||||||
App::uses($this->responseClass, $plugin . 'Network/Http');
|
App::uses($responseClass, $plugin . 'Network/Http');
|
||||||
if (!class_exists($responseClass)) {
|
if (!class_exists($responseClass)) {
|
||||||
throw new SocketException(__d('cake_dev', 'Class %s not found.', $this->responseClass));
|
throw new SocketException(__d('cake_dev', 'Class %s not found.', $this->responseClass));
|
||||||
}
|
}
|
||||||
$responseClass = $this->responseClass;
|
|
||||||
$this->response = new $responseClass($response);
|
$this->response = new $responseClass($response);
|
||||||
if (!empty($this->response->cookies)) {
|
if (!empty($this->response->cookies)) {
|
||||||
if (!isset($this->config['request']['cookies'][$Host])) {
|
if (!isset($this->config['request']['cookies'][$Host])) {
|
||||||
|
|
|
@ -320,7 +320,7 @@ class Router {
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
*
|
*
|
||||||
* `Router::redirect('/home/*', array('controller' => 'posts', 'action' => 'view', array('persist' => true));`
|
* `Router::redirect('/home/*', array('controller' => 'posts', 'action' => 'view', array('persist' => true)));`
|
||||||
*
|
*
|
||||||
* Redirects /home/* to /posts/view and passes the parameters to /posts/view. Using an array as the
|
* Redirects /home/* to /posts/view and passes the parameters to /posts/view. Using an array as the
|
||||||
* redirect destination allows you to use other routes to define where a url string should be redirected to.
|
* redirect destination allows you to use other routes to define where a url string should be redirected to.
|
||||||
|
@ -778,7 +778,7 @@ class Router {
|
||||||
unset($url['?']);
|
unset($url['?']);
|
||||||
}
|
}
|
||||||
if (isset($url['#'])) {
|
if (isset($url['#'])) {
|
||||||
$frag = '#' . urlencode($url['#']);
|
$frag = '#' . $url['#'];
|
||||||
unset($url['#']);
|
unset($url['#']);
|
||||||
}
|
}
|
||||||
if (isset($url['ext'])) {
|
if (isset($url['ext'])) {
|
||||||
|
|
|
@ -527,7 +527,7 @@ class RouterTest extends CakeTestCase {
|
||||||
$this->assertEquals('/posts/index/0', $result);
|
$this->assertEquals('/posts/index/0', $result);
|
||||||
|
|
||||||
$result = Router::url(array('controller' => 'posts', '0', '?' => 'var=test&var2=test2', '#' => 'unencoded string %'));
|
$result = Router::url(array('controller' => 'posts', '0', '?' => 'var=test&var2=test2', '#' => 'unencoded string %'));
|
||||||
$expected = '/posts/index/0?var=test&var2=test2#unencoded+string+%25';
|
$expected = '/posts/index/0?var=test&var2=test2#unencoded string %';
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,9 @@ class CakeFixtureManager {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function fixturize($test) {
|
public function fixturize($test) {
|
||||||
|
if (!$this->_initialized) {
|
||||||
|
ClassRegistry::config(array('ds' => 'test', 'testing' => true));
|
||||||
|
}
|
||||||
if (empty($test->fixtures) || !empty($this->_processed[get_class($test)])) {
|
if (empty($test->fixtures) || !empty($this->_processed[get_class($test)])) {
|
||||||
$test->db = $this->_db;
|
$test->db = $this->_db;
|
||||||
return;
|
return;
|
||||||
|
@ -90,7 +93,6 @@ class CakeFixtureManager {
|
||||||
$db = ConnectionManager::getDataSource('test');
|
$db = ConnectionManager::getDataSource('test');
|
||||||
$db->cacheSources = false;
|
$db->cacheSources = false;
|
||||||
$this->_db = $db;
|
$this->_db = $db;
|
||||||
ClassRegistry::config(array('ds' => 'test', 'testing' => true));
|
|
||||||
$this->_initialized = true;
|
$this->_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue