2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-08-21 06:49:02 +00:00
|
|
|
/* SVN FILE: $Id$ */
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
2005-08-21 06:49:02 +00:00
|
|
|
* Short description for file.
|
2006-01-12 02:10:47 +00:00
|
|
|
*
|
2005-08-21 06:49:02 +00:00
|
|
|
* In this file you set paths to different directories used by Cake.
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
|
|
|
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
2006-01-20 07:46:14 +00:00
|
|
|
* Copyright (c) 2006, Cake Software Foundation, Inc.
|
2005-12-23 21:57:26 +00:00
|
|
|
* 1785 E. Sahara Avenue, Suite 490-204
|
|
|
|
* Las Vegas, Nevada 89104
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2006-01-12 02:10:47 +00:00
|
|
|
* @filesource
|
2006-01-20 07:46:14 +00:00
|
|
|
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
|
2005-12-23 21:57:26 +00:00
|
|
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
|
2005-08-21 06:49:02 +00:00
|
|
|
* @package cake
|
2005-10-09 01:56:21 +00:00
|
|
|
* @subpackage cake.cake.app.config
|
2005-08-21 06:49:02 +00:00
|
|
|
* @since CakePHP v 0.2.9
|
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
2005-06-30 02:09:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If the index.php file is used instead of an .htaccess file
|
|
|
|
* or if the user can not set the web root to use the public
|
|
|
|
* directory we will define ROOT there, otherwise we set it
|
|
|
|
* here.
|
|
|
|
*/
|
|
|
|
if(!defined('ROOT'))
|
|
|
|
{
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('ROOT', '../');
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!defined('WEBROOT_DIR'))
|
|
|
|
{
|
|
|
|
define ('WEBROOT_DIR', 'webroot');
|
2005-06-30 02:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('CAKE', ROOT.'cake'.DS);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's directory.
|
|
|
|
*/
|
|
|
|
define ('APP', ROOT.APP_DIR.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's models directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('MODELS', APP.'models'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's controllers directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('CONTROLLERS', APP.'controllers'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
2005-10-09 01:56:21 +00:00
|
|
|
/**
|
|
|
|
* Path to the application's controllers directory.
|
|
|
|
*/
|
|
|
|
define ('COMPONENTS', CONTROLLERS.'components'.DS);
|
|
|
|
|
2005-06-30 02:09:47 +00:00
|
|
|
/**
|
2005-10-03 04:48:00 +00:00
|
|
|
* Path to the application's views directory.
|
2005-06-30 02:09:47 +00:00
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('VIEWS', APP.'views'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
2005-10-03 04:48:00 +00:00
|
|
|
* Path to the application's helpers directory.
|
2005-06-30 02:09:47 +00:00
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('HELPERS', VIEWS.'helpers'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's view's layouts directory.
|
|
|
|
*/
|
2005-10-09 01:56:21 +00:00
|
|
|
define ('LAYOUTS', VIEWS.'layouts'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the application's view's elements directory.
|
|
|
|
* It's supposed to hold pieces of PHP/HTML that are used on multiple pages
|
|
|
|
* and are not linked to a particular layout (like polls, footers and so on).
|
|
|
|
*/
|
2005-10-09 01:56:21 +00:00
|
|
|
define ('ELEMENTS', VIEWS.'elements'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the configuration files directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('CONFIGS', APP.'config'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
2005-10-18 22:27:39 +00:00
|
|
|
/**
|
|
|
|
* Path to the libs directory.
|
|
|
|
*/
|
|
|
|
define ('INFLECTIONS', CAKE.'config'.DS.'inflections'.DS);
|
|
|
|
|
2005-06-30 02:09:47 +00:00
|
|
|
/**
|
|
|
|
* Path to the libs directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('LIBS', CAKE.'libs'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the logs directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('LOGS', ROOT.'logs'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the modules directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('MODULES', ROOT.'modules'.DS);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the public directory.
|
|
|
|
*/
|
|
|
|
define ('WWW_ROOT', APP.WEBROOT_DIR.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the public directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('CSS', WWW_ROOT.'css'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the public directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('JS', WWW_ROOT.'js'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the scripts direcotry.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define('SCRIPTS', CAKE.'scripts'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the tests directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('TESTS', ROOT.'tests'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the controller test directory.
|
|
|
|
*/
|
2005-12-24 07:56:48 +00:00
|
|
|
define ('CONTROLLER_TESTS',TESTS.APP_DIR.DS.'controllers'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the helpers test directory.
|
|
|
|
*/
|
2005-12-24 07:56:48 +00:00
|
|
|
define ('HELPER_TESTS', TESTS.APP_DIR.DS.'helpers'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the models' test directory.
|
|
|
|
*/
|
2005-12-24 07:56:48 +00:00
|
|
|
define ('MODEL_TESTS', TESTS.APP_DIR.DS.'models'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the lib test directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('LIB_TESTS', TESTS.'libs'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the temporary files directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('TMP', ROOT.'tmp'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the cache files directory. It can be shared between hosts in a multi-server setup.
|
|
|
|
*/
|
|
|
|
define('CACHE', TMP.'cache'.DS);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the vendors directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('VENDORS', ROOT.'vendors'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Path to the Pear directory
|
|
|
|
* The purporse is to make it easy porting Pear libs into Cake
|
|
|
|
* without setting the include_path PHP variable.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('PEAR', VENDORS.'Pear'.DS);
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Full url prefix
|
|
|
|
*/
|
[1285]
Author: phpnut
Date: 10:09:03 PM, Monday, October 31, 2005
Message:
Removed references in the Session class
[1283]
Author: phpnut
Date: 8:47:37 PM, Monday, October 31, 2005
Message:
Added fix to the Controller::constructClassess().
The database should have an instance available if a component will use it.
[1282]
Author: phpnut
Date: 8:36:07 PM, Monday, October 31, 2005
Message:
Updated the Model association methods to correct and error I introduced when reactoring last week.
Added a return from each of the settings in Security::inactiveMins(); This class is not fully implemented.
Updated scaffold and dipatcher with changes to the session class.
Fixed problem with session not working properly.
Added a regenrate id for sessions.
When CAKE_SECURITY is set to high this will regenrate a new session key on each request.
The old session file will be removed from the file system. This is a added security measure.
[1270]
Author: phpnut
Date: 1:55:28 PM, Sunday, October 30, 2005
Message:
Updated Session class to regenrate a new session key on each request when security level set to high.
Updated doc comments in some classes
[1269]
Author: phpnut
Date: 9:49:43 AM, Sunday, October 30, 2005
Message:
Added a fix for Ticket #105
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1286 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-11-01 04:20:28 +00:00
|
|
|
$s = null;
|
2006-01-12 02:10:47 +00:00
|
|
|
$https = env('HTTPS');
|
|
|
|
if ( (isset($https) && $https =='on' ))
|
|
|
|
{
|
[1285]
Author: phpnut
Date: 10:09:03 PM, Monday, October 31, 2005
Message:
Removed references in the Session class
[1283]
Author: phpnut
Date: 8:47:37 PM, Monday, October 31, 2005
Message:
Added fix to the Controller::constructClassess().
The database should have an instance available if a component will use it.
[1282]
Author: phpnut
Date: 8:36:07 PM, Monday, October 31, 2005
Message:
Updated the Model association methods to correct and error I introduced when reactoring last week.
Added a return from each of the settings in Security::inactiveMins(); This class is not fully implemented.
Updated scaffold and dipatcher with changes to the session class.
Fixed problem with session not working properly.
Added a regenrate id for sessions.
When CAKE_SECURITY is set to high this will regenrate a new session key on each request.
The old session file will be removed from the file system. This is a added security measure.
[1270]
Author: phpnut
Date: 1:55:28 PM, Sunday, October 30, 2005
Message:
Updated Session class to regenrate a new session key on each request when security level set to high.
Updated doc comments in some classes
[1269]
Author: phpnut
Date: 9:49:43 AM, Sunday, October 30, 2005
Message:
Added a fix for Ticket #105
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1286 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-11-01 04:20:28 +00:00
|
|
|
$s ='s';
|
|
|
|
}
|
2006-01-12 02:10:47 +00:00
|
|
|
unset($https);
|
|
|
|
|
|
|
|
$httpHost = env('HTTP_HOST');
|
|
|
|
if (isset($httpHost))
|
2005-12-24 07:56:48 +00:00
|
|
|
{
|
2006-01-12 02:10:47 +00:00
|
|
|
define('FULL_BASE_URL', 'http'.$s.'://'.$httpHost);
|
2005-12-24 07:56:48 +00:00
|
|
|
}
|
2006-01-12 02:10:47 +00:00
|
|
|
unset($httpHost);
|
2005-06-30 02:09:47 +00:00
|
|
|
/**
|
|
|
|
* Web path to the public images directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('IMAGES_URL', 'img/');
|
2005-06-30 02:09:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Web path to the CSS files directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('CSS_URL', 'css/');
|
2005-06-30 02:09:47 +00:00
|
|
|
|
2005-09-18 18:58:45 +00:00
|
|
|
/**
|
|
|
|
* Web path to the js files directory.
|
|
|
|
*/
|
2005-10-03 04:48:00 +00:00
|
|
|
define ('JS_URL', 'js/');
|
|
|
|
|
2005-09-18 18:58:45 +00:00
|
|
|
|
2005-09-19 17:20:24 +00:00
|
|
|
?>
|