Skip to content

Commit

Permalink
Merge branch '2.0' of https://github.com/cakephp/cakephp into 2.0-exc…
Browse files Browse the repository at this point in the history
…eptionrenderer
  • Loading branch information
Thomas Ploch committed May 15, 2011
2 parents c71a655 + bd0a303 commit f2da8df
Show file tree
Hide file tree
Showing 690 changed files with 3,597 additions and 1,807 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/app/config
/app/tmp
/plugins
/vendors
/vendors
.DS_Store
12 changes: 3 additions & 9 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions app/config/core.php → app/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* ));
*
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion lib/Cake/Cache/Engine/MemcacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
Expand All @@ -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;
}
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/config/config.php → lib/Cake/Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion lib/Cake/Configure/PhpReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Console/Command/CommandListShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/SchemaShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'),
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Console/Command/Task/ControllerTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/

App::uses('BakeTask', 'Console/Command/Task');
App::uses('AppModel', 'Model');

/**
* Task class for creating and updating controller files.
Expand Down Expand Up @@ -499,4 +500,4 @@ public function help() {
$this->out();
$this->_stop();
}
}
}
8 changes: 4 additions & 4 deletions lib/Cake/Console/Command/Task/DbConfigTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DbConfigTask extends Shell {
*/
protected $_defaultConfig = array(
'name' => 'default',
'driver'=> 'mysql',
'datasource'=> 'Database/Mysql',
'persistent'=> 'false',
'host'=> 'localhost',
'login'=> 'root',
Expand All @@ -64,7 +64,7 @@ class DbConfigTask extends Shell {
* @var string
*/
public function initialize() {
$this->path = APP . 'config' . DS;
$this->path = APP . 'Config' . DS;
}

/**
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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";

Expand Down
9 changes: 4 additions & 5 deletions lib/Cake/Console/Command/Task/PluginTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PluginTask extends Shell {
* @return void
*/
function initialize() {
$this->path = APP . 'plugins' . DS;
$this->path = APP . 'Plugin' . DS;
}

/**
Expand Down Expand Up @@ -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)));
}
}

Expand All @@ -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);
Expand All @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Console/Command/Task/ProjectTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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();
Expand All @@ -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')) {
Expand Down
Loading

0 comments on commit f2da8df

Please sign in to comment.