mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
Merge branch '1.3-misc' into 1.3-router
Conflicts: cake/libs/router.php
This commit is contained in:
commit
35fac165b3
527 changed files with 5303 additions and 5826 deletions
|
@ -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
|
||||
|
|
|
@ -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/'),
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -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';
|
||||
?>
|
0
app/views/layouts/email/text/empty
Normal file
0
app/views/layouts/email/text/empty
Normal file
|
@ -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');
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
* {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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/}
|
||||
|
|
|
@ -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)
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
@ -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] . ';')) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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'])) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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>");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
<?php echo $xml->header(); ?>
|
||||
<?php echo $content_for_layout; ?>
|
|
@ -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 {
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -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 '',
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
?>
|
0
cake/console/templates/skel/libs/empty
Normal file
0
cake/console/templates/skel/libs/empty
Normal file
|
@ -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
|
||||
|
|
|
@ -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; ?>
|
|
@ -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; ?>
|
|
@ -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)
|
||||
);
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
?>
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -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'])) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
16
cake/libs/cache/apc.php
vendored
16
cake/libs/cache/apc.php
vendored
|
@ -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)
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
27
cake/libs/cache/file.php
vendored
27
cake/libs/cache/file.php
vendored
|
@ -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
|
||||
|
|
33
cake/libs/cache/memcache.php
vendored
33
cake/libs/cache/memcache.php
vendored
|
@ -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;
|
||||
}
|
||||
|
|
28
cake/libs/cache/xcache.php
vendored
28
cake/libs/cache/xcache.php
vendored
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue