Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merging fixes into 1.x.x.x branched code:

Revision: [2955]

Revision: [2951]

Revision: [2918]

Revision: [2911]

git-svn-id: https://svn.cakephp.org/repo/branches/1.x.x.x@2958 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit e5c074a0dc19570d7695c322ca89efbeb8e87215 1 parent 1dc168a
@phpnut phpnut authored
Showing with 12,423 additions and 15,144 deletions.
  1. +3 −3 .htaccess
  2. +1 −1  VERSION.txt
  3. +12 −12 app/config/acl.ini.php
  4. +14 −18 app/config/bootstrap.php
  5. +37 −43 app/config/core.php
  6. +30 −35 app/config/database.php.default
  7. +19 −21 app/config/inflections.php
  8. +16 −21 app/config/routes.php
  9. +4 −4 app/config/sql/sessions.sql
  10. +13 −14 app/index.php
  11. +67 −82 app/webroot/css.php
  12. +72 −68 app/webroot/css/cake.basic.css
  13. +1 −1  app/webroot/css/cake.forms.css
  14. +54 −81 app/webroot/index.php
  15. +15 −19 app/webroot/js/vendors.php
  16. +16 −18 cake/app_controller.php
  17. +18 −20 cake/app_model.php
  18. +647 −924 cake/basics.php
  19. +88 −120 cake/bootstrap.php
  20. +58 −96 cake/config/paths.php
  21. +19 −16 cake/config/tags.ini.php
  22. +347 −429 cake/dispatcher.php
  23. +3 −3 cake/docs/COPYING.txt
  24. +3 −3 cake/docs/LICENSE.txt
  25. +2 −2 cake/docs/README.txt
  26. +55 −77 cake/libs/cache.php
  27. +24 −33 cake/libs/cake_log.php
  28. +49 −69 cake/libs/class_registry.php
  29. +64 −87 cake/libs/configure.php
  30. +91 −114 cake/libs/controller/component.php
  31. +55 −76 cake/libs/controller/components/acl.php
  32. +27 −31 cake/libs/controller/components/acl_base.php
  33. +201 −238 cake/libs/controller/components/dbacl/db_acl.php
  34. +182 −249 cake/libs/controller/components/dbacl/models/aclnode.php
  35. +17 −21 cake/libs/controller/components/dbacl/models/aco.php
  36. +18 −22 cake/libs/controller/components/dbacl/models/acoaction.php
  37. +17 −21 cake/libs/controller/components/dbacl/models/aro.php
  38. +18 −22 cake/libs/controller/components/dbacl/models/aros_aco.php
  39. +121 −141 cake/libs/controller/components/iniacl/ini_acl.php
  40. +206 −257 cake/libs/controller/components/request_handler.php
  41. +122 −125 cake/libs/controller/components/security.php
  42. +70 −92 cake/libs/controller/components/session.php
  43. +573 −749 cake/libs/controller/controller.php
  44. +45 −51 cake/libs/controller/pages_controller.php
  45. +317 −350 cake/libs/controller/scaffold.php
  46. +235 −275 cake/libs/error.php
  47. +150 −208 cake/libs/file.php
  48. +195 −283 cake/libs/flay.php
  49. +191 −293 cake/libs/folder.php
  50. +228 −248 cake/libs/inflector.php
  51. +42 −58 cake/libs/legacy.php
  52. +105 −124 cake/libs/model/connection_manager.php
  53. +196 −298 cake/libs/model/datasources/datasource.php
  54. +1,121 −1,422 cake/libs/model/datasources/dbo_source.php
  55. +176 −203 cake/libs/model/dbo/dbo_adodb.php
  56. +48 −57 cake/libs/model/dbo/dbo_generic.php
  57. +353 −420 cake/libs/model/dbo/dbo_mssql.php
  58. +290 −375 cake/libs/model/dbo/dbo_mysql.php
  59. +293 −306 cake/libs/model/dbo/dbo_odbc.php
  60. +103 −133 cake/libs/model/dbo/dbo_pear.php
  61. +364 −440 cake/libs/model/dbo/dbo_postgres.php
  62. +323 −324 cake/libs/model/dbo/dbo_sqlite.php
  63. +20 −24 cake/libs/model/model.php
  64. +962 −1,107 cake/libs/model/model_php4.php
  65. +960 −1,105 cake/libs/model/model_php5.php
  66. +169 −236 cake/libs/neat_array.php
  67. +40 −55 cake/libs/neat_string.php
  68. +130 −176 cake/libs/object.php
  69. +150 −203 cake/libs/router.php
  70. +165 −227 cake/libs/sanitize.php
  71. +117 −110 cake/libs/security.php
  72. +347 −432 cake/libs/session.php
  73. +19 −25 cake/libs/validators.php
  74. +80 −95 cake/libs/view/helper.php
  75. +496 −483 cake/libs/view/helpers/ajax.php
  76. +166 −180 cake/libs/view/helpers/cache.php
  77. +358 −340 cake/libs/view/helpers/form.php
