Skip to content

Commit

Permalink
Merge branch 'master' into 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 3, 2014
2 parents 136f026 + 55672b6 commit 92eeef8
Show file tree
Hide file tree
Showing 82 changed files with 407 additions and 336 deletions.
3 changes: 2 additions & 1 deletion lib/Cake/Cache/Cache.php
Expand Up @@ -113,11 +113,11 @@ class Cache {
* - `user` Used by Xcache. Username for XCache
* - `password` Used by Xcache/Redis. Password for XCache/Redis
*
* @see app/Config/core.php for configuration settings
* @param string $name Name of the configuration
* @param array $settings Optional associative array of settings passed to the engine
* @return array array(engine, settings) on success, false on failure
* @throws CacheException
* @see app/Config/core.php for configuration settings
*/
public static function config($name = null, $settings = array()) {
if (is_array($name)) {
Expand Down Expand Up @@ -561,6 +561,7 @@ public static function groupConfigs($group = null) {
* the cache key is empty. Can be any callable type supported by your PHP.
* @param string $config The cache configuration to use for this operation.
* Defaults to default.
* @return mixed The results of the callable or unserialized results.
*/
public static function remember($key, $callable, $config = 'default') {
$existing = self::read($key, $config);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/CacheEngine.php
Expand Up @@ -130,7 +130,7 @@ abstract public function clear($check);
* to decide whether actually delete the keys or just simulate it to achieve
* the same result.
*
* @param string $groups name of the group to be cleared
* @param string $group name of the group to be cleared
* @return boolean
*/
public function clearGroup($group) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Cache/Engine/ApcEngine.php
Expand Up @@ -173,6 +173,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
9 changes: 5 additions & 4 deletions lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -303,8 +303,8 @@ protected function _clearDirectory($path, $now, $threshold) {
/**
* Not implemented
*
* @param string $key
* @param integer $offset
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @return void
* @throws CacheException
*/
Expand All @@ -315,8 +315,8 @@ public function decrement($key, $offset = 1) {
/**
* Not implemented
*
* @param string $key
* @param integer $offset
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @return void
* @throws CacheException
*/
Expand Down Expand Up @@ -405,6 +405,7 @@ public function key($key) {
/**
* Recursively deletes all files under any directory named as $group
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/MemcacheEngine.php
Expand Up @@ -199,7 +199,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -282,6 +283,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
5 changes: 4 additions & 1 deletion lib/Cake/Cache/Engine/MemcachedEngine.php
Expand Up @@ -144,6 +144,7 @@ public function init($settings = array()) {
* Settings the memcached instance
*
* @throws CacheException when the Memcached extension is not built with the desired serializer engine
* @return void
*/
protected function _setOptions() {
$this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
Expand Down Expand Up @@ -265,7 +266,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -322,6 +324,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/RedisEngine.php
Expand Up @@ -175,7 +175,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check Whether or not expiration keys should be checked. If
* true, no keys will be removed as cache will rely on redis TTL's.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -212,6 +213,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group name to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Cache/Engine/WincacheEngine.php
Expand Up @@ -179,6 +179,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
4 changes: 3 additions & 1 deletion lib/Cake/Cache/Engine/XcacheEngine.php
Expand Up @@ -126,7 +126,8 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @param boolean $check
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
Expand Down Expand Up @@ -163,6 +164,7 @@ public function groups() {
* Increments the group value to simulate deletion of all keys under a group
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
*/
public function clearGroup($group) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Configure/ConfigReaderInterface.php
Expand Up @@ -26,7 +26,7 @@ interface ConfigReaderInterface {
* These sources can either be static resources like files, or dynamic ones like
* a database, or other datasource.
*
* @param string $key
* @param string $key Key to read.
* @return array An array of data to merge into the runtime configuration
*/
public function read($key);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Configure/IniReader.php
Expand Up @@ -181,7 +181,7 @@ public function dump($key, $data) {
/**
* Converts a value into the ini equivalent
*
* @param mixed $value to export.
* @param mixed $val Value to export.
* @return string String value for ini file.
*/
protected function _value($val) {
Expand Down
4 changes: 4 additions & 0 deletions lib/Cake/Console/Templates/default/views/index.ctp
Expand Up @@ -19,12 +19,15 @@
<div class="<?php echo $pluralVar; ?> index">
<h2><?php echo "<?php echo __('{$pluralHumanName}'); ?>"; ?></h2>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<?php foreach ($fields as $field): ?>
<th><?php echo "<?php echo \$this->Paginator->sort('{$field}'); ?>"; ?></th>
<?php endforeach; ?>
<th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
</tr>
</thead>
<tbody>
<?php
echo "<?php foreach (\${$pluralVar} as \${$singularVar}): ?>\n";
echo "\t<tr>\n";
Expand Down Expand Up @@ -53,6 +56,7 @@

echo "<?php endforeach; ?>\n";
?>
</tbody>
</table>
<p>
<?php echo "<?php
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -39,8 +39,8 @@ class CakeErrorController extends AppController {
/**
* Constructor
*
* @param CakeRequest $request
* @param CakeResponse $response
* @param CakeRequest $request Request instance.
* @param CakeResponse $response Response instance.
*/
public function __construct($request = null, $response = null) {
parent::__construct($request, $response);
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/AclComponent.php
Expand Up @@ -53,8 +53,8 @@ class AclComponent extends Component {
/**
* Constructor. Will return an instance of the correct ACL class as defined in `Configure::read('Acl.classname')`
*
* @param ComponentCollection $collection
* @param array $settings
* @param ComponentCollection $collection Collection instance.
* @param array $settings Settings list.
* @throws CakeException when Acl.classname could not be loaded.
*/
public function __construct(ComponentCollection $collection, $settings = array()) {
Expand Down
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -66,7 +64,7 @@ abstract public function hash($password);
* and check against existing hash.
*
* @param string|array $password Plain text password to hash or data array.
* @param string Existing hashed password.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
*/
abstract public function check($password, $hashedPassword);
Expand Down
8 changes: 3 additions & 5 deletions lib/Cake/Controller/Component/Auth/BaseAuthorize.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -79,7 +77,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
* Checks user authorization.
*
* @param array $user Active user data
* @param CakeRequest $request
* @param CakeRequest $request Request instance.
* @return boolean
*/
abstract public function authorize($user, CakeRequest $request);
Expand Down Expand Up @@ -107,7 +105,7 @@ public function controller(Controller $controller = null) {
* that need to get information about the plugin, controller, and action being invoked.
*
* @param CakeRequest $request The request a path is needed for.
* @param string $path
* @param string $path Path format.
* @return string the action path for the given request.
*/
public function action(CakeRequest $request, $path = '/:plugin/:controller/:action') {
Expand Down Expand Up @@ -144,7 +142,7 @@ public function action(CakeRequest $request, $path = '/:plugin/:controller/:acti
*
* You can use the custom CRUD operations to create additional generic permissions
* that behave like CRUD operations. Doing this will require additional columns on the
* permissions lookup. For example if one wanted an additional search CRUD operation
* permissions lookup. For example if one wanted an additional search CRUD operation
* one would create and additional column '_search' in the aros_acos table. One could
* create a custom admin CRUD operation for administration functions similarly if needed.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
Expand Up @@ -78,7 +78,7 @@ public function getUser(CakeRequest $request) {
$username = env('PHP_AUTH_USER');
$pass = env('PHP_AUTH_PW');

if (empty($username) || empty($pass)) {
if (!is_string($username) || $username === '' || !is_string($pass) || $pass === '') {
return false;
}
return $this->_findUser($username, $pass);
Expand Down
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -40,7 +38,7 @@ public function hash($password) {
* Check hash. Generate hash for user provided password and check against existing hash.
*
* @param string $password Plain text password to hash.
* @param string Existing hashed password.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
*/
public function check($password, $hashedPassword) {
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Controller/Component/Auth/ControllerAuthorize.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -58,7 +56,7 @@ public function controller(Controller $controller = null) {
* Checks user authorization using a controller callback.
*
* @param array $user Active user data
* @param CakeRequest $request
* @param CakeRequest $request Request instance.
* @return boolean
*/
public function authorize($user, CakeRequest $request) {
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Controller/Component/Auth/FormAuthenticate.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -51,7 +49,7 @@ protected function _checkFields(CakeRequest $request, $model, $fields) {
}
foreach (array($fields['username'], $fields['password']) as $field) {
$value = $request->data($model . '.' . $field);
if (empty($value) || !is_string($value)) {
if (empty($value) && $value !== '0' || !is_string($value)) {
return false;
}
}
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Controller/Component/Auth/SimplePasswordHasher.php
@@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand Down Expand Up @@ -47,7 +45,7 @@ public function hash($password) {
* Check hash. Generate hash for user provided password and check against existing hash.
*
* @param string $password Plain text password to hash.
* @param string Existing hashed password.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
*/
public function check($password, $hashedPassword) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -512,7 +512,7 @@ public function constructAuthorize() {
* `$this->Auth->allow('edit', 'add');` or
* `$this->Auth->allow();` to allow all actions
*
* @param string|array $action,... Controller action name or array of actions
* @param string|array $action Controller action name or array of actions
* @return void
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-public
*/
Expand All @@ -537,7 +537,7 @@ public function allow($action = null) {
* `$this->Auth->deny('edit', 'add');` or
* `$this->Auth->deny();` to remove all items from the allowed list
*
* @param string|array $action,... Controller action name or array of actions
* @param string|array $action Controller action name or array of actions
* @return void
* @see AuthComponent::allow()
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-require-authorization
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/CookieComponent.php
Expand Up @@ -185,7 +185,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
/**
* Start CookieComponent for use in the controller
*
* @param Controller $controller
* @param Controller $controller Controller instance.
* @return void
*/
public function startup(Controller $controller) {
Expand Down Expand Up @@ -293,7 +293,7 @@ public function read($key = null) {
/**
* Returns true if given variable is set in cookie.
*
* @param string $var Variable name to check for
* @param string $key Variable name to check for
* @return boolean True if variable is there
*/
public function check($key = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/EmailComponent.php
Expand Up @@ -423,7 +423,7 @@ protected function _findFiles($attachment) {
/**
* Format addresses to be an array with email as key and alias as value
*
* @param array $addresses
* @param array $addresses Address to format.
* @return array
*/
protected function _formatAddresses($addresses) {
Expand Down

0 comments on commit 92eeef8

Please sign in to comment.