Permalink
Browse files

Merge branch '2.0' of https://github.com/cakephp/cakephp into 2.0-exc…

…eptionrenderer
  • Loading branch information...
2 parents c71a655 + bd0a303 commit f2da8df165ef57c196c5f2812d8fa4a9d9072b50 Thomas Ploch committed May 15, 2011
Showing 690 changed files with 3,597 additions and 1,807 deletions.
View
@@ -1,4 +1,5 @@
/app/config
/app/tmp
/plugins
-/vendors
+/vendors
+.DS_Store
View
12 README
@@ -18,17 +18,11 @@ http://bakery.cakephp.org
The Show - live and archived podcasts about CakePHP and more
http://live.cakephp.org
+CakePHP TV - screen casts from events and video tutorials
+http://tv.cakephp.org
+
CakePHP Google Group - community mailing list and forum
http://groups.google.com/group/cake-php
#cakephp on irc.freenode.net - chat with CakePHP developers
irc://irc.freenode.net/cakephp
-
-CakeForge - open development for CakePHP
-http://cakeforge.org
-
-CakePHP gear
-http://www.cafepress.com/cakefoundation
-
-Recommended Reading
-http://astore.amazon.com/cakesoftwaref-20/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -279,6 +279,7 @@
* 'servers' => array(
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
+ * 'persistent' => true, // [optional] set this to false for non-persistent connections
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* ));
*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -64,6 +64,7 @@ public function init($settings = array()) {
'engine'=> 'Memcache',
'prefix' => Inflector::slug(APP_DIR) . '_',
'servers' => array('127.0.0.1'),
+ 'persistent' => true,
'compress'=> false
), $settings)
);
@@ -79,7 +80,7 @@ public function init($settings = array()) {
$this->_Memcache = new Memcache();
foreach ($this->settings['servers'] as $server) {
list($host, $port) = $this->_parseServerString($server);
- if ($this->_Memcache->addServer($host, $port)) {
+ if ($this->_Memcache->addServer($host, $port, $this->settings['persistent'])) {
$return = true;
}
}
@@ -16,4 +16,5 @@
* @since CakePHP(tm) v 1.1.11.4062
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-return $config['Cake.version'] = '2.0.0-dev';
+
+return $config['Cake.version'] = '2.0.0-dev';
@@ -63,7 +63,7 @@ public function read($key) {
list($plugin, $key) = pluginSplit($key);
if ($plugin) {
- $file = App::pluginPath($plugin) . 'config' . DS . $key;
+ $file = App::pluginPath($plugin) . 'Config' . DS . $key;
} else {
$file = $this->_path . $key;
}
@@ -86,7 +86,7 @@ protected function _getShellList() {
$appShells = App::objects('Console/Command', null, false);
$shellList = $this->_appendShells('app', $appShells, $shellList);
- $plugins = App::objects('plugin');
+ $plugins = CakePlugin::loaded();
foreach ($plugins as $plugin) {
$pluginShells = App::objects($plugin . '.Console/Command');
$shellList = $this->_appendShells($plugin, $pluginShells, $shellList);
@@ -187,13 +187,13 @@ protected function _asSorted($shellList) {
* @return void
*/
protected function _asXml($shellList) {
- $plugins = App::objects('plugin');
+ $plugins = CakePlugin::loaded();
$shells = new SimpleXmlElement('<shells></shells>');
foreach ($shellList as $name => $location) {
$source = current($location);
$callable = $name;
if (in_array($source, $plugins)) {
- $callable = Inflector::underscore($source) . '.' . $name;
+ $callable = Inflector::camelize($source) . '.' . $name;
}
$shell = $shells->addChild('shell');
$shell->addAttribute('name', $name);
@@ -440,7 +440,7 @@ public function getOptionParser() {
);
$path = array(
'help' => __d('cake_console', 'Path to read and write schema.php'),
- 'default' => CONFIGS . 'schema'
+ 'default' => CONFIGS . 'Schema'
);
$file = array(
'help' => __d('cake_console', 'File name to read and write.'),
@@ -18,6 +18,7 @@
*/
App::uses('BakeTask', 'Console/Command/Task');
+App::uses('AppModel', 'Model');
/**
* Task class for creating and updating controller files.
@@ -499,4 +500,4 @@ public function help() {
$this->out();
$this->_stop();
}
-}
+}
@@ -38,7 +38,7 @@ class DbConfigTask extends Shell {
*/
protected $_defaultConfig = array(
'name' => 'default',
- 'driver'=> 'mysql',
+ 'datasource'=> 'Database/Mysql',
'persistent'=> 'false',
'host'=> 'localhost',
'login'=> 'root',
@@ -64,7 +64,7 @@ class DbConfigTask extends Shell {
* @var string
*/
public function initialize() {
- $this->path = APP . 'config' . DS;
+ $this->path = APP . 'Config' . DS;
}
/**
@@ -104,7 +104,7 @@ protected function _interactive() {
}
}
- $driver = $this->in(__d('cake_console', 'Driver:'), array('mssql', 'mysql', 'oracle', 'postgres', 'sqlite'), 'mysql');
+ $driver = $this->in(__d('cake_console', 'Driver:'), array('Mssql', 'Mysql', 'Oracle', 'Postgres', 'Sqlite'), 'Mysql');
$persistent = $this->in(__d('cake_console', 'Persistent Connection?'), array('y', 'n'), 'n');
if (strtolower($persistent) == 'n') {
@@ -313,7 +313,7 @@ public function bake($configs) {
extract($config);
$out .= "\tpublic \${$name} = array(\n";
- $out .= "\t\t'driver' => '{$driver}',\n";
+ $out .= "\t\t'datasource' => 'Database/{$driver}',\n";
$out .= "\t\t'persistent' => {$persistent},\n";
$out .= "\t\t'host' => '{$host}',\n";
@@ -41,7 +41,7 @@ class PluginTask extends Shell {
* @return void
*/
function initialize() {
- $this->path = APP . 'plugins' . DS;
+ $this->path = APP . 'Plugin' . DS;
}
/**
@@ -76,7 +76,7 @@ protected function _interactive($plugin = null) {
}
if (!$this->bake($plugin)) {
- $this->error(__d('cake_console', "An error occured trying to bake: %s in %s", $plugin, $this->path . Inflector::underscore($pluginPath)));
+ $this->error(__d('cake_console', "An error occured trying to bake: %s in %s", $plugin, $this->path . Inflector::camelize($pluginPath)));
}
}
@@ -88,8 +88,7 @@ protected function _interactive($plugin = null) {
* @return bool
*/
public function bake($plugin) {
- $pluginPath = Inflector::underscore($plugin);
-
+ $pluginPath = Inflector::camelize($plugin);
$pathOptions = App::path('plugins');
if (count($pathOptions) > 1) {
$this->findPath($pathOptions);
@@ -104,7 +103,7 @@ public function bake($plugin) {
if (strtolower($looksGood) == 'y') {
$Folder = new Folder($this->path . $pluginPath);
$directories = array(
- 'config' . DS . 'schema',
+ 'Config' . DS . 'schema',
'Model' . DS . 'Behavior',
'Model' . DS . 'Datasource',
'Console' . DS . 'Command' . DS . 'Task',
@@ -60,7 +60,7 @@ public function execute() {
if ($project) {
$response = false;
- while ($response == false && is_dir($project) === true && file_exists($project . 'config' . 'core.php')) {
+ while ($response == false && is_dir($project) === true && file_exists($project . 'Config' . 'core.php')) {
$prompt = __d('cake_console', '<warning>A project already exists in this location:</warning> %s Overwrite?', $project);
$response = $this->in($prompt, array('y','n'), 'n');
if (strtolower($response) === 'n') {
@@ -236,7 +236,7 @@ public function consolePath($path) {
* @return boolean Success
*/
public function securitySalt($path) {
- $File = new File($path . 'config' . DS . 'core.php');
+ $File = new File($path . 'Config' . DS . 'core.php');
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
$string = Security::generateAuthKey();
@@ -256,7 +256,7 @@ public function securitySalt($path) {
* @return boolean Success
*/
public function securityCipherSeed($path) {
- $File = new File($path . 'config' . DS . 'core.php');
+ $File = new File($path . 'Config' . DS . 'core.php');
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
if (!class_exists('Security')) {
Oops, something went wrong.

0 comments on commit f2da8df

Please sign in to comment.