Sorry, we could not display the entire diff because it was too big.
View
6 .htaccess
@@ -1,5 +1,5 @@
<IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteRule ^$ app/webroot/ [L]
- RewriteRule (.*) app/webroot/$1 [L]
+ RewriteEngine on
+ RewriteRule ^$ app/webroot/ [L]
+ RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
View
2  VERSION.txt
@@ -6,4 +6,4 @@
// +---------------------------------------------------------------------------------------------------+ //
///////////////////////////////////////////////////////////////////////////////////////////////////////////
-1.1.2.2887
+1.1.2.2955
View
24 app/config/acl.ini.php
@@ -7,23 +7,23 @@
; * PHP versions 4 and 5
; *
; * CakePHP : Rapid Development Framework <http://www.cakephp.org/>
-; * Copyright (c) 2006, Cake Software Foundation, Inc.
-; * 1785 E. Sahara Avenue, Suite 490-204
-; * Las Vegas, Nevada 89104
+; * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
-; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
-; * @package cake
-; * @subpackage cake.app.config
-; * @since CakePHP v 0.10.0.1076
-; * @version $Revision$
-; * @modifiedby $LastChangedBy$
-; * @lastmodified $Date$
-; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+; * @package cake
+; * @subpackage cake.app.config
+; * @since CakePHP v 0.10.0.1076
+; * @version $Revision$
+; * @modifiedby $LastChangedBy$
+; * @lastmodified $Date$
+; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
; */
; acl.ini.php - Cake ACL Configuration
View
32 app/config/bootstrap.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -9,25 +8,24 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.config
- * @since CakePHP v 0.10.8.2117
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP v 0.10.8.2117
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
*
* This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded
@@ -35,16 +33,14 @@
* You can also use this to include or require any files in your application.
*
*/
-
/**
* The settings below can be used to set additional paths to models, views and controllers.
* This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
*
* $modelPaths = array('full path to models', 'second full path to models', 'etc...');
- * $viewPaths = array('this path to views', 'second full path to views', 'etc...');
- * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
+ * $viewPaths = array('this path to views', 'second full path to views', 'etc...');
+ * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
*
*/
-
//EOF
?>
View
80 app/config/core.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* This is core configuration file.
*
@@ -9,25 +8,24 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.config
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
- */
-
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
/**
* If you do not have mod rewrite on your system
* or if you prefer to use CakePHP pretty urls.
@@ -39,8 +37,7 @@
* release/app/.htaccess
* release/app/webroot/.htaccess
*/
-//define ('BASE_URL', env('SCRIPT_NAME'));
-
+// define ('BASE_URL', env('SCRIPT_NAME'));
/**
* Set debug level here:
* - 0: production
@@ -52,19 +49,19 @@
* With the other debug levels you get to click the "flash message" to continue.
*
*/
-define('DEBUG', 1);
+ define('DEBUG', 1);
/**
* Turn of caching checking wide.
* You must still use the controller var cacheAction inside you controller class.
* You can either set it controller wide, or in each controller method.
* use var $cacheAction = true; or in the controller method $this->cacheAction = true;
*/
-define ('CACHE_CHECK', false);
+ define('CACHE_CHECK', false);
/**
* Error constant. Used for differentiating error logging and debugging.
* Currently PHP supports LOG_DEBUG
*/
-define ('LOG_ERROR', 2);
+ define('LOG_ERROR', 2);
/**
* CakePHP includes 3 types of session saves
* database or file. Set this to your preferred method.
@@ -78,24 +75,29 @@
*
*
*/
-define('CAKE_SESSION_SAVE', 'php');
+ define('CAKE_SESSION_SAVE', 'php');
+/**
+ * If using you own table name for storing sessions
+ * set the table name here.
+ * DO NOT INCLUDE PREFIX IF YOU HAVE SET ONE IN database.php
+ *
+ */
+ define('CAKE_SESSION_TABLE', 'cake_sessions');
/**
* Set a random string of used in session.
*
*/
-define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
+ define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
* Set the name of session cookie
*
*/
-define('CAKE_SESSION_COOKIE', 'CAKEPHP');
-
+ define('CAKE_SESSION_COOKIE', 'CAKEPHP');
/**
* Set level of Cake security.
*
*/
-define('CAKE_SECURITY', 'high');
-
+ define('CAKE_SECURITY', 'high');
/**
* Set Cake Session time out.
* If CAKE_SECURITY define is set
@@ -105,8 +107,7 @@
*
* Number below is seconds.
*/
-define('CAKE_SESSION_TIMEOUT', '120');
-
+ define('CAKE_SESSION_TIMEOUT', '120');
/**
* Uncomment the define below to use cake built in admin routes.
* You can set this value to anything you want.
@@ -114,40 +115,33 @@
* name you set CAKE_ADMIN to.
* For example: admin_index, admin_edit
*/
-//define('CAKE_ADMIN', 'admin');
-
+// define('CAKE_ADMIN', 'admin');
/**
* The define below is used to turn cake built webservices
* on or off. Default setting is off.
*/
-define('WEBSERVICES', 'off');
-
+ define('WEBSERVICES', 'off');
/**
* Compress output CSS (removing comments, whitespace, repeating tags etc.)
* This requires a/var/cache directory to be writable by the web server (caching).
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag().
*/
-define('COMPRESS_CSS', false);
-
+ define('COMPRESS_CSS', false);
/**
* If set to true, helpers would output data instead of returning it.
*/
-define('AUTO_OUTPUT', false);
-
+ define('AUTO_OUTPUT', false);
/**
* If set to false, session would not automatically be started.
*/
-define('AUTO_SESSION', true);
-
+ define('AUTO_SESSION', true);
/**
* Set the max size of file to use md5() .
*/
-define('MAX_MD5SIZE', (5*1024)*1024 );
-
+ define('MAX_MD5SIZE', (5 * 1024) * 1024);
/**
* To use Access Control Lists with Cake...
*/
-define('ACL_CLASSNAME', 'DB_ACL');
-define('ACL_FILENAME', 'dbacl'.DS.'db_acl');
-
+ define('ACL_CLASSNAME', 'DB_ACL');
+ define('ACL_FILENAME', 'dbacl' . DS . 'db_acl');
?>
View
65 app/config/database.php.default
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* This is core configuration file.
*
@@ -9,33 +8,30 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.config
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* In this file you set up your database connection details.
*
- * @package cake
- * @subpackage cake.config
+ * @package cake
+ * @subpackage cake.config
*/
-
-
/**
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
@@ -48,8 +44,8 @@
* PostgreSQL set the connect to either pg_pconnect of pg_connect
* SQLite set the connect to sqlite_popen sqlite_open
* ADOdb set the connect to one of these
- * (http://phplens.com/adodb/supported.databases.html) and
- * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
+ * (http://phplens.com/adodb/supported.databases.html) and
+ * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
*
* host =>
* the host you connect to the database
@@ -59,21 +55,20 @@
*/
class DATABASE_CONFIG
{
- var $default = array('driver' => 'mysql',
- 'connect' => 'mysql_connect',
- 'host' => 'localhost',
- 'login' => 'user',
- 'password' => 'password',
- 'database' => 'project_name',
- 'prefix' => '');
+ var $default = array('driver' => 'mysql',
+ 'connect' => 'mysql_connect',
+ 'host' => 'localhost',
+ 'login' => 'user',
+ 'password' => 'password',
+ 'database' => 'project_name',
+ 'prefix' => '');
- var $test = array('driver' => 'mysql',
- 'connect' => 'mysql_connect',
- 'host' => 'localhost',
- 'login' => 'user',
- 'password' => 'password',
- 'database' => 'project_name-test',
- 'prefix' => '');
+ var $test = array('driver' => 'mysql',
+ 'connect' => 'mysql_connect',
+ 'host' => 'localhost',
+ 'login' => 'user',
+ 'password' => 'password',
+ 'database' => 'project_name-test',
+ 'prefix' => '');
}
-
?>
View
40 app/config/inflections.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Custom Inflected Words.
*
@@ -10,59 +9,58 @@
* PHP versions 4 and %
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.config
- * @since CakePHP v 1.0.0.2312
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP v 1.0.0.2312
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* This is a key => value array of regex used to match words.
* If key matches then the value is returned.
*
- * $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice');
+ * $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice');
*/
-$pluralRules = array();
+ $pluralRules = array();
/**
* This is a key only array of plural words that should not be inflected.
* Notice the last comma
*
* $uninflectedPlural = array('.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox');
*/
-$uninflectedPlural = array();
+ $uninflectedPlural = array();
/**
* This is a key => value array of plural irregular words.
* If key matches then the value is returned.
*
* $irregularPlural = array('atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers')
*/
-$irregularPlural = array();
+ $irregularPlural = array();
/**
* This is a key => value array of regex used to match words.
* If key matches then the value is returned.
*
* $singularRules = array('/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i')
*/
-$singularRules = array();
+ $singularRules = array();
/**
* This is a key only array of singular words that should not be inflected.
* You should not have to change this value below if you do change it use same format
* as the $uninflectedPlural above.
*/
-$uninflectedSingular = $uninflectedPlural;
+ $uninflectedSingular = $uninflectedPlural;
/**
* This is a key => value array of singular irregular words.
* Most of the time this will be a reverse of the above $irregularPlural array
@@ -70,5 +68,5 @@
*
* $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother')
*/
-$irregularSingular = array_flip($irregularPlural);
+ $irregularSingular = array_flip($irregularPlural);
?>
View
37 app/config/routes.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -11,41 +10,37 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.config
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/views/pages/home.thtml)...
*/
-$Route->connect ('/', array('controller'=>'pages', 'action'=>'display', 'home'));
-
+ $Route->connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
/**
* ...and connect the rest of 'Pages' controller's urls.
*/
-$Route->connect ('/pages/*', array('controller'=>'pages', 'action'=>'display'));
-
+ $Route->connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
/**
* Then we connect url '/test' to our test controller. This is helpfull in
* developement.
*/
-$Route->connect ('/tests', array('controller'=>'tests', 'action'=>'index'));
-
-?>
+ $Route->connect('/tests', array('controller' => 'tests', 'action' => 'index'));
+?>
View
8 app/config/sql/sessions.sql
@@ -1,7 +1,7 @@
--- @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
--- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
--- @since CakePHP v 0.10.8.1997
--- @version $Revision$
+-- @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+-- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+-- @since CakePHP v 0.10.8.1997
+-- @version $Revision$
CREATE TABLE cake_sessions (
id varchar(255) NOT NULL default '',
View
27 app/index.php
@@ -1,27 +1,26 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app
- * @since CakePHP v 0.10.0.1076
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app
+ * @since CakePHP v 0.10.0.1076
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-require 'webroot'.DIRECTORY_SEPARATOR.'index.php';
+require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
?>
View
149 app/webroot/css.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -9,34 +8,32 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.webroot
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.webroot
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* Enter description here...
*/
-require(CONFIGS.'paths.php');
-require(CAKE.'basics.php');
-require(LIBS.'folder.php');
-require(LIBS.'file.php');
-require(LIBS.'legacy.php');
-
+ require(CONFIGS . 'paths.php');
+ require(CAKE . 'basics.php');
+ require(LIBS . 'folder.php');
+ require(LIBS . 'file.php');
+ require(LIBS . 'legacy.php');
/**
* Enter description here...
*
@@ -44,20 +41,15 @@
* @param unknown_type $name
* @return unknown
*/
-function make_clean_css ($path, $name)
-{
- require(VENDORS.'csspp'.DS.'csspp.php');
-
- $data = file_get_contents($path);
- $csspp = new csspp();
- $output = $csspp->compress($data);
-
- $ratio = 100-(round(strlen($output)/strlen($data), 3)*100);
- $output = " /* file: $name, ratio: $ratio% */ " . $output;
-
- return $output;
-}
-
+ function make_clean_css($path, $name) {
+ require(VENDORS . 'csspp' . DS . 'csspp.php');
+ $data =file_get_contents($path);
+ $csspp =new csspp();
+ $output=$csspp->compress($data);
+ $ratio =100 - (round(strlen($output) / strlen($data), 3) * 100);
+ $output=" /* file: $name, ratio: $ratio% */ " . $output;
+ return $output;
+ }
/**
* Enter description here...
*
@@ -65,52 +57,45 @@ function make_clean_css ($path, $name)
* @param unknown_type $content
* @return unknown
*/
-function write_css_cache ($path, $content)
-{
- if (!is_dir(dirname($path)))
- mkdir(dirname($path));
-
- $cache = new File($path);
- return $cache->write($content);
-}
-
-if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs))
- die('Wrong file name.');
-
-$filename = 'css/'.$regs[1];
-$filepath = CSS.$regs[1];
-$cachepath = CACHE.'css'.DS.str_replace(array('/','\\'), '-', $regs[1]);
-
-if (!file_exists($filepath))
- die('Wrong file name.');
-
-
-if (file_exists($cachepath))
-{
- $templateModified = filemtime($filepath);
- $cacheModified = filemtime($cachepath);
-
- if ($templateModified > $cacheModified)
- {
- $output = make_clean_css ($filepath, $filename);
- write_css_cache ($cachepath, $output);
- }
- else
- {
- $output = file_get_contents($cachepath);
- }
-}
-else
-{
- $output = make_clean_css ($filepath, $filename);
- write_css_cache ($cachepath, $output);
-}
-
-header("Date: ".date("D, j M Y G:i:s ", $templateModified).'GMT');
-header("Content-Type: text/css");
-header("Expires: ".gmdate("D, j M Y H:i:s", time()+DAY)." GMT");
-header("Cache-Control: cache");// HTTP/1.1
-header("Pragma: cache");// HTTP/1.0
-print $output;
-
+ function write_css_cache($path, $content) {
+ if (!is_dir(dirname($path))) {
+ mkdir(dirname($path));
+ }
+ $cache=new File($path);
+ return $cache->write($content);
+ }
+
+ if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) {
+ die('Wrong file name.');
+ }
+
+ $filename = 'css/' . $regs[1];
+ $filepath = CSS . $regs[1];
+ $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]);
+
+ if (!file_exists($filepath)) {
+ die('Wrong file name.');
+ }
+
+ if (file_exists($cachepath)) {
+ $templateModified=filemtime($filepath);
+ $cacheModified =filemtime($cachepath);
+
+ if ($templateModified > $cacheModified) {
+ $output=make_clean_css($filepath, $filename);
+ write_css_cache($cachepath, $output);
+ } else {
+ $output = file_get_contents($cachepath);
+ }
+ } else {
+ $output=make_clean_css($filepath, $filename);
+ write_css_cache($cachepath, $output);
+ }
+
+ header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT');
+ header("Content-Type: text/css");
+ header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT");
+ header("Cache-Control: cache"); // HTTP/1.1
+ header("Pragma: cache"); // HTTP/1.0
+ print $output;
?>
View
140 app/webroot/css/cake.basic.css
@@ -7,7 +7,7 @@ body{
font-family:verdana,helvetica,arial,sans-serif;
font-size:12px;
text-align:center;
-color:#fff;
+color:#fff;
background:#003d4c;
}
@@ -15,16 +15,16 @@ background:#003d4c;
* General Style Info
*/
-a{
+a{
color:#003d4c;
text-decoration:none;
}
-a:hover{
+a:hover{
color:#003d4c;
text-decoration:underline;
}
-a img{
+a img{
border:none;
}
@@ -34,27 +34,27 @@ font-size:28px;
font-weight:normal;
}
h1{
-padding:0.5em 0;
+padding:0.5em 0;
color:#003d4c;
}
em {
font-size: 12px;
}
-h2{
-padding-top:0.15em;
+h2{
+padding-top:0.15em;
margin:0.3em 0;
color:#e32;
}
-h3{
-font-size:18px;
-padding-top:0.5em;
+h3{
+font-size:18px;
+padding-top:0.5em;
color:#003d4c;
}
h4{
color:#ff9966;
-font-size:20px;
+font-size:20px;
padding-top:0.5em;
font-weight:normal;
}
@@ -72,11 +72,11 @@ padding:0 2em;
/*
* Layout
-*/
+*/
-#container{
-text-align:left;
-margin-left:0px;
+#container{
+text-align:left;
+margin-left:0px;
}
#header{
@@ -91,29 +91,29 @@ font-size: 45px;
font-weight:normal;
}
-#header h1.logo {
+#header h1.logo {
float:left;
-}
+}
-#header h1.logo a{
+#header h1.logo a{
display:block;
width:226px;
-height:176px;
-background: transparent url('images/logo.gif') no-repeat top;
+height:176px;
+background: transparent url('images/logo.gif') no-repeat top;
}
#header h1.logo a:hover{
-background:url('images/logo.gif') no-repeat bottom;
+background:url('images/logo.gif') no-repeat bottom;
}
-#content{
+#content{
width: auto;
-min-width: 860px;
+min-width: 860px;
min-height: 720px;
-padding:15px 20px 50px 20px;
+padding:15px 20px 50px 20px;
margin: 0px 10px 0px 40px;
-color:#333;
-background:#fff ;
+color:#333;
+background:#fff ;
border-right: 6px solid #222;
}
@@ -122,11 +122,11 @@ border-right: 6px solid #222;
*/
#navigation{
float:left;
-height: 146px;
+height: 146px;
width:710px;
-background:#003d4c url(images/nav_bg.gif) no-repeat;
+background:#003d4c url(images/nav_bg.gif) no-repeat;
padding-left: 20px;
-}
+}
#navigation ul{
}
@@ -144,55 +144,56 @@ color:#000;
}
#navigation ul li a span{
-display:block;
-margin-right:12px;
-padding:10px 6px 9px 9px;
-}
+display:block;
+margin-right:12px;
+padding:10px 6px 9px 9px;
+}
#navigation ul li.active a span{
-padding:10px 6px 9px 9px;
-}
+padding:10px 6px 9px 9px;
+}
#navigation ul li a:hover, #navigation ul li.active a{
-background:url(images/nav_item_bg.gif) no-repeat bottom right;
-}
+background:url(images/nav_item_bg.gif) no-repeat bottom right;
+}
#navigation ul li a:hover span, #navigation ul li.active a span{
-background:url(images/nav_item_bg.gif) no-repeat bottom left;
-}
-
-#footer {
- color: #fff;
- background-color: #003d4c;
- padding: 4px 10px;
- text-align: right;
-}
-#footer a{
- color: #fff;
-}
-.left {
- float:left;
-}
-.right {
- float:right;
-}
+background:url(images/nav_item_bg.gif) no-repeat bottom left;
+}
+
+#footer {
+ color: #fff;
+ background-color: #003d4c;
+ padding: 4px 10px;
+ text-align: right;
+}
+#footer a{
+ color: #fff;
+}
+.left {
+ float:left;
+}
+.right {
+ float:right;
+}
.clear {
- clear:both;
- height: 0px;
- line-height: 0px;
-}
+ clear:both;
+ height: 0px;
+ line-height: 0px;
+}
+
-
/* tables */
table {
width: 100%;
- border: 1px solid #003d4c;
+ border: 0px;
color:#333;
+ border: 1px solid #ccc;
background-color: #fff;
- clear:both;
+ clear:both;
padding: 0;
margin: 0 0 2em 0;
white-space: normal;
@@ -204,7 +205,7 @@ th {
border-right: 1px solid #003d4c;
border-bottom: 1px solid #003d4c;
text-align: center;
- padding:1px;
+ padding:2px;
}
table tr td {
border-right: 1px solid #ccc;
@@ -225,7 +226,7 @@ div.related {
}
dl {
line-height:2em;
- margin:1em;
+ margin:1em;
float:left;
width: 400px;
}
@@ -256,9 +257,12 @@ dd {
}
-/* action links */
+/* action links */
ul.actions {
- float:left;
- margin-left: 10px;
- width: 200px;
+ float:left;
+ margin-left: 10px;
+ width: 200px;
+}
+li {
+ list-style-image: url("images/arrow.gif");
}
View
2  app/webroot/css/cake.forms.css
@@ -275,5 +275,5 @@ select.autoWidth {
}
option {
- padding-left:1em;
+ padding-left:1em;
}
View
135 app/webroot/index.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -9,106 +8,80 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.webroot
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.webroot
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* Do not change
*/
-if (!defined('DS'))
-{
- define('DS', DIRECTORY_SEPARATOR);
-}
-
+ if (!defined('DS')) {
+ define('DS', DIRECTORY_SEPARATOR);
+ }
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
* Each define has a commented line of code that explains what you would change.
*
*/
-if (!defined('ROOT'))
-{
-//define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
-//You should also use the DS define to seperate your directories
- define('ROOT', dirname(dirname(dirname(__FILE__))));
-}
-
-if (!defined('APP_DIR'))
-{
-//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
- define ('APP_DIR', basename(dirname(dirname(__FILE__))));
-}
-
+ if (!defined('ROOT')) {
+ //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
+ //You should also use the DS define to seperate your directories
+ define('ROOT', dirname(dirname(dirname(__FILE__))));
+ }
+ if (!defined('APP_DIR')) {
+ //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
+ define('APP_DIR', basename(dirname(dirname(__FILE__))));
+ }
/**
* This only needs to be changed if the cake installed libs are located
* outside of the distributed directory structure.
*/
-if (!defined('CAKE_CORE_INCLUDE_PATH'))
-{
-//define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
-//You should also use the DS define to seperate your directories
- define('CAKE_CORE_INCLUDE_PATH', ROOT);
-}
-
-
+ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
+ //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
+ //You should also use the DS define to seperate your directories
+ define('CAKE_CORE_INCLUDE_PATH', ROOT);
+ }
///////////////////////////////
//DO NOT EDIT BELOW THIS LINE//
///////////////////////////////
-
-if (!defined('WEBROOT_DIR'))
-{
- define ('WEBROOT_DIR', basename(dirname(__FILE__)));
-}
-
-if (!defined('WWW_ROOT'))
-{
- define('WWW_ROOT', dirname(__FILE__).DS);
-}
-
-if(!defined('CORE_PATH'))
-{
- if(function_exists('ini_set'))
- {
- ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.CAKE_CORE_INCLUDE_PATH.PATH_SEPARATOR.ROOT.DS.APP_DIR.DS);
- define('APP_PATH', null);
- define('CORE_PATH', null);
- }
- else
- {
- define('APP_PATH', ROOT.DS.APP_DIR.DS);
- define('CORE_PATH', CAKE_CORE_INCLUDE_PATH.DS);
- }
-}
-
-require CORE_PATH.'cake'.DS.'bootstrap.php';
-
-if(isset($_GET['url']) && $_GET['url'] === 'favicon.ico')
-{
-}
-else
-{
- $Dispatcher= new Dispatcher ();
- $Dispatcher->dispatch($url);
-}
-
-if (DEBUG)
-{
- echo "<!-- ". round(getMicrotime() - $TIME_START, 4) ."s -->";
-}
+ if (!defined('WEBROOT_DIR')) {
+ define('WEBROOT_DIR', basename(dirname(__FILE__)));
+ }
+ if (!defined('WWW_ROOT')) {
+ define('WWW_ROOT', dirname(__FILE__) . DS);
+ }
+ if (!defined('CORE_PATH')) {
+ if (function_exists('ini_set')) {
+ ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS);
+ define('APP_PATH', null);
+ define('CORE_PATH', null);
+ } else {
+ define('APP_PATH', ROOT . DS . APP_DIR . DS);
+ define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
+ }
+ }
+ require CORE_PATH . 'cake' . DS . 'bootstrap.php';
+ if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
+ } else {
+ $Dispatcher=new Dispatcher();
+ $Dispatcher->dispatch($url);
+ }
+ if (DEBUG) {
+ echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
+ }
?>
View
34 app/webroot/js/vendors.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -10,31 +9,28 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.app.webroot.js
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.app.webroot.js
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* Enter description here...
*/
-if(is_file('../../vendors/javascript/'.$_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file'])))
-{
- readfile('../../vendors/javascript/'.$_GET['file']);
-}
-
+ if (is_file('../../vendors/javascript/' . $_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file']))) {
+ readfile('../../vendors/javascript/' . $_GET['file']);
+ }
?>
View
34 cake/app_controller.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Short description for file.
*
@@ -10,35 +9,34 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.cake
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.cake
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
- * Short description for class.
+ * This is a placeholder class.
+ * Create the same file in app/app_controller.php
*
* Add your application-wide methods in the class below, your controllers
* will inherit them.
*
- * @package cake
- * @subpackage cake.cake
+ * @package cake
+ * @subpackage cake.cake
*/
class AppController extends Controller {
}
-
?>
View
38 cake/app_model.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Application model for Cake.
*
@@ -10,35 +9,34 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.cake
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.cake
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
/**
* Application model for Cake.
*
- * Add your application-wide methods in the class below, your models
- * will inherit them.
+ * This is a placeholder class.
+ * Create the same file in app/app_model.php
+ * Add your application-wide methods to the class, your models will inherit them.
*
- * @package cake
- * @subpackage cake.cake
+ * @package cake
+ * @subpackage cake.cake
*/
-class AppModel extends Model {
+class AppModel extends Model{
}
-
?>
View
1,571 cake/basics.php
@@ -1,6 +1,5 @@
<?php
/* SVN FILE: $Id$ */
-
/**
* Basic Cake functionality.
*
@@ -9,280 +8,218 @@
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright (c) 2006, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
+ * Copyright (c) 2006, 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 (c) 2006, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
- * @package cake
- * @subpackage cake.cake
- * @since CakePHP v 0.2.9
- * @version $Revision$
- * @modifiedby $LastChangedBy$
- * @lastmodified $Date$
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
+ * @package cake
+ * @subpackage cake.cake
+ * @since CakePHP v 0.2.9
+ * @version $Revision$
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-
-
/**
* Basic defines for timing functions.
*/
-define('SECOND', 1);
-define('MINUTE', 60 * SECOND);
-define('HOUR', 60 * MINUTE);
-define('DAY', 24 * HOUR);
-define('WEEK', 7 * DAY);
-define('MONTH', 30 * DAY);
-define('YEAR', 365 * DAY);
-
+ define('SECOND', 1);
+ define('MINUTE', 60 * SECOND);
+ define('HOUR', 60 * MINUTE);
+ define('DAY', 24 * HOUR);
+ define('WEEK', 7 * DAY);
+ define('MONTH', 30 * DAY);
+ define('YEAR', 365 * DAY);
/**
* Patch for PHP < 4.3
*/
-if (!function_exists("ob_get_clean"))
-{
- function ob_get_clean()
- {
- $ob_contents = ob_get_contents();
- ob_end_clean();
- return $ob_contents;
- }
-}
-
+ if (!function_exists("ob_get_clean")) {
+ function ob_get_clean() {
+ $ob_contents = ob_get_contents();
+ ob_end_clean();
+ return $ob_contents;
+ }
+ }
/**
* Loads all models.
*/
-function loadModels()
-{
- $path = Configure::getInstance();
- if(!class_exists('AppModel'))
- {
- if(file_exists(APP.'app_model.php'))
- {
- require(APP.'app_model.php');
- }
- else
- {
- require(CAKE.'app_model.php');
- }
- }
- if (phpversion() < 5 && function_exists("overload"))
- {
- overload('AppModel');
- }
- $loadedModels = array();
- foreach ($path->modelPaths as $path)
- {
- foreach (listClasses($path) as $model_fn)
- {
- if (!key_exists($model_fn, $loadedModels))
- {
- require ($path.$model_fn);
- if (phpversion() < 5 && function_exists("overload"))
- {
- list($name) = explode('.', $model_fn);
- overload(Inflector::camelize($name));
- }
- $loadedModels[$model_fn] = $model_fn;
- }
- }
- }
-}
-
+ function loadModels() {
+ $path = Configure::getInstance();
+ if (!class_exists('AppModel')) {
+ if (file_exists(APP . 'app_model.php')) {
+ require(APP . 'app_model.php');
+ } else {
+ require(CAKE . 'app_model.php');
+ }
+ }
+
+ if (phpversion() < 5 && function_exists("overload")) {
+ overload('AppModel');
+ }
+ $loadedModels = array();
+
+ foreach($path->modelPaths as $path) {
+ foreach(listClasses($path)as $model_fn) {
+ if (!key_exists($model_fn, $loadedModels)) {
+ require($path . $model_fn);
+
+ if (phpversion() < 5 && function_exists("overload")) {
+ list($name) = explode('.', $model_fn);
+ overload(Inflector::camelize($name));
+ }
+ $loadedModels[$model_fn] = $model_fn;
+ }
+ }
+ }
+ }
/**
* Loads a loadPluginController.
*
* @param string $plugin Name of plugin
* @return
*/
-function loadPluginModels ($plugin)
-{
- $pluginAppModel = Inflector::camelize($plugin.'_app_model');
- $pluginAppModelFile = APP.'plugins'.DS.$plugin.DS.$plugin.'_app_model.php';
-
- if(!class_exists($pluginAppModel))
- {
- if(file_exists($pluginAppModelFile))
- {
- require($pluginAppModelFile);
- }
- else
- {
- die('Plugins must have a class named '. $pluginAppModel);
- }
- }
-
- if (phpversion() < 5 && function_exists("overload"))
- {
- overload($pluginAppModel);
- }
-
- $pluginModelDir = APP.'plugins'.DS.$plugin.DS.'models'.DS;
-
- foreach (listClasses($pluginModelDir) as $modelFileName)
- {
- require ($pluginModelDir.$modelFileName);
- if (phpversion() < 5 && function_exists("overload"))
- {
- list($name) = explode('.', $modelFileName);
- overload(Inflector::camelize($name));
- }
- }
-}
-
+ function loadPluginModels($plugin) {
+ $pluginAppModel = Inflector::camelize($plugin . '_app_model');
+ $pluginAppModelFile = APP . 'plugins' . DS . $plugin . DS . $plugin . '_app_model.php';
+ if (!class_exists($pluginAppModel)) {
+ if (file_exists($pluginAppModelFile)) {
+ require($pluginAppModelFile);
+ } else {
+ die('Plugins must have a class named ' . $pluginAppModel);
+ }
+ }
+
+ if (phpversion() < 5 && function_exists("overload")) {
+ overload($pluginAppModel);
+ }
+ $pluginModelDir = APP . 'plugins' . DS . $plugin . DS . 'models' . DS;
+
+ foreach(listClasses($pluginModelDir)as $modelFileName) {
+ require($pluginModelDir . $modelFileName);
+
+ if (phpversion() < 5 && function_exists("overload")) {
+ list($name) = explode('.', $modelFileName);
+ overload(Inflector::camelize($name));
+ }
+ }
+ }
/**
* Loads custom view class.
*
*/
-function loadView ($viewClass)
-{
- if(!class_exists($viewClass))
- {
- $paths = Configure::getInstance();
- $file = Inflector::underscore($viewClass).'.php';
- foreach ($paths->viewPaths as $path)
- {
- if(file_exists($path.$file))
- {
- return require($path.$file);
- }
- }
- if(file_exists(LIBS.'view'.DS.$file))
- {
- return require(LIBS.'view'.DS.$file);
- }
- else
- {
- return false;
- }
- }
-}
+ function loadView($viewClass) {
+ if (!class_exists($viewClass . 'View')) {
+ $paths = Configure::getInstance();
+ $file = Inflector::underscore($viewClass) . '.php';
+
+ foreach($paths->viewPaths as $path) {
+ if (file_exists($path . $file)) {
+ return require($path . $file);
+ }
+ }
+ if (file_exists(LIBS . 'view' . DS . $file)) {
+ return require(LIBS . 'view' . DS . $file);
+ } else {
+ return false;
+ }
+ }
+ }
/**
* Loads a model by CamelCase name.
*/
-function loadModel($name)
-{
- $name = Inflector::underscore($name);
- $paths = Configure::getInstance();
-
- if(!class_exists('AppModel'))
- {
- if(file_exists(APP.'app_model.php'))
- {
- require(APP.'app_model.php');
- }
- else
- {
- require(CAKE.'app_model.php');
- }
- }
-
- foreach ($paths->modelPaths as $path)
- {
- if(file_exists($path.$name.'.php'))
- {
- require ($path.$name.'.php');
- return true;
- }
- }
-
- return false;
-}
-
+ function loadModel($name) {
+ $name = Inflector::underscore($name);
+ $paths = Configure::getInstance();
+ if (!class_exists('AppModel')) {
+ if (file_exists(APP . 'app_model.php')) {
+ require(APP . 'app_model.php');
+ } else {
+ require(CAKE . 'app_model.php');
+ }
+ }
+
+ foreach($paths->modelPaths as $path) {
+ if (file_exists($path . $name . '.php')) {
+ require($path . $name . '.php');
+ return true;
+ }
+ }
+ return false;
+ }
/**
* Loads all controllers.
*/
-function loadControllers ()
-{
- $paths = Configure::getInstance();
- if(!class_exists('AppController'))
- {
- if(file_exists(APP.'app_controller.php'))
- {
- require(APP.'app_controller.php');
- }
- else
- {
- require(CAKE.'app_controller.php');
- }
- }
- $loadedControllers = array();
- foreach ($paths->controllerPaths as $path)
- {
- foreach (listClasses($path) as $controller)
- {
- if(file_exists($path.$controller.'.php'))
- {
- if (!key_exists($controller, $loadedControllers))
- {
- require ($path.$controller.'.php');
- $loadedControllers[$controller] = $controller;
- }
- }
- }
- }
-}
-
+ function loadControllers() {
+ $paths = Configure::getInstance();
+ if (!class_exists('AppController')) {
+ if (file_exists(APP . 'app_controller.php')) {
+ require(APP . 'app_controller.php');
+ } else {
+ require(CAKE . 'app_controller.php');
+ }
+ }
+ $loadedControllers=array();
+
+ foreach($paths->controllerPaths as $path) {
+ foreach(listClasses($path)as $controller) {
+ if (file_exists($path . $controller . '.php')) {
+ if (!key_exists($controller, $loadedControllers)) {
+ require($path . $controller . '.php');
+ $loadedControllers[$controller]=$controller;
+ }
+ }
+ }
+ }
+ }
/**
* Loads a controller and its helper libraries.
*
* @param string $name Name of controller
* @return boolean Success
*/
-function loadController ($name)
-{
- $paths = Configure::getInstance();
- if(!class_exists('AppController'))
- {
- if(file_exists(APP.'app_controller.php'))
- {
- require(APP.'app_controller.php');
- }
- else
- {
- require(CAKE.'app_controller.php');
- }
- }
- if($name === null)
- {
- return true;
- }
-
- if(!class_exists($name.'Controller'))
- {
- $name = Inflector::underscore($name);
- foreach ($paths->controllerPaths as $path)
- {
- if(file_exists($path.$name.'_controller.php'))
- {
- require($path.$name.'_controller.php');
- return true;
- }
- }
- if($controller_fn = fileExistsInPath(LIBS.'controller'.DS.$name.'_controller.php'))
- {
- if(file_exists($controller_fn))
- {
- require($controller_fn);
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- else
- {
- return true;
- }
-}
-
+ function loadController($name) {
+ $paths = Configure::getInstance();
+ if (!class_exists('AppController')) {
+ if (file_exists(APP . 'app_controller.php')) {
+ require(APP . 'app_controller.php');
+ } else {
+ require(CAKE . 'app_controller.php');
+ }
+ }
+
+ if ($name === null) {
+ return true;
+ }
+
+ if (!class_exists($name . 'Controller')) {
+ $name=Inflector::underscore($name);
+
+ foreach($paths->controllerPaths as $path) {
+ if (file_exists($path . $name . '_controller.php')) {
+ require($path . $name . '_controller.php');
+ return true;
+ }
+ }
+
+ if ($controller_fn = fileExistsInPath(LIBS . 'controller' . DS . $name . '_controller.php')) {
+ if (file_exists($controller_fn)) {
+ require($controller_fn);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ } else {
+ return true;
+ }
+ }
/**
* Loads a loadPluginController.
*
@@ -290,109 +227,81 @@ function loadController ($name)
* @param string $controller Name of controller to load
* @return boolean Success
*/
-function loadPluginController ($plugin, $controller)
-{
-
- $pluginAppController = Inflector::camelize($plugin.'_app_controller');
- $pluginAppControllerFile = APP.'plugins'.DS.$plugin.DS.$plugin.'_app_controller.php';
-
- if(!class_exists($pluginAppController))
- {
- if(file_exists($pluginAppControllerFile))
- {
- require($pluginAppControllerFile);
- }
- else
- {
- return false;
- }
- }
-
- if(empty($controller))
- {
- if(file_exists(APP.'plugins'.DS.$plugin.DS.'controllers'.DS.$plugin.'_controller.php'))
- {
- require(APP.'plugins'.DS.$plugin.DS.'controllers'.DS.$plugin.'_controller.php');
- return true;
- }
- }
-
- if(!class_exists($controller.'Controller'))
- {
- $controller = Inflector::underscore($controller);
- $file = APP.'plugins'.DS.$plugin.DS.'controllers'.DS.$controller.'_controller.php';
- if(file_exists($file))
- {
- require($file);
- return true;
- }
- elseif(file_exists(APP.'plugins'.DS.$plugin.DS.'controllers'.DS.$plugin.'_controller.php'))
- {
- require(APP.'plugins'.DS.$plugin.DS.'controllers'.DS.$plugin.'_controller.php');
- return true;
- }
- else
- {
- return false;
- }
- }
-}
-
+ function loadPluginController($plugin, $controller) {
+ $pluginAppController = Inflector::camelize($plugin . '_app_controller');
+ $pluginAppControllerFile = APP . 'plugins' . DS . $plugin . DS . $plugin . '_app_controller.php';
+ if (!class_exists($pluginAppController)) {
+ if (file_exists($pluginAppControllerFile)) {
+ require($pluginAppControllerFile);
+ } else {
+ return false;
+ }
+ }
+
+ if (empty($controller)) {
+ if (file_exists(APP . 'plugins' . DS . $plugin . DS . 'controllers' . DS . $plugin . '_controller.php')) {
+ require(APP . 'plugins' . DS . $plugin . DS . 'controllers' . DS . $plugin . '_controller.php');
+ return true;
+ }
+ }
+
+ if (!class_exists($controller . 'Controller')) {
+ $controller = Inflector::underscore($controller);
+ $file = APP . 'plugins' . DS . $plugin . DS . 'controllers' . DS . $controller . '_controller.php';
+
+ if (file_exists($file)) {
+ require($file);
+ return true;
+ } elseif (file_exists(APP . 'plugins' . DS . $plugin . DS . 'controllers' . DS . $plugin . '_controller.php'))
+ {
+ require(APP . 'plugins' . DS . $plugin . DS . 'controllers' . DS . $plugin . '_controller.php');
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
/**
* Returns an array of filenames of PHP files in given directory.
*
* @param string $path Path to scan for files
* @return array List of files in directory