Merge branch 'master' into 2.5

This commit is contained in:
mark_story 2014-04-18 22:13:56 -04:00
commit d54fbe6f60
7 changed files with 13 additions and 8 deletions

View file

@ -295,7 +295,9 @@ class ConsoleOutput {
* Clean up and close handles * Clean up and close handles
*/ */
public function __destruct() { public function __destruct() {
fclose($this->_output); if (is_resource($this->_output)) {
fclose($this->_output);
}
} }
} }

View file

@ -74,7 +74,9 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App
echo ");\n\n"; echo ");\n\n";
endif; endif;
echo trim($actions); if (!empty($actions)) {
echo trim($actions) . "\n";
}
endif; ?> endif; ?>
} }

View file

@ -43,7 +43,7 @@ class IniAcl extends Object implements AclInterface {
/** /**
* Initialize method * Initialize method
* *
* @param AclBase $component * @param Component $component
* @return void * @return void
*/ */
public function initialize(Component $component) { public function initialize(Component $component) {

View file

@ -21,8 +21,8 @@ App::uses('AclInterface', 'Controller/Component/Acl');
* Access Control List factory class. * Access Control List factory class.
* *
* Uses a strategy pattern to allow custom ACL implementations to be used with the same component interface. * Uses a strategy pattern to allow custom ACL implementations to be used with the same component interface.
* You can define by changing `Configure::write('Acl.classname', 'DbAcl');` in your core.php. Concrete ACL * You can define by changing `Configure::write('Acl.classname', 'DbAcl');` in your core.php. The adapter
* implementations should extend `AclBase` and implement the methods it defines. * you specify must implement `AclInterface`
* *
* @package Cake.Controller.Component * @package Cake.Controller.Component
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html * @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html

View file

@ -767,6 +767,7 @@ class Sqlserver extends DboSource {
*/ */
protected function _execute($sql, $params = array(), $prepareOptions = array()) { protected function _execute($sql, $params = array(), $prepareOptions = array()) {
$this->_lastAffected = false; $this->_lastAffected = false;
$sql = trim($sql);
if (strncasecmp($sql, 'SELECT', 6) === 0 || preg_match('/^EXEC(?:UTE)?\s/mi', $sql) > 0) { if (strncasecmp($sql, 'SELECT', 6) === 0 || preg_match('/^EXEC(?:UTE)?\s/mi', $sql) > 0) {
$prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL); $prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL);
return parent::_execute($sql, $params, $prepareOptions); return parent::_execute($sql, $params, $prepareOptions);

View file

@ -78,7 +78,7 @@ class AclComponentTest extends CakeTestCase {
} }
/** /**
* test that adapter() whines when the class is not an AclBase * test that adapter() whines when the class does not implement AclInterface
* *
* @expectedException CakeException * @expectedException CakeException
* @return void * @return void

View file

@ -719,8 +719,8 @@ class Validation {
* $check is a legal finite on this platform * $check is a legal finite on this platform
* *
* @param string $check Value to check * @param string $check Value to check
* @param integer $lower Lower limit * @param int|float $lower Lower limit
* @param integer $upper Upper limit * @param int|float $upper Upper limit
* @return boolean Success * @return boolean Success
*/ */
public static function range($check, $lower = null, $upper = null) { public static function range($check, $lower = null, $upper = null) {