Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormHelper: Allow a boolean value for the disabled attribute in function radio #321

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
73429b3
Fixed inconsistent debug parameters and empty '(line )'
markomarkovic Nov 4, 2011
c7363bb
Updated tests for debug()
markomarkovic Nov 4, 2011
4e702b2
Updated test for debug
markomarkovic Nov 5, 2011
87f5b6c
Fix more strict errors.
markstory Nov 14, 2011
4e8239a
Add missing @link to docs if available to helpers
shama Nov 14, 2011
a821723
Merge pull request #316 from shama/2.0
ADmad Nov 14, 2011
3248e34
Add @link to File and Folder utilities
shama Nov 15, 2011
d725869
Add test cases to include $exceptions with Folder::chmod()
shama Nov 15, 2011
9d82cd9
Merge pull request #317 from shama/2.0
renan Nov 15, 2011
37a932b
adding testcase for saving habtm associations with no primary model d…
ceeram Nov 15, 2011
bc5b6f7
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
ceeram Nov 15, 2011
1ebaaf4
Update to assertEquals on Folder tests
shama Nov 15, 2011
9fd0430
adding sort on testresults, to avoid incorrect order returned by MySQL
ceeram Nov 15, 2011
55d4fd3
Merge pull request #318 from shama/folder-test
lorenzo Nov 15, 2011
6e4493c
Fix ambiguous content types in RequestHandler.
markstory Nov 16, 2011
2bb4ed0
Removing _Token from request data.
ceeram Nov 15, 2011
8450b8b
Fixing TMP cleanup code in FolderTest
ADmad Nov 16, 2011
025133d
Fix tests which might fail due to unexpected order on finds
ceeram Nov 16, 2011
3cb5188
Fix failing test, moving timestamp define before the save to ensure i…
ceeram Nov 16, 2011
e5c8a44
Add sorting on joined model virtual field, fixes #2250
ceeram Nov 14, 2011
9c5ad71
Add CakeRequest::__isset()
markstory Nov 17, 2011
8981f49
Add stricter validation to TestTask.
markstory Nov 17, 2011
2c5350b
Merge pull request #297 from markomarkovic/73429b357f06cd76f35d81482d…
markstory Nov 17, 2011
98f03dc
Replacing test case compatibility functions
shama Nov 16, 2011
c97dca1
Test case compatibility assertIsA() to assertInstanceOf()
shama Nov 16, 2011
99793fd
Test case compatibility skipUnless() to markTestSkipped()
shama Nov 16, 2011
2f599e8
Removing extra new lines.
markstory Nov 17, 2011
92aea9d
Update comment.
markstory Nov 17, 2011
b380b5e
Add back missing .sql files, related to pull request 132 on docs repo
ceeram Nov 17, 2011
0f299a1
use old timestamp variable, to ensure test to pass
ceeram Nov 17, 2011
d22ac71
Allow a boolean value for the disabled attribute in function radio. S…
ingk Nov 17, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions app/Config/Schema/db_acl.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# $Id$
#
# Copyright 2005-2011, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)

CREATE TABLE acos (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INTEGER(10) DEFAULT NULL,
model VARCHAR(255) DEFAULT '',
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
alias VARCHAR(255) DEFAULT '',
lft INTEGER(10) DEFAULT NULL,
rght INTEGER(10) DEFAULT NULL,
PRIMARY KEY (id)
);

CREATE TABLE aros_acos (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
aro_id INTEGER(10) UNSIGNED NOT NULL,
aco_id INTEGER(10) UNSIGNED NOT NULL,
_create CHAR(2) NOT NULL DEFAULT 0,
_read CHAR(2) NOT NULL DEFAULT 0,
_update CHAR(2) NOT NULL DEFAULT 0,
_delete CHAR(2) NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);

CREATE TABLE aros (
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
parent_id INTEGER(10) DEFAULT NULL,
model VARCHAR(255) DEFAULT '',
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
alias VARCHAR(255) DEFAULT '',
lft INTEGER(10) DEFAULT NULL,
rght INTEGER(10) DEFAULT NULL,
PRIMARY KEY (id)
);
26 changes: 26 additions & 0 deletions app/Config/Schema/i18n.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# $Id$
#
# Copyright 2005-2011, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)

CREATE TABLE i18n (
id int(10) NOT NULL auto_increment,
locale varchar(6) NOT NULL,
model varchar(255) NOT NULL,
foreign_key int(10) NOT NULL,
field varchar(255) NOT NULL,
content mediumtext,
PRIMARY KEY (id),
# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
# INDEX I18N_LOCALE_MODEL(locale, model),
# INDEX I18N_FIELD(model, foreign_key, field),
# INDEX I18N_ROW(model, foreign_key),
INDEX locale (locale),
INDEX model (model),
INDEX row_id (foreign_key),
INDEX field (field)
);
16 changes: 16 additions & 0 deletions app/Config/Schema/sessions.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# $Id$
#
# Copyright 2005-2011, Cake Software Foundation, Inc.
# 1785 E. Sahara Avenue, Suite 490-204
# Las Vegas, Nevada 89104
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
# MIT License (http://www.opensource.org/licenses/mit-license.php)

