Fixing paths erros in new bash and CLI scripts.

Updated missing files and directories in skel.
Corrected paths for app custom scaffold templates

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5031 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-06 03:12:23 +00:00
parent c803acea56
commit 44f611cba7
10 changed files with 230 additions and 131 deletions

View file

@ -396,10 +396,7 @@ class ConsoleDispatcher {
$app = $this->params['app']; $app = $this->params['app'];
} }
} }
$this->params['working'] = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . $app;
if(strpos($this->params['working'], 'scripts')) {
$this->params['working'] = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . $app;
}
} }
/** /**
* Removes first argument and shifts other arguments up * Removes first argument and shifts other arguments up

View file

@ -662,7 +662,7 @@ class BakeScript extends CakeScript {
$controllerPath = low(Inflector::underscore($controllerName)); $controllerPath = low(Inflector::underscore($controllerName));
$doItInteractive = $this->in("Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite {$controllerClassName} views if it exist.", array('y','n'), 'y'); $doItInteractive = $this->in("Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite {$controllerName} views if it exist.", array('y','n'), 'y');
if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') { if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') {
$this->interactive = true; $this->interactive = true;
@ -676,7 +676,6 @@ class BakeScript extends CakeScript {
} }
if ((low($wannaDoAdmin) == 'y' || low($wannaDoAdmin) == 'yes')) { if ((low($wannaDoAdmin) == 'y' || low($wannaDoAdmin) == 'yes')) {
require(CONFIGS.'core.php');
if(defined('CAKE_ADMIN')) { if(defined('CAKE_ADMIN')) {
$admin = CAKE_ADMIN . '_'; $admin = CAKE_ADMIN . '_';
$admin_url = '/'.CAKE_ADMIN; $admin_url = '/'.CAKE_ADMIN;
@ -1017,6 +1016,7 @@ class BakeScript extends CakeScript {
* @param array $fields * @param array $fields
*/ */
function inputs($fields = array()) { function inputs($fields = array()) {
$displayFields = null;
foreach($fields as $name => $options) { foreach($fields as $name => $options) {
if(isset($options['tagName'])){ if(isset($options['tagName'])){
@ -1113,7 +1113,7 @@ class BakeScript extends CakeScript {
$controllerPath = low(Inflector::underscore($controllerName)); $controllerPath = low(Inflector::underscore($controllerName));
$doItInteractive = $this->in("Would you like bake to build your controller interactively?\nWarning: Choosing no will overwrite {$controllerClassName} controller if it exist.", array('y','n'), 'y'); $doItInteractive = $this->in("Would you like bake to build your controller interactively?\nWarning: Choosing no will overwrite {$controllerName} controller if it exist.", array('y','n'), 'y');
if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') { if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') {
$this->interactive = true; $this->interactive = true;
@ -1165,7 +1165,6 @@ class BakeScript extends CakeScript {
$admin = null; $admin = null;
$admin_url = null; $admin_url = null;
if ((low($wannaDoAdmin) == 'y' || low($wannaDoAdmin) == 'yes')) { if ((low($wannaDoAdmin) == 'y' || low($wannaDoAdmin) == 'yes')) {
require(CONFIGS.'core.php');
if(defined('CAKE_ADMIN')) { if(defined('CAKE_ADMIN')) {
$admin = CAKE_ADMIN.'_'; $admin = CAKE_ADMIN.'_';
$admin_url = '/'.CAKE_ADMIN; $admin_url = '/'.CAKE_ADMIN;
@ -1994,7 +1993,7 @@ class BakeScript extends CakeScript {
*/ */
function __defaultHome($dir, $app) { function __defaultHome($dir, $app) {
$path = $dir.DS.'views'.DS.'pages'.DS; $path = $dir.DS.'views'.DS.'pages'.DS;
include(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'scripts'.DS.'templates'.DS.'views'.DS.'home.ctp'); include(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'libs'.DS.'templates'.DS.'views'.DS.'home.ctp');
$this->createFile($path.'home.ctp', $output); $this->createFile($path.'home.ctp', $output);
} }
/** /**

View file

@ -8,22 +8,22 @@
; * ; *
; * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> ; * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
; * Copyright 2005-2007, Cake Software Foundation, Inc. ; * Copyright 2005-2007, Cake Software Foundation, Inc.
; * 1785 E. Sahara Avenue, Suite 490-204 ; * 1785 E. Sahara Avenue, Suite 490-204
; * Las Vegas, Nevada 89104 ; * Las Vegas, Nevada 89104
; * ; *
; * Licensed under The MIT License ; * Licensed under The MIT License
; * Redistributions of files must retain the above copyright notice. ; * Redistributions of files must retain the above copyright notice.
; * ; *
; * @filesource ; * @filesource
; * @copyright Copyright 2005-2007, Cake Software Foundation, Inc. ; * @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project ; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
; * @package cake ; * @package cake
; * @subpackage cake.app.config ; * @subpackage cake.app.config
; * @since CakePHP(tm) v 0.10.0.1076 ; * @since CakePHP(tm) v 0.10.0.1076
; * @version $Revision$ ; * @version $Revision$
; * @modifiedby $LastChangedBy$ ; * @modifiedby $LastChangedBy$
; * @lastmodified $Date$ ; * @lastmodified $Date$
; * @license http://www.opensource.org/licenses/mit-license.php The MIT License ; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
; */ ; */
; acl.ini.php - Cake ACL Configuration ; acl.ini.php - Cake ACL Configuration

View file

@ -27,117 +27,177 @@
* @license http://www.opensource.org/licenses/mit-license.php The MIT License * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/ */
/** /**
* If you do not have mod rewrite on your system * To configure CakePHP *not* to use mod_rewrite and to
* or if you prefer to use CakePHP pretty urls. * use CakePHP pretty URLs, remove these .htaccess
* uncomment the line below. * files:
* Note: If you do have mod rewrite but prefer the *
* CakePHP pretty urls, you also have to remove the * /.htaccess
* .htaccess files * /app/.htaccess
* release/.htaccess * /app/webroot/.htaccess
* release/app/.htaccess *
* release/app/webroot/.htaccess * And uncomment the define below:
*/ */
// define ('BASE_URL', env('SCRIPT_NAME')); // define ('BASE_URL', env('SCRIPT_NAME'));
/** /**
* Set debug level here: * CakePHP Debug Level:
* - 0: production
* - 1: development
* - 2: full debug with sql
* - 3: full debug with sql and dump of the current object
* *
* In production, the "flash messages" redirect after a time interval. * Production Mode:
* With the other debug levels you get to click the "flash message" to continue. * 0: No error messages, errors, or warnings shown. Flash messages redirect.
* *
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
* 3: As in 2, but also with full controller dump.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/ */
define('DEBUG', 2); define('DEBUG', 2);
/** /**
* Turn of caching checking wide. * Turn off or enable cache checking application-wide.
* You must still use the controller var cacheAction inside you controller class. *
* You can either set it controller wide, or in each controller method. * If set to true, you must still use the controller var $cacheAction inside
* use var $cacheAction = true; or in the controller method $this->cacheAction = true; * your controllers to define caching settings. You can either set it
* controller-wide by setting var $cacheAction = true, or in each action
* using $this->cacheAction = true.
*/ */
define('CACHE_CHECK', false); define('CACHE_CHECK', false);
/** /**
* Error constant. Used for differentiating error logging and debugging. * Defines the default error type when using the log() function. Used for
* Currently PHP supports LOG_DEBUG * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/ */
define('LOG_ERROR', 2); define('LOG_ERROR', 2);
/** /**
* CakePHP includes 3 types of session saves * The preferred session handling method. Valid values:
* database or file. Set this to your preferred method.
* If you want to use your own save handler place it in
* app/config/name.php DO NOT USE file or database as the name.
* and use just the name portion below.
* *
* Setting this to cake will save files to /cakedistro/tmp directory * 'php' Uses settings defined in your php.ini.
* Setting it to php will use the php default save path * 'cake' Saves session files in CakePHP's /tmp directory.
* Setting it to database will use the database * 'database' Uses CakePHP's database sessions.
*
* To define a custom session handler, save it at /app/config/<name>.php.
* Set the value of CAKE_SESSION_SAVE to <name> to utilize it in CakePHP.
*
* To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
* *
*/ */
define('CAKE_SESSION_SAVE', 'php'); define('CAKE_SESSION_SAVE', 'php');
/** /**
* If using you own table name for storing sessions * The name of the table used to store CakePHP database sessions.
* set the table name here.
* DO NOT INCLUDE PREFIX IF YOU HAVE SET ONE IN database.php
* *
* CAKE_SESSION_SAVE must be set to 'database' in order to utilize this constant.
*
* The table name set here should *not* include any table prefix defined elsewhere.
*/ */
define('CAKE_SESSION_TABLE', 'cake_sessions'); define('CAKE_SESSION_TABLE', 'cake_sessions');
/** /**
* Set a random string of used in session. * A random string used in session management.
*
*/ */
define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/** /**
* Set the name of session cookie * The name of CakePHP's session cookie.
*
*/ */
define('CAKE_SESSION_COOKIE', 'CAKEPHP'); define('CAKE_SESSION_COOKIE', 'CAKEPHP');
/** /**
* Set level of Cake security. * The level of CakePHP session security. The session timeout time defined
* in CAKE_SESSION_TIMEOUT is multiplied according to the settings here.
* Valid values:
* *
* 'high' Session timeout in CAKE_SESSION_TIMEOUT x 10
* 'medium' Session timeout in CAKE_SESSION_TIMEOUT x 100
* 'low' Session timeout in CAKE_SESSION_TIMEOUT x 300
*
* CakePHP session IDs are also regenerated between requests if
* CAKE_SECURITY is set to 'high'.
*/ */
define('CAKE_SECURITY', 'high'); define('CAKE_SECURITY', 'high');
/** /**
* Set Cake Session time out. * Session time out time (in seconds).
* If CAKE_SECURITY define is set * Actual value depends on CAKE_SECURITY setting.
* high: multiplied by 10
* medium: is multiplied by 100
* low is: multiplied by 300
*
* Number below is seconds.
*/ */
define('CAKE_SESSION_TIMEOUT', '120'); define('CAKE_SESSION_TIMEOUT', '120');
/** /**
* Uncomment the define below to use cake built in admin routes. * Uncomment the define below to use CakePHP admin routes.
* You can set this value to anything you want. *
* All methods related to the admin route should be prefixed with the * The value of the define determines the name of the route
* name you set CAKE_ADMIN to. * and its associated controller actions:
* For example: admin_index, admin_edit *
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*/ */
// define('CAKE_ADMIN', 'admin'); // define('CAKE_ADMIN', 'admin');
/** /**
* The define below is used to turn cake built webservices * Enable or disable CakePHP webservices routing. Set to 'off' or 'on'.
* on or off. Default setting is off.
*/ */
define('WEBSERVICES', 'off'); define('WEBSERVICES', 'off');
/** /**
* Compress output CSS (removing comments, whitespace, repeating tags etc.) * Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server (caching). * This requires a/var/cache directory to be writable by the web server for caching.
*
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag(). * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag().
*/ */
define('COMPRESS_CSS', false); define('COMPRESS_CSS', false);
/** /**
* If set to false, session would not automatically be started. * If set to false, sessions are not automatically started.
*/ */
define('AUTO_SESSION', true); define('AUTO_SESSION', true);
/** /**
* Set the max size of file to use md5() . * The max size of file allowed for MD5 hashes (in bytes).
*/ */
define('MAX_MD5SIZE', (5 * 1024) * 1024); define('MAX_MD5SIZE', (5 * 1024) * 1024);
/** /**
* To use Access Control Lists with Cake... * The classname, filename, (and database) used in CakePHP's
* access control lists.
*/ */
define('ACL_CLASSNAME', 'DB_ACL'); define('ACL_CLASSNAME', 'DB_ACL');
define('ACL_FILENAME', 'dbacl' . DS . 'db_acl'); define('ACL_FILENAME', 'db_acl');
define('ACL_DATABASE', 'default'); define('ACL_DATABASE', 'default');
/**
* How long to cache data if not defined
* 3600 = 1 hour
*/
define('CACHE_DEFAULT_DURATION', 3600);
/**
* How often to do garbage collection
* about once in every hundred page loads
*/
define('CACHE_GC_PROBABILITY', 100);
/**
* Use the file storage engine with default parameters.
* Cached data is kept in app/tmp/cache/
*
* File storage
* $cakeCache = array('File', [optional]array(
* 'dir' => '/tmp/', // use system tmp directory - remember to use absolute path
* 'prefix' => 'cakecache_', // prefix every cache file with this string
* 'lock' => true, // use file locking
* ));
* $cakeCache = array('File');
*
* APC (Alternative PHP Cache)
* $cakeCache = array('APC');
*
* Xcache (PHP opcode cacher)
* $cakeCache = array('Xcache', array(
* 'user' => 'admin', // user from xcache.admin.user settings
* 'password' => 'your_password', // plaintext password (xcache.admin.pass)
* ));
*
* Memcache
* $cakeCache = array('Memcache', [optional]array(
* 'servers' => array(
* '127.0.0.1', // localhost, default port
* '10.0.0.1:12345', // port 12345
* ),
* 'compress' => true, // compress data in Memcache (slower, but uses less memory)
* ));
*
* Cake Model
* $cakeCache = array('Model', [optional]array(
* 'modelName' => 'DbModel',
* 'dataField' => 'value',
* 'expiryField' => 'expires'));
*/
$cakeCache = array('File');
?> ?>

View file

@ -36,39 +36,60 @@
* Database configuration class. * Database configuration class.
* You can specify multiple configurations for production, development and testing. * You can specify multiple configurations for production, development and testing.
* *
* driver => * driver => The name of a supported driver; valid options are as follows:
* mysql, postgres, sqlite, adodb-drivername, pear-drivername * mysql - MySQL 4 & 5,
* mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
* sqlite - SQLite (PHP5 only),
* postgres - PostgreSQL 7 and higher,
* mssql - Microsoft SQL Server 2000 and higher,
* db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2)
* oracle - Oracle 8 and higher
* adodb-[drivername] - ADOdb interface wrapper (see below),
* pear-[drivername] - PEAR::DB wrapper
*
* You can add custom database drivers (or override existing drivers) by adding the
* appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php',
* where 'x' is the name of the database.
*
* persistent => true / false
* Determines whether or not the database should use a persistent connection
* *
* connect => * connect =>
* MySQL set the connect to either mysql_pconnect of mysql_connect
* PostgreSQL set the connect to either pg_pconnect of pg_connect
* SQLite set the connect to sqlite_popen or sqlite_open
* MSSQL set the connect to mssql_connect or mssql_pconnect
* ADOdb set the connect to one of these * ADOdb set the connect to one of these
* (http://phplens.com/adodb/supported.databases.html) and * (http://phplens.com/adodb/supported.databases.html) and
* append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
* For all other databases, this setting is deprecated.
* *
* host => * host =>
* the host you connect to the database * the host you connect to the database
* To add a port number use 'port' => # * To add a port number use 'port' => #
* *
* prefix =>
* Uses the given prefix for all the tables in this database. This setting can be overridden
* on a per-table basis with the Model::$tablePrefix property.
*
*/ */
class DATABASE_CONFIG class DATABASE_CONFIG {
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'project_name',
'prefix' => '');
var $test = array('driver' => 'mysql', var $default = array(
'connect' => 'mysql_connect', 'driver' => 'mysql',
'host' => 'localhost', 'persistent' => false,
'login' => 'user', 'host' => 'localhost',
'password' => 'password', 'login' => 'user',
'database' => 'project_name-test', 'password' => 'password',
'prefix' => ''); 'database' => 'project_name',
'prefix' => ''
);
var $test = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'project_name-test',
'prefix' => ''
);
} }
?> ?>

View file

@ -1,7 +1,12 @@
-- @copyright Copyright 2005-2007, Cake Software Foundation, Inc. # $Id$
-- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project #
-- @since CakePHP v 0.10.8.1997 # Copyright 2005-2007, Cake Software Foundation, Inc.
-- @version $Revision$ # 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
CREATE TABLE cake_sessions ( CREATE TABLE cake_sessions (
id varchar(255) NOT NULL default '', id varchar(255) NOT NULL default '',

View file

@ -1,21 +1,18 @@
<?php <?php
/* SVN FILE: $Id$ */ /* SVN FILE: $Id$ */
/** /**
*
*
* *
* PHP versions 4 and 5 * PHP versions 4 and 5
* *
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
* Copyright 2005-2007, Cake Software Foundation, Inc. * Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204 * 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104 * Las Vegas, Nevada 89104
* *
* Licensed under The MIT License * Licensed under The MIT License
* Redistributions of files must retain the above copyright notice. * Redistributions of files must retain the above copyright notice.
* *
* @filesource * @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc. * @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake * @package cake

View file

@ -1,11 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.libs.view.templates.pages
* @since CakePHP(tm) v 0.10.0.1076
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title> <title>
CakePHP: the PHP Rapid Development Framework: CakePHP: the PHP Rapid Development Framework:
<?php echo $title_for_layout;?> <?php echo $title_for_layout;?>
</title> </title>
<?php echo $html->charset();?> <?php echo $html->charset();?>
<link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" /> <link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />

View file

@ -1,9 +1,6 @@
<?php <?php
/* SVN FILE: $Id$ */ /* SVN FILE: $Id$ */
/** /**
*
*
* *
* PHP versions 4 and 5 * PHP versions 4 and 5
* *
@ -31,7 +28,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title><?php echo $page_title?></title> <title><?php echo $page_title?></title>
<?php echo $html->charset();?> <?php echo $html->charset(); ?>
<?php if(Configure::read() == 0) { ?> <?php if(Configure::read() == 0) { ?>
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/> <meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/>
@ -42,10 +39,7 @@ A { color:#444; text-decoration:none }
A:HOVER { text-decoration: underline; color:#44E } A:HOVER { text-decoration: underline; color:#44E }
--></style> --></style>
</head> </head>
<body> <body>
<p><a href="<?php echo $url?>"><?php echo $message?></a></p> <p><a href="<?php echo $url?>"><?php echo $message?></a></p>
</body> </body>
</html> </html>

View file

@ -374,19 +374,19 @@ class Scaffold extends Object {
*/ */
function __scaffoldError() { function __scaffoldError() {
$pathToViewFile = ''; $pathToViewFile = '';
if (file_exists(APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS. 'scaffold.error.ctp')) { if (file_exists(APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS. 'scaffold.error.ctp')) {
$pathToViewFile = APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS . 'scaffold.error.ctp'; $pathToViewFile = APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS . 'scaffold.error.ctp';
} elseif (file_exists(APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS. 'scaffold.error.thtml')) { } elseif (file_exists(APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS. 'scaffold.error.thtml')) {
$pathToViewFile = APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS . 'scaffold.error.thtml'; $pathToViewFile = APP . 'views' . DS . $this->viewPath . DS . 'scaffolds' . DS . 'scaffold.error.thtml';
} elseif (file_exists(APP . 'views' . DS . 'scaffold' . DS . 'scaffold.error.ctp')) { } elseif (file_exists(APP . 'views' . DS . 'scaffolds' . DS . 'scaffold.error.ctp')) {
$pathToViewFile = APP . 'views' . DS . 'scaffold' . DS . 'scaffold.error.ctp'; $pathToViewFile = APP . 'views' . DS . 'scaffolds' . DS . 'scaffold.error.ctp';
} elseif (file_exists(APP . 'views' . DS . 'scaffold' . DS . 'scaffold.error.thtml')) { } elseif (file_exists(APP . 'views' . DS . 'scaffolds' . DS . 'scaffold.error.thtml')) {
$pathToViewFile = APP . 'views' . DS . 'scaffold' . DS . 'scaffold.error.thtml'; $pathToViewFile = APP . 'views' . DS . 'scaffolds' . DS . 'scaffold.error.thtml';
} else { } else {
$pathToViewFile = LIBS . 'view' . DS . 'templates' . DS . 'errors' . DS . 'scaffold_error.ctp'; $pathToViewFile = LIBS . 'view' . DS . 'templates' . DS . 'errors' . DS . 'scaffold_error.ctp';
} }
return $this->controller->render($this->action, $this->layout, $pathToViewFile); return $this->controller->render($this->action, $this->layout, $pathToViewFile);
} }
/** /**
@ -503,10 +503,10 @@ class Scaffold extends Object {
return APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.ctp'; return APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.ctp';
} elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) { } elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) {
return APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.thtml'; return APP . 'views' . DS . 'plugins' . DS . $this->plugin . DS . $this->subDir . $type . $scaffoldAction . '.thtml';
} elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . 'scaffold'. DS . $this->subDir . $type . $scaffoldAction . '.ctp')) { } elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . 'scaffolds'. DS . $this->subDir . $type . $scaffoldAction . '.ctp')) {
return APP . 'views' . DS . 'plugins' . DS . 'scaffold'. DS . $this->subDir . $type . $scaffoldAction . '.ctp'; return APP . 'views' . DS . 'plugins' . DS . 'scaffolds'. DS . $this->subDir . $type . $scaffoldAction . '.ctp';
} elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . 'scaffold'. DS . $this->subDir . $type . $scaffoldAction . '.thtml')) { } elseif (file_exists(APP . 'views' . DS . 'plugins' . DS . 'scaffolds'. DS . $this->subDir . $type . $scaffoldAction . '.thtml')) {
return APP . 'views' . DS . 'plugins' . DS . 'scaffold'. DS . $this->subDir . $type . $scaffoldAction . '.thtml'; return APP . 'views' . DS . 'plugins' . DS . 'scaffolds'. DS . $this->subDir . $type . $scaffoldAction . '.thtml';
} elseif (file_exists(APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.ctp')) { } elseif (file_exists(APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.ctp')) {
return APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.ctp'; return APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.ctp';
} elseif (file_exists(APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.thtml')) { } elseif (file_exists(APP . 'plugins' . DS . $this->plugin . DS . 'views' . DS . $this->viewPath . DS . $scaffoldAction . '.thtml')) {
@ -517,16 +517,16 @@ class Scaffold extends Object {
foreach($paths->viewPaths as $path) { foreach($paths->viewPaths as $path) {
if (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . $this->ext)) { if (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . $this->ext)) {
return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . $this->ext; return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . $this->ext;
} elseif (file_exists($path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . $this->ext)) { } elseif (file_exists($path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . $this->ext)) {
return $path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . $this->ext; return $path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . $this->ext;
} elseif (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.ctp')) { } elseif (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.ctp')) {
return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.ctp'; return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.ctp';
} elseif (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) { } elseif (file_exists($path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) {
return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.thtml'; return $path . $this->viewPath . DS . $this->subDir . $type . $scaffoldAction . '.thtml';
} elseif (file_exists($path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . '.ctp')) { } elseif (file_exists($path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . '.ctp')) {
return $path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . '.ctp'; return $path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . '.ctp';
} elseif (file_exists($path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) { } elseif (file_exists($path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . '.thtml')) {
return $path . $this->viewPath . DS . 'scaffold' . DS . $this->subDir . $type . $scaffoldAction . '.thtml'; return $path . $this->viewPath . DS . 'scaffolds' . DS . $this->subDir . $type . $scaffoldAction . '.thtml';
} }
} }
return LIBS . 'view' . DS . 'templates' . DS . 'scaffolds' . DS . $action . '.ctp'; return LIBS . 'view' . DS . 'templates' . DS . 'scaffolds' . DS . $action . '.ctp';