diff --git a/app/config/acl.ini.php b/app/config/acl.ini.php index a9868e685..35ec18662 100644 --- a/app/config/acl.ini.php +++ b/app/config/acl.ini.php @@ -6,22 +6,18 @@ ; * ; * PHP versions 4 and 5 ; * -; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/ -; * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) +; * CakePHP(tm) : Rapid Development Framework http://cakephp.org/ +; * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * ; * Licensed under The MIT License ; * Redistributions of files must retain the above copyright notice. ; * -; * @filesource -; * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) -; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +; * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @link http://cakephp.org CakePHP(tm) Project ; * @package cake ; * @subpackage cake.app.config ; * @since CakePHP(tm) v 0.10.0.1076 -; * @version $Revision$ -; * @modifiedby $LastChangedBy$ -; * @lastmodified $Date$ -; * @license http://www.opensource.org/licenses/mit-license.php The MIT License +; * @license MIT License (http://www.opensource.org/licenses/mit-license.php) ; */ ; acl.ini.php - Cake ACL Configuration diff --git a/app/config/bootstrap.php b/app/config/bootstrap.php index ce40aafc6..40f33296c 100644 --- a/app/config/bootstrap.php +++ b/app/config/bootstrap.php @@ -8,17 +8,17 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.10.8.2117 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -29,7 +29,7 @@ * 'plugins' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'), * 'models' => array('/full/path/to/models/', '/next/full/path/to/models/'), * 'views' => array('/full/path/to/views/', '/next/full/path/to/views/'), - * 'controllers' => array(/full/path/to/controllers/', '/next/full/path/to/controllers/'), + * 'controllers' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'), * 'datasources' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'), * 'behaviors' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'), * 'components' => array('/full/path/to/components/', '/next/full/path/to/components/'), diff --git a/app/config/core.php b/app/config/core.php index 7e9cd1223..13ffbb17c 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * This is core configuration file. * @@ -7,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -74,22 +69,12 @@ */ //Configure::write('App.baseUrl', env('SCRIPT_NAME')); -/** - * Uncomment the define below to use CakePHP admin routes. - * - * The value of the define determines the name of the route - * and its associated controller actions: - * - * 'admin' -> admin_index() and /admin/controller/index - * 'superuser' -> superuser_index() and /superuser/controller/index - * - * [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead] - */ - //Configure::write('Routing.admin', 'admin'); - /** * Uncomment the define below to use CakePHP prefix routes. * + * The value of the define determines the names of the routes + * and their associated controller actions: + * * Set to an array of prefixes you want to use in your application. Use for * admin or other prefixed routes. * @@ -98,6 +83,8 @@ * Enables: * `admin_index()` and `/admin/controller/index` * `manager_index()` and `/manager/controller/index` + * + * [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead] */ //Configure::write('Routing.prefixes', array('admin')); @@ -211,6 +198,15 @@ */ Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); +/** + * Apply timestamps with the last modified time to static assets (js, css, images). + * Will append a querystring parameter containing the time the file was modified. This is + * useful for invalidating browser caches. + * + * Set to `true` to apply timestamps, when debug = 0, or set to 'force' to always enable + * timestamping. + */ + //Configure::write('Asset.timestamp', true); /** * Compress CSS output by removing comments, whitespace, repeating tags, etc. * This requires a/var/cache directory to be writable by the web server for caching. diff --git a/app/config/routes.php b/app/config/routes.php index b14e435c3..cc15f1174 100644 --- a/app/config/routes.php +++ b/app/config/routes.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * Short description for file. * @@ -9,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Here, we are connecting '/' (base path) to controller called 'Pages', diff --git a/app/config/schema/db_acl.php b/app/config/schema/db_acl.php index 19434d0c6..9e90d4356 100644 --- a/app/config/schema/db_acl.php +++ b/app/config/schema/db_acl.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/ /** * This is Acl Schema file @@ -8,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * diff --git a/app/config/schema/i18n.php b/app/config/schema/i18n.php index b8158dd5a..0ca2ec4c2 100644 --- a/app/config/schema/i18n.php +++ b/app/config/schema/i18n.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/ /** * This is i18n Schema file @@ -8,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * diff --git a/app/config/schema/sessions.php b/app/config/schema/sessions.php index 197366108..8ef270808 100644 --- a/app/config/schema/sessions.php +++ b/app/config/schema/sessions.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/ /** * This is Sessions Schema file @@ -8,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * diff --git a/app/index.php b/app/index.php index 5724a1c4b..11438c33b 100644 --- a/app/index.php +++ b/app/index.php @@ -1,24 +1,19 @@ <?php -/* SVN FILE: $Id$ */ /** * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; ?> \ No newline at end of file diff --git a/cake/console/templates/skel/vendors/css/empty b/app/views/elements/email/html/empty similarity index 100% rename from cake/console/templates/skel/vendors/css/empty rename to app/views/elements/email/html/empty diff --git a/cake/console/templates/skel/vendors/img/empty b/app/views/elements/email/text/empty similarity index 100% rename from cake/console/templates/skel/vendors/img/empty rename to app/views/elements/email/text/empty diff --git a/cake/console/templates/skel/vendors/js/empty b/app/views/layouts/email/html/empty similarity index 100% rename from cake/console/templates/skel/vendors/js/empty rename to app/views/layouts/email/html/empty diff --git a/app/views/layouts/email/text/empty b/app/views/layouts/email/text/empty new file mode 100644 index 000000000..e69de29bb diff --git a/app/webroot/css.php b/app/webroot/css.php index 969dd0e27..7845c0815 100644 --- a/app/webroot/css.php +++ b/app/webroot/css.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * Short description for file. * @@ -7,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { header('HTTP/1.1 404 Not Found'); diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index 676cf4b35..e8bdab629 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -1,24 +1,19 @@ -/* SVN FILE: $Id$ */ /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot.css * @since CakePHP(tm) - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ * { diff --git a/app/webroot/index.php b/app/webroot/index.php index 526cecba3..5935a869c 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -17,7 +17,7 @@ * @package cake * @subpackage cake.app.webroot * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Use the DS to separate the directories in other defines diff --git a/app/webroot/test.php b/app/webroot/test.php index e7f726d14..ce4ce7e83 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs diff --git a/cake/LICENSE.txt b/cake/LICENSE.txt index e54a5572b..4e5e2b91c 100644 --- a/cake/LICENSE.txt +++ b/cake/LICENSE.txt @@ -1,7 +1,7 @@ The MIT License CakePHP(tm) : The Rapid Development PHP Framework (http://www.cakephp.org) -Copyright 2005-2007, Cake Software Foundation, Inc. +Copyright 2005-2009, Cake Software Foundation, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/cake/basics.php b/cake/basics.php index b79f8de45..76f0b0d55 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Basic Cake functionality. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -218,6 +212,28 @@ if (!function_exists('array_combine')) { return htmlspecialchars($text, ENT_QUOTES, $charset); } +/** + * Splits a dot syntax plugin name into its plugin and classname. + * If $name does not have a dot, then index 0 will be null. + * + * Commonly used like `list($plugin, $name) = pluginSplit($name);` + * + * @param string $name The name you want to plugin split. + * @param boolean $dotAppend Set to true if you want the plugin to have a '.' appended to it. + * @param string $plugin Optional default plugin to use if no plugin is found. Defaults to null. + * @return array Array with 2 indexes. 0 => plugin name, 1 => classname + */ + function pluginSplit($name, $dotAppend = false, $plugin = null) { + if (strpos($name, '.') !== false) { + $parts = explode('.', $name, 2); + if ($dotAppend) { + $parts[0] .= '.'; + } + return $parts; + } + return array($plugin, $name); + } + /** * Returns an array of all the given parameters. * @@ -445,7 +461,7 @@ if (!function_exists('file_put_contents')) { /** * Writes data into file. * - * If file exists, it will be overwritten. If data is an array, it will be join()ed with an empty string. + * If file exists, it will be overwritten. If data is an array, it will be implode()ed with an empty string. * * @param string $fileName File name. * @param mixed $data String or array. @@ -453,7 +469,7 @@ if (!function_exists('file_put_contents')) { */ function file_put_contents($fileName, $data) { if (is_array($data)) { - $data = join('', $data); + $data = implode('', $data); } $res = @fopen($fileName, 'w+b'); diff --git a/cake/config/paths.php b/cake/config/paths.php index e37d6233b..a0644897d 100644 --- a/cake/config/paths.php +++ b/cake/config/paths.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -105,11 +99,6 @@ if (!defined('CONFIGS')) { define('CONFIGS', APP.'config'.DS); } -/** - * Path to the libs directory. - */ - define('INFLECTIONS', CAKE.'config'.DS.'inflections'.DS); - /** * Path to the libs directory. */ @@ -203,13 +192,6 @@ if (!defined('VENDORS')) { define('VENDORS', CAKE_CORE_INCLUDE_PATH.DS.'vendors'.DS); } -/** - * Path to the Pear directory - * The purporse is to make it easy porting Pear libs into Cake - * without setting the include_path PHP variable. - */ - define('PEAR', VENDORS.'Pear'.DS); - /** * Full url prefix */ diff --git a/cake/config/unicode/casefolding/0080_00ff.php b/cake/config/unicode/casefolding/0080_00ff.php index 5207b0d95..c2541655b 100644 --- a/cake/config/unicode/casefolding/0080_00ff.php +++ b/cake/config/unicode/casefolding/0080_00ff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0100_017f.php b/cake/config/unicode/casefolding/0100_017f.php index 804ef66af..4f73c8bed 100644 --- a/cake/config/unicode/casefolding/0100_017f.php +++ b/cake/config/unicode/casefolding/0100_017f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0180_024F.php b/cake/config/unicode/casefolding/0180_024F.php index 1eed655ba..7a22205d5 100644 --- a/cake/config/unicode/casefolding/0180_024F.php +++ b/cake/config/unicode/casefolding/0180_024F.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0250_02af.php b/cake/config/unicode/casefolding/0250_02af.php index 505bdf9e6..d3bcb2795 100644 --- a/cake/config/unicode/casefolding/0250_02af.php +++ b/cake/config/unicode/casefolding/0250_02af.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.6833 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0370_03ff.php b/cake/config/unicode/casefolding/0370_03ff.php index a8f5fabe9..100389b66 100644 --- a/cake/config/unicode/casefolding/0370_03ff.php +++ b/cake/config/unicode/casefolding/0370_03ff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0400_04ff.php b/cake/config/unicode/casefolding/0400_04ff.php index 58f777e45..b112444b7 100644 --- a/cake/config/unicode/casefolding/0400_04ff.php +++ b/cake/config/unicode/casefolding/0400_04ff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0500_052f.php b/cake/config/unicode/casefolding/0500_052f.php index 6a5b661a8..819485551 100644 --- a/cake/config/unicode/casefolding/0500_052f.php +++ b/cake/config/unicode/casefolding/0500_052f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/0530_058f.php b/cake/config/unicode/casefolding/0530_058f.php index d22dd68a8..4c43fce7a 100644 --- a/cake/config/unicode/casefolding/0530_058f.php +++ b/cake/config/unicode/casefolding/0530_058f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/1e00_1eff.php b/cake/config/unicode/casefolding/1e00_1eff.php index bdce745ad..eec52dd57 100644 --- a/cake/config/unicode/casefolding/1e00_1eff.php +++ b/cake/config/unicode/casefolding/1e00_1eff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/1f00_1fff.php b/cake/config/unicode/casefolding/1f00_1fff.php index aeecb3ede..46df5baeb 100644 --- a/cake/config/unicode/casefolding/1f00_1fff.php +++ b/cake/config/unicode/casefolding/1f00_1fff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2100_214f.php b/cake/config/unicode/casefolding/2100_214f.php index 66824e45b..0c302edb8 100644 --- a/cake/config/unicode/casefolding/2100_214f.php +++ b/cake/config/unicode/casefolding/2100_214f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2150_218f.php b/cake/config/unicode/casefolding/2150_218f.php index d85bbe7f3..3094461da 100644 --- a/cake/config/unicode/casefolding/2150_218f.php +++ b/cake/config/unicode/casefolding/2150_218f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2460_24ff.php b/cake/config/unicode/casefolding/2460_24ff.php index b3d5b5e5e..40368480c 100644 --- a/cake/config/unicode/casefolding/2460_24ff.php +++ b/cake/config/unicode/casefolding/2460_24ff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2c00_2c5f.php b/cake/config/unicode/casefolding/2c00_2c5f.php index 5c687e782..557f9ba49 100644 --- a/cake/config/unicode/casefolding/2c00_2c5f.php +++ b/cake/config/unicode/casefolding/2c00_2c5f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2c60_2c7f.php b/cake/config/unicode/casefolding/2c60_2c7f.php index e2713f193..1e9e731d2 100644 --- a/cake/config/unicode/casefolding/2c60_2c7f.php +++ b/cake/config/unicode/casefolding/2c60_2c7f.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/2c80_2cff.php b/cake/config/unicode/casefolding/2c80_2cff.php index e2fdb3131..6d11ff756 100644 --- a/cake/config/unicode/casefolding/2c80_2cff.php +++ b/cake/config/unicode/casefolding/2c80_2cff.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/config/unicode/casefolding/ff00_ffef.php b/cake/config/unicode/casefolding/ff00_ffef.php index 3a6d99ac2..24344a232 100644 --- a/cake/config/unicode/casefolding/ff00_ffef.php +++ b/cake/config/unicode/casefolding/ff00_ffef.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Case Folding Properties. * @@ -12,22 +10,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.config.unicode.casefolding * @since CakePHP(tm) v 1.2.0.5691 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/cake b/cake/console/cake index cd7256cd0..ec908a7df 100755 --- a/cake/console/cake +++ b/cake/console/cake @@ -4,22 +4,18 @@ # Bake is a shell script for running CakePHP bake script # PHP versions 4 and 5 # -# CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) -# Copyright 2005-2007, Cake Software Foundation, Inc. +# CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +# Copyright 2005-2009, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. # -# @filesource -# @copyright Copyright 2005-2007, Cake Software Foundation, Inc. -# @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +# @copyright Copyright 2005-2009, Cake Software Foundation, Inc. +# @link http://cakephp.org CakePHP(tm) Project # @package cake # @subpackage cake.cake.console # @since CakePHP(tm) v 1.2.0.5012 -# @version $Revision$ -# @modifiedby $LastChangedBy$ -# @lastmodified $Date$ -# @license http://www.opensource.org/licenses/mit-license.php The MIT License +# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # ################################################################################ LIB=${0/%cake/} diff --git a/cake/console/cake.bat b/cake/console/cake.bat index c0a531c8e..3ae4e38c3 100644 --- a/cake/console/cake.bat +++ b/cake/console/cake.bat @@ -3,22 +3,18 @@ :: Bake is a shell script for running CakePHP bake script :: PHP versions 4 and 5 :: -:: CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) -:: Copyright 2005-2007, Cake Software Foundation, Inc. +:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +:: Copyright 2005-2009, Cake Software Foundation, Inc. :: :: Licensed under The MIT License :: Redistributions of files must retain the above copyright notice. :: -:: @filesource -:: @copyright Copyright 2005-2007, Cake Software Foundation, Inc. -:: @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +:: @copyright Copyright 2005-2009, Cake Software Foundation, Inc. +:: @link http://cakephp.org CakePHP(tm) Project :: @package cake :: @subpackage cake.cake.console :: @since CakePHP(tm) v 1.2.0.5012 -:: @version $Revision$ -:: @modifiedby $LastChangedBy$ -:: @lastmodified $Date$ -:: @license http://www.opensource.org/licenses/mit-license.php The MIT License +:: @license MIT License (http://www.opensource.org/licenses/mit-license.php) :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/cake/console/cake.php b/cake/console/cake.php index 280516fa7..7ec5c19be 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -7,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console * @since CakePHP(tm) v 1.2.0.5012 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); @@ -321,13 +317,8 @@ class ShellDispatcher { $this->help(); return true; } - - if (strpos($arg, '.') !== false) { - list($plugin, $shell) = explode('.', $arg); - } else { - $plugin = null; - $shell = $arg; - } + + list($plugin, $shell) = pluginSplit($arg); $this->shell = $shell; $this->shellName = Inflector::camelize($shell); $this->shellClass = $this->shellName . 'Shell'; diff --git a/cake/console/error.php b/cake/console/error.php index 4d9a9f7a5..9ad3b19d9 100644 --- a/cake/console/error.php +++ b/cake/console/error.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ErrorHandler for Console Shells * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console * @since CakePHP(tm) v 1.2.0.5074 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index 769b282ee..6bd6bc0bf 100644 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Component', 'Acl'); App::import('Model', 'DbAcl'); @@ -237,7 +236,7 @@ class AclShell extends Shell { * @param integer $indent indent level. * @return void * @access protected - **/ + */ function _outputNode($class, $node, $indent) { $indent = str_repeat(' ', $indent); $data = $node[$class]; @@ -522,7 +521,7 @@ class AclShell extends Shell { * * @param string $identifier Identifier to parse * @return mixed a string for aliases, and an array for model.foreignKey - **/ + */ function parseIdentifier($identifier) { if (preg_match('/^([\w]+)\.(.*)$/', $identifier, $matches)) { return array( @@ -540,7 +539,7 @@ class AclShell extends Shell { * @param string $class Class type you want (Aro/Aco) * @param mixed $identifier A mixed identifier for finding the node. * @return int Integer of NodeId. Will trigger an error if nothing is found. - **/ + */ function _getNodeId($class, $identifier) { $node = $this->Acl->{$class}->node($identifier); if (empty($node)) { diff --git a/cake/console/libs/api.php b/cake/console/libs/api.php index 921d6daf5..06cd10f91 100644 --- a/cake/console/libs/api.php +++ b/cake/console/libs/api.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * API shell to get CakePHP core method signatures. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 7f1f0ad67..5be3482d1 100644 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -8,19 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -58,7 +57,7 @@ class BakeShell extends Shell { } foreach($this->args as $i => $arg) { if (strpos($arg, '.')) { - list($this->params['plugin'], $this->args[$i]) = explode('.', $arg); + list($this->params['plugin'], $this->args[$i]) = pluginSplit($arg); break; } } @@ -231,6 +230,8 @@ class BakeShell extends Shell { $this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info"); $this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info"); $this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info"); + $this->out("\n\tbake fixture\n\t\tbakes fixtures. run 'bake fixture help' for more info."); + $this->out("\n\tbake test\n\t\tbakes unit tests. run 'bake test help' for more info."); $this->out(); } diff --git a/cake/console/libs/console.php b/cake/console/libs/console.php index 7366df8dd..102fe901d 100644 --- a/cake/console/libs/console.php +++ b/cake/console/libs/console.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -311,7 +305,7 @@ class ConsoleShell extends Shell { break; case (preg_match("/^routes\s+show/i", $command, $tmp) == true): $router =& Router::getInstance(); - $this->out(join("\n", Set::extract($router->routes, '{n}.0'))); + $this->out(implode("\n", Set::extract($router->routes, '{n}.0'))); break; case (preg_match("/^route\s+(\(.*\))$/i", $command, $tmp) == true): if ($url = eval('return array' . $tmp[1] . ';')) { diff --git a/cake/console/libs/i18n.php b/cake/console/libs/i18n.php index abec75982..08aab9afb 100644 --- a/cake/console/libs/i18n.php +++ b/cake/console/libs/i18n.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -109,7 +103,7 @@ class I18nShell extends Shell { * @access public */ function initdb() { - $this->Dispatch->args = array('schema', 'run', 'create', 'i18n'); + $this->Dispatch->args = array('schema', 'create', 'i18n'); $this->Dispatch->dispatch(); } diff --git a/cake/console/libs/schema.php b/cake/console/libs/schema.php index ed747c792..0ab9acd14 100644 --- a/cake/console/libs/schema.php +++ b/cake/console/libs/schema.php @@ -7,19 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5550 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'File', false); App::import('Model', 'CakeSchema', false); @@ -64,9 +63,10 @@ class SchemaShell extends Shell { } elseif (!empty($this->args[0])) { $name = $this->params['name'] = $this->args[0]; } + if (strpos($name, '.')) { - list($this->params['plugin'], $this->params['name']) = explode('.', $name); - $name = $this->params['name']; + list($this->params['plugin'], $splitName) = pluginSplit($name); + $name = $this->params['name'] = $splitName; } if ($name) { @@ -243,7 +243,7 @@ class SchemaShell extends Shell { * Run database create commands. Alias for run create. * * @return void - **/ + */ function create() { list($Schema, $table) = $this->_loadSchema(); $this->__create($Schema, $table); @@ -253,7 +253,7 @@ class SchemaShell extends Shell { * Run database create commands. Alias for run create. * * @return void - **/ + */ function update() { list($Schema, $table) = $this->_loadSchema(); $this->__update($Schema, $table); @@ -263,7 +263,7 @@ class SchemaShell extends Shell { * Prepares the Schema objects for database operations. * * @return void - **/ + */ function _loadSchema() { $name = $plugin = null; if (isset($this->params['name'])) { diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index fdba08f5c..41b24200e 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Base class for Shells * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -260,11 +254,7 @@ class Shell extends Object { $this->modelClass = $modelClassName; foreach ($uses as $modelClass) { - $plugin = null; - if (strpos($modelClass, '.') !== false) { - list($plugin, $modelClass) = explode('.', $modelClass); - $plugin = $plugin . '.'; - } + list($plugin, $modelClass) = pluginSplit($modelClass, true); if (PHP5) { $this->{$modelClass} = ClassRegistry::init($plugin . $modelClass); } else { @@ -648,7 +638,7 @@ class Shell extends Object { * * @param string $pluginName Name of the plugin you want ie. DebugKit * @return string $path path to the correct plugin. - **/ + */ function _pluginPath($pluginName) { return App::pluginPath($pluginName); } diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index a734b29ef..f99660f2f 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -114,7 +113,7 @@ class ControllerTask extends Shell { * * @access public * @return void - **/ + */ function all() { $this->interactive = false; $this->listAll($this->connection, false); @@ -165,7 +164,7 @@ class ControllerTask extends Shell { if (file_exists($this->path . $controllerFile .'_controller.php')) { $question[] = sprintf(__("Warning: Choosing no will overwrite the %sController.", true), $controllerName); } - $doItInteractive = $this->in(join("\n", $question), array('y', 'n'), 'y'); + $doItInteractive = $this->in(implode("\n", $question), array('y','n'), 'y'); if (strtolower($doItInteractive) == 'y') { $this->interactive = true; @@ -220,7 +219,7 @@ class ControllerTask extends Shell { * Confirm a to be baked controller with the user * * @return void - **/ + */ function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { $this->out(); $this->hr(); @@ -258,7 +257,7 @@ class ControllerTask extends Shell { * Interact with the user and ask about which methods (admin or regular they want to bake) * * @return array Array containing (bakeRegular, bakeAdmin) answers - **/ + */ function _askAboutMethods() { $wannaBakeCrud = $this->in( __("Would you like to create some basic class methods \n(index(), add(), view(), edit())?", true), @@ -349,7 +348,7 @@ class ControllerTask extends Shell { * Interact with the user and get a list of additional helpers * * @return array Helpers that the user wants to use. - **/ + */ function doHelpers() { return $this->_doPropertyChoices( __("Would you like this controller to use other helpers\nbesides HtmlHelper and FormHelper?", true), @@ -361,7 +360,7 @@ class ControllerTask extends Shell { * Interact with the user and get a list of additional components * * @return array Components the user wants to use. - **/ + */ function doComponents() { return $this->_doPropertyChoices( __("Would you like this controller to use any components?", true), @@ -375,7 +374,7 @@ class ControllerTask extends Shell { * @param string $prompt A yes/no question to precede the list * @param sting $example A question for a comma separated list, with examples. * @return array Array of values for property. - **/ + */ function _doPropertyChoices($prompt, $example) { $proceed = $this->in($prompt, array('y','n'), 'n'); $property = array(); diff --git a/cake/console/libs/tasks/db_config.php b/cake/console/libs/tasks/db_config.php index 5e6d75b49..b9253558a 100644 --- a/cake/console/libs/tasks/db_config.php +++ b/cake/console/libs/tasks/db_config.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -54,7 +53,7 @@ class DbConfigTask extends Shell { * Used for testing. * * @var string - **/ + */ var $databaseClassName = 'DATABASE_CONFIG'; /** @@ -259,6 +258,7 @@ class DbConfigTask extends Shell { $oldConfigs = array(); if (file_exists($filename)) { + config('database'); $db = new $this->databaseClassName; $temp = get_class_vars(get_class($db)); @@ -351,7 +351,7 @@ class DbConfigTask extends Shell { * Get a user specified Connection name * * @return void - **/ + */ function getConfig() { App::import('Model', 'ConnectionManager', false); diff --git a/cake/console/libs/tasks/extract.php b/cake/console/libs/tasks/extract.php index a4f395785..f198d16f4 100644 --- a/cake/console/libs/tasks/extract.php +++ b/cake/console/libs/tasks/extract.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -233,9 +232,9 @@ class ExtractTask extends Shell { } if (is_array($token)) { - $lineNumber += count(split("\n", $token[1])) - 1; + $lineNumber += count(explode("\n", $token[1])) - 1; } else { - $lineNumber += count(split("\n", $token)) - 1; + $lineNumber += count(explode("\n", $token)) - 1; } } unset($allTokens); diff --git a/cake/console/libs/tasks/fixture.php b/cake/console/libs/tasks/fixture.php index 124bc988b..82dec5869 100644 --- a/cake/console/libs/tasks/fixture.php +++ b/cake/console/libs/tasks/fixture.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -55,14 +54,14 @@ class FixtureTask extends Shell { * The db connection being used for baking * * @var string - **/ + */ var $connection = null; /** * Schema instance * * @var object - **/ + */ var $_Schema = null; /** @@ -104,7 +103,7 @@ class FixtureTask extends Shell { * * @access public * @return void - **/ + */ function all() { $this->interactive = false; $this->Model->interactive = false; @@ -141,7 +140,7 @@ class FixtureTask extends Shell { * * @param string $modelName Name of model you are dealing with. * @return array Array of import options. - **/ + */ function importOptions($modelName) { $options = array(); $doSchema = $this->in(__('Would you like to import schema for this fixture?', true), array('y', 'n'), 'n'); @@ -231,7 +230,7 @@ class FixtureTask extends Shell { * @param string $fixture Contents of the fixture file. * @access public * @return void - **/ + */ function generateFixtureFile($model, $otherVars) { $defaults = array('table' => null, 'schema' => null, 'records' => null, 'import' => null, 'fields' => null); $vars = array_merge($defaults, $otherVars); @@ -256,7 +255,7 @@ class FixtureTask extends Shell { * * @param array $table Table schema array * @return string fields definitions - **/ + */ function _generateSchema($tableInfo) { $schema = $this->_Schema->generateTable('f', $tableInfo); return substr($schema, 10, -2); @@ -267,7 +266,7 @@ class FixtureTask extends Shell { * * @param array $table Table schema array * @return array Array of records to use in the fixture. - **/ + */ function _generateRecords($tableInfo, $recordCount = 1) { $records = array(); for ($i = 0; $i < $recordCount; $i++) { @@ -278,9 +277,11 @@ class FixtureTask extends Shell { } switch ($fieldInfo['type']) { case 'integer': + case 'float': $insert = $i + 1; break; - case 'string'; + case 'string': + case 'binary': $isPrimaryUuid = ( isset($fieldInfo['key']) && strtolower($fieldInfo['key']) == 'primary' && isset($fieldInfo['length']) && $fieldInfo['length'] == 36 @@ -336,7 +337,7 @@ class FixtureTask extends Shell { * * @param array $records Array of records to be converted to string * @return string A string value of the $records array. - **/ + */ function _makeRecordString($records) { $out = "array(\n"; foreach ($records as $record) { @@ -359,7 +360,7 @@ class FixtureTask extends Shell { * @param string $modelName name of the model to take records from. * @param string $useTable Name of table to use. * @return array Array of records. - **/ + */ function _getRecordsFromTable($modelName, $useTable = null) { if ($this->interactive) { $condition = null; diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index dfc40c9f4..78cb2f6e3 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -65,14 +64,14 @@ class ModelTask extends Shell { * Holds tables found on connection. * * @var array - **/ + */ var $__tables = array(); /** * Holds validation method map. * * @var array - **/ + */ var $__validations = array(); /** @@ -81,6 +80,8 @@ class ModelTask extends Shell { * @access public */ function execute() { + App::import('Model', 'Model', false); + if (empty($this->args)) { $this->__interactive(); } @@ -108,7 +109,7 @@ class ModelTask extends Shell { * Bake all models at once. * * @return void - **/ + */ function all() { $this->listAll($this->connection, false); $unitTestExists = $this->_checkUnitTest(); @@ -128,9 +129,12 @@ class ModelTask extends Shell { * * @param string $className Name of class you want model to be. * @return object Model instance - **/ - function &_getModelObject($className) { - $object = new Model(array('name' => $className, 'ds' => $this->connection)); + */ + function &_getModelObject($className, $table = null) { + if (!$table) { + $table = Inflector::tableize($className); + } + $object =& new Model(array('name' => $className, 'table' => $table, 'ds' => $this->connection)); return $object; } @@ -141,7 +145,7 @@ class ModelTask extends Shell { * @param string $prompt Prompt to use for options list. * @param integer $default The default option for the given prompt. * @return result of user choice. - **/ + */ function inOptions($options, $prompt = null, $default = null) { $valid = false; $max = count($options); @@ -166,8 +170,6 @@ class ModelTask extends Shell { * @access private */ function __interactive() { - App::import('Model', 'Model', false); - $this->hr(); $this->out(sprintf("Bake Model\nPath: %s", $this->path)); $this->hr(); @@ -263,7 +265,7 @@ class ModelTask extends Shell { * @param string $associations Collection of associations. * @access protected * @return void - **/ + */ function _printAssociation($modelName, $type, $associations) { if (!empty($associations[$type])) { for ($i = 0; $i < count($associations[$type]); $i++) { @@ -279,7 +281,7 @@ class ModelTask extends Shell { * @param array $fields Array of fields that might have a primary key. * @return string Name of field that is a primary key. * @access public - **/ + */ function findPrimaryKey($fields) { foreach ($fields as $name => $field) { if (isset($field['key']) && $field['key'] == 'primary') { @@ -294,7 +296,7 @@ class ModelTask extends Shell { * * @param array $fields Array of fields to look for and choose as a displayField * @return mixed Name of field to use for displayField or false if the user declines to choose - **/ + */ function findDisplayField($fields) { $fieldNames = array_keys($fields); $prompt = __("A displayField could not be automatically detected\nwould you like to choose one?", true); @@ -338,7 +340,7 @@ class ModelTask extends Shell { * Populate the __validations array * * @return void - **/ + */ function initValidations() { $options = $choices = array(); if (class_exists('Validation')) { @@ -364,7 +366,7 @@ class ModelTask extends Shell { * @param string $fieldName Name of field to be validated. * @param array $metaData metadata for field * @return array Array of validation for the field. - **/ + */ function fieldValidation($fieldName, $metaData, $primaryKey = 'id') { $defaultChoice = count($this->__validations); $validate = $alreadyChosen = array(); @@ -485,7 +487,7 @@ class ModelTask extends Shell { * @param object $model Model instance of model being generated. * @param array $associations Array of inprogress associations * @return array $associations with belongsTo added in. - **/ + */ function findBelongsTo(&$model, $associations) { $fields = $model->schema(); foreach ($fields as $fieldName => $field) { @@ -514,11 +516,11 @@ class ModelTask extends Shell { * @param object $model Model instance being generated * @param array $associations Array of inprogress associations * @return array $associations with hasOne and hasMany added in. - **/ + */ function findHasOneAndMany(&$model, $associations) { $foreignKey = $this->_modelKey($model->name); foreach ($this->__tables as $otherTable) { - $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable)); + $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable), $otherTable); $modelFieldsTemp = $tempOtherModel->schema(); $pattern = '/_' . preg_quote($model->table, '/') . '|' . preg_quote($model->table, '/') . '_/'; @@ -557,11 +559,11 @@ class ModelTask extends Shell { * @param object $model Model instance being generated * @param array $associations Array of inprogress associations * @return array $associations with hasAndBelongsToMany added in. - **/ + */ function findHasAndBelongsToMany(&$model, $associations) { $foreignKey = $this->_modelKey($model->name); foreach ($this->__tables as $otherTable) { - $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable)); + $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable), $otherTable); $modelFieldsTemp = $tempOtherModel->schema(); $offset = strpos($otherTable, $model->table . '_'); @@ -597,7 +599,7 @@ class ModelTask extends Shell { * @param array $model Temporary Model instance. * @param array $associations Array of associations to be confirmed. * @return array Array of confirmed associations - **/ + */ function confirmAssociations(&$model, $associations) { foreach ($associations as $type => $settings) { if (!empty($associations[$type])) { @@ -625,7 +627,7 @@ class ModelTask extends Shell { * @param object $model Temporary model instance * @param array $associations Array of associations. * @return array Array of associations. - **/ + */ function doMoreAssociations($model, $associations) { $prompt = __('Would you like to define some additional model associations?', true); $wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n'); @@ -690,7 +692,7 @@ class ModelTask extends Shell { * Finds all possible keys to use on custom associations. * * @return array array of tables and possible keys - **/ + */ function _generatePossibleKeys() { $possible = array(); foreach ($this->__tables as $otherTable) { @@ -783,7 +785,7 @@ class ModelTask extends Shell { * @param string $modelName Name of the model you want a table for. * @param string $useDbConfig Name of the database config you want to get tables from. * @return void - **/ + */ function getTable($modelName, $useDbConfig = null) { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; @@ -812,7 +814,7 @@ class ModelTask extends Shell { * * @param string $useDbConfig Connection name to scan. * @return array Array of tables in the database. - **/ + */ function getAllTables($useDbConfig = null) { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; @@ -907,7 +909,7 @@ class ModelTask extends Shell { * @access public * @return void * @see FixtureTask::bake - **/ + */ function bakeFixture($className, $useTable = null) { $this->Fixture->connection = $this->connection; $this->Fixture->plugin = $this->plugin; diff --git a/cake/console/libs/tasks/plugin.php b/cake/console/libs/tasks/plugin.php index cd3fbbb82..75861b2f8 100644 --- a/cake/console/libs/tasks/plugin.php +++ b/cake/console/libs/tasks/plugin.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -154,10 +153,9 @@ class PluginTask extends Shell { 'tests' . DS . 'cases' . DS . 'models', 'tests' . DS . 'groups', 'tests' . DS . 'fixtures', - 'vendors' . DS . 'img', - 'vendors' . DS . 'js', - 'vendors' . DS . 'css', - 'vendors' . DS . 'shells' . DS . 'tasks' + 'vendors', + 'vendors' . DS . 'shells' . DS . 'tasks', + 'webroot' ); foreach ($directories as $directory) { @@ -205,7 +203,7 @@ class PluginTask extends Shell { * find and change $this->path to the user selection * * @return void - **/ + */ function findPath($pathOptions) { $valid = false; $max = count($pathOptions); diff --git a/cake/console/libs/tasks/project.php b/cake/console/libs/tasks/project.php index d1f4be785..03cc23d65 100644 --- a/cake/console/libs/tasks/project.php +++ b/cake/console/libs/tasks/project.php @@ -5,19 +5,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.bake * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Task class for creating new project apps and plugins @@ -31,7 +30,7 @@ class ProjectTask extends Shell { * configs path (used in testing). * * @var string - **/ + */ var $configPath = null; /** @@ -150,6 +149,9 @@ class ProjectTask extends Shell { $verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n'); $Folder = new Folder($skel); + if (!empty($this->params['empty'])) { + $skip = array(); + } if ($Folder->copy(array('to' => $path, 'skip' => $skip))) { $this->hr(); $this->out(sprintf(__("Created: %s in %s", true), $app, $path)); @@ -225,7 +227,8 @@ class ProjectTask extends Shell { $File =& new File($path . 'webroot' . DS . 'index.php'); $contents = $File->read(); if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { - $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '" . CAKE_CORE_INCLUDE_PATH . "');", $contents); + $root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'"; + $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents); if (!$File->write($result)) { return false; } @@ -236,7 +239,7 @@ class ProjectTask extends Shell { $File =& new File($path . 'webroot' . DS . 'test.php'); $contents = $File->read(); if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { - $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', '" . CAKE_CORE_INCLUDE_PATH . "');", $contents); + $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents); if (!$File->write($result)) { return false; } @@ -281,30 +284,39 @@ class ProjectTask extends Shell { $admin = ''; $prefixes = Configure::read('Routing.prefixes'); if (!empty($prefixes)) { + if ($this->interactive) { + $this->out(); + $this->out(__('You have more than one routing prefix configured', true)); + } if (count($prefixes) == 1) { return $prefixes[0] . '_'; } $options = array(); foreach ($prefixes as $i => $prefix) { $options[] = $i + 1; - $this->out($i + 1 . '. ' . $prefix); + if ($this->interactive) { + $this->out($i + 1 . '. ' . $prefix); + } } $selection = $this->in(__('Please choose a prefix to bake with.', true), $options, 1); return $prefixes[$selection - 1] . '_'; } - - $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); - $this->out(__('What would you like the prefix route to be?', true)); - $this->out(__('Example: www.example.com/admin/controller', true)); - while ($admin == '') { - $admin = $this->in(__("What would you like the prefix route to be?", true), null, 'admin'); - } - if ($this->cakeAdmin($admin) !== true) { - $this->out(__('Unable to write to /app/config/core.php.', true)); + if ($this->interactive) { + $this->hr(); $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); - $this->_stop(); + $this->out(__('What would you like the prefix route to be?', true)); + $this->out(__('Example: www.example.com/admin/controller', true)); + while ($admin == '') { + $admin = $this->in(__("Enter a routing prefix:", true), null, 'admin'); + } + if ($this->cakeAdmin($admin) !== true) { + $this->out(__('Unable to write to /app/config/core.php.', true)); + $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); + $this->_stop(); + } + return $admin . '_'; } - return $admin . '_'; + return ''; } /** diff --git a/cake/console/libs/tasks/template.php b/cake/console/libs/tasks/template.php index fcf835492..422b775c1 100644 --- a/cake/console/libs/tasks/template.php +++ b/cake/console/libs/tasks/template.php @@ -23,7 +23,7 @@ class TemplateTask extends Shell { * variables to add to template scope * * @var array - **/ + */ var $templateVars = array(); /** @@ -31,7 +31,7 @@ class TemplateTask extends Shell { * Contains a list of $theme => $path * * @var array - **/ + */ var $templatePaths = array(); /** @@ -39,7 +39,7 @@ class TemplateTask extends Shell { * * @access public * @return void - **/ + */ function initialize() { $this->templatePaths = $this->_findThemes(); } @@ -50,7 +50,7 @@ class TemplateTask extends Shell { * Bake themes are directories not named `skel` inside a `vendors/shells/templates` path. * * @return array Array of bake themes that are installed. - **/ + */ function _findThemes() { $paths = App::path('shells'); $core = array_pop($paths); @@ -128,7 +128,7 @@ class TemplateTask extends Shell { * @param string $vars Additional vars to set to template scope. * @access public * @return contents of generated code template - **/ + */ function generate($directory, $filename, $vars = null) { if ($vars !== null) { $this->set($vars); @@ -156,7 +156,7 @@ class TemplateTask extends Shell { * If there is more than one installed theme user interaction will happen * * @return string returns the path to the selected theme. - **/ + */ function getThemePath() { if (count($this->templatePaths) == 1) { $paths = array_values($this->templatePaths); @@ -193,7 +193,7 @@ class TemplateTask extends Shell { * @param string $filename lower_case_underscored filename you want. * @access public * @return string filename will exit program if template is not found. - **/ + */ function _findTemplate($path, $directory, $filename) { $themeFile = $path . $directory . DS . $filename . '.ctp'; if (file_exists($themeFile)) { diff --git a/cake/console/libs/tasks/test.php b/cake/console/libs/tasks/test.php index 0ab4c329d..06cf9c5bb 100644 --- a/cake/console/libs/tasks/test.php +++ b/cake/console/libs/tasks/test.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -47,28 +46,28 @@ class TestTask extends Shell { * Tasks used. * * @var array - **/ + */ var $tasks = array('Template'); /** * class types that methods can be generated for * * @var array - **/ + */ var $classTypes = array('Model', 'Controller', 'Component', 'Behavior', 'Helper'); /** * Internal list of fixtures that have been added so far. * * @var string - **/ + */ var $_fixtures = array(); /** * Flag for interactive mode * * @var boolean - **/ + */ var $interactive = false; /** @@ -165,7 +164,7 @@ class TestTask extends Shell { * Interact with the user and get their chosen type. Can exit the script. * * @return string Users chosen type. - **/ + */ function getObjectType() { $this->hr(); $this->out(__("Select an object type:", true)); @@ -189,7 +188,7 @@ class TestTask extends Shell { * * @param string $objectType Type of object to list classes for i.e. Model, Controller. * @return string Class name the user chose. - **/ + */ function getClassName($objectType) { $options = App::objects(strtolower($objectType)); $this->out(sprintf(__('Choose a %s class', true), $objectType)); @@ -210,7 +209,7 @@ class TestTask extends Shell { * Currently only model, and controller are supported * * @return boolean - **/ + */ function typeCanDetectFixtures($type) { $type = strtolower($type); return ($type == 'controller' || $type == 'model'); @@ -220,7 +219,7 @@ class TestTask extends Shell { * Check if a class with the given type is loaded or can be loaded. * * @return boolean - **/ + */ function isLoadableClass($type, $class) { return App::import($type, $class); } @@ -230,7 +229,7 @@ class TestTask extends Shell { * So that fixtures can be detected * * @return object - **/ + */ function &buildTestSubject($type, $class) { ClassRegistry::flush(); App::import($type, $class); @@ -247,7 +246,7 @@ class TestTask extends Shell { * Gets the real class name from the cake short form. * * @return string Real classname - **/ + */ function getRealClassName($type, $class) { if (strtolower($type) == 'model') { return $class; @@ -261,7 +260,7 @@ class TestTask extends Shell { * * @param string $className Name of class to look at. * @return array Array of method names. - **/ + */ function getTestableMethods($className) { $classMethods = get_class_methods($className); $parentMethods = get_class_methods(get_parent_class($className)); @@ -281,7 +280,7 @@ class TestTask extends Shell { * * @param object The object you want to generate fixtures for. * @return array Array of fixtures to be included in the test. - **/ + */ function generateFixtureList(&$subject) { $this->_fixtures = array(); if (is_a($subject, 'Model')) { @@ -298,7 +297,7 @@ class TestTask extends Shell { * * @return void * @access protected - **/ + */ function _processModel(&$subject) { $this->_addFixture($subject->name); $associated = $subject->getAssociated(); @@ -322,7 +321,7 @@ class TestTask extends Shell { * * @return void * @access protected - **/ + */ function _processController(&$subject) { $subject->constructClasses(); $models = array(Inflector::classify($subject->name)); @@ -340,7 +339,7 @@ class TestTask extends Shell { * * @return void * @access protected - **/ + */ function _addFixture($name) { $parent = get_parent_class($name); $prefix = 'app.'; @@ -356,7 +355,7 @@ class TestTask extends Shell { * Interact with the user to get additional fixtures they want to use. * * @return void - **/ + */ function getUserFixtures() { $proceed = $this->in(__('Bake could not detect fixtures, would you like to add some?', true), array('y','n'), 'n'); $fixtures = array(); @@ -374,7 +373,7 @@ class TestTask extends Shell { * Controllers require a mock class. * * @return boolean - **/ + */ function hasMockClass($type) { $type = strtolower($type); return $type == 'controller'; @@ -384,7 +383,7 @@ class TestTask extends Shell { * Generate a constructor code snippet for the type and classname * * @return string Constructor snippet for the thing you are building. - **/ + */ function generateConstructor($type, $fullClassName) { $type = strtolower($type); if ($type == 'model') { @@ -402,7 +401,7 @@ class TestTask extends Shell { * and get the plugin path if needed. * * @return string filename the test should be created on - **/ + */ function testCaseFileName($type, $className) { $path = $this->path; if (isset($this->plugin)) { @@ -419,7 +418,7 @@ class TestTask extends Shell { * Show help file. * * @return void - **/ + */ function help() { $this->hr(); $this->out("Usage: cake bake test <type> <class>"); diff --git a/cake/console/libs/tasks/view.php b/cake/console/libs/tasks/view.php index 8be480732..7703bd7da 100644 --- a/cake/console/libs/tasks/view.php +++ b/cake/console/libs/tasks/view.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.tasks * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Controller', 'Controller', false); @@ -113,6 +112,7 @@ class ViewTask extends Shell { $this->controllerName = Inflector::camelize($this->args[0]); $this->controllerPath = Inflector::underscore($this->controllerName); + $this->Project->interactive = false; if (strtolower($this->args[0]) == 'all') { return $this->all(); } @@ -145,7 +145,7 @@ class ViewTask extends Shell { * Get a list of actions that can / should have views baked for them. * * @return array Array of action names that should be baked - **/ + */ function _methodsToBake() { $methods = array_diff( array_map('strtolower', get_class_methods($this->controllerName . 'Controller')), @@ -177,7 +177,7 @@ class ViewTask extends Shell { * Bake All views for All controllers. * * @return void - **/ + */ function all() { $this->Controller->interactive = false; $tables = $this->Controller->listAll($this->connection, false); @@ -309,7 +309,7 @@ class ViewTask extends Shell { * * @param array $actions Array of actions to make files for. * @return void - **/ + */ function bakeActions($actions, $vars) { foreach ($actions as $action) { $content = $this->getContent($action, $vars); @@ -321,7 +321,7 @@ class ViewTask extends Shell { * handle creation of baking a custom action view file * * @return void - **/ + */ function customAction() { $action = ''; while ($action == '') { @@ -461,7 +461,7 @@ class ViewTask extends Shell { * @return array $associations * @access private */ - function __associations($model) { + function __associations(&$model) { $keys = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); $associations = array(); diff --git a/cake/console/libs/templates/skel/views/layouts/xml/default.ctp b/cake/console/libs/templates/skel/views/layouts/xml/default.ctp deleted file mode 100644 index 566ca2158..000000000 --- a/cake/console/libs/templates/skel/views/layouts/xml/default.ctp +++ /dev/null @@ -1,2 +0,0 @@ -<?php echo $xml->header(); ?> -<?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/cake/console/libs/testsuite.php b/cake/console/libs/testsuite.php index 853d961f8..d2856e84d 100644 --- a/cake/console/libs/testsuite.php +++ b/cake/console/libs/testsuite.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Suite Shell * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestSuiteShell extends Shell { diff --git a/cake/console/templates/default/classes/controller.ctp b/cake/console/templates/default/classes/controller.ctp index da04723b6..392a73851 100644 --- a/cake/console/templates/default/classes/controller.ctp +++ b/cake/console/templates/default/classes/controller.ctp @@ -29,7 +29,6 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App var $scaffold; <?php else: ?> <?php - echo "\tvar \$helpers = array('Html', 'Form'"; if (count($helpers)): foreach ($helpers as $help): diff --git a/cake/console/templates/default/classes/model.ctp b/cake/console/templates/default/classes/model.ctp index 7ca0c8c80..a1a70a390 100644 --- a/cake/console/templates/default/classes/model.ctp +++ b/cake/console/templates/default/classes/model.ctp @@ -52,7 +52,6 @@ endif; ?> //The Associations below have been created with all possible keys, those that are not needed can be removed <?php - foreach (array('hasOne', 'belongsTo') as $assocType): if (!empty($associations[$assocType])): $typeCount = count($associations[$assocType]); diff --git a/cake/console/templates/default/views/form.ctp b/cake/console/templates/default/views/form.ctp index c48f42ca3..8095f6478 100644 --- a/cake/console/templates/default/views/form.ctp +++ b/cake/console/templates/default/views/form.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views * @since CakePHP(tm) v 1.2.0.5234 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> form"> @@ -30,7 +24,7 @@ <?php echo "\t<?php\n"; foreach ($fields as $field) { - if ($action == 'add' && $field == $primaryKey) { + if (substr($action, 'add') !== false && $field == $primaryKey) { continue; } elseif (!in_array($field, array('created', 'modified', 'updated'))) { echo "\t\techo \$this->Form->input('{$field}');\n"; diff --git a/cake/console/templates/default/views/index.ctp b/cake/console/templates/default/views/index.ctp index 21d4d549c..a539c57e5 100644 --- a/cake/console/templates/default/views/index.ctp +++ b/cake/console/templates/default/views/index.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views * @since CakePHP(tm) v 1.2.0.5234 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> index"> diff --git a/cake/console/templates/default/views/view.ctp b/cake/console/templates/default/views/view.ctp index 7216ceef6..cc118e726 100644 --- a/cake/console/templates/default/views/view.ctp +++ b/cake/console/templates/default/views/view.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views * @since CakePHP(tm) v 1.2.0.5234 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> view"> diff --git a/cake/console/templates/skel/app_controller.php b/cake/console/templates/skel/app_controller.php index 96c7ac334..a8e672d75 100644 --- a/cake/console/templates/skel/app_controller.php +++ b/cake/console/templates/skel/app_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/app_helper.php b/cake/console/templates/skel/app_helper.php index 66762cb58..ae5ba21b4 100644 --- a/cake/console/templates/skel/app_helper.php +++ b/cake/console/templates/skel/app_helper.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Helper', false); diff --git a/cake/console/templates/skel/app_model.php b/cake/console/templates/skel/app_model.php index 80938823f..482bf7a8e 100644 --- a/cake/console/templates/skel/app_model.php +++ b/cake/console/templates/skel/app_model.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Application model for Cake. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/config/acl.ini.php b/cake/console/templates/skel/config/acl.ini.php index d124b27f3..2365a54aa 100644 --- a/cake/console/templates/skel/config/acl.ini.php +++ b/cake/console/templates/skel/config/acl.ini.php @@ -1,4 +1,4 @@ -;<?php die() ?> +;<?php exit() ?> ; SVN FILE: $Id$ ;/** ; * Short description for file. @@ -6,22 +6,18 @@ ; * ; * PHP versions 4 and 5 ; * -; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/ -; * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) +; * CakePHP(tm) : Rapid Development Framework http://cakephp.org/ +; * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * ; * Licensed under The MIT License ; * Redistributions of files must retain the above copyright notice. ; * -; * @filesource -; * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) -; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +; * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @link http://cakephp.org CakePHP(tm) Project ; * @package cake ; * @subpackage cake.app.config ; * @since CakePHP(tm) v 0.10.0.1076 -; * @version $Revision$ -; * @modifiedby $LastChangedBy$ -; * @lastmodified $Date$ -; * @license http://www.opensource.org/licenses/mit-license.php The MIT License +; * @license MIT License (http://www.opensource.org/licenses/mit-license.php) ; */ ; acl.ini.php - Cake ACL Configuration diff --git a/cake/console/templates/skel/config/bootstrap.php b/cake/console/templates/skel/config/bootstrap.php index d0dcb91e5..59423e767 100644 --- a/cake/console/templates/skel/config/bootstrap.php +++ b/cake/console/templates/skel/config/bootstrap.php @@ -8,17 +8,17 @@ * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.10.8.2117 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/config/core.php b/cake/console/templates/skel/config/core.php index 483c5d805..ca6fba4b1 100644 --- a/cake/console/templates/skel/config/core.php +++ b/cake/console/templates/skel/config/core.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * This is core configuration file. * @@ -7,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/config/database.php.default b/cake/console/templates/skel/config/database.php.default index 5c20804d4..3adb1e113 100644 --- a/cake/console/templates/skel/config/database.php.default +++ b/cake/console/templates/skel/config/database.php.default @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * This is core configuration file. * @@ -7,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * In this file you set up your database connection details. diff --git a/cake/console/templates/skel/config/inflections.php b/cake/console/templates/skel/config/inflections.php index 69857fe89..51e45bef3 100644 --- a/cake/console/templates/skel/config/inflections.php +++ b/cake/console/templates/skel/config/inflections.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Custom Inflected Words. * @@ -9,22 +7,18 @@ * * PHP versions 4 and % * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 1.0.0.2312 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/config/routes.php b/cake/console/templates/skel/config/routes.php index 77168cb45..29c80e31b 100644 --- a/cake/console/templates/skel/config/routes.php +++ b/cake/console/templates/skel/config/routes.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -10,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/config/sql/db_acl.php b/cake/console/templates/skel/config/sql/db_acl.php index 99fe1d64e..f08298322 100644 --- a/cake/console/templates/skel/config/sql/db_acl.php +++ b/cake/console/templates/skel/config/sql/db_acl.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/ /** @@ -10,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* diff --git a/cake/console/templates/skel/config/sql/db_acl.sql b/cake/console/templates/skel/config/sql/db_acl.sql index 3b8089bc3..9851d0bac 100644 --- a/cake/console/templates/skel/config/sql/db_acl.sql +++ b/cake/console/templates/skel/config/sql/db_acl.sql @@ -1,10 +1,10 @@ # $Id$ # -# Copyright 2005-2008, Cake Software Foundation, Inc. +# Copyright 2005-2009, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. -# http://www.opensource.org/licenses/mit-license.php The MIT License +# MIT License (http://www.opensource.org/licenses/mit-license.php) CREATE TABLE acos ( id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, diff --git a/cake/console/templates/skel/config/sql/i18n.php b/cake/console/templates/skel/config/sql/i18n.php index 83f274d81..bc2bfb905 100644 --- a/cake/console/templates/skel/config/sql/i18n.php +++ b/cake/console/templates/skel/config/sql/i18n.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/ /** @@ -10,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* diff --git a/cake/console/templates/skel/config/sql/i18n.sql b/cake/console/templates/skel/config/sql/i18n.sql index 7629b609a..d031ecd17 100644 --- a/cake/console/templates/skel/config/sql/i18n.sql +++ b/cake/console/templates/skel/config/sql/i18n.sql @@ -1,10 +1,10 @@ # $Id$ # -# Copyright 2005-2008, Cake Software Foundation, Inc. +# Copyright 2005-2009, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. -# http://www.opensource.org/licenses/mit-license.php The MIT License +# MIT License (http://www.opensource.org/licenses/mit-license.php) CREATE TABLE i18n ( id int(10) NOT NULL auto_increment, diff --git a/cake/console/templates/skel/config/sql/sessions.php b/cake/console/templates/skel/config/sql/sessions.php index 37582f7cd..b92391f96 100644 --- a/cake/console/templates/skel/config/sql/sessions.php +++ b/cake/console/templates/skel/config/sql/sessions.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/ /** @@ -10,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* diff --git a/cake/console/templates/skel/config/sql/sessions.sql b/cake/console/templates/skel/config/sql/sessions.sql index 75be419a1..8474601f2 100644 --- a/cake/console/templates/skel/config/sql/sessions.sql +++ b/cake/console/templates/skel/config/sql/sessions.sql @@ -1,12 +1,12 @@ # $Id$ # -# Copyright 2005-2008, Cake Software Foundation, Inc. +# Copyright 2005-2009, 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. -# http://www.opensource.org/licenses/mit-license.php The MIT License +# MIT License (http://www.opensource.org/licenses/mit-license.php) CREATE TABLE cake_sessions ( id varchar(255) NOT NULL default '', diff --git a/cake/console/templates/skel/controllers/pages_controller.php b/cake/console/templates/skel/controllers/pages_controller.php index 04c72218f..c614a0595 100644 --- a/cake/console/templates/skel/controllers/pages_controller.php +++ b/cake/console/templates/skel/controllers/pages_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Static content controller. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -85,7 +79,7 @@ class PagesController extends AppController { $title = Inflector::humanize($path[$count - 1]); } $this->set(compact('page', 'subpage', 'title')); - $this->render(join('/', $path)); + $this->render(implode('/', $path)); } } diff --git a/cake/console/templates/skel/index.php b/cake/console/templates/skel/index.php index a5b65fe05..11438c33b 100644 --- a/cake/console/templates/skel/index.php +++ b/cake/console/templates/skel/index.php @@ -1,25 +1,19 @@ <?php -/* SVN FILE: $Id$ */ - /** * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; ?> \ No newline at end of file diff --git a/cake/console/templates/skel/libs/empty b/cake/console/templates/skel/libs/empty new file mode 100644 index 000000000..e69de29bb diff --git a/cake/console/templates/skel/views/elements/email/html/default.ctp b/cake/console/templates/skel/views/elements/email/html/default.ctp index b6afa3e66..f203aae05 100644 --- a/cake/console/templates/skel/views/elements/email/html/default.ctp +++ b/cake/console/templates/skel/views/elements/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php diff --git a/cake/console/templates/skel/views/elements/email/text/default.ctp b/cake/console/templates/skel/views/elements/email/text/default.ctp index bd5f1aca6..3b1183f71 100644 --- a/cake/console/templates/skel/views/elements/email/text/default.ctp +++ b/cake/console/templates/skel/views/elements/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content; ?> \ No newline at end of file diff --git a/cake/console/templates/skel/views/layouts/ajax.ctp b/cake/console/templates/skel/views/layouts/ajax.ctp index 4da27c73a..d49d0986e 100644 --- a/cake/console/templates/skel/views/layouts/ajax.ctp +++ b/cake/console/templates/skel/views/layouts/ajax.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/cake/console/templates/skel/views/layouts/default.ctp b/cake/console/templates/skel/views/layouts/default.ctp index 5d61adc1b..e390b17e7 100644 --- a/cake/console/templates/skel/views/layouts/default.ctp +++ b/cake/console/templates/skel/views/layouts/default.ctp @@ -1,40 +1,34 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.skel.views.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <?php echo $html->charset(); ?> + <?php echo $this->Html->charset(); ?> <title> <?php __('CakePHP: the rapid development php framework:'); ?> <?php echo $title_for_layout; ?> </title> <?php - echo $html->meta('icon'); + echo $this->Html->meta('icon'); - echo $html->css('cake.generic'); + echo $this->Html->css('cake.generic'); echo $scripts_for_layout; ?> @@ -42,18 +36,18 @@ <body> <div id="container"> <div id="header"> - <h1><?php echo $html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); ?></h1> + <h1><?php echo $this->Html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); ?></h1> </div> <div id="content"> - <?php $session->flash(); ?> + <?php echo $this->Session->flash(); ?> <?php echo $content_for_layout; ?> </div> <div id="footer"> - <?php echo $html->link( - $html->image('cake.power.gif', array('alt'=>__("CakePHP: the rapid development php framework", true), 'border'=>"0")), + <?php echo $this->Html->link( + $this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')), 'http://www.cakephp.org/', array('target' => '_blank', 'escape' => false) ); diff --git a/cake/console/templates/skel/views/layouts/email/html/default.ctp b/cake/console/templates/skel/views/layouts/email/html/default.ctp index b596254f2..289ffe908 100644 --- a/cake/console/templates/skel/views/layouts/email/html/default.ctp +++ b/cake/console/templates/skel/views/layouts/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> diff --git a/cake/console/templates/skel/views/layouts/email/text/default.ctp b/cake/console/templates/skel/views/layouts/email/text/default.ctp index bfc1ef552..c3f1a430a 100644 --- a/cake/console/templates/skel/views/layouts/email/text/default.ctp +++ b/cake/console/templates/skel/views/layouts/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> diff --git a/cake/console/templates/skel/views/layouts/flash.ctp b/cake/console/templates/skel/views/layouts/flash.ctp index 9596dae4d..2298a459a 100644 --- a/cake/console/templates/skel/views/layouts/flash.ctp +++ b/cake/console/templates/skel/views/layouts/flash.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> diff --git a/cake/console/templates/skel/webroot/css.php b/cake/console/templates/skel/webroot/css.php index a56bd169d..407eaabbc 100644 --- a/cake/console/templates/skel/webroot/css.php +++ b/cake/console/templates/skel/webroot/css.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { header('HTTP/1.1 404 Not Found'); @@ -70,7 +64,7 @@ if (!class_exists('File')) { } if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { - die('Wrong file name.'); + exit('Wrong file name.'); } $filename = 'css/' . $regs[1]; @@ -78,7 +72,7 @@ if (!class_exists('File')) { $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); if (!file_exists($filepath)) { - die('Wrong file name.'); + exit('Wrong file name.'); } if (file_exists($cachepath)) { diff --git a/cake/console/templates/skel/webroot/css/cake.generic.css b/cake/console/templates/skel/webroot/css/cake.generic.css index 5042adfbb..4fe85cded 100644 --- a/cake/console/templates/skel/webroot/css/cake.generic.css +++ b/cake/console/templates/skel/webroot/css/cake.generic.css @@ -1,24 +1,19 @@ -/* SVN FILE: $Id$ */ /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot.css * @since CakePHP(tm) - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/cake/console/templates/skel/webroot/index.php b/cake/console/templates/skel/webroot/index.php index 6c8cecdd9..a3c5a246e 100644 --- a/cake/console/templates/skel/webroot/index.php +++ b/cake/console/templates/skel/webroot/index.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.webroot * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/console/templates/skel/webroot/test.php b/cake/console/templates/skel/webroot/test.php index e7f726d14..d7e0f8516 100644 --- a/cake/console/templates/skel/webroot/test.php +++ b/cake/console/templates/skel/webroot/test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs @@ -91,7 +90,7 @@ if (isset($corePath[0])) { require_once CAKE_TESTS_LIB . 'test_manager.php'; if (Configure::read('debug') < 1) { - die(__('Debug setting does not allow access to this url.', true)); + exit(__('Debug setting does not allow access to this url.', true)); } if (!isset($_SERVER['SERVER_NAME'])) { diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 4aa7429e2..1702ec5f4 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Dispatcher takes the URL information, parses it for paramters and * tells the involved controllers what to do. @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -148,13 +142,13 @@ class Dispatcher extends Object { ))); } - $privateAction = (bool)(strpos($this->params['action'], '_', 0) === 0); + $privateAction = $this->params['action'][0] === '_'; $prefixes = Router::prefixes(); if (!empty($prefixes)) { if (isset($this->params['prefix'])) { $this->params['action'] = $this->params['prefix'] . '_' . $this->params['action']; - } elseif (strpos($this->params['action'], '_') !== false && !$privateAction) { + } elseif (strpos($this->params['action'], '_') > 0) { list($prefix, $action) = explode('_', $this->params['action']); $privateAction = in_array($prefix, $prefixes); } @@ -286,7 +280,7 @@ class Dispatcher extends Object { $params['form']['_method'] = env('HTTP_X_HTTP_METHOD_OVERRIDE'); } if (isset($params['form']['_method'])) { - if (isset($_SERVER) && !empty($_SERVER)) { + if (!empty($_SERVER)) { $_SERVER['REQUEST_METHOD'] = $params['form']['_method']; } else { $_ENV['REQUEST_METHOD'] = $params['form']['_method']; @@ -383,9 +377,6 @@ class Dispatcher extends Object { $this->webroot = $base .'/'; return $base; } - $file = null; - - if ($baseUrl) { $file = '/' . basename($baseUrl); $base = dirname($baseUrl); @@ -401,8 +392,6 @@ class Dispatcher extends Object { $this->webroot .= $webroot . '/'; } return $base . $file; - } - return false; } /** @@ -535,7 +524,7 @@ class Dispatcher extends Object { if (key($_GET) && strpos(key($_GET), '?') !== false) { unset($_GET[key($_GET)]); } - $uri = preg_split('/\?/', $uri, 2); + $uri = explode('?', $uri, 2); if (isset($uri[1])) { parse_str($uri[1], $_GET); @@ -611,7 +600,7 @@ class Dispatcher extends Object { * @access public */ function cached($url) { - if (strpos($url, 'css/') !== false || strpos($url, 'js/') !== false || strpos($url, 'img/') !== false) { + if (strpos($url, '..') === false && strpos($url, '.')) { if (strpos($url, 'ccss/') === 0) { include WWW_ROOT . DS . Configure::read('Asset.filter.css'); $this->_stop(); @@ -619,23 +608,19 @@ class Dispatcher extends Object { include WWW_ROOT . DS . Configure::read('Asset.filter.js'); $this->_stop(); } - $isAsset = false; - $assets = array('js' => 'text/javascript', 'css' => 'text/css', 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'png' => 'image/png'); + App::import('View', 'Media', false); + $Media = new MediaView(); $ext = array_pop(explode('.', $url)); - - foreach ($assets as $type => $contentType) { - if ($type === $ext) { - if ($type === 'css' || $type === 'js') { - $pos = strpos($url, $type . '/'); - } else { - $pos = strpos($url, 'img/'); - } - $isAsset = true; - break; + + if (isset($Media->mimeType[$ext])) { + $parts = explode('/', $url); + if ($parts[0] === 'css' || $parts[0] === 'js' || $parts[0] === 'img') { + $pos = 0; + } elseif ($parts[0] === 'theme') { + $pos = strlen($parts[0] . $parts[1]) + 1; + } elseif (count($parts) > 2) { + $pos = strlen($parts[0]); } - } - - if ($isAsset === true) { $ob = @ini_get("zlib.output_compression") !== '1' && extension_loaded("zlib") && (strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false); if ($ob && Configure::read('Asset.compress')) { @@ -644,29 +629,49 @@ class Dispatcher extends Object { } $assetFile = null; $paths = array(); + $matched = false; if ($pos > 0) { - $plugin = substr($url, 0, $pos - 1); + $plugin = substr($url, 0, $pos); $url = preg_replace('/^' . preg_quote($plugin, '/') . '\//i', '', $url); - $paths[] = App::pluginPath($plugin) . 'vendors' . DS; - } - $paths = array_merge($paths, App::path('vendors')); - foreach ($paths as $path) { - if (is_file($path . $url) && file_exists($path . $url)) { - $assetFile = $path . $url; - break; + if (strpos($plugin, '/') !== false) { + list($plugin, $theme) = explode('/', $plugin); + $themePaths = App::path('views'); + + foreach ($themePaths as $viewPath) { + $path = $viewPath . 'themed' . DS . $theme . DS . 'webroot' . DS; + + if ($plugin === 'theme' && (is_file($path . $url) && file_exists($path . $url))) { + $assetFile = $path . $url; + $matched = true; + break; + } + } + } + + if ($matched === false) { + $paths[] = App::pluginPath($plugin) . 'webroot' . DS; + } + } + + if ($matched === false) { + foreach ($paths as $path) { + if (is_file($path . $url) && file_exists($path . $url)) { + $assetFile = $path . $url; + break; + } } } if ($assetFile !== null) { $fileModified = filemtime($assetFile); header("Date: " . date("D, j M Y G:i:s ", $fileModified) . 'GMT'); - header('Content-type: ' . $assets[$type]); + header('Content-type: ' . $Media->mimeType[$ext]); header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT"); header("Cache-Control: cache"); header("Pragma: cache"); - if ($type === 'css' || $type === 'js') { + if ($ext === 'css' || $ext === 'js') { include($assetFile); } else { readfile($assetFile); diff --git a/cake/libs/cache.php b/cake/libs/cache.php index 28d80cf7b..8c54bbf66 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -1,28 +1,22 @@ <?php -/* SVN FILE: $Id$ */ - /** * Caching for CakePHP. * * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0.4933 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -31,18 +25,12 @@ * @package cake * @subpackage cake.cake.libs */ -class Cache extends Object { - -/** - * Cache engine to use - * - * @var CacheEngine - * @access protected - */ - var $_Engine = null; +class Cache { /** * Cache configuration stack + * Keeps the permanent/default settings for each cache engine. + * These settings are used to reset the engines after temporary modification. * * @var array * @access private @@ -50,7 +38,7 @@ class Cache extends Object { var $__config = array(); /** - * Holds name of the current configuration being used + * Holds name of the current configuration name being used. * * @var array * @access private @@ -58,13 +46,20 @@ class Cache extends Object { var $__name = 'default'; /** - * whether to reset the settings with the next call to self::set(); + * Whether to reset the settings with the next call to Cache::set(); * * @var array * @access private */ var $__reset = false; +/** + * Engine instances keyed by configuration name. + * + * @var array + */ + var $_engines = array(); + /** * Returns a singleton instance * @@ -81,21 +76,18 @@ class Cache extends Object { } /** - * Tries to find and include a file for a cache engine and returns object instance + * Set the cache configuration to use. config() can + * both create new configurations, return the settings for already configured + * configurations. It also sets the 'default' configuration to use for subsequent + * operations. * - * @param $name Name of the engine (without 'Engine') - * @return mixed $engine object or null - * @access private - */ - function __loadEngine($name) { - if (!class_exists($name . 'Engine')) { - require LIBS . DS . 'cache' . DS . strtolower($name) . '.php'; - } - return true; - } - -/** - * Set the cache configuration to use + * To create a new configuration: + * + * `Cache::config('my_config', array('engine' => 'File', 'path' => TMP));` + * + * To get the settings for a configuration, and set it as the currently selected configuration + * + * `Cache::config('default');` * * @see app/config/core.php for configuration settings * @param string $name Name of the configuration @@ -105,72 +97,113 @@ class Cache extends Object { * @static */ function config($name = null, $settings = array()) { - $_this =& Cache::getInstance(); + $self =& Cache::getInstance(); if (is_array($name)) { $settings = $name; } if ($name === null || !is_string($name)) { - $name = $_this->__name; + $name = $self->__name; } $current = array(); - if (isset($_this->__config[$name])) { - $current = $_this->__config[$name]; + if (isset($self->__config[$name])) { + $current = $self->__config[$name]; } if (!empty($settings)) { - $_this->__name = null; - $_this->__config[$name] = array_merge($current, $settings); + $self->__config[$name] = array_merge($current, $settings); } - if (empty($_this->__config[$name]['engine'])) { + if (empty($self->__config[$name]['engine'])) { return false; } - $_this->__name = $name; - $engine = $_this->__config[$name]['engine']; + $self->__name = $name; + $engine = $self->__config[$name]['engine']; - if (!$_this->isInitialized($engine)) { - if ($_this->engine($engine, $_this->__config[$name]) === false) { - return false; - } - $settings = $_this->__config[$name] = $_this->settings($engine); - } else if ($settings = $_this->set($_this->__config[$name])) { - $_this->__config[$name] = $settings; + if (!isset($self->_engines[$name])) { + $self->_buildEngine($name); + $settings = $self->__config[$name] = $self->settings($name); + } elseif ($settings = $self->set($self->__config[$name])) { + $self->__config[$name] = $settings; } return compact('engine', 'settings'); } /** - * Set the cache engine to use or modify settings for one instance + * Finds and builds the instance of the required engine class. * - * @param string $name Name of the engine (without 'Engine') - * @param array $settings Optional associative array of settings passed to the engine - * @return boolean True on success, false on failure - * @access public - * @static + * @param string $name Name of the config array that needs an engine instance built + * @return void + * @access protected */ - function engine($name = 'File', $settings = array()) { - $cacheClass = $name . 'Engine'; - $_this =& Cache::getInstance(); - if (!isset($_this->_Engine[$name])) { - if ($_this->__loadEngine($name) === false) { - return false; - } - $_this->_Engine[$name] =& new $cacheClass(); - } + function _buildEngine($name) { + $config = $this->__config[$name]; - if ($_this->_Engine[$name]->init($settings)) { - if (time() % $_this->_Engine[$name]->settings['probability'] === 0) { - $_this->_Engine[$name]->gc(); + list($plugin, $class) = pluginSplit($config['engine']); + $cacheClass = $class . 'Engine'; + if (!class_exists($cacheClass) && $this->__loadEngine($class, $plugin) === false) { + return false; + } + $cacheClass = $class . 'Engine'; + $this->_engines[$name] =& new $cacheClass(); + if ($this->_engines[$name]->init($config)) { + if (time() % $this->_engines[$name]->settings['probability'] === 0) { + $this->_engines[$name]->gc(); } return true; } - $_this->_Engine[$name] = null; return false; } +/** + * Returns an array containing the currently configured Cache settings. + * + * @return array + */ + function configured() { + $self = Cache::getInstance(); + return array_keys($self->__config); + } + +/** + * Drops a cache engine. Deletes the cache configuration information + * If the deleted configuration is the last configuration using an certain engine, + * the Engine instance is also unset. + * + * @param string $name A currently configured cache config you wish to remove. + * @return boolen success of the removal, returns false when the config does not exist. + */ + function drop($name) { + $self = Cache::getInstance(); + if (!isset($self->__config[$name])) { + return false; + } + unset($self->__config[$name]); + unset($self->_engines[$name]); + return true; + } + +/** + * Tries to find and include a file for a cache engine and returns object instance + * + * @param $name Name of the engine (without 'Engine') + * @return mixed $engine object or null + * @access private + */ + function __loadEngine($name, $plugin = null) { + if ($plugin) { + return App::import('Lib', $plugin . '.cache' . DS . $name, false); + } else { + $app = App::import('Lib', 'cache' . DS . $name, false); + if (!$app) { + require LIBS . 'cache' . DS . strtolower($name) . '.php'; + } + return true; + } + } + /** * Temporarily change settings to current config options. if no params are passed, resets settings if needed * Cache::write() will reset the configuration changes made @@ -182,30 +215,32 @@ class Cache extends Object { * @static */ function set($settings = array(), $value = null) { - $_this =& Cache::getInstance(); - if (!isset($_this->__config[$_this->__name])) { + $self =& Cache::getInstance(); + if (!isset($self->__config[$self->__name])) { return false; } - $engine = $_this->__config[$_this->__name]['engine']; + $name = $self->__name; if (!empty($settings)) { - $_this->__reset = true; + $self->__reset = true; } - if ($_this->__reset === true) { + if ($self->__reset === true) { if (empty($settings)) { - $_this->__reset = false; - $settings = $_this->__config[$_this->__name]; + $self->__reset = false; + $settings = $self->__config[$name]; } else { if (is_string($settings) && $value !== null) { $settings = array($settings => $value); } - $settings = array_merge($_this->__config[$_this->__name], $settings); + $settings = array_merge($self->__config[$self->__name], $settings); + if (isset($settings['duration']) && !is_numeric($settings['duration'])) { + $settings['duration'] = strtotime($settings['duration']) - time(); + } } - $_this->engine($engine, $settings); + $self->_engines[$name]->settings = $settings; } - - return $_this->settings($engine); + return $self->settings($name); } /** @@ -218,9 +253,8 @@ class Cache extends Object { * @static */ function gc() { - $_this =& Cache::getInstance(); - $config = $_this->config(); - $_this->_Engine[$config['engine']]->gc(); + $self =& Cache::getInstance(); + $self->_engines[$self->__name]->gc(); } /** @@ -234,43 +268,27 @@ class Cache extends Object { * @static */ function write($key, $value, $config = null) { - $_this =& Cache::getInstance(); + $self =& Cache::getInstance(); - if (is_array($config)) { - extract($config); - } else if ($config && (is_numeric($config) || is_numeric($config[0]) || (isset($config[1]) && is_numeric($config[1])))) { - $config = null; - } - - if ($config && isset($_this->__config[$config])) { - $settings = $_this->set($_this->__config[$config]); - } else { - $settings = $_this->settings(); + if (!$config) { + $config = $self->__name; } + $settings = $self->settings($config); if (empty($settings)) { return null; } - extract($settings); + if (!$self->isInitialized($config)) { + return false; + } + $key = $self->_engines[$config]->key($key); - if (!$_this->isInitialized($engine)) { + if (!$key || is_resource($value) || $settings['duration'] < 1) { return false; } - if (!$key = $_this->_Engine[$engine]->key($key)) { - return false; - } - - if (is_resource($value)) { - return false; - } - - if ($duration < 1) { - return false; - } - - $success = $_this->_Engine[$engine]->write($settings['prefix'] . $key, $value, $duration); - $settings = $_this->set(); + $success = $self->_engines[$config]->write($settings['prefix'] . $key, $value, $settings['duration']); + $self->set(); return $success; } @@ -284,29 +302,27 @@ class Cache extends Object { * @static */ function read($key, $config = null) { - $_this =& Cache::getInstance(); + $self =& Cache::getInstance(); - if (isset($_this->__config[$config])) { - $settings = $_this->set($_this->__config[$config]); - } else { - $settings = $_this->settings(); + if (!$config) { + $config = $self->__name; } + $settings = $self->settings($config); if (empty($settings)) { return null; } - extract($settings); - - if (!$_this->isInitialized($engine)) { + if (!$self->isInitialized($config)) { return false; } - if (!$key = $_this->_Engine[$engine]->key($key)) { + $key = $self->_engines[$config]->key($key); + if (!$key) { return false; } - $success = $_this->_Engine[$engine]->read($settings['prefix'] . $key); + $success = $self->_engines[$config]->read($settings['prefix'] . $key); - if ($config !== null && $config !== $_this->__name) { - $settings = $_this->set(); + if ($config !== null && $config !== $self->__name) { + $self->set(); } return $success; } @@ -321,28 +337,25 @@ class Cache extends Object { * @static */ function delete($key, $config = null) { - $_this =& Cache::getInstance(); - if (isset($_this->__config[$config])) { - $settings = $_this->set($_this->__config[$config]); - } else { - $settings = $_this->settings(); + $self =& Cache::getInstance(); + if (!$config) { + $config = $self->__name; } + $settings = $self->settings($config); if (empty($settings)) { return null; } - extract($settings); - - if (!$_this->isInitialized($engine)) { + if (!$self->isInitialized($config)) { + return false; + } + $key = $self->_engines[$config]->key($key); + if (!$key) { return false; } - if (!$key = $_this->_Engine[$engine]->key($key)) { - return false; - } - - $success = $_this->_Engine[$engine]->delete($settings['prefix'] . $key); - $settings = $_this->set(); + $success = $self->_engines[$config]->delete($settings['prefix'] . $key); + $self->set(); return $success; } @@ -356,28 +369,26 @@ class Cache extends Object { * @static */ function clear($check = false, $config = null) { - $_this =& Cache::getInstance(); - if (isset($_this->__config[$config])) { - $settings = $_this->set($_this->__config[$config]); - } else { - $settings = $_this->settings(); + $self =& Cache::getInstance(); + if (!$config) { + $config = $self->__name; } + $settings = $self->settings($config); if (empty($settings)) { return null; } - extract($settings); - if (isset($engine) && !$_this->isInitialized($engine)) { + if (!$self->isInitialized($config)) { return false; } - $success = $_this->_Engine[$engine]->clear($check); - $settings = $_this->set(); + $success = $self->_engines[$config]->clear($check); + $self->set(); return $success; } /** - * Check if Cache has initialized a working storage engine + * Check if Cache has initialized a working config for the given name. * * @param string $engine Name of the engine * @param string $config Name of the configuration setting @@ -385,33 +396,35 @@ class Cache extends Object { * @access public * @static */ - function isInitialized($engine = null) { + function isInitialized($name = null) { if (Configure::read('Cache.disable')) { return false; } - $_this =& Cache::getInstance(); - if (!$engine && isset($_this->__config[$_this->__name]['engine'])) { - $engine = $_this->__config[$_this->__name]['engine']; + $self =& Cache::getInstance(); + if (!$name && isset($self->__config[$self->__name])) { + $name = $self->__name; } - return isset($_this->_Engine[$engine]); + return isset($self->_engines[$name]); } /** - * Return the settings for current cache engine + * Return the settings for current cache engine. If no name is supplied the settings + * for the 'active default' configuration will be returned. To set the 'active default' + * configuration use `Cache::config()` * - * @param string $engine Name of the engine + * @param string $engine Name of the configuration to get settings for. * @return array list of settings for this engine + * @see Cache::config() * @access public * @static */ - function settings($engine = null) { - $_this =& Cache::getInstance(); - if (!$engine && isset($_this->__config[$_this->__name]['engine'])) { - $engine = $_this->__config[$_this->__name]['engine']; + function settings($name = null) { + $self =& Cache::getInstance(); + if (!$name && isset($self->__config[$self->__name])) { + $name = $self->__name; } - - if (isset($_this->_Engine[$engine]) && !is_null($_this->_Engine[$engine])) { - return $_this->_Engine[$engine]->settings(); + if (!empty($self->_engines[$name])) { + return $self->_engines[$name]->settings(); } return array(); } @@ -423,7 +436,7 @@ class Cache extends Object { * @package cake * @subpackage cake.cake.libs */ -class CacheEngine extends Object { +class CacheEngine { /** * settings of current engine instance @@ -434,7 +447,7 @@ class CacheEngine extends Object { var $settings = array(); /** - * Iitialize the cache engine + * Initialize the cache engine * * Called automatically by the cache frontend * diff --git a/cake/libs/cache/apc.php b/cake/libs/cache/apc.php index 74725455b..acf438f32 100644 --- a/cake/libs/cache/apc.php +++ b/cake/libs/cache/apc.php @@ -1,28 +1,22 @@ <?php -/* SVN FILE: $Id$ */ - /** * APC storage engine for cache. * * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache * @since CakePHP(tm) v 1.2.0.4933 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/cache/file.php b/cake/libs/cache/file.php index 308924892..957b10e7b 100644 --- a/cake/libs/cache/file.php +++ b/cake/libs/cache/file.php @@ -1,28 +1,22 @@ <?php -/* SVN FILE: $Id$ */ - /** * File Storage engine for cache * * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache * @since CakePHP(tm) v 1.2.0.4933 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -43,11 +37,12 @@ class FileEngine extends CacheEngine { var $__File = null; /** - * settings - * path = absolute path to cache directory, default => CACHE - * prefix = string prefix for filename, default => cake_ - * lock = enable file locking on write, default => false - * serialize = serialize the data, default => true + * Settings + * + * - path = absolute path to cache directory, default => CACHE + * - prefix = string prefix for filename, default => cake_ + * - lock = enable file locking on write, default => false + * - serialize = serialize the data, default => true * * @var array * @see CacheEngine::__defaults diff --git a/cake/libs/cache/memcache.php b/cake/libs/cache/memcache.php index 3623f9a87..485270339 100644 --- a/cake/libs/cache/memcache.php +++ b/cake/libs/cache/memcache.php @@ -1,28 +1,22 @@ <?php -/* SVN FILE: $Id$ */ - /** * Memcache storage engine for cache * * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache * @since CakePHP(tm) v 1.2.0.4933 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -42,9 +36,11 @@ class MemcacheEngine extends CacheEngine { var $__Memcache = null; /** - * settings - * servers = string or array of memcache servers, default => 127.0.0.1 - * compress = boolean, default => false + * Settings + * + * - servers = string or array of memcache servers, default => 127.0.0.1. If an + * array MemcacheEngine will use them as a pool. + * - compress = boolean, default => false * * @var array * @access public @@ -66,7 +62,10 @@ class MemcacheEngine extends CacheEngine { return false; } parent::init(array_merge(array( - 'engine'=> 'Memcache', 'prefix' => Inflector::slug(APP_DIR) . '_', 'servers' => array('127.0.0.1'), 'compress'=> false + 'engine'=> 'Memcache', + 'prefix' => Inflector::slug(APP_DIR) . '_', + 'servers' => array('127.0.0.1'), + 'compress'=> false ), $settings) ); @@ -106,7 +105,7 @@ class MemcacheEngine extends CacheEngine { */ function write($key, &$value, $duration) { $expires = time() + $duration; - $this->__Memcache->set($key.'_expires', $expires, $this->settings['compress'], $expires); + $this->__Memcache->set($key . '_expires', $expires, $this->settings['compress'], $expires); return $this->__Memcache->set($key, $value, $this->settings['compress'], $expires); } @@ -119,7 +118,7 @@ class MemcacheEngine extends CacheEngine { */ function read($key) { $time = time(); - $cachetime = intval($this->__Memcache->get($key.'_expires')); + $cachetime = intval($this->__Memcache->get($key . '_expires')); if ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime) { return false; } diff --git a/cake/libs/cache/xcache.php b/cake/libs/cache/xcache.php index 53701f781..ecdc08260 100644 --- a/cake/libs/cache/xcache.php +++ b/cake/libs/cache/xcache.php @@ -1,28 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Xcache storage engine for cache. * - * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.cache * @since CakePHP(tm) v 1.2.0.4947 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -35,9 +28,10 @@ class XcacheEngine extends CacheEngine { /** - * settings - * PHP_AUTH_USER = xcache.admin.user, default cake - * PHP_AUTH_PW = xcache.admin.password, default cake + * Settings + * + * - PHP_AUTH_USER = xcache.admin.user, default cake + * - PHP_AUTH_PW = xcache.admin.password, default cake * * @var array * @access public @@ -73,7 +67,7 @@ class XcacheEngine extends CacheEngine { */ function write($key, &$value, $duration) { $expires = time() + $duration; - xcache_set($key.'_expires', $expires, $duration); + xcache_set($key . '_expires', $expires, $duration); return xcache_set($key, $value, $duration); } @@ -87,7 +81,7 @@ class XcacheEngine extends CacheEngine { function read($key) { if (xcache_isset($key)) { $time = time(); - $cachetime = intval(xcache_get($key.'_expires')); + $cachetime = intval(xcache_get($key . '_expires')); if ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime) { return false; } diff --git a/cake/libs/cake_log.php b/cake/libs/cake_log.php index a0d556fbb..d0d586775 100644 --- a/cake/libs/cake_log.php +++ b/cake/libs/cake_log.php @@ -6,29 +6,19 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - -/** - * Included libraries. - * - */ - if (!class_exists('File')) { - require LIBS . 'file.php'; - } - /** * Set up error level constants to be used within the framework if they are not defined within the * system. @@ -55,16 +45,131 @@ */ class CakeLog { +/** + * An array of connected streams. + * Each stream represents a callable that will be called when write() is called. + * + * @var array + * @access protected + */ + var $_streams = array(); + +/** + * Get an instance + * + * @return void + * @static + */ + function &getInstance() { + static $instance = array(); + if (!isset($instance[0])) { + $instance[0] = new CakeLog(); + } + return $instance[0]; + } + +/** + * Configure and add a new logging stream to CakeLog + * You can use add loggers from app/libs use app.loggername, or any plugin/libs using plugin.loggername + * + * @param string $key The keyname for this logger, used to revmoe the logger later. + * @param array $config Array of configuration information for the logger + * @return boolean success of configuration. + * @static + */ + function config($key, $config) { + if (empty($config['engine'])) { + trigger_error(__('Missing logger classname', true), E_USER_WARNING); + return false; + } + $self = CakeLog::getInstance(); + $className = $self->_getLogger($config['engine']); + if (!$className) { + return false; + } + unset($config['engine']); + $self->_streams[$key] = new $className($config); + return true; + } + +/** + * Attempts to import a logger class from the various paths it could be on. + * Checks that the logger class implements a write method as well. + * + * @return mixed boolean false on any failures, string of classname to use if search was successful.\ + * @access protected + */ + function _getLogger($loggerName) { + list($plugin, $loggerName) = pluginSplit($loggerName); + + if ($plugin) { + App::import('Lib', $plugin . '.log/' . $loggerName); + } else { + if (!App::import('Lib', 'log/' . $loggerName)) { + App::import('Core', 'log/' . $loggerName); + } + } + if (!class_exists($loggerName)) { + trigger_error(sprintf(__('Could not load logger class %s', true), $loggerName), E_USER_WARNING); + return false; + } + if (!method_exists($loggerName, 'write')) { + trigger_error( + sprintf(__('logger class %s does not implement a write method.', true), $loggerName), + E_USER_WARNING + ); + return false; + } + return $loggerName; + } + +/** + * Returns the keynames of the currently active streams + * + * @return array + * @static + */ + function configured() { + $self = CakeLog::getInstance(); + return array_keys($self->_streams); + } + +/** + * Removes a stream from the active streams. Once a stream has been removed + * it will no longer have messages sent to it. + * + * @param string $keyname Key name of callable to remove. + * @return void + * @static + */ + function drop($streamName) { + $self = CakeLog::getInstance(); + unset($self->_streams[$streamName]); + } + +/** + * Configures the automatic/default stream a FileLog. + * + * @return void + * @access protected + */ + function _autoConfig() { + if (!class_exists('FileLog')) { + App::import('Core', 'log/FileLog'); + } + $this->_streams['default'] = new FileLog(array('path' => LOGS)); + } + /** * Writes given message to a log file in the logs directory. * * @param string $type Type of log, becomes part of the log's filename - * @param string $msg Message to log + * @param string $message Message to log * @return boolean Success * @access public * @static */ - function write($type, $msg) { + function write($type, $message) { if (!defined('LOG_ERROR')) { define('LOG_ERROR', 2); } @@ -83,19 +188,16 @@ class CakeLog { if (is_int($type) && isset($levels[$type])) { $type = $levels[$type]; } - - if ($type == 'error' || $type == 'warning') { - $filename = LOGS . 'error.log'; - } elseif (in_array($type, $levels)) { - $filename = LOGS . 'debug.log'; - } else { - $filename = LOGS . $type . '.log'; + $self = CakeLog::getInstance(); + if (empty($self->_streams)) { + $self->_autoConfig(); } - $output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $msg . "\n"; - $log = new File($filename, true); - if ($log->writable()) { - return $log->append($output); + $keys = array_keys($self->_streams); + foreach ($keys as $key) { + $logger =& $self->_streams[$key]; + $logger->write($type, $message); } + return true; } /** @@ -107,7 +209,7 @@ class CakeLog { * @param integer $line Line that triggered the error * @param array $context Context * @return void - **/ + */ function handleError($code, $description, $file = null, $line = null, $context = null) { if ($code === 2048 || $code === 8192) { return; diff --git a/cake/libs/cake_session.php b/cake/libs/cake_session.php index d118ef431..b3442998d 100644 --- a/cake/libs/cake_session.php +++ b/cake/libs/cake_session.php @@ -9,19 +9,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v .0.10.0.1222 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -213,11 +212,10 @@ class CakeSession extends Object { * @access public */ function check($name) { - $var = $this->__validateKeys($name); - if (empty($var)) { + if (empty($name)) { return false; } - $result = Set::extract($_SESSION, $var); + $result = Set::classicExtract($_SESSION, $name); return isset($result); } @@ -245,7 +243,7 @@ class CakeSession extends Object { * * @return boolean * @deprecated Use CakeSession::delete instead - **/ + */ function del($name) { trigger_error('CakeSession::del() is deprecated, use CakeSession::delete() instead.', E_USER_WARNING); return $this->delete($name); @@ -260,13 +258,11 @@ class CakeSession extends Object { */ function delete($name) { if ($this->check($name)) { - if ($var = $this->__validateKeys($name)) { - if (in_array($var, $this->watchKeys)) { - trigger_error('Deleting session key {' . $var . '}', E_USER_NOTICE); - } - $this->__overwrite($_SESSION, Set::remove($_SESSION, $var)); - return ($this->check($var) == false); + if (in_array($name, $this->watchKeys)) { + trigger_error('Deleting session key {' . $name . '}', E_USER_NOTICE); } + $this->__overwrite($_SESSION, Set::remove($_SESSION, $name)); + return ($this->check($name) == false); } $this->__setError(2, "$name doesn't exist"); return false; @@ -355,7 +351,7 @@ class CakeSession extends Object { if (empty($name)) { return false; } - $result = Set::extract($_SESSION, $name); + $result = Set::classicExtract($_SESSION, $name); if (!is_null($result)) { return $result; @@ -386,7 +382,6 @@ class CakeSession extends Object { * @access public */ function watch($var) { - $var = $this->__validateKeys($var); if (empty($var)) { return false; } @@ -403,7 +398,6 @@ class CakeSession extends Object { * @access public */ function ignore($var) { - $var = $this->__validateKeys($var); if (!in_array($var, $this->watchKeys)) { return; } @@ -425,16 +419,14 @@ class CakeSession extends Object { * @access public */ function write($name, $value) { - $var = $this->__validateKeys($name); - - if (empty($var)) { + if (empty($name)) { return false; } - if (in_array($var, $this->watchKeys)) { - trigger_error('Writing session key {' . $var . '}: ' . Debugger::exportVar($value), E_USER_NOTICE); + if (in_array($name, $this->watchKeys)) { + trigger_error('Writing session key {' . $name . '}: ' . Debugger::exportVar($value), E_USER_NOTICE); } - $this->__overwrite($_SESSION, Set::insert($_SESSION, $var, $value)); - return (Set::extract($_SESSION, $var) === $value); + $this->__overwrite($_SESSION, Set::insert($_SESSION, $name, $value)); + return (Set::classicExtract($_SESSION, $name) === $value); } /** @@ -566,7 +558,7 @@ class CakeSession extends Object { $config = CONFIGS . Configure::read('Session.save') . '.php'; if (is_file($config)) { - require_once ($config); + require($config); } } break; @@ -677,22 +669,6 @@ class CakeSession extends Object { $this->__regenerateId(); } -/** - * Validate that the $name is in correct dot notation - * example: $name = 'ControllerName.key'; - * - * @param string $name Session key names as string. - * @return mixed false is $name is not correct format, or $name if it is correct - * @access private - */ - function __validateKeys($name) { - if (is_string($name) && preg_match("/^[ 0-9a-zA-Z._-]*$/", $name)) { - return $name; - } - $this->__setError(3, "$name is not a string"); - return false; - } - /** * Helper method to set an internal error message. * diff --git a/cake/libs/cake_socket.php b/cake/libs/cake_socket.php index b31efab18..e2d5ebb0e 100644 --- a/cake/libs/cake_socket.php +++ b/cake/libs/cake_socket.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Cake Socket connection class. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Validation'); diff --git a/cake/libs/class_registry.php b/cake/libs/class_registry.php index c0206f2fa..4d9e98f16 100644 --- a/cake/libs/class_registry.php +++ b/cake/libs/class_registry.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Class collections. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.9.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -124,12 +118,12 @@ class ClassRegistry { foreach ($objects as $key => $settings) { if (is_array($settings)) { - $plugin = $pluginPath = null; + $pluginPath = null; $settings = array_merge($defaults, $settings); $class = $settings['class']; - - if (strpos($class, '.') !== false) { - list($plugin, $class) = explode('.', $class); + + list($plugin, $class) = pluginSplit($class); + if ($plugin) { $pluginPath = $plugin . '.'; } diff --git a/cake/libs/configure.php b/cake/libs/configure.php index c30acabaa..b60ba74a0 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.0.0.2363 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -97,11 +91,21 @@ class Configure extends Object { if (strpos($name, '.') === false) { $_this->{$name} = $value; } else { - $names = explode('.', $name, 2); - if (!isset($_this->{$names[0]})) { - $_this->{$names[0]} = array(); + $names = explode('.', $name, 4); + switch (count($names)) { + case 2: + $_this->{$names[0]}[$names[1]] = $value; + break; + case 3: + $_this->{$names[0]}[$names[1]][$names[2]] = $value; + case 4: + $names = explode('.', $name, 2); + if (!isset($_this->{$names[0]})) { + $_this->{$names[0]} = array(); + } + $_this->{$names[0]} = Set::insert($_this->{$names[0]}, $names[1], $value); + break; } - $_this->{$names[0]} = Set::insert($_this->{$names[0]}, $names[1], $value); } } @@ -136,12 +140,14 @@ class Configure extends Object { /** * Used to read information stored in the Configure instance. * - * Usage + * Usage: + * {{{ * Configure::read('Name'); will return all values for Name * Configure::read('Name.key'); will return only the value of Configure::Name[key] + * }}} * - * @link http://book.cakephp.org/view/413/read - * @param string $var Variable to obtain + * @link http://book.cakephp.org/view/413/read + * @param string $var Variable to obtain. Use '.' to access array elements. * @return string value of Configure::$var * @access public */ @@ -153,28 +159,44 @@ class Configure extends Object { } if (strpos($var, '.') !== false) { - $names = explode('.', $var, 2); + $names = explode('.', $var, 3); $var = $names[0]; } if (!isset($_this->{$var})) { return null; } - - if (!empty($names[1])) { - return Set::extract($_this->{$var}, $names[1]); + if (!isset($names[1])) { + return $_this->{$var}; } - - return $_this->{$var}; + switch (count($names)) { + case 2: + if (isset($_this->{$var}[$names[1]])) { + return $_this->{$var}[$names[1]]; + } + break; + case 3: + if (isset($_this->{$var}[$names[1]][$names[2]])) { + return $_this->{$var}[$names[1]][$names[2]]; + } + if (!isset($_this->{$var}[$names[1]])) { + return null; + } + return Set::classicExtract($_this->{$var}[$names[1]], $names[2]); + break; + } + return null; } /** * Used to delete a variable from the Configure instance. * * Usage: + * {{{ * Configure::delete('Name'); will delete the entire Configure::Name * Configure::delete('Name.key'); will delete only the Configure::Name[key] + * }}} * - * @link http://book.cakephp.org/view/414/delete + * @link http://book.cakephp.org/view/414/delete * @param string $var the var to be deleted * @return void * @access public @@ -194,32 +216,44 @@ class Configure extends Object { /** * Loads a file from app/config/configure_file.php. * Config file variables should be formated like: - * $config['name'] = 'value'; - * These will be used to create dynamic Configure vars. + * `$config['name'] = 'value';` + * These will be used to create dynamic Configure vars. load() is also used to + * load stored config files created with Configure::store() * - * Usage Configure::load('configure_file'); + * - To load config files from app/config use `Configure::load('configure_file');`. + * - To load config files from a plugin `Configure::load('plugin.configure_file');`. * - * @link http://book.cakephp.org/view/415/load + * @link http://book.cakephp.org/view/415/load * @param string $fileName name of file to load, extension must be .php and only the name - * should be used, not the extenstion + * should be used, not the extenstion * @return mixed false if file not found, void if load successful * @access public */ function load($fileName) { - $found = false; - - if (file_exists(CONFIGS . $fileName . '.php')) { - include(CONFIGS . $fileName . '.php'); - $found = true; - } elseif (file_exists(CACHE . 'persistent' . DS . $fileName . '.php')) { - include(CACHE . 'persistent' . DS . $fileName . '.php'); - $found = true; - } else { - foreach (App::core('cake') as $key => $path) { - if (file_exists($path . DS . 'config' . DS . $fileName . '.php')) { - include($path . DS . 'config' . DS . $fileName . '.php'); - $found = true; - break; + $found = $plugin = $pluginPath = false; + list($plugin, $fileName) = pluginSplit($fileName); + if ($plugin) { + $pluginPath = App::pluginPath($plugin); + } + $pos = strpos($fileName, '..'); + + if ($pos === false) { + if ($pluginPath && file_exists($pluginPath . 'config' . DS . $fileName . '.php')) { + include($pluginPath . 'config' . DS . $fileName . '.php'); + $found = true; + } elseif (file_exists(CONFIGS . $fileName . '.php')) { + include(CONFIGS . $fileName . '.php'); + $found = true; + } elseif (file_exists(CACHE . 'persistent' . DS . $fileName . '.php')) { + include(CACHE . 'persistent' . DS . $fileName . '.php'); + $found = true; + } else { + foreach (App::core('cake') as $key => $path) { + if (file_exists($path . DS . 'config' . DS . $fileName . '.php')) { + include($path . DS . 'config' . DS . $fileName . '.php'); + $found = true; + break; + } } } } @@ -239,9 +273,9 @@ class Configure extends Object { /** * Used to determine the current version of CakePHP. * - * Usage Configure::version(); + * Usage `Configure::version();` * - * @link http://book.cakephp.org/view/416/version + * @link http://book.cakephp.org/view/416/version * @return string Current version of CakePHP * @access public */ @@ -258,9 +292,11 @@ class Configure extends Object { /** * Used to write a config file to disk. * - * Configure::store('Model', 'class.paths', array('Users' => array( + * {{{ + * Configure::store('Model', 'class_paths', array('Users' => array( * 'path' => 'users', 'plugin' => true * ))); + * }}} * * @param string $type Type of config file to write, ex: Models, Controllers, Helpers, Components * @param string $name file name. @@ -273,20 +309,7 @@ class Configure extends Object { $content = ''; foreach ($data as $key => $value) { - $content .= "\$config['$type']['$key']"; - - if (is_array($value)) { - $content .= " = array("; - - foreach ($value as $key1 => $value2) { - $value2 = addslashes($value2); - $content .= "'$key1' => '$value2', "; - } - $content .= ");\n"; - } else { - $value = addslashes($value); - $content .= " = '$value';\n"; - } + $content .= "\$config['$type']['$key'] = " . var_export($value, true) . ";\n"; } if (is_null($type)) { $write = false; @@ -373,10 +396,6 @@ class Configure extends Object { trigger_error(sprintf(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR); } - if (!include(CONFIGS . 'bootstrap.php')) { - trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR); - } - if (Configure::read('Cache.disable') !== true) { $cache = Cache::config('default'); @@ -413,6 +432,11 @@ class Configure extends Object { } Cache::config('default'); } + + if (!include(CONFIGS . 'bootstrap.php')) { + trigger_error(sprintf(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", true), CONFIGS), E_USER_ERROR); + } + if (App::path('controllers') == array()) { App::build(array( 'models' => $modelPaths, 'views' => $viewPaths, 'controllers' => $controllerPaths, @@ -690,7 +714,7 @@ class App extends Object { * * @param string $plugin CamelCased plugin name to find the path of. * @return string full path to the plugin. - **/ + */ function pluginPath($plugin) { $_this =& App::getInstance(); $pluginDir = Inflector::underscore($plugin); @@ -838,7 +862,6 @@ class App extends Object { * @access public */ function import($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false) { - $_this =& App::getInstance(); $plugin = $directory = null; if (is_array($type)) { @@ -889,7 +912,7 @@ class App extends Object { list($plugin, $name) = explode('.', $name); $plugin = Inflector::camelize($plugin); } - + $_this =& App::getInstance(); $_this->return = $return; if (isset($ext)) { @@ -1228,8 +1251,8 @@ class App extends Object { /** * Returns an array of filenames of PHP files in the given directory. * - * @param string $path Path to scan for files - * @param string $suffix if false, return only directories. if string, match and return files + * @param string $path Path to scan for files + * @param string $suffix if false, return only directories. if string, match and return files * @return array List of directories or files in directory */ function __list($path, $suffix = false, $extension = false) { diff --git a/cake/libs/controller/app_controller.php b/cake/libs/controller/app_controller.php index 62e03c61e..bc3187a09 100644 --- a/cake/libs/controller/app_controller.php +++ b/cake/libs/controller/app_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/controller/component.php b/cake/libs/controller/component.php index 27731bbdf..6c26a9ddd 100644 --- a/cake/libs/controller/component.php +++ b/cake/libs/controller/component.php @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller * @since CakePHP(tm) v TBD - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -62,7 +56,7 @@ class Component extends Object { * * @var array * @access private - **/ + */ var $__settings = array(); /** @@ -195,16 +189,8 @@ class Component extends Object { $normal = Set::merge(array('Session' => null), $normal); } foreach ((array)$normal as $component => $config) { - $plugin = null; - - if (isset($this->__controllerVars['plugin'])) { - $plugin = $this->__controllerVars['plugin'] . '.'; - } - - if (strpos($component, '.') !== false) { - list($plugin, $component) = explode('.', $component); - $plugin = $plugin . '.'; - } + $plugin = isset($this->__controllerVars['plugin']) ? $this->__controllerVars['plugin'] . '.' : null; + list($plugin, $component) = pluginSplit($component, true, $plugin); $componentCn = $component . 'Component'; if (!class_exists($componentCn)) { diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php index 0152cab08..93be871b4 100644 --- a/cake/libs/controller/components/acl.php +++ b/cake/libs/controller/components/acl.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Access Control List factory class. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -52,9 +46,7 @@ class AclComponent extends Object { $name = Inflector::camelize(strtolower(Configure::read('Acl.classname'))); if (!class_exists($name)) { if (App::import('Component', $name)) { - if (strpos($name, '.') !== false) { - list($plugin, $name) = explode('.', $name); - } + list($plugin, $name) = pluginSplit($name); $name .= 'Component'; } else { trigger_error(sprintf(__('Could not find %s.', true), $name), E_USER_WARNING); @@ -370,7 +362,7 @@ class DbAcl extends AclBase { } list($save['aro_id'], $save['aco_id']) = array($perms['aro'], $perms['aco']); - if ($perms['link'] != null && count($perms['link']) > 0) { + if ($perms['link'] != null && !empty($perms['link'])) { $save['id'] = $perms['link'][0][$this->Aro->Permission->alias]['id']; } else { unset($save['id']); diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index d22c9d627..b14c766e4 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Router', 'Security'), false); diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index 085053fe7..62331b1e2 100644 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 1.2.0.4213 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -264,7 +263,7 @@ class CookieComponent extends Object { /** * @deprecated use delete() - **/ + */ function del($key) { trigger_error('Deprecated method, use CookieComponent::delete instead', E_USER_WARNING); return $this->delete($key); diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index 180ad6228..21473e63c 100644 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 1.2.0.3467 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Multibyte'); @@ -397,9 +391,7 @@ class EmailComponent extends Object{ $viewClass = $this->Controller->view; if ($viewClass != 'View') { - if (strpos($viewClass, '.') !== false) { - list($plugin, $viewClass) = explode('.', $viewClass); - } + list($plugin, $viewClass) = pluginSplit($viewClass); $viewClass = $viewClass . 'View'; App::import('View', $this->Controller->view); } diff --git a/cake/libs/controller/components/request_handler.php b/cake/libs/controller/components/request_handler.php index 59de80380..561bcdf17 100644 --- a/cake/libs/controller/components/request_handler.php +++ b/cake/libs/controller/components/request_handler.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Request object for handling alternative HTTP requests * @@ -8,22 +6,18 @@ * and the like. These units have no use for Ajax requests, and this Component can tell how Cake * should respond to the different needs of a handheld computer and a desktop machine. * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 0.10.4.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('REQUEST_MOBILE_UA')) { diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index fe6d8e73f..9b64930a6 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 0.10.8.2156 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -355,7 +349,7 @@ class SecurityComponent extends Object { $out[] = 'opaque="' . md5($options['realm']).'"'; } - return $auth . ' ' . join(',', $out); + return $auth . ' ' . implode(',', $out); } /** @@ -582,7 +576,7 @@ class SecurityComponent extends Object { } $data = $controller->data; - if (!isset($data['_Token']) || !isset($data['_Token']['fields'])) { + if (!isset($data['_Token']) || !isset($data['_Token']['fields']) || !isset($data['_Token']['key'])) { return false; } $token = $data['_Token']['key']; diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 3913fca75..bcf0dc6f3 100644 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller.components * @since CakePHP(tm) v 0.10.0.1232 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('cakesession')) { require LIBS . 'cake_session.php'; diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index bd7b8e69a..9de802e52 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -528,11 +528,7 @@ class Controller extends Object { $plugin = $this->plugin . '.'; } } - - if (strpos($modelClass, '.') !== false) { - list($plugin, $modelClass) = explode('.', $modelClass); - $plugin = $plugin . '.'; - } + list($plugin, $modelClass) = pluginSplit($modelClass, true, $plugin); if ($this->persistModel === true) { $cached = $this->_persist($modelClass, null, $object); @@ -649,7 +645,7 @@ class Controller extends Object { 504 => 'Gateway Time-out' ); if (is_string($status)) { - $codes = array_combine(array_values($codes), array_keys($codes)); + $codes = array_flip($codes); } if (isset($codes[$status])) { @@ -780,7 +776,7 @@ class Controller extends Object { function validateErrors() { $objects = func_get_args(); - if (!count($objects)) { + if (empty($objects)) { return false; } @@ -790,7 +786,7 @@ class Controller extends Object { $errors = array_merge($errors, $this->{$object->alias}->invalidFields()); } - return $this->validationErrors = (count($errors) ? $errors : false); + return $this->validationErrors = (!empty($errors) ? $errors : false); } /** @@ -808,9 +804,7 @@ class Controller extends Object { $viewClass = $this->view; if ($this->view != 'View') { - if (strpos($viewClass, '.') !== false) { - list($plugin, $viewClass) = explode('.', $viewClass); - } + list($plugin, $viewClass) = pluginSplit($viewClass); $viewClass = $viewClass . 'View'; App::import('View', $this->view); } @@ -957,12 +951,14 @@ class Controller extends Object { foreach ($fields as $field => $value) { $key = $model.'.'.$field; $fieldOp = $op; - if (is_array($op) && array_key_exists($key, $op)) { - $fieldOp = $op[$key]; - } elseif (is_array($op) && array_key_exists($field, $op)) { - $fieldOp = $op[$field]; - } elseif (is_array($op)) { - $fieldOp = false; + if (is_array($op)) { + if (array_key_exists($key, $op)) { + $fieldOp = $op[$key]; + } elseif (array_key_exists($field, $op)) { + $fieldOp = $op[$field]; + } else { + $fieldOp = false; + } } if ($exclusive && $fieldOp === false) { continue; @@ -1003,9 +999,8 @@ class Controller extends Object { if (is_string($object)) { $assoc = null; - - if (strpos($object, '.') !== false) { - list($object, $assoc) = explode('.', $object); + if (strpos($object, '.') !== false) { + list($object, $assoc) = pluginSplit($object); } if ($assoc && isset($this->{$object}->{$assoc})) { @@ -1112,8 +1107,9 @@ class Controller extends Object { $type = $defaults[0]; unset($defaults[0]); } - - extract($options = array_merge(array('page' => 1, 'limit' => 20), $defaults, $options)); + $options = array_merge(array('page' => 1, 'limit' => 20), $defaults, $options); + $options['limit'] = (empty($options['limit']) || !is_numeric($options['limit'])) ? 1 : $options['limit']; + extract($options); if (is_array($scope) && !empty($scope)) { $conditions = array_merge($conditions, $scope); diff --git a/cake/libs/controller/pages_controller.php b/cake/libs/controller/pages_controller.php index 04c72218f..c614a0595 100644 --- a/cake/libs/controller/pages_controller.php +++ b/cake/libs/controller/pages_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Static content controller. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.controller * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -85,7 +79,7 @@ class PagesController extends AppController { $title = Inflector::humanize($path[$count - 1]); } $this->set(compact('page', 'subpage', 'title')); - $this->render(join('/', $path)); + $this->render(implode('/', $path)); } } diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 83fb14294..064688d26 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -312,7 +312,7 @@ class Debugger extends Object { } if ($error == 'Fatal Error') { - die(); + exit(); } return true; } @@ -393,7 +393,7 @@ class Debugger extends Object { if ($options['format'] == 'array' || $options['format'] == 'points') { return $back; } - return join("\n", $back); + return implode("\n", $back); } /** @@ -503,10 +503,10 @@ class Debugger extends Object { } } $n = null; - if (count($vars) > 0) { + if (!empty($vars)) { $n = "\n"; } - return $out . join(",", $vars) . "{$n})"; + return $out . implode(",", $vars) . "{$n})"; break; case 'resource': return strtolower(gettype($var)); @@ -545,7 +545,7 @@ class Debugger extends Object { $out[] = "$className::$$key = " . $value; } } - return join("\n", $out); + return implode("\n", $out); } /** diff --git a/cake/libs/error.php b/cake/libs/error.php index 26ef72a52..1c39dbcc1 100644 --- a/cake/libs/error.php +++ b/cake/libs/error.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.10.5.1732 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Controller', 'App'); @@ -108,10 +107,13 @@ class ErrorHandler extends Object { if (!in_array(strtolower($method), array_map('strtolower', get_class_methods($this)))) { $method = 'error'; } - if ($method !== 'error') { if (Configure::read('debug') == 0) { - $parentMethods = get_class_methods(get_parent_class($this)); + $parentClass = get_parent_class($this); + if (strtolower($parentClass) != 'errorhandler') { + $method = 'error404'; + } + $parentMethods = get_class_methods($parentClass); if (in_array($method, $parentMethods)) { $method = 'error404'; } diff --git a/cake/libs/file.php b/cake/libs/file.php index 1d6b24303..fd74949fc 100644 --- a/cake/libs/file.php +++ b/cake/libs/file.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Convenience class for reading, writing and appending to files. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/folder.php b/cake/libs/folder.php index 69af1434d..cb5f4f9e0 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -802,7 +801,7 @@ class Folder extends Object { continue; } if ($part === '..') { - if (count($newparts) > 0) { + if (!empty($newparts)) { array_pop($newparts); continue; } else { diff --git a/cake/libs/http_socket.php b/cake/libs/http_socket.php index a31b89131..e7702957c 100644 --- a/cake/libs/http_socket.php +++ b/cake/libs/http_socket.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * HTTP Socket connection class. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('CakeSocket', 'Set', 'Router')); @@ -583,7 +577,8 @@ class HttpSocket extends CakeSocket { $stripIfEmpty = array( 'query' => '?%query', 'fragment' => '#%fragment', - 'user' => '%user:%pass@' + 'user' => '%user:%pass@', + 'host' => '%host:%port/' ); foreach ($stripIfEmpty as $key => $strip) { @@ -596,7 +591,6 @@ class HttpSocket extends CakeSocket { if (array_key_exists($uri['scheme'], $defaultPorts) && $defaultPorts[$uri['scheme']] == $uri['port']) { $uriTemplate = str_replace(':%port', null, $uriTemplate); } - foreach ($uri as $property => $value) { $uriTemplate = str_replace('%'.$property, $value, $uriTemplate); } @@ -800,7 +794,7 @@ class HttpSocket extends CakeSocket { $returnHeader = ''; foreach ($header as $field => $contents) { if (is_array($contents) && $mode == 'standard') { - $contents = join(',', $contents); + $contents = implode(',', $contents); } foreach ((array)$contents as $content) { $contents = preg_replace("/\r\n(?![\t ])/", "\r\n ", $content); @@ -879,7 +873,7 @@ class HttpSocket extends CakeSocket { foreach ((array)$header['Set-Cookie'] as $cookie) { if (strpos($cookie, '";"') !== false) { $cookie = str_replace('";"', "{__cookie_replace__}", $cookie); - $parts = str_replace("{__cookie_replace__}", '";"', preg_split('/\;/', $cookie)); + $parts = str_replace("{__cookie_replace__}", '";"', explode(';', $cookie)); } else { $parts = preg_split('/\;[ \t]*/', $cookie); } diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index 1e7806194..1a4a5d41e 100644 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0.4116 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -398,7 +392,7 @@ class I18n extends Object { $header = ""; do { - $line = trim(fgets($file, 1024)); + $line = trim(fgets($file)); if ($line == "" || $line[0] == "#") { continue; } diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php index ba82dd919..73cde117f 100644 --- a/cake/libs/inflector.php +++ b/cake/libs/inflector.php @@ -37,7 +37,7 @@ class Inflector { * * @var array * @access protected - **/ + */ var $_plural = array( 'rules' => array( '/(s)tatus$/i' => '\1\2tatuses', @@ -105,7 +105,7 @@ class Inflector { * * @var array * @access protected - **/ + */ var $_singular = array( 'rules' => array( '/(s)tatuses$/i' => '\1\2tatus', @@ -139,6 +139,7 @@ class Inflector { '/(m)en$/i' => '\1an', '/(c)hildren$/i' => '\1\2hild', '/(n)ews$/i' => '\1\2ews', + '/eaus$/' => 'eau', '/^(.*us)$/' => '\\1', '/s$/i' => '' ), @@ -155,7 +156,7 @@ class Inflector { * * @var array * @access protected - **/ + */ var $_uninflected = array( 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', @@ -176,7 +177,7 @@ class Inflector { * * @var array * @access protected - **/ + */ var $_pluralized = array(); /** @@ -184,7 +185,7 @@ class Inflector { * * @var array * @access protected - **/ + */ var $_singularized = array(); /** diff --git a/cake/libs/l10n.php b/cake/libs/l10n.php index b0b291094..615bc286e 100644 --- a/cake/libs/l10n.php +++ b/cake/libs/l10n.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0.4116 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -297,8 +291,8 @@ class L10n extends Object { 'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8'), 'rm' => array('language' => 'Rhaeto-Romanic', 'locale' => 'roh', 'localeFallback' => 'roh', 'charset' => 'utf-8'), 'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8'), - 'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8'), 'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8'), + 'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8'), 'ru-mo' => array('language' => 'Russian (Moldavia)', 'locale' => 'ru_mo', 'localeFallback' => 'rus', 'charset' => 'utf-8'), 'sb' => array('language' => 'Sorbian', 'locale' => 'wen', 'localeFallback' => 'wen', 'charset' => 'utf-8'), 'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8'), diff --git a/cake/libs/log/file_log.php b/cake/libs/log/file_log.php new file mode 100644 index 000000000..3702d882a --- /dev/null +++ b/cake/libs/log/file_log.php @@ -0,0 +1,76 @@ +<?php +/** + * File Storage stream for Logging + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.log + * @since CakePHP(tm) v 1.3 + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + */ +if (!class_exists('File')) { + require LIBS . 'file.php'; +} +/** + * File Storage stream for Logging + * + * @package cake + * @subpackage cake.cake.libs.log + */ +class FileLog { + +/** + * Path to save log files on. + * + * @var string + */ + var $_path = null; + +/** + * Constructs a new File Logger. + * + * Options + * + * - `path` the path to save logs on. + * + * @param array $options Options for the FileLog, see above. + * @return void + */ + function FileLog($options = array()) { + $options += array('path' => LOGS); + $this->_path = $options['path']; + } + +/** + * Implements writing to log files. + * + * @param string $type The type of log you are making. + * @param string $message The message you want to log. + * @return boolean success of write. + */ + function write($type, $message) { + $debugTypes = array('notice', 'info', 'debug'); + + if ($type == 'error' || $type == 'warning') { + $filename = $this->_path . 'error.log'; + } elseif (in_array($type, $debugTypes)) { + $filename = $this->_path . 'debug.log'; + } else { + $filename = $this->_path . $type . '.log'; + } + $output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n"; + $log = new File($filename, true); + if ($log->writable()) { + return $log->append($output); + } + } +} \ No newline at end of file diff --git a/cake/libs/magic_db.php b/cake/libs/magic_db.php index cbd63bca7..bb152af15 100644 --- a/cake/libs/magic_db.php +++ b/cake/libs/magic_db.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * MagicDb parser and file analyzer * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('Object')) { require LIBS . 'object.php'; @@ -42,7 +36,7 @@ class MagicDb extends Object { * Holds the parsed MagicDb for this class instance * * @var array - **/ + */ var $db = array(); /** @@ -51,7 +45,7 @@ class MagicDb extends Object { * @var $magicDb mixed Can be an array containing the db, a magic db as a string, or a filename pointing to a magic db in .db or magic.db.php format * @return boolean Returns false if reading / validation failed or true on success. * @author Felix - **/ + */ function read($magicDb = null) { if (!is_string($magicDb) && !is_array($magicDb)) { return false; @@ -101,7 +95,7 @@ class MagicDb extends Object { $lines = explode("\r\n", $data); $db = array(); - $validHeader = count($lines > 3) + $validHeader = count($lines) > 3 && preg_match('/^# Date:([0-9]{4}-[0-9]{2}-[0-9]{2})$/', $lines[1], $date) && preg_match('/^# Source:(.+)$/', $lines[2], $source) && strlen($lines[3]) == 0; diff --git a/cake/libs/model/app_model.php b/cake/libs/model/app_model.php index e8a9aa1b7..505699dfc 100644 --- a/cake/libs/model/app_model.php +++ b/cake/libs/model/app_model.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Application model for Cake. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index 47c2fdd44..046ee805c 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ACL behavior class. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.model.behaviors * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/model/behaviors/containable.php b/cake/libs/model/behaviors/containable.php index cf94db23d..2ac58a3fe 100644 --- a/cake/libs/model/behaviors/containable.php +++ b/cake/libs/model/behaviors/containable.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Behavior for binding management. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -161,7 +155,7 @@ class ContainableBehavior extends ModelBehavior { if (!$reset && empty($instance->__backOriginalAssociation)) { $instance->__backOriginalAssociation = $backupBindings; } else if ($reset) { - $instance->__backAssociation[$type] = $instance->{$type}; + $instance->__backAssociation[$type] = $backupBindings[$type]; } $instance->{$type}[$assoc] = array_merge($instance->{$type}[$assoc], $model['keep'][$assoc]); } @@ -293,7 +287,7 @@ class ContainableBehavior extends ModelBehavior { if (strpos($name, '.') !== false) { $chain = explode('.', $name); $name = array_shift($chain); - $children = array(join('.', $chain) => $children); + $children = array(implode('.', $chain) => $children); } $children = (array)$children; diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index 35ffe36c3..7b2baaa66 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.behaviors * @since CakePHP(tm) v 1.2.0.4525 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/model/behaviors/tree.php b/cake/libs/model/behaviors/tree.php index 0466ff224..cf7be124f 100644 --- a/cake/libs/model/behaviors/tree.php +++ b/cake/libs/model/behaviors/tree.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Tree behavior class. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.model.behaviors * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/model/cake_schema.php b/cake/libs/model/cake_schema.php index 7de1aff12..42c2cb482 100644 --- a/cake/libs/model/cake_schema.php +++ b/cake/libs/model/cake_schema.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model * @since CakePHP(tm) v 1.2.0.5550 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Model', 'ConnectionManager')); @@ -64,7 +63,7 @@ class CakeSchema extends Object { * plugin name. * * @var string - **/ + */ var $plugin = null; /** @@ -246,7 +245,7 @@ class CakeSchema extends Object { if (is_object($Object) && $Object->useTable !== false) { $Object->setDataSource($connection); - $table = $db->fullTableName($Object->useTable, false); + $table = $db->fullTableName($Object, false); if (in_array($table, $currentTables)) { $key = array_search($table, $currentTables); @@ -383,7 +382,7 @@ class CakeSchema extends Object { * @param string $table Table name you want returned. * @param array $fields Array of field information to generate the table with. * @return string Variable declaration for a schema class - **/ + */ function generateTable($table, $fields) { $out = "\tvar \${$table} = array(\n"; if (is_array($fields)) { @@ -515,7 +514,7 @@ class CakeSchema extends Object { if (is_array($values)) { foreach ($values as $key => $val) { if (is_array($val)) { - $vals[] = "'{$key}' => array('" . join("', '", $val) . "')"; + $vals[] = "'{$key}' => array('" . implode("', '", $val) . "')"; } else if (!is_numeric($key)) { $val = var_export($val, true); $vals[] = "'{$key}' => {$val}"; @@ -574,7 +573,7 @@ class CakeSchema extends Object { * @param array $new New indexes * @param array $old Old indexes * @return mixed False on failure, or an array of parameters to add & drop. - **/ + */ function _compareTableParameters($new, $old) { if (!is_array($new) || !is_array($old)) { return false; diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index bd1459ad1..49aa0f16a 100644 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Datasource connection manager * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model * @since CakePHP(tm) v 0.10.x.1402 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ require LIBS . 'model' . DS . 'datasources' . DS . 'datasource.php'; include_once CONFIGS . 'database.php'; diff --git a/cake/libs/model/datasources/datasource.php b/cake/libs/model/datasources/datasource.php index 4ada77bff..b4742cdfa 100644 --- a/cake/libs/model/datasources/datasource.php +++ b/cake/libs/model/datasources/datasource.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DataSource base class * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources * @since CakePHP(tm) v 0.10.5.1790 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -410,7 +404,7 @@ class DataSource extends Object { * before establishing a connection. * * @return boolean Whether or not the Datasources conditions for use are met. - **/ + */ function enabled() { return true; } diff --git a/cake/libs/model/datasources/dbo/dbo_adodb.php b/cake/libs/model/datasources/dbo/dbo_adodb.php index 8e2931d8e..bda6157b5 100644 --- a/cake/libs/model/datasources/dbo/dbo_adodb.php +++ b/cake/libs/model/datasources/dbo/dbo_adodb.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * AdoDB layer for DBO. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -129,7 +123,7 @@ class DboAdodb extends DboSource { * Check that AdoDB is available. * * @return boolean - **/ + */ function enabled() { return function_exists('NewADOConnection'); } @@ -231,7 +225,7 @@ class DboAdodb extends DboSource { function listSources() { $tables = $this->_adodb->MetaTables('TABLES'); - if (!sizeof($tables) > 0) { + if (!count($tables) > 0) { trigger_error(ERROR_NO_TABLE_LIST, E_USER_NOTICE); exit; } diff --git a/cake/libs/model/datasources/dbo/dbo_db2.php b/cake/libs/model/datasources/dbo/dbo_db2.php index 55b25010e..25e4f0d0d 100644 --- a/cake/libs/model/datasources/dbo/dbo_db2.php +++ b/cake/libs/model/datasources/dbo/dbo_db2.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * IBM DB2 for DBO * @@ -10,22 +8,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2007, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.10.5.1790 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -150,7 +144,7 @@ class DboDb2 extends DboSource { * Check that the DB2 extension is installed/loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('ibm_db2'); } diff --git a/cake/libs/model/datasources/dbo/dbo_firebird.php b/cake/libs/model/datasources/dbo/dbo_firebird.php index 4243097c8..d5a00c133 100644 --- a/cake/libs/model/datasources/dbo/dbo_firebird.php +++ b/cake/libs/model/datasources/dbo/dbo_firebird.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Firebird/Interbase layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.dbo * @since CakePHP(tm) v 1.2.0.5152 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -123,7 +117,7 @@ class DboFirebird extends DboSource { * Firebird Transaction commands. * * @var array - **/ + */ var $_commands = array( 'begin' => 'SET TRANSACTION', 'commit' => 'COMMIT', @@ -149,7 +143,7 @@ class DboFirebird extends DboSource { * Check that the interbase extension is loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('interbase'); } diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/cake/libs/model/datasources/dbo/dbo_mssql.php index 11c819d52..d1510d610 100644 --- a/cake/libs/model/datasources/dbo/dbo_mssql.php +++ b/cake/libs/model/datasources/dbo/dbo_mssql.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * MS SQL layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.10.5.1790 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -168,7 +162,7 @@ class DboMssql extends DboSource { * Check that MsSQL is installed/loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('mssql'); } @@ -432,7 +426,7 @@ class DboMssql extends DboSource { * @return string Error message with error number */ function lastError() { - $error = mssql_get_last_message($this->connection); + $error = mssql_get_last_message(); if ($error) { if (!preg_match('/contexto de la base de datos a|contesto di database|changed database|datenbankkontext/i', $error)) { @@ -618,7 +612,7 @@ class DboMssql extends DboSource { foreach (array('columns', 'indexes') as $var) { if (is_array(${$var})) { - ${$var} = "\t" . join(",\n\t", array_filter(${$var})); + ${$var} = "\t" . implode(",\n\t", array_filter(${$var})); } } return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}"; @@ -753,7 +747,7 @@ class DboMssql extends DboSource { $out = "ALTER TABLE {$table} ADD CONSTRAINT {$name} UNIQUE"; if (is_array($value['column'])) { - $value['column'] = join(', ', array_map(array(&$this, 'name'), $value['column'])); + $value['column'] = implode(', ', array_map(array(&$this, 'name'), $value['column'])); } else { $value['column'] = $this->name($value['column']); } diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php index 86de93b10..9fe9940f4 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/cake/libs/model/datasources/dbo/dbo_mysql.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * MySQL layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.10.5.1790 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -174,7 +168,7 @@ class DboMysqlBase extends DboSource { $alias = $joins = false; $fields = $this->_prepareUpdateFields($model, $combined, empty($conditions), !empty($conditions)); - $fields = join(', ', $fields); + $fields = implode(', ', $fields); $table = $this->fullTableName($model); if (!empty($conditions)) { @@ -358,7 +352,7 @@ class DboMysqlBase extends DboSource { * @param array $parameters Parameters to add & drop. * @return array Array of table property alteration statementes. * @todo Implement this method. - **/ + */ function _alterTableParameters($table, $parameters) { if (isset($parameters['change'])) { return $this->buildTableParameters($parameters['change']); @@ -398,7 +392,7 @@ class DboMysqlBase extends DboSource { } } if (is_array($value['column'])) { - $out .= 'KEY '. $name .' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; + $out .= 'KEY '. $name .' (' . implode(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; } else { $out .= 'KEY '. $name .' (' . $this->name($value['column']) . ')'; } @@ -418,7 +412,7 @@ class DboMysqlBase extends DboSource { function insertMulti($table, $fields, $values) { $table = $this->fullTableName($table); if (is_array($fields)) { - $fields = join(', ', array_map(array(&$this, 'name'), $fields)); + $fields = implode(', ', array_map(array(&$this, 'name'), $fields)); } $values = implode(', ', $values); $this->query("INSERT INTO {$table} ({$fields}) VALUES {$values}"); @@ -462,13 +456,14 @@ class DboMysqlBase extends DboSource { * @return string Character set name */ function getCharsetName($name) { - $cols = $this->query('SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME= ' . $this->value($name) . ';'); - if (isset($cols[0]['COLLATIONS']['CHARACTER_SET_NAME'])) { - return $cols[0]['COLLATIONS']['CHARACTER_SET_NAME']; + if ((bool)version_compare(mysql_get_server_info($this->connection), "5", ">=")) { + $cols = $this->query('SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME= ' . $this->value($name) . ';'); + if (isset($cols[0]['COLLATIONS']['CHARACTER_SET_NAME'])) { + return $cols[0]['COLLATIONS']['CHARACTER_SET_NAME']; + } } return false; } - } /** @@ -536,7 +531,7 @@ class DboMysql extends DboMysqlBase { * Check whether the MySQL extension is installed/loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('mysql'); } diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index 6777dbca1..6826024b2 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * MySQLi layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 1.1.4.2974 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Datasource', 'DboMysql'); @@ -93,7 +87,7 @@ class DboMysqli extends DboMysqlBase { * Check that MySQLi is installed/enabled * * @return boolean - **/ + */ function enabled() { return extension_loaded('mysqli'); } diff --git a/cake/libs/model/datasources/dbo/dbo_odbc.php b/cake/libs/model/datasources/dbo/dbo_odbc.php index 9f73dd140..42dc3f659 100644 --- a/cake/libs/model/datasources/dbo/dbo_odbc.php +++ b/cake/libs/model/datasources/dbo/dbo_odbc.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ODBC for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.dbo * @since CakePHP(tm) v 0.10.5.1790 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -101,7 +95,7 @@ class DboOdbc extends DboSource { $connect = 'odbc_connect'; } if (!function_exists($connect)) { - die('no odbc?'); + exit('no odbc?'); } $this->connected = false; $this->connection = $connect($config['database'], $config['login'], $config['password'], SQL_CUR_USE_ODBC); @@ -116,7 +110,7 @@ class DboOdbc extends DboSource { * Check if the ODBC extension is installed/loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('odbc'); } diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/cake/libs/model/datasources/dbo/dbo_oracle.php index a5c861b17..e39c8246f 100644 --- a/cake/libs/model/datasources/dbo/dbo_oracle.php +++ b/cake/libs/model/datasources/dbo/dbo_oracle.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Oracle layer for DBO. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP v 1.2.0.4041 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -741,7 +735,7 @@ class DboOracle extends DboSource { break; } } - $out .= "\t" . join(",\n\t", $colList) . ";\n\n"; + $out .= "\t" . implode(",\n\t", $colList) . ";\n\n"; } } return $out; @@ -972,7 +966,7 @@ class DboOracle extends DboSource { case 'schema': foreach (array('columns', 'indexes') as $var) { if (is_array(${$var})) { - ${$var} = "\t" . join(",\n\t", array_filter(${$var})); + ${$var} = "\t" . implode(",\n\t", array_filter(${$var})); } } if (trim($indexes) != '') { @@ -1025,7 +1019,7 @@ class DboOracle extends DboSource { $fetch = array(); $ins = array_chunk($ins, 1000); foreach ($ins as $i) { - $q = str_replace('{$__cakeID__$}', join(', ', $i), $query); + $q = str_replace('{$__cakeID__$}', implode(', ', $i), $query); $q = str_replace('= (', 'IN (', $q); $res = $this->fetchAll($q, $model->cacheQueries, $model->alias); $fetch = array_merge($fetch, $res); @@ -1069,7 +1063,7 @@ class DboOracle extends DboSource { $fetch = array(); $ins = array_chunk($ins, 1000); foreach ($ins as $i) { - $q = str_replace('{$__cakeID__$}', '(' .join(', ', $i) .')', $query); + $q = str_replace('{$__cakeID__$}', '(' .implode(', ', $i) .')', $query); $q = str_replace('= (', 'IN (', $q); $q = str_replace(' WHERE 1 = 1', '', $q); diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index 0e6ac7be9..092e302d9 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * PostgreSQL layer for DBO. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.9.1.114 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -133,7 +127,7 @@ class DboPostgres extends DboSource { * Check if PostgreSQL is enabled/loaded * * @return boolean - **/ + */ function enabled() { return extension_loaded('pgsql'); } @@ -560,11 +554,11 @@ class DboPostgres extends DboSource { } if (!empty($colList)) { - $out .= "\t" . join(",\n\t", $colList) . ";\n\n"; + $out .= "\t" . implode(",\n\t", $colList) . ";\n\n"; } else { $out = ''; } - $out .= join(";\n\t", $this->_alterIndexes($curTable, $indexes)) . ";"; + $out .= implode(";\n\t", $this->_alterIndexes($curTable, $indexes)) . ";"; } } return $out; @@ -602,7 +596,7 @@ class DboPostgres extends DboSource { $out .= 'INDEX '; } if (is_array($value['column'])) { - $out .= $name . ' ON ' . $table . ' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; + $out .= $name . ' ON ' . $table . ' (' . implode(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; } else { $out .= $name . ' ON ' . $table . ' (' . $this->name($value['column']) . ')'; } @@ -861,7 +855,7 @@ class DboPostgres extends DboSource { $out .= 'UNIQUE '; } if (is_array($value['column'])) { - $value['column'] = join(', ', array_map(array(&$this, 'name'), $value['column'])); + $value['column'] = implode(', ', array_map(array(&$this, 'name'), $value['column'])); } else { $value['column'] = $this->name($value['column']); } @@ -895,7 +889,7 @@ class DboPostgres extends DboSource { foreach (array('columns', 'indexes') as $var) { if (is_array(${$var})) { - ${$var} = join($join[$var], array_filter(${$var})); + ${$var} = implode($join[$var], array_filter(${$var})); } } return "CREATE TABLE {$table} (\n\t{$columns}\n);\n{$indexes}"; diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index 552096bec..fd0348fb3 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SQLite layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.9.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -147,7 +141,7 @@ class DboSqlite extends DboSource { * Check that SQLite is enabled/installed * * @return boolean - **/ + */ function enabled() { return extension_loaded('sqlite'); } @@ -553,7 +547,7 @@ class DboSqlite extends DboSource { $out .= 'UNIQUE '; } if (is_array($value['column'])) { - $value['column'] = join(', ', array_map(array(&$this, 'name'), $value['column'])); + $value['column'] = implode(', ', array_map(array(&$this, 'name'), $value['column'])); } else { $value['column'] = $this->name($value['column']); } @@ -614,7 +608,7 @@ class DboSqlite extends DboSource { foreach (array('columns', 'indexes') as $var) { if (is_array(${$var})) { - ${$var} = "\t" . join(",\n\t", array_filter(${$var})); + ${$var} = "\t" . implode(",\n\t", array_filter(${$var})); } } return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}"; diff --git a/cake/libs/model/datasources/dbo/dbo_sybase.php b/cake/libs/model/datasources/dbo/dbo_sybase.php index 7a56220aa..0551a92b3 100644 --- a/cake/libs/model/datasources/dbo/dbo_sybase.php +++ b/cake/libs/model/datasources/dbo/dbo_sybase.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Sybase layer for DBO * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 1.2.0.3097 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -115,7 +109,7 @@ class DboSybase extends DboSource { * Check that one of the sybase extensions is installed * * @return boolean - **/ + */ function enabled() { return extension_loaded('sybase') || extension_loaded('sybase_ct'); } diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 46afa587d..1270188bf 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Set', 'String')); @@ -501,7 +495,7 @@ class DboSource extends DataSource { * * @param boolean $sorted Get the queries sorted by time taken, defaults to false. * @return array Array of queries run as an array - **/ + */ function getLog($sorted = false) { if ($sorted) { $log = sortByKey($this->_queriesLog, 'took', 'desc', SORT_NUMERIC); @@ -636,8 +630,8 @@ class DboSource extends DataSource { } $query = array( 'table' => $this->fullTableName($model), - 'fields' => join(', ', $fieldInsert), - 'values' => join(', ', $valueInsert) + 'fields' => implode(', ', $fieldInsert), + 'values' => implode(', ', $valueInsert) ); if ($this->execute($this->renderStatement('create', $query))) { @@ -855,14 +849,14 @@ class DboSource extends DataSource { } if (!empty($ins)) { if (count($ins) > 1) { - $query = str_replace('{$__cakeID__$}', '(' .join(', ', $ins) .')', $query); + $query = str_replace('{$__cakeID__$}', '(' .implode(', ', $ins) .')', $query); + $query = str_replace('= (', 'IN (', $query); $query = str_replace('= (', 'IN (', $query); - $query = str_replace('= (', 'IN (', $query); } else { $query = str_replace('{$__cakeID__$}',$ins[0], $query); } - $query = str_replace(' WHERE 1 = 1', '', $query); + $query = str_replace(' WHERE 1 = 1', '', $query); } $foreignKey = $model->hasAndBelongsToMany[$association]['foreignKey']; @@ -936,7 +930,7 @@ class DboSource extends DataSource { $this->__mergeAssociation($resultSet[$i], $fetch, $association, $type, $selfJoin); } if (isset($resultSet[$i][$association])) { - $resultSet[$i][$association] = $linkModel->afterFind($resultSet[$i][$association]); + $resultSet[$i][$association] = $linkModel->afterFind($resultSet[$i][$association], false); } } else { $tempArray[0][$association] = false; @@ -955,10 +949,10 @@ class DboSource extends DataSource { * @return array Association results */ function fetchAssociated($model, $query, $ids) { - $query = str_replace('{$__cakeID__$}', join(', ', $ids), $query); + $query = str_replace('{$__cakeID__$}', implode(', ', $ids), $query); if (count($ids) > 1) { $query = str_replace('= (', 'IN (', $query); - $query = str_replace('= (', 'IN (', $query); + $query = str_replace('= (', 'IN (', $query); } return $this->fetchAll($query, $model->cacheQueries, $model->alias); } @@ -973,7 +967,7 @@ class DboSource extends DataSource { * @param object $model Model being merged onto * @param object $linkModel Model being merged * @return void - **/ + */ function __mergeHasMany(&$resultSet, $merge, $association, &$model, &$linkModel) { foreach ($resultSet as $i => $value) { $count = 0; @@ -1338,12 +1332,12 @@ class DboSource extends DataSource { } return $this->renderStatement('select', array( 'conditions' => $this->conditions($query['conditions'], true, true, $model), - 'fields' => join(', ', $query['fields']), + 'fields' => implode(', ', $query['fields']), 'table' => $query['table'], 'alias' => $this->alias . $this->name($query['alias']), 'order' => $this->order($query['order']), 'limit' => $this->limit($query['limit'], $query['offset']), - 'joins' => join(' ', $query['joins']), + 'joins' => implode(' ', $query['joins']), 'group' => $this->group($query['group']) )); } @@ -1450,7 +1444,7 @@ class DboSource extends DataSource { } else { $combined = array_combine($fields, $values); } - $fields = join(', ', $this->_prepareUpdateFields($model, $combined, empty($conditions))); + $fields = implode(', ', $this->_prepareUpdateFields($model, $combined, empty($conditions))); $alias = $joins = null; $table = $this->fullTableName($model); @@ -1813,7 +1807,7 @@ class DboSource extends DataSource { } else { $field[0] = explode('.', $field[1]); if (!Set::numeric($field[0])) { - $field[0] = join('.', array_map(array($this, 'name'), $field[0])); + $field[0] = implode('.', array_map(array($this, 'name'), $field[0])); $fields[$i] = preg_replace('/\(' . $field[1] . '\)/', '(' . $field[0] . ')', $fields[$i], 1); } } @@ -1846,7 +1840,7 @@ class DboSource extends DataSource { if (empty($out)) { return $clause . ' 1 = 1'; } - return $clause . join(' AND ', $out); + return $clause . implode(' AND ', $out); } if (empty($conditions) || trim($conditions) == '' || $conditions === true) { @@ -1916,7 +1910,7 @@ class DboSource extends DataSource { $out[] = $value[0] ; } } else { - $out[] = '(' . $not . '(' . join(') ' . strtoupper($key) . ' (', $value) . '))'; + $out[] = '(' . $not . '(' . implode(') ' . strtoupper($key) . ' (', $value) . '))'; } } else { @@ -1943,13 +1937,13 @@ class DboSource extends DataSource { if (is_object($model)) { $columnType = $model->getColumnType($key); } - $data .= join(', ', $this->value($value, $columnType)); + $data .= implode(', ', $this->value($value, $columnType)); } $data .= ')'; } else { $ret = $this->conditionKeysToString($value, $quoteValues, $model); if (count($ret) > 1) { - $data = '(' . join(') AND (', $ret) . ')'; + $data = '(' . implode(') AND (', $ret) . ')'; } elseif (isset($ret[0])) { $data = $ret[0]; } @@ -1984,7 +1978,7 @@ class DboSource extends DataSource { * @access private */ function __parseKey($model, $key, $value) { - $operatorMatch = '/^((' . join(')|(', $this->__sqlOps); + $operatorMatch = '/^((' . implode(')|(', $this->__sqlOps); $operatorMatch .= '\\x20)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is'; $bound = (strpos($key, '?') !== false || (is_array($value) && strpos($key, ':') !== false)); @@ -2030,7 +2024,7 @@ class DboSource extends DataSource { $operator = trim($operator); if (is_array($value)) { - $value = join(', ', $value); + $value = implode(', ', $value); switch ($operator) { case '=': @@ -2130,7 +2124,7 @@ class DboSource extends DataSource { $keys = array_filter($keys); } - if (empty($keys) || (is_array($keys) && count($keys) && isset($keys[0]) && empty($keys[0]))) { + if (empty($keys) || (is_array($keys) && isset($keys[0]) && empty($keys[0]))) { return ''; } @@ -2160,7 +2154,7 @@ class DboSource extends DataSource { } $order[] = $this->order($key . $value); } - return ' ORDER BY ' . trim(str_replace('ORDER BY', '', join(',', $order))); + return ' ORDER BY ' . trim(str_replace('ORDER BY', '', implode(',', $order))); } $keys = preg_replace('/ORDER\\x20BY/i', '', $keys); @@ -2192,7 +2186,7 @@ class DboSource extends DataSource { function group($group) { if ($group) { if (is_array($group)) { - $group = join(', ', $group); + $group = implode(', ', $group); } return ' GROUP BY ' . $this->__quoteFields($group); } @@ -2321,7 +2315,7 @@ class DboSource extends DataSource { function insertMulti($table, $fields, $values) { $table = $this->fullTableName($table); if (is_array($fields)) { - $fields = join(', ', array_map(array(&$this, 'name'), $fields)); + $fields = implode(', ', array_map(array(&$this, 'name'), $fields)); } $count = count($values); for ($x = 0; $x < $count; $x++) { @@ -2489,7 +2483,7 @@ class DboSource extends DataSource { * @param array $columnData The array of column data. * @param string $position The position type to use. 'beforeDefault' or 'afterDefault' are common * @return string a built column with the field parameters added. - **/ + */ function _buildFieldParameters($columnString, $columnData, $position) { foreach ($this->fieldParameters as $paramName => $value) { if (isset($columnData[$paramName]) && $value['position'] == $position) { @@ -2527,7 +2521,7 @@ class DboSource extends DataSource { $name = $this->startQuote . $name . $this->endQuote; } if (is_array($value['column'])) { - $out .= 'KEY ' . $name . ' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; + $out .= 'KEY ' . $name . ' (' . implode(', ', array_map(array(&$this, 'name'), $value['column'])) . ')'; } else { $out .= 'KEY ' . $name . ' (' . $this->name($value['column']) . ')'; } diff --git a/cake/libs/model/db_acl.php b/cake/libs/model/db_acl.php index 1af116e99..4588c0903 100644 --- a/cake/libs/model/db_acl.php +++ b/cake/libs/model/db_acl.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * This is core configuration file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 58b466188..00e613c7f 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -641,20 +641,15 @@ class Model extends Overloadable { if (strpos($assoc, '.') !== false) { $value = $this->{$type}[$assoc]; unset($this->{$type}[$assoc]); - list($plugin, $assoc) = explode('.', $assoc); + list($plugin, $assoc) = pluginSplit($assoc, true); $this->{$type}[$assoc] = $value; - $plugin = $plugin . '.'; } } $className = $assoc; - if (isset($value['className']) && !empty($value['className'])) { - $className = $value['className']; - if (strpos($className, '.') !== false) { - list($plugin, $className) = explode('.', $className); - $plugin = $plugin . '.'; - $this->{$type}[$assoc]['className'] = $className; - } + if (!empty($value['className'])) { + list($plugin, $className) = pluginSplit($value['className'], true); + $this->{$type}[$assoc]['className'] = $className; } $this->__constructLinkedModel($assoc, $plugin . $className); } @@ -753,11 +748,11 @@ class Model extends Overloadable { if (is_array($joinClass)) { $joinClass = key($joinClass); } - $plugin = null; + $plugin = null; if (strpos($joinClass, '.') !== false) { list($plugin, $joinClass) = explode('.', $joinClass); - $plugin = $plugin . '.'; + $plugin .= '.'; $this->{$type}[$assocKey]['with'] = $joinClass; } @@ -1137,7 +1132,7 @@ class Model extends Overloadable { return $data[$name[0]][$name[1]]; } } - if (isset($data[0]) && count($data[0]) > 0) { + if (!empty($data[0])) { $name = key($data[0]); return $data[0][$name]; } @@ -1363,14 +1358,6 @@ class Model extends Overloadable { if (isset($this->hasAndBelongsToMany[$assoc])) { list($join) = $this->joinModel($this->hasAndBelongsToMany[$assoc]['with']); - $conditions = array($join . '.' . $this->hasAndBelongsToMany[$assoc]['foreignKey'] => $id); - - $links = $this->{$join}->find('all', array( - 'conditions' => $conditions, - 'recursive' => -1, - 'fields' => $this->hasAndBelongsToMany[$assoc]['associationForeignKey'] - )); - $isUUID = !empty($this->{$join}->primaryKey) && ( $this->{$join}->_schema[$this->{$join}->primaryKey]['length'] == 36 && ( $this->{$join}->_schema[$this->{$join}->primaryKey]['type'] === 'string' || @@ -1401,7 +1388,7 @@ class Model extends Overloadable { if ($isUUID && $primaryAdded) { $values[] = $db->value(String::uuid()); } - $values = join(',', $values); + $values = implode(',', $values); $newValues[] = "({$values})"; unset($values); } elseif (isset($row[$this->hasAndBelongsToMany[$assoc]['associationForeignKey']])) { @@ -1412,6 +1399,16 @@ class Model extends Overloadable { } if ($this->hasAndBelongsToMany[$assoc]['unique']) { + $conditions = array_merge( + array($join . '.' . $this->hasAndBelongsToMany[$assoc]['foreignKey'] => $id), + (array)$this->hasAndBelongsToMany[$assoc]['conditions'] + ); + $links = $this->{$join}->find('all', array( + 'conditions' => $conditions, + 'recursive' => empty($this->hasAndBelongsToMany[$assoc]['conditions']) ? -1 : 0, + 'fields' => $this->hasAndBelongsToMany[$assoc]['associationForeignKey'] + )); + $associationForeignKey = "{$join}." . $this->hasAndBelongsToMany[$assoc]['associationForeignKey']; $oldLinks = Set::extract($links, "{n}.{$associationForeignKey}"); if (!empty($oldLinks)) { @@ -1429,7 +1426,7 @@ class Model extends Overloadable { } if (!empty($newValues)) { - $fields = join(',', $fields); + $fields = implode(',', $fields); $db->insertMulti($this->{$join}, $fields, $newValues); } } @@ -2453,7 +2450,7 @@ class Model extends Overloadable { ) || $this->beforeValidate($options) === false ) { - return $this->validationErrors; + return false; } if (!isset($this->validate) || empty($this->validate)) { @@ -2925,7 +2922,7 @@ class Model extends Overloadable { } /** - * Called during save operations, before validation. Please note that custom + * Called during validation operations, before validation. Please note that custom * validation rules can be defined in $validate. * * @return boolean True if validate operation should continue, false to abort diff --git a/cake/libs/model/model_behavior.php b/cake/libs/model/model_behavior.php index 060905b4f..e5fd759de 100644 --- a/cake/libs/model/model_behavior.php +++ b/cake/libs/model/model_behavior.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Model behaviors base class. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model * @since CakePHP(tm) v 1.2.0.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -285,10 +279,7 @@ class BehaviorCollection extends Object { * @access public */ function attach($behavior, $config = array()) { - $name = $behavior; - if (strpos($behavior, '.')) { - list($plugin, $name) = explode('.', $behavior, 2); - } + list($plugin, $name) = pluginSplit($behavior); $class = $name . 'Behavior'; if (!App::import('Behavior', $behavior)) { diff --git a/cake/libs/multibyte.php b/cake/libs/multibyte.php index fe8c7f4f4..0be2ec4d9 100644 --- a/cake/libs/multibyte.php +++ b/cake/libs/multibyte.php @@ -1,28 +1,22 @@ <?php -/* SVN FILE: $Id$ */ - /** * Multibyte handling methods. * * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0.6833 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (function_exists('mb_internal_encoding')) { $encoding = Configure::read('App.encoding'); @@ -38,7 +32,8 @@ if (function_exists('mb_internal_encoding')) { * @param string $needle The string to find in $haystack. * @param integer $offset The position in $haystack to start searching. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. - * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false if $needle is not found. + * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false + * if $needle is not found. */ if (!function_exists('mb_stripos')) { function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { @@ -52,8 +47,9 @@ if (!function_exists('mb_stripos')) { * @param string $haystack The string from which to get the first occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. - * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. + * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, + * Default value is false. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return string|boolean The portion of $haystack, or false if $needle is not found. */ @@ -69,7 +65,7 @@ if (!function_exists('mb_stristr')) { * @param string $string The string being checked for length. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return integer The number of characters in string $string having character encoding encoding. - * A multi-byte character is counted as 1. + * A multi-byte character is counted as 1. */ if (!function_exists('mb_strlen')) { function mb_strlen($string, $encoding = null) { @@ -85,7 +81,7 @@ if (!function_exists('mb_strlen')) { * @param integer $offset The search offset. If it is not specified, 0 is used. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string. - * If $needle is not found, it returns false. + * If $needle is not found, it returns false. */ if (!function_exists('mb_strpos')) { function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { @@ -99,8 +95,9 @@ if (!function_exists('mb_strpos')) { * @param string $haystack The string from which to get the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. - * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. + * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, + * Default value is false. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return string|boolean The portion of $haystack. or false if $needle is not found. */ @@ -116,8 +113,9 @@ if (!function_exists('mb_strrchr')) { * @param string $haystack The string from which to get the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. - * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. + * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, + * Default value is false. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return string|boolean The portion of $haystack. or false if $needle is not found. */ @@ -134,7 +132,8 @@ if (!function_exists('mb_strrichr')) { * @param string $needle The string to find in $haystack. * @param integer $offset The position in $haystack to start searching. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. - * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, or false if $needle is not found. + * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, + * or false if $needle is not found. */ if (!function_exists('mb_strripos')) { function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { @@ -148,9 +147,10 @@ if (!function_exists('mb_strripos')) { * @param string $haystack The string being checked, for the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param integer $offset May be specified to begin searching an arbitrary number of characters into the string. - * Negative values will stop searching at an arbitrary point prior to the end of the string. + * Negative values will stop searching at an arbitrary point prior to the end of the string. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. - * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. If $needle is not found, it returns false. + * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. + * If $needle is not found, it returns false. */ if (!function_exists('mb_strrpos')) { function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { @@ -164,8 +164,9 @@ if (!function_exists('mb_strrpos')) { * @param string $haystack The string from which to get the first occurrence of $needle. * @param string $needle The string to find in $haystack * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. - * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is FALSE. + * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. + * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, + * Default value is FALSE. * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return string|boolean The portion of $haystack, or true if $needle is not found. */ @@ -235,12 +236,13 @@ if (!function_exists('mb_substr')) { * * @param string $str The string being encoded * @param string $charset specifies the name of the character set in which str is represented in. - * The default value is determined by the current NLS setting (mbstring.language). - * @param string $transfer_encoding specifies the scheme of MIME encoding. It should be either "B" (Base64) or "Q" (Quoted-Printable). - * Falls back to "B" if not given. - * @param string $linefeed specifies the EOL (end-of-line) marker with which mb_encode_mimeheader() performs line-folding - * (a » RFC term, the act of breaking a line longer than a certain length into multiple lines. - * The length is currently hard-coded to 74 characters). Falls back to "\r\n" (CRLF) if not given. + * The default value is determined by the current NLS setting (mbstring.language). + * @param string $transfer_encoding specifies the scheme of MIME encoding. + * It should be either "B" (Base64) or "Q" (Quoted-Printable). Falls back to "B" if not given. + * @param string $linefeed specifies the EOL (end-of-line) marker with which + * mb_encode_mimeheader() performs line-folding + * (a » RFC term, the act of breaking a line longer than a certain length into multiple lines. + * The length is currently hard-coded to 74 characters). Falls back to "\r\n" (CRLF) if not given. * @param integer $indent [definition unknown and appears to have no affect] * @return string A converted version of the string represented in ASCII. */ @@ -321,7 +323,7 @@ class Multibyte extends Object { if ($value < 128) { $map[] = $value; } else { - if (count($values) == 0) { + if (empty($values)) { $find = ($value < 224) ? 2 : 3; } $values[] = $value; @@ -373,7 +375,8 @@ class Multibyte extends Object { * @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle. * @param multi-byte string $needle The string to find in $haystack. * @param integer $offset The position in $haystack to start searching. - * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, or false if $needle is not found. + * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, + * or false if $needle is not found. * @access public * @static */ @@ -392,8 +395,9 @@ class Multibyte extends Object { * @param string $haystack The string from which to get the first occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. - * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. + * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, + * Default value is false. * @return int|boolean The portion of $haystack, or false if $needle is not found. * @access public * @static @@ -471,7 +475,7 @@ class Multibyte extends Object { * @param string $needle The position counted from the beginning of haystack. * @param integer $offset The search offset. If it is not specified, 0 is used. * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string. - * If $needle is not found, it returns false. + * If $needle is not found, it returns false. * @access public * @static */ @@ -515,8 +519,9 @@ class Multibyte extends Object { * @param string $haystack The string from which to get the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. - * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. + * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, + * Default value is false. * @return string|boolean The portion of $haystack. or false if $needle is not found. * @access public * @static @@ -576,8 +581,9 @@ class Multibyte extends Object { * @param string $haystack The string from which to get the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. - * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, Default value is false. + * If set to true, it returns all of $haystack from the beginning to the last occurrence of $needle. + * If set to false, it returns all of $haystack from the last occurrence of $needle to the end, + * Default value is false. * @return string|boolean The portion of $haystack. or false if $needle is not found. * @access public * @static @@ -639,7 +645,8 @@ class Multibyte extends Object { * @param string $haystack The string from which to get the position of the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param integer $offset The position in $haystack to start searching. - * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, or false if $needle is not found. + * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string, + * or false if $needle is not found. * @access public * @static */ @@ -690,8 +697,9 @@ class Multibyte extends Object { * @param string $haystack The string being checked, for the last occurrence of $needle. * @param string $needle The string to find in $haystack. * @param integer $offset May be specified to begin searching an arbitrary number of characters into the string. - * Negative values will stop searching at an arbitrary point prior to the end of the string. - * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. If $needle is not found, it returns false. + * Negative values will stop searching at an arbitrary point prior to the end of the string. + * @return integer|boolean The numeric position of the last occurrence of $needle in the $haystack string. + * If $needle is not found, it returns false. * @access public * @static */ @@ -741,8 +749,9 @@ class Multibyte extends Object { * @param string $haystack The string from which to get the first occurrence of $needle. * @param string $needle The string to find in $haystack * @param boolean $part Determines which portion of $haystack this function returns. - * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. - * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, Default value is FALSE. + * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. + * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, + * Default value is FALSE. * @return string|boolean The portion of $haystack, or true if $needle is not found. * @access public * @static @@ -885,14 +894,14 @@ class Multibyte extends Object { if ($length > 1 && count($keys[$key]['lower']) > 1) { $j = 0; - for ($ii = 0; $ii < count($keys[$key]['lower']); $ii++) { + for ($ii = 0, $count = count($keys[$key]['lower']); $ii < $count; $ii++) { $nextChar = $utf8Map[$i + $ii]; if (isset($nextChar) && ($nextChar == $keys[$key]['lower'][$j + $ii])) { $replace++; } } - if ($replace == count($keys[$key]['lower'])) { + if ($replace == $count) { $upperCase[] = $keys[$key]['upper']; $replaced = array_merge($replaced, array_values($keys[$key]['lower'])); $matched = true; @@ -905,14 +914,14 @@ class Multibyte extends Object { if (in_array($nextChar, $keys[$ii]['lower'])) { - for ($jj = 0; $jj < count($keys[$ii]['lower']); $jj++) { + for ($jj = 0, $count = count($keys[$ii]['lower']); $jj < $count; $jj++) { $nextChar = $utf8Map[$i + $jj]; if (isset($nextChar) && ($nextChar == $keys[$ii]['lower'][$j + $jj])) { $replace++; } } - if ($replace == count($keys[$ii]['lower'])) { + if ($replace == $count) { $upperCase[] = $keys[$ii]['upper']; $replaced = array_merge($replaced, array_values($keys[$ii]['lower'])); $matched = true; diff --git a/cake/libs/object.php b/cake/libs/object.php index fee862131..a9669b009 100644 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Object class, allowing __construct and __destruct in PHP4. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -33,19 +27,11 @@ * Also includes methods for logging and the special method RequestAction, * to call other Controllers' Actions from anywhere. * - * @package cake - * @subpackage cake.cake.libs + * @package cake + * @subpackage cake.cake.libs */ class Object { -/** - * Log object - * - * @var CakeLog - * @access protected - */ - var $_log = null; - /** * A hack to support __construct() on PHP 4 * Hint: descendant classes have no PHP4 class_name() constructors, @@ -160,13 +146,10 @@ class Object { if (!class_exists('CakeLog')) { require LIBS . 'cake_log.php'; } - if (is_null($this->_log)) { - $this->_log = new CakeLog(); - } if (!is_string($msg)) { $msg = print_r($msg, true); } - return $this->_log->write($type, $msg); + return CakeLog::write($type, $msg); } /** diff --git a/cake/libs/overloadable.php b/cake/libs/overloadable.php index 0699c63eb..0450489fd 100644 --- a/cake/libs/overloadable.php +++ b/cake/libs/overloadable.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Overload abstraction interface. Merges differences between PHP4 and 5. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/overloadable_php4.php b/cake/libs/overloadable_php4.php index c9753ac90..eecaa99eb 100644 --- a/cake/libs/overloadable_php4.php +++ b/cake/libs/overloadable_php4.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Overload abstraction interface. Merges differences between PHP4 and 5. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/overloadable_php5.php b/cake/libs/overloadable_php5.php index c167961f4..59d0da39a 100644 --- a/cake/libs/overloadable_php5.php +++ b/cake/libs/overloadable_php5.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Overload abstraction interface. Merges differences between PHP4 and 5. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/libs/router.php b/cake/libs/router.php index 4d5e4bd5f..26ece6e2b 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -162,7 +161,7 @@ class Router { * Builds __prefixes * * @return void - **/ + */ function Router() { $this->__setPrefixes(); } @@ -174,7 +173,7 @@ class Router { * @return void * @access private * @todo Remove support for Routing.admin in future versions. - **/ + */ function __setPrefixes() { $routing = Configure::read('Routing'); if (!empty($routing['admin'])) { @@ -184,6 +183,7 @@ class Router { $this->__prefixes = array_merge($this->__prefixes, (array)$routing['prefixes']); } } + /** * Gets a reference to the Router object instance * @@ -233,6 +233,7 @@ class Router { foreach ($_this->__prefixes as $prefix) { if (isset($default[$prefix])) { $default['prefix'] = $prefix; + break; } } if (isset($default['prefix'])) { @@ -409,7 +410,7 @@ class Router { $parsed[] = '/' . $element; } } - return array('#^' . join('', $parsed) . '[\/]*$#', $names); + return array('#^' . implode('', $parsed) . '[\/]*$#', $names); } /** @@ -561,6 +562,7 @@ class Router { if (strcasecmp($name, $match) === 0) { $url = substr($url, 0, strpos($url, '.' . $name)); $ext = $match; + break; } } } @@ -822,10 +824,8 @@ class Router { $plugin = $url['plugin']; } - $url = array_merge( - array('controller' => $params['controller'], 'plugin' => $params['plugin']), - Set::filter($url, true) - ); + $_url = $url; + $url = array_merge(array('controller' => $params['controller'], 'plugin' => $params['plugin']), Set::filter($url, true)); if ($plugin !== false) { $url['plugin'] = $plugin; @@ -897,11 +897,11 @@ class Router { break; } } - $output = join('/', $urlOut); + $output = implode('/', $urlOut) . '/'; } if (!empty($args)) { - $args = join('/', $args); + $args = implode('/', $args); if ($output{strlen($output) - 1} != '/') { $args = '/'. $args; } diff --git a/cake/libs/sanitize.php b/cake/libs/sanitize.php index c72681bd1..ef3d7dbaf 100644 --- a/cake/libs/sanitize.php +++ b/cake/libs/sanitize.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Washes strings from unwanted noise. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -171,7 +165,7 @@ class Sanitize { $params = params(func_get_args()); $str = $params[0]; - for ($i = 1; $i < count($params); $i++) { + for ($i = 1, $count = count($params); $i < $count; $i++) { $str = preg_replace('/<' . $params[$i] . '\b[^>]*>/i', '', $str); $str = preg_replace('/<\/' . $params[$i] . '[^>]*>/i', '', $str); } diff --git a/cake/libs/security.php b/cake/libs/security.php index 680a06914..b90f8c0b1 100644 --- a/cake/libs/security.php +++ b/cake/libs/security.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v .0.10.0.1233 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -67,7 +61,6 @@ class Security extends Object { * @static */ function inactiveMins() { - $_this =& Security::getInstance(); switch (Configure::read('Security.level')) { case 'high': return 10; @@ -185,7 +178,6 @@ class Security extends Object { return ''; } - $_this =& Security::getInstance(); if (!defined('CIPHER_SEED')) { //This is temporary will change later define('CIPHER_SEED', '76859309657453542496749683645'); diff --git a/cake/libs/set.php b/cake/libs/set.php index f2b38be5c..2320f7949 100644 --- a/cake/libs/set.php +++ b/cake/libs/set.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Library of array functions for Cake. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -424,7 +418,7 @@ class Set { if (count($context['trace']) == 1) { $context['trace'][] = $context['key']; } - $parent = join('/', $context['trace']) . '/.'; + $parent = implode('/', $context['trace']) . '/.'; $context['item'] = Set::extract($parent, $data); $context['key'] = array_pop($context['trace']); if (isset($context['trace'][1]) && $context['trace'][1] > 0) { @@ -1104,7 +1098,7 @@ class Set { if (!is_null($key)) { $id = $key; } - if (is_array($r) && count($r)) { + if (is_array($r) && !empty($r)) { $stack = array_merge($stack, Set::__flatten($r, $id)); } else { $stack[] = array('id' => $id, 'value' => $r); diff --git a/cake/libs/validation.php b/cake/libs/validation.php index 98e7d3c55..73a90fe33 100644 --- a/cake/libs/validation.php +++ b/cake/libs/validation.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0.3830 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('Multibyte')) { App::import('Core', 'Multibyte', false); @@ -214,8 +213,8 @@ class Validation extends Object { * * @param mixed $check credit card number to validate * @param mixed $type 'all' may be passed as a sting, defaults to fast which checks format of most major credit cards - * if an array is used only the values of the array are checked. - * Example: array('amex', 'bankcard', 'maestro') + * if an array is used only the values of the array are checked. + * Example: array('amex', 'bankcard', 'maestro') * @param boolean $deep set to true this will check the Luhn algorithm of the credit card. * @param string $regex A custom regex can also be passed, this will be used instead of the defined regex values * @return boolean Success @@ -609,12 +608,14 @@ class Validation extends Object { /** * Validate a multiple select. * + * Valid Options + * + * - in => provide a list of choices that selections must be made from + * - max => maximun number of non-zero choices that can be made + * - min => minimum number of non-zero choices that can be made + * * @param mixed $check Value to check * @param mixed $options Options for the check. - * Valid options - * in => provide a list of choices that selections must be made from - * max => maximun number of non-zero choices that can be made - * min => minimum number of non-zero choices that can be made * @return boolean Success * @access public */ @@ -625,10 +626,10 @@ class Validation extends Object { if (empty($check)) { return false; } - if ($options['max'] && sizeof($check) > $options['max']) { + if ($options['max'] && count($check) > $options['max']) { return false; } - if ($options['min'] && sizeof($check) < $options['min']) { + if ($options['min'] && count($check) < $options['min']) { return false; } if ($options['in'] && is_array($options['in'])) { @@ -673,12 +674,16 @@ class Validation extends Object { if (is_null($_this->regex)) { switch ($_this->country) { case 'us': + case 'all': + case 'can': // includes all NANPA members. see http://en.wikipedia.org/wiki/North_American_Numbering_Plan#List_of_NANPA_countries_and_territories - default: $_this->regex = '/^(?:\+?1)?[-. ]?\\(?[2-9][0-8][0-9]\\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}$/'; break; } } + if (empty($_this->regex)) { + return $_this->_pass('phone', $check, $country); + } return $_this->_check(); } @@ -699,6 +704,9 @@ class Validation extends Object { if (is_array($check)) { $_this->_extract($check); } + if (empty($country)) { + $_this->country = 'us'; + } if (is_null($_this->regex)) { switch ($_this->country) { @@ -716,11 +724,13 @@ class Validation extends Object { $_this->regex = '/^[1-9]{1}[0-9]{3}$/i'; break; case 'us': - default: $_this->regex = '/\\A\\b[0-9]{5}(?:-[0-9]{4})?\\b\\z/i'; break; } } + if (empty($_this->regex)) { + return $_this->_pass('postal', $check, $country); + } return $_this->_check(); } @@ -784,13 +794,14 @@ class Validation extends Object { * Checks that a value is a valid URL according to http://www.w3.org/Addressing/URL/url-spec.txt * * The regex checks for the following component parts: - * a valid, optional, scheme - * a valid ip address OR - * a valid domain name as defined by section 2.3.1 of http://www.ietf.org/rfc/rfc1035.txt - * with an optional port number - * an optional valid path - * an optional query string (get parameters) - * an optional fragment (anchor tag) + * + * - a valid, optional, scheme + * - a valid ip address OR + * a valid domain name as defined by section 2.3.1 of http://www.ietf.org/rfc/rfc1035.txt + * with an optional port number + * - an optional valid path + * - an optional query string (get parameters) + * - an optional fragment (anchor tag) * * @param string $check Value to check * @param boolean $strict Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher) @@ -835,6 +846,31 @@ class Validation extends Object { return call_user_func_array(array(&$object, $method), array($check, $args)); } +/** + * Attempts to pass unhandled Validation locales to a class starting with $classPrefix + * and ending with Validation. For example $classPrefix = 'nl', the class would be + * `NlValidation`. + * + * @param string $method The method to call on the other class. + * @param mixed $check The value to check or an array of parameters for the method to be called. + * @param string $classPrefix The prefix for the class to do the validation. + * @return mixed Return of Passed method, false on failure + * @access protected + **/ + function _pass($method, $check, $classPrefix) { + $className = ucwords($classPrefix) . 'Validation'; + if (!class_exists($className)) { + trigger_error(sprintf(__('Could not find %s class, unable to complete validation.', true), $className), E_USER_WARNING); + return false; + } + if (!method_exists($className, $method)) { + trigger_error(sprintf(__('Method %s does not exist on %s unable to complete validation.', true), $method, $className), E_USER_WARNING); + return false; + } + $check = (array)$check; + return call_user_func_array(array($className, $method), $check); + } + /** * Runs a regular expression match. * diff --git a/cake/libs/view/elements/dump.ctp b/cake/libs/view/elements/dump.ctp index f6e311ffc..094b78683 100644 --- a/cake/libs/view/elements/dump.ctp +++ b/cake/libs/view/elements/dump.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements * @since CakePHP(tm) v 0.10.5.1782 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div id="cakeControllerDump"> diff --git a/cake/libs/view/elements/email/html/default.ctp b/cake/libs/view/elements/email/html/default.ctp index b6afa3e66..f203aae05 100644 --- a/cake/libs/view/elements/email/html/default.ctp +++ b/cake/libs/view/elements/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php diff --git a/cake/libs/view/elements/email/text/default.ctp b/cake/libs/view/elements/email/text/default.ctp index bd5f1aca6..3b1183f71 100644 --- a/cake/libs/view/elements/email/text/default.ctp +++ b/cake/libs/view/elements/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content; ?> \ No newline at end of file diff --git a/cake/libs/view/errors/error404.ctp b/cake/libs/view/errors/error404.ctp index eea79dfee..af8ab4cfc 100644 --- a/cake/libs/view/errors/error404.ctp +++ b/cake/libs/view/errors/error404.ctp @@ -1,30 +1,24 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php echo $name; ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The requested address %s was not found on this server.", true), "<strong>'{$message}'</strong>")?> + <?php echo sprintf(__('The requested address %s was not found on this server.', true), "<strong>'{$message}'</strong>")?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_action.ctp b/cake/libs/view/errors/missing_action.ctp index 787e8e089..9c59f8b11 100644 --- a/cake/libs/view/errors/missing_action.ctp +++ b/cake/libs/view/errors/missing_action.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php echo sprintf(__('Missing Method in %s', true), $controller);?></h2> <p class="error"> <strong><?php __('Error') ?>: </strong> - <?php echo sprintf(__('The action %1$s is not defined in controller %2$s', true), "<em>" . $action . "</em>", "<em>" . $controller . "</em>");?> + <?php echo sprintf(__('The action %1$s is not defined in controller %2$s', true), '<em>' . $action . '</em>', '<em>' . $controller . '</em>');?> </p> <p class="error"> <strong><?php __('Error') ?>: </strong> - <?php echo sprintf(__('Create %1$s%2$s in file: %3$s.', true), "<em>" . $controller . "::</em>", "<em>" . $action . "()</em>", APP_DIR . DS . "controllers" . DS . Inflector::underscore($controller) . ".php");?> + <?php echo sprintf(__('Create %1$s%2$s in file: %3$s.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php');?> </p> <pre> <?php @@ -48,5 +42,5 @@ class <?php echo $controller;?> extends AppController { </pre> <p class="notice"> <strong><?php __('Notice') ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_action.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_behavior_class.ctp b/cake/libs/view/errors/missing_behavior_class.ctp index 1936b390b..3b9c8529e 100644 --- a/cake/libs/view/errors/missing_behavior_class.ctp +++ b/cake/libs/view/errors/missing_behavior_class.ctp @@ -3,29 +3,28 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Behavior Class'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The behavior class <em>%s</em> can not be found or does not exist.", true), $behaviorClass);?> + <?php echo sprintf(__('The behavior class <em>%s</em> can not be found or does not exist.', true), $behaviorClass);?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "models" . DS . "behaviors" . DS . $file);?> + <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?> </p> <pre> <?php @@ -36,5 +35,5 @@ class <?php echo $behaviorClass;?> extends ModelBehavior { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_behavior_class.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_behavior_file.ctp b/cake/libs/view/errors/missing_behavior_file.ctp index 595fb4720..8ce04deec 100644 --- a/cake/libs/view/errors/missing_behavior_file.ctp +++ b/cake/libs/view/errors/missing_behavior_file.ctp @@ -3,29 +3,28 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Behavior File'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The Behavior file %s can not be found or does not exist.", true), APP_DIR . DS . "models" . DS . "behaviors" . DS . $file);?> + <?php echo sprintf(__('The Behavior file %s can not be found or does not exist.', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "models" . DS . "behaviors" . DS . $file);?> + <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'models' . DS . 'behaviors' . DS . $file);?> </p> <pre> <?php @@ -36,5 +35,5 @@ class <?php echo $behaviorClass;?> extends ModelBehavior { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_behavior_file.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp');?> </p> diff --git a/cake/libs/view/errors/missing_component_class.ctp b/cake/libs/view/errors/missing_component_class.ctp index e83b4f75b..bc0bf8d4d 100644 --- a/cake/libs/view/errors/missing_component_class.ctp +++ b/cake/libs/view/errors/missing_component_class.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Component Class'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Component class %1$s in %2$s was not found.', true), "<em>" . $component . "Component</em>", "<em>" . $controller . "Controller</em>");?> + <?php echo sprintf(__('Component class %1$s in %2$s was not found.', true), '<em>' . $component . 'Component</em>', '<em>' . $controller . 'Controller</em>');?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $component . "Component</em>", APP_DIR . DS . "controllers" . DS . "components" . DS . $file);?> + <?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file);?> </p> <pre> <?php @@ -41,5 +35,5 @@ class <?php echo $component;?>Component extends Object {<br /> </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_component_class.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_component_file.ctp b/cake/libs/view/errors/missing_component_file.ctp index ac8e4fce4..a5f302845 100644 --- a/cake/libs/view/errors/missing_component_file.ctp +++ b/cake/libs/view/errors/missing_component_file.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Component File'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php __("The component file was not found."); ?> + <?php __('The component file was not found.'); ?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $component . "Component</em>", APP_DIR . DS . "controllers" . DS . "components" . DS . $file);?> + <?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $component . 'Component</em>', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file);?> </p> <pre> <?php @@ -41,5 +35,5 @@ class <?php echo $component;?>Component extends Object {<br /> </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_component_file.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_connection.ctp b/cake/libs/view/errors/missing_connection.ctp index 4f419e0bd..1766c2069 100644 --- a/cake/libs/view/errors/missing_connection.ctp +++ b/cake/libs/view/errors/missing_connection.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Database Connection'); ?></h2> @@ -30,9 +24,9 @@ </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Confirm you have created the file : %s.', true), APP_DIR.DS.'config'.DS.'database.php');?> + <?php echo sprintf(__('Confirm you have created the file : %s.', true), APP_DIR . DS . 'config' . DS . 'database.php');?> </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR.DS.'views'.DS.'errors'.DS.basename(__FILE__));?> + <?php echo sprintf(__('If you want to customize this error message, create %s.', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__));?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_controller.ctp b/cake/libs/view/errors/missing_controller.ctp index bb837a833..5b81c9ff7 100644 --- a/cake/libs/view/errors/missing_controller.ctp +++ b/cake/libs/view/errors/missing_controller.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Controller'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('%s could not be found.', true), "<em>" . $controller . "</em>");?> + <?php echo sprintf(__('%s could not be found.', true), '<em>' . $controller . '</em>');?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class %s below in file: %s', true), "<em>" . $controller . "</em>", APP_DIR . DS . "controllers" . DS . Inflector::underscore($controller) . ".php");?> + <?php echo sprintf(__('Create the class %s below in file: %s', true), '<em>' . $controller . '</em>', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php');?> </p> <pre> <?php @@ -42,5 +36,5 @@ class <?php echo $controller;?> extends AppController { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_controller.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_helper_class.ctp b/cake/libs/view/errors/missing_helper_class.ctp index 17cb1b2df..8c78c4620 100644 --- a/cake/libs/view/errors/missing_helper_class.ctp +++ b/cake/libs/view/errors/missing_helper_class.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Helper Class'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The helper class <em>%s</em> can not be found or does not exist.", true), $helperClass);?> + <?php echo sprintf(__('The helper class <em>%s</em> can not be found or does not exist.', true), $helperClass);?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?> + <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?> </p> <pre> <?php @@ -41,5 +35,5 @@ class <?php echo $helperClass;?> extends AppHelper { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_helper_class.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_helper_file.ctp b/cake/libs/view/errors/missing_helper_file.ctp index 34d6d5dc7..f38554d07 100644 --- a/cake/libs/view/errors/missing_helper_file.ctp +++ b/cake/libs/view/errors/missing_helper_file.ctp @@ -1,35 +1,30 @@ <?php -/* SVN FILE: $Id$ */ /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Helper File'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The helper file %s can not be found or does not exist.", true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?> + <?php echo sprintf(__('The helper file %s can not be found or does not exist.', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . "views" . DS . "helpers" . DS . $file);?> + <?php echo sprintf(__('Create the class below in file: %s', true), APP_DIR . DS . 'views' . DS . 'helpers' . DS . $file);?> </p> <pre> <?php @@ -40,5 +35,5 @@ class <?php echo $helperClass;?> extends AppHelper { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_helper_file.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp');?> </p> diff --git a/cake/libs/view/errors/missing_layout.ctp b/cake/libs/view/errors/missing_layout.ctp index d6660624b..ba09332b2 100644 --- a/cake/libs/view/errors/missing_layout.ctp +++ b/cake/libs/view/errors/missing_layout.ctp @@ -1,38 +1,32 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Layout'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("The layout file %s can not be found or does not exist.", true), "<em>" . $file . "</em>");?> + <?php echo sprintf(__('The layout file %s can not be found or does not exist.', true), '<em>' . $file . '</em>');?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Confirm you have created the file: %s', true), "<em>" . $file . "</em>");?> + <?php echo sprintf(__('Confirm you have created the file: %s', true), '<em>' . $file . '</em>');?> </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_layout.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_model.ctp b/cake/libs/view/errors/missing_model.ctp index 76fd10498..b902e64f4 100644 --- a/cake/libs/view/errors/missing_model.ctp +++ b/cake/libs/view/errors/missing_model.ctp @@ -1,36 +1,30 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Model'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("<em>%s</em> could not be found.", true), $model);?> + <?php echo sprintf(__('<em>%s</em> could not be found.', true), $model);?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Create the class %s in file: %s', true), "<em>" . $model . "</em>", APP_DIR . DS . "models" . DS . Inflector::underscore($model) . ".php");?> + <?php echo sprintf(__('Create the class %s in file: %s', true), '<em>' . $model . '</em>', APP_DIR . DS . 'models' . DS . Inflector::underscore($model) . '.php');?> </p> <pre> <?php @@ -43,5 +37,5 @@ class <?php echo $model;?> extends AppModel { </pre> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_model.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_model.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_scaffolddb.ctp b/cake/libs/view/errors/missing_scaffolddb.ctp index 1f568dfdf..3ea902ac3 100644 --- a/cake/libs/view/errors/missing_scaffolddb.ctp +++ b/cake/libs/view/errors/missing_scaffolddb.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Database Connection'); ?></h2> @@ -30,9 +24,9 @@ </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Confirm you have created the file: %s', true), APP_DIR . DS . "config" . DS . "database.php");?> + <?php echo sprintf(__('Confirm you have created the file: %s', true), APP_DIR . DS . 'config' . DS . 'database.php');?> </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_scaffolddb.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_table.ctp b/cake/libs/view/errors/missing_table.ctp index 88e3666d0..1b76680da 100644 --- a/cake/libs/view/errors/missing_table.ctp +++ b/cake/libs/view/errors/missing_table.ctp @@ -1,34 +1,28 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing Database Table'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('Database table %1$s for model %2$s was not found.', true),"<em>" . $table . "</em>", "<em>" . $model . "</em>");?> + <?php echo sprintf(__('Database table %1$s for model %2$s was not found.', true), '<em>' . $table . '</em>', '<em>' . $model . '</em>');?> </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_table.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_view.ctp b/cake/libs/view/errors/missing_view.ctp index 676f69253..0279503ce 100644 --- a/cake/libs/view/errors/missing_view.ctp +++ b/cake/libs/view/errors/missing_view.ctp @@ -1,32 +1,26 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Missing View'); ?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__('The view for %1$s%2$s was not found.', true), "<em>" . $controller . "Controller::</em>", "<em>". $action . "()</em>");?> + <?php echo sprintf(__('The view for %1$s%2$s was not found.', true), '<em>' . $controller . 'Controller::</em>', '<em>' . $action . '()</em>');?> </p> <p class="error"> <strong><?php __('Error'); ?>: </strong> @@ -34,5 +28,5 @@ </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "missing_view.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/private_action.ctp b/cake/libs/view/errors/private_action.ctp index 93d857fa0..d3982b9c4 100644 --- a/cake/libs/view/errors/private_action.ctp +++ b/cake/libs/view/errors/private_action.ctp @@ -1,34 +1,28 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php echo sprintf(__('Private Method in %s', true), $controller);?></h2> <p class="error"> <strong><?php __('Error'); ?>: </strong> - <?php echo sprintf(__("%s%s cannot be accessed directly.", true), "<em>" . $controller . "::</em>", "<em>" . $action . "()</em>");?> + <?php echo sprintf(__('%s%s cannot be accessed directly.', true), '<em>' . $controller . '::</em>', '<em>' . $action . '()</em>');?> </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "private_action.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp');?> </p> \ No newline at end of file diff --git a/cake/libs/view/errors/scaffold_error.ctp b/cake/libs/view/errors/scaffold_error.ctp index 146aaf438..4f71381ac 100644 --- a/cake/libs/view/errors/scaffold_error.ctp +++ b/cake/libs/view/errors/scaffold_error.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.errors * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h2><?php __('Scaffold Error'); ?></h2> @@ -30,7 +24,7 @@ </p> <p class="notice"> <strong><?php __('Notice'); ?>: </strong> - <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . "views" . DS . "errors" . DS . "scaffold_error.ctp");?> + <?php echo sprintf(__('If you want to customize this error message, create %s', true), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'scaffold_error.ctp');?> </p> <pre> <?php diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 1e587b7ba..db2f95fae 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Backend for helpers. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -204,24 +198,27 @@ class Helper extends Overloadable { * @return string $webPath web path to file. */ function webroot($file) { - $webPath = "{$this->webroot}" . $file; - if (!empty($this->themeWeb)) { - $os = env('OS'); - if (!empty($os) && strpos($os, 'Windows') !== false) { - if (strpos(WWW_ROOT . $this->themeWeb . $file, '\\') !== false) { - $path = str_replace('/', '\\', WWW_ROOT . $this->themeWeb . $file); + $asset = explode('?', $file); + $asset[1] = isset($asset[1]) ? '?' . $asset[1] : null; + $webPath = "{$this->webroot}" . $asset[0]; + + if (!empty($this->theme)) { + $viewPaths = App::path('views'); + + foreach ($viewPaths as $viewPath) { + $path = $viewPath . 'themed'. DS . $this->theme . DS . 'webroot' . DS . $asset[0]; + $theme = $this->theme . '/'; + + if (file_exists($path)) { + $webPath = "{$this->webroot}theme/" . $theme . $asset[0]; + break; } - } else { - $path = WWW_ROOT . $this->themeWeb . $file; - } - if (file_exists($path)) { - $webPath = "{$this->webroot}" . $this->themeWeb . $file; } } if (strpos($webPath, '//') !== false) { return str_replace('//', '/', $webPath); } - return $webPath; + return $webPath . $asset[1]; } /** @@ -231,7 +228,7 @@ class Helper extends Overloadable { * * @param string $path The file path to timestamp, the path must be inside WWW_ROOT * @return string Path with a timestamp added, or not. - **/ + */ function assetTimestamp($path) { $timestampEnabled = ( (Configure::read('Asset.timestamp') === true && Configure::read() > 0) || @@ -584,8 +581,9 @@ class Helper extends Overloadable { * @param array $options * @param string $key * @return array + * @access protected */ - function __name($options = array(), $field = null, $key = 'name') { + function _name($options = array(), $field = null, $key = 'name') { $view =& ClassRegistry::getObject('view'); if ($options === null) { $options = array(); @@ -607,7 +605,7 @@ class Helper extends Overloadable { $name = $field; break; default: - $name = 'data[' . join('][', $view->entity()) . ']'; + $name = 'data[' . implode('][', $view->entity()) . ']'; break; } @@ -652,7 +650,9 @@ class Helper extends Overloadable { } $habtmKey = $this->field(); - if (empty($result) && isset($this->data[$habtmKey]) && is_array($this->data[$habtmKey])) { + if (empty($result) && isset($this->data[$habtmKey][$habtmKey])) { + $result = $this->data[$habtmKey][$habtmKey]; + } elseif (empty($result) && isset($this->data[$habtmKey]) && is_array($this->data[$habtmKey])) { if (ClassRegistry::isKeySet($habtmKey)) { $model =& ClassRegistry::getObject($habtmKey); $result = $this->__selectedArray($this->data[$habtmKey], $model->primaryKey); @@ -693,7 +693,7 @@ class Helper extends Overloadable { $this->setEntity($field); } $options = (array)$options; - $options = $this->__name($options); + $options = $this->_name($options); $options = $this->value($options); $options = $this->domId($options); if ($this->tagIsInvalid()) { diff --git a/cake/libs/view/helpers/ajax.php b/cake/libs/view/helpers/ajax.php index 479f04df4..7d4c0bc1f 100644 --- a/cake/libs/view/helpers/ajax.php +++ b/cake/libs/view/helpers/ajax.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Helper for AJAX operations. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -267,7 +261,7 @@ class AjaxHelper extends AppHelper { $options['requestHeaders'] = array(); } if (is_array($options['update'])) { - $options['update'] = join(' ', $options['update']); + $options['update'] = implode(' ', $options['update']); } $options['requestHeaders']['X-Update'] = $options['update']; } else { @@ -534,7 +528,7 @@ class AjaxHelper extends AppHelper { } } $attr = $this->_parseAttributes(array_merge($options, array('id' => $id))); - return $this->output(sprintf($this->Html->tags['blockstart'], $attr)); + return sprintf($this->Html->tags['blockstart'], $attr); } /** @@ -553,7 +547,7 @@ class AjaxHelper extends AppHelper { return ''; } } - return $this->output($this->Html->tags['blockend']); + return $this->Html->tags['blockend']; } /** @@ -830,7 +824,7 @@ class AjaxHelper extends AppHelper { $keys[] = "'" . $key . "'"; $keys[] = "'" . $val . "'"; } - $jsOptions['requestHeaders'] = '[' . join(', ', $keys) . ']'; + $jsOptions['requestHeaders'] = '[' . implode(', ', $keys) . ']'; break; } } @@ -879,7 +873,7 @@ class AjaxHelper extends AppHelper { } } - $out = join(', ', $out); + $out = implode(', ', $out); $out = '{' . $out . '}'; return $out; } else { @@ -1002,7 +996,7 @@ class AjaxHelper extends AppHelper { $data[] = $key . ':"' . rawurlencode($val) . '"'; } } - $out = 'var __ajaxUpdater__ = {' . join(", \n", $data) . '};' . "\n"; + $out = 'var __ajaxUpdater__ = {' . implode(", \n", $data) . '};' . "\n"; $out .= 'for (n in __ajaxUpdater__) { if (typeof __ajaxUpdater__[n] == "string"'; $out .= ' && $(n)) Element.update($(n), unescape(decodeURIComponent('; $out .= '__ajaxUpdater__[n]))); }'; diff --git a/cake/libs/view/helpers/app_helper.php b/cake/libs/view/helpers/app_helper.php index 81e0b90c2..c19913bdd 100644 --- a/cake/libs/view/helpers/app_helper.php +++ b/cake/libs/view/helpers/app_helper.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,22 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake * @since CakePHP(tm) v 0.2.9 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('View', 'Helper', false); diff --git a/cake/libs/view/helpers/cache.php b/cake/libs/view/helpers/cache.php index af1af442d..718784a27 100644 --- a/cake/libs/view/helpers/cache.php +++ b/cake/libs/view/helpers/cache.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * CacheHelper helps create full page view caching. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.0.0.2277 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -53,14 +47,6 @@ class CacheHelper extends AppHelper { */ var $__match = array(); -/** - * holds the View object passed in final call to CacheHelper::cache() - * - * @var View - * @access public - */ - var $view; - /** * cache action time * @@ -82,24 +68,32 @@ class CacheHelper extends AppHelper { $useCallbacks = false; if (is_array($this->cacheAction)) { $controller = Inflector::underscore($this->controllerName); + $controllerAlternate = Inflector::variable($this->controllerName); + $check = str_replace('/', '_', $this->here); - $replace = str_replace('/', '_', $this->base); + $basePath = str_replace('/', '_', $this->base); + $match = str_replace($this->base, '', $this->here); $match = str_replace('//', '/', $match); $match = str_replace('/' . $controller . '/', '', $match); + $match = str_replace('/' . $controllerAlternate . '/', '', $match); $match = str_replace('/' . $this->controllerName . '/', '', $match); - $check = str_replace($replace, '', $check); + + $check = str_replace($basePath, '', $check); $check = str_replace('_' . $controller . '_', '', $check); $check = str_replace('_' . $this->controllerName . '_', '', $check); + $check = str_replace('_' . $controllerAlternate . '_', '', $match); + $check = Inflector::slug($check); - $check = preg_replace('/^_+/', '', $check); + $check = trim($check, '_'); + $keys = str_replace('/', '_', array_keys($this->cacheAction)); $found = array_keys($this->cacheAction); $index = null; $count = 0; foreach ($keys as $key => $value) { - if (strpos($check, $value) === 0) { + if (strpos($check, rtrim($value, '_')) === 0) { $index = $found[$count]; break; } @@ -274,7 +268,7 @@ class CacheHelper extends AppHelper { $controller->params = $this->params = unserialize(stripslashes(\'' . addslashes(serialize($this->params)) . '\')); $controller->action = $this->action = unserialize(\'' . serialize($this->action) . '\'); $controller->data = $this->data = unserialize(stripslashes(\'' . addslashes(serialize($this->data)) . '\')); - $controller->themeWeb = $this->themeWeb = \'' . $this->themeWeb . '\'; + $controller->theme = $this->theme = \'' . $this->theme . '\'; Router::setRequestInfo(array($this->params, array(\'base\' => $this->base, \'webroot\' => $this->webroot)));'; if ($useCallbacks == true) { diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index eac7e5f1c..e966ec1c9 100755 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -6,18 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -172,7 +172,8 @@ class FormHelper extends AppHelper { if (is_array($model) && empty($options)) { $options = $model; $model = null; - } elseif (empty($model) && $model !== false && !empty($this->params['models'])) { + } + if (empty($model) && $model !== false && !empty($this->params['models'])) { $model = $this->params['models'][0]; $this->defaultModel = $this->params['models'][0]; } elseif (empty($model) && empty($this->params['models'])) { @@ -293,7 +294,7 @@ class FormHelper extends AppHelper { $this->setEntity($model . '.', true); $attributes = $this->_parseAttributes($htmlAttributes, null, ''); - return $this->output(sprintf($this->Html->tags['form'], $attributes)) . $append; + return sprintf($this->Html->tags['form'], $attributes) . $append; } /** @@ -348,7 +349,7 @@ class FormHelper extends AppHelper { $view =& ClassRegistry::getObject('view'); $view->modelScope = false; - return $this->output($out); + return $out; } /** @@ -408,7 +409,7 @@ class FormHelper extends AppHelper { } } } - $field = join('.', $field); + $field = implode('.', $field); if (!in_array($field, $this->fields)) { if ($value !== null) { return $this->fields[$field] = $value; @@ -527,11 +528,11 @@ class FormHelper extends AppHelper { $labelFor = $this->domId($fieldName); } - return $this->output(sprintf( + return sprintf( $this->Html->tags['label'], $labelFor, $this->_parseAttributes($options), $text - )); + ); } /** @@ -939,11 +940,11 @@ class FormHelper extends AppHelper { } unset($options['hiddenField']); - return $this->output($output . sprintf( + return $output . sprintf( $this->Html->tags['checkbox'], $options['name'], $this->_parseAttributes($options, array('name'), null, ' ') - )); + ); } /** @@ -1027,7 +1028,7 @@ class FormHelper extends AppHelper { )); } } - $out = $hidden . join($inbetween, $out); + $out = $hidden . implode($inbetween, $out); if ($legend) { $out = sprintf( @@ -1035,7 +1036,7 @@ class FormHelper extends AppHelper { sprintf($this->Html->tags['legend'], $legend) . $out ); } - return $this->output($out); + return $out; } /** @@ -1049,11 +1050,11 @@ class FormHelper extends AppHelper { $options = $this->_initInputField($fieldName, array_merge( array('type' => 'text'), $options )); - return $this->output(sprintf( + return sprintf( $this->Html->tags['input'], $options['name'], $this->_parseAttributes($options, array('name'), null, ' ') - )); + ); } /** @@ -1065,11 +1066,11 @@ class FormHelper extends AppHelper { */ function password($fieldName, $options = array()) { $options = $this->_initInputField($fieldName, $options); - return $this->output(sprintf( + return sprintf( $this->Html->tags['password'], $options['name'], $this->_parseAttributes($options, array('name'), null, ' ') - )); + ); } /** @@ -1090,12 +1091,12 @@ class FormHelper extends AppHelper { } unset($options['value']); } - return $this->output(sprintf( + return sprintf( $this->Html->tags['textarea'], $options['name'], $this->_parseAttributes($options, array('type', 'name'), null, ' '), $value - )); + ); } /** @@ -1122,11 +1123,11 @@ class FormHelper extends AppHelper { $this->__secure(null, '' . $options['value']); } - return $this->output(sprintf( + return sprintf( $this->Html->tags['hidden'], $options['name'], $this->_parseAttributes($options, array('name', 'class'), '', ' ') - )); + ); } /** @@ -1148,7 +1149,7 @@ class FormHelper extends AppHelper { } $attributes = $this->_parseAttributes($options, array('name'), '', ' '); - return $this->output(sprintf($this->Html->tags['file'], $options['name'], $attributes)); + return sprintf($this->Html->tags['file'], $options['name'], $attributes); } /** @@ -1168,12 +1169,12 @@ class FormHelper extends AppHelper { if ($options['escape']) { $title = h($title); } - return $this->output(sprintf( + return sprintf( $this->Html->tags['button'], $options['type'], $this->_parseAttributes($options, array('type'), '', ' '), $title - )); + ); } /** @@ -1216,11 +1217,11 @@ class FormHelper extends AppHelper { if (strpos($caption, '://') !== false) { unset($options['type']); - $out .= $this->output($before . sprintf( + $out .= $before . sprintf( $this->Html->tags['submitimage'], $caption, $this->_parseAttributes($options, null, '', ' ') - ) . $after); + ) . $after; } elseif (preg_match('/\.(jpg|jpe|jpeg|gif|png|ico)$/', $caption)) { unset($options['type']); if ($caption{0} !== '/') { @@ -1229,17 +1230,17 @@ class FormHelper extends AppHelper { $caption = trim($caption, '/'); $url = $this->webroot($caption); } - $out .= $this->output($before . sprintf( + $out .= $before . sprintf( $this->Html->tags['submitimage'], $url, $this->_parseAttributes($options, null, '', ' ') - ) . $after); + ) . $after; } else { $options['value'] = $caption; - $out .= $this->output($before . sprintf( + $out .= $before . sprintf( $this->Html->tags['submit'], $this->_parseAttributes($options, null, '', ' ') - ). $after); + ). $after; } if (isset($divOptions)) { @@ -1346,7 +1347,7 @@ class FormHelper extends AppHelper { $template = ($style == 'checkbox') ? 'checkboxmultipleend' : 'selectend'; $select[] = $this->Html->tags[$template]; - return $this->output(implode("\n", $select)); + return implode("\n", $select); } /** @@ -1751,8 +1752,9 @@ class FormHelper extends AppHelper { * @param array $options * @param string $key * @return array + * @access protected */ - function __name($options = array(), $field = null, $key = 'name') { + function _name($options = array(), $field = null, $key = 'name') { if ($this->requestType == 'get') { if ($options === null) { $options = array(); @@ -1777,7 +1779,7 @@ class FormHelper extends AppHelper { return $name; } } - return parent::__name($options, $field, $key); + return parent::_name($options, $field, $key); } /** @@ -1846,7 +1848,7 @@ class FormHelper extends AppHelper { $label['class'] = 'selected'; } - list($name) = array_values($this->__name()); + list($name) = array_values($this->_name()); if (empty($attributes['class'])) { $attributes['class'] = 'checkbox'; diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 08164d206..09756a70c 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -4,19 +4,18 @@ * * Simplifies the construction of HTML elements. * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.9.1 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Html Helper class for easy use of HTML widgets. @@ -144,14 +143,14 @@ class HtmlHelper extends AppHelper { * * @var array * @access private - **/ + */ var $__includedScripts = array(); /** * Options for the currently opened script block buffer if any. * * @var array * @access protected - **/ + */ var $_scriptBlockOptions = array(); /** * Document type definitions @@ -202,7 +201,7 @@ class HtmlHelper extends AppHelper { */ function docType($type = 'xhtml-strict') { if (isset($this->__docTypes[$type])) { - return $this->output($this->__docTypes[$type]); + return $this->__docTypes[$type]; } return null; } @@ -271,7 +270,7 @@ class HtmlHelper extends AppHelper { } if ($inline) { - return $this->output($out); + return $out; } else { $view =& ClassRegistry::getObject('view'); $view->addScript($out); @@ -289,7 +288,7 @@ class HtmlHelper extends AppHelper { if (empty($charset)) { $charset = strtolower(Configure::read('App.encoding')); } - return $this->output(sprintf($this->tags['charset'], (!empty($charset) ? $charset : 'utf-8'))); + return sprintf($this->tags['charset'], (!empty($charset) ? $charset : 'utf-8')); } /** @@ -348,7 +347,7 @@ class HtmlHelper extends AppHelper { } unset($options['default']); } - return $this->output(sprintf($this->tags['link'], $url, $this->_parseAttributes($options), $title)); + return sprintf($this->tags['link'], $url, $this->_parseAttributes($options), $title); } /** @@ -356,7 +355,7 @@ class HtmlHelper extends AppHelper { * * #### Options * - * - `inline` If set to false, the generated tag appears in the head tag of the layout. + * - `inline` If set to false, the generated tag appears in the head tag of the layout. Defaults to true * * @param mixed $path The name of a CSS style sheet or an array containing names of * CSS stylesheets. If `$path` is prefixed with '/', the path will be relative to the webroot @@ -367,13 +366,13 @@ class HtmlHelper extends AppHelper { * @access public */ function css($path, $rel = null, $options = array()) { - $inline = isset($options['inline']) ? $options['inline'] : true; + $options += array('inline' => true); if (is_array($path)) { $out = ''; foreach ($path as $i) { - $out .= "\n\t" . $this->css($i, $rel, $options, $inline); + $out .= "\n\t" . $this->css($i, $rel, $options); } - if ($inline) { + if ($options['inline']) { return $out . "\n"; } return; @@ -402,16 +401,15 @@ class HtmlHelper extends AppHelper { } if ($rel == 'import') { - $out = sprintf($this->tags['style'], $this->_parseAttributes($options, null, '', ' '), '@import url(' . $url . ');'); + $out = sprintf($this->tags['style'], $this->_parseAttributes($options, array('inline'), '', ' '), '@import url(' . $url . ');'); } else { if ($rel == null) { $rel = 'stylesheet'; } - $out = sprintf($this->tags['css'], $rel, $url, $this->_parseAttributes($options, null, '', ' ')); + $out = sprintf($this->tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline'), '', ' ')); } - $out = $this->output($out); - if ($inline) { + if ($options['inline']) { return $out; } else { $view =& ClassRegistry::getObject('view'); @@ -437,7 +435,7 @@ class HtmlHelper extends AppHelper { * @param mixed $options Array of options, and html attributes see above. If boolean sets $options['inline'] = value * @return mixed String of <script /> tags or null if $inline is false or if $once is true and the file has been * included before. - **/ + */ function script($url, $options = array()) { if (is_bool($options)) { list($inline, $options) = array($options, array()); @@ -472,12 +470,10 @@ class HtmlHelper extends AppHelper { $url = str_replace(JS_URL, 'cjs/', $url); } } - $inline = $options['inline']; - unset($options['inline'], $options['once']); - $attributes = $this->_parseAttributes($options, ' ', ' '); - $out = $this->output(sprintf($this->tags['javascriptlink'], $url, $attributes)); + $attributes = $this->_parseAttributes($options, array('inline', 'once'), ' '); + $out = sprintf($this->tags['javascriptlink'], $url, $attributes); - if ($inline) { + if ($options['inline']) { return $out; } else { $view =& ClassRegistry::getObject('view'); @@ -495,10 +491,9 @@ class HtmlHelper extends AppHelper { * @param string $script The script to wrap * @param array $options The options to use. * @return mixed string or null depending on the value of `$options['inline']` - **/ + */ function scriptBlock($script, $options = array()) { - $defaultOptions = array('safe' => true, 'inline' => true); - $options = array_merge($defaultOptions, $options); + $options += array('safe' => true, 'inline' => true); if ($options['safe']) { $script = "\n" . '//<![CDATA[' . "\n" . $script . "\n" . '//]]>' . "\n"; } @@ -525,10 +520,9 @@ class HtmlHelper extends AppHelper { * * @param array $options Options for the code block. * @return void - **/ + */ function scriptStart($options = array()) { - $defaultOptions = array('safe' => true, 'inline' => true); - $options = array_merge($defaultOptions, $options); + $options += array('safe' => true, 'inline' => true); $this->_scriptBlockOptions = $options; ob_start(); return null; @@ -539,7 +533,7 @@ class HtmlHelper extends AppHelper { * used when the scriptBlock was started * * @return mixed depending on the settings of scriptStart() either a script tag or null - **/ + */ function scriptEnd() { $buffer = ob_get_clean(); $options = $this->_scriptBlockOptions; @@ -565,7 +559,7 @@ class HtmlHelper extends AppHelper { if ($oneline) { return join(' ', $out); } - return join("\n", $out); + return implode("\n", $out); } /** @@ -577,7 +571,7 @@ class HtmlHelper extends AppHelper { * @access public */ function getCrumbs($separator = '»', $startText = false) { - if (count($this->_crumbs)) { + if (!empty($this->_crumbs)) { $out = array(); if ($startText) { $out[] = $this->link($startText, '/'); @@ -590,7 +584,7 @@ class HtmlHelper extends AppHelper { $out[] = $crumb[0]; } } - return $this->output(join($separator, $out)); + return join($separator, $out); } else { return null; } @@ -629,9 +623,9 @@ class HtmlHelper extends AppHelper { $image = sprintf($this->tags['image'], $path, $this->_parseAttributes($options, null, '', ' ')); if ($url) { - return $this->output(sprintf($this->tags['link'], $this->url($url), null, $image)); + return sprintf($this->tags['link'], $this->url($url), null, $image); } - return $this->output($image); + return $image; } /** @@ -648,8 +642,7 @@ class HtmlHelper extends AppHelper { foreach ($names as $arg) { $out[] = sprintf($this->tags['tableheader'], $this->_parseAttributes($thOptions), $arg); } - $data = sprintf($this->tags['tablerow'], $this->_parseAttributes($trOptions), join(' ', $out)); - return $this->output($data); + return sprintf($this->tags['tablerow'], $this->_parseAttributes($trOptions), join(' ', $out)); } /** @@ -701,9 +694,9 @@ class HtmlHelper extends AppHelper { $cellsOut[] = sprintf($this->tags['tablecell'], $this->_parseAttributes($cellOptions), $cell); } $options = $this->_parseAttributes($count % 2 ? $oddTrOptions : $evenTrOptions); - $out[] = sprintf($this->tags['tablerow'], $options, join(' ', $cellsOut)); + $out[] = sprintf($this->tags['tablerow'], $options, implode(' ', $cellsOut)); } - return $this->output(join("\n", $out)); + return implode("\n", $out); } /** @@ -734,7 +727,7 @@ class HtmlHelper extends AppHelper { } else { $tag = 'tag'; } - return $this->output(sprintf($this->tags[$tag], $name, $this->_parseAttributes($options, null, ' ', ''), $text, $name)); + return sprintf($this->tags[$tag], $name, $this->_parseAttributes($options, null, ' ', ''), $text, $name); } /** @@ -783,7 +776,7 @@ class HtmlHelper extends AppHelper { } else { $tag = 'para'; } - return $this->output(sprintf($this->tags[$tag], $this->_parseAttributes($options, null, ' ', ''), $text)); + return sprintf($this->tags[$tag], $this->_parseAttributes($options, null, ' ', ''), $text); } /** diff --git a/cake/libs/view/helpers/javascript.php b/cake/libs/view/helpers/javascript.php index 935c65001..fe7ae59a2 100644 --- a/cake/libs/view/helpers/javascript.php +++ b/cake/libs/view/helpers/javascript.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Javascript Helper class file. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -279,7 +273,7 @@ class JavascriptHelper extends AppHelper { } } } - $out = $this->output(sprintf($this->tags['javascriptlink'], $url)); + $out = sprintf($this->tags['javascriptlink'], $url); if ($inline) { return $out; @@ -325,7 +319,7 @@ class JavascriptHelper extends AppHelper { * Encode a string into JSON. Converts and escapes necessary characters. * * @return void - **/ + */ function _utf8ToHex($string) { $length = strlen($string); $return = ''; @@ -661,9 +655,9 @@ class JavascriptHelper extends AppHelper { } if (!$numeric) { - $rt = '{' . join(',', $out) . '}'; + $rt = '{' . implode(',', $out) . '}'; } else { - $rt = '[' . join(',', $out) . ']'; + $rt = '[' . implode(',', $out) . ']'; } } $rt = $options['prefix'] . $rt . $options['postfix']; diff --git a/cake/libs/view/helpers/jquery_engine.php b/cake/libs/view/helpers/jquery_engine.php index b806794f0..7c592f6e3 100644 --- a/cake/libs/view/helpers/jquery_engine.php +++ b/cake/libs/view/helpers/jquery_engine.php @@ -6,20 +6,19 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework <http://www.cakephp.org/> + * Copyright 2006-2009, 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. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.view.helpers - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); @@ -28,7 +27,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * Option mappings for jQuery * * @var array - **/ + */ var $_optionMap = array( 'request' => array( 'type' => 'dataType', @@ -56,7 +55,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * callback arguments lists * * @var string - **/ + */ var $_callbackArguments = array( 'slider' => array( 'start' => 'event, ui', @@ -104,7 +103,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * when jQuery is put into noConflict() mode. * * @var string - **/ + */ var $jQueryObject = '$'; /** @@ -117,7 +116,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param string $callbacks Array of callback / special options. * @access public * @return string - **/ + */ function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) { $options = $this->_mapOptions($method, $options); $options = $this->_prepareCallbacks($method, $options); @@ -134,7 +133,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * * @param string $selector The selector that is targeted * @return object instance of $this. Allows chained methods. - **/ + */ function get($selector) { if ($selector == 'window' || $selector == 'document') { $this->selection = $this->jQueryObject . '(' . $selector .')'; @@ -156,7 +155,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param string $callback The Javascript function you wish to trigger or the function literal * @param array $options Options for the event. * @return string completed event handler - **/ + */ function event($type, $callback, $options = array()) { $defaults = array('wrap' => true, 'stop' => true); $options = array_merge($defaults, $options); @@ -176,7 +175,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * * @param string $functionBody The code to run on domReady * @return string completed domReady method - **/ + */ function domReady($functionBody) { $this->get('document'); return $this->event('ready', $functionBody, array('stop' => false)); @@ -188,7 +187,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param string $method The method you want to apply to the selection * @param string $callback The function body you wish to apply during the iteration. * @return string completed iteration - **/ + */ function each($callback) { return $this->selection . '.each(function () {' . $callback . '});'; } @@ -200,7 +199,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the effect. * @return string completed string with effect. * @see JsBaseEngineHelper::effect() - **/ + */ function effect($name, $options = array()) { $speed = null; if (isset($options['speed']) && in_array($options['speed'], array('fast', 'slow'))) { @@ -231,7 +230,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param mixed $url * @param array $options * @return string The completed ajax call. - **/ + */ function request($url, $options = array()) { $url = $this->url($url); $options = $this->_mapOptions('request', $options); @@ -267,7 +266,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the sortable. * @return string Completed sortable script. * @see JsHelper::sortable() for options list. - **/ + */ function sortable($options = array()) { $template = '%s.sortable({%s});'; return $this->_methodTemplate('sortable', $template, $options); @@ -281,7 +280,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the draggable element. * @return string Completed Draggable script. * @see JsHelper::drag() for options list. - **/ + */ function drag($options = array()) { $template = '%s.draggable({%s});'; return $this->_methodTemplate('drag', $template, $options); @@ -295,7 +294,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the droppable element. * @return string Completed Droppable script. * @see JsHelper::drop() for options list. - **/ + */ function drop($options = array()) { $template = '%s.droppable({%s});'; return $this->_methodTemplate('drop', $template, $options); @@ -309,7 +308,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the droppable element. * @return string Completed Slider script. * @see JsHelper::slider() for options list. - **/ + */ function slider($options = array()) { $callbacks = array('start', 'change', 'slide', 'stop'); $template = '%s.slider({%s});'; @@ -323,7 +322,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { * @param array $options Options for the serialization * @return string completed form serialization script * @see JsHelper::serializeForm() for option list. - **/ + */ function serializeForm($options = array()) { $options = array_merge(array('isForm' => false, 'inline' => false), $options); $selector = $this->selection; diff --git a/cake/libs/view/helpers/js.php b/cake/libs/view/helpers/js.php index 14740df48..ccd955fc1 100644 --- a/cake/libs/view/helpers/js.php +++ b/cake/libs/view/helpers/js.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -27,20 +26,20 @@ * * @package cake * @subpackage cake.cake.libs.view.helpers - **/ + */ class JsHelper extends AppHelper { /** * Whether or not you want scripts to be buffered or output. * * @var boolean - **/ + */ var $bufferScripts = true; /** * helpers * * @var array - **/ + */ var $helpers = array('Html', 'Form'); /** @@ -48,14 +47,14 @@ class JsHelper extends AppHelper { * * @var array * @see JsHelper::set() - **/ + */ var $__jsVars = array(); /** * Scripts that are queued for output * * @var array - **/ + */ var $__bufferedScripts = array(); /** @@ -63,14 +62,14 @@ class JsHelper extends AppHelper { * * @var string * @access private - **/ + */ var $__engineName; /** * The javascript variable created by set() variables. * * @var string - **/ + */ var $setVariable = APP_DIR; /** @@ -79,7 +78,7 @@ class JsHelper extends AppHelper { * @param array $settings Settings array contains name of engine helper. * @access public * @return void - **/ + */ function __construct($settings = array()) { $className = 'Jquery'; if (is_array($settings) && isset($settings[0])) { @@ -88,9 +87,8 @@ class JsHelper extends AppHelper { $className = $settings; } $engineName = $className; - if (strpos($className, '.') !== false) { - list($plugin, $className) = explode('.', $className); - } + list($plugin, $className) = pluginSplit($className); + $this->__engineName = $className . 'Engine'; $engineClass = $engineName . 'Engine'; $this->helpers[] = $engineClass; @@ -116,7 +114,7 @@ class JsHelper extends AppHelper { * @param array $params Parameters for the method being called. * @access public * @return mixed Depends on the return of the dispatched method, or it could be an instance of the EngineHelper - **/ + */ function call__($method, $params) { if (isset($this->{$this->__engineName}) && method_exists($this->{$this->__engineName}, $method)) { $buffer = false; @@ -159,7 +157,7 @@ class JsHelper extends AppHelper { * @param array $options Options to use for encoding JSON. See JsBaseEngineHelper::object() for more details. * @return string encoded JSON * @deprecated Remove when support for PHP4 and Object::object are removed. - **/ + */ function object($data = array(), $options = array()) { return $this->{$this->__engineName}->object($data, $options); } @@ -179,7 +177,7 @@ class JsHelper extends AppHelper { * * @param array $options options for the code block * @return string completed javascript tag. - **/ + */ function writeBuffer($options = array()) { $defaults = array('onDomReady' => true, 'inline' => true, 'cache' => false, 'clear' => true, 'safe' => true); $options = array_merge($defaults, $options); @@ -209,7 +207,7 @@ class JsHelper extends AppHelper { * Write a script to the cached scripts. * * @return void - **/ + */ function buffer($script) { $this->__bufferedScripts[] = $script; } @@ -219,7 +217,7 @@ class JsHelper extends AppHelper { * * @param boolean $clear Whether or not to clear the script caches (default true) * @return array Array of scripts added to the request. - **/ + */ function getBuffer($clear = true) { $this->_createVars(); $scripts = $this->__bufferedScripts; @@ -234,7 +232,7 @@ class JsHelper extends AppHelper { * Generates the object string for variables passed to javascript. * * @return string - **/ + */ function _createVars() { if (!empty($this->__jsVars)) { $setVar = (strpos($this->setVariable, '.')) ? $this->setVariable : 'var ' . $this->setVariable; @@ -259,7 +257,7 @@ class JsHelper extends AppHelper { * @param mixed $url Mixed either a string URL or an cake url array. * @param array $options Options for both the HTML element and Js::request() * @return string Completed link. If buffering is disabled a script tag will be returned as well. - **/ + */ function link($title, $url = null, $options = array()) { if (!isset($options['id'])) { $options['id'] = 'link-' . intval(mt_rand()); @@ -294,7 +292,7 @@ class JsHelper extends AppHelper { * @param mixed $one * @param mixed $two * @return void - **/ + */ function set($one, $two = null) { $data = null; if (is_array($one)) { @@ -323,7 +321,7 @@ class JsHelper extends AppHelper { * @param string $title The display text of the submit button. * @param array $options Array of options to use. * @return string Completed submit button. - **/ + */ function submit($caption = null, $options = array()) { if (!isset($options['id'])) { $options['id'] = 'submit-' . intval(mt_rand()); @@ -365,7 +363,7 @@ class JsHelper extends AppHelper { * @param array $options Options to filter. * @param array $additional Array of additional keys to extract and include in the return options array. * @return array Array of options for non-js. - **/ + */ function _getHtmlOptions(&$options, $additional = array()) { $htmlKeys = array_merge(array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title'), $additional); $htmlOptions = array(); @@ -389,14 +387,14 @@ class JsHelper extends AppHelper { * Abstract Base Class for All JsEngines to extend. Provides generic methods. * * @package cake.view.helpers - **/ + */ class JsBaseEngineHelper extends AppHelper { /** * Determines whether native JSON extension is used for encoding. Set by object constructor. * * @var boolean * @access public - **/ + */ var $useNative = false; /** @@ -404,7 +402,7 @@ class JsBaseEngineHelper extends AppHelper { * * @var string * @access public - **/ + */ var $selection; /** @@ -413,7 +411,7 @@ class JsBaseEngineHelper extends AppHelper { * for end user use though. * * @var array - **/ + */ var $_optionMap = array(); /** @@ -421,21 +419,21 @@ class JsBaseEngineHelper extends AppHelper { * This allows specific 'end point' methods to be automatically buffered by the JsHelper. * * @var array - **/ + */ var $bufferedMethods = array('event', 'sortable', 'drag', 'drop', 'slider'); /** * Contains a list of callback names -> default arguments. * * @var array - **/ + */ var $_callbackArguments = array(); /** * Constructor. * * @return void - **/ + */ function __construct() { $this->useNative = function_exists('json_encode'); } @@ -446,7 +444,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $message Message you want to alter. * @access public * @return string completed alert() - **/ + */ function alert($message) { return 'alert("' . $this->escape($message) . '");'; } @@ -457,7 +455,7 @@ class JsBaseEngineHelper extends AppHelper { * @param mixed $url * @param array $options * @return string completed redirect in javascript - **/ + */ function redirect($url = null) { return 'window.location = "' . Router::url($url) . '";'; } @@ -468,7 +466,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $message Message you want confirmed. * @access public * @return string completed confirm() - **/ + */ function confirm($message) { return 'confirm("' . $this->escape($message) . '");'; } @@ -480,7 +478,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $message Message to use in the confirm dialog. * @access public * @return string - **/ + */ function confirmReturn($message) { $out = 'var _confirm = ' . $this->confirm($message); $out .= "if (!_confirm) {\n\treturn false;\n}"; @@ -494,7 +492,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $default Default message * @access public * @return string completed prompt() - **/ + */ function prompt($message, $default = '') { return 'prompt("' . $this->escape($message) . '", "' . $this->escape($default) . '");'; } @@ -512,7 +510,7 @@ class JsBaseEngineHelper extends AppHelper { * @param array $options Set of options, see above. * @return string A JSON code block * @access public - **/ + */ function object($data = array(), $options = array()) { $defaultOptions = array( 'prefix' => '', 'postfix' => '', @@ -572,7 +570,7 @@ class JsBaseEngineHelper extends AppHelper { * @param boolean $quoteStrings If false, leaves string values unquoted * @return string a JavaScript-safe/JSON representation of $val * @access public - **/ + */ function value($val, $quoteString = true) { switch (true) { case (is_array($val) || is_object($val)): @@ -612,7 +610,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $script String that needs to get escaped. * @return string Escaped string. * @access public - **/ + */ function escape($string) { App::import('Core', 'Multibyte'); return $this->_utf8ToHex($string); @@ -622,7 +620,7 @@ class JsBaseEngineHelper extends AppHelper { * Encode a string into JSON. Converts and escapes necessary characters. * * @return void - **/ + */ function _utf8ToHex($string) { $length = strlen($string); $return = ''; @@ -717,7 +715,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param string $selector The selector that is targeted * @return object instance of $this. Allows chained methods. - **/ + */ function get($selector) { trigger_error(sprintf(__('%s does not have get() implemented', true), get_class($this)), E_USER_WARNING); return $this; @@ -735,7 +733,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $callback The Javascript function you wish to trigger or the function literal * @param array $options Options for the event. * @return string completed event handler - **/ + */ function event($type, $callback, $options = array()) { trigger_error(sprintf(__('%s does not have event() implemented', true), get_class($this)), E_USER_WARNING); } @@ -745,7 +743,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param string $functionBody The code to run on domReady * @return string completed domReady method - **/ + */ function domReady($functionBody) { trigger_error(sprintf(__('%s does not have domReady() implemented', true), get_class($this)), E_USER_WARNING); } @@ -755,7 +753,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param string $callback The function body you wish to apply during the iteration. * @return string completed iteration - **/ + */ function each($callback) { trigger_error(sprintf(__('%s does not have each() implemented', true), get_class($this)), E_USER_WARNING); } @@ -782,7 +780,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $name The name of the effect to trigger. * @param array $options Array of options for the effect. * @return string completed string with effect. - **/ + */ function effect($name, $options) { trigger_error(sprintf(__('%s does not have effect() implemented', true), get_class($this)), E_USER_WARNING); } @@ -811,7 +809,7 @@ class JsBaseEngineHelper extends AppHelper { * @param mixed $url Array or String URL to target with the request. * @param array $options Array of options. See above for cross library supported options * @return string XHR request. - **/ + */ function request($url, $options = array()) { trigger_error(sprintf(__('%s does not have request() implemented', true), get_class($this)), E_USER_WARNING); } @@ -834,7 +832,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param array $options Options array see above. * @return string Completed drag script - **/ + */ function drag($options = array()) { trigger_error(sprintf(__('%s does not have drag() implemented', true), get_class($this)), E_USER_WARNING); } @@ -855,7 +853,7 @@ class JsBaseEngineHelper extends AppHelper { * - `leave` - Event fired when a drag is removed from a drop zone without being dropped. * * @return string Completed drop script - **/ + */ function drop($options = array()) { trigger_error(sprintf(__('%s does not have drop() implemented', true), get_class($this)), E_USER_WARNING); } @@ -879,7 +877,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param array $options Array of options for the sortable. See above. * @return string Completed sortable script. - **/ + */ function sortable() { trigger_error(sprintf(__('%s does not have sortable() implemented', true), get_class($this)), E_USER_WARNING); } @@ -902,7 +900,7 @@ class JsBaseEngineHelper extends AppHelper { * - `complete` - Fired when the user stops sliding the handle * * @return string Completed slider script - **/ + */ function slider() { trigger_error(sprintf(__('%s does not have slider() implemented', true), get_class($this)), E_USER_WARNING); } @@ -920,7 +918,7 @@ class JsBaseEngineHelper extends AppHelper { * * @param array $options options for serialization generation. * @return string completed form serialization script - **/ + */ function serializeForm() { trigger_error( sprintf(__('%s does not have serializeForm() implemented', true), get_class($this)), E_USER_WARNING @@ -936,7 +934,7 @@ class JsBaseEngineHelper extends AppHelper { * @param array $safeKeys Keys that should not be escaped. * @return string * @access protected - **/ + */ function _parseOptions($options, $safeKeys = array()) { $out = array(); $safeKeys = array_flip($safeKeys); @@ -958,7 +956,7 @@ class JsBaseEngineHelper extends AppHelper { * @param array $options Array of options to map. * @return array Array of mapped options. * @access protected - **/ + */ function _mapOptions($method, $options) { if (!isset($this->_optionMap[$method])) { return $options; @@ -981,7 +979,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $callbacks Additional Keys that contain callbacks * @access protected * @return array Array of options with callbacks added. - **/ + */ function _prepareCallbacks($method, $options, $callbacks = array()) { $wrapCallbacks = true; if (isset($options['wrapCallbacks'])) { @@ -1017,7 +1015,7 @@ class JsBaseEngineHelper extends AppHelper { * @param string $method Name of method processing options for. * @param array $options Array of options to process. * @return string Parsed options string. - **/ + */ function _processOptions($method, $options) { $options = $this->_mapOptions($method, $options); $options = $this->_prepareCallbacks($method, $options); @@ -1031,7 +1029,7 @@ class JsBaseEngineHelper extends AppHelper { * @param array $parameters Array of parameters to convert to a query string * @return string Querystring fragment * @access protected - **/ + */ function _toQuerystring($parameters) { $out = ''; $keys = array_keys($parameters); diff --git a/cake/libs/view/helpers/mootools_engine.php b/cake/libs/view/helpers/mootools_engine.php index 6d7594c5a..7fe26e33b 100644 --- a/cake/libs/view/helpers/mootools_engine.php +++ b/cake/libs/view/helpers/mootools_engine.php @@ -12,19 +12,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.libs.view.helpers * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); @@ -33,7 +32,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * Option mappings for MooTools * * @var array - **/ + */ var $_optionMap = array( 'request' => array( 'complete' => 'onComplete', @@ -71,7 +70,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * Contains a list of callback names -> default arguments. * * @var array - **/ + */ var $_callbackArguments = array( 'slider' => array( 'onTick' => 'position', @@ -117,7 +116,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * * @param string $selector The selector that is targeted * @return object instance of $this. Allows chained methods. - **/ + */ function get($selector) { $this->_multipleSelection = false; if ($selector == 'window' || $selector == 'document') { @@ -145,7 +144,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param string $callback The Javascript function you wish to trigger or the function literal * @param array $options Options for the event. * @return string completed event handler - **/ + */ function event($type, $callback, $options = array()) { $defaults = array('wrap' => true, 'stop' => true); $options = array_merge($defaults, $options); @@ -166,7 +165,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * * @param string $functionBody The code to run on domReady * @return string completed domReady method - **/ + */ function domReady($functionBody) { $this->selection = 'window'; return $this->event('domready', $functionBody, array('stop' => false)); @@ -178,7 +177,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param string $method The method you want to apply to the selection * @param string $callback The function body you wish to apply during the iteration. * @return string completed iteration - **/ + */ function each($callback) { return $this->selection . '.each(function (item, index) {' . $callback . '});'; } @@ -190,7 +189,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the effect. * @return string completed string with effect. * @see JsBaseEngineHelper::effect() - **/ + */ function effect($name, $options = array()) { $speed = null; if (isset($options['speed']) && in_array($options['speed'], array('fast', 'slow'))) { @@ -232,7 +231,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param mixed $url * @param array $options * @return string The completed ajax call. - **/ + */ function request($url, $options = array()) { $url = $this->url($url); $options = $this->_mapOptions('request', $options); @@ -271,7 +270,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the sortable. * @return string Completed sortable script. * @see JsHelper::sortable() for options list. - **/ + */ function sortable($options = array()) { $options = $this->_processOptions('sortable', $options); return 'var jsSortable = new Sortables(' . $this->selection . ', {' . $options . '});'; @@ -285,7 +284,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the draggable. * @return string Completed draggable script. * @see JsHelper::drag() for options list. - **/ + */ function drag($options = array()) { $options = $this->_processOptions('drag', $options); return $this->selection . '.makeDraggable({' . $options . '});'; @@ -304,7 +303,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the droppable. * @return string Completed droppable script. * @see JsHelper::drop() for options list. - **/ + */ function drop($options = array()) { if (empty($options['drag'])) { trigger_error( @@ -334,7 +333,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the slider. * @return string Completed slider script. * @see JsHelper::slider() for options list. - **/ + */ function slider($options = array()) { $slider = $this->selection; $this->get($options['handle']); @@ -359,7 +358,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options. * @return string Completed serializeForm() snippet * @see JsHelper::serializeForm() - **/ + */ function serializeForm($options = array()) { $options = array_merge(array('isForm' => false, 'inline' => false), $options); $selection = $this->selection; diff --git a/cake/libs/view/helpers/number.php b/cake/libs/view/helpers/number.php index c9226b524..6503c234e 100644 --- a/cake/libs/view/helpers/number.php +++ b/cake/libs/view/helpers/number.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -37,7 +36,7 @@ class NumberHelper extends AppHelper { * * @var array * @access protected - **/ + */ var $_currencies = array( 'USD' => array( 'before' => '$', 'after' => 'c', 'zero' => 0, 'places' => 2, 'thousands' => ',', @@ -58,7 +57,7 @@ class NumberHelper extends AppHelper { * * @var array * @access protected - **/ + */ var $_currencyDefaults = array( 'before'=>'', 'after' => '', 'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.','negative' => '()', 'escape' => true @@ -223,7 +222,7 @@ class NumberHelper extends AppHelper { * @param string $formatName The format name to be used in the future. * @param array $options The array of options for this format. * @return void - **/ + */ function addFormat($formatName, $options) { $this->_currencies[$formatName] = $options + $this->_currencyDefaults; } diff --git a/cake/libs/view/helpers/paginator.php b/cake/libs/view/helpers/paginator.php index 3a71d0a66..dc0fe30f4 100644 --- a/cake/libs/view/helpers/paginator.php +++ b/cake/libs/view/helpers/paginator.php @@ -46,7 +46,7 @@ class PaginatorHelper extends AppHelper { * The class used for 'Ajax' pagination links. * * @var string - **/ + */ var $_ajaxHelperClass = 'Js'; /** @@ -54,20 +54,20 @@ class PaginatorHelper extends AppHelper { * * The values that may be specified are: * - * - <i>$options['format']</i> Format of the counter. Supported formats are 'range' and 'pages' - * and custom (default). In the default mode the supplied string is parsed and constants are replaced - * by their actual values. - * Constants: %page%, %pages%, %current%, %count%, %start%, %end% . - * - <i>$options['separator']</i> The separator of the actual page and number of pages (default: ' of '). - * - <i>$options['url']</i> Url of the action. See Router::url() - * - <i>$options['url']['sort']</i> the key that the recordset is sorted. - * - <i>$options['url']['direction']</i> Direction of the sorting (default: 'asc'). - * - <i>$options['url']['page']</i> Page # to display. - * - <i>$options['model']</i> The name of the model. - * - <i>$options['escape']</i> Defines if the title field for the link should be escaped (default: true). - * - <i>$options['update']</i> DOM id of the element updated with the results of the AJAX call. - * If this key isn't specified Paginator will use plain HTML links. - * - <i>$options['indicator']</i> DOM id of the element that will be shown when doing AJAX requests. + * - `$options['format']` Format of the counter. Supported formats are 'range' and 'pages' + * and custom (default). In the default mode the supplied string is parsed and constants are replaced + * by their actual values. + * Constants: %page%, %pages%, %current%, %count%, %start%, %end% . + * - `$options['separator']` The separator of the actual page and number of pages (default: ' of '). + * - `$options['url']` Url of the action. See Router::url() + * - `$options['url']['sort']` the key that the recordset is sorted. + * - `$options['url']['direction']` Direction of the sorting (default: 'asc'). + * - `$options['url']['page']` Page # to display. + * - `$options['model']` The name of the model. + * - `$options['escape']` Defines if the title field for the link should be escaped (default: true). + * - `$options['update']` DOM id of the element updated with the results of the AJAX call. + * If this key isn't specified Paginator will use plain HTML links. + * - `$options['indicator']` DOM id of the element that will be shown when doing AJAX requests. * * @var array */ @@ -77,13 +77,13 @@ class PaginatorHelper extends AppHelper { * Constructor for the helper. Sets up the helper that is used for creating 'AJAX' links. * * Use `var $helpers = array('Paginator' => array('ajax' => 'CustomHelper'));` to set a custom Helper - * or choose a non JsHelper Helper. If you want to use a specific library with JsHelper declare JsHelper and its + * or choose a non JsHelper Helper. If you want to use a specific library with JsHelper declare JsHelper and its * adapter before including PaginatorHelper in your helpers array. * * The chosen custom helper must implement a `link()` method. * * @return void - **/ + */ function __construct($config = array()) { $ajaxProvider = isset($config['ajax']) ? $config['ajax'] : 'Js'; $this->helpers[] = $ajaxProvider; @@ -100,10 +100,19 @@ class PaginatorHelper extends AppHelper { } } +/** + * Before render callback. Overridden to merge passed args with url options. + */ + function beforeRender() { + $this->options['url'] = array_merge($this->params['pass'], $this->params['named']); + + parent::beforeRender(); + } + /** * Gets the current paging parameters from the resultset for the given model * - * @param string $model Optional model name. Uses the default if none is specified. + * @param string $model Optional model name. Uses the default if none is specified. * @return array The array of paging parameters for the paginated resultset. */ function params($model = null) { @@ -119,7 +128,7 @@ class PaginatorHelper extends AppHelper { /** * Sets default options for all pagination links * - * @param mixed $options Default options for pagination links. If a string is supplied - it + * @param mixed $options Default options for pagination links. If a string is supplied - it * is used as the DOM id element to update. See #options for list of keys. */ function options($options = array()) { @@ -151,7 +160,7 @@ class PaginatorHelper extends AppHelper { /** * Gets the current page of the recordset for the given model * - * @param string $model Optional model name. Uses the default if none is specified. + * @param string $model Optional model name. Uses the default if none is specified. * @return string The current page number of the recordset. */ function current($model = null) { @@ -166,8 +175,8 @@ class PaginatorHelper extends AppHelper { /** * Gets the current key by which the recordset is sorted * - * @param string $model Optional model name. Uses the default if none is specified. - * @param mixed $options Options for pagination links. See #options for list of keys. + * @param string $model Optional model name. Uses the default if none is specified. + * @param mixed $options Options for pagination links. See #options for list of keys. * @return string The name of the key by which the recordset is being sorted, or * null if the results are not currently sorted. */ @@ -198,8 +207,8 @@ class PaginatorHelper extends AppHelper { /** * Gets the current direction the recordset is sorted * - * @param string $model Optional model name. Uses the default if none is specified. - * @param mixed $options Options for pagination links. See #options for list of keys. + * @param string $model Optional model name. Uses the default if none is specified. + * @param mixed $options Options for pagination links. See #options for list of keys. * @return string The direction by which the recordset is being sorted, or * null if the results are not currently sorted. */ @@ -226,6 +235,12 @@ class PaginatorHelper extends AppHelper { /** * Generates a "previous" link for a set of paged records * + * Options: + * + * - `tag` The tag wrapping tag you want to use, defaults to 'span' + * - `escape` Whether you want the contents html entity encoded, defaults to true + * - `model` The model to use, defaults to PaginatorHelper::defaultModel() + * * @param string $title Title for the link. Defaults to '<< Previous'. * @param mixed $options Options for pagination link. See #options for list of keys. * @param string $disabledTitle Title when the link is disabled. @@ -239,10 +254,16 @@ class PaginatorHelper extends AppHelper { /** * Generates a "next" link for a set of paged records * - * @param string $title Title for the link. Defaults to 'Next >>'. - * @param mixed $options Options for pagination link. See #options for list of keys. - * @param string $disabledTitle Title when the link is disabled. - * @param mixed $disabledOptions Options for the disabled pagination link. See #options for list of keys. + * Options: + * + * - `tag` The tag wrapping tag you want to use, defaults to 'span' + * - `escape` Whether you want the contents html entity encoded, defaults to true + * - `model` The model to use, defaults to PaginatorHelper::defaultModel() + * + * @param string $title Title for the link. Defaults to 'Next >>'. + * @param mixed $options Options for pagination link. See above for list of keys. + * @param string $disabledTitle Title when the link is disabled. + * @param mixed $disabledOptions Options for the disabled pagination link. See above for list of keys. * @return string A "next" link or or $disabledTitle text if the link is disabled. */ function next($title = 'Next >>', $options = array(), $disabledTitle = null, $disabledOptions = array()) { @@ -253,10 +274,15 @@ class PaginatorHelper extends AppHelper { * Generates a sorting link. Sets named parameters for the sort and direction. Handles * direction switching automatically. * + * Options: + * + * - `escape` Whether you want the contents html entity encoded, defaults to true + * - `model` The model to use, defaults to PaginatorHelper::defaultModel() + * * @param string $title Title for the link. * @param string $key The name of the key that the recordset should be sorted. If $key is null * $title will be used for the key, and a title will be generated by inflection. - * @param array $options Options for sorting link. See #options for list of keys. + * @param array $options Options for sorting link. See above for list of keys. * @return string A link sorting default by 'asc'. If the resultset is sorted 'asc' by the specified * key the returned link will sort by 'desc'. */ @@ -276,9 +302,7 @@ class PaginatorHelper extends AppHelper { $isSorted = ($sortKey === $key || $sortKey === $this->defaultModel() . '.' . $key); if ($isSorted) { - if ($this->sortDir($options['model']) === 'asc') { - $dir = 'desc'; - } + $dir = $this->sortDir($options['model']) === 'asc' ? 'desc' : 'asc'; $class = $dir === 'asc' ? 'desc' : 'asc'; if (!empty($options['class'])) { $options['class'] .= $class; @@ -297,9 +321,16 @@ class PaginatorHelper extends AppHelper { /** * Generates a plain or Ajax link with pagination parameters * - * @param string $title Title for the link. - * @param mixed $url Url for the action. See Router::url() - * @param array $options Options for the link. See #options for list of keys. + * Options + * + * - `update` The Id of the DOM element you wish to update. Creates Ajax enabled links + * with the AjaxHelper. + * - `escape` Whether you want the contents html entity encoded, defaults to true + * - `model` The model to use, defaults to PaginatorHelper::defaultModel() + * + * @param string $title Title for the link. + * @param mixed $url Url for the action. See Router::url() + * @param array $options Options for the link. See #options for list of keys. * @return string A link with pagination parameters. */ function link($title, $url = array(), $options = array()) { @@ -325,9 +356,9 @@ class PaginatorHelper extends AppHelper { /** * Merges passed URL options with current pagination state to generate a pagination URL. * - * @param array $options Pagination/URL options array - * @param boolean $asArray - * @param string $model Which model to paginate on + * @param array $options Pagination/URL options array + * @param boolean $asArray Return the url as an array, or a URI string + * @param string $model Which model to paginate on * @return mixed By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript) */ function url($options = array(), $asArray = false, $model = null) { @@ -392,7 +423,7 @@ class PaginatorHelper extends AppHelper { /** * Returns true if the given result set is not at the first page * - * @param string $model Optional model name. Uses the default if none is specified. + * @param string $model Optional model name. Uses the default if none is specified. * @return boolean True if the result set is not at the first page. */ function hasPrev($model = null) { @@ -412,8 +443,8 @@ class PaginatorHelper extends AppHelper { /** * Returns true if the given result set has the page number given by $page * - * @param string $model Optional model name. Uses the default if none is specified. - * @param int $page The page number - if not set defaults to 1. + * @param string $model Optional model name. Uses the default if none is specified. + * @param int $page The page number - if not set defaults to 1. * @return boolean True if the given result set has the specified page number. */ function hasPage($model = null, $page = 1) { @@ -458,8 +489,16 @@ class PaginatorHelper extends AppHelper { /** * Returns a counter string for the paged result set * - * @param mixed $options Options for the counter string. See #options for list of keys. - * @todo See about deprecating the keys in $map for formatting + * Options + * + * - `model` The model to use, defaults to PaginatorHelper::defaultModel(); + * - `format` The format string you want to use, defaults to 'pages' Which generates output like '1 of 5' + * set to 'range' to generate output like '1 - 3 of 13'. Can also be set to a custom string, containing + * the following placeholders `%page%`, `%pages%`, `%current%`, `%count%`, `%start%`, `%end%` and any + * custom content you would like. + * - `separator` The separator string to use, default to ' of ' + * + * @param mixed $options Options for the counter string. See #options for list of keys. * @return string Counter string. */ function counter($options = array()) { @@ -471,7 +510,7 @@ class PaginatorHelper extends AppHelper { array( 'model' => $this->defaultModel(), 'format' => 'pages', - 'separator' => ' of ' + 'separator' => __(' of ', true) ), $options); @@ -516,14 +555,27 @@ class PaginatorHelper extends AppHelper { $out = str_replace($newKeys, array_values($map), $out); break; } - return $this->output($out); + return $out; } /** * Returns a set of numbers for the paged result set * uses a modulus to decide how many numbers to show on each side of the current page (default: 8) * - * @param mixed $options Options for the numbers, (before, after, model, modulus, separator) + * Options + * + * - `before` Content to be inserted before the numbers + * - `after` Content to be inserted after the numbers + * - `model` Model to create numbers for, defaults to PaginatorHelper::defaultModel() + * - `modulus` how many numbers to include on either side of the current page, defaults to 8. + * - `separator` Separator content defaults to ' | ' + * - `tag` The tag to wrap links in, defaults to 'span' + * - `first` Whether you want first links generated, set to an integer to define the number of 'first' + * links to generate + * - `last` Whether you want last links generated, set to an integer to define the number of 'last' + * links to generate + * + * @param mixed $options Options for the numbers, (before, after, model, modulus, separator) * @return string numbers string. */ function numbers($options = array()) { @@ -624,14 +676,21 @@ class PaginatorHelper extends AppHelper { $out .= $after; } - return $this->output($out); + return $out; } /** * Returns a first or set of numbers for the first pages * - * @param mixed $first if string use as label for the link, if numeric print page numbers - * @param mixed $options + * Options: + * + * - `tag` The tag wrapping tag you want to use, defaults to 'span' + * - `before` Content to insert before the link/tag + * - `model` The model to use defaults to PaginatorHelper::defaultModel() + * - `separator` Content between the generated links, defaults to ' | ' + * + * @param mixed $first if string use as label for the link, if numeric print page numbers + * @param mixed $options * @return string numbers string. */ function first($first = '<< first', $options = array()) { @@ -676,8 +735,15 @@ class PaginatorHelper extends AppHelper { /** * Returns a last or set of numbers for the last pages * - * @param mixed $last if string use as label for the link, if numeric print page numbers - * @param mixed $options + * Options: + * + * - `tag` The tag wrapping tag you want to use, defaults to 'span' + * - `before` Content to insert before the link/tag + * - `model` The model to use defaults to PaginatorHelper::defaultModel() + * - `separator` Content between the generated links, defaults to ' | ' + * + * @param mixed $last if string use as label for the link, if numeric print page numbers + * @param mixed $options Array of options * @return string numbers string. */ function last($last = 'last >>', $options = array()) { diff --git a/cake/libs/view/helpers/prototype_engine.php b/cake/libs/view/helpers/prototype_engine.php index 4bee2bfc2..cc5aeb041 100644 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/cake/libs/view/helpers/prototype_engine.php @@ -7,19 +7,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.libs.view.helpers * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Js'); @@ -28,13 +27,13 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * Is the current selection a multiple selection? or is it just a single element. * * @var boolean - **/ + */ var $_multiple = false; /** * Option mappings for Prototype * * @var array - **/ + */ var $_optionMap = array( 'request' => array( 'async' => 'asynchronous', @@ -74,7 +73,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * Contains a list of callback names -> default arguments. * * @var array - **/ + */ var $_callbackArguments = array( 'slider' => array( 'onSlide' => 'value', @@ -109,7 +108,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * * @param string $selector The selector that is targeted * @return object instance of $this. Allows chained methods. - **/ + */ function get($selector) { $this->_multiple = false; if ($selector == 'window' || $selector == 'document') { @@ -136,7 +135,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param string $callback The Javascript function you wish to trigger or the function literal * @param array $options Options for the event. * @return string completed event handler - **/ + */ function event($type, $callback, $options = array()) { $defaults = array('wrap' => true, 'stop' => true); $options = array_merge($defaults, $options); @@ -156,7 +155,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * * @param string $functionBody The code to run on domReady * @return string completed domReady method - **/ + */ function domReady($functionBody) { $this->selection = 'document'; return $this->event('dom:loaded', $functionBody, array('stop' => false)); @@ -167,7 +166,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param string $method The method you want to apply to the selection * @param string $callback The function body you wish to apply during the iteration. * @return string completed iteration - **/ + */ function each($callback) { return $this->selection . '.each(function (item, index) {' . $callback . '});'; } @@ -180,7 +179,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the effect. * @return string completed string with effect. * @see JsBaseEngineHelper::effect() - **/ + */ function effect($name, $options = array()) { $effect = ''; $optionString = null; @@ -221,7 +220,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param mixed $url * @param array $options * @return string The completed ajax call. - **/ + */ function request($url, $options = array()) { $url = '"'. $this->url($url) . '"'; $options = $this->_mapOptions('request', $options); @@ -256,7 +255,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the sortable. * @return string Completed sortable script. * @see JsHelper::sortable() for options list. - **/ + */ function sortable($options = array()) { $options = $this->_processOptions('sortable', $options); if (!empty($options)) { @@ -272,7 +271,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the draggable. * @return string Completed draggable script. * @see JsHelper::draggable() for options list. - **/ + */ function drag($options = array()) { $options = $this->_processOptions('drag', $options); if (!empty($options)) { @@ -291,7 +290,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the droppable. * @return string Completed droppable script. * @see JsHelper::droppable() for options list. - **/ + */ function drop($options = array()) { $options = $this->_processOptions('drop', $options); if (!empty($options)) { @@ -307,7 +306,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options for the slider. * @return string Completed slider script. * @see JsHelper::slider() for options list. - **/ + */ function slider($options = array()) { $slider = $this->selection; $this->get($options['handle']); @@ -331,7 +330,7 @@ class PrototypeEngineHelper extends JsBaseEngineHelper { * @param array $options Array of options. * @return string Completed serializeForm() snippet * @see JsHelper::serializeForm() - **/ + */ function serializeForm($options = array()) { $options = array_merge(array('isForm' => false, 'inline' => false), $options); $selection = $this->selection; diff --git a/cake/libs/view/helpers/rss.php b/cake/libs/view/helpers/rss.php index 5c0b294d1..f885f3da3 100644 --- a/cake/libs/view/helpers/rss.php +++ b/cake/libs/view/helpers/rss.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * RSS Helper class file. * * Simplifies the output of RSS feeds. * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', 'Xml'); @@ -40,7 +34,7 @@ class RssHelper extends XmlHelper { * * @var array * @access public - **/ + */ var $helpers = array('Time'); /** @@ -223,7 +217,7 @@ class RssHelper extends XmlHelper { } $categories[] = $this->elem($key, $attrib, $category); } - $elements[$key] = join('', $categories); + $elements[$key] = implode('', $categories); continue 2; } else if (is_array($val) && isset($val['domain'])) { $attrib['domain'] = $val['domain']; @@ -273,9 +267,9 @@ class RssHelper extends XmlHelper { $elements[$key] = $this->elem($key, $attrib, $val); } if (!empty($elements)) { - $content = join('', $elements); + $content = implode('', $elements); } - return $this->output($this->elem('item', $att, $content, !($content === null))); + return $this->elem('item', $att, $content, !($content === null)); } /** diff --git a/cake/libs/view/helpers/session.php b/cake/libs/view/helpers/session.php index ec7a5e54e..82c7184b4 100644 --- a/cake/libs/view/helpers/session.php +++ b/cake/libs/view/helpers/session.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.1.7.3328 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('cakesession')) { require LIBS . 'cake_session.php'; @@ -126,10 +125,12 @@ class SessionHelper extends CakeSession { * Will default to flash if no param is passed * * @param string $key The [Message.]key you are rendering in the view. - * @return string Will echo the value if $key is set, or false if not set. + * @return boolean|string Will return the value if $key is set, or false if not set. * @access public */ function flash($key = 'flash') { + $out = false; + if ($this->__active === true && $this->__start()) { if (parent::check('Message.' . $key)) { $flash = parent::read('Message.' . $key); @@ -149,12 +150,10 @@ class SessionHelper extends CakeSession { $tmpVars['message'] = $flash['message']; $out = $view->element($flash['element'], $tmpVars); } - echo($out); parent::delete('Message.' . $key); - return true; } } - return false; + return $out; } /** diff --git a/cake/libs/view/helpers/text.php b/cake/libs/view/helpers/text.php index 6159c4962..63b02925e 100644 --- a/cake/libs/view/helpers/text.php +++ b/cake/libs/view/helpers/text.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -329,19 +328,13 @@ class TextHelper extends AppHelper { * Creates a comma separated list where the last two items are joined with 'and', forming natural English * * @param array $list The list to be joined - * @return string + * @param string $and The word used to join the last and second last items together with. Defaults to 'and' + * @param string $separator The separator used to join all othe other items together. Defaults to ', ' + * @return string The glued together string. * @access public */ - function toList($list, $and = 'and') { - $r = ''; - $c = count($list) - 1; - foreach ($list as $i => $item) { - $r .= $item; - if ($c > 0 && $i < $c) { - $r .= ($i < $c - 1 ? ', ' : " {$and} "); - } - } - return $r; + function toList($list, $and = 'and', $separator = ', ') { + return implode($separator, array_slice($list, null, -1)) . ' ' . $and . ' ' . array_pop($list); } } ?> \ No newline at end of file diff --git a/cake/libs/view/helpers/time.php b/cake/libs/view/helpers/time.php index 85f2190ba..d885fa800 100644 --- a/cake/libs/view/helpers/time.php +++ b/cake/libs/view/helpers/time.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * Time Helper class file. * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -68,7 +62,7 @@ class TimeHelper extends AppHelper { if (empty($dateString)) { return false; } - if (is_integer($dateString) || is_numeric($dateString)) { + if (is_int($dateString) || is_numeric($dateString)) { $date = intval($dateString); } else { $date = strtotime($dateString); @@ -93,8 +87,7 @@ class TimeHelper extends AppHelper { $date = time(); } - $ret = date("D, M jS Y, H:i", $date); - return $this->output($ret); + return date("D, M jS Y, H:i", $date); } /** @@ -121,8 +114,7 @@ class TimeHelper extends AppHelper { } else { $ret = date("M jS{$y}, H:i", $date); } - - return $this->output($ret); + return $ret; } /** @@ -140,8 +132,7 @@ class TimeHelper extends AppHelper { $begin = date('Y-m-d', $begin) . ' 00:00:00'; $end = date('Y-m-d', $end) . ' 23:59:59'; - $ret ="($fieldName >= '$begin') AND ($fieldName <= '$end')"; - return $this->output($ret); + return "($fieldName >= '$begin') AND ($fieldName <= '$end')"; } /** @@ -155,8 +146,7 @@ class TimeHelper extends AppHelper { */ function dayAsSql($dateString, $fieldName, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); - $ret = $this->daysAsSql($dateString, $dateString, $fieldName); - return $this->output($ret); + return $this->daysAsSql($dateString, $dateString, $fieldName); } /** @@ -260,7 +250,7 @@ class TimeHelper extends AppHelper { break; } } - return $this->output($date); + return $date; } /** @@ -271,8 +261,7 @@ class TimeHelper extends AppHelper { * @return integer Unix timestamp */ function toUnix($dateString, $userOffset = null) { - $ret = $this->fromString($dateString, $userOffset); - return $this->output($ret); + return $this->fromString($dateString, $userOffset); } /** @@ -284,8 +273,7 @@ class TimeHelper extends AppHelper { */ function toAtom($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); - $ret = date('Y-m-d\TH:i:s\Z', $date); - return $this->output($ret); + return date('Y-m-d\TH:i:s\Z', $date); } /** @@ -297,8 +285,7 @@ class TimeHelper extends AppHelper { */ function toRSS($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); - $ret = date("r", $date); - return $this->output($ret); + return date("r", $date); } /** @@ -478,7 +465,7 @@ class TimeHelper extends AppHelper { $relativeDate = sprintf(__('%s ago', true), $relativeDate); } } - return $this->output($relativeDate); + return $relativeDate; } /** diff --git a/cake/libs/view/helpers/xml.php b/cake/libs/view/helpers/xml.php index e97183d0d..ac7b9775b 100644 --- a/cake/libs/view/helpers/xml.php +++ b/cake/libs/view/helpers/xml.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * XML Helper class file. * * Simplifies the output of XML documents. * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.helpers * @since CakePHP(tm) v 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Xml', 'Set')); @@ -71,7 +65,7 @@ class XmlHelper extends AppHelper { $attrib = 'xml ' . $attrib; } - return $this->output($this->Xml->header($attrib)); + return $this->Xml->header($attrib); } /** @@ -137,7 +131,7 @@ class XmlHelper extends AppHelper { if (!$endTag) { $this->Xml =& $elem; } - return $this->output($out); + return $out; } /** @@ -150,7 +144,7 @@ class XmlHelper extends AppHelper { if ($parent =& $this->Xml->parent()) { $this->Xml =& $parent; } - return $this->output('</' . $name . '>'); + return '</' . $name . '>'; } /** diff --git a/cake/libs/view/layouts/ajax.ctp b/cake/libs/view/layouts/ajax.ctp index 4da27c73a..d49d0986e 100644 --- a/cake/libs/view/layouts/ajax.ctp +++ b/cake/libs/view/layouts/ajax.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/cake/libs/view/layouts/default.ctp b/cake/libs/view/layouts/default.ctp index 8cb1858b9..101de97f8 100644 --- a/cake/libs/view/layouts/default.ctp +++ b/cake/libs/view/layouts/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -46,14 +40,14 @@ </div> <div id="content"> - <?php $this->Session->flash(); ?> + <?php echo $this->Session->flash(); ?> <?php echo $content_for_layout; ?> </div> <div id="footer"> <?php echo $this->Html->link( - $this->Html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")), + $this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')), 'http://www.cakephp.org/', array('target' => '_blank', 'escape' => false) ); diff --git a/cake/libs/view/layouts/email/html/default.ctp b/cake/libs/view/layouts/email/html/default.ctp index 8668b9983..5f76142e7 100644 --- a/cake/libs/view/layouts/email/html/default.ctp +++ b/cake/libs/view/layouts/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> diff --git a/cake/libs/view/layouts/email/text/default.ctp b/cake/libs/view/layouts/email/text/default.ctp index eebf48a62..d20268298 100644 --- a/cake/libs/view/layouts/email/text/default.ctp +++ b/cake/libs/view/layouts/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout;?> diff --git a/cake/libs/view/layouts/flash.ctp b/cake/libs/view/layouts/flash.ctp index 9dc35f91d..2d80a6ddd 100644 --- a/cake/libs/view/layouts/flash.ctp +++ b/cake/libs/view/layouts/flash.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> diff --git a/cake/libs/view/media.php b/cake/libs/view/media.php index 2d870dd10..145ca631d 100644 --- a/cake/libs/view/media.php +++ b/cake/libs/view/media.php @@ -1,29 +1,23 @@ <?php -/* SVN FILE: $Id$ */ - /** * Methods to display or download any type of file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view * @since CakePHP(tm) v 1.2.0.5714 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -class MediaView extends View { +class MediaView { /** * Holds known mime type mappings @@ -96,8 +90,7 @@ class MediaView extends View { * * @param object $controller */ - function __construct(&$controller) { - parent::__construct($controller); + function __construct($controller = null) { } /** diff --git a/cake/libs/view/pages/home.ctp b/cake/libs/view/pages/home.ctp index d370b9691..37951f8c9 100644 --- a/cake/libs/view/pages/home.ctp +++ b/cake/libs/view/pages/home.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (Configure::read() == 0): $this->cakeError('error404'); diff --git a/cake/libs/view/scaffolds/edit.ctp b/cake/libs/view/scaffolds/edit.ctp index 2ff4171bd..0fbae8147 100644 --- a/cake/libs/view/scaffolds/edit.ctp +++ b/cake/libs/view/scaffolds/edit.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.scaffolds * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> form"> diff --git a/cake/libs/view/scaffolds/index.ctp b/cake/libs/view/scaffolds/index.ctp index cd46f9838..6ce3a0514 100644 --- a/cake/libs/view/scaffolds/index.ctp +++ b/cake/libs/view/scaffolds/index.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.console.libs.templates.views * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> index"> diff --git a/cake/libs/view/scaffolds/view.ctp b/cake/libs/view/scaffolds/view.ctp index 3b3de10dd..3c45ef228 100644 --- a/cake/libs/view/scaffolds/view.ctp +++ b/cake/libs/view/scaffolds/view.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.scaffolds * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> view"> diff --git a/cake/libs/view/theme.php b/cake/libs/view/theme.php index ce125f355..a5df7f740 100644 --- a/cake/libs/view/theme.php +++ b/cake/libs/view/theme.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -41,12 +40,6 @@ class ThemeView extends View { function __construct(&$controller) { parent::__construct($controller); $this->theme =& $controller->theme; - - if (!empty($this->theme)) { - if (is_dir(WWW_ROOT . 'themed' . DS . $this->theme)) { - $this->themeWeb = 'themed/'. $this->theme .'/'; - } - } } /** diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index f83fb31a5..854bcc1e5 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view * @since CakePHP(tm) v 0.10.0.1076 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** @@ -162,13 +161,13 @@ class View extends Object { * @var string */ var $subDir = null; - + /** * Theme name. * * @var string */ - var $themeWeb = null; + var $theme = null; /** * Used to define methods a controller that will be cached. @@ -253,7 +252,7 @@ class View extends Object { * Holds View output. * * @var string - **/ + */ var $output = false; /** @@ -455,7 +454,7 @@ class View extends Object { $dataForLayout = array_merge($this->viewVars, array( 'content_for_layout' => $content_for_layout, - 'scripts_for_layout' => join("\n\t", $this->__scripts), + 'scripts_for_layout' => implode("\n\t", $this->__scripts), 'cakeDebug' => $debug )); @@ -723,7 +722,7 @@ class View extends Object { $cache->helpers = $this->helpers; $cache->action = $this->action; $cache->controllerName = $this->name; - $cache->layout = $this->layout; + $cache->layout = $this->layout; $cache->cacheAction = $this->cacheAction; $cache->cache($___viewFn, $out, $cached); } @@ -751,18 +750,14 @@ class View extends Object { $options = $helper; $helper = $i; } - $plugin = $this->plugin; - - if (strpos($helper, '.') !== false) { - list($plugin, $helper) = explode('.', $helper); - } + list($plugin, $helper) = pluginSplit($helper, true, $this->plugin); $helperCn = $helper . 'Helper'; if (!isset($loaded[$helper])) { if (!class_exists($helperCn)) { $isLoaded = false; if (!is_null($plugin)) { - $isLoaded = App::import('Helper', $plugin . '.' . $helper); + $isLoaded = App::import('Helper', $plugin . $helper); } if (!$isLoaded) { if (!App::import('Helper', $helper)) { @@ -784,9 +779,7 @@ class View extends Object { } } $loaded[$helper] =& new $helperCn($options); - $vars = array( - 'base', 'webroot', 'here', 'params', 'action', 'data', 'themeWeb', 'plugin' - ); + $vars = array('base', 'webroot', 'here', 'params', 'action', 'data', 'theme', 'plugin'); $c = count($vars); for ($j = 0; $j < $c; $j++) { @@ -842,7 +835,6 @@ class View extends Object { $name = $this->viewPath . DS . $subDir . $name; } } - $paths = $this->_paths(Inflector::underscore($this->plugin)); $exts = array($this->ext); diff --git a/cake/libs/xml.php b/cake/libs/xml.php index 84c861f56..41d246e3f 100644 --- a/cake/libs/xml.php +++ b/cake/libs/xml.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * XML handling for Cake. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP v .0.10.3.1400 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Set'); @@ -596,7 +590,7 @@ class XmlNode extends Object { * @access public */ function hasChildren() { - if (is_array($this->children) && count($this->children) > 0) { + if (is_array($this->children) && !empty($this->children)) { return true; } return false; @@ -624,7 +618,7 @@ class XmlNode extends Object { } $d .= '<' . $this->name(); - if (count($this->namespaces) > 0) { + if (!empty($this->namespaces) > 0) { foreach ($this->namespaces as $key => $val) { $val = str_replace('"', '\"', $val); $d .= ' xmlns:' . $key . '="' . $val . '"'; @@ -632,14 +626,14 @@ class XmlNode extends Object { } $parent =& $this->parent(); - if ($parent->name === '#document' && count($parent->namespaces) > 0) { + if ($parent->name === '#document' && !empty($parent->namespaces)) { foreach ($parent->namespaces as $key => $val) { $val = str_replace('"', '\"', $val); $d .= ' xmlns:' . $key . '="' . $val . '"'; } } - if (is_array($this->attributes) && count($this->attributes) > 0) { + if (is_array($this->attributes) && !empty($this->attributes)) { foreach ($this->attributes as $key => $val) { if (is_bool($val) && $val === false) { $val = 0; diff --git a/cake/tests/cases/basics.test.php b/cake/tests/cases/basics.test.php index 3d2d9736d..bb24c70f9 100644 --- a/cake/tests/cases/basics.test.php +++ b/cake/tests/cases/basics.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * BasicsTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once CAKE . 'basics.php'; @@ -39,12 +33,12 @@ class BasicsTest extends CakeTestCase { /** * setUp method * - * @access public * @return void + * @access public */ function setUp() { App::build(array( - 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale') + 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS) )); $this->_language = Configure::read('Config.language'); } @@ -52,8 +46,8 @@ class BasicsTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void + * @access public */ function tearDown() { App::build(); @@ -64,7 +58,8 @@ class BasicsTest extends CakeTestCase { * test the array_diff_key compatibility function. * * @return void - **/ + * @access public + */ function testArrayDiffKey() { $one = array('one' => 1, 'two' => 2, 'three' => 3); $two = array('one' => 'one', 'two' => 'two'); @@ -181,8 +176,8 @@ class BasicsTest extends CakeTestCase { /** * test uses() * - * @access public * @return void + * @access public * @deprecated */ function testUses() { @@ -200,8 +195,8 @@ class BasicsTest extends CakeTestCase { /** * Test h() * - * @access public * @return void + * @access public */ function testH() { $string = '<foo>'; @@ -217,8 +212,8 @@ class BasicsTest extends CakeTestCase { /** * Test a() * - * @access public * @return void + * @access public */ function testA() { $result = a('this', 'that', 'bar'); @@ -228,8 +223,8 @@ class BasicsTest extends CakeTestCase { /** * Test aa() * - * @access public * @return void + * @access public */ function testAa() { $result = aa('a', 'b', 'c', 'd'); @@ -244,8 +239,8 @@ class BasicsTest extends CakeTestCase { /** * Test am() * - * @access public * @return void + * @access public */ function testAm() { $result = am(array('one', 'two'), 2, 3, 4); @@ -260,8 +255,8 @@ class BasicsTest extends CakeTestCase { /** * test cache() * - * @access public * @return void + * @access public */ function testCache() { $_cacheDisable = Configure::read('Cache.disable'); @@ -296,8 +291,8 @@ class BasicsTest extends CakeTestCase { /** * test clearCache() * - * @access public * @return void + * @access public */ function testClearCache() { $cacheOff = Configure::read('Cache.disable'); @@ -344,8 +339,8 @@ class BasicsTest extends CakeTestCase { /** * test __() * - * @access public * @return void + * @access public */ function test__() { Configure::write('Config.language', 'rule_1_po'); @@ -368,8 +363,8 @@ class BasicsTest extends CakeTestCase { /** * test __n() * - * @access public * @return void + * @access public */ function test__n() { Configure::write('Config.language', 'rule_1_po'); @@ -396,8 +391,8 @@ class BasicsTest extends CakeTestCase { /** * test __d() * - * @access public * @return void + * @access public */ function test__d() { Configure::write('Config.language', 'rule_1_po'); @@ -424,8 +419,8 @@ class BasicsTest extends CakeTestCase { /** * test __dn() * - * @access public * @return void + * @access public */ function test__dn() { Configure::write('Config.language', 'rule_1_po'); @@ -456,8 +451,8 @@ class BasicsTest extends CakeTestCase { /** * test __c() * - * @access public * @return void + * @access public */ function test__c() { Configure::write('Config.language', 'rule_1_po'); @@ -480,8 +475,8 @@ class BasicsTest extends CakeTestCase { /** * test __dc() * - * @access public * @return void + * @access public */ function test__dc() { Configure::write('Config.language', 'rule_1_po'); @@ -512,8 +507,8 @@ class BasicsTest extends CakeTestCase { /** * test __dcn() * - * @access public * @return void + * @access public */ function test__dcn() { Configure::write('Config.language', 'rule_1_po'); @@ -540,8 +535,8 @@ class BasicsTest extends CakeTestCase { /** * test LogError() * - * @access public * @return void + * @access public */ function testLogError() { @unlink(LOGS . 'error.log'); @@ -558,8 +553,8 @@ class BasicsTest extends CakeTestCase { /** * test fileExistsInPath() * - * @access public * @return void + * @access public */ function testFileExistsInPath() { $this->skipUnless(function_exists('ini_set'), '%s ini_set function not available'); @@ -603,8 +598,8 @@ class BasicsTest extends CakeTestCase { /** * test convertSlash() * - * @access public * @return void + * @access public */ function testConvertSlash() { $result = convertSlash('\path\to\location\\'); @@ -619,8 +614,8 @@ class BasicsTest extends CakeTestCase { /** * test debug() * - * @access public * @return void + * @access public */ function testDebug() { ob_start(); @@ -643,8 +638,8 @@ class BasicsTest extends CakeTestCase { /** * test pr() * - * @access public * @return void + * @access public */ function testPr() { ob_start(); @@ -663,8 +658,8 @@ class BasicsTest extends CakeTestCase { /** * test params() * - * @access public * @return void + * @access public */ function testParams() { $this->assertNull(params('weekend')); @@ -681,8 +676,8 @@ class BasicsTest extends CakeTestCase { /** * test stripslashes_deep() * - * @access public * @return void + * @access public */ function testStripslashesDeep() { $this->skipIf(ini_get('magic_quotes_sybase') === '1', '%s magic_quotes_sybase is on'); @@ -719,8 +714,8 @@ class BasicsTest extends CakeTestCase { /** * test stripslashes_deep() with magic_quotes_sybase on * - * @access public * @return void + * @access public */ function testStripslashesDeepSybase() { $this->skipUnless(ini_get('magic_quotes_sybase') === '1', '%s magic_quotes_sybase is off'); @@ -753,8 +748,8 @@ class BasicsTest extends CakeTestCase { /** * test ife() * - * @access public * @return void + * @access public */ function testIfe() { $this->assertEqual(ife(true, 'a', 'b'), 'a'); @@ -769,5 +764,33 @@ class BasicsTest extends CakeTestCase { $this->assertEqual(ife(0, 'a', 'b'), 'b'); $this->assertEqual(ife(array(), 'a', 'b'), 'b'); } + +/** + * test pluginSplit + * + * @return void + */ + function testPluginSplit() { + $result = pluginSplit('Something.else'); + $this->assertEqual($result, array('Something', 'else')); + + $result = pluginSplit('Something.else.more.dots'); + $this->assertEqual($result, array('Something', 'else.more.dots')); + + $result = pluginSplit('Somethingelse'); + $this->assertEqual($result, array(null, 'Somethingelse')); + + $result = pluginSplit('Something.else', true); + $this->assertEqual($result, array('Something.', 'else')); + + $result = pluginSplit('Something.else.more.dots', true); + $this->assertEqual($result, array('Something.', 'else.more.dots')); + + $result = pluginSplit('Post', false, 'Blog'); + $this->assertEqual($result, array('Blog', 'Post')); + + $result = pluginSplit('Blog.Post', false, 'Ultimate'); + $this->assertEqual($result, array('Blog', 'Post')); + } } ?> \ No newline at end of file diff --git a/cake/tests/cases/console/cake.test.php b/cake/tests/cases/console/cake.test.php index ef725f168..317afe851 100644 --- a/cake/tests/cases/console/cake.test.php +++ b/cake/tests/cases/console/cake.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ShellDispatcherTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2007, Cake Software Foundation, Inc. + * Copyright 2005-2009, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2007, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.console * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('DISABLE_AUTO_DISPATCH')) { @@ -89,8 +83,8 @@ class TestShellDispatcher extends ShellDispatcher { /** * _initEnvironment method * - * @access protected * @return void + * @access protected */ function _initEnvironment() { } @@ -98,8 +92,8 @@ class TestShellDispatcher extends ShellDispatcher { /** * stderr method * - * @access public * @return void + * @access public */ function stderr($string) { $this->stderr .= rtrim($string, ' '); @@ -108,8 +102,8 @@ class TestShellDispatcher extends ShellDispatcher { /** * stdout method * - * @access public * @return void + * @access public */ function stdout($string, $newline = true) { if ($newline) { @@ -122,8 +116,8 @@ class TestShellDispatcher extends ShellDispatcher { /** * clear method * - * @access public * @return void + * @access public */ function clear() { @@ -132,8 +126,8 @@ class TestShellDispatcher extends ShellDispatcher { /** * _stop method * - * @access protected * @return void + * @access protected */ function _stop($status = 0) { $this->stopped = 'Stopped with status: ' . $status; @@ -144,8 +138,8 @@ class TestShellDispatcher extends ShellDispatcher { * getShell * * @param mixed $plugin - * @access public * @return mixed + * @access public */ function getShell($plugin = null) { return $this->_getShell($plugin); @@ -155,8 +149,8 @@ class TestShellDispatcher extends ShellDispatcher { * _getShell * * @param mixed $plugin - * @access protected * @return mixed + * @access protected */ function _getShell($plugin = null) { if (isset($this->TestShell)) { @@ -177,8 +171,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * setUp method * - * @access public * @return void + * @access public */ function setUp() { App::build(array( @@ -195,8 +189,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void + * @access public */ function tearDown() { App::build(); @@ -205,8 +199,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * testParseParams method * - * @access public * @return void + * @access public */ function testParseParams() { $Dispatcher =& new TestShellDispatcher(); @@ -464,8 +458,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * testBuildPaths method * - * @access public * @return void + * @access public */ function testBuildPaths() { $Dispatcher =& new TestShellDispatcher(); @@ -487,8 +481,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify loading of (plugin-) shells * - * @access public * @return void + * @access public */ function testGetShell() { $this->skipIf(class_exists('SampleShell'), '%s SampleShell Class already loaded'); @@ -516,8 +510,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify correct dispatch of Shell subclasses with a main method * - * @access public * @return void + * @access public */ function testDispatchShellWithMain() { Mock::generate('Shell', 'MockWithMainShell', array('main', '_secret')); @@ -607,8 +601,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify correct dispatch of Shell subclasses without a main method * - * @access public * @return void + * @access public */ function testDispatchShellWithoutMain() { Mock::generate('Shell', 'MockWithoutMainShell', array('initDb', '_secret')); @@ -679,8 +673,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify correct dispatch of custom classes with a main method * - * @access public * @return void + * @access public */ function testDispatchNotAShellWithMain() { Mock::generate('Object', 'MockWithMainNotAShell', @@ -759,8 +753,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify correct dispatch of custom classes without a main method * - * @access public * @return void + * @access public */ function testDispatchNotAShellWithoutMain() { Mock::generate('Object', 'MockWithoutMainNotAShell', @@ -830,8 +824,8 @@ class ShellDispatcherTest extends CakeTestCase { * Verify that a task is called instead of the shell if the first arg equals * the name of the task * - * @access public * @return void + * @access public */ function testDispatchTask() { Mock::generate('Shell', 'MockWeekShell', array('main')); @@ -878,8 +872,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * Verify shifting of arguments * - * @access public * @return void + * @access public */ function testShiftArgs() { $Dispatcher =& new TestShellDispatcher(); @@ -908,8 +902,8 @@ class ShellDispatcherTest extends CakeTestCase { /** * testHelpCommand method * - * @access public * @return void + * @access public */ function testHelpCommand() { $Dispatcher =& new TestShellDispatcher(); diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index a7e83c2e2..deb23daeb 100644 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.0.7726 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -53,13 +52,21 @@ Mock::generate('AclComponent', 'MockAclShellAclComponent'); * @subpackage cake.tests.cases.console.libs.tasks */ class AclShellTest extends CakeTestCase { + +/** + * Fixtures + * + * @var array + * @access public + */ var $fixtures = array('core.aco', 'core.aro', 'core.aros_aco'); /** * configure Configure for testcase * * @return void - **/ + * @access public + */ function startCase() { $this->_aclDb = Configure::read('Acl.database'); $this->_aclClass = Configure::read('Acl.classname'); @@ -72,7 +79,8 @@ class AclShellTest extends CakeTestCase { * restore Environment settings * * @return void - **/ + * @access public + */ function endCase() { Configure::write('Acl.database', $this->_aclDb); Configure::write('Acl.classname', $this->_aclClass); @@ -108,7 +116,8 @@ class AclShellTest extends CakeTestCase { * test that model.foreign_key output works when looking at acl rows * * @return void - **/ + * @access public + */ function testViewWithModelForeignKeyOutput() { $this->Task->command = 'view'; $this->Task->startup(); @@ -133,7 +142,8 @@ class AclShellTest extends CakeTestCase { * test view with an argument * * @return void - **/ + * @access public + */ function testViewWithArgument() { $this->Task->args = array('aro', 'admins'); $this->Task->expectAt(0, 'out', array('Aro tree:')); @@ -147,7 +157,8 @@ class AclShellTest extends CakeTestCase { * test the method that splits model.foreign key. and that it returns an array. * * @return void - **/ + * @access public + */ function testParsingModelAndForeignKey() { $result = $this->Task->parseIdentifier('Model.foreignKey'); $expected = array('model' => 'Model', 'foreign_key' => 'foreignKey'); @@ -163,7 +174,8 @@ class AclShellTest extends CakeTestCase { * test creating aro/aco nodes * * @return void - **/ + * @access public + */ function testCreate() { $this->Task->args = array('aro', 'root', 'User.1'); $this->Task->expectAt(0, 'out', array(new PatternExpectation('/created/'), '*')); @@ -203,7 +215,8 @@ class AclShellTest extends CakeTestCase { * test the delete method with different node types. * * @return void - **/ + * @access public + */ function testDelete() { $this->Task->args = array('aro', 'AuthUser.1'); $this->Task->expectAt(0, 'out', array(new NoPatternExpectation('/not/'), true)); @@ -218,7 +231,8 @@ class AclShellTest extends CakeTestCase { * test setParent method. * * @return void - **/ + * @access public + */ function testSetParent() { $this->Task->args = array('aro', 'AuthUser.2', 'root'); $this->Task->setParent(); @@ -232,7 +246,8 @@ class AclShellTest extends CakeTestCase { * test grant * * @return void - **/ + * @access public + */ function testGrant() { $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create'); $this->Task->expectAt(0, 'out', array(new PatternExpectation('/Permission granted/'), true)); @@ -247,7 +262,8 @@ class AclShellTest extends CakeTestCase { * test deny * * @return void - **/ + * @access public + */ function testDeny() { $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create'); $this->Task->expectAt(0, 'out', array(new PatternExpectation('/Permission denied/'), true)); @@ -262,7 +278,8 @@ class AclShellTest extends CakeTestCase { * test checking allowed and denied perms * * @return void - **/ + * @access public + */ function testCheck() { $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', '*'); $this->Task->expectAt(0, 'out', array(new PatternExpectation('/not allowed/'), true)); @@ -285,7 +302,8 @@ class AclShellTest extends CakeTestCase { * test inherit and that it 0's the permission fields. * * @return void - **/ + * @access public + */ function testInherit() { $this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create'); $this->Task->expectAt(0, 'out', array(new PatternExpectation('/Permission granted/'), true)); @@ -304,7 +322,8 @@ class AclShellTest extends CakeTestCase { * test getting the path for an aro/aco * * @return void - **/ + * @access public + */ function testGetPath() { $this->Task->args = array('aro', 'AuthUser.2'); $this->Task->expectAt(1, 'out', array('[1] ROOT')); @@ -312,6 +331,5 @@ class AclShellTest extends CakeTestCase { $this->Task->expectAt(3, 'out', array(' [4] Elrond')); $this->Task->getPath(); } - } ?> \ No newline at end of file diff --git a/cake/tests/cases/console/libs/api.test.php b/cake/tests/cases/console/libs/api.test.php index dc977006f..efb216581 100644 --- a/cake/tests/cases/console/libs/api.test.php +++ b/cake/tests/cases/console/libs/api.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * ApiShellTest file * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -82,8 +76,8 @@ class ApiShellTest extends CakeTestCase { /** * Test that method names are detected properly including those with no arguments. * - * @access public * @return void + * @access public */ function testMethodNameDetection () { $this->Shell->setReturnValueAt(0, 'in', 'q'); diff --git a/cake/tests/cases/console/libs/bake.test.php b/cake/tests/cases/console/libs/bake.test.php index cdd42cf39..831456adf 100644 --- a/cake/tests/cases/console/libs/bake.test.php +++ b/cake/tests/cases/console/libs/bake.test.php @@ -61,14 +61,16 @@ class BakeShellTestCase extends CakeTestCase { * fixtures * * @var array - **/ + * @access public + */ var $fixtures = array('core.user'); /** * start test * * @return void - **/ + * @access public + */ function startTest() { $this->Dispatch =& new BakeShellMockShellDispatcher(); $this->Shell =& new MockBakeShell(); @@ -80,7 +82,8 @@ class BakeShellTestCase extends CakeTestCase { * endTest method * * @return void - **/ + * @access public + */ function endTest() { unset($this->Dispatch, $this->Shell); } @@ -89,7 +92,8 @@ class BakeShellTestCase extends CakeTestCase { * test bake all * * @return void - **/ + * @access public + */ function testAllWithModelName() { $this->Shell->Model =& new BakeShellMockModelTask(); $this->Shell->Controller =& new BakeShellMockControllerTask(); @@ -118,4 +122,5 @@ class BakeShellTestCase extends CakeTestCase { $this->Shell->args = array('User'); $this->Shell->all(); } -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/cake/tests/cases/console/libs/schema.test.php b/cake/tests/cases/console/libs/schema.test.php index e4b5921ee..898b21208 100644 --- a/cake/tests/cases/console/libs/schema.test.php +++ b/cake/tests/cases/console/libs/schema.test.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.Shells * @since CakePHP v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); App::import('Model', 'CakeSchema', false); @@ -116,7 +115,14 @@ class SchemaShellTestSchema extends CakeSchema { */ class SchemaShellTest extends CakeTestCase { +/** + * Fixtures + * + * @var array + * @access public + */ var $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user'); + /** * startTest method * @@ -143,7 +149,8 @@ class SchemaShellTest extends CakeTestCase { * test startup method * * @return void - **/ + * @access public + */ function testStartup() { $this->Shell->startup(); $this->assertTrue(isset($this->Shell->Schema)); @@ -178,7 +185,8 @@ class SchemaShellTest extends CakeTestCase { * Test View - and that it dumps the schema file to stdout * * @return void - **/ + * @access public + */ function testView() { $this->Shell->startup(); $this->Shell->Schema->path = APP . 'config' . DS . 'schema'; @@ -192,7 +200,8 @@ class SchemaShellTest extends CakeTestCase { * test that view() can find plugin schema files. * * @return void - **/ + * @access public + */ function testViewWithPlugins() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) @@ -215,7 +224,8 @@ class SchemaShellTest extends CakeTestCase { * test dump() with sql file generation * * @return void - **/ + * @access public + */ function testDumpWithFileWriting() { $this->Shell->params = array( 'name' => 'i18n', @@ -243,7 +253,8 @@ class SchemaShellTest extends CakeTestCase { * test that dump() can find and work with plugin schema files. * * @return void - **/ + * @access public + */ function testDumpFileWritingWithPlugins() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) @@ -272,6 +283,7 @@ class SchemaShellTest extends CakeTestCase { * test generate with snapshot generation * * @return void + * @access public */ function testGenerateSnaphot() { $this->Shell->path = TMP; @@ -291,7 +303,8 @@ class SchemaShellTest extends CakeTestCase { * test generate without a snapshot. * * @return void - **/ + * @access public + */ function testGenerateNoOverwrite() { touch(TMP . 'schema.php'); $this->Shell->params['file'] = 'schema.php'; @@ -310,7 +323,8 @@ class SchemaShellTest extends CakeTestCase { * test generate with overwriting of the schema files. * * @return void - **/ + * @access public + */ function testGenerateOverwrite() { touch(TMP . 'schema.php'); $this->Shell->params['file'] = 'schema.php'; @@ -335,7 +349,8 @@ class SchemaShellTest extends CakeTestCase { * in a plugin. * * @return void - **/ + * @access public + */ function testGenerateWithPlugins() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) @@ -364,7 +379,8 @@ class SchemaShellTest extends CakeTestCase { * Test schema run create with no table args. * * @return void - **/ + * @access public + */ function testCreateNoArgs() { $this->Shell->params = array( 'connection' => 'test_suite', @@ -387,7 +403,8 @@ class SchemaShellTest extends CakeTestCase { * Test schema run create with no table args. * * @return void - **/ + * @access public + */ function testCreateWithTableArgs() { $this->Shell->params = array( 'connection' => 'test_suite', @@ -412,7 +429,8 @@ class SchemaShellTest extends CakeTestCase { * test run update with a table arg. * * @return void - **/ + * @access public + */ function testUpdateWithTable() { $this->Shell->params = array( 'connection' => 'test_suite', @@ -435,7 +453,8 @@ class SchemaShellTest extends CakeTestCase { * test that the plugin param creates the correct path in the schema object. * * @return void - **/ + * @access public + */ function testPluginParam() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) @@ -455,7 +474,8 @@ class SchemaShellTest extends CakeTestCase { * test that using Plugin.name with write. * * @return void - **/ + * @access public + */ function testPluginDotSyntaxWithCreate() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) diff --git a/cake/tests/cases/console/libs/shell.test.php b/cake/tests/cases/console/libs/shell.test.php index a05416d7b..55d92aa95 100644 --- a/cake/tests/cases/console/libs/shell.test.php +++ b/cake/tests/cases/console/libs/shell.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ShellTest file * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Folder'); App::import('Shell', 'Shell', false); @@ -52,7 +46,7 @@ Mock::generatePartial('ShellDispatcher', 'TestShellMockShellDispatcher', array( */ class TestShell extends Shell { -/* +/** * name property * * @var name @@ -71,8 +65,8 @@ class TestShell extends Shell { * stop method * * @param integer $status - * @access protected * @return void + * @access protected */ function _stop($status = 0) { $this->stopped = $status; @@ -263,8 +257,8 @@ class ShellTest extends CakeTestCase { /** * testNl * - * @access public * @return void + * @access public */ function testNl() { $this->assertEqual($this->Shell->nl(), "\n"); @@ -277,8 +271,8 @@ class ShellTest extends CakeTestCase { /** * testHr * - * @access public * @return void + * @access public */ function testHr() { $bar = '---------------------------------------------------------------'; @@ -302,8 +296,8 @@ class ShellTest extends CakeTestCase { /** * testError * - * @access public * @return void + * @access public */ function testError() { $this->Shell->Dispatch->expectAt(0, 'stderr', array("Error: Foo Not Found\n")); diff --git a/cake/tests/cases/console/libs/tasks/controller.test.php b/cake/tests/cases/console/libs/tasks/controller.test.php index 5b29fc7cc..0a40bb229 100644 --- a/cake/tests/cases/console/libs/tasks/controller.test.php +++ b/cake/tests/cases/console/libs/tasks/controller.test.php @@ -88,7 +88,8 @@ class ControllerTaskTest extends CakeTestCase { * fixtures * * @var array - **/ + * @access public + */ var $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag'); /** @@ -124,7 +125,8 @@ class ControllerTaskTest extends CakeTestCase { * test ListAll * * @return void - **/ + * @access public + */ function testListAll() { $this->Task->connection = 'test_suite'; $this->Task->interactive = true; @@ -153,7 +155,8 @@ class ControllerTaskTest extends CakeTestCase { * Test that getName interacts with the user and returns the controller name. * * @return void - **/ + * @access public + */ function testGetName() { $this->Task->setReturnValue('in', 1); @@ -180,7 +183,8 @@ class ControllerTaskTest extends CakeTestCase { * test helper interactions * * @return void - **/ + * @access public + */ function testDoHelpers() { $this->Task->setReturnValue('in', 'n'); $result = $this->Task->doHelpers(); @@ -203,7 +207,8 @@ class ControllerTaskTest extends CakeTestCase { * test component interactions * * @return void - **/ + * @access public + */ function testDoComponents() { $this->Task->setReturnValue('in', 'n'); $result = $this->Task->doComponents(); @@ -226,7 +231,8 @@ class ControllerTaskTest extends CakeTestCase { * test Confirming controller user interaction * * @return void - **/ + * @access public + */ function testConfirmController() { $controller = 'Posts'; $scaffold = false; @@ -244,7 +250,8 @@ class ControllerTaskTest extends CakeTestCase { * test the bake method * * @return void - **/ + * @access public + */ function testBake() { $helpers = array('Ajax', 'Time'); $components = array('Acl', 'Auth'); @@ -267,7 +274,8 @@ class ControllerTaskTest extends CakeTestCase { * test bake() with a -plugin param * * @return void - **/ + * @access public + */ function testBakeWithPlugin() { $this->Task->plugin = 'ControllerTest'; $helpers = array('Ajax', 'Time'); @@ -289,7 +297,8 @@ class ControllerTaskTest extends CakeTestCase { * test that bakeActions is creating the correct controller Code. (Using sessions) * * @return void - **/ + * @access public + */ function testBakeActionsUsingSessions() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Testing bakeActions requires Article, Comment & Tag Model to be undefined. %s'); @@ -332,7 +341,8 @@ class ControllerTaskTest extends CakeTestCase { * Test baking with Controller::flash() or no sessions. * * @return void - **/ + * @access public + */ function testBakeActionsWithNoSessions() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Testing bakeActions requires Article, Tag, Comment Models to be undefined. %s'); @@ -367,7 +377,8 @@ class ControllerTaskTest extends CakeTestCase { * test baking a test * * @return void - **/ + * @access public + */ function testBakeTest() { $this->Task->plugin = 'ControllerTest'; $this->Task->connection = 'test_suite'; @@ -383,7 +394,8 @@ class ControllerTaskTest extends CakeTestCase { * test Interactive mode. * * @return void - **/ + * @access public + */ function testInteractive() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path'; @@ -407,7 +419,8 @@ class ControllerTaskTest extends CakeTestCase { * test that execute runs all when the first arg == all * * @return void - **/ + * @access public + */ function testExecuteIntoAll() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Execute into all could not be run as an Article, Tag or Comment model was already loaded. %s'); @@ -432,7 +445,8 @@ class ControllerTaskTest extends CakeTestCase { * test that `cake bake controller foos` works. * * @return void - **/ + * @access public + */ function testExecuteWithController() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Execute with scaffold param requires no Article, Tag or Comment model to be defined. %s'); @@ -455,7 +469,8 @@ class ControllerTaskTest extends CakeTestCase { * test that `cake bake controller foo scaffold` works. * * @return void - **/ + * @access public + */ function testExecuteWithPublicParam() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Execute with scaffold param requires no Article, Tag or Comment model to be defined. %s'); @@ -478,7 +493,8 @@ class ControllerTaskTest extends CakeTestCase { * test that `cake bake controller foos both` works. * * @return void - **/ + * @access public + */ function testExecuteWithControllerAndBoth() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Execute with scaffold param requires no Article, Tag or Comment model to be defined. %s'); @@ -502,7 +518,8 @@ class ControllerTaskTest extends CakeTestCase { * test that `cake bake controller foos admin` works. * * @return void - **/ + * @access public + */ function testExecuteWithControllerAndAdmin() { $skip = $this->skipIf(!defined('ARTICLE_MODEL_CREATED'), 'Execute with scaffold param requires no Article, Tag or Comment model to be defined. %s'); diff --git a/cake/tests/cases/console/libs/tasks/db_config.test.php b/cake/tests/cases/console/libs/tasks/db_config.test.php index a637c8403..e28554955 100644 --- a/cake/tests/cases/console/libs/tasks/db_config.test.php +++ b/cake/tests/cases/console/libs/tasks/db_config.test.php @@ -104,7 +104,8 @@ class DbConfigTaskTest extends CakeTestCase { * Test the getConfig method. * * @return void - **/ + * @access public + */ function testGetConfig() { $this->Task->setReturnValueAt(0, 'in', 'otherOne'); $result = $this->Task->getConfig(); @@ -115,7 +116,8 @@ class DbConfigTaskTest extends CakeTestCase { * test that initialize sets the path up. * * @return void - **/ + * @access public + */ function testInitialize() { $this->assertTrue(empty($this->Task->path)); $this->Task->initialize(); @@ -128,7 +130,8 @@ class DbConfigTaskTest extends CakeTestCase { * test execute and by extension __interactive * * @return void - **/ + * @access public + */ function testExecuteIntoInteractive() { $this->Task->initialize(); diff --git a/cake/tests/cases/console/libs/tasks/extract.test.php b/cake/tests/cases/console/libs/tasks/extract.test.php index a4973f716..5a57710de 100644 --- a/cake/tests/cases/console/libs/tasks/extract.test.php +++ b/cake/tests/cases/console/libs/tasks/extract.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ExtractTaskTest file * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'Folder'); App::import('Shell', 'Shell', false); diff --git a/cake/tests/cases/console/libs/tasks/fixture.test.php b/cake/tests/cases/console/libs/tasks/fixture.test.php index 3839010e4..65678cbd4 100644 --- a/cake/tests/cases/console/libs/tasks/fixture.test.php +++ b/cake/tests/cases/console/libs/tasks/fixture.test.php @@ -60,8 +60,9 @@ class FixtureTaskTest extends CakeTestCase { * fixtures * * @var array - **/ - var $fixtures = array('core.article', 'core.comment'); + * @access public + */ + var $fixtures = array('core.article', 'core.comment', 'core.datatype', 'core.binary_test'); /** * startTest method @@ -94,7 +95,8 @@ class FixtureTaskTest extends CakeTestCase { * test that initialize sets the path * * @return void - **/ + * @access public + */ function testConstruct() { $this->Dispatch->params['working'] = DS . 'my' . DS . 'path'; $Task =& new FixtureTask($this->Dispatch); @@ -107,7 +109,8 @@ class FixtureTaskTest extends CakeTestCase { * test import option array generation * * @return void - **/ + * @access public + */ function testImportOptions() { $this->Task->setReturnValueAt(0, 'in', 'y'); $this->Task->setReturnValueAt(1, 'in', 'y'); @@ -136,7 +139,8 @@ class FixtureTaskTest extends CakeTestCase { * test generating a fixture with database conditions. * * @return void - **/ + * @access public + */ function testImportRecordsFromDatabaseWithConditions() { $this->Task->setReturnValueAt(0, 'in', 'WHERE 1=1 LIMIT 10'); $this->Task->connection = 'test_suite'; @@ -155,7 +159,8 @@ class FixtureTaskTest extends CakeTestCase { * test that execute passes runs bake depending with named model. * * @return void - **/ + * @access public + */ function testExecuteWithNamedModel() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -169,7 +174,8 @@ class FixtureTaskTest extends CakeTestCase { * test that execute runs all() when args[0] = all * * @return void - **/ + * @access public + */ function testExecuteIntoAll() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -189,7 +195,8 @@ class FixtureTaskTest extends CakeTestCase { * test using all() with -count and -records * * @return void - **/ + * @access public + */ function testAllWithCountAndRecordsFlags() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -210,7 +217,8 @@ class FixtureTaskTest extends CakeTestCase { * test interactive mode of execute * * @return void - **/ + * @access public + */ function testExecuteInteractive() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -228,7 +236,8 @@ class FixtureTaskTest extends CakeTestCase { * Test that bake works * * @return void - **/ + * @access public + */ function testBake() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -259,11 +268,29 @@ class FixtureTaskTest extends CakeTestCase { $this->assertNoPattern('/var \$records/', $result); } +/** + * test record generation with float and binary types + * + * @return void + * @access public + */ + function testRecordGenerationForBinaryAndFloat() { + $this->Task->connection = 'test_suite'; + $this->Task->path = '/my/path/'; + + $result = $this->Task->bake('Article', 'datatypes'); + $this->assertPattern("/'float_field' => 1/", $result); + + $result = $this->Task->bake('Article', 'binary_tests'); + $this->assertPattern("/'data' => 'Lorem ipsum dolor sit amet'/", $result); + } + /** * Test that file generation includes headers and correct path for plugins. * * @return void - **/ + * @access public + */ function testGenerateFixtureFile() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -280,7 +307,8 @@ class FixtureTaskTest extends CakeTestCase { * test generating files into plugins. * * @return void - **/ + * @access public + */ function testGeneratePluginFixtureFile() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; diff --git a/cake/tests/cases/console/libs/tasks/model.test.php b/cake/tests/cases/console/libs/tasks/model.test.php index 431fb4130..484cbe06c 100644 --- a/cake/tests/cases/console/libs/tasks/model.test.php +++ b/cake/tests/cases/console/libs/tasks/model.test.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * ModelTaskTest file * @@ -7,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.6 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -67,7 +65,8 @@ class ModelTaskTest extends CakeTestCase { * fixtures * * @var array - **/ + * @access public + */ var $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag', 'core.category_thread'); /** @@ -101,7 +100,8 @@ class ModelTaskTest extends CakeTestCase { * Test that listAll scans the database connection and lists all the tables in it.s * * @return void - **/ + * @access public + */ function testListAll() { $this->Task->expectAt(1, 'out', array('1. Article')); $this->Task->expectAt(2, 'out', array('2. ArticlesTag')); @@ -128,7 +128,8 @@ class ModelTaskTest extends CakeTestCase { * Test that getName interacts with the user and returns the model name. * * @return void - **/ + * @access public + */ function testGetName() { $this->Task->setReturnValue('in', 1); @@ -155,7 +156,8 @@ class ModelTaskTest extends CakeTestCase { * Test table name interactions * * @return void - **/ + * @access public + */ function testGetTableName() { $this->Task->setReturnValueAt(0, 'in', 'y'); $result = $this->Task->getTable('Article', 'test_suite'); @@ -173,7 +175,8 @@ class ModelTaskTest extends CakeTestCase { * test that initializing the validations works. * * @return void - **/ + * @access public + */ function testInitValidations() { $result = $this->Task->initValidations(); $this->assertTrue(in_array('notempty', $result)); @@ -184,7 +187,8 @@ class ModelTaskTest extends CakeTestCase { * tests the guessing features of validation * * @return void - **/ + * @access public + */ function testFieldValidationGuessing() { $this->Task->interactive = false; $this->Task->initValidations(); @@ -212,7 +216,8 @@ class ModelTaskTest extends CakeTestCase { * test that interactive field validation works and returns multiple validators. * * @return void - **/ + * @access public + */ function testInteractiveFieldValidation() { $this->Task->initValidations(); $this->Task->interactive = true; @@ -230,7 +235,8 @@ class ModelTaskTest extends CakeTestCase { * test the validation Generation routine * * @return void - **/ + * @access public + */ function testNonInteractiveDoValidation() { $Model =& new MockModelTaskModel(); $Model->primaryKey = 'id'; @@ -291,7 +297,8 @@ class ModelTaskTest extends CakeTestCase { * test that finding primary key works * * @return void - **/ + * @access public + */ function testFindPrimaryKey() { $fields = array( 'one' => array(), @@ -309,7 +316,8 @@ class ModelTaskTest extends CakeTestCase { * test finding Display field * * @return void - **/ + * @access public + */ function testFindDisplayField() { $fields = array('id' => array(), 'tagname' => array(), 'body' => array(), 'created' => array(), 'modified' => array()); @@ -329,7 +337,8 @@ class ModelTaskTest extends CakeTestCase { * test that belongsTo generation works. * * @return void - **/ + * @access public + */ function testBelongsToGeneration() { $model = new Model(array('ds' => 'test_suite', 'name' => 'Comment')); $result = $this->Task->findBelongsTo($model, array()); @@ -349,7 +358,6 @@ class ModelTaskTest extends CakeTestCase { ); $this->assertEqual($result, $expected); - $model = new Model(array('ds' => 'test_suite', 'name' => 'CategoryThread')); $result = $this->Task->findBelongsTo($model, array()); $expected = array( @@ -368,7 +376,8 @@ class ModelTaskTest extends CakeTestCase { * test that hasOne and/or hasMany relations are generated properly. * * @return void - **/ + * @access public + */ function testHasManyHasOneGeneration() { $model = new Model(array('ds' => 'test_suite', 'name' => 'Article')); $this->Task->connection = 'test_suite'; @@ -392,7 +401,6 @@ class ModelTaskTest extends CakeTestCase { ); $this->assertEqual($result, $expected); - $model = new Model(array('ds' => 'test_suite', 'name' => 'CategoryThread')); $result = $this->Task->findHasOneAndMany($model, array()); $expected = array( @@ -415,10 +423,11 @@ class ModelTaskTest extends CakeTestCase { } /** - * test that habtm generation works + * Test that HABTM generation works * * @return void - **/ + * @access public + */ function testHasAndBelongsToManyGeneration() { $model = new Model(array('ds' => 'test_suite', 'name' => 'Article')); $this->Task->connection = 'test_suite'; @@ -442,7 +451,8 @@ class ModelTaskTest extends CakeTestCase { * test non interactive doAssociations * * @return void - **/ + * @access public + */ function testDoAssociationsNonInteractive() { $this->Task->connection = 'test_suite'; $this->Task->interactive = false; @@ -466,14 +476,14 @@ class ModelTaskTest extends CakeTestCase { ), ), ); - } /** * Ensure that the fixutre object is correctly called. * * @return void - **/ + * @access public + */ function testBakeFixture() { $this->Task->Fixture->expectAt(0, 'bake', array('Article', 'articles')); $this->Task->bakeFixture('Article', 'articles'); @@ -486,7 +496,8 @@ class ModelTaskTest extends CakeTestCase { * Ensure that the test object is correctly called. * * @return void - **/ + * @access public + */ function testBakeTest() { $this->Task->Test->expectAt(0, 'bake', array('Model', 'Article')); $this->Task->bakeTest('Article'); @@ -500,7 +511,8 @@ class ModelTaskTest extends CakeTestCase { * a question for the hasOne is also not asked. * * @return void - **/ + * @access public + */ function testConfirmAssociations() { $associations = array( 'hasOne' => array( @@ -540,7 +552,8 @@ class ModelTaskTest extends CakeTestCase { * test that inOptions generates questions and only accepts a valid answer * * @return void - **/ + * @access public + */ function testInOptions() { $options = array('one', 'two', 'three'); $this->Task->expectAt(0, 'out', array('1. one')); @@ -560,7 +573,8 @@ class ModelTaskTest extends CakeTestCase { * test baking validation * * @return void - **/ + * @access public + */ function testBakeValidation() { $validate = array( 'name' => array( @@ -588,7 +602,8 @@ class ModelTaskTest extends CakeTestCase { * test baking relations * * @return void - **/ + * @access public + */ function testBakeRelations() { $associations = array( 'belongsTo' => array( @@ -642,7 +657,8 @@ class ModelTaskTest extends CakeTestCase { * test bake() with a -plugin param * * @return void - **/ + * @access public + */ function testBakeWithPlugin() { $this->Task->plugin = 'ControllerTest'; @@ -662,7 +678,8 @@ class ModelTaskTest extends CakeTestCase { * test that execute passes runs bake depending with named model. * * @return void - **/ + * @access public + */ function testExecuteWithNamedModel() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -677,7 +694,8 @@ class ModelTaskTest extends CakeTestCase { * test that execute runs all() when args[0] = all * * @return void - **/ + * @access public + */ function testExecuteIntoAll() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -709,7 +727,8 @@ class ModelTaskTest extends CakeTestCase { * test the interactive side of bake. * * @return void - **/ + * @access public + */ function testExecuteIntoInteractive() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; @@ -738,7 +757,8 @@ class ModelTaskTest extends CakeTestCase { * test using bake interactively with a table that does not exist. * * @return void - **/ + * @access public + */ function testExecuteWithNonExistantTableName() { $this->Task->connection = 'test_suite'; $this->Task->path = '/my/path/'; diff --git a/cake/tests/cases/console/libs/tasks/plugin.test.php b/cake/tests/cases/console/libs/tasks/plugin.test.php index 0db5b4205..29521bb38 100644 --- a/cake/tests/cases/console/libs/tasks/plugin.test.php +++ b/cake/tests/cases/console/libs/tasks/plugin.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * PluginTask Test file * @@ -8,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.3.0 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -75,7 +72,8 @@ class PluginTaskTest extends CakeTestCase { * startCase methods * * @return void - **/ + * @access public + */ function startCase() { $this->_paths = $paths = App::path('plugins'); $this->_testPath = array_push($paths, TMP . 'tests' . DS); @@ -86,7 +84,8 @@ class PluginTaskTest extends CakeTestCase { * endCase * * @return void - **/ + * @access public + */ function endCase() { App::build(array('plugins' => $this->_paths)); } @@ -105,7 +104,8 @@ class PluginTaskTest extends CakeTestCase { * test bake() * * @return void - **/ + * @access public + */ function testBakeFoldersAndFiles() { $this->Task->setReturnValueAt(0, 'in', $this->_testPath); $this->Task->setReturnValueAt(1, 'in', 'y'); @@ -171,19 +171,12 @@ class PluginTaskTest extends CakeTestCase { $this->assertTrue(file_exists($path . DS . 'tests' . DS . 'fixtures' . DS . 'empty'), 'No empty file %s'); $this->assertTrue(is_dir($path . DS . 'vendors'), 'No vendors dir %s'); - $this->assertTrue(is_dir($path . DS . 'vendors' . DS . 'css'), 'No vendors css dir %s'); - $this->assertTrue(file_exists($path . DS . 'vendors' . DS . 'css' . DS . 'empty'), 'No empty file %s'); - - $this->assertTrue(is_dir($path . DS . 'vendors' . DS . 'js'), 'No vendors js dir %s'); - $this->assertTrue(file_exists($path . DS . 'vendors' . DS . 'js' . DS . 'empty'), 'No empty file %s'); - - $this->assertTrue(is_dir($path . DS . 'vendors' . DS . 'img'), 'No vendors img dir %s'); - $this->assertTrue(file_exists($path . DS . 'vendors' . DS . 'img' . DS . 'empty'), 'No empty file %s'); - + $this->assertTrue(is_dir($path . DS . 'vendors' . DS . 'shells'), 'No vendors shells dir %s'); $this->assertTrue(is_dir($path . DS . 'vendors' . DS . 'shells' . DS . 'tasks'), 'No vendors shells tasks dir %s'); $this->assertTrue(file_exists($path . DS . 'vendors' . DS . 'shells' . DS . 'tasks' . DS . 'empty'), 'No empty file %s'); $this->assertTrue(is_dir($path . DS . 'libs'), 'No libs dir %s'); + $this->assertTrue(is_dir($path . DS . 'webroot'), 'No webroot dir %s'); $file = $path . DS . 'bake_test_plugin_app_controller.php'; $this->Task->expectAt(0, 'createFile', array($file, '*'), 'No AppController %s'); @@ -199,7 +192,8 @@ class PluginTaskTest extends CakeTestCase { * test execute with no args, flowing into interactive, * * @return void - **/ + * @access public + */ function testExecuteWithNoArgs() { $this->Task->setReturnValueAt(0, 'in', 'TestPlugin'); $this->Task->setReturnValueAt(1, 'in', '3'); @@ -224,7 +218,8 @@ class PluginTaskTest extends CakeTestCase { * Test Execute * * @return void - **/ + * @access public + */ function testExecuteWithOneArg() { $this->Task->setReturnValueAt(0, 'in', $this->_testPath); $this->Task->setReturnValueAt(1, 'in', 'y'); @@ -248,7 +243,8 @@ class PluginTaskTest extends CakeTestCase { * test execute chaining into MVC parts * * @return void - **/ + * @access public + */ function testExecuteWithTwoArgs() { $this->Task->Model =& new PluginTestMockModelTask(); $this->Task->setReturnValueAt(0, 'in', $this->_testPath); diff --git a/cake/tests/cases/console/libs/tasks/project.test.php b/cake/tests/cases/console/libs/tasks/project.test.php index f04d4cb50..0f80b3431 100644 --- a/cake/tests/cases/console/libs/tasks/project.test.php +++ b/cake/tests/cases/console/libs/tasks/project.test.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.3.0 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -85,7 +84,8 @@ class ProjectTaskTest extends CakeTestCase { * creates a test project that is used for testing project task. * * @return void - **/ + * @access protected + */ function _setupTestProject() { $skel = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS . 'templates' . DS . 'skel'; $this->Task->setReturnValueAt(0, 'in', 'y'); @@ -97,7 +97,8 @@ class ProjectTaskTest extends CakeTestCase { * test bake() method and directory creation. * * @return void - **/ + * @access public + */ function testBake() { $this->_setupTestProject(); @@ -114,11 +115,54 @@ class ProjectTaskTest extends CakeTestCase { $this->assertTrue(is_dir($path . DS . 'tests' . DS . 'fixtures'), 'No fixtures dir %s'); } +/** + * test bake() method with -empty flag, directory creation and empty files. + * + * @return void + * @access public + */ + function testBakeEmptyFlag() { + $this->Task->params['empty'] = true; + $this->_setupTestProject(); + $path = $this->Task->path . 'bake_test_app'; + $this->assertTrue(is_dir($path), 'No project dir %s'); + $this->assertTrue(is_dir($path . DS . 'controllers'), 'No controllers dir %s'); + $this->assertTrue(is_dir($path . DS . 'controllers' . DS .'components'), 'No components dir %s'); + $this->assertTrue(is_dir($path . DS . 'models'), 'No models dir %s'); + $this->assertTrue(is_dir($path . DS . 'views'), 'No views dir %s'); + $this->assertTrue(is_dir($path . DS . 'views' . DS . 'helpers'), 'No helpers dir %s'); + $this->assertTrue(is_dir($path . DS . 'tests'), 'No tests dir %s'); + $this->assertTrue(is_dir($path . DS . 'tests' . DS . 'cases'), 'No cases dir %s'); + $this->assertTrue(is_dir($path . DS . 'tests' . DS . 'groups'), 'No groups dir %s'); + $this->assertTrue(is_dir($path . DS . 'tests' . DS . 'fixtures'), 'No fixtures dir %s'); + + $this->assertTrue(is_file($path . DS . 'controllers' . DS .'components' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'locale' . DS . 'eng' . DS . 'LC_MESSAGES' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'models' . DS . 'behaviors' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'models' . DS . 'datasources' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'plugins' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'behaviors' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'components' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'datasources' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'models' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'cases' . DS . 'shells' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'fixtures' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'tests' . DS . 'groups' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'vendors' . DS . 'shells' . DS . 'tasks' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'views' . DS . 'errors' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'views' . DS . 'helpers' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'views' . DS . 'scaffolds' . DS . 'empty'), 'No empty file in dir %s'); + $this->assertTrue(is_file($path . DS . 'webroot' . DS . 'js' . DS . 'empty'), 'No empty file in dir %s'); + } + /** * test generation of Security.salt * * @return void - **/ + * @access public + */ function testSecuritySaltGeneration() { $this->_setupTestProject(); @@ -131,11 +175,33 @@ class ProjectTaskTest extends CakeTestCase { $this->assertNoPattern('/DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi/', $contents, 'Default Salt left behind. %s'); } +/** + * Test that index.php is generated correctly. + * + * @return void + * @access public + */ + function testIndexPhpGeneration() { + $this->_setupTestProject(); + + $path = $this->Task->path . 'bake_test_app' . DS; + $this->Task->corePath($path); + + $file =& new File($path . 'webroot' . DS . 'index.php'); + $contents = $file->read(); + $this->assertNoPattern('/define\(\'CAKE_CORE_INCLUDE_PATH\', \'ROOT/', $contents); + + $file =& new File($path . 'webroot' . DS . 'test.php'); + $contents = $file->read(); + $this->assertNoPattern('/define\(\'CAKE_CORE_INCLUDE_PATH\', \'ROOT/', $contents); + } + /** * test getPrefix method, and that it returns Routing.prefix or writes to config file. * * @return void - **/ + * @access public + */ function testGetPrefix() { Configure::write('Routing.prefixes', array('admin')); $result = $this->Task->getPrefix(); @@ -157,7 +223,8 @@ class ProjectTaskTest extends CakeTestCase { * test cakeAdmin() writing core.php * * @return void - **/ + * @access public + */ function testCakeAdmin() { $file =& new File(CONFIGS . 'core.php'); $contents = $file->read();; @@ -177,7 +244,8 @@ class ProjectTaskTest extends CakeTestCase { * test getting the prefix with more than one prefix setup * * @return void - **/ + * @access public + */ function testGetPrefixWithMultiplePrefixes() { Configure::write('Routing.prefixes', array('admin', 'ninja', 'shinobi')); $this->_setupTestProject(); @@ -192,7 +260,8 @@ class ProjectTaskTest extends CakeTestCase { * Test execute method with one param to destination folder. * * @return void - **/ + * @access public + */ function testExecute() { $this->Task->params['skel'] = CAKE_CORE_INCLUDE_PATH . DS . CAKE . DS . 'console' . DS. 'templates' . DS . 'skel'; $this->Task->params['working'] = TMP . 'tests' . DS; diff --git a/cake/tests/cases/console/libs/tasks/template.test.php b/cake/tests/cases/console/libs/tasks/template.test.php index ca98599bc..243d2aba0 100644 --- a/cake/tests/cases/console/libs/tasks/template.test.php +++ b/cake/tests/cases/console/libs/tasks/template.test.php @@ -81,7 +81,8 @@ class TemplateTaskTest extends CakeTestCase { * test that set sets variables * * @return void - **/ + * @access public + */ function testSet() { $this->Task->set('one', 'two'); $this->assertTrue(isset($this->Task->templateVars['one'])); @@ -98,7 +99,8 @@ class TemplateTaskTest extends CakeTestCase { * test finding themes installed in * * @return void - **/ + * @access public + */ function testFindingInstalledThemesForBake() { $consoleLibs = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS; $this->Task->Dispatch->shellPaths = array($consoleLibs); @@ -111,7 +113,8 @@ class TemplateTaskTest extends CakeTestCase { * that the user is not bugged. If there are more, find and return the correct theme name * * @return void - **/ + * @access public + */ function testGetThemePath() { $defaultTheme = CAKE_CORE_INCLUDE_PATH . DS . dirname(CONSOLE_LIBS) . 'templates' . DS . 'default' .DS; $this->Task->templatePaths = array('default' => $defaultTheme); @@ -136,7 +139,8 @@ class TemplateTaskTest extends CakeTestCase { * test generate * * @return void - **/ + * @access public + */ function testGenerate() { App::build(array( 'shells' => array( @@ -155,7 +159,8 @@ class TemplateTaskTest extends CakeTestCase { * ensure fallback to default works. * * @return void - **/ + * @access public + */ function testGenerateWithTemplateFallbacks() { App::build(array( 'shells' => array( diff --git a/cake/tests/cases/console/libs/tasks/test.test.php b/cake/tests/cases/console/libs/tasks/test.test.php index 4fd23bb98..d6c9dae97 100644 --- a/cake/tests/cases/console/libs/tasks/test.test.php +++ b/cake/tests/cases/console/libs/tasks/test.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TestTaskTest file * @@ -8,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) + * CakePHP : Rapid Development Framework (http://cakephp.org) * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.0.7726 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); App::import('Controller', 'Controller', false); @@ -52,17 +49,48 @@ Mock::generatePartial( ); /** - * Test subject models for fixture generation - **/ + * Test Article model + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class TestTaskArticle extends Model { + +/** + * Model name + * + * @var string + * @access public + */ var $name = 'TestTaskArticle'; + +/** + * Table name to use + * + * @var string + * @access public + */ var $useTable = 'articles'; + +/** + * HasMany Associations + * + * @var array + * @access public + */ var $hasMany = array( 'Comment' => array( 'className' => 'TestTask.TestTaskComment', 'foreignKey' => 'article_id', ) ); + +/** + * Has and Belongs To Many Associations + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array( 'Tag' => array( 'className' => 'TestTaskTag', @@ -71,19 +99,65 @@ class TestTaskArticle extends Model { 'associationForeignKey' => 'tag_id' ) ); + +/** + * Example public method + * + * @return void + * @access public + */ function doSomething() { - } + +/** + * Example Secondary public method + * + * @return void + * @access public + */ function doSomethingElse() { - } - function _innerMethod() { +/** + * Example protected method + * + * @return void + * @access protected + */ + function _innerMethod() { } } + +/** + * Tag Testing Model + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class TestTaskTag extends Model { + +/** + * Model name + * + * @var string + * @access public + */ var $name = 'TestTaskTag'; + +/** + * Table name + * + * @var string + * @access public + */ var $useTable = 'tags'; + +/** + * Has and Belongs To Many Associations + * + * @var array + * @access public + */ var $hasAndBelongsToMany = array( 'Article' => array( 'className' => 'TestTaskArticle', @@ -95,14 +169,44 @@ class TestTaskTag extends Model { } /** - * Simulated Plugin - **/ + * Simulated plugin + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class TestTaskAppModel extends Model { - } + +/** + * Testing AppMode (TaskComment) + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class TestTaskComment extends TestTaskAppModel { + +/** + * Model name + * + * @var string + * @access public + */ var $name = 'TestTaskComment'; + +/** + * Table name + * + * @var string + * @access public + */ var $useTable = 'comments'; + +/** + * Belongs To Associations + * + * @var array + * @access public + */ var $belongsTo = array( 'Article' => array( 'className' => 'TestTaskArticle', @@ -111,8 +215,28 @@ class TestTaskComment extends TestTaskAppModel { ); } +/** + * Test Task Comments Controller + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class TestTaskCommentsController extends Controller { + +/** + * Controller Name + * + * @var string + * @access public + */ var $name = 'TestTaskComments'; + +/** + * Models to use + * + * @var array + * @access public + */ var $uses = array('TestTaskComment', 'TestTaskTag'); } @@ -124,6 +248,12 @@ class TestTaskCommentsController extends Controller { */ class TestTaskTest extends CakeTestCase { +/** + * Fixtures + * + * @var string + * @access public + */ var $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag'); /** @@ -153,8 +283,8 @@ class TestTaskTest extends CakeTestCase { /** * Test that file path generation doesn't continuously append paths. * - * @access public * @return void + * @access public */ function testFilePathGeneration() { $file = TESTS . 'cases' . DS . 'models' . DS . 'my_class.test.php'; @@ -179,7 +309,7 @@ class TestTaskTest extends CakeTestCase { * methods into the test case. * * @return void - **/ + */ function testMethodIntrospection() { $result = $this->Task->getTestableMethods('TestTaskArticle'); $expected = array('dosomething', 'dosomethingelse'); @@ -190,7 +320,8 @@ class TestTaskTest extends CakeTestCase { * test that the generation of fixtures works correctly. * * @return void - **/ + * @access public + */ function testFixtureArrayGenerationFromModel() { $subject = ClassRegistry::init('TestTaskArticle'); $result = $this->Task->generateFixtureList($subject); @@ -204,7 +335,8 @@ class TestTaskTest extends CakeTestCase { * test that the generation of fixtures works correctly. * * @return void - **/ + * @access public + */ function testFixtureArrayGenerationFromController() { $subject = new TestTaskCommentsController(); $result = $this->Task->generateFixtureList($subject); @@ -218,7 +350,8 @@ class TestTaskTest extends CakeTestCase { * test user interaction to get object type * * @return void - **/ + * @access public + */ function testGetObjectType() { $this->Task->expectOnce('_stop'); $this->Task->setReturnValueAt(0, 'in', 'q'); @@ -233,7 +366,8 @@ class TestTaskTest extends CakeTestCase { * creating test subjects should clear the registry so the registry is always fresh * * @return void - **/ + * @access public + */ function testRegistryClearWhenBuildingTestObjects() { ClassRegistry::flush(); $model = ClassRegistry::init('TestTaskComment'); @@ -257,7 +391,8 @@ class TestTaskTest extends CakeTestCase { * test that getClassName returns the user choice as a classname. * * @return void - **/ + * @access public + */ function testGetClassName() { $objects = App::objects('model'); $skip = $this->skipIf(empty($objects), 'No models in app, this test will fail. %s'); @@ -278,7 +413,8 @@ class TestTaskTest extends CakeTestCase { * Test the user interaction for defining additional fixtures. * * @return void - **/ + * @access public + */ function testGetUserFixtures() { $this->Task->setReturnValueAt(0, 'in', 'y'); $this->Task->setReturnValueAt(1, 'in', 'app.pizza, app.topping, app.side_dish'); @@ -291,7 +427,8 @@ class TestTaskTest extends CakeTestCase { * test that resolving classnames works * * @return void - **/ + * @access public + */ function testGetRealClassname() { $result = $this->Task->getRealClassname('Model', 'Post'); $this->assertEqual($result, 'Post'); @@ -314,7 +451,8 @@ class TestTaskTest extends CakeTestCase { * as PHP4 classnames are all lower case, breaking the plugin path inflection. * * @return void - **/ + * @access public + */ function testBakeModelTest() { $this->Task->setReturnValue('createFile', true); $this->Task->setReturnValue('isLoadableClass', true); @@ -347,7 +485,8 @@ class TestTaskTest extends CakeTestCase { * causing issues with inflection of path name from classname. * * @return void - **/ + * @access public + */ function testBakeControllerTest() { $this->Task->setReturnValue('createFile', true); $this->Task->setReturnValue('isLoadableClass', true); @@ -380,7 +519,8 @@ class TestTaskTest extends CakeTestCase { * test Constructor generation ensure that constructClasses is called for controllers * * @return void - **/ + * @access public + */ function testGenerateContsructor() { $result = $this->Task->generateConstructor('controller', 'PostsController'); $expected = "new TestPostsController();\n\t\t\$this->Posts->constructClasses();\n"; @@ -399,7 +539,8 @@ class TestTaskTest extends CakeTestCase { * Test that mock class generation works for the appropriate classes * * @return void - **/ + * @access public + */ function testMockClassGeneration() { $result = $this->Task->hasMockClass('controller'); $this->assertTrue($result); @@ -409,7 +550,8 @@ class TestTaskTest extends CakeTestCase { * test bake() with a -plugin param * * @return void - **/ + * @access public + */ function testBakeWithPlugin() { $this->Task->plugin = 'TestTest'; @@ -422,7 +564,8 @@ class TestTaskTest extends CakeTestCase { * Test filename generation for each type + plugins * * @return void - **/ + * @access public + */ function testTestCaseFileName() { $this->Task->path = '/my/path/tests/'; @@ -456,7 +599,8 @@ class TestTaskTest extends CakeTestCase { * test execute with a type defined * * @return void - **/ + * @access public + */ function testExecuteWithOneArg() { $this->Task->args[0] = 'Model'; $this->Task->setReturnValueAt(0, 'in', 'TestTaskTag'); @@ -469,7 +613,8 @@ class TestTaskTest extends CakeTestCase { * test execute with type and class name defined * * @return void - **/ + * @access public + */ function testExecuteWithTwoArgs() { $this->Task->args = array('Model', 'TestTaskTag'); $this->Task->setReturnValueAt(0, 'in', 'TestTaskTag'); diff --git a/cake/tests/cases/console/libs/tasks/view.test.php b/cake/tests/cases/console/libs/tasks/view.test.php index b3725ca0a..be7e9321c 100644 --- a/cake/tests/cases/console/libs/tasks/view.test.php +++ b/cake/tests/cases/console/libs/tasks/view.test.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.cases.console.libs.tasks * @since CakePHP v 1.2.0.7726 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Shell', 'Shell', false); @@ -50,10 +49,36 @@ Mock::generatePartial( Mock::generate('ControllerTask', 'ViewTaskMockControllerTask'); Mock::generate('ProjectTask', 'ViewTaskMockProjectTask'); +/** + * Test View Task Comment Model + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class ViewTaskComment extends Model { + +/** + * Model name + * + * @var string + * @access public + */ var $name = 'ViewTaskComment'; + +/** + * Table name + * + * @var string + * @access public + */ var $useTable = 'comments'; +/** + * Belongs To Associations + * + * @var array + * @access public + */ var $belongsTo = array( 'Article' => array( 'className' => 'ViewTaskArticle', @@ -62,46 +87,143 @@ class ViewTaskComment extends Model { ); } +/** + * Test View Task Article Model + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class ViewTaskArticle extends Model { + +/** + * Model name + * + * @var string + * @access public + */ var $name = 'ViewTaskArticle'; + +/** + * Table name + * + * @var string + * @access public + */ var $useTable = 'articles'; } +/** + * Test View Task Comments Controller + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class ViewTaskCommentsController extends Controller { + +/** + * Controller name + * + * @var string + * @access public + */ var $name = 'ViewTaskComments'; +/** + * Testing public controller action + * + * @return void + * @access public + */ function index() { - } - function add() { +/** + * Testing public controller action + * + * @return void + * @access public + */ + function add() { } } +/** + * Test View Task Articles Controller + * + * @package cake + * @subpackage cake.tests.cases.console.libs.tasks + */ class ViewTaskArticlesController extends Controller { + +/** + * Controller name + * + * @var string + * @access public + */ var $name = 'ViewTaskArticles'; +/** + * Test public controller action + * + * @return void + * @access public + */ function index() { - } + +/** + * Test public controller action + * + * @return void + * @access public + */ function add() { - } +/** + * Test admin prefixed controller action + * + * @return void + * @access public + */ function admin_index() { - } + +/** + * Test admin prefixed controller action + * + * @return void + * @access public + */ function admin_add() { - } + +/** + * Test admin prefixed controller action + * + * @return void + * @access public + */ function admin_view() { - } + +/** + * Test admin prefixed controller action + * + * @return void + * @access public + */ function admin_edit() { - } - function admin_delete() { +/** + * Test admin prefixed controller action + * + * @return void + * @access public + */ + function admin_delete() { } } @@ -113,6 +235,12 @@ class ViewTaskArticlesController extends Controller { */ class ViewTaskTest extends CakeTestCase { +/** + * Fixtures + * + * @var array + * @access public + */ var $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag'); /** @@ -149,7 +277,8 @@ class ViewTaskTest extends CakeTestCase { * Test getContent and parsing of Templates. * * @return void - **/ + * @access public + */ function testGetContent() { $vars = array( 'modelClass' => 'TestViewModel', @@ -179,7 +308,8 @@ class ViewTaskTest extends CakeTestCase { * test getContent() using an admin_prefixed action. * * @return void - **/ + * @access public + */ function testGetContentWithAdminAction() { $_back = Configure::read('Routing'); Configure::write('Routing.prefixes', array('admin')); @@ -213,7 +343,8 @@ class ViewTaskTest extends CakeTestCase { * test Bake method * * @return void - **/ + * @access public + */ function testBake() { $this->Task->controllerName = 'ViewTaskComments'; $this->Task->controllerPath = 'view_task_comments'; @@ -238,7 +369,8 @@ class ViewTaskTest extends CakeTestCase { * test bake() with a -plugin param * * @return void - **/ + * @access public + */ function testBakeWithPlugin() { $this->Task->controllerName = 'ViewTaskComments'; $this->Task->controllerPath = 'view_task_comments'; @@ -253,7 +385,8 @@ class ViewTaskTest extends CakeTestCase { * test bake actions baking multiple actions. * * @return void - **/ + * @access public + */ function testBakeActions() { $this->Task->controllerName = 'ViewTaskComments'; $this->Task->controllerPath = 'view_task_comments'; @@ -278,7 +411,8 @@ class ViewTaskTest extends CakeTestCase { * test baking a customAction (non crud) * * @return void - **/ + * @access public + */ function testCustomAction() { $this->Task->controllerName = 'ViewTaskComments'; $this->Task->controllerPath = 'view_task_comments'; @@ -296,7 +430,8 @@ class ViewTaskTest extends CakeTestCase { * Test all() * * @return void - **/ + * @access public + */ function testExecuteIntoAll() { $this->Task->args[0] = 'all'; @@ -314,7 +449,8 @@ class ViewTaskTest extends CakeTestCase { * test `cake bake view $controller view` * * @return void - **/ + * @access public + */ function testExecuteWithActionParam() { $this->Task->args[0] = 'ViewTaskComments'; $this->Task->args[1] = 'view'; @@ -329,7 +465,8 @@ class ViewTaskTest extends CakeTestCase { * Ensure that views are only baked for actions that exist in the controller. * * @return void - **/ + * @access public + */ function testExecuteWithController() { $this->Task->args[0] = 'ViewTaskComments'; @@ -345,7 +482,8 @@ class ViewTaskTest extends CakeTestCase { * Which only bakes admin methods, not non-admin methods. * * @return void - **/ + * @access public + */ function testExecuteWithControllerAndAdminFlag() { $_back = Configure::read('Routing'); Configure::write('Routing.prefixes', array('admin')); @@ -367,7 +505,8 @@ class ViewTaskTest extends CakeTestCase { * test execute into interactive. * * @return void - **/ + * @access public + */ function testExecuteInteractive() { $this->Task->connection = 'test_suite'; $this->Task->args = array(); @@ -404,7 +543,8 @@ class ViewTaskTest extends CakeTestCase { * test `cake bake view posts index list` * * @return void - **/ + * @access public + */ function testExecuteWithAlternateTemplates() { $this->Task->connection = 'test_suite'; $this->Task->args = array('ViewTaskComments', 'index', 'list'); @@ -422,7 +562,8 @@ class ViewTaskTest extends CakeTestCase { * test execute into interactive() with admin methods. * * @return void - **/ + * @access public + */ function testExecuteInteractiveWithAdmin() { Configure::write('Routing.prefixes', array('admin')); $this->Task->connection = 'test_suite'; diff --git a/cake/tests/cases/dispatcher.test.php b/cake/tests/cases/dispatcher.test.php index bca9ce70e..1029ab543 100644 --- a/cake/tests/cases/dispatcher.test.php +++ b/cake/tests/cases/dispatcher.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DispatcherTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once CAKE . 'dispatcher.php'; @@ -47,8 +41,8 @@ class TestDispatcher extends Dispatcher { * @param mixed $controller * @param mixed $params * @param mixed $missingAction - * @access protected * @return void + * @access protected */ function _invoke(&$controller, $params) { restore_error_handler(); @@ -66,8 +60,8 @@ class TestDispatcher extends Dispatcher { * cakeError method * * @param mixed $filename - * @access public * @return void + * @access public */ function cakeError($filename, $params) { return array($filename, $params); @@ -76,8 +70,8 @@ class TestDispatcher extends Dispatcher { /** * _stop method * - * @access protected * @return void + * @access protected */ function _stop() { return true; @@ -120,8 +114,8 @@ class MyPluginController extends MyPluginAppController { /** * index method * - * @access public * @return void + * @access public */ function index() { return true; @@ -130,8 +124,8 @@ class MyPluginController extends MyPluginAppController { /** * add method * - * @access public * @return void + * @access public */ function add() { return true; @@ -141,8 +135,8 @@ class MyPluginController extends MyPluginAppController { * admin_add method * * @param mixed $id - * @access public * @return void + * @access public */ function admin_add($id = null) { return $id; @@ -177,8 +171,8 @@ class SomePagesController extends AppController { * display method * * @param mixed $page - * @access public * @return void + * @access public */ function display($page = null) { return $page; @@ -187,8 +181,8 @@ class SomePagesController extends AppController { /** * index method * - * @access public * @return void + * @access public */ function index() { return true; @@ -197,8 +191,8 @@ class SomePagesController extends AppController { /** * protected method * - * @access protected * @return void + * @access protected */ function _protected() { return true; @@ -207,8 +201,8 @@ class SomePagesController extends AppController { /** * redirect method overriding * - * @access public * @return void + * @access public */ function redirect() { echo 'this should not be accessible'; @@ -243,8 +237,8 @@ class OtherPagesController extends MyPluginAppController { * display method * * @param mixed $page - * @access public * @return void + * @access public */ function display($page = null) { return $page; @@ -253,8 +247,8 @@ class OtherPagesController extends MyPluginAppController { /** * index method * - * @access public * @return void + * @access public */ function index() { return true; @@ -288,8 +282,8 @@ class TestDispatchPagesController extends AppController { /** * admin_index method * - * @access public * @return void + * @access public */ function admin_index() { return true; @@ -298,8 +292,8 @@ class TestDispatchPagesController extends AppController { /** * camelCased method * - * @access public * @return void + * @access public */ function camelCased() { return true; @@ -342,8 +336,8 @@ class ArticlesTestController extends ArticlesTestAppController { /** * admin_index method * - * @access public * @return void + * @access public */ function admin_index() { return true; @@ -385,8 +379,8 @@ class SomePostsController extends AppController { /** * beforeFilter method * - * @access public * @return void + * @access public */ function beforeFilter() { if ($this->params['action'] == 'index') { @@ -400,8 +394,8 @@ class SomePostsController extends AppController { /** * index method * - * @access public * @return void + * @access public */ function index() { return true; @@ -410,8 +404,8 @@ class SomePostsController extends AppController { /** * change method * - * @access public * @return void + * @access public */ function change() { return true; @@ -472,8 +466,8 @@ class TestCachedPagesController extends AppController { /** * index method * - * @access public * @return void + * @access public */ function index() { $this->render(); @@ -482,8 +476,8 @@ class TestCachedPagesController extends AppController { /** * test_nocache_tags method * - * @access public * @return void + * @access public */ function test_nocache_tags() { $this->render(); @@ -492,8 +486,8 @@ class TestCachedPagesController extends AppController { /** * view method * - * @access public * @return void + * @access public */ function view($id = null) { $this->render('index'); @@ -527,8 +521,8 @@ class TimesheetsController extends AppController { /** * index method * - * @access public * @return void + * @access public */ function index() { return true; @@ -546,8 +540,8 @@ class DispatcherTest extends CakeTestCase { /** * setUp method * - * @access public * @return void + * @access public */ function startTest() { $this->_get = $_GET; @@ -573,8 +567,8 @@ class DispatcherTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void + * @access public */ function endTest() { $_GET = $this->_get; @@ -590,8 +584,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsWithoutZerosAndEmptyPost method * - * @access public * @return void + * @access public */ function testParseParamsWithoutZerosAndEmptyPost() { $Dispatcher =& new Dispatcher(); @@ -607,8 +601,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsReturnsPostedData method * - * @access public * @return void + * @access public */ function testParseParamsReturnsPostedData() { $_POST['testdata'] = "My Posted Content"; @@ -621,8 +615,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsWithSingleZero method * - * @access public * @return void + * @access public */ function testParseParamsWithSingleZero() { $Dispatcher =& new Dispatcher(); @@ -637,8 +631,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsWithManySingleZeros method * - * @access public * @return void + * @access public */ function testParseParamsWithManySingleZeros() { $Dispatcher =& new Dispatcher(); @@ -654,8 +648,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsWithManyZerosInEachSectionOfUrl method * - * @access public * @return void + * @access public */ function testParseParamsWithManyZerosInEachSectionOfUrl() { $Dispatcher =& new Dispatcher(); @@ -671,8 +665,8 @@ class DispatcherTest extends CakeTestCase { /** * testParseParamsWithMixedOneToManyZerosInEachSectionOfUrl method * - * @access public * @return void + * @access public */ function testParseParamsWithMixedOneToManyZerosInEachSectionOfUrl() { $Dispatcher =& new Dispatcher(); @@ -688,8 +682,8 @@ class DispatcherTest extends CakeTestCase { /** * testQueryStringOnRoot method * - * @access public * @return void + * @access public */ function testQueryStringOnRoot() { Router::reload(); @@ -718,8 +712,8 @@ class DispatcherTest extends CakeTestCase { /** * testFileUploadArrayStructure method * - * @access public * @return void + * @access public */ function testFileUploadArrayStructure() { $_FILES = array('data' => array('name' => array( @@ -971,8 +965,8 @@ class DispatcherTest extends CakeTestCase { /** * testGetUrl method * - * @access public * @return void + * @access public */ function testGetUrl() { $Dispatcher =& new Dispatcher(); @@ -1011,8 +1005,8 @@ class DispatcherTest extends CakeTestCase { /** * testBaseUrlAndWebrootWithModRewrite method * - * @access public * @return void + * @access public */ function testBaseUrlAndWebrootWithModRewrite() { $Dispatcher =& new Dispatcher(); @@ -1087,8 +1081,8 @@ class DispatcherTest extends CakeTestCase { /** * testBaseUrlwithModRewriteAlias method * - * @access public * @return void + * @access public */ function testBaseUrlwithModRewriteAlias() { $_SERVER['DOCUMENT_ROOT'] = '/home/aplusnur/public_html'; @@ -1122,8 +1116,8 @@ class DispatcherTest extends CakeTestCase { /** * testBaseUrlAndWebrootWithBaseUrl method * - * @access public * @return void + * @access public */ function testBaseUrlAndWebrootWithBaseUrl() { $Dispatcher =& new Dispatcher(); @@ -1192,8 +1186,8 @@ class DispatcherTest extends CakeTestCase { /** * testBaseUrlAndWebrootWithBase method * - * @access public * @return void + * @access public */ function testBaseUrlAndWebrootWithBase() { $Dispatcher =& new Dispatcher(); @@ -1223,8 +1217,8 @@ class DispatcherTest extends CakeTestCase { /** * testMissingController method * - * @access public * @return void + * @access public */ function testMissingController() { $Dispatcher =& new TestDispatcher(); @@ -1243,8 +1237,8 @@ class DispatcherTest extends CakeTestCase { /** * testPrivate method * - * @access public * @return void + * @access public */ function testPrivate() { $Dispatcher =& new TestDispatcher(); @@ -1266,8 +1260,8 @@ class DispatcherTest extends CakeTestCase { /** * testMissingAction method * - * @access public * @return void + * @access public */ function testMissingAction() { $Dispatcher =& new TestDispatcher(); @@ -1304,8 +1298,8 @@ class DispatcherTest extends CakeTestCase { /** * testDispatch method * - * @access public * @return void + * @access public */ function testDispatch() { $Dispatcher =& new TestDispatcher(); @@ -1359,8 +1353,8 @@ class DispatcherTest extends CakeTestCase { /** * testDispatchWithArray method * - * @access public * @return void + * @access public */ function testDispatchWithArray() { $Dispatcher =& new TestDispatcher(); @@ -1379,8 +1373,8 @@ class DispatcherTest extends CakeTestCase { /** * testAdminDispatch method * - * @access public * @return void + * @access public */ function testAdminDispatch() { $_POST = array(); @@ -1410,8 +1404,8 @@ class DispatcherTest extends CakeTestCase { /** * testPluginDispatch method * - * @access public * @return void + * @access public */ function testPluginDispatch() { $_POST = array(); @@ -1459,8 +1453,8 @@ class DispatcherTest extends CakeTestCase { /** * testAutomaticPluginDispatch method * - * @access public * @return void + * @access public */ function testAutomaticPluginDispatch() { $_POST = array(); @@ -1497,8 +1491,8 @@ class DispatcherTest extends CakeTestCase { /** * testAutomaticPluginControllerDispatch method * - * @access public * @return void + * @access public */ function testAutomaticPluginControllerDispatch() { $_POST = array(); @@ -1600,7 +1594,8 @@ class DispatcherTest extends CakeTestCase { * plugin short form instead. * * @return void - **/ + * @access public + */ function testAutomaticPluginDispatchWithShortAccess() { $_POST = array(); $_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php'; @@ -1648,8 +1643,8 @@ class DispatcherTest extends CakeTestCase { /** * testAutomaticPluginControllerMissingActionDispatch method * - * @access public * @return void + * @access public */ function testAutomaticPluginControllerMissingActionDispatch() { $_POST = array(); @@ -1691,8 +1686,8 @@ class DispatcherTest extends CakeTestCase { /** * testPrefixProtection method * - * @access public * @return void + * @access public */ function testPrefixProtection() { $_POST = array(); @@ -1721,7 +1716,8 @@ class DispatcherTest extends CakeTestCase { * undocumented function * * @return void - **/ + * @access public + */ function testTestPluginDispatch() { $Dispatcher =& new TestDispatcher(); App::build(array( @@ -1740,8 +1736,8 @@ class DispatcherTest extends CakeTestCase { /** * testChangingParamsFromBeforeFilter method * - * @access public * @return void + * @access public */ function testChangingParamsFromBeforeFilter() { $_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php'; @@ -1774,8 +1770,8 @@ class DispatcherTest extends CakeTestCase { /** * testStaticAssets method * - * @access public * @return void + * @access public */ function testStaticAssets() { Router::reload(); @@ -1784,66 +1780,99 @@ class DispatcherTest extends CakeTestCase { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors'. DS) + 'vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), + 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); - $Dispatcher =& new TestDispatcher(); - + $debug = Configure::read('debug'); Configure::write('debug', 0); ob_start(); - $Dispatcher->dispatch('/img/test.jpg'); + $Dispatcher->dispatch('theme/test_theme/../webroot/css/test_asset.css'); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'img' . DS . 'test.jpg'); - $this->assertEqual($file, $result); - - - Configure::write('debug', 0); - $Dispatcher->params = $Dispatcher->parseParams('css/test_asset.css'); - + $this->assertEqual(null, $result); + ob_start(); - $Dispatcher->cached('css/test_asset.css'); + $Dispatcher->dispatch('theme/test_theme/flash/theme_test.swf'); + $result = ob_get_clean(); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf'); + $this->assertEqual($file, $result); + $this->assertEqual('this is just a test to load swf file from the theme.', $result); + + ob_start(); + $Dispatcher->dispatch('theme/test_theme/pdfs/theme_test.pdf'); + $result = ob_get_clean(); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf'); + $this->assertEqual($file, $result); + $this->assertEqual('this is just a test to load pdf file from the theme.', $result); + + ob_start(); + $Dispatcher->dispatch('theme/test_theme/img/test.jpg'); + $result = ob_get_clean(); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg'); + $this->assertEqual($file, $result); + + + $Dispatcher->params = $Dispatcher->parseParams('theme/test_theme/css/test_asset.css'); + ob_start(); + $Dispatcher->cached('theme/test_theme/css/test_asset.css'); $result = ob_get_clean(); $this->assertEqual('this is the test asset css file', $result); - - + + ob_start(); + $Dispatcher->dispatch('test_plugin/flash/plugin_test.swf'); + $result = ob_get_clean(); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf'); + $this->assertEqual($file, $result); + $this->assertEqual('this is just a test to load swf file from the plugin.', $result); + + ob_start(); + $Dispatcher->dispatch('test_plugin/pdfs/plugin_test.pdf'); + $result = ob_get_clean(); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf'); + $this->assertEqual($file, $result); + $this->assertEqual('this is just a test to load pdf file from the plugin.', $result); + ob_start(); $Dispatcher->cached('test_plugin/js/test_plugin/test.js'); $result = ob_get_clean(); $this->assertEqual('alert("Test App");', $result); - - Configure::write('debug', 0); $Dispatcher->params = $Dispatcher->parseParams('test_plugin/js/test_plugin/test.js'); ob_start(); $Dispatcher->cached('test_plugin/js/test_plugin/test.js'); $result = ob_get_clean(); $this->assertEqual('alert("Test App");', $result); - - Configure::write('debug', 0); $Dispatcher->params = $Dispatcher->parseParams('test_plugin/css/test_plugin_asset.css'); ob_start(); $Dispatcher->cached('test_plugin/css/test_plugin_asset.css'); $result = ob_get_clean(); $this->assertEqual('this is the test plugin asset css file', $result); - - Configure::write('debug', 0); $Dispatcher->params = $Dispatcher->parseParams('test_plugin/img/cake.icon.gif'); ob_start(); $Dispatcher->cached('test_plugin/img/cake.icon.gif'); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' .DS . 'vendors' . DS . 'img' . DS . 'cake.icon.gif'); + $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif'); $this->assertEqual($file, $result); + + Configure::write('debug', $debug); + $Dispatcher->params = $Dispatcher->parseParams('plugin_js/js/plugin_js.js'); + ob_start(); + $Dispatcher->cached('plugin_js/js/plugin_js.js'); + $result = ob_get_clean(); + $expected = "alert('win sauce');"; + $this->assertEqual($result, $expected); + header('Content-type: text/html');//reset the header content-type without page can render as plain text. } /** * testFullPageCachingDispatch method * - * @access public * @return void + * @access public */ function testFullPageCachingDispatch() { Configure::write('Cache.disable', false); @@ -1978,8 +2007,8 @@ class DispatcherTest extends CakeTestCase { /** * testHttpMethodOverrides method * - * @access public * @return void + * @access public */ function testHttpMethodOverrides() { Router::reload(); @@ -2033,6 +2062,7 @@ class DispatcherTest extends CakeTestCase { * Tests that invalid characters cannot be injected into the application base path. * * @return void + * @access public */ function testBasePathInjection() { $self = $_SERVER['PHP_SELF']; @@ -2049,8 +2079,8 @@ class DispatcherTest extends CakeTestCase { /** * testEnvironmentDetection method * - * @access public * @return void + * @access public */ function testEnvironmentDetection() { $dispatcher =& new Dispatcher(); @@ -2155,8 +2185,8 @@ class DispatcherTest extends CakeTestCase { /** * Tests that the Dispatcher does not return an empty action * - * @access private * @return void + * @access public */ function testTrailingSlash() { $_POST = array(); @@ -2181,8 +2211,8 @@ class DispatcherTest extends CakeTestCase { /** * backupEnvironment method * - * @access private * @return void + * @access private */ function __backupEnvironment() { return array( @@ -2196,8 +2226,8 @@ class DispatcherTest extends CakeTestCase { /** * reloadEnvironment method * - * @access private * @return void + * @access private */ function __reloadEnvironment() { foreach ($_GET as $key => $val) { @@ -2216,8 +2246,8 @@ class DispatcherTest extends CakeTestCase { * loadEnvironment method * * @param mixed $env - * @access private * @return void + * @access private */ function __loadEnvironment($env) { if ($env['reload']) { @@ -2251,8 +2281,8 @@ class DispatcherTest extends CakeTestCase { * cachePath method * * @param mixed $her - * @access private * @return string + * @access private */ function __cachePath($here) { $path = $here; diff --git a/cake/tests/cases/libs/cache.test.php b/cake/tests/cases/libs/cache.test.php index a019f24bc..4e575bc8c 100644 --- a/cake/tests/cases/libs/cache.test.php +++ b/cake/tests/cases/libs/cache.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * CacheTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { @@ -49,8 +43,6 @@ class CacheTest extends CakeTestCase { $this->_defaultCacheConfig = Cache::config('default'); Cache::config('default', array('engine' => 'File', 'path' => TMP . 'tests')); - - Cache::engine('File', array('path' => TMP . 'tests')); } /** @@ -62,7 +54,6 @@ class CacheTest extends CakeTestCase { function tearDown() { Configure::write('Cache.disable', $this->_cacheDisable); Cache::config('default', $this->_defaultCacheConfig['settings']); - Cache::engine('File'); } /** @@ -77,6 +68,31 @@ class CacheTest extends CakeTestCase { $this->assertEqual($results, Cache::config('new')); } +/** + * test configuring CacheEngines in App/libs + * + * @return void + */ + function testConfigWithLibAndPluginEngines() { + App::build(array( + 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + ), true); + + $settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_'); + $result = Cache::config('libEngine', $settings); + $this->assertEqual($result, Cache::config('libEngine')); + + $settings = array('engine' => 'TestPlugin.TestPluginCache', 'path' => TMP, 'prefix' => 'cake_test_'); + $result = Cache::config('pluginLibEngine', $settings); + $this->assertEqual($result, Cache::config('pluginLibEngine')); + + Cache::drop('libEngine'); + Cache::drop('pluginLibEngine'); + + App::build(); + } + /** * testInvalidConfig method * @@ -108,15 +124,45 @@ class CacheTest extends CakeTestCase { $_cacheConfigTests = Cache::config('tests'); $result = Cache::config('sessions', array('engine'=> 'File', 'path' => TMP . 'sessions')); - $this->assertEqual($result['settings'], Cache::settings('File')); + $this->assertEqual($result['settings'], Cache::settings('sessions')); $result = Cache::config('tests', array('engine'=> 'File', 'path' => TMP . 'tests')); - $this->assertEqual($result['settings'], Cache::settings('File')); + $this->assertEqual($result['settings'], Cache::settings('tests')); Cache::config('sessions', $_cacheConfigSessions['settings']); Cache::config('tests', $_cacheConfigTests['settings']); } +/** + * test that calling config() sets the 'default' configuration up. + * + * @return void + */ + function testConfigSettingDefaultConfigKey() { + Cache::config('test_name', array('engine' => 'File', 'prefix' => 'test_name_')); + + Cache::config('test_name'); + Cache::write('value_one', 'I am cached'); + $result = Cache::read('value_one'); + $this->assertEqual($result, 'I am cached'); + + Cache::config('default'); + $result = Cache::read('value_one'); + $this->assertEqual($result, null); + + Cache::write('value_one', 'I am in another cache config!'); + $result = Cache::read('value_one'); + $this->assertEqual($result, 'I am in another cache config!'); + + Cache::config('test_name'); + $result = Cache::read('value_one'); + $this->assertEqual($result, 'I am cached'); + + Cache::delete('value_one'); + Cache::config('default'); + Cache::delete('value_one'); + } + /** * testWritingWithConfig method * @@ -138,11 +184,23 @@ class CacheTest extends CakeTestCase { 'engine' => 'File', 'isWindows' => DIRECTORY_SEPARATOR == '\\' ); - $this->assertEqual($expected, Cache::settings('File')); + $this->assertEqual($expected, Cache::settings('sessions')); Cache::config('sessions', $_cacheConfigSessions['settings']); } +/** + * test that configured returns an array of the currently configured cache + * settings + * + * @return void + */ + function testConfigured() { + $result = Cache::configured(); + $this->assertTrue(in_array('_cake_core_', $result)); + $this->assertTrue(in_array('default', $result)); + } + /** * testInitSettings method * @@ -150,7 +208,7 @@ class CacheTest extends CakeTestCase { * @return void */ function testInitSettings() { - Cache::engine('File', array('path' => TMP . 'tests')); + Cache::config('default', array('engine' => 'File', 'path' => TMP . 'tests')); $settings = Cache::settings(); $expecting = array( @@ -164,8 +222,37 @@ class CacheTest extends CakeTestCase { 'isWindows' => DIRECTORY_SEPARATOR == '\\' ); $this->assertEqual($settings, $expecting); + } - Cache::engine('File'); +/** + * test that drop removes cache configs, and that further attempts to use that config + * do not work. + * + * @return void + */ + function testDrop() { + App::build(array( + 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + ), true); + + $result = Cache::drop('some_config_that_does_not_exist'); + $this->assertFalse($result); + + $_testsConfig = Cache::config('tests'); + $result = Cache::drop('tests'); + $this->assertTrue($result); + + Cache::config('unconfigTest', array( + 'engine' => 'TestAppCache' + )); + $this->assertTrue(Cache::isInitialized('unconfigTest')); + + $this->assertTrue(Cache::drop('unconfigTest')); + $this->assertFalse(Cache::isInitialized('TestAppCache')); + + Cache::config('tests', $_testsConfig); + App::build(); } /** @@ -262,5 +349,6 @@ class CacheTest extends CakeTestCase { Cache::set($_cacheSet); } + } ?> \ No newline at end of file diff --git a/cake/tests/cases/libs/cache/apc.test.php b/cake/tests/cases/libs/cache/apc.test.php index 27cecbca9..1377cfe41 100644 --- a/cake/tests/cases/libs/cache/apc.test.php +++ b/cake/tests/cases/libs/cache/apc.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ApcEngineTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache * @since CakePHP(tm) v 1.2.0.5434 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { @@ -45,7 +39,7 @@ class ApcEngineTest extends UnitTestCase { */ function skip() { $skip = true; - if (Cache::engine('Apc')) { + if (function_exists('apc_store')) { $skip = false; } $this->skipIf($skip, '%s Apc is not installed or configured properly'); @@ -71,6 +65,7 @@ class ApcEngineTest extends UnitTestCase { */ function tearDown() { Configure::write('Cache.disable', $this->_cacheDisable); + Cache::drop('apc'); Cache::config('default'); } @@ -118,7 +113,7 @@ class ApcEngineTest extends UnitTestCase { $result = Cache::read('other_test'); $this->assertFalse($result); - Cache::set(array('duration' => "+1 second")); + Cache::set(array('duration' => 1)); $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('other_test', $data); diff --git a/cake/tests/cases/libs/cache/file.test.php b/cake/tests/cases/libs/cache/file.test.php index 45f191f95..22c84ebbd 100644 --- a/cake/tests/cases/libs/cache/file.test.php +++ b/cake/tests/cases/libs/cache/file.test.php @@ -1,36 +1,25 @@ <?php -/* SVN FILE: $Id$ */ - /** * FileEngineTest file * - * Long description for file - * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache * @since CakePHP(tm) v 1.2.0.5434 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { require LIBS . 'cache.php'; } -if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { - define('CAKEPHP_UNIT_TEST_EXECUTION', 1); -} /** * FileEngineTest class @@ -80,12 +69,11 @@ class FileEngineTest extends CakeTestCase { */ function testCacheDirChange() { $result = Cache::config('sessions', array('engine'=> 'File', 'path' => TMP . 'sessions')); - $this->assertEqual($result['settings'], Cache::settings('File')); - $this->assertNotEqual($result, Cache::settings('File')); + $this->assertEqual($result['settings'], Cache::settings('sessions')); - $result = Cache::config('tests', array('engine'=> 'File', 'path' => TMP . 'tests')); - $this->assertEqual($result['settings'], Cache::settings('File')); - $this->assertNotEqual($result, Cache::settings('File')); + $result = Cache::config('sessions', array('engine'=> 'File', 'path' => TMP . 'tests')); + $this->assertEqual($result['settings'], Cache::settings('sessions')); + $this->assertNotEqual($result['settings'], Cache::settings('default')); } /** @@ -165,7 +153,6 @@ class FileEngineTest extends CakeTestCase { $result = Cache::delete('delete_test'); $this->assertFalse($result); - } /** @@ -175,12 +162,12 @@ class FileEngineTest extends CakeTestCase { * @return void */ function testSerialize() { - Cache::engine('File', array('serialize' => true)); + Cache::config('default', array('engine' => 'File', 'serialize' => true)); $data = 'this is a test of the emergency broadcasting system'; - $write = Cache::write('serialize_test', $data, 1); + $write = Cache::write('serialize_test', $data); $this->assertTrue($write); - Cache::engine('File', array('serialize' => false)); + Cache::config('default', array('serialize' => false)); $read = Cache::read('serialize_test'); $newread = Cache::read('serialize_test'); @@ -190,7 +177,6 @@ class FileEngineTest extends CakeTestCase { $this->assertIdentical($read, serialize($data)); $this->assertIdentical(unserialize($newread), $data); - } /** @@ -200,7 +186,7 @@ class FileEngineTest extends CakeTestCase { * @return void */ function testClear() { - Cache::engine('File', array('duration' => 1)); + Cache::config('default', array('engine' => 'File', 'duration' => 1)); $data = 'this is a test of the emergency broadcasting system'; $write = Cache::write('serialize_test1', $data); $write = Cache::write('serialize_test2', $data); @@ -229,7 +215,7 @@ class FileEngineTest extends CakeTestCase { $this->assertFalse(file_exists(CACHE . 'cake_serialize_test2')); $this->assertFalse(file_exists(CACHE . 'cake_serialize_test3')); - $result = Cache::engine('File', array('path' => CACHE . 'views')); + Cache::config('default', array('engine' => 'File', 'path' => CACHE . 'views')); $data = 'this is a test of the emergency broadcasting system'; $write = Cache::write('controller_view_1', $data); @@ -284,7 +270,7 @@ class FileEngineTest extends CakeTestCase { clearCache('controller_view'); - Cache::engine('File', array('path' => CACHE)); + Cache::config('default', array('engine' => 'File', 'path' => CACHE)); } /** @@ -312,40 +298,43 @@ class FileEngineTest extends CakeTestCase { * @return void */ function testRemoveWindowsSlashesFromCache() { - Cache::engine('File', array('isWindows' => true, 'prefix' => null, 'path' => TMP)); + Cache::config('windows_test', array('engine' => 'File', 'isWindows' => true, 'prefix' => null, 'path' => TMP)); $expected = array ( - 'C:\dev\prj2\sites\cake\libs' => array( - 0 => 'C:\dev\prj2\sites\cake\libs', 1 => 'C:\dev\prj2\sites\cake\libs\view', - 2 => 'C:\dev\prj2\sites\cake\libs\view\scaffolds', 3 => 'C:\dev\prj2\sites\cake\libs\view\pages', - 4 => 'C:\dev\prj2\sites\cake\libs\view\layouts', 5 => 'C:\dev\prj2\sites\cake\libs\view\layouts\xml', - 6 => 'C:\dev\prj2\sites\cake\libs\view\layouts\rss', 7 => 'C:\dev\prj2\sites\cake\libs\view\layouts\js', - 8 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email', 9 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email\text', - 10 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email\html', 11 => 'C:\dev\prj2\sites\cake\libs\view\helpers', - 12 => 'C:\dev\prj2\sites\cake\libs\view\errors', 13 => 'C:\dev\prj2\sites\cake\libs\view\elements', - 14 => 'C:\dev\prj2\sites\cake\libs\view\elements\email', 15 => 'C:\dev\prj2\sites\cake\libs\view\elements\email\text', - 16 => 'C:\dev\prj2\sites\cake\libs\view\elements\email\html', 17 => 'C:\dev\prj2\sites\cake\libs\model', - 18 => 'C:\dev\prj2\sites\cake\libs\model\datasources', 19 => 'C:\dev\prj2\sites\cake\libs\model\datasources\dbo', - 20 => 'C:\dev\prj2\sites\cake\libs\model\behaviors', 21 => 'C:\dev\prj2\sites\cake\libs\controller', - 22 => 'C:\dev\prj2\sites\cake\libs\controller\components', 23 => 'C:\dev\prj2\sites\cake\libs\cache'), - 'C:\dev\prj2\sites\main_site\vendors' => array( - 0 => 'C:\dev\prj2\sites\main_site\vendors', 1 => 'C:\dev\prj2\sites\main_site\vendors\shells', - 2 => 'C:\dev\prj2\sites\main_site\vendors\shells\templates', 3 => 'C:\dev\prj2\sites\main_site\vendors\shells\templates\cdc_project', - 4 => 'C:\dev\prj2\sites\main_site\vendors\shells\tasks', 5 => 'C:\dev\prj2\sites\main_site\vendors\js', - 6 => 'C:\dev\prj2\sites\main_site\vendors\css'), - 'C:\dev\prj2\sites\vendors' => array( - 0 => 'C:\dev\prj2\sites\vendors', 1 => 'C:\dev\prj2\sites\vendors\simpletest', - 2 => 'C:\dev\prj2\sites\vendors\simpletest\test', 3 => 'C:\dev\prj2\sites\vendors\simpletest\test\support', - 4 => 'C:\dev\prj2\sites\vendors\simpletest\test\support\collector', 5 => 'C:\dev\prj2\sites\vendors\simpletest\extensions', - 6 => 'C:\dev\prj2\sites\vendors\simpletest\extensions\testdox', 7 => 'C:\dev\prj2\sites\vendors\simpletest\docs', - 8 => 'C:\dev\prj2\sites\vendors\simpletest\docs\fr', 9 => 'C:\dev\prj2\sites\vendors\simpletest\docs\en'), - 'C:\dev\prj2\sites\main_site\views\helpers' => array( - 0 => 'C:\dev\prj2\sites\main_site\views\helpers')); + 'C:\dev\prj2\sites\cake\libs' => array( + 0 => 'C:\dev\prj2\sites\cake\libs', 1 => 'C:\dev\prj2\sites\cake\libs\view', + 2 => 'C:\dev\prj2\sites\cake\libs\view\scaffolds', 3 => 'C:\dev\prj2\sites\cake\libs\view\pages', + 4 => 'C:\dev\prj2\sites\cake\libs\view\layouts', 5 => 'C:\dev\prj2\sites\cake\libs\view\layouts\xml', + 6 => 'C:\dev\prj2\sites\cake\libs\view\layouts\rss', 7 => 'C:\dev\prj2\sites\cake\libs\view\layouts\js', + 8 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email', 9 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email\text', + 10 => 'C:\dev\prj2\sites\cake\libs\view\layouts\email\html', 11 => 'C:\dev\prj2\sites\cake\libs\view\helpers', + 12 => 'C:\dev\prj2\sites\cake\libs\view\errors', 13 => 'C:\dev\prj2\sites\cake\libs\view\elements', + 14 => 'C:\dev\prj2\sites\cake\libs\view\elements\email', 15 => 'C:\dev\prj2\sites\cake\libs\view\elements\email\text', + 16 => 'C:\dev\prj2\sites\cake\libs\view\elements\email\html', 17 => 'C:\dev\prj2\sites\cake\libs\model', + 18 => 'C:\dev\prj2\sites\cake\libs\model\datasources', 19 => 'C:\dev\prj2\sites\cake\libs\model\datasources\dbo', + 20 => 'C:\dev\prj2\sites\cake\libs\model\behaviors', 21 => 'C:\dev\prj2\sites\cake\libs\controller', + 22 => 'C:\dev\prj2\sites\cake\libs\controller\components', 23 => 'C:\dev\prj2\sites\cake\libs\cache'), + 'C:\dev\prj2\sites\main_site\vendors' => array( + 0 => 'C:\dev\prj2\sites\main_site\vendors', 1 => 'C:\dev\prj2\sites\main_site\vendors\shells', + 2 => 'C:\dev\prj2\sites\main_site\vendors\shells\templates', 3 => 'C:\dev\prj2\sites\main_site\vendors\shells\templates\cdc_project', + 4 => 'C:\dev\prj2\sites\main_site\vendors\shells\tasks', 5 => 'C:\dev\prj2\sites\main_site\vendors\js', + 6 => 'C:\dev\prj2\sites\main_site\vendors\css'), + 'C:\dev\prj2\sites\vendors' => array( + 0 => 'C:\dev\prj2\sites\vendors', 1 => 'C:\dev\prj2\sites\vendors\simpletest', + 2 => 'C:\dev\prj2\sites\vendors\simpletest\test', 3 => 'C:\dev\prj2\sites\vendors\simpletest\test\support', + 4 => 'C:\dev\prj2\sites\vendors\simpletest\test\support\collector', 5 => 'C:\dev\prj2\sites\vendors\simpletest\extensions', + 6 => 'C:\dev\prj2\sites\vendors\simpletest\extensions\testdox', 7 => 'C:\dev\prj2\sites\vendors\simpletest\docs', + 8 => 'C:\dev\prj2\sites\vendors\simpletest\docs\fr', 9 => 'C:\dev\prj2\sites\vendors\simpletest\docs\en'), + 'C:\dev\prj2\sites\main_site\views\helpers' => array( + 0 => 'C:\dev\prj2\sites\main_site\views\helpers') + ); - $data = Cache::write('test_dir_map', $expected); - $data = Cache::read('test_dir_map'); - Cache::delete('test_dir_map'); + Cache::write('test_dir_map', $expected, 'windows_test'); + $data = Cache::read('test_dir_map', 'windows_test'); + Cache::delete('test_dir_map', 'windows_test'); $this->assertEqual($expected, $data); + + Cache::drop('windows_test'); } /** @@ -355,13 +344,13 @@ class FileEngineTest extends CakeTestCase { * @return void */ function testWriteQuotedString() { - Cache::engine('File', array('path' => TMP . 'tests')); + Cache::config('default', array('engine' => 'File', 'path' => TMP . 'tests')); Cache::write('App.doubleQuoteTest', '"this is a quoted string"'); $this->assertIdentical(Cache::read('App.doubleQuoteTest'), '"this is a quoted string"'); Cache::write('App.singleQuoteTest', "'this is a quoted string'"); $this->assertIdentical(Cache::read('App.singleQuoteTest'), "'this is a quoted string'"); - Cache::engine('File', array('isWindows' => true, 'path' => TMP . 'tests')); + Cache::config('default', array('isWindows' => true, 'path' => TMP . 'tests')); $this->assertIdentical(Cache::read('App.doubleQuoteTest'), '"this is a quoted string"'); Cache::write('App.singleQuoteTest', "'this is a quoted string'"); $this->assertIdentical(Cache::read('App.singleQuoteTest'), "'this is a quoted string'"); diff --git a/cake/tests/cases/libs/cache/memcache.test.php b/cake/tests/cases/libs/cache/memcache.test.php index a5c321e50..99cc68ca1 100644 --- a/cake/tests/cases/libs/cache/memcache.test.php +++ b/cake/tests/cases/libs/cache/memcache.test.php @@ -1,41 +1,26 @@ <?php -/* SVN FILE: $Id$ */ - /** * MemcacheEngineTest file * - * Long description for file - * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache * @since CakePHP(tm) v 1.2.0.5434 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { require LIBS . 'cache.php'; } -/** - * MemcacheEngineTest class - * - * @package cake - * @subpackage cake.tests.cases.libs.cache - */ - /** * MemcacheEngineTest class * @@ -52,10 +37,10 @@ class MemcacheEngineTest extends CakeTestCase { */ function skip() { $skip = true; - if (Cache::engine('Memcache')) { + if (class_exists('Memcache')) { $skip = false; } - $this->skipIf($skip, '%s Memcache is not installed or configured properly'); + $this->skipIf($skip, '%s Memcache is not installed or configured properly.'); } /** @@ -78,6 +63,7 @@ class MemcacheEngineTest extends CakeTestCase { */ function tearDown() { Configure::write('Cache.disable', $this->_cacheDisable); + Cache::drop('memcache'); Cache::config('default'); } @@ -89,13 +75,15 @@ class MemcacheEngineTest extends CakeTestCase { */ function testSettings() { $settings = Cache::settings(); - $expecting = array('prefix' => 'cake_', - 'duration'=> 3600, - 'probability' => 100, - 'servers' => array('127.0.0.1'), - 'compress' => false, - 'engine' => 'Memcache' - ); + unset($settings['serialize'], $settings['path']); + $expecting = array( + 'prefix' => 'cake_', + 'duration'=> 3600, + 'probability' => 100, + 'servers' => array('127.0.0.1'), + 'compress' => false, + 'engine' => 'Memcache' + ); $this->assertEqual($settings, $expecting); } @@ -107,14 +95,12 @@ class MemcacheEngineTest extends CakeTestCase { */ function testMultipleServers() { $servers = array('127.0.0.1:11211', '127.0.0.1:11222'); - - $Cache =& Cache::getInstance(); - $MemCache =& $Cache->_Engine['Memcache']; - $available = true; + $Memcache =& new Memcache(); + foreach($servers as $server) { list($host, $port) = explode(':', $server); - if (!@$MemCache->__Memcache->connect($host, $port)) { + if (!$Memcache->addServer($host, $port)) { $available = false; } } @@ -122,13 +108,13 @@ class MemcacheEngineTest extends CakeTestCase { if ($this->skipIf(!$available, '%s Need memcache servers at ' . implode(', ', $servers) . ' to run this test')) { return; } + $Memcache =& new MemcacheEngine(); + $Memcache->init(array('engine' => 'Memcache', 'servers' => $servers)); - unset($MemCache->__Memcache); - $MemCache->init(array('engine' => 'Memcache', 'servers' => $servers)); - - $servers = array_keys($MemCache->__Memcache->getExtendedStats()); - $settings = Cache::settings(); + $servers = array_keys($Memcache->__Memcache->getExtendedStats()); + $settings = $Memcache->settings(); $this->assertEqual($servers, $settings['servers']); + Cache::drop('dual_server'); } /** @@ -138,8 +124,9 @@ class MemcacheEngineTest extends CakeTestCase { * @return void */ function testConnect() { - $Cache =& Cache::getInstance(); - $result = $Cache->_Engine['Memcache']->connect('127.0.0.1'); + $Memcache =& new MemcacheEngine(); + $Memcache->init(Cache::settings('memcache')); + $result = $Memcache->connect('127.0.0.1'); $this->assertTrue($result); } @@ -197,13 +184,13 @@ class MemcacheEngineTest extends CakeTestCase { $result = Cache::read('other_test'); $this->assertFalse($result); - Cache::engine('Memcache', array('duration' => '+1 second')); + Cache::config('memcache', array('duration' => '+1 second')); sleep(2); $result = Cache::read('other_test'); $this->assertFalse($result); - Cache::engine('Memcache', array('duration' => '+31 day')); + Cache::config('memcache', array('duration' => '+31 day')); $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('long_expiry_test', $data); $this->assertTrue($result); @@ -216,7 +203,7 @@ class MemcacheEngineTest extends CakeTestCase { $result = Cache::read('long_expiry_test'); $this->assertTrue($result); - Cache::engine('Memcache', array('duration' => 3600)); + Cache::config('memcache', array('duration' => 3600)); } /** diff --git a/cake/tests/cases/libs/cache/xcache.test.php b/cake/tests/cases/libs/cache/xcache.test.php index 9ca8cf23a..50ed9c280 100644 --- a/cake/tests/cases/libs/cache/xcache.test.php +++ b/cake/tests/cases/libs/cache/xcache.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * XcacheEngineTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.cache * @since CakePHP(tm) v 1.2.0.5434 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('Cache')) { @@ -45,7 +39,7 @@ class XcacheEngineTest extends UnitTestCase { */ function skip() { $skip = true; - if ($result = Cache::engine('Xcache')) { + if (function_exists('xcache_set')) { $skip = false; } $this->skipIf($skip, '%s Xcache is not installed or configured properly'); @@ -82,13 +76,16 @@ class XcacheEngineTest extends UnitTestCase { */ function testSettings() { $settings = Cache::settings(); - $expecting = array('prefix' => 'cake_', - 'duration'=> 3600, - 'probability' => 100, - 'engine' => 'Xcache', - 'PHP_AUTH_USER' => 'user', - 'PHP_AUTH_PW' => 'password', - ); + $expecting = array( + 'prefix' => 'cake_', + 'duration'=> 3600, + 'probability' => 100, + 'engine' => 'Xcache', + ); + $this->assertTrue(isset($settings['PHP_AUTH_USER'])); + $this->assertTrue(isset($settings['PHP_AUTH_PW'])); + + unset($settings['PHP_AUTH_USER'], $settings['PHP_AUTH_PW']); $this->assertEqual($settings, $expecting); } diff --git a/cake/tests/cases/libs/cake_log.test.php b/cake/tests/cases/libs/cake_log.test.php index 8c95cb70c..55909c70e 100644 --- a/cake/tests/cases/libs/cake_log.test.php +++ b/cake/tests/cases/libs/cake_log.test.php @@ -2,18 +2,15 @@ /** * CakeLogTest file * - * Long description for file - * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -21,6 +18,7 @@ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Log'); +App::import('Core', 'log/FileLog'); /** * CakeLogTest class @@ -30,6 +28,116 @@ App::import('Core', 'Log'); */ class CakeLogTest extends CakeTestCase { +/** + * Start test callback, clears all streams enabled. + * + * @return void + */ + function startTest() { + $streams = CakeLog::configured(); + foreach ($streams as $stream) { + CakeLog::drop($stream); + } + } + +/** + * test importing loggers from app/libs and plugins. + * + * @return void + */ + function testImportingLoggers() { + App::build(array( + 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + ), true); + + $result = CakeLog::config('libtest', array( + 'engine' => 'TestAppLog' + )); + $this->assertTrue($result); + $this->assertEqual(CakeLog::configured(), array('libtest')); + + $result = CakeLog::config('plugintest', array( + 'engine' => 'TestPlugin.TestPluginLog' + )); + $this->assertTrue($result); + $this->assertEqual(CakeLog::configured(), array('libtest', 'plugintest')); + + App::build(); + } + +/** + * test all the errors from failed logger imports + * + * @return void + */ + function testImportingLoggerFailure() { + $this->expectError('Missing logger classname'); + CakeLog::config('fail', array()); + + $this->expectError('Could not load logger class born to fail'); + CakeLog::config('fail', array('engine' => 'born to fail')); + + $this->expectError('logger class stdClass does not implement a write method.'); + CakeLog::config('fail', array('engine' => 'stdClass')); + } + +/** + * Test that CakeLog autoconfigures itself to use a FileLogger with the LOGS dir. + * When no streams are there. + * + * @return void + */ + function testAutoConfig() { + @unlink(LOGS . 'error.log'); + CakeLog::write(LOG_WARNING, 'Test warning'); + $this->assertTrue(file_exists(LOGS . 'error.log')); + + $result = CakeLog::configured(); + $this->assertEqual($result, array('default')); + unlink(LOGS . 'error.log'); + } + +/** + * test configuring log streams + * + * @return void + */ + function testConfig() { + CakeLog::config('file', array( + 'engine' => 'FileLog', + 'path' => LOGS + )); + $result = CakeLog::configured(); + $this->assertEqual($result, array('file')); + + @unlink(LOGS . 'error.log'); + CakeLog::write(LOG_WARNING, 'Test warning'); + $this->assertTrue(file_exists(LOGS . 'error.log')); + + $result = file_get_contents(LOGS . 'error.log'); + $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Warning: Test warning/', $result); + unlink(LOGS . 'error.log'); + } + +/** + * explict tests for drop() + * + * @return void + **/ + function testDrop() { + CakeLog::config('file', array( + 'engine' => 'FileLog', + 'path' => LOGS + )); + $result = CakeLog::configured(); + $this->assertEqual($result, array('file')); + + CakeLog::drop('file'); + $result = CakeLog::configured(); + $this->assertEqual($result, array()); + } + /** * testLogFileWriting method * @@ -38,7 +146,8 @@ class CakeLogTest extends CakeTestCase { */ function testLogFileWriting() { @unlink(LOGS . 'error.log'); - CakeLog::write(LOG_WARNING, 'Test warning'); + $result = CakeLog::write(LOG_WARNING, 'Test warning'); + $this->assertTrue($result); $this->assertTrue(file_exists(LOGS . 'error.log')); unlink(LOGS . 'error.log'); @@ -54,7 +163,7 @@ class CakeLogTest extends CakeTestCase { * Test logging with the error handler. * * @return void - **/ + */ function testLoggingWithErrorHandling() { @unlink(LOGS . 'debug.log'); Configure::write('log', E_ALL & ~E_DEPRECATED); @@ -66,7 +175,7 @@ class CakeLogTest extends CakeTestCase { $result = file(LOGS . 'debug.log'); $this->assertEqual(count($result), 1); $this->assertPattern( - '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} Notice: Notice \(8\): Undefined variable: out in \[.+ line \d{2}\]$/', + '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} Notice: Notice \(8\): Undefined variable: out in \[.+ line \d+\]$/', $result[0] ); @unlink(LOGS . 'debug.log'); diff --git a/cake/tests/cases/libs/cake_session.test.php b/cake/tests/cases/libs/cake_session.test.php index 76edd87d4..99d030cfd 100644 --- a/cake/tests/cases/libs/cake_session.test.php +++ b/cake/tests/cases/libs/cake_session.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -290,6 +289,20 @@ class SessionTest extends CakeTestCase { $this->assertTrue($this->Session->check('Session Test.Test Case')); } +/** + * test key exploitation + * + * @return void + */ + function testKeyExploit() { + $key = "a'] = 1; phpinfo(); \$_SESSION['a"; + $result = $this->Session->write($key, 'haxored'); + $this->assertTrue($result); + + $result = $this->Session->read($key); + $this->assertEqual($result, 'haxored'); + } + /** * testReadingSavedEmpty method * diff --git a/cake/tests/cases/libs/cake_socket.test.php b/cake/tests/cases/libs/cake_socket.test.php index 07cf73109..501839a8c 100644 --- a/cake/tests/cases/libs/cake_socket.test.php +++ b/cake/tests/cases/libs/cake_socket.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SocketTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'CakeSocket'); diff --git a/cake/tests/cases/libs/cake_test_case.test.php b/cake/tests/cases/libs/cake_test_case.test.php index e57c19718..5260420a8 100644 --- a/cake/tests/cases/libs/cake_test_case.test.php +++ b/cake/tests/cases/libs/cake_test_case.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * CakeTestCaseTest file * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', 'CakeTestCase'); @@ -263,7 +257,7 @@ class CakeTestCaseTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testTestAction() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), @@ -395,7 +389,7 @@ class CakeTestCaseTest extends CakeTestCase { * testSkipIf * * @return void - **/ + */ function testSkipIf() { $this->assertTrue($this->Case->skipIf(true)); $this->assertFalse($this->Case->skipIf(false)); diff --git a/cake/tests/cases/libs/cake_test_fixture.test.php b/cake/tests/cases/libs/cake_test_fixture.test.php index 139b5b5be..385b07562 100644 --- a/cake/tests/cases/libs/cake_test_fixture.test.php +++ b/cake/tests/cases/libs/cake_test_fixture.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * CakeTestFixture file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Datasource', 'DboSource', false); @@ -116,7 +110,7 @@ class CakeTestFixtureDefaultImportFixture extends CakeTestFixture { * * @package default * @subpackage cake.cake.tests.cases.libs. - **/ + */ class FixtureImportTestModel extends Model { var $name = 'FixtureImport'; var $useTable = 'fixture_tests'; diff --git a/cake/tests/cases/libs/class_registry.test.php b/cake/tests/cases/libs/class_registry.test.php index 614101b29..205df9108 100644 --- a/cake/tests/cases/libs/class_registry.test.php +++ b/cake/tests/cases/libs/class_registry.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ClassRegistryTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'ClassRegistry'); diff --git a/cake/tests/cases/libs/code_coverage_manager.test.php b/cake/tests/cases/libs/code_coverage_manager.test.php index 74722ab4d..f24a2c059 100644 --- a/cake/tests/cases/libs/code_coverage_manager.test.php +++ b/cake/tests/cases/libs/code_coverage_manager.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * CodeCoverageManagerTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once CAKE . 'tests' . DS . 'lib' . DS . 'code_coverage_manager.php'; @@ -51,7 +45,7 @@ class CodeCoverageManagerTest extends CakeTestCase { * Store reference of $_GET to restore later. * * @return void - **/ + */ function startCase() { $this->_get = $_GET; } @@ -60,7 +54,7 @@ class CodeCoverageManagerTest extends CakeTestCase { * End Case - restore GET vars. * * @return void - **/ + */ function endCase() { $_GET = $this->_get; } diff --git a/cake/tests/cases/libs/configure.test.php b/cake/tests/cases/libs/configure.test.php index 414d661c2..40a761932 100644 --- a/cake/tests/cases/libs/configure.test.php +++ b/cake/tests/cases/libs/configure.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ConfigureTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Configure'); @@ -142,7 +136,7 @@ class ConfigureTest extends CakeTestCase { * testSetErrorReporting Level * * @return void - **/ + */ function testSetErrorReportingLevel() { Configure::write('log', false); @@ -166,7 +160,7 @@ class ConfigureTest extends CakeTestCase { * test that log and debug configure values interact well. * * @return void - **/ + */ function testInteractionOfDebugAndLog() { Configure::write('log', false); @@ -228,6 +222,30 @@ class ConfigureTest extends CakeTestCase { $result = Configure::load('config'); $this->assertTrue($result === null); + + $result = Configure::load('../../index'); + $this->assertFalse($result); + } + +/** + * testLoad method + * + * @access public + * @return void + */ + function testLoadPlugin() { + App::build(array('plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)), true); + $result = Configure::load('test_plugin.load'); + $this->assertTrue($result === null); + $expected = '/test_app/plugins/test_plugin/config/load.php'; + $config = Configure::read('plugin_load'); + $this->assertEqual($config, $expected); + + $result = Configure::load('test_plugin.more.load'); + $this->assertTrue($result === null); + $expected = '/test_app/plugins/test_plugin/config/more.load.php'; + $config = Configure::read('plugin_more_load'); + $this->assertEqual($config, $expected); } /** @@ -239,17 +257,20 @@ class ConfigureTest extends CakeTestCase { function testStoreAndLoad() { Configure::write('Cache.disable', false); - $expected = array('data' => 'value'); + $expected = array('data' => 'value with backslash \, \'singlequote\' and "doublequotes"'); Configure::store('SomeExample', 'test', $expected); Configure::load('test'); $config = Configure::read('SomeExample'); $this->assertEqual($config, $expected); - $expected = array('data' => array('first' => 'value', 'second' => 'value2')); - Configure::store('AnotherExample', 'test.config', $expected); + $expected = array( + 'data' => array('first' => 'value with backslash \, \'singlequote\' and "doublequotes"', 'second' => 'value2'), + 'data2' => 'value' + ); + Configure::store('AnotherExample', 'test_config', $expected); - Configure::load('test.config'); + Configure::load('test_config'); $config = Configure::read('AnotherExample'); $this->assertEqual($config, $expected); } @@ -397,6 +418,29 @@ class AppImportTest extends UnitTestCase { $this->assertFalse($result); } +/** + * test that pluginPath can find paths for plugins. + * + * @return void + */ + function testPluginPath() { + App::build(array( + 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + )); + $path = App::pluginPath('test_plugin'); + $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; + $this->assertEqual($path, $expected); + + $path = App::pluginPath('TestPlugin'); + $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; + $this->assertEqual($path, $expected); + + $path = App::pluginPath('TestPluginTwo'); + $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS; + $this->assertEqual($path, $expected); + App::build(); + } + /** * testClassLoading method * diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index 067972e85..f5a6745d1 100644 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ComponentTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller * @since CakePHP(tm) v 1.2.0.5436 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Controller', 'Controller', false); @@ -483,7 +477,7 @@ class ComponentTest extends CakeTestCase { * Ensure that settings are not duplicated when passed into component initialize. * * @return void - **/ + */ function testComponentParamsNoDuplication() { if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) { return; diff --git a/cake/tests/cases/libs/controller/components/acl.test.php b/cake/tests/cases/libs/controller/components/acl.test.php index fdf981959..2a2f07c47 100644 --- a/cake/tests/cases/libs/controller/components/acl.test.php +++ b/cake/tests/cases/libs/controller/components/acl.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * AclComponentTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components * @since CakePHP(tm) v 1.2.0.5435 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index ecd395c99..07bf1b8f7 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.cases.libs.controller.components @@ -768,7 +767,7 @@ class AuthTest extends CakeTestCase { * test authorize = 'actions' setting. * * @return void - **/ + */ function testAuthorizeActions() { $this->AuthUser =& new AuthUser(); $user = $this->AuthUser->find(); @@ -828,7 +827,7 @@ class AuthTest extends CakeTestCase { * test the action() method * * @return void - **/ + */ function testActionMethod() { $this->Controller->params['controller'] = 'auth_test'; $this->Controller->params['action'] = 'add'; @@ -857,7 +856,7 @@ class AuthTest extends CakeTestCase { * test that deny() converts camel case inputs to lowercase. * * @return void - **/ + */ function testDenyWithCamelCaseMethods() { $this->Controller->Auth->initialize($this->Controller); $this->Controller->Auth->allow('*'); @@ -874,7 +873,7 @@ class AuthTest extends CakeTestCase { * test that allow() and allowedActions work with camelCase method names. * * @return void - **/ + */ function testAllowedActionsWithCamelCaseMethods() { $url = '/auth_test/camelCase'; $this->Controller->params = Router::parse($url); @@ -1100,7 +1099,7 @@ class AuthTest extends CakeTestCase { * And the user doesn't have a session. * * @return void - **/ + */ function testNoRedirectOn404() { $this->Controller->Session->delete('Auth'); $this->Controller->Auth->initialize($this->Controller); @@ -1202,7 +1201,7 @@ class AuthTest extends CakeTestCase { * test Hashing of passwords * * @return void - **/ + */ function testHashPasswords() { $this->Controller->Auth->userModel = 'AuthUser'; diff --git a/cake/tests/cases/libs/controller/components/cookie.test.php b/cake/tests/cases/libs/controller/components/cookie.test.php index 8a98840cf..a5b36cffd 100644 --- a/cake/tests/cases/libs/controller/components/cookie.test.php +++ b/cake/tests/cases/libs/controller/components/cookie.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/cake/tests/cases/libs/controller/components/email.test.php index 1560080a1..073d120db 100644 --- a/cake/tests/cases/libs/controller/components/email.test.php +++ b/cake/tests/cases/libs/controller/components/email.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * EmailComponentTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.cases.libs.controller.components * @since CakePHP(tm) v 1.2.0.5347 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Component', 'Email'); diff --git a/cake/tests/cases/libs/controller/components/request_handler.test.php b/cake/tests/cases/libs/controller/components/request_handler.test.php index f8a971734..ca757321f 100644 --- a/cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/cake/tests/cases/libs/controller/components/request_handler.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * RequestHandlerComponentTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components * @since CakePHP(tm) v 1.2.0.5435 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Controller', 'Controller', false); @@ -43,7 +37,7 @@ class RequestHandlerTestController extends Controller { * * @var string * @access public - **/ + */ var $name = 'RequestHandlerTest'; /** @@ -72,7 +66,7 @@ class RequestHandlerTestController extends Controller { * test method for ajax redirection * * @return void - **/ + */ function destination() { $this->viewPath = 'posts'; $this->render('index'); @@ -251,7 +245,7 @@ class RequestHandlerComponentTest extends CakeTestCase { * testStartupCallback with charset. * * @return void - **/ + */ function testStartupCallbackCharset() { $_SERVER['REQUEST_METHOD'] = 'PUT'; $_SERVER['CONTENT_TYPE'] = 'application/xml; charset=UTF-8'; @@ -293,7 +287,7 @@ class RequestHandlerComponentTest extends CakeTestCase { * * @link #6466 * @return void - **/ + */ function testRenderAsCalledTwice() { $this->RequestHandler->renderAs($this->Controller, 'xml'); $this->assertEqual($this->Controller->viewPath, 'request_handler_test' . DS . 'xml'); @@ -557,7 +551,7 @@ class RequestHandlerComponentTest extends CakeTestCase { * test that ajax requests involving redirects trigger requestAction instead. * * @return void - **/ + */ function testAjaxRedirectAsRequestAction() { $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'; $this->_init(); diff --git a/cake/tests/cases/libs/controller/components/security.test.php b/cake/tests/cases/libs/controller/components/security.test.php index 965f2235d..a704dd183 100644 --- a/cake/tests/cases/libs/controller/components/security.test.php +++ b/cake/tests/cases/libs/controller/components/security.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SecurityComponentTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components * @since CakePHP(tm) v 1.2.0.5435 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Component', 'Security'); @@ -566,6 +560,31 @@ DIGEST; $this->assertTrue($this->Controller->Security->validatePost($this->Controller)); } +/** + * test that validatePost fails if any of its required fields are missing. + * + * @return void + */ + function testValidatePostFormHacking() { + $this->Controller->Security->startup($this->Controller); + $key = $this->Controller->params['_Token']['key']; + $fields = 'a5475372b40f6e3ccbf9f8af191f20e1642fd877%3An%3A1%3A%7Bv%3A0%3B'; + $fields .= 'f%3A11%3A%22Zbqry.inyvq%22%3B%7D'; + + $this->Controller->data = array( + 'Model' => array('username' => 'nate', 'password' => 'foo', 'valid' => '0'), + '_Token' => compact('key') + ); + $result = $this->Controller->Security->validatePost($this->Controller); + $this->assertFalse($result, 'validatePost passed when fields were missing. %s'); + + $this->Controller->data = array( + 'Model' => array('username' => 'nate', 'password' => 'foo', 'valid' => '0'), + '_Token' => compact('fields') + ); + $result = $this->Controller->Security->validatePost($this->Controller); + $this->assertFalse($result, 'validatePost passed when key was missing. %s'); + } /** * Tests validation of checkbox arrays * @@ -657,7 +676,7 @@ DIGEST; * test ValidatePost with multiple select elements. * * @return void - **/ + */ function testValidatePostMultipleSelect() { $this->Controller->Security->startup($this->Controller); $key = $this->Controller->params['_Token']['key']; diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/cake/tests/cases/libs/controller/components/session.test.php index 94699fa5f..ce33e280d 100644 --- a/cake/tests/cases/libs/controller/components/session.test.php +++ b/cake/tests/cases/libs/controller/components/session.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components diff --git a/cake/tests/cases/libs/controller/controller.test.php b/cake/tests/cases/libs/controller/controller.test.php index 4c200d1e9..fe35ba865 100644 --- a/cake/tests/cases/libs/controller/controller.test.php +++ b/cake/tests/cases/libs/controller/controller.test.php @@ -252,7 +252,7 @@ class ControllerPaginateModel extends CakeTestModel { * * @return void * @access public - **/ + */ function paginate($conditions, $fields, $order, $limit, $page, $recursive, $extra) { $this->extra = $extra; } @@ -557,6 +557,22 @@ class ControllerTest extends CakeTestCase { $Controller->paginate('ControllerPost'); $this->assertIdentical($Controller->params['paging']['ControllerPost']['page'], 1, 'XSS exploit opened %s'); $this->assertIdentical($Controller->params['paging']['ControllerPost']['options']['page'], 1, 'XSS exploit opened %s'); + + $Controller->passedArgs = array(); + $Controller->paginate = array('limit' => 0); + $Controller->paginate('ControllerPost'); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['page'], 1); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['pageCount'], 3); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['prevPage'], false); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['nextPage'], true); + + $Controller->passedArgs = array(); + $Controller->paginate = array('limit' => 'garbage!'); + $Controller->paginate('ControllerPost'); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['page'], 1); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['pageCount'], 3); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['prevPage'], false); + $this->assertIdentical($Controller->params['paging']['ControllerPost']['nextPage'], true); } /** @@ -657,7 +673,7 @@ class ControllerTest extends CakeTestCase { * Test that special paginate types are called and that the type param doesn't leak out into defaults or options. * * @return void - **/ + */ function testPaginateSpecialType() { $Controller =& new Controller(); $Controller->uses = array('ControllerPost', 'ControllerComment'); @@ -1013,7 +1029,7 @@ class ControllerTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testChildComponentOptionsSupercedeParents() { if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) { return; @@ -1030,7 +1046,7 @@ class ControllerTest extends CakeTestCase { * AppController when you make an instance of Controller * * @return void - **/ + */ function testMergeVarsNotGreedy() { $Controller =& new Controller(); $Controller->components = array(); diff --git a/cake/tests/cases/libs/controller/controller_merge_vars.test.php b/cake/tests/cases/libs/controller/controller_merge_vars.test.php index e7929f4ad..9009f00f6 100644 --- a/cake/tests/cases/libs/controller/controller_merge_vars.test.php +++ b/cake/tests/cases/libs/controller/controller_merge_vars.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Controller Merge vars Test file * @@ -9,40 +7,39 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller * @since CakePHP(tm) v 1.2.3 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('AppController')) { - /** - * Test case AppController requred - * - * @package cake.tests.cases.libs.controller - **/ + +/** + * Test case AppController + * + * @package cake + * @subpackage cake.tests.cases.libs.controller + */ class AppController extends Controller { - /** - * components - * - * @var array - **/ + +/** + * components + * + * @var array + */ var $components = array('MergeVar' => array('flag', 'otherFlag', 'redirect' => false)); - /** - * helpers - * - * @var array - **/ +/** + * helpers + * + * @var array + */ var $helpers = array('MergeVar' => array('format' => 'html', 'terse')); } } elseif (!defined('APP_CONTROLLER_EXISTS')) { @@ -53,7 +50,7 @@ if (!class_exists('AppController')) { * MergeVar Component * * @package cake.tests.cases.libs.controller - **/ + */ class MergeVarComponent extends Object { } @@ -62,21 +59,21 @@ class MergeVarComponent extends Object { * Additional controller for testing * * @package cake.tests.cases.libs.controller - **/ + */ class MergeVariablesController extends AppController { /** * name * * @var string - **/ + */ var $name = 'MergeVariables'; /** * uses * * @var arrays - **/ + */ var $uses = array(); } @@ -84,21 +81,21 @@ class MergeVariablesController extends AppController { * MergeVarPlugin App Controller * * @package cake.tests.cases.libs.controller - **/ + */ class MergeVarPluginAppController extends AppController { /** * components * * @var array - **/ + */ var $components = array('Auth' => array('setting' => 'val', 'otherVal')); /** * helpers * * @var array - **/ + */ var $helpers = array('Javascript'); } @@ -106,21 +103,21 @@ class MergeVarPluginAppController extends AppController { * MergePostsController * * @package cake.tests.cases.libs.controller - **/ + */ class MergePostsController extends MergeVarPluginAppController { /** * name * * @var string - **/ + */ var $name = 'MergePosts'; /** * uses * * @var array - **/ + */ var $uses = array(); } @@ -129,13 +126,13 @@ class MergePostsController extends MergeVarPluginAppController { * Test Case for Controller Merging of Vars. * * @package cake.tests.cases.libs.controller - **/ + */ class ControllerMergeVarsTestCase extends CakeTestCase { /** * Skips the case if APP_CONTROLLER_EXISTS is defined * * @return void - **/ + */ function skip() { $this->skipIf(defined('APP_CONTROLLER_EXISTS'), 'APP_CONTROLLER_EXISTS cannot run. %s'); } @@ -143,7 +140,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * end test * * @return void - **/ + */ function endTest() { ClassRegistry::flush(); } @@ -152,7 +149,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * test that component settings are not duplicated when merging component settings * * @return void - **/ + */ function testComponentParamMergingNoDuplication() { $Controller =& new MergeVariablesController(); $Controller->constructClasses(); @@ -165,7 +162,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * test component merges with redeclared components * * @return void - **/ + */ function testComponentMergingWithRedeclarations() { $Controller =& new MergeVariablesController(); $Controller->components['MergeVar'] = array('remote', 'redirect' => true); @@ -179,7 +176,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * test merging of helpers array, ensure no duplication occurs * * @return void - **/ + */ function testHelperSettingMergingNoDuplication() { $Controller =& new MergeVariablesController(); $Controller->constructClasses(); @@ -192,7 +189,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * test merging of vars with plugin * * @return void - **/ + */ function testMergeVarsWithPlugin() { $Controller =& new MergePostsController(); $Controller->components = array('Email' => array('ports' => 'open')); @@ -229,7 +226,7 @@ class ControllerMergeVarsTestCase extends CakeTestCase { * AppController when you make an instance of Controller * * @return void - **/ + */ function testMergeVarsNotGreedy() { $Controller =& new Controller(); $Controller->components = array(); diff --git a/cake/tests/cases/libs/controller/pages_controller.test.php b/cake/tests/cases/libs/controller/pages_controller.test.php index 6f193fe68..941a13087 100644 --- a/cake/tests/cases/libs/controller/pages_controller.test.php +++ b/cake/tests/cases/libs/controller/pages_controller.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * PagesControllerTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller * @since CakePHP(tm) v 1.2.0.5436 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!class_exists('AppController')) { diff --git a/cake/tests/cases/libs/controller/scaffold.test.php b/cake/tests/cases/libs/controller/scaffold.test.php index c0a4a0fcd..0813be0c2 100644 --- a/cake/tests/cases/libs/controller/scaffold.test.php +++ b/cake/tests/cases/libs/controller/scaffold.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ScaffoldTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller * @since CakePHP(tm) v 1.2.0.5436 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Scaffold'); @@ -159,7 +153,7 @@ class ScaffoldMock extends CakeTestModel { * hasAndBelongsToMany property * * @var string - **/ + */ var $hasAndBelongsToMany = array( 'ScaffoldTag' => array( 'className' => 'ScaffoldTag', @@ -393,7 +387,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testIndexScaffold() { $this->Controller->action = 'index'; $this->Controller->here = '/scaffold_mock'; @@ -432,7 +426,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testViewScaffold() { $this->Controller->action = 'view'; $this->Controller->here = '/scaffold_mock'; @@ -474,7 +468,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testEditScaffold() { $this->Controller->action = 'edit'; $this->Controller->here = '/scaffold_mock'; @@ -515,7 +509,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testAdminIndexScaffold() { $_backAdmin = Configure::read('Routing.prefixes'); @@ -560,7 +554,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testAdminEditScaffold() { $_backAdmin = Configure::read('Routing.prefixes'); @@ -603,7 +597,7 @@ class ScaffoldViewTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testMultiplePrefixScaffold() { $_backAdmin = Configure::read('Routing.prefixes'); @@ -724,7 +718,7 @@ class ScaffoldTest extends CakeTestCase { * test that the proper names and variable values are set by Scaffold * * @return void - **/ + */ function testScaffoldVariableSetting() { $this->Controller->action = 'admin_edit'; $this->Controller->here = '/admin/scaffold_mock/edit'; @@ -763,7 +757,7 @@ class ScaffoldTest extends CakeTestCase { * test that scaffold outputs flash messages when sessions are unset. * * @return void - **/ + */ function testScaffoldFlashMessages() { $this->Controller->action = 'edit'; $this->Controller->here = '/scaffold_mock'; @@ -803,7 +797,7 @@ class ScaffoldTest extends CakeTestCase { * * @see http://code.cakephp.org/tickets/view/48 * @return void - **/ + */ function testHabtmFieldAdditionWithScaffoldForm() { $this->Controller->action = 'edit'; $this->Controller->here = '/scaffold_mock'; @@ -836,7 +830,7 @@ class ScaffoldTest extends CakeTestCase { * test that the proper names and variable values are set by Scaffold * * @return void - **/ + */ function testEditScaffoldWithScaffoldFields() { $this->Controller = new ScaffoldMockControllerWithFields(); $this->Controller->action = 'edit'; diff --git a/cake/tests/cases/libs/debugger.test.php b/cake/tests/cases/libs/debugger.test.php index 9ddcad781..3aa254d10 100644 --- a/cake/tests/cases/libs/debugger.test.php +++ b/cake/tests/cases/libs/debugger.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DebuggerTest file * @@ -242,7 +240,7 @@ class DebuggerTest extends CakeTestCase { View::$autoLayout = true View::$ext = ".ctp" View::$subDir = NULL - View::$themeWeb = NULL + View::$theme = NULL View::$cacheAction = false View::$validationErrors = array View::$hasRendered = false @@ -258,7 +256,6 @@ class DebuggerTest extends CakeTestCase { View::$__passedVars = array View::$__scripts = array View::$__paths = array - View::$_log = NULL View::$webroot = NULL'; $result = str_replace(array("\t", "\r\n", "\n"), "", $result); $expected = str_replace(array("\t", "\r\n", "\n"), "", $expected); diff --git a/cake/tests/cases/libs/error.test.php b/cake/tests/cases/libs/error.test.php index 634999449..ac53aa6a2 100644 --- a/cake/tests/cases/libs/error.test.php +++ b/cake/tests/cases/libs/error.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -219,7 +218,7 @@ class MyCustomErrorHandler extends ErrorHandler { * custom error message type. * * @return void - **/ + */ function missingWidgetThing() { echo 'widget thing is missing'; } @@ -277,7 +276,7 @@ class ErrorHandlerTest extends CakeTestCase { * into error404 when debug == 0 * * @return void - **/ + */ function testSubclassMethodsNotBeingConvertedToError() { $back = Configure::read('debug'); Configure::write('debug', 2); diff --git a/cake/tests/cases/libs/file.test.php b/cake/tests/cases/libs/file.test.php index 5debde610..56d17906e 100644 --- a/cake/tests/cases/libs/file.test.php +++ b/cake/tests/cases/libs/file.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * FileTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'File'); diff --git a/cake/tests/cases/libs/folder.test.php b/cake/tests/cases/libs/folder.test.php index 97e3ad500..84a24601b 100644 --- a/cake/tests/cases/libs/folder.test.php +++ b/cake/tests/cases/libs/folder.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -223,7 +222,7 @@ class FolderTest extends CakeTestCase { * test Adding path elements to a path * * @return void - **/ + */ function testAddPathElement() { $result = Folder::addPathElement(DS . 'some' . DS . 'dir', 'another_path'); $this->assertEqual($result, DS . 'some' . DS . 'dir' . DS . 'another_path'); diff --git a/cake/tests/cases/libs/http_socket.test.php b/cake/tests/cases/libs/http_socket.test.php index 1f58ab99c..2a059ce06 100644 --- a/cake/tests/cases/libs/http_socket.test.php +++ b/cake/tests/cases/libs/http_socket.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * HttpSocketTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'HttpSocket'); @@ -1074,6 +1068,9 @@ class HttpSocketTest extends CakeTestCase { $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'port' => 23)); $this->assertIdentical($r, 'http://www.cakephp.org:23/'); + $r = $this->Socket->buildUri(array('path' => 'www.google.com/search', 'query' => 'q=cakephp')); + $this->assertIdentical($r, 'http://www.google.com/search?q=cakephp'); + $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'scheme' => 'https', 'port' => 79)); $this->assertIdentical($r, 'https://www.cakephp.org:79/'); diff --git a/cake/tests/cases/libs/i18n.test.php b/cake/tests/cases/libs/i18n.test.php index a32d205b3..cd44f2ff1 100644 --- a/cake/tests/cases/libs/i18n.test.php +++ b/cake/tests/cases/libs/i18n.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * I18nTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'i18n'); diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index 9d9afa6fc..e4e26bacb 100644 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -114,6 +114,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::singularize('waxes'), 'wax'); $this->assertEqual(Inflector::singularize('niches'), 'niche'); $this->assertEqual(Inflector::singularize('waves'), 'wave'); + $this->assertEqual(Inflector::singularize('bureaus'), 'bureau'); $this->assertEqual(Inflector::singularize(''), ''); } @@ -160,6 +161,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::pluralize('crisis'), 'crises'); $this->assertEqual(Inflector::pluralize('tax'), 'taxes'); $this->assertEqual(Inflector::pluralize('wave'), 'waves'); + $this->assertEqual(Inflector::pluralize('bureau'), 'bureaus'); $this->assertEqual(Inflector::pluralize(''), ''); } @@ -266,6 +268,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::classify('artists_genres'), 'ArtistsGenre'); $this->assertEqual(Inflector::classify('file_systems'), 'FileSystem'); $this->assertEqual(Inflector::classify('news'), 'News'); + $this->assertEqual(Inflector::classify('bureaus'), 'Bureau'); } /** @@ -278,6 +281,7 @@ class InflectorTest extends CakeTestCase { $this->assertEqual(Inflector::tableize('ArtistsGenre'), 'artists_genres'); $this->assertEqual(Inflector::tableize('FileSystem'), 'file_systems'); $this->assertEqual(Inflector::tableize('News'), 'news'); + $this->assertEqual(Inflector::tableize('Bureau'), 'bureaus'); } /** diff --git a/cake/tests/cases/libs/l10n.test.php b/cake/tests/cases/libs/l10n.test.php index 3afd1ab4f..999f2d364 100644 --- a/cake/tests/cases/libs/l10n.test.php +++ b/cake/tests/cases/libs/l10n.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * L10nTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'l10n'); diff --git a/cake/tests/cases/libs/log/file_log.test.php b/cake/tests/cases/libs/log/file_log.test.php new file mode 100644 index 000000000..a479bc302 --- /dev/null +++ b/cake/tests/cases/libs/log/file_log.test.php @@ -0,0 +1,82 @@ +<?php +/** + * FileLogTest file + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.cases.libs.log + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +require_once LIBS . 'log' . DS . 'file_log.php'; + +/** + * CakeLogTest class + * + * @package cake + * @subpackage cake.tests.cases.libs + */ +class FileLogTest extends CakeTestCase { + +/** + * testLogFileWriting method + * + * @access public + * @return void + */ + function testLogFileWriting() { + @unlink(LOGS . 'error.log'); + $log =& new FileLog(); + $log->write('warning', 'Test warning'); + $this->assertTrue(file_exists(LOGS . 'error.log')); + + $result = file_get_contents(LOGS . 'error.log'); + $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Warning: Test warning/', $result); + unlink(LOGS . 'error.log'); + + @unlink(LOGS . 'debug.log'); + $log->write('debug', 'Test warning'); + $this->assertTrue(file_exists(LOGS . 'debug.log')); + + $result = file_get_contents(LOGS . 'debug.log'); + $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Debug: Test warning/', $result); + unlink(LOGS . 'debug.log'); + + @unlink(LOGS . 'random.log'); + $log->write('random', 'Test warning'); + $this->assertTrue(file_exists(LOGS . 'random.log')); + + $result = file_get_contents(LOGS . 'random.log'); + $this->assertPattern('/^2[0-9]{3}-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+ Random: Test warning/', $result); + unlink(LOGS . 'random.log'); + } + +/** + * test using the path setting to write logs in other places. + * + * @return void + */ + function testPathSetting() { + $path = TMP . 'tests' . DS; + @unlink($path . 'error.log'); + + $log =& new FileLog(compact('path')); + $log->write('warning', 'Test warning'); + $this->assertTrue(file_exists($path . 'error.log')); + unlink($path . 'error.log'); + } + +} +?> \ No newline at end of file diff --git a/cake/tests/cases/libs/magic_db.test.php b/cake/tests/cases/libs/magic_db.test.php index 076859d4a..3ed8704ac 100644 --- a/cake/tests/cases/libs/magic_db.test.php +++ b/cake/tests/cases/libs/magic_db.test.php @@ -1,26 +1,21 @@ <?php -/* SVN FILE: $Id$ */ /** * MagicDbTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('MagicDb')) { require LIBS . 'magic_db.php'; @@ -118,6 +113,9 @@ class MagicDbTest extends UnitTestCase { $r = $this->Db->toArray(array('yeah')); $this->assertTrue($r === array('yeah')); + $r = $this->Db->toArray("# FILE_ID DB\r\n# Date:2009-10-10\r\n# Source:xxx.php"); + $this->assertTrue($r === array()); + $r = $this->Db->toArray('foo'); $this->assertTrue($r === array()); @@ -177,7 +175,7 @@ class MagicDbTestData extends Object { * * @param string $key * @access public - **/ + */ function get($key) { /** * data property diff --git a/cake/tests/cases/libs/model/behaviors/acl.test.php b/cake/tests/cases/libs/model/behaviors/acl.test.php index 438d6f125..67c4aa934 100644 --- a/cake/tests/cases/libs/model/behaviors/acl.test.php +++ b/cake/tests/cases/libs/model/behaviors/acl.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * AclBehaviorTest file * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs.tests.model.behaviors.acl * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Behavior', 'Acl'); App::import('Core', 'db_acl'); @@ -311,7 +305,7 @@ class AclBehaviorTestCase extends CakeTestCase { $this->assertEqual($result['Aro']['parent_id'], 5); $node = $Person->node(array('model' => 'AclPerson', 'foreign_key' => 8)); - $this->assertEqual(sizeof($node), 2); + $this->assertEqual(count($node), 2); $this->assertEqual($node[0]['Aro']['parent_id'], 5); $this->assertEqual($node[1]['Aro']['parent_id'], null); @@ -364,7 +358,7 @@ class AclBehaviorTestCase extends CakeTestCase { $Person->save($data); $id = $Person->id; $node = $Person->node(); - $this->assertEqual(sizeof($node), 2); + $this->assertEqual(count($node), 2); $this->assertEqual($node[0]['Aro']['parent_id'], 5); $this->assertEqual($node[1]['Aro']['parent_id'], null); @@ -412,7 +406,7 @@ class AclBehaviorTestCase extends CakeTestCase { $Person->id = 2; $result = $Person->node(); $this->assertTrue(is_array($result)); - $this->assertEqual(sizeof($result), 1); + $this->assertEqual(count($result), 1); } } ?> \ No newline at end of file diff --git a/cake/tests/cases/libs/model/behaviors/containable.test.php b/cake/tests/cases/libs/model/behaviors/containable.test.php index 49938fe72..716794339 100644 --- a/cake/tests/cases/libs/model/behaviors/containable.test.php +++ b/cake/tests/cases/libs/model/behaviors/containable.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ContainableBehaviorTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('AppModel', 'Model')); @@ -3404,6 +3398,17 @@ class ContainableBehaviorTest extends CakeTestCase { )); $this->assertEqual($expected, $this->Article->User->hasOne); + $this->Article->User->bindModel($userHasOne, false); + $expected = $this->Article->User->hasOne; + $this->Article->find('all', array( + 'contain' => array( + 'User' => array( + 'Comment' => array('fields' => array('created')) + ) + ) + )); + $this->assertEqual($expected, $this->Article->User->hasOne); + $this->Article->User->bindModel($userHasOne, false); $expected = $this->Article->User->hasOne; $this->Article->find('all', array( diff --git a/cake/tests/cases/libs/model/behaviors/translate.test.php b/cake/tests/cases/libs/model/behaviors/translate.test.php index 2c75ca9c5..f5fbc0140 100644 --- a/cake/tests/cases/libs/model/behaviors/translate.test.php +++ b/cake/tests/cases/libs/model/behaviors/translate.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TranslateBehaviorTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/model/behaviors/tree.test.php b/cake/tests/cases/libs/model/behaviors/tree.test.php index 95322c314..c1376386e 100644 --- a/cake/tests/cases/libs/model/behaviors/tree.test.php +++ b/cake/tests/cases/libs/model/behaviors/tree.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TreeBehaviorTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.behaviors * @since CakePHP(tm) v 1.2.0.5330 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('AppModel', 'Model')); diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/cake/tests/cases/libs/model/cake_schema.test.php index 830124d20..e078277a9 100644 --- a/cake/tests/cases/libs/model/cake_schema.test.php +++ b/cake/tests/cases/libs/model/cake_schema.test.php @@ -6,13 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -458,13 +457,22 @@ class CakeSchemaTest extends CakeTestCase { ConnectionManager::create('schema_prefix', $config); $read = $this->Schema->read(array('connection' => 'schema_prefix', 'models' => false)); $this->assertTrue(empty($read['tables'])); - } + $SchemaPost =& ClassRegistry::init('SchemaPost'); + $SchemaPost->table = 'sts'; + $SchemaPost->tablePrefix = 'po'; + $read = $this->Schema->read(array( + 'connection' => 'test_suite', + 'name' => 'TestApp', + 'models' => array('SchemaPost') + )); + $this->assertFalse(isset($read['tables']['missing']['posts']), 'Posts table was not read from tablePrefix %s'); + } /** * test reading schema from plugins. * * @return void - **/ + */ function testSchemaReadWithPlugins() { App::objects('model', null, false); App::build(array( @@ -490,7 +498,7 @@ class CakeSchemaTest extends CakeTestCase { * test that tables are generated correctly * * @return void - **/ + */ function testGenerateTable() { $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -568,7 +576,7 @@ class CakeSchemaTest extends CakeTestCase { * Test comparing tableParameters and indexes. * * @return void - **/ + */ function testTableParametersAndIndexComparison() { $old = array( 'posts' => array( @@ -671,7 +679,7 @@ class CakeSchemaTest extends CakeTestCase { * test loading schema files inside of plugins. * * @return void - **/ + */ function testSchemaLoadingFromPlugin() { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) diff --git a/cake/tests/cases/libs/model/connection_manager.test.php b/cake/tests/cases/libs/model/connection_manager.test.php index 58e0f0bda..49b1a8cf9 100644 --- a/cake/tests/cases/libs/model/connection_manager.test.php +++ b/cake/tests/cases/libs/model/connection_manager.test.php @@ -1,18 +1,16 @@ <?php - /** * Connection Manager tests * * * PHP versions 4 and 5 * - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php index c661c4e08..549bf8e66 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboAdodbTest file * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.model.datasources.dbo * @since CakePHP(tm) v 0.2.9 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ require_once LIBS.'model'.DS.'model.php'; require_once LIBS.'model'.DS.'datasources'.DS.'datasource.php'; @@ -202,7 +196,7 @@ class DboAdodbTest extends CakeTestCase { * * @var string * @access public - **/ + */ var $fixtures = array('core.article'); /** diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index 412c5137c..bca1f6eb8 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboMssqlTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { define('CAKEPHP_UNIT_TEST_EXECUTION', 1); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index 5b96b9790..be57aab6c 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -4,19 +4,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboMysql')); @@ -204,7 +203,7 @@ class DboMysqlTest extends CakeTestCase { * startCase * * @return void - **/ + */ function startCase() { $this->_debug = Configure::read('debug'); Configure::write('debug', 1); @@ -214,7 +213,7 @@ class DboMysqlTest extends CakeTestCase { * endCase * * @return void - **/ + */ function endCase() { Configure::write('debug', $this->_debug); } @@ -419,7 +418,7 @@ class DboMysqlTest extends CakeTestCase { * Using a mock ensure that MySQL 4.x output is properly parsed. * * @return void - **/ + */ function testIndexOnMySQL4Output() { $name = $this->db->fullTableName('simple'); @@ -632,7 +631,7 @@ class DboMysqlTest extends CakeTestCase { * test saving and retrieval of blobs * * @return void - **/ + */ function testBlobSaving() { $this->db->cacheSources = false; $data = "GIF87ab� @@ -651,7 +650,7 @@ class DboMysqlTest extends CakeTestCase { * test altering the table settings with schema. * * @return void - **/ + */ function testAlteringTableParameters() { App::import('Model', 'CakeSchema'); $this->db->cacheSources = $this->db->testing = false; diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php index d9f8c0c62..d54d6c8de 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboMysqliTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { define('CAKEPHP_UNIT_TEST_EXECUTION', 1); @@ -309,7 +303,7 @@ class DboMysqliTest extends CakeTestCase { * test that float values are correctly identified * * @return void - **/ + */ function testFloatParsing() { $model =& new Model(array('ds' => 'test_suite', 'table' => 'datatypes', 'name' => 'Datatype')); $result = $this->db->describe($model); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php index a1e51a37b..2be0ef785 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboOracleTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { define('CAKEPHP_UNIT_TEST_EXECUTION', 1); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index e13466ecb..17704618f 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboPostgresTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboPostgres')); App::import('Model', 'App'); @@ -318,7 +312,7 @@ class DboPostgresTest extends CakeTestCase { * test that date and time columns do not generate errors with null and nullish values. * * @return void - **/ + */ function testDateAndTimeAsNull() { $this->assertEqual($this->db2->value(null, 'date'), 'NULL'); $this->assertEqual($this->db2->value('', 'date'), 'NULL'); @@ -529,7 +523,7 @@ class DboPostgresTest extends CakeTestCase { * Test index generation from table info. * * @return void - **/ + */ function testIndexGeneration() { $name = $this->db->fullTableName('index_test', false); $this->db->query('CREATE TABLE ' . $name . ' ("id" serial NOT NULL PRIMARY KEY, "bool" integer, "small_char" varchar(50), "description" varchar(40) )'); diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php index 51ede159b..1153f0812 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php @@ -1,27 +1,21 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboSqliteTest file * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs * @since CakePHP(tm) v 1.2.0 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboSqlite')); @@ -226,7 +220,7 @@ class DboSqliteTest extends CakeTestCase { * test building columns with SQLite * * @return void - **/ + */ function testBuildColumn() { $data = array( 'name' => 'int_field', @@ -298,7 +292,7 @@ class DboSqliteTest extends CakeTestCase { * test describe() and normal results. * * @return void - **/ + */ function testDescribe() { $Model =& new Model(array('name' => 'User', 'ds' => 'test_suite', 'table' => 'users')); $result = $this->db->describe($Model); @@ -342,7 +336,7 @@ class DboSqliteTest extends CakeTestCase { * test that describe does not corrupt UUID primary keys * * @return void - **/ + */ function testDescribeWithUuidPrimaryKey() { $tableName = 'uuid_tests'; $this->db->query("CREATE TABLE {$tableName} (id VARCHAR(36) PRIMARY KEY, name VARCHAR, created DATETIME, modified DATETIME)"); diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 9e5c08d1f..cb74f5687 100644 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DboSourceTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model.datasources * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { @@ -3649,7 +3643,7 @@ class DboSourceTest extends CakeTestCase { * test hasAny() * * @return void - **/ + */ function testHasAny() { $this->testDb->hasAny($this->Model, array()); $expected = 'SELECT COUNT(`TestModel`.`id`) AS count FROM `test_models` AS `TestModel` WHERE 1 = 1'; @@ -4006,7 +4000,7 @@ class DboSourceTest extends CakeTestCase { * test getting the query log as an array. * * @return void - **/ + */ function testGetLog() { $this->testDb->logQuery('Query 1'); $this->testDb->logQuery('Query 2'); @@ -4030,7 +4024,7 @@ class DboSourceTest extends CakeTestCase { * test that execute runs queries. * * @return void - **/ + */ function testExecute() { $query = 'SELECT * FROM ' . $this->testDb->fullTableName('articles') . ' WHERE 1 = 1'; @@ -4052,7 +4046,7 @@ class DboSourceTest extends CakeTestCase { * test that query() returns boolean values from operations like CREATE TABLE * * @return void - **/ + */ function testFetchAllBooleanReturns() { $name = $this->db->fullTableName('test_query'); $query = "CREATE TABLE {$name} (name varchar(10));"; @@ -4068,7 +4062,7 @@ class DboSourceTest extends CakeTestCase { * test ShowQuery generation of regular and error messages * * @return void - **/ + */ function testShowQuery() { $this->testDb->error = false; ob_start(); diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/cake/tests/cases/libs/model/db_acl.test.php index b56fcaa58..ef9b9ee08 100644 --- a/cake/tests/cases/libs/model/db_acl.test.php +++ b/cake/tests/cases/libs/model/db_acl.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * DbAclTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.controller.components.dbacl.models * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/model/model.test.php b/cake/tests/cases/libs/model/model.test.php index cd6aa0bb8..6fe033259 100644 --- a/cake/tests/cases/libs/model/model.test.php +++ b/cake/tests/cases/libs/model/model.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ModelTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('AppModel', 'Model')); diff --git a/cake/tests/cases/libs/model/model_behavior.test.php b/cake/tests/cases/libs/model/model_behavior.test.php index 22d586082..3a9bc7cae 100644 --- a/cake/tests/cases/libs/model/model_behavior.test.php +++ b/cake/tests/cases/libs/model/model_behavior.test.php @@ -508,7 +508,7 @@ class BehaviorTest extends CakeTestCase { * test that attaching a non existant Behavior triggers a cake error. * * @return void - **/ + */ function testInvalidBehaviorCausingCakeError() { $Apple =& new Apple(); $Apple->Behaviors =& new MockModelBehaviorCollection(); @@ -1103,7 +1103,7 @@ class BehaviorTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testBehaviorAttachAndDetach() { $Sample =& new Sample(); $Sample->actsAs = array('Test3' => array('bar'), 'Test2' => array('foo', 'bar')); diff --git a/cake/tests/cases/libs/model/model_delete.test.php b/cake/tests/cases/libs/model/model_delete.test.php index 6dd15c5ae..6702d1752 100644 --- a/cake/tests/cases/libs/model/model_delete.test.php +++ b/cake/tests/cases/libs/model/model_delete.test.php @@ -7,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision: 8225 $ - * @modifiedby $LastChangedBy: mark_story $ - * @lastmodified $Date: 2009-07-07 23:25:30 -0400 (Tue, 07 Jul 2009) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once dirname(__FILE__) . DS . 'model.test.php'; @@ -572,7 +568,22 @@ class ModelDeleteTest extends BaseModelTest { )); $this->assertEqual($result['Monkey'], $expected); } +/** + * test that beforeDelete returning false can abort deletion. + * + * @return void + */ + function testBeforeDeleteDeleteAbortion() { + $this->loadFixtures('Post'); + $Model =& new CallbackPostTestModel(); + $Model->beforeDeleteReturn = false; + $result = $Model->delete(1); + $this->assertFalse($result); + + $exists = $Model->findById(1); + $this->assertTrue(is_array($exists)); + } } ?> \ No newline at end of file diff --git a/cake/tests/cases/libs/model/model_integration.test.php b/cake/tests/cases/libs/model/model_integration.test.php index b3e3daa68..33d9e9ea6 100644 --- a/cake/tests/cases/libs/model/model_integration.test.php +++ b/cake/tests/cases/libs/model/model_integration.test.php @@ -9,20 +9,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision: 8225 $ - * @modifiedby $LastChangedBy: mark_story $ - * @lastmodified $Date: 2009-07-07 23:25:30 -0400 (Tue, 07 Jul 2009) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once dirname(__FILE__) . DS . 'model.test.php'; @@ -540,7 +536,7 @@ class ModelIntegrationTest extends BaseModelTest { * test deconstruct() with time fields. * * @return void - **/ + */ function testDeconstructFieldsTime() { $this->loadFixtures('Apple'); $TestModel =& new Apple(); @@ -885,7 +881,7 @@ class ModelIntegrationTest extends BaseModelTest { * ensure that __exists is reset on create * * @return void - **/ + */ function testResetOfExistsOnCreate() { $this->loadFixtures('Article'); $Article =& new Article(); @@ -1183,7 +1179,7 @@ class ModelIntegrationTest extends BaseModelTest { * ensure that $actsAS and $_findMethods are merged. * * @return void - **/ + */ function testConstruct() { $this->loadFixtures('Post', 'Comment'); @@ -1204,7 +1200,7 @@ class ModelIntegrationTest extends BaseModelTest { * ensure that $actsAS and $_findMethods are merged. * * @return void - **/ + */ function testConstructWithAlternateDataSource() { $TestModel =& ClassRegistry::init(array( 'class' => 'DoesntMatter', 'ds' => 'test_suite', 'table' => false diff --git a/cake/tests/cases/libs/model/model_read.test.php b/cake/tests/cases/libs/model/model_read.test.php index 28411f21a..dd314ca48 100644 --- a/cake/tests/cases/libs/model/model_read.test.php +++ b/cake/tests/cases/libs/model/model_read.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model @@ -4735,7 +4734,7 @@ class ModelReadTest extends BaseModelTest { * test that bindModel behaves with Custom primary Key associations * * @return void - **/ + */ function bindWithCustomPrimaryKey() { $this->loadFixtures('Story', 'StoriesTag', 'Tag'); $Model =& ClassRegistry::init('StoriesTag'); @@ -6401,7 +6400,7 @@ class ModelReadTest extends BaseModelTest { * test find with COUNT(DISTINCT field) * * @return void - **/ + */ function testFindCountDistinct() { $skip = $this->skipIf( $this->db->config['driver'] == 'sqlite', diff --git a/cake/tests/cases/libs/model/model_validation.test.php b/cake/tests/cases/libs/model/model_validation.test.php index 5d08eace4..a9a46b9d0 100644 --- a/cake/tests/cases/libs/model/model_validation.test.php +++ b/cake/tests/cases/libs/model/model_validation.test.php @@ -9,20 +9,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision: 8225 $ - * @modifiedby $LastChangedBy: mark_story $ - * @lastmodified $Date: 2009-07-07 23:25:30 -0400 (Tue, 07 Jul 2009) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once dirname(__FILE__) . DS . 'model.test.php'; @@ -130,7 +126,7 @@ class ModelValidationTest extends BaseModelTest { * Helps to make developement easier. * * @return void - **/ + */ function testMissingValidationErrorTriggering() { $restore = Configure::read('debug'); Configure::write('debug', 2); diff --git a/cake/tests/cases/libs/model/model_write.test.php b/cake/tests/cases/libs/model/model_write.test.php index 0a0fed579..dfea3324e 100644 --- a/cake/tests/cases/libs/model/model_write.test.php +++ b/cake/tests/cases/libs/model/model_write.test.php @@ -9,20 +9,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision: 8225 $ - * @modifiedby $LastChangedBy: mark_story $ - * @lastmodified $Date: 2009-07-07 23:25:30 -0400 (Tue, 07 Jul 2009) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once dirname(__FILE__) . DS . 'model.test.php'; @@ -317,7 +313,7 @@ class ModelWriteTest extends BaseModelTest { * as url for controller could be either overallFavorites/index or overall_favorites/index * * @return void - **/ + */ function testCacheClearOnSave() { $_back = array( 'check' => Configure::read('Cache.check'), @@ -620,6 +616,40 @@ class ModelWriteTest extends BaseModelTest { $this->assertTrue($result); } +/** + * test that beforeValidate returning false can abort saves. + * + * @return void + */ + function testBeforeValidateSaveAbortion() { + $Model =& new CallbackPostTestModel(); + $Model->beforeValidateReturn = false; + + $data = array( + 'title' => 'new article', + 'body' => 'this is some text.' + ); + $Model->create(); + $result = $Model->save($data); + $this->assertFalse($result); + } +/** + * test that beforeSave returning false can abort saves. + * + * @return void + */ + function testBeforeSaveSaveAbortion() { + $Model =& new CallbackPostTestModel(); + $Model->beforeSaveReturn = false; + + $data = array( + 'title' => 'new article', + 'body' => 'this is some text.' + ); + $Model->create(); + $result = $Model->save($data); + $this->assertFalse($result); + } /** * testValidates method * @@ -1985,6 +2015,54 @@ class ModelWriteTest extends BaseModelTest { $this->assertEqual($result, $expected); } +/** + * test that saving habtm records respects conditions set in the the 'conditions' key + * for the association. + * + * @return void + */ + function testHabtmSaveWithConditionsInAssociation() { + $this->loadFixtures('JoinThing', 'Something', 'SomethingElse'); + $Something =& new Something(); + $Something->unbindModel(array('hasAndBelongsToMany' => array('SomethingElse')), false); + + $Something->bindModel(array( + 'hasAndBelongsToMany' => array( + 'DoomedSomethingElse' => array( + 'className' => 'SomethingElse', + 'joinTable' => 'join_things', + 'conditions' => 'JoinThing.doomed = 1', + 'unique' => true + ), + 'NotDoomedSomethingElse' => array( + 'className' => 'SomethingElse', + 'joinTable' => 'join_things', + 'conditions' => array('JoinThing.doomed' => 0), + 'unique' => true + ) + ) + ), false); + $result = $Something->read(null, 1); + $this->assertTrue(empty($result['NotDoomedSomethingElse'])); + $this->assertEqual(count($result['DoomedSomethingElse']), 1); + + $data = array( + 'Something' => array('id' => 1), + 'NotDoomedSomethingElse' => array( + 'NotDoomedSomethingElse' => array( + array('something_else_id' => 2, 'doomed' => 0), + array('something_else_id' => 3, 'doomed' => 0) + ) + ) + ); + $Something->create($data); + $result = $Something->save(); + $this->assertTrue($result); + + $result = $Something->read(null, 1); + $this->assertEqual(count($result['NotDoomedSomethingElse']), 2); + $this->assertEqual(count($result['DoomedSomethingElse']), 1); + } /** * testHabtmSaveKeyResolution method * @@ -2592,7 +2670,7 @@ class ModelWriteTest extends BaseModelTest { * test HABTM saving when join table has no primary key and only 2 columns. * * @return void - **/ + */ function testHabtmSavingWithNoPrimaryKeyUuidJoinTable() { $this->loadFixtures('UuidTag', 'Fruit', 'FruitsUuidTag'); $Fruit =& new Fruit(); @@ -2616,7 +2694,7 @@ class ModelWriteTest extends BaseModelTest { * test HABTM saving when join table has no primary key and only 2 columns, no with model is used. * * @return void - **/ + */ function testHabtmSavingWithNoPrimaryKeyUuidJoinTableNoWith() { $this->loadFixtures('UuidTag', 'Fruit', 'FruitsUuidTag'); $Fruit =& new FruitNoWith(); diff --git a/cake/tests/cases/libs/model/models.php b/cake/tests/cases/libs/model/models.php index 3078b403c..ac89baf7a 100644 --- a/cake/tests/cases/libs/model/models.php +++ b/cake/tests/cases/libs/model/models.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Mock models file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.model * @since CakePHP(tm) v 1.2.0.6464 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { @@ -548,7 +542,7 @@ class ModifiedComment extends CakeTestModel { * afterFind callback * * @return void - **/ + */ function afterFind($results) { if (isset($results[0])) { $results[0]['Comment']['callback'] = 'Fire'; @@ -593,7 +587,7 @@ class AgainModifiedComment extends CakeTestModel { * afterFind callback * * @return void - **/ + */ function afterFind($results) { if (isset($results[0])) { $results[0]['Comment']['querytype'] = $this->findQueryType; @@ -2031,7 +2025,58 @@ class AssociationTest2 extends CakeTestModel { * @subpackage cake.tests.cases.libs.model */ class Callback extends CakeTestModel { - // + +} +/** + * CallbackPostTestModel class + * + * @package cake + * @subpackage cake.tests.cases.libs.model + */ +class CallbackPostTestModel extends CakeTestModel { + var $useTable = 'posts'; +/** + * variable to control return of beforeValidate + * + * @var string + */ + var $beforeValidateReturn = true; +/** + * variable to control return of beforeSave + * + * @var string + */ + var $beforeSaveReturn = true; +/** + * variable to control return of beforeDelete + * + * @var string + */ + var $beforeDeleteReturn = true; +/** + * beforeSave callback + * + * @return void + */ + function beforeSave($options) { + return $this->beforeSaveReturn; + } +/** + * beforeValidate callback + * + * @return void + */ + function beforeValidate($options) { + return $this->beforeValidateReturn; + } +/** + * beforeDelete callback + * + * @return void + */ + function beforeDelete($cascade = true) { + return $this->beforeDeleteReturn; + } } /** @@ -3045,8 +3090,6 @@ class Uuiditem extends CakeTestModel { * @var array * @access public */ - //var $hasAndBelongsToMany = array('Uuidportfolio' => array('unique' => true)); -// var $hasAndBelongsToMany = array('Uuidportfolio' => array('with' => 'UuiditemsUuidportfolio')); var $hasAndBelongsToMany = array('Uuidportfolio' => array('with' => 'UuiditemsUuidportfolioNumericid')); } diff --git a/cake/tests/cases/libs/multibyte.test.php b/cake/tests/cases/libs/multibyte.test.php index 64a75288a..b42a66bfc 100644 --- a/cake/tests/cases/libs/multibyte.test.php +++ b/cake/tests/cases/libs/multibyte.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * MultibyteTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.6833 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Multibyte'); diff --git a/cake/tests/cases/libs/object.test.php b/cake/tests/cases/libs/object.test.php index 3b97003db..1fc0c8335 100644 --- a/cake/tests/cases/libs/object.test.php +++ b/cake/tests/cases/libs/object.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ObjectTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('Object', 'Controller', 'Model')); @@ -115,7 +109,7 @@ class RequestActionController extends Controller { * post pass, testing post passing * * @return array - **/ + */ function post_pass() { return $this->data; } @@ -158,7 +152,7 @@ class RequestActionPersistentController extends Controller { * post pass, testing post passing * * @return array - **/ + */ function index() { return 'This is a test'; } @@ -301,7 +295,7 @@ class TestObject extends Object { * testPersist * * @return void - **/ + */ function testPersist($name, $return = null, &$object, $type = null) { return $this->_persist($name, $return, $object, $type); } @@ -330,7 +324,7 @@ class ObjectTest extends CakeTestCase { * fixtures * * @var string - **/ + */ var $fixtures = array('core.post', 'core.comment'); /** @@ -780,7 +774,7 @@ class ObjectTest extends CakeTestCase { * testCakeError * * @return void - **/ + */ function testCakeError() { } diff --git a/cake/tests/cases/libs/overloadable.test.php b/cake/tests/cases/libs/overloadable.test.php index 48a330e60..0f5cda85b 100644 --- a/cake/tests/cases/libs/overloadable.test.php +++ b/cake/tests/cases/libs/overloadable.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * OverloadableTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Overloadable'); diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index 433d48213..62e2b0593 100644 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -51,7 +50,7 @@ class RouterTest extends CakeTestCase { * end the test and reset the environment * * @return void - **/ + */ function endTest() { Configure::write('Routing', $this->_routing); } @@ -1041,7 +1040,7 @@ class RouterTest extends CakeTestCase { * or reset * * @return void - **/ + */ function testRoutingPrefixesSetting() { $restore = Configure::read('Routing'); @@ -1130,7 +1129,7 @@ class RouterTest extends CakeTestCase { * Test prefix routing and plugin combinations * * @return void - **/ + */ function testPrefixRoutingAndPlugins() { Configure::write('Routing.prefixes', array('admin')); $paths = App::path('plugins'); @@ -1471,7 +1470,7 @@ class RouterTest extends CakeTestCase { * test newer style automatically generated prefix routes. * * @return void - **/ + */ function testUrlGenerationWithAutoPrefixes() { Configure::write('Routing.prefixes', array('protected')); Router::reload(); @@ -1528,7 +1527,7 @@ class RouterTest extends CakeTestCase { * test that auto-generated prefix routes persist * * @return void - **/ + */ function testAutoPrefixRoutePersistence() { Configure::write('Routing.prefixes', array('protected')); Router::reload(); diff --git a/cake/tests/cases/libs/sanitize.test.php b/cake/tests/cases/libs/sanitize.test.php index 32d15a68e..5d23c0720 100644 --- a/cake/tests/cases/libs/sanitize.test.php +++ b/cake/tests/cases/libs/sanitize.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SanitizeTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5428 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Sanitize'); diff --git a/cake/tests/cases/libs/security.test.php b/cake/tests/cases/libs/security.test.php index 0ceb423ad..86a9d6401 100644 --- a/cake/tests/cases/libs/security.test.php +++ b/cake/tests/cases/libs/security.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SecurityTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Security'); diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php index 9c192ef1a..6e2c1ed50 100644 --- a/cake/tests/cases/libs/set.test.php +++ b/cake/tests/cases/libs/set.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * SetTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Set'); @@ -1812,7 +1806,7 @@ class SetTest extends CakeTestCase { $model = new Model(array('id' => false, 'name' => 'Model', 'table' => false)); $expected = array( - 'Behaviors' => array('modelName' => 'Model', '_attached' => array(), '_disabled' => array(), '__methods' => array(), '__mappedMethods' => array(), '_log' => null), + 'Behaviors' => array('modelName' => 'Model', '_attached' => array(), '_disabled' => array(), '__methods' => array(), '__mappedMethods' => array()), 'useDbConfig' => 'default', 'useTable' => false, 'displayField' => null, 'id' => false, 'data' => array(), 'table' => 'models', 'primaryKey' => 'id', '_schema' => null, 'validate' => array(), 'validationErrors' => array(), 'tablePrefix' => null, 'name' => 'Model', 'alias' => 'Model', 'tableToModel' => array(), 'logTransactions' => false, 'transactional' => false, 'cacheQueries' => false, 'belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array(), 'actsAs' => null, 'whitelist' => array(), 'cacheSources' => true, @@ -1823,7 +1817,7 @@ class SetTest extends CakeTestCase { 'hasMany' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'), 'hasAndBelongsToMany' => array('className', 'joinTable', 'with', 'foreignKey', 'associationForeignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'unique', 'finderQuery', 'deleteQuery', 'insertQuery')), '__associations' => array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'), '__backAssociation' => array(), '__insertID' => null, '__numRows' => null, '__affectedRows' => null, - '_findMethods' => array('all' => true, 'first' => true, 'count' => true, 'neighbors' => true, 'list' => true, 'threaded' => true), '_log' => null); + '_findMethods' => array('all' => true, 'first' => true, 'count' => true, 'neighbors' => true, 'list' => true, 'threaded' => true)); $result = Set::reverse($model); ksort($result); diff --git a/cake/tests/cases/libs/string.test.php b/cake/tests/cases/libs/string.test.php index e17a5b895..be3172684 100644 --- a/cake/tests/cases/libs/string.test.php +++ b/cake/tests/cases/libs/string.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * StringTest file * @@ -210,7 +208,7 @@ class StringTest extends CakeTestCase { * test Clean Insert * * @return void - **/ + */ function testCleanInsert() { $result = String::cleanInsert(':incomplete', array( 'clean' => true, 'before' => ':', 'after' => '' diff --git a/cake/tests/cases/libs/test_manager.test.php b/cake/tests/cases/libs/test_manager.test.php index 40e7a33bb..402836bac 100644 --- a/cake/tests/cases/libs/test_manager.test.php +++ b/cake/tests/cases/libs/test_manager.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TestManagerTest file * @@ -9,22 +7,18 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. + * Copyright 2005-2009, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'TestManager'); diff --git a/cake/tests/cases/libs/validation.test.php b/cake/tests/cases/libs/validation.test.php index 07edecf57..5e76b9b76 100644 --- a/cake/tests/cases/libs/validation.test.php +++ b/cake/tests/cases/libs/validation.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -42,6 +41,44 @@ class CustomValidator { } } +/** + * TestNlValidation class + * + * Used to test pass through of Validation + * + * @package cake.tests.cases.libs + */ +class TestNlValidation { +/** + * postal function, for testing postal pass through. + * + * @param string $check + * @return void + */ + function postal($check) { + return true; + } +} + +/** + * TestNlValidation class + * + * Used to test pass through of Validation + * + * @package cake.tests.cases.libs + */ +class TestDeValidation { +/** + * phone function, for testing phone pass through. + * + * @param string $check + * @return void + */ + function phone($check) { + return true; + } +} + /** * Test Case for Validation Class * @@ -1862,7 +1899,7 @@ class ValidationTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testMultiple() { $this->assertTrue(Validation::multiple(array(0, 1, 2, 3))); $this->assertTrue(Validation::multiple(array(50, 32, 22, 0))); @@ -1999,6 +2036,31 @@ class ValidationTest extends CakeTestCase { $this->assertTrue(Validation::postal('13089-3333')); } +/** + * test that phone and postal pass to other classes. + * + * @return void + */ + function testPhoneAndPostalPass() { + $this->assertTrue(Validation::postal('text', null, 'testNl')); + $this->assertTrue(Validation::phone('text', null, 'testDe')); + } + +/** + * test the pass through calling of an alternate locale with postal() + * + * @return void + **/ + function testPassThroughMethod() { + $this->assertTrue(Validation::postal('text', null, 'testNl')); + + $this->expectError('Could not find AUTOFAILValidation class, unable to complete validation.'); + Validation::postal('text', null, 'AUTOFAIL'); + + $this->expectError('Method phone does not exist on TestNlValidation unable to complete validation.'); + Validation::phone('text', null, 'testNl'); + } + /** * testSsn method * diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index 2caf08b89..fbdabe951 100644 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * HelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('View', 'Helper')); @@ -347,7 +341,7 @@ class HelperTest extends CakeTestCase { * test getting values from Helper * * @return void - **/ + */ function testValue() { $this->Helper->data = array('fullname' => 'This is me'); $this->Helper->setEntity('fullname'); @@ -373,13 +367,33 @@ class HelperTest extends CakeTestCase { $this->Helper->setEntity('Post.2.created.year'); $result = $this->Helper->value('Post.2.created.year'); $this->assertEqual($result, '2008'); + + $this->Helper->data = array('HelperTestTag' => array('HelperTestTag' => '')); + $this->Helper->setEntity('HelperTestTag.HelperTestTag'); + $result = $this->Helper->value('HelperTestTag.HelperTestTag'); + $this->assertEqual($result, ''); + + $this->Helper->data = array('HelperTestTag' => array('HelperTestTag' => array(2, 3, 4))); + $this->Helper->setEntity('HelperTestTag.HelperTestTag'); + $result = $this->Helper->value('HelperTestTag.HelperTestTag'); + $this->assertEqual($result, array(2, 3, 4)); + + $this->Helper->data = array( + 'HelperTestTag' => array( + array('id' => 3), + array('id' => 5) + ) + ); + $this->Helper->setEntity('HelperTestTag.HelperTestTag'); + $result = $this->Helper->value('HelperTestTag.HelperTestTag'); + $this->assertEqual($result, array(3 => 3, 5 => 5)); } /** * Ensure HTML escaping of url params. So link addresses are valid and not exploited * * @return void - **/ + */ function testUrlConversion() { $result = $this->Helper->url('/controller/action/1'); $this->assertEqual($result, '/controller/action/1'); @@ -415,7 +429,7 @@ class HelperTest extends CakeTestCase { * test assetTimestamp application * * @return void - **/ + */ function testAssetTimestamp() { $_timestamp = Configure::read('Asset.timestamp'); $_debug = Configure::read('debug'); diff --git a/cake/tests/cases/libs/view/helpers/ajax.test.php b/cake/tests/cases/libs/view/helpers/ajax.test.php index 12cf40c85..0d82066f7 100644 --- a/cake/tests/cases/libs/view/helpers/ajax.test.php +++ b/cake/tests/cases/libs/view/helpers/ajax.test.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * AjaxHelperTest file * @@ -8,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/view/helpers/cache.test.php b/cake/tests/cases/libs/view/helpers/cache.test.php index 1c6a17917..3f380b1be 100644 --- a/cake/tests/cases/libs/view/helpers/cache.test.php +++ b/cake/tests/cases/libs/view/helpers/cache.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * CacheHelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { @@ -31,15 +25,6 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { App::import('Core', array('Controller', 'Model', 'View')); App::import('Helper', 'Cache'); -/** - * TestCacheHelper class - * - * @package cake - * @subpackage cake.tests.cases.libs.view.helpers - */ -class TestCacheHelper extends CacheHelper { -} - /** * CacheTestController class * @@ -84,7 +69,7 @@ class CacheHelperTest extends CakeTestCase { * Checks if TMP/views is writable, and skips the case if it is not. * * @return void - **/ + */ function skip() { $this->skipUnless(is_writable(TMP . 'cache' . DS . 'views' . DS), 'TMP/views is not writable %s'); } @@ -96,7 +81,8 @@ class CacheHelperTest extends CakeTestCase { */ function setUp() { $this->Controller = new CacheTestController(); - $this->Cache = new TestCacheHelper(); + $this->Cache = new CacheHelper(); + $this->_cacheSettings = Configure::read('Cache'); Configure::write('Cache.check', true); Configure::write('Cache.disable', false); } @@ -132,6 +118,7 @@ class CacheHelperTest extends CakeTestCase { function tearDown() { clearCache(); unset($this->Cache); + Configure::write('Cache', $this->_cacheSettings); } /** @@ -215,7 +202,7 @@ class CacheHelperTest extends CakeTestCase { * test that multiple <cake:nocache> tags function with multiple nocache tags in the layout. * * @return void - **/ + */ function testMultipleNoCacheTagsInViewfile() { $this->Controller->cache_parsing(); $this->Controller->cacheAction = 21600; @@ -244,7 +231,7 @@ class CacheHelperTest extends CakeTestCase { */ function testComplexNoCache () { $this->Controller->cache_parsing(); - $this->Controller->cacheAction = array('cacheTest' => 21600); + $this->Controller->cacheAction = array('cache_complex' => 21600); $this->Controller->here = '/cacheTest/cache_complex'; $this->Controller->action = 'cache_complex'; $this->Controller->layout = 'multi_cache'; @@ -291,6 +278,81 @@ class CacheHelperTest extends CakeTestCase { $this->assertPattern('/7\. layout after content and after element with no cache tags/', $contents); } +/** + * test cacheAction set to a boolean + * + * @return void + */ + function testCacheActionArray() { + $this->Controller->cache_parsing(); + $this->Controller->cacheAction = array( + 'cache_parsing' => 21600 + ); + $this->Controller->here = '/cache_test/cache_parsing'; + $this->Controller->action = 'cache_parsing'; + + $View = new View($this->Controller); + $result = $View->render('index'); + + $this->assertNoPattern('/cake:nocache/', $result); + $this->assertNoPattern('/php echo/', $result); + + $filename = CACHE . 'views' . DS . 'cache_test_cache_parsing.php'; + $this->assertTrue(file_exists($filename)); + @unlink($filename); + + + $this->Controller->cache_parsing(); + $this->Controller->cacheAction = array( + 'cache_parsing/' => 21600 + ); + $this->Controller->here = '/cacheTest/cache_parsing'; + $this->Controller->action = 'cache_parsing'; + + $View = new View($this->Controller); + $result = $View->render('index'); + + $this->assertNoPattern('/cake:nocache/', $result); + $this->assertNoPattern('/php echo/', $result); + + $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; + $this->assertTrue(file_exists($filename)); + @unlink($filename); + + + $this->Controller->cache_parsing(); + $this->Controller->cacheAction = array( + 'cache_parsing/33' => 21600 + ); + $this->Controller->here = '/cacheTest/cache_parsing/33'; + $this->Controller->action = 'cache_parsing'; + + $View = new View($this->Controller); + $result = $View->render('index'); + + $this->assertNoPattern('/cake:nocache/', $result); + $this->assertNoPattern('/php echo/', $result); + + $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing_33.php'; + $this->assertTrue(file_exists($filename)); + @unlink($filename); + + $this->Controller->cache_parsing(); + $this->Controller->cacheAction = array( + 'cache_parsing/33' => 21600 + ); + $this->Controller->here = '/cacheTest/cache_parsing'; + $this->Controller->action = 'cache_parsing'; + + $View = new View($this->Controller); + $result = $View->render('index'); + + $this->assertNoPattern('/cake:nocache/', $result); + $this->assertNoPattern('/php echo/', $result); + + $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; + $this->assertFalse(file_exists($filename)); + } /** * testCacheEmptySections method * diff --git a/cake/tests/cases/libs/view/helpers/form.test.php b/cake/tests/cases/libs/view/helpers/form.test.php index 471573250..f19c16f85 100644 --- a/cake/tests/cases/libs/view/helpers/form.test.php +++ b/cake/tests/cases/libs/view/helpers/form.test.php @@ -1758,7 +1758,7 @@ class FormHelperTest extends CakeTestCase { * test form->input() with datetime, date and time types * * @return void - **/ + */ function testInputDatetime() { extract($this->dateRegex); $result = $this->Form->input('Contact.created', array('type' => 'time', 'timeFormat' => 24)); @@ -1874,7 +1874,7 @@ class FormHelperTest extends CakeTestCase { * Test generating checkboxes in a loop. * * @return void - **/ + */ function testInputCheckboxesInLoop() { for ($i = 1; $i < 5; $i++) { $result = $this->Form->input("Contact.{$i}.email", array('type' => 'checkbox', 'value' => $i)); @@ -1894,7 +1894,7 @@ class FormHelperTest extends CakeTestCase { * test form->input() with select type inputs. * * @return void - **/ + */ function testInputSelectType() { $result = $this->Form->input('email', array( 'options' => array('è' => 'Firést', 'é' => 'Secoènd'), 'empty' => true) @@ -2040,7 +2040,7 @@ class FormHelperTest extends CakeTestCase { * test that overriding the magic select type widget is possible * * @return void - **/ + */ function testInputOverridingMagicSelectType() { $view =& ClassRegistry::getObject('view'); $view->viewVars['users'] = array('value' => 'good', 'other' => 'bad'); @@ -2743,7 +2743,7 @@ class FormHelperTest extends CakeTestCase { * test disabling the hidden input for radio buttons * * @return void - **/ + */ function testRadioHiddenInputDisabling() { $result = $this->Form->input('Model.1.field', array( 'type' => 'radio', @@ -3043,7 +3043,7 @@ class FormHelperTest extends CakeTestCase { * test generation of habtm select boxes. * * @return void - **/ + */ function testHabtmSelectBox() { $view =& ClassRegistry::getObject('view'); $view->viewVars['contactTags'] = array( @@ -3427,7 +3427,7 @@ class FormHelperTest extends CakeTestCase { * Test that disabling a checkbox also disables the hidden input so no value is submitted * * @return void - **/ + */ function testCheckboxDisabling() { $result = $this->Form->checkbox('Account.show_name', array('disabled' => 'disabled')); $expected = array( @@ -3441,7 +3441,7 @@ class FormHelperTest extends CakeTestCase { * Test that specifying false in the 'disabled' option will not disable either the hidden input or the checkbox input * * @return void - **/ + */ function testCheckboxHiddenDisabling() { $result = $this->Form->checkbox('Account.show_name', array('disabled' => false)); $expected = array( @@ -4685,7 +4685,7 @@ class FormHelperTest extends CakeTestCase { * test File upload input on a model not used in create(); * * @return void - **/ + */ function testFileUploadOnOtherModel() { ClassRegistry::removeObject('view'); $controller =& new Controller(); @@ -4816,7 +4816,7 @@ class FormHelperTest extends CakeTestCase { * test image submit types. * * @return void - **/ + */ function testSubmitImage() { $result = $this->Form->submit('http://example.com/cake.power.gif'); $expected = array( @@ -5049,13 +5049,28 @@ class FormHelperTest extends CakeTestCase { '/fieldset' ); $this->assertTags($result, $expected); + + $this->Form->data = array(); + $this->Form->params['controller'] = 'contacts'; + $this->Form->params['models'] = array('Contact'); + $result = $this->Form->create(array('url' => array('action' => 'index', 'param'))); + $expected = array( + 'form' => array( + 'id' => 'ContactAddForm', 'method' => 'post', 'action' => '/contacts/index/param', + 'accept-charset' => 'utf-8' + ), + 'fieldset' => array('style' => 'preg:/display\s*\:\s*none;\s*/'), + 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), + '/fieldset' + ); + $this->assertTags($result, $expected); } /** * test that inputDefaults are stored and used. * * @return void - **/ + */ function testCreateWithInputDefaults() { $this->Form->create('User', array( 'inputDefaults' => array('div' => false, 'label' => false) @@ -5080,7 +5095,7 @@ class FormHelperTest extends CakeTestCase { * test automatic accept-charset overriding * * @return void - **/ + */ function testCreateWithAcceptCharset() { $result = $this->Form->create('UserForm', array( 'type' => 'post', 'action' => 'login','encoding' => 'iso-8859-1' diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index cd1b262b4..23d4d96c7 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -12,7 +12,6 @@ * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake @@ -303,7 +302,7 @@ class HtmlHelperTest extends CakeTestCase { * test image() with Asset.timestamp * * @return void - **/ + */ function testImageTagWithTimestampping() { Configure::write('Asset.timestamp', 'force'); @@ -334,27 +333,27 @@ class HtmlHelperTest extends CakeTestCase { * @link https://trac.cakephp.org/ticket/6490 */ function testImageTagWithTheme() { - $file = WWW_ROOT . 'themed' . DS . 'default' . DS . 'img' . DS . 'cake.power.gif'; - $message = "File '{$file}' not present. %s"; - $this->skipUnless(file_exists($file), $message); - + App::build(array( + 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + )); Configure::write('Asset.timestamp', true); Configure::write('debug', 1); - $this->Html->themeWeb = 'themed/default/'; - + + $this->Html->theme = 'test_theme'; $result = $this->Html->image('cake.power.gif'); $this->assertTags($result, array( 'img' => array( - 'src' => 'preg:/themed\/default\/img\/cake\.power\.gif\?\d+/', + 'src' => 'preg:/theme\/test_theme\/img\/cake\.power\.gif\?\d+/', 'alt' => '' ))); $webroot = $this->Html->webroot; $this->Html->webroot = '/testing/'; $result = $this->Html->image('cake.power.gif'); + $this->assertTags($result, array( 'img' => array( - 'src' => 'preg:/\/testing\/themed\/default\/img\/cake\.power\.gif\?\d+/', + 'src' => 'preg:/\/testing\/theme\/test_theme\/img\/cake\.power\.gif\?\d+/', 'alt' => '' ))); $this->Html->webroot = $webroot; @@ -421,19 +420,25 @@ class HtmlHelperTest extends CakeTestCase { $expected['link']['href'] = 'preg:/.*css\/vendor\.generic\.css/'; $this->assertTags($result[1], $expected); $this->assertEqual(count($result), 2); - - $view =& ClassRegistry::getObject('view'); + + ClassRegistry::removeObject('view'); $view =& new HtmlHelperMockView(); + ClassRegistry::addObject('view', $view); $view->expectAt(0, 'addScript', array(new PatternExpectation('/css_in_head.css/'))); $result = $this->Html->css('css_in_head', null, array('inline' => false)); $this->assertNull($result); + + $view =& ClassRegistry::getObject('view'); + $view->expectAt(1, 'addScript', array(new NoPatternExpectation('/inline=""/'))); + $result = $this->Html->css('more_css_in_head', null, array('inline' => false)); + $this->assertNull($result); } /** * test use of css() and timestamping * * @return void - **/ + */ function testCssTimestamping() { Configure::write('debug', 2); Configure::write('Asset.timestamp', true); @@ -477,7 +482,7 @@ class HtmlHelperTest extends CakeTestCase { * test timestamp enforcement for script tags. * * @return void - **/ + */ function testScriptTimestamping() { $skip = $this->skipIf(!is_writable(JS), 'webroot/js is not Writable, timestamp testing has been skipped'); if ($skip) { @@ -505,7 +510,7 @@ class HtmlHelperTest extends CakeTestCase { * test script tag generation * * @return void - **/ + */ function testScript() { $result = $this->Html->script('foo'); $expected = array( @@ -560,7 +565,7 @@ class HtmlHelperTest extends CakeTestCase { * test Script block generation * * @return void - **/ + */ function testScriptBlock() { $result = $this->Html->scriptBlock('window.foo = 2;'); $expected = array( @@ -610,7 +615,7 @@ class HtmlHelperTest extends CakeTestCase { * test script tag output buffering when using scriptStart() and scriptEnd(); * * @return void - **/ + */ function testScriptStartAndScriptEnd() { $result = $this->Html->scriptStart(array('safe' => true)); $this->assertNull($result); diff --git a/cake/tests/cases/libs/view/helpers/javascript.test.php b/cake/tests/cases/libs/view/helpers/javascript.test.php index c0b3a0df9..378459bfe 100644 --- a/cake/tests/cases/libs/view/helpers/javascript.test.php +++ b/cake/tests/cases/libs/view/helpers/javascript.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * JavascriptHelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2006-2008, Cake Software Foundation, Inc. + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('Controller', 'View', 'ClassRegistry', 'View')); @@ -798,7 +792,7 @@ class JavascriptTest extends CakeTestCase { * test string escaping and compare to json_encode() * * @return void - **/ + */ function testStringJsonEncodeCompliance() { if (!function_exists('json_encode')) { return; @@ -828,7 +822,7 @@ class JavascriptTest extends CakeTestCase { * test that text encoded with Javascript::object decodes properly * * @return void - **/ + */ function testObjectDecodeCompatibility() { if (!function_exists('json_decode')) { return; diff --git a/cake/tests/cases/libs/view/helpers/jquery_engine.test.php b/cake/tests/cases/libs/view/helpers/jquery_engine.test.php index 23d237cb0..527ea7ead 100644 --- a/cake/tests/cases/libs/view/helpers/jquery_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/jquery_engine.test.php @@ -4,20 +4,19 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework <http://www.cakephp.org/> + * Copyright 2006-2009, 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. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', array('Html', 'Js', 'JqueryEngine')); @@ -26,7 +25,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * startTest * * @return void - **/ + */ function startTest() { $this->Jquery =& new JqueryEngineHelper(); } @@ -35,7 +34,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * end test * * @return void - **/ + */ function endTest() { unset($this->Jquery); } @@ -44,7 +43,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test selector method * * @return void - **/ + */ function testSelector() { $result = $this->Jquery->get('#content'); $this->assertEqual($result, $this->Jquery); @@ -67,7 +66,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test event binding * * @return void - **/ + */ function testEvent() { $this->Jquery->get('#myLink'); $result = $this->Jquery->event('click', 'doClick', array('wrap' => false)); @@ -87,7 +86,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test dom ready event creation * * @return void - **/ + */ function testDomReady() { $result = $this->Jquery->domReady('foo.name = "bar";'); $expected = '$(document).bind("ready", function (event) {foo.name = "bar";});'; @@ -98,7 +97,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test Each method * * @return void - **/ + */ function testEach() { $this->Jquery->get('#foo'); $result = $this->Jquery->each('$(this).hide();'); @@ -110,7 +109,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test Effect generation * * @return void - **/ + */ function testEffect() { $this->Jquery->get('#foo'); $result = $this->Jquery->effect('show'); @@ -154,7 +153,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * Test Request Generation * * @return void - **/ + */ function testRequest() { $result = $this->Jquery->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = '$.ajax({url:"\\/posts\\/view\\/1"});'; @@ -214,7 +213,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test sortable list generation * * @return void - **/ + */ function testSortable() { $this->Jquery->get('#myList'); $result = $this->Jquery->sortable(array( @@ -243,7 +242,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test drag() method * * @return void - **/ + */ function testDrag() { $this->Jquery->get('#element'); $result = $this->Jquery->drag(array( @@ -272,7 +271,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test drop() method * * @return void - **/ + */ function testDrop() { $this->Jquery->get('#element'); $result = $this->Jquery->drop(array( @@ -299,7 +298,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test slider generation * * @return void - **/ + */ function testSlider() { $this->Jquery->get('#element'); $result = $this->Jquery->slider(array( @@ -330,7 +329,7 @@ class JqueryEngineHelperTestCase extends CakeTestCase { * test the serializeForm method * * @return void - **/ + */ function testSerializeForm() { $this->Jquery->get('#element'); $result = $this->Jquery->serializeForm(array('isForm' => false)); diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php index a73afeab0..6a79960bd 100644 --- a/cake/tests/cases/libs/view/helpers/js.test.php +++ b/cake/tests/cases/libs/view/helpers/js.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -39,7 +38,7 @@ class OptionEngineHelper extends JsBaseEngineHelper { * test method for testing option mapping * * @return array - **/ + */ function testMap($options = array()) { return $this->_mapOptions('request', $options); } @@ -47,7 +46,7 @@ class OptionEngineHelper extends JsBaseEngineHelper { * test method for option parsing * * @return void - **/ + */ function testParseOptions($options, $safe = array()) { return $this->_parseOptions($options, $safe); } @@ -110,7 +109,7 @@ class JsHelperTestCase extends CakeTestCase { * Switches $this->Js to a mocked engine. * * @return void - **/ + */ function _useMock() { $this->Js =& new JsHelper(array('TestJs')); $this->Js->TestJsEngine =& new TestJsEngineHelper($this); @@ -123,7 +122,7 @@ class JsHelperTestCase extends CakeTestCase { * test object construction * * @return void - **/ + */ function testConstruction() { $js =& new JsHelper(); $this->assertEqual($js->helpers, array('Html', 'Form', 'JqueryEngine')); @@ -142,7 +141,7 @@ class JsHelperTestCase extends CakeTestCase { * test that methods dispatch internally and to the engine class * * @return void - **/ + */ function testMethodDispatching() { $this->_useMock(); $this->Js->TestJsEngine->expectOnce('dispatchMethod', array(new PatternExpectation('/methodOne/i'), array())); @@ -158,7 +157,7 @@ class JsHelperTestCase extends CakeTestCase { * Test that method dispatching respects buffer parameters and bufferedMethods Lists. * * @return void - **/ + */ function testMethodDispatchWithBuffering() { $this->_useMock(); @@ -210,7 +209,7 @@ class JsHelperTestCase extends CakeTestCase { * test that writeScripts generates scripts inline. * * @return void - **/ + */ function testWriteScriptsNoFile() { $this->_useMock(); $this->Js->buffer('one = 1;'); @@ -237,7 +236,7 @@ class JsHelperTestCase extends CakeTestCase { * test that writeScripts makes files, and puts the events into them. * * @return void - **/ + */ function testWriteScriptsInFile() { if ($this->skipIf(!is_writable(JS), 'webroot/js is not Writable, script caching test has been skipped')) { return; @@ -262,7 +261,7 @@ class JsHelperTestCase extends CakeTestCase { * test link() * * @return void - **/ + */ function testLinkWithMock() { $this->_useMock(); $options = array('update' => '#content'); @@ -323,7 +322,7 @@ CODE; * test that link() and no buffering returns an <a> and <script> tags. * * @return void - **/ + */ function testLinkWithNoBuffering() { $this->_useMock(); $this->Js->TestJsEngine->setReturnValue('dispatchMethod', 'ajax code', array('request', '*')); @@ -360,7 +359,7 @@ CODE; * test submit() with a Mock to check Engine method calls * * @return void - **/ + */ function testSubmitWithMock() { $this->_useMock(); @@ -424,7 +423,7 @@ CODE; * Test that Object::Object() is not breaking json output in JsHelper * * @return void - **/ + */ function testObjectPassThrough() { $result = $this->Js->object(array('one' => 'first', 'two' => 'second')); $expected = '{"one":"first","two":"second"}'; @@ -435,7 +434,7 @@ CODE; * test set()'ing variables to the Javascript buffer and controlling the output var name. * * @return void - **/ + */ function testSet() { $this->Js->set('loggedIn', true); $this->Js->set(array('height' => 'tall', 'color' => 'purple')); @@ -464,7 +463,7 @@ CODE; * JsBaseEngine Class Test case * * @package cake.tests.view.helpers - **/ + */ class JsBaseEngineTestCase extends CakeTestCase { /** * startTest method @@ -490,7 +489,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test escape string skills * * @return void - **/ + */ function testEscaping() { $result = $this->JsEngine->escape(''); $expected = ''; @@ -521,7 +520,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test prompt() creation * * @return void - **/ + */ function testPrompt() { $result = $this->JsEngine->prompt('Hey, hey you', 'hi!'); $expected = 'prompt("Hey, hey you", "hi!");'; @@ -536,7 +535,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test alert generation * * @return void - **/ + */ function testAlert() { $result = $this->JsEngine->alert('Hey there'); $expected = 'alert("Hey there");'; @@ -551,7 +550,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test confirm generation * * @return void - **/ + */ function testConfirm() { $result = $this->JsEngine->confirm('Are you sure?'); $expected = 'confirm("Are you sure?");'; @@ -566,7 +565,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test Redirect * * @return void - **/ + */ function testRedirect() { $result = $this->JsEngine->redirect(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'window.location = "/posts/view/1";'; @@ -577,7 +576,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * testObject encoding with non-native methods. * * @return void - **/ + */ function testObject() { $this->JsEngine->useNative = false; @@ -621,7 +620,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test compatibility of JsBaseEngineHelper::object() vs. json_encode() * * @return void - **/ + */ function testObjectAgainstJsonEncode() { $skip = $this->skipIf(!function_exists('json_encode'), 'json_encode() not found, comparison tests skipped. %s'); if ($skip) { @@ -660,7 +659,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test that JSON made with JsBaseEngineHelper::object() against json_decode() * * @return void - **/ + */ function testObjectAgainstJsonDecode() { $skip = $this->skipIf(!function_exists('json_encode'), 'json_encode() not found, comparison tests skipped. %s'); if ($skip) { @@ -685,7 +684,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test Mapping of options. * * @return void - **/ + */ function testOptionMapping() { $JsEngine = new OptionEngineHelper(); $result = $JsEngine->testMap(); @@ -705,7 +704,7 @@ class JsBaseEngineTestCase extends CakeTestCase { * test that option parsing escapes strings and saves what is supposed to be saved. * * @return void - **/ + */ function testOptionParsing() { $JsEngine = new OptionEngineHelper(); diff --git a/cake/tests/cases/libs/view/helpers/mootools_engine.test.php b/cake/tests/cases/libs/view/helpers/mootools_engine.test.php index b8aa2ea8a..d3959ac2f 100644 --- a/cake/tests/cases/libs/view/helpers/mootools_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/mootools_engine.test.php @@ -6,20 +6,19 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework <http://www.cakephp.org/> + * Copyright 2006-2009, 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. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', array('Html', 'Js', 'MootoolsEngine')); @@ -28,7 +27,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * startTest * * @return void - **/ + */ function startTest() { $this->Moo =& new MootoolsEngineHelper(); } @@ -36,7 +35,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * end test * * @return void - **/ + */ function endTest() { unset($this->Moo); } @@ -44,7 +43,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test selector method * * @return void - **/ + */ function testSelector() { $result = $this->Moo->get('#content'); $this->assertEqual($result, $this->Moo); @@ -74,7 +73,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test event binding * * @return void - **/ + */ function testEvent() { $this->Moo->get('#myLink'); $result = $this->Moo->event('click', 'doClick', array('wrap' => false)); @@ -93,7 +92,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test dom ready event creation * * @return void - **/ + */ function testDomReady() { $result = $this->Moo->domReady('foo.name = "bar";'); $expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});'; @@ -103,7 +102,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test Each method * * @return void - **/ + */ function testEach() { $this->Moo->get('#foo'); $result = $this->Moo->each('item.setStyle("display", "none");'); @@ -114,7 +113,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test Effect generation * * @return void - **/ + */ function testEffect() { $this->Moo->get('#foo'); $result = $this->Moo->effect('show'); @@ -153,7 +152,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * Test Request Generation * * @return void - **/ + */ function testRequest() { $result = $this->Moo->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'var jsRequest = new Request({url:"\\/posts\\/view\\/1"}).send();'; @@ -223,7 +222,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test sortable list generation * * @return void - **/ + */ function testSortable() { $this->Moo->get('#myList'); $result = $this->Moo->sortable(array( @@ -241,7 +240,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test drag() method * * @return void - **/ + */ function testDrag() { $this->Moo->get('#drag-me'); $result = $this->Moo->drag(array( @@ -258,7 +257,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test drop() method * * @return void - **/ + */ function testDrop() { $this->expectError(); $this->Moo->get('#drop-me'); @@ -292,7 +291,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test slider generation * * @return void - **/ + */ function testSlider() { $this->Moo->get('#slider'); $result = $this->Moo->slider(array( @@ -333,7 +332,7 @@ class MooEngineHelperTestCase extends CakeTestCase { * test the serializeForm implementation. * * @return void - **/ + */ function testSerializeForm() { $this->Moo->get('#element'); $result = $this->Moo->serializeForm(array('isForm' => true)); diff --git a/cake/tests/cases/libs/view/helpers/number.test.php b/cake/tests/cases/libs/view/helpers/number.test.php index 9502cdd1a..456ff09ad 100644 --- a/cake/tests/cases/libs/view/helpers/number.test.php +++ b/cake/tests/cases/libs/view/helpers/number.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 53f2bee1d..e41f65530 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -7,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Helper', array('Html', 'Paginator', 'Form', 'Ajax', 'Javascript', 'Js')); @@ -199,10 +195,33 @@ class PaginatorHelperTest extends CakeTestCase { $this->Paginator->params['paging']['Article']['options']['sort'] = null; $result = $this->Paginator->sort('title'); $this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:title\/direction:desc" class="asc">Title<\/a>$/', $result); + + $this->Paginator->params['paging']['Article']['options']['order'] = array('Article.title' => 'desc'); + $this->Paginator->params['paging']['Article']['options']['sort'] = null; + $result = $this->Paginator->sort('Title', 'title', array('direction' => 'desc')); + $this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:title\/direction:asc" class="desc">Title<\/a>$/', $result); + + + $this->Paginator->params['paging']['Article']['options']['order'] = array('Article.title' => 'desc'); + $this->Paginator->params['paging']['Article']['options']['sort'] = null; + $result = $this->Paginator->sort('Title', 'title', array('direction' => 'asc')); + $this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:title\/direction:asc" class="desc">Title<\/a>$/', $result); + + + $this->Paginator->params['paging']['Article']['options']['order'] = array('Article.title' => 'asc'); + $this->Paginator->params['paging']['Article']['options']['sort'] = null; + $result = $this->Paginator->sort('Title', 'title', array('direction' => 'asc')); + $this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:title\/direction:desc" class="asc">Title<\/a>$/', $result); + + + $this->Paginator->params['paging']['Article']['options']['order'] = array('Article.title' => 'asc'); + $this->Paginator->params['paging']['Article']['options']['sort'] = null; + $result = $this->Paginator->sort('Title', 'title', array('direction' => 'desc')); + $this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:title\/direction:desc" class="asc">Title<\/a>$/', $result); } -/** +/** * testSortLinksUsingDirectionOption method * * @access public @@ -212,7 +231,7 @@ class PaginatorHelperTest extends CakeTestCase { Router::reload(); Router::parse('/'); Router::setRequestInfo(array( - array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), + array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'form' => array(), 'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true'), 'bare' => 0), array('plugin' => null, 'controller' => null, 'action' => null, 'base' => '/', 'here' => '/accounts/', 'webroot' => '/', 'passedArgs' => array()) @@ -555,6 +574,51 @@ class PaginatorHelperTest extends CakeTestCase { $this->assertEqual($expected, $this->Paginator->params['paging']); } +/** + * testPassedArgsMergingWithUrlOptions method + * + * @access public + * @return void + */ + function testPassedArgsMergingWithUrlOptions() { + Router::reload(); + Router::parse('/'); + Router::setRequestInfo(array( + array('plugin' => null, 'controller' => 'articles', 'action' => 'index', 'pass' => array('2'), 'named' => array('foo' => 'bar'), 'form' => array(), 'url' => array('url' => 'articles/index/2/foo:bar'), 'bare' => 0), + array('plugin' => null, 'controller' => null, 'action' => null, 'base' => '/', 'here' => '/articles/', 'webroot' => '/', 'passedArgs' => array(0 => '2', 'foo' => 'bar')) + )); + + $this->Paginator->params['pass'] = array(2); + $this->Paginator->params['named'] = array('foo' => 'bar'); + $this->Paginator->beforeRender(); + + $result = $this->Paginator->sort('title'); + $expected = array( + 'a' => array('href' => '/articles/index/2/page:1/foo:bar/sort:title/direction:asc'), + 'Title', + '/a' + ); + $this->assertTags($result, $expected); + + $result = $this->Paginator->numbers(); + $expected = array( + array('span' => array('class' => 'current')), '1', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:2/foo:bar')), '2', '/a', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:3/foo:bar')), '3', '/a', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:4/foo:bar')), '4', '/a', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:5/foo:bar')), '5', '/a', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:6/foo:bar')), '6', '/a', '/span', + ' | ', + array('span' => array()), array('a' => array('href' => '/articles/index/2/page:7/foo:bar')), '7', '/a', '/span', + ); + $this->assertTags($result, $expected); + } + /** * testPagingLinks method * @@ -690,12 +754,12 @@ class PaginatorHelperTest extends CakeTestCase { * allowing you to use shortcut syntax * * @return void - **/ + */ function testPagingLinksOptionsReplaceEmptyDisabledOptions() { $this->Paginator->params['paging'] = array( 'Client' => array( - 'page' => 1, 'current' => 3, 'count' => 13, 'prevPage' => false, - 'nextPage' => true, 'pageCount' => 5, + 'page' => 1, 'current' => 3, 'count' => 13, 'prevPage' => false, + 'nextPage' => true, 'pageCount' => 5, 'defaults' => array( 'limit' => 3, 'step' => 1, 'order' => array('Client.name' => 'DESC'), 'conditions' => array() ), @@ -923,7 +987,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:15')), 'last', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging'] = array('Client' => array( 'page' => 1, 'current' => 3, 'count' => 30, 'prevPage' => false, 'nextPage' => 2, 'pageCount' => 15, 'defaults' => array('limit' => 3, 'step' => 1, 'order' => array('Client.name' => 'DESC'), 'conditions' => array()), @@ -950,7 +1014,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging'] = array('Client' => array( 'page' => 14, 'current' => 3, 'count' => 30, 'prevPage' => false, 'nextPage' => 2, 'pageCount' => 15, @@ -1205,7 +1269,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:4/sort:Client.name/direction:DESC')), '4', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging'] = array('Client' => array( 'page' => 4895, 'current' => 10, 'count' => 48962, 'prevPage' => 1, 'nextPage' => 1, 'pageCount' => 4897, @@ -1262,7 +1326,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); $this->assertTags($result, $expected); - + $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 5, 'last' => 5, 'separator' => ' - ')); $expected = array( array('span' => array()), array('a' => array('href' => '/index/page:1')), '1', '/a', '/span', @@ -1288,7 +1352,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging']['Client']['page'] = 4893; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); $expected = array( @@ -1317,7 +1381,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging']['Client']['page'] = 58; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); $expected = array( @@ -1352,7 +1416,7 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); $this->assertTags($result, $expected); - + $this->Paginator->params['paging']['Client']['page'] = 5; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); $expected = array( @@ -1694,7 +1758,7 @@ class PaginatorHelperTest extends CakeTestCase { * test that mock classes injected into paginatorHelper are called when using link() * * @return void - **/ + */ function testMockAjaxProviderClassInjection() { $Paginator =& new PaginatorHelper(array('ajax' => 'PaginatorMockJs')); $Paginator->params['paging'] = array( diff --git a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php index 009400249..829968767 100644 --- a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php +++ b/cake/tests/cases/libs/view/helpers/prototype_engine.test.php @@ -4,20 +4,19 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework <http://www.cakephp.org/> - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework <http://www.cakephp.org/> + * Copyright 2006-2009, 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. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake.tests * @subpackage cake.tests.cases.views.helpers - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::import('Helper', array('Html', 'Js', 'PrototypeEngine')); @@ -26,7 +25,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * startTest * * @return void - **/ + */ function startTest() { $this->Proto =& new PrototypeEngineHelper(); } @@ -35,7 +34,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * end test * * @return void - **/ + */ function endTest() { unset($this->Proto); } @@ -44,7 +43,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test selector method * * @return void - **/ + */ function testSelector() { $result = $this->Proto->get('#content'); $this->assertEqual($result, $this->Proto); @@ -75,7 +74,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test event binding * * @return void - **/ + */ function testEvent() { $this->Proto->get('#myLink'); $result = $this->Proto->event('click', 'doClick', array('wrap' => false)); @@ -95,7 +94,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test dom ready event creation * * @return void - **/ + */ function testDomReady() { $result = $this->Proto->domReady('foo.name = "bar";'); $expected = 'document.observe("dom:loaded", function (event) {foo.name = "bar";});'; @@ -106,7 +105,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test Each method * * @return void - **/ + */ function testEach() { $this->Proto->get('#foo li'); $result = $this->Proto->each('item.hide();'); @@ -118,7 +117,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test Effect generation * * @return void - **/ + */ function testEffect() { $this->Proto->get('#foo'); $result = $this->Proto->effect('show'); @@ -174,7 +173,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * Test Request Generation * * @return void - **/ + */ function testRequest() { $result = $this->Proto->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'var jsRequest = new Ajax.Request("/posts/view/1");'; @@ -254,7 +253,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test sortable list generation * * @return void - **/ + */ function testSortable() { $this->Proto->get('#myList'); $result = $this->Proto->sortable(array( @@ -273,7 +272,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * in new Drag() when selection is a multiple type. Iterate over the array. * * @return void - **/ + */ function testDrag() { $this->Proto->get('#element'); $result = $this->Proto->drag(array( @@ -302,7 +301,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test drop() method * * @return void - **/ + */ function testDrop() { $this->Proto->get('#element'); $result = $this->Proto->drop(array( @@ -319,7 +318,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * ensure that slider() method behaves properly * * @return void - **/ + */ function testSlider() { $this->Proto->get('#element'); $result = $this->Proto->slider(array( @@ -348,7 +347,7 @@ class PrototypeEngineHelperTestCase extends CakeTestCase { * test the serializeForm implementation. * * @return void - **/ + */ function testSerializeForm() { $this->Proto->get('#element'); $result = $this->Proto->serializeForm(array('isForm' => true)); diff --git a/cake/tests/cases/libs/view/helpers/rss.test.php b/cake/tests/cases/libs/view/helpers/rss.test.php index eb0f321d3..fd69bd0ae 100644 --- a/cake/tests/cases/libs/view/helpers/rss.test.php +++ b/cake/tests/cases/libs/view/helpers/rss.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * RssHelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Helper', array('Rss', 'Time')); diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/cake/tests/cases/libs/view/helpers/session.test.php index 4024d3c93..45b9b81a6 100644 --- a/cake/tests/cases/libs/view/helpers/session.test.php +++ b/cake/tests/cases/libs/view/helpers/session.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -96,7 +95,7 @@ class SessionHelperTest extends CakeTestCase { * test construction and initial property settings * * @return void - **/ + */ function testConstruct() { $this->assertFalse(empty($this->Session->sessionTime)); $this->assertFalse(empty($this->Session->security)); @@ -149,19 +148,13 @@ class SessionHelperTest extends CakeTestCase { * @return void */ function testFlash() { - ob_start(); - $this->Session->flash(); - $result = ob_get_contents(); - ob_clean(); - + $result = $this->Session->flash('flash', true); $expected = '<div id="flashMessage" class="message">This is a calling</div>'; $this->assertEqual($result, $expected); $this->assertFalse($this->Session->check('Message.flash')); $expected = '<div id="classyMessage" class="positive">Recorded</div>'; - ob_start(); - $this->Session->flash('classy'); - $result = ob_get_clean(); + $result = $this->Session->flash('classy', true); $this->assertEqual($result, $expected); App::build(array( @@ -170,21 +163,13 @@ class SessionHelperTest extends CakeTestCase { $controller = new Controller(); $this->Session->view = new View($controller); - ob_start(); - $this->Session->flash('notification'); - $result = ob_get_contents(); - ob_clean(); - + $result = $this->Session->flash('notification', true); $result = str_replace("\r\n", "\n", $result); $expected = "<div id=\"notificationLayout\">\n\t<h1>Alert!</h1>\n\t<h3>Notice!</h3>\n\t<p>This is a test of the emergency broadcasting system</p>\n</div>"; $this->assertEqual($result, $expected); $this->assertFalse($this->Session->check('Message.notification')); - ob_start(); - $this->Session->flash('bare'); - $result = ob_get_contents(); - ob_clean(); - + $result = $this->Session->flash('bare'); $expected = 'Bare message'; $this->assertEqual($result, $expected); $this->assertFalse($this->Session->check('Message.bare')); diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/cake/tests/cases/libs/view/helpers/text.test.php index 294c6a17e..84dcbf9e4 100644 --- a/cake/tests/cases/libs/view/helpers/text.test.php +++ b/cake/tests/cases/libs/view/helpers/text.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers @@ -363,6 +362,15 @@ class TextHelperTest extends CakeTestCase { $result = $this->Text->toList(array('Dusty', 'Lucky', 'Ned'), 'y'); $this->assertEqual($result, 'Dusty, Lucky y Ned'); + + $result = $this->Text->toList(array( 1 => 'Dusty', 2 => 'Lucky', 3 => 'Ned'), 'y'); + $this->assertEqual($result, 'Dusty, Lucky y Ned'); + + $result = $this->Text->toList(array( 1 => 'Dusty', 2 => 'Lucky', 3 => 'Ned'), 'and', ' + '); + $this->assertEqual($result, 'Dusty + Lucky and Ned'); + + $result = $this->Text->toList(array( 'name1' => 'Dusty', 'name2' => 'Lucky')); + $this->assertEqual($result, 'Dusty and Lucky'); } } ?> \ No newline at end of file diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/cake/tests/cases/libs/view/helpers/time.test.php index c8d5045c0..060a02936 100644 --- a/cake/tests/cases/libs/view/helpers/time.test.php +++ b/cake/tests/cases/libs/view/helpers/time.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TimeHelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/view/helpers/xml.test.php b/cake/tests/cases/libs/view/helpers/xml.test.php index fa7918494..43b7a8fdd 100644 --- a/cake/tests/cases/libs/view/helpers/xml.test.php +++ b/cake/tests/cases/libs/view/helpers/xml.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * XmlHelperTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs.view.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { diff --git a/cake/tests/cases/libs/view/theme.test.php b/cake/tests/cases/libs/view/theme.test.php index 166e175d4..83cb4ef8c 100644 --- a/cake/tests/cases/libs/view/theme.test.php +++ b/cake/tests/cases/libs/view/theme.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * ThemeViewTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', array('Theme', 'Controller')); @@ -185,6 +179,8 @@ class ThemeViewTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); + $Configure = App::getInstance(); + array_shift($Configure->views); } /** diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index b4ee471dc..6f52101f2 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs @@ -294,7 +293,7 @@ class ViewTest extends CakeTestCase { * test that plugin/$plugin_name is only appended to the paths it should be. * * @return void - **/ + */ function testPluginPathGeneration() { $this->Controller->plugin = 'test_plugin'; $this->Controller->name = 'TestPlugin'; @@ -320,7 +319,7 @@ class ViewTest extends CakeTestCase { * test that CamelCase plugins still find their view files. * * @return void - **/ + */ function testCamelCasePluginGetTemplate() { $this->Controller->plugin = 'TestPlugin'; $this->Controller->name = 'TestPlugin'; @@ -573,7 +572,7 @@ class ViewTest extends CakeTestCase { * test the correct triggering of helper callbacks * * @return void - **/ + */ function testHelperCallbackTriggering() { $this->PostsController->helpers = array('Html', 'CallbackMock'); $View =& new TestView($this->PostsController); @@ -703,7 +702,7 @@ class ViewTest extends CakeTestCase { * test rendering layout with cache helper loaded * * @return void - **/ + */ function testRenderLayoutWithMockCacheHelper() { $_check = Configure::read('Cache.check'); Configure::write('Cache.check', true); diff --git a/cake/tests/cases/libs/xml.test.php b/cake/tests/cases/libs/xml.test.php index b79868196..423a73c03 100644 --- a/cake/tests/cases/libs/xml.test.php +++ b/cake/tests/cases/libs/xml.test.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * XmlTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Xml'); @@ -126,7 +120,7 @@ class XmlTest extends CakeTestCase { * test serialization of boolean and null values. false = 0, true = 1, null = '' * * @return void - **/ + */ function testSerializationOfBooleanAndBooleanishValues() { $xml =& new Xml(array('data' => array('example' => false))); $result = $xml->toString(false); @@ -738,7 +732,7 @@ class XmlTest extends CakeTestCase { * * @access public * @return void - **/ + */ function testElementCollapsing() { $xmlDataThatFails = '<resultpackage> <result qid="46b1c46ed6208"><![CDATA[46b1c46ed3af9]]></result> @@ -800,7 +794,7 @@ class XmlTest extends CakeTestCase { * * @see http://code.cakephp.org/tickets/view/8 * @return void - **/ + */ function testCaseFoldingWithEmptyValues() { $filledValue = '<method name="set_user_settings"> <title>update user information</title> diff --git a/cake/tests/fixtures/account_fixture.php b/cake/tests/fixtures/account_fixture.php index e0c786e3b..958a2f471 100644 --- a/cake/tests/fixtures/account_fixture.php +++ b/cake/tests/fixtures/account_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aco_action_fixture.php b/cake/tests/fixtures/aco_action_fixture.php index 88e6ba5bb..b4dccbdd2 100644 --- a/cake/tests/fixtures/aco_action_fixture.php +++ b/cake/tests/fixtures/aco_action_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aco_fixture.php b/cake/tests/fixtures/aco_fixture.php index ae79f5d16..a6fdd830c 100644 --- a/cake/tests/fixtures/aco_fixture.php +++ b/cake/tests/fixtures/aco_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aco_two_fixture.php b/cake/tests/fixtures/aco_two_fixture.php index b4b65873e..d10ce3b98 100644 --- a/cake/tests/fixtures/aco_two_fixture.php +++ b/cake/tests/fixtures/aco_two_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/ad_fixture.php b/cake/tests/fixtures/ad_fixture.php index cf7e88c2d..e4d339150 100644 --- a/cake/tests/fixtures/ad_fixture.php +++ b/cake/tests/fixtures/ad_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for ad_fixture.php * @@ -8,21 +6,17 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * @copyright CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * @link http://www.cakephp.org * @package cake * @subpackage cake.tests.fixtures * @since 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/advertisement_fixture.php b/cake/tests/fixtures/advertisement_fixture.php index 4209bb838..b9381b99a 100644 --- a/cake/tests/fixtures/advertisement_fixture.php +++ b/cake/tests/fixtures/advertisement_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/after_tree_fixture.php b/cake/tests/fixtures/after_tree_fixture.php index 3e1fc968e..06440fb5e 100644 --- a/cake/tests/fixtures/after_tree_fixture.php +++ b/cake/tests/fixtures/after_tree_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for after_tree_fixture.php * @@ -8,21 +6,17 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * @copyright CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * @link http://www.cakephp.org * @package cake * @subpackage cake.tests.fixtures * @since 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/another_article_fixture.php b/cake/tests/fixtures/another_article_fixture.php index 86f01692d..33099253e 100644 --- a/cake/tests/fixtures/another_article_fixture.php +++ b/cake/tests/fixtures/another_article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/apple_fixture.php b/cake/tests/fixtures/apple_fixture.php index 2bc85a64a..934bf1fc6 100644 --- a/cake/tests/fixtures/apple_fixture.php +++ b/cake/tests/fixtures/apple_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aro_fixture.php b/cake/tests/fixtures/aro_fixture.php index 6b392ea94..983711b37 100644 --- a/cake/tests/fixtures/aro_fixture.php +++ b/cake/tests/fixtures/aro_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aro_two_fixture.php b/cake/tests/fixtures/aro_two_fixture.php index 6893e6f71..3b7922dcf 100644 --- a/cake/tests/fixtures/aro_two_fixture.php +++ b/cake/tests/fixtures/aro_two_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aros_aco_fixture.php b/cake/tests/fixtures/aros_aco_fixture.php index ae0761769..b791efbb2 100644 --- a/cake/tests/fixtures/aros_aco_fixture.php +++ b/cake/tests/fixtures/aros_aco_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/aros_aco_two_fixture.php b/cake/tests/fixtures/aros_aco_two_fixture.php index a14e68d71..37a74c981 100644 --- a/cake/tests/fixtures/aros_aco_two_fixture.php +++ b/cake/tests/fixtures/aros_aco_two_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/article_featured_fixture.php b/cake/tests/fixtures/article_featured_fixture.php index 01707a2f7..e91cdb0f6 100644 --- a/cake/tests/fixtures/article_featured_fixture.php +++ b/cake/tests/fixtures/article_featured_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/article_featureds_tags_fixture.php b/cake/tests/fixtures/article_featureds_tags_fixture.php index 56c5ae692..c75e47324 100644 --- a/cake/tests/fixtures/article_featureds_tags_fixture.php +++ b/cake/tests/fixtures/article_featureds_tags_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/article_fixture.php b/cake/tests/fixtures/article_fixture.php index bacf5f433..1e902b2cb 100644 --- a/cake/tests/fixtures/article_fixture.php +++ b/cake/tests/fixtures/article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/articles_tag_fixture.php b/cake/tests/fixtures/articles_tag_fixture.php index 52ad94ab3..52fce86c2 100644 --- a/cake/tests/fixtures/articles_tag_fixture.php +++ b/cake/tests/fixtures/articles_tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/attachment_fixture.php b/cake/tests/fixtures/attachment_fixture.php index c12e26c46..ec05af161 100644 --- a/cake/tests/fixtures/attachment_fixture.php +++ b/cake/tests/fixtures/attachment_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/auth_user_custom_field_fixture.php b/cake/tests/fixtures/auth_user_custom_field_fixture.php index c9731dd99..9a37ae850 100644 --- a/cake/tests/fixtures/auth_user_custom_field_fixture.php +++ b/cake/tests/fixtures/auth_user_custom_field_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.1.8013 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/auth_user_fixture.php b/cake/tests/fixtures/auth_user_fixture.php index 1bd3e81e5..fab5cb406 100644 --- a/cake/tests/fixtures/auth_user_fixture.php +++ b/cake/tests/fixtures/auth_user_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/author_fixture.php b/cake/tests/fixtures/author_fixture.php index d511bcbb5..d16a57ac6 100644 --- a/cake/tests/fixtures/author_fixture.php +++ b/cake/tests/fixtures/author_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/basket_fixture.php b/cake/tests/fixtures/basket_fixture.php index 346d91895..97ee679a1 100644 --- a/cake/tests/fixtures/basket_fixture.php +++ b/cake/tests/fixtures/basket_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/bid_fixture.php b/cake/tests/fixtures/bid_fixture.php index 1c9fa4e7c..867e03891 100644 --- a/cake/tests/fixtures/bid_fixture.php +++ b/cake/tests/fixtures/bid_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/binary_test_fixture.php b/cake/tests/fixtures/binary_test_fixture.php index dfe27d917..83b590e62 100644 --- a/cake/tests/fixtures/binary_test_fixture.php +++ b/cake/tests/fixtures/binary_test_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6700 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/book_fixture.php b/cake/tests/fixtures/book_fixture.php index 297251ea3..50fdb2731 100644 --- a/cake/tests/fixtures/book_fixture.php +++ b/cake/tests/fixtures/book_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7198 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/cache_test_model_fixture.php b/cake/tests/fixtures/cache_test_model_fixture.php index e5cd6e0d5..eaf0bdc78 100644 --- a/cake/tests/fixtures/cache_test_model_fixture.php +++ b/cake/tests/fixtures/cache_test_model_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/callback_fixture.php b/cake/tests/fixtures/callback_fixture.php index 299db85fa..3198efb01 100644 --- a/cake/tests/fixtures/callback_fixture.php +++ b/cake/tests/fixtures/callback_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/campaign_fixture.php b/cake/tests/fixtures/campaign_fixture.php index 9594b6a37..f546fde22 100644 --- a/cake/tests/fixtures/campaign_fixture.php +++ b/cake/tests/fixtures/campaign_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for campaign_fixture.php * @@ -8,21 +6,17 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * @copyright CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * @link http://www.cakephp.org * @package cake * @subpackage cake.tests.fixtures * @since 1.2 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/category_fixture.php b/cake/tests/fixtures/category_fixture.php index 54f3c9ddb..9bb0e3040 100644 --- a/cake/tests/fixtures/category_fixture.php +++ b/cake/tests/fixtures/category_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/category_thread_fixture.php b/cake/tests/fixtures/category_thread_fixture.php index 6c9b80b3d..be6d3fb3b 100644 --- a/cake/tests/fixtures/category_thread_fixture.php +++ b/cake/tests/fixtures/category_thread_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/cd_fixture.php b/cake/tests/fixtures/cd_fixture.php index 0cf6702be..2d0d41048 100644 --- a/cake/tests/fixtures/cd_fixture.php +++ b/cake/tests/fixtures/cd_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7198 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/comment_fixture.php b/cake/tests/fixtures/comment_fixture.php index 45db545ac..28c23e05c 100644 --- a/cake/tests/fixtures/comment_fixture.php +++ b/cake/tests/fixtures/comment_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/content_account_fixture.php b/cake/tests/fixtures/content_account_fixture.php index b92c74849..af61f60c2 100644 --- a/cake/tests/fixtures/content_account_fixture.php +++ b/cake/tests/fixtures/content_account_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/content_fixture.php b/cake/tests/fixtures/content_fixture.php index f6b62500a..33803a313 100644 --- a/cake/tests/fixtures/content_fixture.php +++ b/cake/tests/fixtures/content_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/counter_cache_post_fixture.php b/cake/tests/fixtures/counter_cache_post_fixture.php index 68847d0ae..ae632b0ab 100644 --- a/cake/tests/fixtures/counter_cache_post_fixture.php +++ b/cake/tests/fixtures/counter_cache_post_fixture.php @@ -1,28 +1,20 @@ <?php -/* SVN FILE: $Id: counter_cache_fixture.php 7848 2008-11-08 02:58:37Z nate $ */ - /** - * Short description for file. - * - * Long description for file + * Counter Cache Test Fixtures * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision: 7848 $ - * @modifiedby $LastChangedBy: renan.saddam $ - * @lastmodified $Date: 2008-11-07 21:58:37 -0500 (Fri, 07 Nov 2008) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php b/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php index 34280e139..19a0b8d41 100644 --- a/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php +++ b/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id: counter_cache_fixture.php 7848 2008-11-08 02:58:37Z nate $ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision: 7848 $ - * @modifiedby $LastChangedBy: renan.saddam $ - * @lastmodified $Date: 2008-11-07 21:58:37 -0500 (Fri, 07 Nov 2008) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/counter_cache_user_fixture.php b/cake/tests/fixtures/counter_cache_user_fixture.php index 253747059..f0078a723 100644 --- a/cake/tests/fixtures/counter_cache_user_fixture.php +++ b/cake/tests/fixtures/counter_cache_user_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id: counter_cache_user_fixture.php 7848 2008-11-08 02:58:37Z nate $ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision: 7848 $ - * @modifiedby $LastChangedBy: renan.saddam $ - * @lastmodified $Date: 2008-11-07 21:58:37 -0500 (Fri, 07 Nov 2008) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php b/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php index c1bdede1c..8cb3ab082 100644 --- a/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php +++ b/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id: counter_cache_user_fixture.php 7848 2008-11-08 02:58:37Z nate $ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision: 7848 $ - * @modifiedby $LastChangedBy: renan.saddam $ - * @lastmodified $Date: 2008-11-07 21:58:37 -0500 (Fri, 07 Nov 2008) $ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/data_test_fixture.php b/cake/tests/fixtures/data_test_fixture.php index 858fe2b9b..bbb715026 100644 --- a/cake/tests/fixtures/data_test_fixture.php +++ b/cake/tests/fixtures/data_test_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6700 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/datatype_fixture.php b/cake/tests/fixtures/datatype_fixture.php index 2c50095cb..554f2abb7 100644 --- a/cake/tests/fixtures/datatype_fixture.php +++ b/cake/tests/fixtures/datatype_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7026 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/dependency_fixture.php b/cake/tests/fixtures/dependency_fixture.php index 6f5b4ee9b..09b9d7512 100644 --- a/cake/tests/fixtures/dependency_fixture.php +++ b/cake/tests/fixtures/dependency_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6879//Correct version number as needed** - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/device_fixture.php b/cake/tests/fixtures/device_fixture.php index 83930aa35..b04012dff 100644 --- a/cake/tests/fixtures/device_fixture.php +++ b/cake/tests/fixtures/device_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/device_type_category_fixture.php b/cake/tests/fixtures/device_type_category_fixture.php index 9a88e68e0..b460af1c9 100644 --- a/cake/tests/fixtures/device_type_category_fixture.php +++ b/cake/tests/fixtures/device_type_category_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/device_type_fixture.php b/cake/tests/fixtures/device_type_fixture.php index 7f53948ad..f869eef14 100644 --- a/cake/tests/fixtures/device_type_fixture.php +++ b/cake/tests/fixtures/device_type_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/document_directory_fixture.php b/cake/tests/fixtures/document_directory_fixture.php index 5be9aa916..f31089d39 100644 --- a/cake/tests/fixtures/document_directory_fixture.php +++ b/cake/tests/fixtures/document_directory_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/document_fixture.php b/cake/tests/fixtures/document_fixture.php index 6731b5389..e6c13c45f 100644 --- a/cake/tests/fixtures/document_fixture.php +++ b/cake/tests/fixtures/document_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/exterior_type_category_fixture.php b/cake/tests/fixtures/exterior_type_category_fixture.php index 6672b5d2c..f1c3148b5 100644 --- a/cake/tests/fixtures/exterior_type_category_fixture.php +++ b/cake/tests/fixtures/exterior_type_category_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/feature_set_fixture.php b/cake/tests/fixtures/feature_set_fixture.php index a9df1ff29..f3c6ae83b 100644 --- a/cake/tests/fixtures/feature_set_fixture.php +++ b/cake/tests/fixtures/feature_set_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/featured_fixture.php b/cake/tests/fixtures/featured_fixture.php index 8ab6c992b..e1ddca0e8 100644 --- a/cake/tests/fixtures/featured_fixture.php +++ b/cake/tests/fixtures/featured_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/film_file_fixture.php b/cake/tests/fixtures/film_file_fixture.php index f5a88d421..9c83b8bdc 100644 --- a/cake/tests/fixtures/film_file_fixture.php +++ b/cake/tests/fixtures/film_file_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/flag_tree_fixture.php b/cake/tests/fixtures/flag_tree_fixture.php index 7cd9546bf..52aaa5cc0 100644 --- a/cake/tests/fixtures/flag_tree_fixture.php +++ b/cake/tests/fixtures/flag_tree_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Tree behavior class test fixture. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5331 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/fruit_fixture.php b/cake/tests/fixtures/fruit_fixture.php index 208e79144..cf7e7eaf7 100644 --- a/cake/tests/fixtures/fruit_fixture.php +++ b/cake/tests/fixtures/fruit_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7953 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/fruits_uuid_tag_fixture.php b/cake/tests/fixtures/fruits_uuid_tag_fixture.php index 9c1305b61..6ae994386 100644 --- a/cake/tests/fixtures/fruits_uuid_tag_fixture.php +++ b/cake/tests/fixtures/fruits_uuid_tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7953 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/group_update_all_fixture.php b/cake/tests/fixtures/group_update_all_fixture.php index ad6fcd4c1..a4ae26bd2 100644 --- a/cake/tests/fixtures/group_update_all_fixture.php +++ b/cake/tests/fixtures/group_update_all_fixture.php @@ -1,4 +1,31 @@ <?php +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.fixtures + * @since CakePHP(tm) v 1.2.0.4667 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +/** + * Short description for class. + * + * @package cake + * @subpackage cake.tests.fixtures + */ class GroupUpdateAllFixture extends CakeTestFixture { var $name = 'GroupUpdateAll'; var $table = 'group_update_all'; diff --git a/cake/tests/fixtures/home_fixture.php b/cake/tests/fixtures/home_fixture.php index 623936037..482fc081b 100644 --- a/cake/tests/fixtures/home_fixture.php +++ b/cake/tests/fixtures/home_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/image_fixture.php b/cake/tests/fixtures/image_fixture.php index 30fdc591c..9773d4140 100644 --- a/cake/tests/fixtures/image_fixture.php +++ b/cake/tests/fixtures/image_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/item_fixture.php b/cake/tests/fixtures/item_fixture.php index 04e0cf075..0d162016f 100644 --- a/cake/tests/fixtures/item_fixture.php +++ b/cake/tests/fixtures/item_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/items_portfolio_fixture.php b/cake/tests/fixtures/items_portfolio_fixture.php index 693038a6f..61227d278 100644 --- a/cake/tests/fixtures/items_portfolio_fixture.php +++ b/cake/tests/fixtures/items_portfolio_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_a_b_fixture.php b/cake/tests/fixtures/join_a_b_fixture.php index 476d68284..4e5bc4443 100644 --- a/cake/tests/fixtures/join_a_b_fixture.php +++ b/cake/tests/fixtures/join_a_b_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6317 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_a_c_fixture.php b/cake/tests/fixtures/join_a_c_fixture.php index 2fd5ebff9..8780f8da5 100644 --- a/cake/tests/fixtures/join_a_c_fixture.php +++ b/cake/tests/fixtures/join_a_c_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6317 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_a_fixture.php b/cake/tests/fixtures/join_a_fixture.php index 63bb6bdfa..783e6c206 100644 --- a/cake/tests/fixtures/join_a_fixture.php +++ b/cake/tests/fixtures/join_a_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6317 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_b_fixture.php b/cake/tests/fixtures/join_b_fixture.php index 630d96ff3..496ea4f0f 100644 --- a/cake/tests/fixtures/join_b_fixture.php +++ b/cake/tests/fixtures/join_b_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6317 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_c_fixture.php b/cake/tests/fixtures/join_c_fixture.php index 9462226bc..9e27cdd94 100644 --- a/cake/tests/fixtures/join_c_fixture.php +++ b/cake/tests/fixtures/join_c_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6317 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/join_thing_fixture.php b/cake/tests/fixtures/join_thing_fixture.php index 8be6fcdd1..653791761 100644 --- a/cake/tests/fixtures/join_thing_fixture.php +++ b/cake/tests/fixtures/join_thing_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/message_fixture.php b/cake/tests/fixtures/message_fixture.php index 448ae8a70..aa5949585 100644 --- a/cake/tests/fixtures/message_fixture.php +++ b/cake/tests/fixtures/message_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/my_categories_my_products_fixture.php b/cake/tests/fixtures/my_categories_my_products_fixture.php index 575504c2f..6aba2cbfa 100644 --- a/cake/tests/fixtures/my_categories_my_products_fixture.php +++ b/cake/tests/fixtures/my_categories_my_products_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/my_categories_my_users_fixture.php b/cake/tests/fixtures/my_categories_my_users_fixture.php index af715716a..050ce40e5 100644 --- a/cake/tests/fixtures/my_categories_my_users_fixture.php +++ b/cake/tests/fixtures/my_categories_my_users_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/my_category_fixture.php b/cake/tests/fixtures/my_category_fixture.php index 0c03821b1..dc9c42d36 100644 --- a/cake/tests/fixtures/my_category_fixture.php +++ b/cake/tests/fixtures/my_category_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/my_product_fixture.php b/cake/tests/fixtures/my_product_fixture.php index 2cbca54a9..b101ba1ec 100644 --- a/cake/tests/fixtures/my_product_fixture.php +++ b/cake/tests/fixtures/my_product_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/my_user_fixture.php b/cake/tests/fixtures/my_user_fixture.php index 6a7e18cae..f1015038b 100644 --- a/cake/tests/fixtures/my_user_fixture.php +++ b/cake/tests/fixtures/my_user_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/node_fixture.php b/cake/tests/fixtures/node_fixture.php index c290eba59..0ca7e8e63 100644 --- a/cake/tests/fixtures/node_fixture.php +++ b/cake/tests/fixtures/node_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6879 //Correct version number as needed** - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/fixtures/number_tree_fixture.php b/cake/tests/fixtures/number_tree_fixture.php index 4e9bf55c5..473826736 100644 --- a/cake/tests/fixtures/number_tree_fixture.php +++ b/cake/tests/fixtures/number_tree_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Tree behavior class. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5331 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/number_tree_two_fixture.php b/cake/tests/fixtures/number_tree_two_fixture.php index 443b8b206..3c7670006 100644 --- a/cake/tests/fixtures/number_tree_two_fixture.php +++ b/cake/tests/fixtures/number_tree_two_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Tree behavior class. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5331 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/numeric_article_fixture.php b/cake/tests/fixtures/numeric_article_fixture.php index ef22a13dd..1915316b0 100644 --- a/cake/tests/fixtures/numeric_article_fixture.php +++ b/cake/tests/fixtures/numeric_article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/overall_favorite_fixture.php b/cake/tests/fixtures/overall_favorite_fixture.php index bb8654363..0ed0042f3 100644 --- a/cake/tests/fixtures/overall_favorite_fixture.php +++ b/cake/tests/fixtures/overall_favorite_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7198 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/person_fixture.php b/cake/tests/fixtures/person_fixture.php index 57d5e0e87..74a399c6d 100644 --- a/cake/tests/fixtures/person_fixture.php +++ b/cake/tests/fixtures/person_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6700 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/portfolio_fixture.php b/cake/tests/fixtures/portfolio_fixture.php index d72c59d49..1dd0675ba 100644 --- a/cake/tests/fixtures/portfolio_fixture.php +++ b/cake/tests/fixtures/portfolio_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/post_fixture.php b/cake/tests/fixtures/post_fixture.php index 824435714..eada4e3b1 100644 --- a/cake/tests/fixtures/post_fixture.php +++ b/cake/tests/fixtures/post_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/posts_tag_fixture.php b/cake/tests/fixtures/posts_tag_fixture.php index 843516969..5428cc4d9 100644 --- a/cake/tests/fixtures/posts_tag_fixture.php +++ b/cake/tests/fixtures/posts_tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/primary_model_fixture.php b/cake/tests/fixtures/primary_model_fixture.php index e86f259dc..3430d2b43 100644 --- a/cake/tests/fixtures/primary_model_fixture.php +++ b/cake/tests/fixtures/primary_model_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/product_fixture.php b/cake/tests/fixtures/product_fixture.php index e04527935..bb1a972f6 100644 --- a/cake/tests/fixtures/product_fixture.php +++ b/cake/tests/fixtures/product_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/product_update_all_fixture.php b/cake/tests/fixtures/product_update_all_fixture.php index 6162d0120..48fc3d5d5 100644 --- a/cake/tests/fixtures/product_update_all_fixture.php +++ b/cake/tests/fixtures/product_update_all_fixture.php @@ -1,4 +1,31 @@ <?php +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.fixtures + * @since CakePHP(tm) v 1.2.0.4667 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +/** + * Short description for class. + * + * @package cake + * @subpackage cake.tests.fixtures + */ class ProductUpdateAllFixture extends CakeTestFixture { var $name = 'ProductUpdateAll'; var $table = 'product_update_all'; diff --git a/cake/tests/fixtures/project_fixture.php b/cake/tests/fixtures/project_fixture.php index 26618de51..2c2f17b92 100644 --- a/cake/tests/fixtures/project_fixture.php +++ b/cake/tests/fixtures/project_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/sample_fixture.php b/cake/tests/fixtures/sample_fixture.php index 20a331bb6..b4f4aca34 100644 --- a/cake/tests/fixtures/sample_fixture.php +++ b/cake/tests/fixtures/sample_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/secondary_model_fixture.php b/cake/tests/fixtures/secondary_model_fixture.php index d16367f0b..ae561ec20 100644 --- a/cake/tests/fixtures/secondary_model_fixture.php +++ b/cake/tests/fixtures/secondary_model_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/session_fixture.php b/cake/tests/fixtures/session_fixture.php index e1e3d038d..18e768622 100644 --- a/cake/tests/fixtures/session_fixture.php +++ b/cake/tests/fixtures/session_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/something_else_fixture.php b/cake/tests/fixtures/something_else_fixture.php index 3bb061ff6..925a0769d 100644 --- a/cake/tests/fixtures/something_else_fixture.php +++ b/cake/tests/fixtures/something_else_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/something_fixture.php b/cake/tests/fixtures/something_fixture.php index b6995cccc..244c501ba 100644 --- a/cake/tests/fixtures/something_fixture.php +++ b/cake/tests/fixtures/something_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/stories_tag_fixture.php b/cake/tests/fixtures/stories_tag_fixture.php index 52f69c7eb..c4bbb51b6 100644 --- a/cake/tests/fixtures/stories_tag_fixture.php +++ b/cake/tests/fixtures/stories_tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/story_fixture.php b/cake/tests/fixtures/story_fixture.php index 3cab86ff9..8fa8e61fd 100644 --- a/cake/tests/fixtures/story_fixture.php +++ b/cake/tests/fixtures/story_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/syfile_fixture.php b/cake/tests/fixtures/syfile_fixture.php index 52d50c0e8..56d7b2664 100644 --- a/cake/tests/fixtures/syfile_fixture.php +++ b/cake/tests/fixtures/syfile_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/tag_fixture.php b/cake/tests/fixtures/tag_fixture.php index 5d10f101b..1aa7df0c8 100644 --- a/cake/tests/fixtures/tag_fixture.php +++ b/cake/tests/fixtures/tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/test_plugin_article_fixture.php b/cake/tests/fixtures/test_plugin_article_fixture.php index 046b225ec..8c80dcebe 100644 --- a/cake/tests/fixtures/test_plugin_article_fixture.php +++ b/cake/tests/fixtures/test_plugin_article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 7660 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/test_plugin_comment_fixture.php b/cake/tests/fixtures/test_plugin_comment_fixture.php index 0a5fee3bc..e10992059 100644 --- a/cake/tests/fixtures/test_plugin_comment_fixture.php +++ b/cake/tests/fixtures/test_plugin_comment_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 7660 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/the_paper_monkies_fixture.php b/cake/tests/fixtures/the_paper_monkies_fixture.php index f2796001e..cbf790da8 100644 --- a/cake/tests/fixtures/the_paper_monkies_fixture.php +++ b/cake/tests/fixtures/the_paper_monkies_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/thread_fixture.php b/cake/tests/fixtures/thread_fixture.php index 75f647e1c..f3caa3067 100644 --- a/cake/tests/fixtures/thread_fixture.php +++ b/cake/tests/fixtures/thread_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/translate_article_fixture.php b/cake/tests/fixtures/translate_article_fixture.php index 2c808329e..41f9316b6 100644 --- a/cake/tests/fixtures/translate_article_fixture.php +++ b/cake/tests/fixtures/translate_article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/translate_fixture.php b/cake/tests/fixtures/translate_fixture.php index 47fb3caa2..5c775675f 100644 --- a/cake/tests/fixtures/translate_fixture.php +++ b/cake/tests/fixtures/translate_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/translate_table_fixture.php b/cake/tests/fixtures/translate_table_fixture.php index 19ac09f40..34b85c7e5 100644 --- a/cake/tests/fixtures/translate_table_fixture.php +++ b/cake/tests/fixtures/translate_table_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/translated_article_fixture.php b/cake/tests/fixtures/translated_article_fixture.php index e4c99c51d..8f80f4e67 100644 --- a/cake/tests/fixtures/translated_article_fixture.php +++ b/cake/tests/fixtures/translated_article_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/translated_item_fixture.php b/cake/tests/fixtures/translated_item_fixture.php index 7f17292ee..aa0ae18f9 100644 --- a/cake/tests/fixtures/translated_item_fixture.php +++ b/cake/tests/fixtures/translated_item_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/unconventional_tree_fixture.php b/cake/tests/fixtures/unconventional_tree_fixture.php index 9972cda08..b02b177c9 100644 --- a/cake/tests/fixtures/unconventional_tree_fixture.php +++ b/cake/tests/fixtures/unconventional_tree_fixture.php @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * Unconventional Tree behavior class test fixture. * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7879 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/underscore_field_fixture.php b/cake/tests/fixtures/underscore_field_fixture.php index 8dca12de4..3ab57ca23 100644 --- a/cake/tests/fixtures/underscore_field_fixture.php +++ b/cake/tests/fixtures/underscore_field_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/user_fixture.php b/cake/tests/fixtures/user_fixture.php index 269fa521c..881f8e579 100644 --- a/cake/tests/fixtures/user_fixture.php +++ b/cake/tests/fixtures/user_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuid_fixture.php b/cake/tests/fixtures/uuid_fixture.php index 723e6cd51..3225b7cc0 100644 --- a/cake/tests/fixtures/uuid_fixture.php +++ b/cake/tests/fixtures/uuid_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.6700 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuid_tag_fixture.php b/cake/tests/fixtures/uuid_tag_fixture.php index d57247443..27834892c 100644 --- a/cake/tests/fixtures/uuid_tag_fixture.php +++ b/cake/tests/fixtures/uuid_tag_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7953 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuid_tree_fixture.php b/cake/tests/fixtures/uuid_tree_fixture.php index 224dd8a06..f71cefd09 100644 --- a/cake/tests/fixtures/uuid_tree_fixture.php +++ b/cake/tests/fixtures/uuid_tree_fixture.php @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * UUID Tree behavior fixture. * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.7984 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuiditem_fixture.php b/cake/tests/fixtures/uuiditem_fixture.php index 3de1654d7..787ef0698 100644 --- a/cake/tests/fixtures/uuiditem_fixture.php +++ b/cake/tests/fixtures/uuiditem_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php b/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php index 6fc851be6..aba63c525 100644 --- a/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php +++ b/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php b/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php index 9a6845546..a98ef7a5a 100644 --- a/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php +++ b/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/fixtures/uuidportfolio_fixture.php b/cake/tests/fixtures/uuidportfolio_fixture.php index 0279044a1..cc1d9282d 100644 --- a/cake/tests/fixtures/uuidportfolio_fixture.php +++ b/cake/tests/fixtures/uuidportfolio_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/groups/acl.group.php b/cake/tests/groups/acl.group.php index 1b671e954..ffb8b924f 100644 --- a/cake/tests/groups/acl.group.php +++ b/cake/tests/groups/acl.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/bake.group.php b/cake/tests/groups/bake.group.php index c6b6bc5eb..5134f43f6 100644 --- a/cake/tests/groups/bake.group.php +++ b/cake/tests/groups/bake.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/behaviors.group.php b/cake/tests/groups/behaviors.group.php index 31336e51e..4fe495a9a 100644 --- a/cake/tests/groups/behaviors.group.php +++ b/cake/tests/groups/behaviors.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/cache.group.php b/cake/tests/groups/cache.group.php index 41c95200b..92a4b76ac 100644 --- a/cake/tests/groups/cache.group.php +++ b/cake/tests/groups/cache.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/components.group.php b/cake/tests/groups/components.group.php index df282cb58..cb9e3c86c 100644 --- a/cake/tests/groups/components.group.php +++ b/cake/tests/groups/components.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/configure.group.php b/cake/tests/groups/configure.group.php index 567deea69..dc0710ef2 100644 --- a/cake/tests/groups/configure.group.php +++ b/cake/tests/groups/configure.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/console.group.php b/cake/tests/groups/console.group.php index 3008303e2..4f632fbaf 100644 --- a/cake/tests/groups/console.group.php +++ b/cake/tests/groups/console.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups @@ -54,16 +53,16 @@ class ConsoleGroupTest extends TestSuite { TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'console' . DS . 'libs' . DS . 'shell'); $path = CORE_TEST_CASES . DS . 'console' . DS . 'libs' . DS . 'tasks' . DS; - + TestManager::addTestFile($this, $path . 'controller'); - TestManager::addTestFile($this, $path . 'model'); - TestManager::addTestFile($this, $path . 'view'); - TestManager::addTestFile($this, $path . 'fixture'); - TestManager::addTestFile($this, $path . 'test'); TestManager::addTestFile($this, $path . 'db_config'); + TestManager::addTestFile($this, $path . 'extract'); + TestManager::addTestFile($this, $path . 'fixture'); + TestManager::addTestFile($this, $path . 'model'); TestManager::addTestFile($this, $path . 'plugin'); TestManager::addTestFile($this, $path . 'project'); - + TestManager::addTestFile($this, $path . 'test'); + TestManager::addTestFile($this, $path . 'view'); } } ?> \ No newline at end of file diff --git a/cake/tests/groups/controller.group.php b/cake/tests/groups/controller.group.php index df704a286..8f1ca2f62 100644 --- a/cake/tests/groups/controller.group.php +++ b/cake/tests/groups/controller.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/database.group.php b/cake/tests/groups/database.group.php index 3a424185e..77ffd3017 100644 --- a/cake/tests/groups/database.group.php +++ b/cake/tests/groups/database.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/helpers.group.php b/cake/tests/groups/helpers.group.php index 484743a24..7450c5d0d 100644 --- a/cake/tests/groups/helpers.group.php +++ b/cake/tests/groups/helpers.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/i18n.group.php b/cake/tests/groups/i18n.group.php index 2611939f2..6035bff0a 100644 --- a/cake/tests/groups/i18n.group.php +++ b/cake/tests/groups/i18n.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/javascript.group.php b/cake/tests/groups/javascript.group.php index a2a064d38..5dbc25bd1 100644 --- a/cake/tests/groups/javascript.group.php +++ b/cake/tests/groups/javascript.group.php @@ -6,13 +6,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/lib.group.php b/cake/tests/groups/lib.group.php index 4ca7bb73d..246e986fd 100644 --- a/cake/tests/groups/lib.group.php +++ b/cake/tests/groups/lib.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups @@ -46,6 +45,7 @@ class LibGroupTest extends TestSuite { * @return void */ function LibGroupTest() { + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'basics'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'inflector'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cake_log'); TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'class_registry'); diff --git a/cake/tests/groups/model.group.php b/cake/tests/groups/model.group.php index 354189652..e092f2a2b 100644 --- a/cake/tests/groups/model.group.php +++ b/cake/tests/groups/model.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/no_cross_contamination.group.php b/cake/tests/groups/no_cross_contamination.group.php index d17050516..88b99142a 100644 --- a/cake/tests/groups/no_cross_contamination.group.php +++ b/cake/tests/groups/no_cross_contamination.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/routing_system.group.php b/cake/tests/groups/routing_system.group.php index d1288933e..81ff4822c 100644 --- a/cake/tests/groups/routing_system.group.php +++ b/cake/tests/groups/routing_system.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/socket.group.php b/cake/tests/groups/socket.group.php index d5851657c..9768bb60e 100644 --- a/cake/tests/groups/socket.group.php +++ b/cake/tests/groups/socket.group.php @@ -12,7 +12,6 @@ * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake.tests diff --git a/cake/tests/groups/test_suite.group.php b/cake/tests/groups/test_suite.group.php index 1e7aa097a..a2635165c 100644 --- a/cake/tests/groups/test_suite.group.php +++ b/cake/tests/groups/test_suite.group.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * TestSuiteGroupTest file * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2007, Cake Software Foundation, Inc. + * Copyright 2005-2009, Cake Software Foundation, Inc. * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2007, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/groups/view.group.php b/cake/tests/groups/view.group.php index b371ec414..af621082c 100644 --- a/cake/tests/groups/view.group.php +++ b/cake/tests/groups/view.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/groups/xml.group.php b/cake/tests/groups/xml.group.php index 9e0673c84..a8095dff5 100644 --- a/cake/tests/groups/xml.group.php +++ b/cake/tests/groups/xml.group.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.groups diff --git a/cake/tests/lib/cake_reporter.php b/cake/tests/lib/cake_reporter.php index 22767a355..234e8fc0b 100644 --- a/cake/tests/lib/cake_reporter.php +++ b/cake/tests/lib/cake_reporter.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ @@ -62,7 +56,7 @@ class CakeHtmlReporter extends SimpleReporter { * * @param * @return void - **/ + */ function paintGroupStart($test_name, $size) { if (empty($this->_timeStart)) { $this->_timeStart = $this->_getTime(); @@ -75,7 +69,7 @@ class CakeHtmlReporter extends SimpleReporter { * and timers are stopped. * * @return void - **/ + */ function paintGroupEnd($test_name) { $this->_timeEnd = $this->_getTime(); $this->_timeDuration = $this->_timeEnd - $this->_timeStart; @@ -87,7 +81,7 @@ class CakeHtmlReporter extends SimpleReporter { * but in a separate function to reduce dependancies. * * @return float Time in microseconds - **/ + */ function _getTime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$sec + (float)$usec); diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index c37dfb5c4..8e4dd0c7f 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -7,13 +7,12 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs @@ -657,10 +656,10 @@ class CakeTestCase extends UnitTestCase { $permutations = $this->__array_permute($attrs); $permutationTokens = array(); foreach ($permutations as $permutation) { - $permutationTokens[] = join('', $permutation); + $permutationTokens[] = implode('', $permutation); } $regex[] = array( - sprintf('%s', join(', ', $explanations)), + sprintf('%s', implode(', ', $explanations)), $permutationTokens, $i, ); @@ -766,11 +765,10 @@ class CakeTestCase extends UnitTestCase { $pluginName = $parts[1]; $fixture = $parts[2]; $fixturePaths = array( - APP . 'plugins' . DS . $pluginName . DS . 'tests' . DS . 'fixtures', + App::pluginPath($pluginName) . 'tests' . DS . 'fixtures', TESTS . 'fixtures', VENDORS . 'tests' . DS . 'fixtures' ); - $fixturesPaths[0] = App::pluginPath($pluginName) . DS . 'tests' . DS . 'fixtures'; } else { $fixturePaths = array( TESTS . 'fixtures', diff --git a/cake/tests/lib/cake_test_fixture.php b/cake/tests/lib/cake_test_fixture.php index e4ab3333b..c323f83cf 100644 --- a/cake/tests/lib/cake_test_fixture.php +++ b/cake/tests/lib/cake_test_fixture.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ @@ -38,7 +32,7 @@ class CakeTestFixture extends Object { * Name of the object * * @var string - **/ + */ var $name = null; /** diff --git a/cake/tests/lib/cake_test_model.php b/cake/tests/lib/cake_test_model.php index 6c798a3c3..4a6de13f1 100644 --- a/cake/tests/lib/cake_test_model.php +++ b/cake/tests/lib/cake_test_model.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4667 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ require_once LIBS.'model'.DS.'model.php'; diff --git a/cake/tests/lib/cake_text_reporter.php b/cake/tests/lib/cake_text_reporter.php index 1d1424641..94b6e8d6f 100644 --- a/cake/tests/lib/cake_text_reporter.php +++ b/cake/tests/lib/cake_text_reporter.php @@ -11,7 +11,7 @@ class CakeTextReporter extends TextReporter { * * @param * @return void - **/ + */ function paintGroupStart($test_name, $size) { if (empty($this->_timeStart)) { $this->_timeStart = $this->_getTime(); @@ -24,7 +24,7 @@ class CakeTextReporter extends TextReporter { * and timers are stopped. * * @return void - **/ + */ function paintGroupEnd($test_name) { $this->_timeEnd = $this->_getTime(); $this->_timeDuration = $this->_timeEnd - $this->_timeStart; @@ -36,7 +36,7 @@ class CakeTextReporter extends TextReporter { * but in a separate function to reduce dependancies. * * @return float Time in microseconds - **/ + */ function _getTime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$sec + (float)$usec); diff --git a/cake/tests/lib/cake_web_test_case.php b/cake/tests/lib/cake_web_test_case.php index 8ea1ea72d..139397982 100644 --- a/cake/tests/lib/cake_web_test_case.php +++ b/cake/tests/lib/cake_web_test_case.php @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * CakeWebTestCase a simple wrapper around WebTestCase * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ diff --git a/cake/tests/lib/cli_reporter.php b/cake/tests/lib/cli_reporter.php index e93597afc..557cdf08e 100644 --- a/cake/tests/lib/cli_reporter.php +++ b/cake/tests/lib/cli_reporter.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ if (! defined('ST_FAILDETAIL_SEPARATOR')) { diff --git a/cake/tests/lib/code_coverage_manager.php b/cake/tests/lib/code_coverage_manager.php index 3bdbb28f4..019c632a2 100644 --- a/cake/tests/lib/code_coverage_manager.php +++ b/cake/tests/lib/code_coverage_manager.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * A class to manage all aspects for Code Coverage Analysis * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ App::import('Core', 'Folder'); diff --git a/cake/tests/lib/content.php b/cake/tests/lib/content.php index 312d5917b..8c5fb389f 100644 --- a/cake/tests/lib/content.php +++ b/cake/tests/lib/content.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/lib/footer.php b/cake/tests/lib/footer.php index a64330371..aafdd3ca8 100644 --- a/cake/tests/lib/footer.php +++ b/cake/tests/lib/footer.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> </div> diff --git a/cake/tests/lib/header.php b/cake/tests/lib/header.php index 86aeec3f9..8b057cf03 100644 --- a/cake/tests/lib/header.php +++ b/cake/tests/lib/header.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/lib/simpletest.php b/cake/tests/lib/simpletest.php index 35eb6e8cf..5ec71e559 100644 --- a/cake/tests/lib/simpletest.php +++ b/cake/tests/lib/simpletest.php @@ -1,5 +1,4 @@ <?php -/* SVN FILE: $Id$ */ /** * Short description for file. * @@ -8,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 1e4717bf2..2e727ef5b 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.lib * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ define('CORE_TEST_CASES', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'cases'); @@ -608,7 +602,7 @@ class HtmlTestManager extends TestManager { foreach ($testCases as $testCaseFile => $testCase) { $title = explode(strpos($testCase, '\\') ? '\\' : '/', str_replace('.test.php', '', $testCase)); $title[count($title) - 1] = Inflector::camelize($title[count($title) - 1]); - $title = join(' / ', $title); + $title = implode(' / ', $title); $buffer .= "<li><a href='" . $manager->getBaseURL() . "?case=" . urlencode($testCase) . $urlExtra ."'>" . $title . "</a></li>\n"; } diff --git a/cake/tests/lib/xdebug.php b/cake/tests/lib/xdebug.php index 376c6163b..a33f69784 100644 --- a/cake/tests/lib/xdebug.php +++ b/cake/tests/lib/xdebug.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.cake.tests.libs * @since CakePHP(tm) v 1.2.0.4433 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/config/acl.ini.php b/cake/tests/test_app/config/acl.ini.php index 96ab738e4..b2422df68 100644 --- a/cake/tests/test_app/config/acl.ini.php +++ b/cake/tests/test_app/config/acl.ini.php @@ -1,4 +1,4 @@ -;<?php die() ?> +;<?php exit() ?> ; SVN FILE: $Id$ ;/** ; * Test App Ini Based Acl Config File @@ -6,22 +6,18 @@ ; * ; * PHP versions 4 and 5 ; * -; * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) -; * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) +; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +; * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * ; * Licensed under The MIT License ; * Redistributions of files must retain the above copyright notice. ; * -; * @filesource -; * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) -; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +; * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @link http://cakephp.org CakePHP(tm) Project ; * @package cake ; * @subpackage cake.app.config ; * @since CakePHP(tm) v 0.10.0.1076 -; * @version $Revision$ -; * @modifiedby $LastChangedBy$ -; * @lastmodified $Date$ -; * @license http://www.opensource.org/licenses/mit-license.php The MIT License +; * @license MIT License (http://www.opensource.org/licenses/mit-license.php) ; */ ;------------------------------------- diff --git a/cake/tests/test_app/controllers/tests_apps_controller.php b/cake/tests/test_app/controllers/tests_apps_controller.php index 0bba6acb3..19c77487d 100644 --- a/cake/tests/test_app/controllers/tests_apps_controller.php +++ b/cake/tests/test_app/controllers/tests_apps_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestsAppsController extends AppController { diff --git a/cake/tests/test_app/controllers/tests_apps_posts_controller.php b/cake/tests/test_app/controllers/tests_apps_posts_controller.php index 9f6e919f9..cc4a0518c 100644 --- a/cake/tests/test_app/controllers/tests_apps_posts_controller.php +++ b/cake/tests/test_app/controllers/tests_apps_posts_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestsAppsPostsController extends AppController { diff --git a/cake/tests/test_app/libs/cache/test_app_cache.php b/cake/tests/test_app/libs/cache/test_app_cache.php new file mode 100644 index 000000000..1cc9b7c52 --- /dev/null +++ b/cake/tests/test_app/libs/cache/test_app_cache.php @@ -0,0 +1,22 @@ +<?php +/** + * Test Suite Test App Cache Engine class. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.cases.libs + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +class TestAppCacheEngine extends CacheEngine { + +} \ No newline at end of file diff --git a/cake/tests/test_app/libs/library.php b/cake/tests/test_app/libs/library.php index 1fb703076..ecb12ec91 100644 --- a/cake/tests/test_app/libs/library.php +++ b/cake/tests/test_app/libs/library.php @@ -1,28 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Suite Library * - * Long description for file - * * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs - * @since CakePHP(tm) v 1.2.0.5432 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ + * @since CakePHP(tm) v 1.3 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class Library {} diff --git a/cake/tests/test_app/libs/log/test_app_log.php b/cake/tests/test_app/libs/log/test_app_log.php new file mode 100644 index 000000000..58cb9b5ba --- /dev/null +++ b/cake/tests/test_app/libs/log/test_app_log.php @@ -0,0 +1,25 @@ +<?php +/** + * Test Suite Test App Logging stream class. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.cases.libs + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +class TestAppLog { + + function write($type, $message) { + + } +} \ No newline at end of file diff --git a/cake/tests/test_app/models/behaviors/persister_one_behavior.php b/cake/tests/test_app/models/behaviors/persister_one_behavior.php index 3ef2e3284..2abec4b07 100644 --- a/cake/tests/test_app/models/behaviors/persister_one_behavior.php +++ b/cake/tests/test_app/models/behaviors/persister_one_behavior.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Behavior for binding management. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/test_app/models/behaviors/persister_two_behavior.php b/cake/tests/test_app/models/behaviors/persister_two_behavior.php index 017180453..e32c93950 100644 --- a/cake/tests/test_app/models/behaviors/persister_two_behavior.php +++ b/cake/tests/test_app/models/behaviors/persister_two_behavior.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Behavior for binding management. * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models * @since CakePHP(tm) v 1.2.0.5669 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** diff --git a/cake/tests/test_app/models/comment.php b/cake/tests/test_app/models/comment.php index d1ac8431b..867146f0b 100644 --- a/cake/tests/test_app/models/comment.php +++ b/cake/tests/test_app/models/comment.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test App Comment Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class Comment extends AppModel { var $useTable = 'comments'; diff --git a/cake/tests/test_app/models/persister_one.php b/cake/tests/test_app/models/persister_one.php index 9fe361125..19c9c8e01 100644 --- a/cake/tests/test_app/models/persister_one.php +++ b/cake/tests/test_app/models/persister_one.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test App Comment Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.test_app.models * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class PersisterOne extends AppModel { var $useTable = 'posts'; diff --git a/cake/tests/test_app/models/persister_two.php b/cake/tests/test_app/models/persister_two.php index afc92ac5e..1472040f8 100644 --- a/cake/tests/test_app/models/persister_two.php +++ b/cake/tests/test_app/models/persister_two.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test App Comment Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.tests.test_app.models * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class PersisterTwo extends AppModel { var $useTable = 'posts'; diff --git a/cake/tests/test_app/models/post.php b/cake/tests/test_app/models/post.php index cdc314b5e..80b9c7238 100644 --- a/cake/tests/test_app/models/post.php +++ b/cake/tests/test_app/models/post.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test App Comment Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.libs. * @since CakePHP v 1.2.0.7726 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class Post extends AppModel { var $useTable = 'posts'; diff --git a/cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js b/cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js new file mode 100644 index 000000000..ac52468f6 --- /dev/null +++ b/cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js @@ -0,0 +1 @@ +alert('win sauce'); \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/config/load.php b/cake/tests/test_app/plugins/test_plugin/config/load.php new file mode 100644 index 000000000..75c7e0bb2 --- /dev/null +++ b/cake/tests/test_app/plugins/test_plugin/config/load.php @@ -0,0 +1,23 @@ +<?php +/** + * Test Suite TestPlugin config file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.test_app + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +$config['plugin_load'] = '/test_app/plugins/test_plugin/config/load.php'; +?> \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/config/more.load.php b/cake/tests/test_app/plugins/test_plugin/config/more.load.php new file mode 100644 index 000000000..fe20ef087 --- /dev/null +++ b/cake/tests/test_app/plugins/test_plugin/config/more.load.php @@ -0,0 +1,23 @@ +<?php +/** + * Test Suite TestPlugin config file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.test_app + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +$config['plugin_more_load'] = '/test_app/plugins/test_plugin/config/more.load.php'; +?> \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php b/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php index 5a9dcb154..dad4327c8 100644 --- a/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php +++ b/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php @@ -6,19 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.app.config.sql * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class TestPluginAppSchema extends CakeSchema { diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php index 4d84d2713..57ceada55 100644 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class OtherComponentComponent extends Object { diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php index fca3642c3..90f6c8e7b 100644 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class PluginsComponentComponent extends Object { diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php index 3d03b86f6..f920082ea 100644 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestPluginComponentComponent extends Object { diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php index 4e432f2c9..1927a3544 100644 --- a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestPluginOtherComponentComponent extends Object { diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php b/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php index 9028dc87c..7a1e001ac 100644 --- a/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php +++ b/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestsController extends TestPluginAppController { diff --git a/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php b/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php new file mode 100644 index 000000000..9b63de842 --- /dev/null +++ b/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php @@ -0,0 +1,22 @@ +<?php +/** + * Test Suite Test Plugin Cache Engine class. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.cases.libs + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +class TestPluginCacheEngine extends CacheEngine { + +} \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php b/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php new file mode 100644 index 000000000..dde74f61a --- /dev/null +++ b/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php @@ -0,0 +1,25 @@ +<?php +/** + * Test Suite Test Plugin Logging stream class. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.cases.libs + * @since CakePHP(tm) v 1.3 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +class TestPluginLog { + + function write($type, $message) { + + } +} \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php b/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php index 800ec1bf9..d8a5114ea 100644 --- a/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php +++ b/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Suite TestPlugin Library * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestPluginLibrary {} diff --git a/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php b/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php index c2087f7a4..f940f1ac9 100644 --- a/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php +++ b/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php @@ -1,5 +1,4 @@ <?php - class TestSource extends DataSource { function describe($model) { diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php index 23822ba27..9732b7371 100644 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Plugin Auth User Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.tests.test_app.plugins.test_plugin * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class TestPluginAuthUser extends TestPluginAppModel { diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php index 6dfe81de9..0393806b7 100644 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Plugin Post Model * @@ -8,22 +6,18 @@ * * PHP versions 4 and 5 * - * CakePHP : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2006-2008, Cake Software Foundation, Inc. + * CakePHP : Rapid Development Framework (http://cakephp.org) + * Copyright 2006-2009, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2006-2008, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @copyright Copyright 2006-2009, Cake Software Foundation, Inc. + * @link http://cakephp.org CakePHP Project * @package cake * @subpackage cake.cake.tests.test_app.plugins.test_plugin * @since CakePHP v 1.2.0.4487 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class TestPluginPost extends TestPluginAppModel { diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php index c22aca869..9bf96719e 100644 --- a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php +++ b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Suite TestPlugin AppController * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestPluginAppController extends AppController { } diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php index f272acf24..a63dac31c 100644 --- a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php +++ b/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Test Suite TestPlugin AppModel * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.cases.libs * @since CakePHP(tm) v 1.2.0.5432 - * @version $Rev$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class TestPluginAppModel extends AppModel {} diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php b/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php index f804037cd..86b1c9376 100644 --- a/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors.sample * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class SamplePluginClassTestName { diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php b/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php index 3d81f6dcf..68757c166 100644 --- a/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors.shells * @since CakePHP(tm) v 1.2.0.7871 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class ExampleShell extends Shell { diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php b/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php index cbf8a72cc..67ef5cec8 100644 --- a/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php +++ b/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.vendors * @since CakePHP(tm) v 1.2.0.7629 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php b/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php index 5a558f761..7ebf08361 100644 --- a/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php +++ b/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class OtherHelperHelper extends AppHelper {} diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php b/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php index a745a1abe..f9a00ce6e 100644 --- a/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php +++ b/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin.views.helpers * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class PluggedHelperHelper extends AppHelper { diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/css/test_plugin_asset.css b/cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/vendors/css/test_plugin_asset.css rename to cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf b/cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf new file mode 100644 index 000000000..02a920ce3 --- /dev/null +++ b/cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf @@ -0,0 +1 @@ +this is just a test to load swf file from the plugin. \ No newline at end of file diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/img/cake.icon.gif b/cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/vendors/img/cake.icon.gif rename to cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/js/test_plugin/test.js b/cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/vendors/js/test_plugin/test.js rename to cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf b/cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf new file mode 100644 index 000000000..f38d751a9 Binary files /dev/null and b/cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf differ diff --git a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php index ba408e930..e101094f3 100644 --- a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php +++ b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin_two.vendors.shells * @since CakePHP(tm) v 1.2.0.7871 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class ExampleShell extends Shell { diff --git a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php index f55e76aea..e7c4f7740 100644 --- a/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php +++ b/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.plugins.test_plugin_two.vendors.shells * @since CakePHP(tm) v 1.2.0.7871 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class WelcomeShell extends Shell { diff --git a/cake/tests/test_app/vendors/Test/MyTest.php b/cake/tests/test_app/vendors/Test/MyTest.php index 7190c5a76..0acacade6 100644 --- a/cake/tests/test_app/vendors/Test/MyTest.php +++ b/cake/tests/test_app/vendors/Test/MyTest.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.somename * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/vendors/Test/hello.php b/cake/tests/test_app/vendors/Test/hello.php index 713390c68..27e5c82c1 100644 --- a/cake/tests/test_app/vendors/Test/hello.php +++ b/cake/tests/test_app/vendors/Test/hello.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.Test * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php b/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php index c815ad619..7ef258189 100644 --- a/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php +++ b/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.sample * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class ConfigureTestVendorSample { diff --git a/cake/tests/test_app/vendors/shells/sample.php b/cake/tests/test_app/vendors/shells/sample.php index 89cdccc74..da4c67e7a 100644 --- a/cake/tests/test_app/vendors/shells/sample.php +++ b/cake/tests/test_app/vendors/shells/sample.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.shells * @since CakePHP(tm) v 1.2.0.7871 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ class SampleShell extends Shell { diff --git a/cake/tests/test_app/vendors/somename/some.name.php b/cake/tests/test_app/vendors/somename/some.name.php index 3c15defa0..3504025e5 100644 --- a/cake/tests/test_app/vendors/somename/some.name.php +++ b/cake/tests/test_app/vendors/somename/some.name.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors.somename * @since CakePHP(tm) v 1.2.0.4206 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/vendors/welcome.php b/cake/tests/test_app/vendors/welcome.php index 32039255b..7ec5f42dd 100644 --- a/cake/tests/test_app/vendors/welcome.php +++ b/cake/tests/test_app/vendors/welcome.php @@ -1,6 +1,4 @@ <?php -/* SVN FILE: $Id$ */ - /** * Short description for file. * @@ -9,20 +7,16 @@ * PHP versions 4 and 5 * * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests * @package cake * @subpackage cake.tests.test_app.vendors * @since CakePHP(tm) v 1.2.0.7629 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License */ ?> diff --git a/cake/tests/test_app/views/elements/email/html/default.ctp b/cake/tests/test_app/views/elements/email/html/default.ctp index 9281bb8c6..15b7ca118 100644 --- a/cake/tests/test_app/views/elements/email/html/default.ctp +++ b/cake/tests/test_app/views/elements/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php diff --git a/cake/tests/test_app/views/elements/email/text/default.ctp b/cake/tests/test_app/views/elements/email/text/default.ctp index bd5f1aca6..3b1183f71 100644 --- a/cake/tests/test_app/views/elements/email/text/default.ctp +++ b/cake/tests/test_app/views/elements/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content; ?> \ No newline at end of file diff --git a/cake/tests/test_app/views/elements/email/text/wide.ctp b/cake/tests/test_app/views/elements/email/text/wide.ctp index 04dd5475c..42a6b3ad9 100644 --- a/cake/tests/test_app/views/elements/email/text/wide.ctp +++ b/cake/tests/test_app/views/elements/email/text/wide.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.elements.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> This element has some text that is just too wide to comply with email standards. diff --git a/cake/tests/test_app/views/layouts/ajax.ctp b/cake/tests/test_app/views/layouts/ajax.ctp index 4da27c73a..d49d0986e 100644 --- a/cake/tests/test_app/views/layouts/ajax.ctp +++ b/cake/tests/test_app/views/layouts/ajax.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/cake/tests/test_app/views/layouts/ajax2.ctp b/cake/tests/test_app/views/layouts/ajax2.ctp index 514a71ab0..9b87525ef 100644 --- a/cake/tests/test_app/views/layouts/ajax2.ctp +++ b/cake/tests/test_app/views/layouts/ajax2.ctp @@ -5,22 +5,18 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision: 7062 $ - * @modifiedby $LastChangedBy: nate $ - * @lastmodified $Date: 2008-05-30 07:29:53 -0400 (Fri, 30 May 2008) $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> Ajax! diff --git a/cake/tests/test_app/views/layouts/cache_empty_sections.ctp b/cake/tests/test_app/views/layouts/cache_empty_sections.ctp index 98e37d0f8..3b1777fd4 100644 --- a/cake/tests/test_app/views/layouts/cache_empty_sections.ctp +++ b/cake/tests/test_app/views/layouts/cache_empty_sections.ctp @@ -1,4 +1,3 @@ -<?php /* SVN FILE: $Id$ */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> diff --git a/cake/tests/test_app/views/layouts/cache_layout.ctp b/cake/tests/test_app/views/layouts/cache_layout.ctp index 7ac370f3b..ca5a8ae75 100644 --- a/cake/tests/test_app/views/layouts/cache_layout.ctp +++ b/cake/tests/test_app/views/layouts/cache_layout.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <p>This is regular text</p> diff --git a/cake/tests/test_app/views/layouts/default.ctp b/cake/tests/test_app/views/layouts/default.ctp index 2246bff0e..08a92defc 100644 --- a/cake/tests/test_app/views/layouts/default.ctp +++ b/cake/tests/test_app/views/layouts/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> diff --git a/cake/tests/test_app/views/layouts/email/html/default.ctp b/cake/tests/test_app/views/layouts/email/html/default.ctp index b596254f2..289ffe908 100644 --- a/cake/tests/test_app/views/layouts/email/html/default.ctp +++ b/cake/tests/test_app/views/layouts/email/html/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> diff --git a/cake/tests/test_app/views/layouts/email/html/thin.ctp b/cake/tests/test_app/views/layouts/email/html/thin.ctp index 0b4677735..4b8de7ea4 100644 --- a/cake/tests/test_app/views/layouts/email/html/thin.ctp +++ b/cake/tests/test_app/views/layouts/email/html/thin.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.html * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> diff --git a/cake/tests/test_app/views/layouts/email/text/default.ctp b/cake/tests/test_app/views/layouts/email/text/default.ctp index 5fc1645ac..87ca1ab5d 100644 --- a/cake/tests/test_app/views/layouts/email/text/default.ctp +++ b/cake/tests/test_app/views/layouts/email/text/default.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts.email.text * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> diff --git a/cake/tests/test_app/views/layouts/flash.ctp b/cake/tests/test_app/views/layouts/flash.ctp index 11b23e8c1..17fb972f0 100644 --- a/cake/tests/test_app/views/layouts/flash.ctp +++ b/cake/tests/test_app/views/layouts/flash.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> diff --git a/cake/tests/test_app/views/layouts/multi_cache.ctp b/cake/tests/test_app/views/layouts/multi_cache.ctp index 3eba18d4e..a3b43d8ec 100644 --- a/cake/tests/test_app/views/layouts/multi_cache.ctp +++ b/cake/tests/test_app/views/layouts/multi_cache.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.layouts * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <p>This is regular text</p> diff --git a/cake/tests/test_app/views/posts/sequencial_nocache.ctp b/cake/tests/test_app/views/posts/sequencial_nocache.ctp index 5ab7e0874..372d072b9 100644 --- a/cake/tests/test_app/views/posts/sequencial_nocache.ctp +++ b/cake/tests/test_app/views/posts/sequencial_nocache.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <h1>Content</h1> diff --git a/cake/tests/test_app/views/posts/test_nocache_tags.ctp b/cake/tests/test_app/views/posts/test_nocache_tags.ctp index a4bfdd123..121f1d7d0 100644 --- a/cake/tests/test_app/views/posts/test_nocache_tags.ctp +++ b/cake/tests/test_app/views/posts/test_nocache_tags.ctp @@ -1,26 +1,20 @@ <?php -/* SVN FILE: $Id$ */ - /** * * PHP versions 4 and 5 * - * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) - * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @filesource - * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.pages * @since CakePHP(tm) v 0.10.0.1076 - * @version $Revision$ - * @modifiedby $LastChangedBy$ - * @lastmodified $Date$ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <p> diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css b/cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css new file mode 100644 index 000000000..e8b09dd29 --- /dev/null +++ b/cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css @@ -0,0 +1 @@ +this is the test asset css file \ No newline at end of file diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf b/cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf new file mode 100644 index 000000000..cfe782b7a --- /dev/null +++ b/cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf @@ -0,0 +1 @@ +this is just a test to load swf file from the theme. \ No newline at end of file diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif b/cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif new file mode 100644 index 000000000..8f8d570a2 Binary files /dev/null and b/cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif differ diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg b/cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg new file mode 100644 index 000000000..ca5197ae8 Binary files /dev/null and b/cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg differ diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf b/cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf new file mode 100644 index 000000000..9c1dcbcc4 Binary files /dev/null and b/cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf differ