CREATE TABLE cake_sessions (
id varchar(255) NOT NULL default '',
data text,
expires int(11) default NULL,
PRIMARY KEY (id)
);
14 changes: 8 additions & 6 deletions lib/Cake/Console/Command/Task/TestTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,14 @@ public function getClassName($objectType) {
$this->out(++$key . '. ' . $option);
$keys[] = $key;
}
$selection = $this->in(__d('cake_console', 'Choose an existing class, or enter the name of a class that does not exist'));
if (isset($options[$selection - 1])) {
$selection = $options[$selection - 1];
}
if ($type !== 'Model') {
$selection = substr($selection, 0, $typeLength * - 1);
while (empty($selection)) {
$selection = $this->in(__d('cake_console', 'Choose an existing class, or enter the name of a class that does not exist'));
if (is_numeric($selection) && isset($options[$selection - 1])) {
$selection = $options[$selection - 1];
}
if ($type !== 'Model') {
$selection = substr($selection, 0, $typeLength * - 1);
}
}
return $selection;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Controller/Component/AuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ public function startup($controller) {
}

/**
* Attempts to introspect the correct values for object properties including
* $userModel and $sessionKey.
* Attempts to introspect the correct values for object properties.
*
* @return boolean
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/PaginatorComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function validateSort($object, $options, $whitelist = array()) {
$order[$alias . '.' . $field] = $value;
} elseif ($object->hasField($key, true)) {
$order[$field] = $value;
} elseif (isset($object->{$alias}) && $object->{$alias}->hasField($field)) {
} elseif (isset($object->{$alias}) && $object->{$alias}->hasField($field, true)) {
$order[$alias . '.' . $field] = $value;
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/RequestHandlerComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ protected function _setExtension() {
}
$extensions = Router::extensions();
$preferred = array_shift($accept);
$preferredTypes = $this->mapType($preferred);
$preferredTypes = $this->response->mapType($preferred);
$similarTypes = array_intersect($extensions, $preferredTypes);
if (count($similarTypes) === 1 && !in_array('html', $preferredTypes)) {
if (count($similarTypes) === 1 && !in_array('xhtml', $preferredTypes) && !in_array('html', $preferredTypes)) {
$this->ext = array_shift($similarTypes);
}
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Controller/Component/SecurityComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ public function startup($controller) {
}
}
$this->_generateToken($controller);
if ($isPost) {
unset($controller->request->data['_Token']);
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions lib/Cake/Model/Datasource/DboSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,10 @@ public function order($keys, $direction = 'ASC', $model = null) {
if (is_object($model) && $model->isVirtualField($key)) {
$key = '(' . $this->_quoteFields($model->getVirtualField($key)) . ')';
}
list($alias, $field) = pluginSplit($key);
if (is_object($model) && $alias !== $model->alias && is_object($model->{$alias}) && $model->{$alias}->isVirtualField($key)) {
$key = '(' . $this->_quoteFields($model->{$alias}->getVirtualField($key)) . ')';
}

if (strpos($key, '.')) {
$key = preg_replace_callback('/([a-zA-Z0-9_-]{1,})\\.([a-zA-Z0-9_-]{1,})/', array(&$this, '_quoteMatchedField'), $key);
Expand Down
11 changes: 11 additions & 0 deletions lib/Cake/Network/CakeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,17 @@ public function __get($name) {
return null;
}

/**
* Magic isset method allows isset/empty checks
* on routing parameters.
*
* @param string $name The property being accessed.
* @return bool Existence
*/
public function __isset($name) {
return isset($this->params[$name]);
}

/**
* Check whether or not a Request is a certain type. Uses the built in detection rules
* as well as additional rules defined with CakeRequest::addDetector(). Any detector can be called
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Network/Email/CakeEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ protected function _addEmail($varName, $email, $name) {
}

/**
* Set Subject
* Get/Set Subject.
*
* @param string $subject
* @param null|string $subject
* @return mixed
*/
public function subject($subject = null) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Network/Email/SmtpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ protected function _smtpSend($data, $checkCode = '250') {
if (substr($response, -2) !== "\r\n") {
throw new SocketException(__d('cake_dev', 'SMTP timeout.'));
}
$response = end(explode("\r\n", rtrim($response, "\r\n")));
$responseLines = explode("\r\n", rtrim($response, "\r\n"));
$response = end($responseLines);

if (preg_match('/^(' . $checkCode . ')(.)/', $response, $code)) {
if ($code[2] === '-') {
Expand Down
Loading