mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
This commit is contained in:
commit
17963e980b
6 changed files with 42 additions and 16 deletions
|
@ -354,6 +354,7 @@ input[type=submit] {
|
|||
}
|
||||
form .submit input[type=submit] {
|
||||
background:#62af56;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
border-color: #2d6324;
|
||||
|
@ -414,6 +415,7 @@ p.error,
|
|||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -ms-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800));
|
||||
background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -o-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: linear-gradient(top, #ffcc00, #E6B800);
|
||||
|
@ -442,6 +444,7 @@ p.error,
|
|||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
|
||||
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: linear-gradient(top, #ee5f5b, #c43c35);
|
||||
|
@ -453,6 +456,7 @@ p.error,
|
|||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
background: #3B8230;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -ms-linear-gradient(top, #76BF6B, #3B8230);
|
||||
|
@ -505,6 +509,7 @@ input[type=submit],
|
|||
font-weight:normal;
|
||||
padding: 4px 8px;
|
||||
background: #dcdcdc;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
|
@ -534,6 +539,7 @@ input[type=submit]:active,
|
|||
.actions ul li a:active,
|
||||
.actions a:active {
|
||||
background: #eee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee));
|
||||
background-image: -webkit-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -moz-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -ms-linear-gradient(top, #dfdfdf, #eee);
|
||||
|
|
|
@ -354,6 +354,7 @@ input[type=submit] {
|
|||
}
|
||||
form .submit input[type=submit] {
|
||||
background:#62af56;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
border-color: #2d6324;
|
||||
|
@ -414,6 +415,7 @@ p.error,
|
|||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -ms-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800));
|
||||
background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: -o-linear-gradient(top, #ffcc00, #E6B800);
|
||||
background-image: linear-gradient(top, #ffcc00, #E6B800);
|
||||
|
@ -442,6 +444,7 @@ p.error,
|
|||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
|
||||
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
|
||||
background-image: linear-gradient(top, #ee5f5b, #c43c35);
|
||||
|
@ -453,6 +456,7 @@ p.error,
|
|||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
background: #3B8230;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230));
|
||||
background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -moz-linear-gradient(top, #76BF6B, #3B8230);
|
||||
background-image: -ms-linear-gradient(top, #76BF6B, #3B8230);
|
||||
|
@ -505,6 +509,7 @@ input[type=submit],
|
|||
font-weight:normal;
|
||||
padding: 4px 8px;
|
||||
background: #dcdcdc;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc));
|
||||
background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc);
|
||||
|
@ -534,6 +539,7 @@ input[type=submit]:active,
|
|||
.actions ul li a:active,
|
||||
.actions a:active {
|
||||
background: #eee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee));
|
||||
background-image: -webkit-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -moz-linear-gradient(top, #dfdfdf, #eee);
|
||||
background-image: -ms-linear-gradient(top, #dfdfdf, #eee);
|
||||
|
|
|
@ -65,8 +65,10 @@ class Object {
|
|||
return false;
|
||||
}
|
||||
App::uses('Dispatcher', 'Routing');
|
||||
if (in_array('return', $extra, true)) {
|
||||
$extra = array_merge($extra, array('return' => 0, 'autoRender' => 1));
|
||||
if (($index = array_search('return', $extra)) !== false) {
|
||||
$extra['return'] = 0;
|
||||
$extra['autoRender'] = 1;
|
||||
unset($extra[$index]);
|
||||
}
|
||||
if (is_array($url) && !isset($extra['url'])) {
|
||||
$extra['url'] = array();
|
||||
|
|
|
@ -177,12 +177,12 @@ class Model extends Object {
|
|||
* public $validate = array(
|
||||
* 'login' => array(
|
||||
* array(
|
||||
* 'role' => 'alphaNumeric',
|
||||
* 'rule' => 'alphaNumeric',
|
||||
* 'message' => 'Only alphabets and numbers allowed',
|
||||
* 'last' => true
|
||||
* ),
|
||||
* array(
|
||||
* 'role' => array('minLength', 8),
|
||||
* 'rule' => array('minLength', 8),
|
||||
* 'message' => array('Minimum length of %d characters')
|
||||
* )
|
||||
* )
|
||||
|
@ -191,7 +191,7 @@ class Model extends Object {
|
|||
*
|
||||
* ### Valid keys in validations
|
||||
*
|
||||
* - `role`: String with method name, regular expression (started by slash) or array with method and parameters
|
||||
* - `rule`: String with method name, regular expression (started by slash) or array with method and parameters
|
||||
* - `message`: String with the message or array if have multiple parameters. See http://php.net/sprintf
|
||||
* - `last`: Boolean value to indicate if continue validating the others rules if the current fail [Default: true]
|
||||
* - `required`: Boolean value to indicate if the field must be present on save
|
||||
|
|
|
@ -124,7 +124,16 @@ class RequestActionController extends Controller {
|
|||
* @return array
|
||||
*/
|
||||
public function params_pass() {
|
||||
return $this->params;
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
public function param_check() {
|
||||
$this->autoRender = false;
|
||||
$content = '';
|
||||
if (isset($this->request->params[0])) {
|
||||
$content = 'return found';
|
||||
}
|
||||
$this->response->body($content);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -564,6 +573,18 @@ class ObjectTest extends CakeTestCase {
|
|||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that requestAction() does not forward the 0 => return value.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testRequestActionRemoveReturnParam() {
|
||||
$result = $this->object->requestAction(
|
||||
'/request_action/param_check', array('return')
|
||||
);
|
||||
$this->assertEquals('', $result, 'Return key was found');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that requestAction() is populating $this->params properly
|
||||
*
|
||||
|
@ -615,13 +636,4 @@ class ObjectTest extends CakeTestCase {
|
|||
|
||||
$_POST = $_tmp;
|
||||
}
|
||||
|
||||
/**
|
||||
* testCakeError
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testCakeError() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class <?php echo $class;?> extends AppHelper {
|
|||
</pre>
|
||||
<p class="notice">
|
||||
<strong><?php echo __d('cake_dev', 'Notice'); ?>: </strong>
|
||||
<?php __d('cake_dev', 'If you want to customize this error message, create %s', APP_DIR . DS . 'View' . DS . 'Errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||
<?php echo __d('cake_dev', 'If you want to customize this error message, create %s', APP_DIR . DS . 'View' . DS . 'Errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
||||
|
|
Loading…
Reference in a new issue