From f4792ba1a7785220fef5adb1cb3e7ce8ac40152f Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Thu, 2 Aug 2012 10:13:55 +0000 Subject: Creation d'un projet cake (exemple Blog du book) pour développer le CakePHPWeaver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///var/svn/2012-php-weave/trunk@6 d972a294-176a-4cf9-8ea1-fcd5b0c30f5c --- poc/poc02-compiling-cake/src/workdir/in/.htaccess | 1 + .../src/workdir/in/app/.htaccess | 5 + .../src/workdir/in/app/config/acl.ini.php | 76 +++++++ .../src/workdir/in/app/config/bootstrap.php | 46 ++++ .../src/workdir/in/app/config/core.php | 146 ++++++++++++ .../src/workdir/in/app/config/database.php.default | 74 ++++++ .../src/workdir/in/app/config/inflections.php | 72 ++++++ .../src/workdir/in/app/config/routes.php | 46 ++++ .../src/workdir/in/app/config/sql/db_acl.sql | 38 ++++ .../src/workdir/in/app/config/sql/sessions.sql | 16 ++ .../workdir/in/app/controllers/components/empty | 0 .../src/workdir/in/app/index.php | 26 +++ .../src/workdir/in/app/models/empty | 0 .../src/workdir/in/app/plugins/empty | 0 .../src/workdir/in/app/tmp/cache/empty | 0 .../src/workdir/in/app/tmp/cache/models/empty | 0 .../src/workdir/in/app/tmp/cache/persistent/empty | 0 .../src/workdir/in/app/tmp/cache/views/empty | 0 .../src/workdir/in/app/tmp/empty | 0 .../src/workdir/in/app/tmp/logs/empty | 0 .../src/workdir/in/app/tmp/sessions/empty | 0 .../src/workdir/in/app/tmp/tests/empty | 0 .../src/workdir/in/app/vendors/empty | 0 .../src/workdir/in/app/views/elements/empty | 0 .../src/workdir/in/app/views/errors/empty | 0 .../src/workdir/in/app/views/helpers/empty | 0 .../src/workdir/in/app/views/layouts/empty | 0 .../src/workdir/in/app/views/pages/empty | 0 .../src/workdir/in/app/webroot/.htaccess | 6 + .../src/workdir/in/app/webroot/css.php | 102 +++++++++ .../workdir/in/app/webroot/css/cake.generic.css | 250 +++++++++++++++++++++ .../src/workdir/in/app/webroot/favicon.ico | Bin 0 -> 4973 bytes .../src/workdir/in/app/webroot/img/cake.power.png | Bin 0 -> 3053 bytes .../src/workdir/in/app/webroot/img/w3c_css.png | Bin 0 -> 299 bytes .../src/workdir/in/app/webroot/img/w3c_xhtml10.png | Bin 0 -> 321 bytes .../src/workdir/in/app/webroot/index.php | 87 +++++++ .../src/workdir/in/app/webroot/js/vendors.php | 44 ++++ poc/poc02-compiling-cake/src/workdir/in/cake | 1 + poc/poc02-compiling-cake/src/workdir/in/index.php | 1 + poc/poc02-compiling-cake/src/workdir/in/vendors | 1 + 40 files changed, 1038 insertions(+) create mode 120000 poc/poc02-compiling-cake/src/workdir/in/.htaccess create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/.htaccess create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/acl.ini.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/bootstrap.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/core.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/database.php.default create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/inflections.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/routes.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/sql/db_acl.sql create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/config/sql/sessions.sql create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/controllers/components/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/index.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/models/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/plugins/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/models/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/persistent/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/views/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/logs/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/sessions/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/tmp/tests/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/vendors/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/views/elements/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/views/errors/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/views/helpers/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/views/layouts/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/views/pages/empty create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/.htaccess create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/css.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_css.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_xhtml10.png create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php create mode 100644 poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/vendors.php create mode 120000 poc/poc02-compiling-cake/src/workdir/in/cake create mode 120000 poc/poc02-compiling-cake/src/workdir/in/index.php create mode 120000 poc/poc02-compiling-cake/src/workdir/in/vendors (limited to 'poc') diff --git a/poc/poc02-compiling-cake/src/workdir/in/.htaccess b/poc/poc02-compiling-cake/src/workdir/in/.htaccess new file mode 120000 index 0000000..609f003 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/.htaccess @@ -0,0 +1 @@ +../../vendor/cake_1.1.20.7692/.htaccess \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess b/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess new file mode 100644 index 0000000..0ed8662 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/acl.ini.php b/poc/poc02-compiling-cake/src/workdir/in/app/config/acl.ini.php new file mode 100644 index 0000000..486e790 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/acl.ini.php @@ -0,0 +1,76 @@ +; +; SVN FILE: $Id: acl.ini.php 6305 2008-01-02 02:33:56Z phpnut $ +;/** +; * Short description for file. +; * +; * +; * PHP versions 4 and 5 +; * +; * CakePHP(tm) : Rapid Development Framework +; * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. +; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +; * @package cake +; * @subpackage cake.app.config +; * @since CakePHP(tm) v 0.10.0.1076 +; * @version $Revision: 6305 $ +; * @modifiedby $LastChangedBy: phpnut $ +; * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ +; * @license http://www.opensource.org/licenses/mit-license.php The MIT License +; */ + +; acl.ini.php - Cake ACL Configuration +; --------------------------------------------------------------------- +; Use this file to specify user permissions. +; aco = access control object (something in your application) +; aro = access request object (something requesting access) +; +; User records are added as follows: +; +; [uid] +; groups = group1, group2, group3 +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; Group records are added in a similar manner: +; +; [gid] +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; The allow, deny, and groups sections are all optional. +; NOTE: groups names *cannot* ever be the same as usernames! +; +; ACL permissions are checked in the following order: +; 1. Check for user denies (and DENY if specified) +; 2. Check for user allows (and ALLOW if specified) +; 3. Gather user's groups +; 4. Check group denies (and DENY if specified) +; 5. Check group allows (and ALLOW if specified) +; 6. If no aro, aco, or group information is found, DENY +; +; --------------------------------------------------------------------- + +;------------------------------------- +;Users +;------------------------------------- + +[username-goes-here] +groups = group1, group2 +deny = aco1, aco2 +allow = aco3, aco4 + +;------------------------------------- +;Groups +;------------------------------------- + +[groupname-goes-here] +deny = aco5, aco6 +allow = aco7, aco8 \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/bootstrap.php b/poc/poc02-compiling-cake/src/workdir/in/app/config/bootstrap.php new file mode 100644 index 0000000..ef4cedf --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/bootstrap.php @@ -0,0 +1,46 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.10.8.2117 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * + * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded + * This is an application wide file to load any function that is not used within a class define. + * You can also use this to include or require any files in your application. + * + */ +/** + * The settings below can be used to set additional paths to models, views and controllers. + * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470) + * + * $modelPaths = array('full path to models', 'second full path to models', 'etc...'); + * $viewPaths = array('this path to views', 'second full path to views', 'etc...'); + * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...'); + * + */ +//EOF +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/core.php b/poc/poc02-compiling-cake/src/workdir/in/app/config/core.php new file mode 100644 index 0000000..77cf1ff --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/core.php @@ -0,0 +1,146 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * If you do not have mod rewrite on your system + * or if you prefer to use CakePHP pretty urls. + * uncomment the line below. + * Note: If you do have mod rewrite but prefer the + * CakePHP pretty urls, you also have to remove the + * .htaccess files + * release/.htaccess + * release/app/.htaccess + * release/app/webroot/.htaccess + */ +// define ('BASE_URL', env('SCRIPT_NAME')); +/** + * Set debug level here: + * - 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. + * With the other debug levels you get to click the "flash message" to continue. + * + */ + define('DEBUG', 1); +/** + * Turn of caching checking wide. + * You must still use the controller var cacheAction inside you controller class. + * You can either set it controller wide, or in each controller method. + * use var $cacheAction = true; or in the controller method $this->cacheAction = true; + */ + define('CACHE_CHECK', false); +/** + * Error constant. Used for differentiating error logging and debugging. + * Currently PHP supports LOG_DEBUG + */ + define('LOG_ERROR', 2); +/** + * CakePHP includes 3 types of session saves + * 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 + * Setting it to php will use the php default save path + * Setting it to database will use the database + * + */ + define('CAKE_SESSION_SAVE', 'php'); +/** + * If using you own table name for storing sessions + * set the table name here. + * DO NOT INCLUDE PREFIX IF YOU HAVE SET ONE IN database.php + * + */ + define('CAKE_SESSION_TABLE', 'cake_sessions'); +/** + * Set a random string of used in session. + * + */ + define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); +/** + * Set the name of session cookie + * + */ + define('CAKE_SESSION_COOKIE', 'CAKEPHP'); +/** + * Set level of Cake security. + * + */ + define('CAKE_SECURITY', 'high'); +/** + * Set Cake Session time out. + * If CAKE_SECURITY define is set + * high: multiplied by 10 + * medium: is multiplied by 100 + * low is: multiplied by 300 + * + * Number below is seconds. + */ + define('CAKE_SESSION_TIMEOUT', '120'); +/** + * Uncomment the define below to use cake built in admin routes. + * You can set this value to anything you want. + * All methods related to the admin route should be prefixed with the + * name you set CAKE_ADMIN to. + * For example: admin_index, admin_edit + */ +// define('CAKE_ADMIN', 'admin'); +/** + * The define below is used to turn cake built webservices + * on or off. Default setting is off. + */ + define('WEBSERVICES', 'off'); +/** + * Compress output CSS (removing comments, whitespace, repeating tags etc.) + * This requires a/var/cache directory to be writable by the web server (caching). + * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag(). + */ + define('COMPRESS_CSS', false); +/** + * If set to true, helpers would output data instead of returning it. + */ + define('AUTO_OUTPUT', false); +/** + * If set to false, session would not automatically be started. + */ + define('AUTO_SESSION', true); +/** + * Set the max size of file to use md5() . + */ + define('MAX_MD5SIZE', (5 * 1024) * 1024); +/** + * To use Access Control Lists with Cake... + */ + define('ACL_CLASSNAME', 'DB_ACL'); + define('ACL_FILENAME', 'dbacl' . DS . 'db_acl'); +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/database.php.default b/poc/poc02-compiling-cake/src/workdir/in/app/config/database.php.default new file mode 100644 index 0000000..4df48e1 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/database.php.default @@ -0,0 +1,74 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * In this file you set up your database connection details. + * + * @package cake + * @subpackage cake.config + */ +/** + * Database configuration class. + * You can specify multiple configurations for production, development and testing. + * + * driver => + * mysql, postgres, sqlite, adodb, pear-drivername + * + * 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 sqlite_open + * ADOdb set the connect to one of these + * (http://phplens.com/adodb/supported.databases.html) and + * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) + * + * host => + * the host you connect to the database + * MySQL 'localhost' to add a port number use 'localhost:port#' + * PostgreSQL 'localhost' to add a port number use 'localhost port=5432' + * + */ +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', + 'connect' => 'mysql_connect', + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'project_name-test', + 'prefix' => ''); +} +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/inflections.php b/poc/poc02-compiling-cake/src/workdir/in/app/config/inflections.php new file mode 100644 index 0000000..e08a7d8 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/inflections.php @@ -0,0 +1,72 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 1.0.0.2312 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * This is a key => value array of regex used to match words. + * If key matches then the value is returned. + * + * $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice'); + */ + $pluralRules = array(); +/** + * This is a key only array of plural words that should not be inflected. + * Notice the last comma + * + * $uninflectedPlural = array('.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox'); + */ + $uninflectedPlural = array(); +/** + * This is a key => value array of plural irregular words. + * If key matches then the value is returned. + * + * $irregularPlural = array('atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers') + */ + $irregularPlural = array(); +/** + * This is a key => value array of regex used to match words. + * If key matches then the value is returned. + * + * $singularRules = array('/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i') + */ + $singularRules = array(); +/** + * This is a key only array of singular words that should not be inflected. + * You should not have to change this value below if you do change it use same format + * as the $uninflectedPlural above. + */ + $uninflectedSingular = $uninflectedPlural; +/** + * This is a key => value array of singular irregular words. + * Most of the time this will be a reverse of the above $irregularPlural array + * You should not have to change this value below if you do change it use same format + * + * $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother') + */ + $irregularSingular = array_flip($irregularPlural); +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/routes.php b/poc/poc02-compiling-cake/src/workdir/in/app/config/routes.php new file mode 100644 index 0000000..45ae36a --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/routes.php @@ -0,0 +1,46 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Here, we are connecting '/' (base path) to controller called 'Pages', + * its action called 'display', and we pass a param to select the view file + * to use (in this case, /app/views/pages/home.thtml)... + */ + $Route->connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); +/** + * ...and connect the rest of 'Pages' controller's urls. + */ + $Route->connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); +/** + * Then we connect url '/test' to our test controller. This is helpfull in + * developement. + */ + $Route->connect('/tests', array('controller' => 'tests', 'action' => 'index')); +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/db_acl.sql b/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/db_acl.sql new file mode 100644 index 0000000..be8f200 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/db_acl.sql @@ -0,0 +1,38 @@ +# $Id: db_acl.sql 6305 2008-01-02 02:33:56Z phpnut $ +# +# Copyright 2005-2008, 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 + +CREATE TABLE acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + object_id INTEGER(10) NULL DEFAULT NULL, + alias VARCHAR(255) NOT NULL DEFAULT '', + lft INTEGER(10) NULL DEFAULT NULL, + rght INTEGER(10) NULL DEFAULT NULL, + PRIMARY KEY(id) +); + +CREATE TABLE aros_acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + aro_id INTEGER(10) UNSIGNED NOT NULL, + aco_id INTEGER(10) UNSIGNED NOT NULL, + _create CHAR(2) NOT NULL DEFAULT 0, + _read CHAR(2) NOT NULL DEFAULT 0, + _update CHAR(2) NOT NULL DEFAULT 0, + _delete CHAR(2) NOT NULL DEFAULT 0, + PRIMARY KEY(id) +); + +CREATE TABLE aros ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + foreign_key INTEGER(10) UNSIGNED NULL DEFAULT NULL, + alias VARCHAR(255) NOT NULL DEFAULT '', + lft INTEGER(10) NULL DEFAULT NULL, + rght INTEGER(10) NULL DEFAULT NULL, + PRIMARY KEY(id) +); \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/sessions.sql b/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/sessions.sql new file mode 100644 index 0000000..14c0036 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/config/sql/sessions.sql @@ -0,0 +1,16 @@ +# $Id: sessions.sql 6305 2008-01-02 02:33:56Z phpnut $ +# +# Copyright 2005-2008, 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 + +CREATE TABLE cake_sessions ( + id varchar(255) NOT NULL default '', + data text, + expires int(11) default NULL, + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/controllers/components/empty b/poc/poc02-compiling-cake/src/workdir/in/app/controllers/components/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/index.php b/poc/poc02-compiling-cake/src/workdir/in/app/index.php new file mode 100644 index 0000000..bd8993b --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/index.php @@ -0,0 +1,26 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/models/empty b/poc/poc02-compiling-cake/src/workdir/in/app/models/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/plugins/empty b/poc/poc02-compiling-cake/src/workdir/in/app/plugins/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/models/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/models/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/persistent/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/persistent/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/views/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/cache/views/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/logs/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/logs/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/sessions/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/sessions/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/tmp/tests/empty b/poc/poc02-compiling-cake/src/workdir/in/app/tmp/tests/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/vendors/empty b/poc/poc02-compiling-cake/src/workdir/in/app/vendors/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/views/elements/empty b/poc/poc02-compiling-cake/src/workdir/in/app/views/elements/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/views/errors/empty b/poc/poc02-compiling-cake/src/workdir/in/app/views/errors/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/views/helpers/empty b/poc/poc02-compiling-cake/src/workdir/in/app/views/helpers/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/views/layouts/empty b/poc/poc02-compiling-cake/src/workdir/in/app/views/layouts/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/views/pages/empty b/poc/poc02-compiling-cake/src/workdir/in/app/views/pages/empty new file mode 100644 index 0000000..e69de29 diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/.htaccess b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/.htaccess new file mode 100644 index 0000000..f9d8b93 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/.htaccess @@ -0,0 +1,6 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] + \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css.php b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css.php new file mode 100644 index 0000000..dc87218 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css.php @@ -0,0 +1,102 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +if (!defined('CAKE_CORE_INCLUDE_PATH')) { + header('HTTP/1.1 404 Not Found'); + exit('File Not Found'); +} +/** + * Enter description here... + */ + uses('file'); +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $name + * @return unknown + */ + function make_clean_css($path, $name) { + require(VENDORS . 'csspp' . DS . 'csspp.php'); + $data = file_get_contents($path); + $csspp = new csspp(); + $output = $csspp->compress($data); + $ratio = 100 - (round(strlen($output) / strlen($data), 3) * 100); + $output = " /* file: $name, ratio: $ratio% */ " . $output; + return $output; + } +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $content + * @return unknown + */ + function write_css_cache($path, $content) { + if (!is_dir(dirname($path))) { + mkdir(dirname($path)); + } + $cache = new File($path); + return $cache->write($content); + } + + if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { + die('Wrong file name.'); + } + + $filename = 'css/' . $regs[1]; + $filepath = CSS . $regs[1]; + $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); + + if (!file_exists($filepath)) { + die('Wrong file name.'); + } + + if (file_exists($cachepath)) { + $templateModified = filemtime($filepath); + $cacheModified = filemtime($cachepath); + + if ($templateModified > $cacheModified) { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + } else { + $output = file_get_contents($cachepath); + } + } else { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + $templateModified = time(); + } + + header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT'); + header("Content-Type: text/css"); + header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT"); + header("Cache-Control: cache"); // HTTP/1.1 + header("Pragma: cache"); // HTTP/1.0 + print $output; +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css new file mode 100644 index 0000000..bc27d22 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/css/cake.generic.css @@ -0,0 +1,250 @@ +*{ +margin:0; +padding:0; +} + +body{ +font-family:"frutiger linotype","lucida grande",helvetica,arial,sans-serif; +text-align:center; +color:#333; +font-size: 76%; +} + +/* General Style Info */ +a{ +color:#003d4c; +text-decoration:underline; +} +a:hover{ +color:#003d4c; +text-decoration:none; +} + +a img{ +border:none; +} + +h1, h2, h3, h4{ +font-weight:normal; +} + +h1{ +color: #003d4c; +margin:0.3em 0; +font-size: 180%; +} + +h2{ +color:#c6c65b; +padding-top: 1em; +margin:0.3em 0; +font-size: 180%; +} + +h3{ +color:#c6c65b; +padding-top:2em; +font-size: 140%; +} + +h4{ +color:#c6c65b; +padding-top:0.5em; +font-weight:normal; +} + +em { +font-size: 12px; +} + +ul, li { +margin: 0 12px; +} + +/* Layout */ + +#container{ +text-align:left; +} + +#header{ +margin-top: 1em; +padding: 4px 20px; +} + +#content{ +clear:both; +padding: 0px 40px 10px 40px; +background-color: #fff; +color: #333; +} +#footer{ +clear:both; +padding: 6px 10px; +text-align: right; +} + +/* tables */ + +table { +width: 100%; +border-top: 1px solid #ccc; +border-left: 1px solid #ccc; +border-bottom: 1px solid #ccc; +color:#333; +background-color: #fff; +clear:both; +padding: 0; +margin: 0 0 2em 0; +white-space: normal; +} +th { +background-color: #e2e2e2; +border-top: 1px solid #fff; +border-left: 1px solid #fff; +border-right: 1px solid #003d4c; +border-bottom: 1px solid #003d4c; +text-align: center; +padding:1px 4px; +} +table tr td { +border-right: 1px solid #ddd; +padding:4px 4px; +vertical-align:top; +text-align: center; +} +table tr.altRow td { +background: #f4f4f4; +} +table td.actions { + white-space: nowrap; +} +#cakeSqlLog td { +text-align: left; +padding: 4px 8px; +background: #fff; +border-bottom: 2px solid #ccc; +} + +/* scaffold show */ + +div.related { +clear:both; +display:block; +} +dl { +line-height:2em; +margin:0em 1em; +float:left; +width: 400px; +} +dt { +font-weight: bold; +vertical-align:top; +} +dd { +margin-left:10em; +margin-top:-2em; +vertical-align:top; +} + +/* notices and errors */ + +#flashMessage, .error, .error_message { +color:#900; +font-size: 16px; +background-color: #fff; +margin: 8px 0px; +font-weight: bold; +} +.error_message { +clear: both; +} +.error em { +font-size: 18px; +color: #003d4c; +} +.notice { +color: #656565; +font-size: 14px; +background-color: #f4f4f4; +padding: 0.5em; +margin: 1em 0; +display:block; +} +.tip { +color: #656565; +background-color: #ddd; +} + +/* forms */ + +form { +margin-top: 2em; +} +form div{ +vertical-align: text-top; +margin-left: 1em; +margin-bottom:2em; +} +form div.date{ +margin-left: 0em; +} +label { +display: block; +width: 140px; +font-size: 14px; +padding-right: 20px; +} +input[type=checkbox] { +float: left; +clear: left; +margin: 2px 6px 7px 2px; +} +input, textarea { +clear: both; +display:block; +font-size: 14px; +font-family: inherit; +} +select { +clear: both; +vertical-align: text-bottom; +font-size: 14px; +font-family: inherit; +} +option { +font-size: 14px; +font-family: inherit; +padding: 0 0.3em; +} +input[type=submit] { +display: inline; +vertical-align: bottom; +} +div.required { +clear: both; +color:#222; +font-weight:bold; +} +div.optional { +clear: both; +color:#555; +} +div.submit { +clear: both; +margin-top: 40px; +margin-left: 140px; +} +/* action links */ +ul.actions { +float: left; +margin-left:20px; +width: 200px; +} +ul.actions li { +margin-top: 4px; +} +pre { +padding: 1em; +} \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico new file mode 100644 index 0000000..1bc32bd Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/favicon.ico differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.png new file mode 100644 index 0000000..699ef80 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/cake.power.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_css.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_css.png new file mode 100644 index 0000000..706325e Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_css.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_xhtml10.png b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_xhtml10.png new file mode 100644 index 0000000..ec68644 Binary files /dev/null and b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/img/w3c_xhtml10.png differ diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php new file mode 100644 index 0000000..48771ff --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/index.php @@ -0,0 +1,87 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 6305 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2008-01-01 21:33:56 -0500 (Tue, 01 Jan 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Do not change + */ + if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); + } +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * Each define has a commented line of code that explains what you would change. + * + */ + if (!defined('ROOT')) { + //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; + //You should also use the DS define to seperate your directories + define('ROOT', dirname(dirname(dirname(__FILE__)))); + } + if (!defined('APP_DIR')) { + //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; + define('APP_DIR', basename(dirname(dirname(__FILE__)))); + } +/** + * This only needs to be changed if the cake installed libs are located + * outside of the distributed directory structure. + */ + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; + //You should also use the DS define to seperate your directories + define('CAKE_CORE_INCLUDE_PATH', ROOT); + } +/////////////////////////////// +//DO NOT EDIT BELOW THIS LINE// +/////////////////////////////// + if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); + } + if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); + } + if (!defined('CORE_PATH')) { + if (function_exists('ini_set')) { + ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path')); + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } + } + require CORE_PATH . 'cake' . DS . 'bootstrap.php'; + if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { + } else { + $Dispatcher = new Dispatcher(); + $Dispatcher->dispatch($url); + } + if (Configure::read() > 0) { + echo ""; + } +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/vendors.php b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/vendors.php new file mode 100644 index 0000000..cee6b77 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/app/webroot/js/vendors.php @@ -0,0 +1,44 @@ + + * Copyright 2005-2008, 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-2008, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot.js + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7691 $ + * @modifiedby $LastChangedBy: nate $ + * @lastmodified $Date: 2008-10-02 00:59:12 -0400 (Thu, 02 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Enter description here... + */ +if (isset($_GET['file'])) { + $file = $_GET['file']; + $pos = strpos($file, '..'); + if ($pos === false) { + if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) { + readfile('../../vendors/javascript/'.$file); + return; + } + } +} +header('HTTP/1.1 404 Not Found'); +?> \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/cake b/poc/poc02-compiling-cake/src/workdir/in/cake new file mode 120000 index 0000000..4f6f8a7 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/cake @@ -0,0 +1 @@ +../../vendor/cake_1.1.20.7692/cake/ \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/index.php b/poc/poc02-compiling-cake/src/workdir/in/index.php new file mode 120000 index 0000000..87aeb50 --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/index.php @@ -0,0 +1 @@ +../../vendor/cake_1.1.20.7692/index.php \ No newline at end of file diff --git a/poc/poc02-compiling-cake/src/workdir/in/vendors b/poc/poc02-compiling-cake/src/workdir/in/vendors new file mode 120000 index 0000000..7d5e66f --- /dev/null +++ b/poc/poc02-compiling-cake/src/workdir/in/vendors @@ -0,0 +1 @@ +../../vendor/cake_1.1.20.7692/vendors/ \ No newline at end of file -- cgit v1.2.3