From 2d97cacfa0a76b43814e0b1c51ef92aafd5048e9 Mon Sep 17 00:00:00 2001 From: "sancus%off.net" Date: Mon, 14 Aug 2006 23:54:58 +0000 Subject: [PATCH] initial import of models and other app files --- webtools/remora/app/.htaccess | 0 webtools/remora/app/config/acl.ini.php | 76 ++ webtools/remora/app/config/bootstrap.php | 46 ++ webtools/remora/app/config/core.php | 147 ++++ webtools/remora/app/config/database.php | 75 ++ .../remora/app/config/database.php.default | 74 ++ webtools/remora/app/config/inflections.php | 72 ++ webtools/remora/app/config/routes.php | 48 ++ webtools/remora/app/config/sql/db_acl.sql | 0 webtools/remora/app/config/sql/remora.sql | 688 ++++++++++++++++++ webtools/remora/app/config/sql/sessions.sql | 11 + .../app/controllers/addons_controller.php | 15 + webtools/remora/app/index.php | 26 + webtools/remora/app/models/addon.php | 72 ++ webtools/remora/app/models/addontype.php | 26 + webtools/remora/app/models/application.php | 41 ++ webtools/remora/app/models/approval.php | 0 webtools/remora/app/models/appversion.php | 0 webtools/remora/app/models/blapp.php | 0 webtools/remora/app/models/blitem.php | 0 webtools/remora/app/models/cake_session.php | 15 + webtools/remora/app/models/download.php | 0 webtools/remora/app/models/feature.php | 0 webtools/remora/app/models/file.php | 0 webtools/remora/app/models/lang.php | 0 webtools/remora/app/models/platform.php | 0 webtools/remora/app/models/preview.php | 0 webtools/remora/app/models/review.php | 0 webtools/remora/app/models/reviewrating.php | 0 webtools/remora/app/models/tag.php | 33 + webtools/remora/app/models/translation.php | 0 webtools/remora/app/models/user.php | 49 ++ webtools/remora/app/models/version.php | 48 ++ webtools/remora/app/tests/LICENSE.txt | 0 webtools/remora/app/tests/README.txt | 17 + .../extensions_controller.test.php | 0 .../controllers/webpage_controller.test.php | 0 .../tests/app/cases/models/extension.test.php | 0 webtools/remora/app/tests/config.ini.php | 37 + .../remora/app/tests/lib/cake_reporter.php | 110 +++ .../app/tests/lib/cake_web_test_case.php | 50 ++ .../remora/app/tests/lib/cli_reporter.php | 116 +++ .../remora/app/tests/lib/rss_writer_class.php | 389 ++++++++++ webtools/remora/app/tests/lib/show_passes.php | 0 .../remora/app/tests/lib/test_manager.php | 549 ++++++++++++++ .../remora/app/tests/lib/xml_writer_class.php | 312 ++++++++ webtools/remora/app/tests/rss2html.xsl | 110 +++ webtools/remora/app/tests/test_paths.php | 35 + webtools/remora/app/tests/tests.php | 298 ++++++++ webtools/remora/app/views/addons/index.thtml | 1 + .../remora/app/views/layouts/developers.thtml | 26 + webtools/remora/app/views/tests/index.thtml | 0 .../remora/app/views/tests/test_all.thtml | 0 webtools/remora/app/webroot/.htaccess | 0 webtools/remora/app/webroot/css.php | 101 +++ .../remora/app/webroot/css/cake.generic.css | 0 .../remora/app/webroot/css/images/arrow.gif | 0 .../app/webroot/css/images/container_bg.gif | 0 .../remora/app/webroot/css/images/logo.gif | 0 .../remora/app/webroot/css/images/nav_bg.gif | 0 .../app/webroot/css/images/nav_item_bg.gif | 0 webtools/remora/app/webroot/css/screen.css | 0 webtools/remora/app/webroot/favicon.ico | 0 .../webroot/images/actionBarBackground.gif | 0 .../remora/app/webroot/images/cake.power.png | 0 .../remora/app/webroot/images/download.gif | 0 webtools/remora/app/webroot/images/email.gif | 0 webtools/remora/app/webroot/images/header.jpg | 0 .../remora/app/webroot/images/install.gif | 0 webtools/remora/app/webroot/images/remora.png | 0 .../remora/app/webroot/images/remora2.png | 0 .../app/webroot/images/sidebarBackground.gif | 0 .../remora/app/webroot/images/w3c_css.png | 0 .../remora/app/webroot/images/w3c_xhtml10.png | 0 webtools/remora/app/webroot/index.php | 87 +++ webtools/remora/app/webroot/js/vendors.php | 36 + webtools/remora/app/webroot/remora.sql | 0 webtools/remora/app/webroot/sample/icon.gif | 0 .../remora/app/webroot/sample/screenshot.gif | 0 .../remora/app/webroot/sample/screenshot2.gif | 0 .../remora/app/webroot/sample/screenshot3.gif | 0 webtools/remora/app/webroot/test/index.php | 399 ++++++++++ webtools/remora/app/webroot/test/rss2html.xsl | 110 +++ 83 files changed, 4345 insertions(+) create mode 100644 webtools/remora/app/.htaccess create mode 100644 webtools/remora/app/config/acl.ini.php create mode 100644 webtools/remora/app/config/bootstrap.php create mode 100644 webtools/remora/app/config/core.php create mode 100644 webtools/remora/app/config/database.php create mode 100644 webtools/remora/app/config/database.php.default create mode 100644 webtools/remora/app/config/inflections.php create mode 100644 webtools/remora/app/config/routes.php create mode 100644 webtools/remora/app/config/sql/db_acl.sql create mode 100644 webtools/remora/app/config/sql/remora.sql create mode 100644 webtools/remora/app/config/sql/sessions.sql create mode 100644 webtools/remora/app/controllers/addons_controller.php create mode 100644 webtools/remora/app/index.php create mode 100644 webtools/remora/app/models/addon.php create mode 100644 webtools/remora/app/models/addontype.php create mode 100644 webtools/remora/app/models/application.php create mode 100644 webtools/remora/app/models/approval.php create mode 100644 webtools/remora/app/models/appversion.php create mode 100644 webtools/remora/app/models/blapp.php create mode 100644 webtools/remora/app/models/blitem.php create mode 100644 webtools/remora/app/models/cake_session.php create mode 100644 webtools/remora/app/models/download.php create mode 100644 webtools/remora/app/models/feature.php create mode 100644 webtools/remora/app/models/file.php create mode 100644 webtools/remora/app/models/lang.php create mode 100644 webtools/remora/app/models/platform.php create mode 100644 webtools/remora/app/models/preview.php create mode 100644 webtools/remora/app/models/review.php create mode 100644 webtools/remora/app/models/reviewrating.php create mode 100644 webtools/remora/app/models/tag.php create mode 100644 webtools/remora/app/models/translation.php create mode 100644 webtools/remora/app/models/user.php create mode 100644 webtools/remora/app/models/version.php create mode 100644 webtools/remora/app/tests/LICENSE.txt create mode 100644 webtools/remora/app/tests/README.txt create mode 100644 webtools/remora/app/tests/app/cases/controllers/extensions_controller.test.php create mode 100644 webtools/remora/app/tests/app/cases/controllers/webpage_controller.test.php create mode 100644 webtools/remora/app/tests/app/cases/models/extension.test.php create mode 100644 webtools/remora/app/tests/config.ini.php create mode 100644 webtools/remora/app/tests/lib/cake_reporter.php create mode 100644 webtools/remora/app/tests/lib/cake_web_test_case.php create mode 100644 webtools/remora/app/tests/lib/cli_reporter.php create mode 100644 webtools/remora/app/tests/lib/rss_writer_class.php create mode 100644 webtools/remora/app/tests/lib/show_passes.php create mode 100644 webtools/remora/app/tests/lib/test_manager.php create mode 100644 webtools/remora/app/tests/lib/xml_writer_class.php create mode 100644 webtools/remora/app/tests/rss2html.xsl create mode 100644 webtools/remora/app/tests/test_paths.php create mode 100644 webtools/remora/app/tests/tests.php create mode 100644 webtools/remora/app/views/addons/index.thtml create mode 100644 webtools/remora/app/views/layouts/developers.thtml create mode 100644 webtools/remora/app/views/tests/index.thtml create mode 100644 webtools/remora/app/views/tests/test_all.thtml create mode 100644 webtools/remora/app/webroot/.htaccess create mode 100644 webtools/remora/app/webroot/css.php create mode 100644 webtools/remora/app/webroot/css/cake.generic.css create mode 100644 webtools/remora/app/webroot/css/images/arrow.gif create mode 100755 webtools/remora/app/webroot/css/images/container_bg.gif create mode 100755 webtools/remora/app/webroot/css/images/logo.gif create mode 100755 webtools/remora/app/webroot/css/images/nav_bg.gif create mode 100755 webtools/remora/app/webroot/css/images/nav_item_bg.gif create mode 100644 webtools/remora/app/webroot/css/screen.css create mode 100644 webtools/remora/app/webroot/favicon.ico create mode 100644 webtools/remora/app/webroot/images/actionBarBackground.gif create mode 100644 webtools/remora/app/webroot/images/cake.power.png create mode 100644 webtools/remora/app/webroot/images/download.gif create mode 100644 webtools/remora/app/webroot/images/email.gif create mode 100644 webtools/remora/app/webroot/images/header.jpg create mode 100644 webtools/remora/app/webroot/images/install.gif create mode 100644 webtools/remora/app/webroot/images/remora.png create mode 100644 webtools/remora/app/webroot/images/remora2.png create mode 100644 webtools/remora/app/webroot/images/sidebarBackground.gif create mode 100644 webtools/remora/app/webroot/images/w3c_css.png create mode 100644 webtools/remora/app/webroot/images/w3c_xhtml10.png create mode 100644 webtools/remora/app/webroot/index.php create mode 100644 webtools/remora/app/webroot/js/vendors.php create mode 100644 webtools/remora/app/webroot/remora.sql create mode 100644 webtools/remora/app/webroot/sample/icon.gif create mode 100644 webtools/remora/app/webroot/sample/screenshot.gif create mode 100644 webtools/remora/app/webroot/sample/screenshot2.gif create mode 100644 webtools/remora/app/webroot/sample/screenshot3.gif create mode 100644 webtools/remora/app/webroot/test/index.php create mode 100644 webtools/remora/app/webroot/test/rss2html.xsl diff --git a/webtools/remora/app/.htaccess b/webtools/remora/app/.htaccess new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/config/acl.ini.php b/webtools/remora/app/config/acl.ini.php new file mode 100644 index 00000000000..9f169c5417c --- /dev/null +++ b/webtools/remora/app/config/acl.ini.php @@ -0,0 +1,76 @@ +; +; SVN FILE: $Id: acl.ini.php,v 1.1 2006-08-14 23:54:56 sancus%off.net Exp $ +;/** +; * Short description for file. +; * +; * +; * PHP versions 4 and 5 +; * +; * CakePHP : Rapid Development Framework +; * Copyright (c) 2006, Cake Software Foundation, Inc. +; * 1785 E. Sahara Avenue, Suite 490-204 +; * Las Vegas, Nevada 89104 +; * +; * Licensed under The MIT License +; * Redistributions of files must retain the above copyright notice. +; * +; * @filesource +; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. +; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project +; * @package cake +; * @subpackage cake.app.config +; * @since CakePHP v 0.10.0.1076 +; * @version $Revision: 1.1 $ +; * @modifiedby $LastChangedBy: phpnut $ +; * @lastmodified $Date: 2006-08-14 23:54:56 $ +; * @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/webtools/remora/app/config/bootstrap.php b/webtools/remora/app/config/bootstrap.php new file mode 100644 index 00000000000..c9d895b4d93 --- /dev/null +++ b/webtools/remora/app/config/bootstrap.php @@ -0,0 +1,46 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 0.10.8.2117 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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/webtools/remora/app/config/core.php b/webtools/remora/app/config/core.php new file mode 100644 index 00000000000..32c4285c2de --- /dev/null +++ b/webtools/remora/app/config/core.php @@ -0,0 +1,147 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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/webtools/remora/app/config/database.php b/webtools/remora/app/config/database.php new file mode 100644 index 00000000000..e3b7e50251e --- /dev/null +++ b/webtools/remora/app/config/database.php @@ -0,0 +1,75 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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' => 'root', + 'password' => '', + +'database' => 'addons', + 'prefix' => ''); + + var $test = array('driver' => 'mysql', + 'connect' => 'mysql_connect', + 'host' => 'localhost', + 'login' => 'root', + 'password' => '', + 'database' => 'addons_test', + 'prefix' => ''); +} +?> diff --git a/webtools/remora/app/config/database.php.default b/webtools/remora/app/config/database.php.default new file mode 100644 index 00000000000..028f5db26ac --- /dev/null +++ b/webtools/remora/app/config/database.php.default @@ -0,0 +1,74 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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/webtools/remora/app/config/inflections.php b/webtools/remora/app/config/inflections.php new file mode 100644 index 00000000000..53a4b25f272 --- /dev/null +++ b/webtools/remora/app/config/inflections.php @@ -0,0 +1,72 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 1.0.0.2312 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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/webtools/remora/app/config/routes.php b/webtools/remora/app/config/routes.php new file mode 100644 index 00000000000..24e4c35269c --- /dev/null +++ b/webtools/remora/app/config/routes.php @@ -0,0 +1,48 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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')); + + //$Route->connect('/developers', array('controller' => 'developers/addons', 'action' => 'index')); +?> diff --git a/webtools/remora/app/config/sql/db_acl.sql b/webtools/remora/app/config/sql/db_acl.sql new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/config/sql/remora.sql b/webtools/remora/app/config/sql/remora.sql new file mode 100644 index 00000000000..dc3f0fc9d34 --- /dev/null +++ b/webtools/remora/app/config/sql/remora.sql @@ -0,0 +1,688 @@ +-- phpMyAdmin SQL Dump +-- version 2.8.2.1 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Aug 14, 2006 at 01:59 PM +-- Server version: 4.1.20 +-- PHP Version: 4.3.9 +-- +-- Database: `addons` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `addons` +-- + +DROP TABLE IF EXISTS `addons`; +CREATE TABLE IF NOT EXISTS `addons` ( + `id` int(11) unsigned NOT NULL auto_increment, + `guid` varchar(255) NOT NULL default '', + `name` varchar(255) NOT NULL default '', + `addontype_id` int(11) unsigned NOT NULL default '0', + `icon` varchar(255) NOT NULL default '', + `homepage` varchar(255) NOT NULL default '', + `description` text NOT NULL, + `summary` text NOT NULL, + `averagerating` varchar(255) NOT NULL default '', + `weeklydownloads` int(11) unsigned NOT NULL default '0', + `totaldownloads` int(11) unsigned NOT NULL default '0', + `developercomments` text NOT NULL, + `inactive` tinyint(1) unsigned NOT NULL default '0', + `prerelease` tinyint(1) unsigned NOT NULL default '0', + `adminreview` tinyint(1) unsigned NOT NULL default '0', + `sitespecific` tinyint(1) unsigned NOT NULL default '0', + `externalsoftware` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + `approvalnotes` text NOT NULL, + `eula` text NOT NULL, + `privacypolicy` text NOT NULL, + PRIMARY KEY (`id`), + KEY `addontype_id` (`addontype_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `addons` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `addons_tags` +-- + +DROP TABLE IF EXISTS `addons_tags`; +CREATE TABLE IF NOT EXISTS `addons_tags` ( + `addon_id` int(11) unsigned NOT NULL default '0', + `tag_id` int(11) unsigned NOT NULL default '0', + PRIMARY KEY (`addon_id`,`tag_id`), + KEY `tag_id` (`tag_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `addons_tags` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `addons_users` +-- + +DROP TABLE IF EXISTS `addons_users`; +CREATE TABLE IF NOT EXISTS `addons_users` ( + `addon_id` int(11) unsigned NOT NULL default '0', + `user_id` int(11) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`addon_id`,`user_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `addons_users` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `addontypes` +-- + +DROP TABLE IF EXISTS `addontypes`; +CREATE TABLE IF NOT EXISTS `addontypes` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) character set latin1 NOT NULL default '', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `addontypes` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `applications` +-- + +DROP TABLE IF EXISTS `applications`; +CREATE TABLE IF NOT EXISTS `applications` ( + `id` int(11) unsigned NOT NULL auto_increment, + `guid` varchar(255) character set latin1 NOT NULL default '', + `name` varchar(255) character set latin1 NOT NULL default '', + `shortname` varchar(255) character set latin1 NOT NULL default '', + `supported` tinyint(1) NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `applications` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `applications_versions` +-- + +DROP TABLE IF EXISTS `applications_versions`; +CREATE TABLE IF NOT EXISTS `applications_versions` ( + `application_id` int(11) unsigned NOT NULL default '0', + `version_id` int(11) unsigned NOT NULL default '0', + `min` varchar(255) character set latin1 NOT NULL default '', + `max` varchar(255) character set latin1 NOT NULL default '', + `public` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`application_id`,`version_id`), + KEY `version_id` (`version_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `applications_versions` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `approvals` +-- + +DROP TABLE IF EXISTS `approvals`; +CREATE TABLE IF NOT EXISTS `approvals` ( + `id` int(11) unsigned NOT NULL auto_increment, + `user_id` int(11) unsigned NOT NULL default '0', + `action` varchar(255) character set latin1 NOT NULL default '', + `file_id` int(11) unsigned NOT NULL default '0', + `comments` text character set latin1 NOT NULL, + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`), + KEY `file_id` (`file_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `approvals` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `appversions` +-- + +DROP TABLE IF EXISTS `appversions`; +CREATE TABLE IF NOT EXISTS `appversions` ( + `id` int(11) unsigned NOT NULL auto_increment, + `application_id` int(11) unsigned NOT NULL default '0', + `version` varchar(255) NOT NULL default '', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `application_id` (`application_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `appversions` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `blapps` +-- + +DROP TABLE IF EXISTS `blapps`; +CREATE TABLE IF NOT EXISTS `blapps` ( + `id` int(11) unsigned NOT NULL auto_increment, + `blitem_id` int(11) unsigned NOT NULL default '0', + `guid` int(11) default NULL, + `min` varchar(255) character set latin1 default NULL, + `max` varchar(255) character set latin1 default NULL, + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `blitem_id` (`blitem_id`), + KEY `guid` (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `blapps` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `blitems` +-- + +DROP TABLE IF EXISTS `blitems`; +CREATE TABLE IF NOT EXISTS `blitems` ( + `id` int(11) unsigned NOT NULL auto_increment, + `guid` varchar(255) character set latin1 NOT NULL default '', + `min` varchar(255) character set latin1 default NULL, + `max` varchar(255) character set latin1 default NULL, + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `blitems` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `cake_sessions` +-- + +DROP TABLE IF EXISTS `cake_sessions`; +CREATE TABLE IF NOT EXISTS `cake_sessions` ( + `id` varchar(255) NOT NULL default '', + `data` text, + `expires` int(11) default NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `cake_sessions` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `downloads` +-- + +DROP TABLE IF EXISTS `downloads`; +CREATE TABLE IF NOT EXISTS `downloads` ( + `id` int(11) unsigned NOT NULL auto_increment, + `file_id` int(11) unsigned default NULL, + `userip` varchar(255) NOT NULL default '', + `useragent` varchar(255) NOT NULL default '', + `counted` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `file_id` (`file_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `downloads` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `features` +-- + +DROP TABLE IF EXISTS `features`; +CREATE TABLE IF NOT EXISTS `features` ( + `id` int(11) unsigned NOT NULL auto_increment, + `addon_id` int(11) unsigned NOT NULL default '0', + `start` datetime NOT NULL default '0000-00-00 00:00:00', + `end` datetime NOT NULL default '0000-00-00 00:00:00', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `addon_id` (`addon_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `features` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `files` +-- + +DROP TABLE IF EXISTS `files`; +CREATE TABLE IF NOT EXISTS `files` ( + `id` int(11) unsigned NOT NULL auto_increment, + `version_id` int(11) unsigned NOT NULL default '0', + `platform_id` int(11) unsigned NOT NULL default '0', + `filename` varchar(255) character set latin1 NOT NULL default '', + `size` varchar(255) character set latin1 NOT NULL default '', + `hash` varchar(255) character set latin1 NOT NULL default '', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `version_id` (`version_id`), + KEY `platform_id` (`platform_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `files` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `langs` +-- + +DROP TABLE IF EXISTS `langs`; +CREATE TABLE IF NOT EXISTS `langs` ( + `id` varchar(255) NOT NULL default '', + `name` varchar(255) NOT NULL default '', + `meta` varchar(255) NOT NULL default '', + `error_text` varchar(255) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `langs` +-- + +INSERT INTO `langs` (`id`, `name`, `meta`, `error_text`) VALUES ('en-US', 'en-US', 'en-US', ''), +('en-GB', 'en-GB', 'en-GB', ''), +('fr', 'fr', 'fr', ''), +('de', 'de', 'de', ''), +('ja', 'ja', 'ja', ''), +('pl', 'pl', 'pl', ''), +('es-ES', 'es-ES', 'es-ES', ''), +('zh-CN', 'zh-CN', 'zh-CN', ''), +('zh-TW', 'zh-TW', 'zh-TW', ''), +('cs', 'cs', 'cs', ''), +('da', 'da', 'da', ''), +('nl', 'nl', 'nl', ''), +('fi', 'fi', 'fi', ''), +('hu', 'hu', 'hu', ''), +('it', 'it', 'it', ''), +('ko', 'ko', 'ko', ''), +('pt-BR', 'pt-BR', 'pt-BR', ''), +('ru', 'ru', 'ru', ''), +('es-AR', 'es-AR', 'es-AR', ''), +('sv-SE', 'sv-SE', 'sv-SE', ''), +('tr', 'tr', 'tr', ''); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `platforms` +-- + +DROP TABLE IF EXISTS `platforms`; +CREATE TABLE IF NOT EXISTS `platforms` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) NOT NULL default '', + `shortname` varchar(255) NOT NULL default '', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `platforms` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `previews` +-- + +DROP TABLE IF EXISTS `previews`; +CREATE TABLE IF NOT EXISTS `previews` ( + `id` int(11) unsigned NOT NULL auto_increment, + `addon_id` int(11) unsigned NOT NULL default '0', + `filename` varchar(255) NOT NULL default '', + `caption` varchar(255) NOT NULL default '', + `highlight` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `addon_id` (`addon_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `previews` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `reviewratings` +-- + +DROP TABLE IF EXISTS `reviewratings`; +CREATE TABLE IF NOT EXISTS `reviewratings` ( + `review_id` int(11) unsigned NOT NULL default '0', + `user_id` int(11) unsigned NOT NULL default '0', + `helpful` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`review_id`,`user_id`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `reviewratings` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `reviews` +-- + +DROP TABLE IF EXISTS `reviews`; +CREATE TABLE IF NOT EXISTS `reviews` ( + `id` int(11) unsigned NOT NULL auto_increment, + `version_id` int(11) unsigned NOT NULL default '0', + `rating` int(11) unsigned NOT NULL default '0', + `title` varchar(255) NOT NULL default '', + `body` text NOT NULL, + `editorreview` tinyint(1) unsigned NOT NULL default '0', + `flag` tinyint(1) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `version_id` (`version_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `reviews` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tags` +-- + +DROP TABLE IF EXISTS `tags`; +CREATE TABLE IF NOT EXISTS `tags` ( + `id` int(11) unsigned NOT NULL auto_increment, + `name` varchar(255) NOT NULL default '', + `description` text NOT NULL, + `addontype_id` int(11) unsigned NOT NULL default '0', + `application_id` int(11) unsigned NOT NULL default '0', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `addontype_id` (`addontype_id`), + KEY `application_id` (`application_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `tags` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `translations` +-- + +DROP TABLE IF EXISTS `translations`; +CREATE TABLE IF NOT EXISTS `translations` ( + `id` varchar(255) NOT NULL default '', + `page_id` varchar(255) NOT NULL default '', + `en-US` text, + `en-GB` text, + `fr` text, + `de` text, + `ja` text, + `pl` text, + `es-ES` text, + `zh-CN` text, + `zh-TW` text, + `cs` text, + `da` text, + `nl` text, + `fi` text, + `hu` text, + `it` text, + `ko` text, + `pt-BR` text, + `ru` text, + `es-AR` text, + `sv-SE` text, + `tr` text, + PRIMARY KEY (`id`,`page_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `translations` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `users` +-- + +DROP TABLE IF EXISTS `users`; +CREATE TABLE IF NOT EXISTS `users` ( + `id` int(11) unsigned NOT NULL auto_increment, + `cake_session_id` varchar(255) default NULL, + `username` varchar(255) NOT NULL default '', + `firstname` varchar(255) NOT NULL default '', + `lastname` varchar(255) NOT NULL default '', + `email` varchar(255) NOT NULL default '', + `emailhidden` tinyint(1) unsigned NOT NULL default '0', + `homepage` varchar(255) NOT NULL default '', + `confirmationcode` varchar(255) NOT NULL default '', + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modified` datetime NOT NULL default '0000-00-00 00:00:00', + `notes` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email` (`email`), + KEY `cake_session_id` (`cake_session_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `users` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `versions` +-- + +DROP TABLE IF EXISTS `versions`; +CREATE TABLE IF NOT EXISTS `versions` ( + `id` int(11) unsigned NOT NULL auto_increment, + `addon_id` int(11) unsigned NOT NULL default '0', + `version` varchar(255) NOT NULL default '', + `dateaded` datetime NOT NULL default '0000-00-00 00:00:00', + `dateapproved` datetime NOT NULL default '0000-00-00 00:00:00', + `dateupdated` datetime NOT NULL default '0000-00-00 00:00:00', + `approved` tinyint(1) unsigned NOT NULL default '0', + `releasenotes` text NOT NULL, + `created` datetime NOT NULL default '0000-00-00 00:00:00', + `modifid` datetime NOT NULL default '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + KEY `addon_id` (`addon_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `versions` +-- + + +-- +-- Constraints for dumped tables +-- + +-- +-- Constraints for table `addons` +-- +ALTER TABLE `addons` + ADD CONSTRAINT `addons_ibfk_1` FOREIGN KEY (`addontype_id`) REFERENCES `addontypes` (`id`); + +-- +-- Constraints for table `addons_tags` +-- +ALTER TABLE `addons_tags` + ADD CONSTRAINT `addons_tags_ibfk_4` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`), + ADD CONSTRAINT `addons_tags_ibfk_3` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`); + +-- +-- Constraints for table `addons_users` +-- +ALTER TABLE `addons_users` + ADD CONSTRAINT `addons_users_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), + ADD CONSTRAINT `addons_users_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`); + +-- +-- Constraints for table `applications_versions` +-- +ALTER TABLE `applications_versions` + ADD CONSTRAINT `applications_versions_ibfk_2` FOREIGN KEY (`version_id`) REFERENCES `versions` (`id`), + ADD CONSTRAINT `applications_versions_ibfk_1` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`); + +-- +-- Constraints for table `approvals` +-- +ALTER TABLE `approvals` + ADD CONSTRAINT `approvals_ibfk_2` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`), + ADD CONSTRAINT `approvals_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`); + +-- +-- Constraints for table `appversions` +-- +ALTER TABLE `appversions` + ADD CONSTRAINT `appversions_ibfk_1` FOREIGN KEY (`application_id`) REFERENCES `applications` (`id`); + +-- +-- Constraints for table `blapps` +-- +ALTER TABLE `blapps` + ADD CONSTRAINT `blapps_ibfk_1` FOREIGN KEY (`blitem_id`) REFERENCES `blitems` (`id`); + +-- +-- Constraints for table `downloads` +-- +ALTER TABLE `downloads` + ADD CONSTRAINT `downloads_ibfk_1` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`); + +-- +-- Constraints for table `features` +-- +ALTER TABLE `features` + ADD CONSTRAINT `features_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`); + +-- +-- Constraints for table `files` +-- +ALTER TABLE `files` + ADD CONSTRAINT `files_ibfk_2` FOREIGN KEY (`platform_id`) REFERENCES `platforms` (`id`), + ADD CONSTRAINT `files_ibfk_1` FOREIGN KEY (`version_id`) REFERENCES `versions` (`id`); + +-- +-- Constraints for table `previews` +-- +ALTER TABLE `previews` + ADD CONSTRAINT `previews_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`); + +-- +-- Constraints for table `reviewratings` +-- +ALTER TABLE `reviewratings` + ADD CONSTRAINT `reviewratings_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`), + ADD CONSTRAINT `reviewratings_ibfk_1` FOREIGN KEY (`review_id`) REFERENCES `reviews` (`id`); + +-- +-- Constraints for table `reviews` +-- +ALTER TABLE `reviews` + ADD CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`version_id`) REFERENCES `versions` (`id`); + +-- +-- Constraints for table `users` +-- +ALTER TABLE `users` + ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`cake_session_id`) REFERENCES `cake_sessions` (`id`); diff --git a/webtools/remora/app/config/sql/sessions.sql b/webtools/remora/app/config/sql/sessions.sql new file mode 100644 index 00000000000..68a7dd26860 --- /dev/null +++ b/webtools/remora/app/config/sql/sessions.sql @@ -0,0 +1,11 @@ +-- @copyright Copyright (c) 2006, Cake Software Foundation, Inc. +-- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project +-- @since CakePHP v 0.10.8.1997 +-- @version $Revision: 1.1 $ + +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/webtools/remora/app/controllers/addons_controller.php b/webtools/remora/app/controllers/addons_controller.php new file mode 100644 index 00000000000..0777280fc87 --- /dev/null +++ b/webtools/remora/app/controllers/addons_controller.php @@ -0,0 +1,15 @@ +layout = 'developers'; + $this->set('addons', $this->Addon->findall()); + } +} + +?> diff --git a/webtools/remora/app/index.php b/webtools/remora/app/index.php new file mode 100644 index 00000000000..a708e1765fc --- /dev/null +++ b/webtools/remora/app/index.php @@ -0,0 +1,26 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app + * @since CakePHP v 0.10.0.1076 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @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/webtools/remora/app/models/addon.php b/webtools/remora/app/models/addon.php new file mode 100644 index 00000000000..3fce5d1b9dc --- /dev/null +++ b/webtools/remora/app/models/addon.php @@ -0,0 +1,72 @@ + + array('className' => 'Addontype', + 'conditions' => '', + 'order' => '', + 'dependent' => false, + 'foreignKey' => 'addontype_id' + ) + ); + var $hasMany = array('Version' => + array('className' => 'Version', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'addon_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ), + 'Preview' => + array('className' => 'Preview', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'addon_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ), + 'Feature' => + array('classname' => 'Feature', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'addon_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ) + ); + var $hasAndBelongsToMany = array('User' => + array('className' => 'User', + 'joinTable' => 'addons_users', + 'foreignKey' => 'addon_id', + 'associationForeignKey'=> 'user_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ), + 'Tag' => + array('className' => 'Tag', + 'joinTable' => 'addons_tags', + 'foreignKey' => 'addon_id', + 'associationForeignKey'=> 'tag_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ) + + ); +} +?> diff --git a/webtools/remora/app/models/addontype.php b/webtools/remora/app/models/addontype.php new file mode 100644 index 00000000000..c2e881d2b0b --- /dev/null +++ b/webtools/remora/app/models/addontype.php @@ -0,0 +1,26 @@ + + array('className' => 'Addon', + 'conditions' => '', + 'order' => '', + 'foreignKey' => 'addontype_id' + ) + ); + + var $hasMany = array('Tag' => + array('className' => 'Tag', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'addontype_id', + 'dependent' => false, + 'exclusive' => false, + 'finderSql' => '' + ) + ); +} +?> diff --git a/webtools/remora/app/models/application.php b/webtools/remora/app/models/application.php new file mode 100644 index 00000000000..384b4ad6172 --- /dev/null +++ b/webtools/remora/app/models/application.php @@ -0,0 +1,41 @@ + + array('className' => 'Tag', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'application_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ), + 'Appversion' => + array('className' => 'Appversion', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'application_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ) + ); + var $hasAndBelongsToMany = array('Version' => + array('className' => 'Version', + 'joinTable' => 'applications_versions', + 'foreignKey' => 'application_id', + 'associationForeignKey'=> 'version_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ), + ); +} +?> diff --git a/webtools/remora/app/models/approval.php b/webtools/remora/app/models/approval.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/appversion.php b/webtools/remora/app/models/appversion.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/blapp.php b/webtools/remora/app/models/blapp.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/blitem.php b/webtools/remora/app/models/blitem.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/cake_session.php b/webtools/remora/app/models/cake_session.php new file mode 100644 index 00000000000..cb3527a6d04 --- /dev/null +++ b/webtools/remora/app/models/cake_session.php @@ -0,0 +1,15 @@ + + array('className' => 'User', + 'conditions' => '', + 'order' => '', + 'foreignKey' => 'cake_session_id' + ) + ); +} +?> \ No newline at end of file diff --git a/webtools/remora/app/models/download.php b/webtools/remora/app/models/download.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/feature.php b/webtools/remora/app/models/feature.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/file.php b/webtools/remora/app/models/file.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/lang.php b/webtools/remora/app/models/lang.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/platform.php b/webtools/remora/app/models/platform.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/preview.php b/webtools/remora/app/models/preview.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/review.php b/webtools/remora/app/models/review.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/reviewrating.php b/webtools/remora/app/models/reviewrating.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/tag.php b/webtools/remora/app/models/tag.php new file mode 100644 index 00000000000..6c71b908c16 --- /dev/null +++ b/webtools/remora/app/models/tag.php @@ -0,0 +1,33 @@ + + array('className' => 'Addon', + 'joinTable' => 'addons_tags', + 'foreignKey' => 'addon_id', + 'associationForeignKey'=> 'tag_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ) + ); + var $belongsTo = array('Addontype' => + array('className' => 'Addontype', + 'conditions' => '', + 'order' => '', + 'foreignKey' => 'addontype_id' + ), + 'Application' => + array('className' => 'Application', + 'conditions' => '', + 'order' => '', + 'foreignKey' => 'application_id' + ) + ); +} +?> diff --git a/webtools/remora/app/models/translation.php b/webtools/remora/app/models/translation.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/models/user.php b/webtools/remora/app/models/user.php new file mode 100644 index 00000000000..2cfe41059f6 --- /dev/null +++ b/webtools/remora/app/models/user.php @@ -0,0 +1,49 @@ + + array('className' => 'Addon', + 'joinTable' => 'addons_users', + 'foreignKey' => 'addon_id', + 'associationForeignKey'=> 'user_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ) + ); + var $hasOne = array('Cake_Session' => + array('className' => 'Cake_Session', + 'conditions' => '', + 'order' => '', + 'dependent' => true, + 'foreignKey' => 'cake_session_id' + ) + ); + var $hasMany = array('Approval' => + array('className' => 'Approval', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'user_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ), + 'Reviewrating' => + array('className' => 'Reviewrating', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'user_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ) + ); +} +?> diff --git a/webtools/remora/app/models/version.php b/webtools/remora/app/models/version.php new file mode 100644 index 00000000000..b51e9253537 --- /dev/null +++ b/webtools/remora/app/models/version.php @@ -0,0 +1,48 @@ + + array('className' => 'Addon', + 'conditions' => '', + 'order' => '', + 'foreignKey' => 'addon_id' + ) + ); + var $hasMany = array('Review' => + array('className' => 'Review', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'version_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ), + 'File' => + array('className' => 'File', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'foreignKey' => 'version_id', + 'dependent' => true, + 'exclusive' => false, + 'finderSql' => '' + ) + ); + var $hasAndBelongsToMany = array('Application' => + array('className' => 'Application', + 'joinTable' => 'applications_versions', + 'foreignKey' => 'application_id', + 'associationForeignKey'=> 'version_id', + 'conditions' => '', + 'order' => '', + 'limit' => '', + 'unique' => false, + 'finderSql' => '', + 'deleteQuery'=> '', + ), + ); +} +?> diff --git a/webtools/remora/app/tests/LICENSE.txt b/webtools/remora/app/tests/LICENSE.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/tests/README.txt b/webtools/remora/app/tests/README.txt new file mode 100644 index 00000000000..ac2e6041dfb --- /dev/null +++ b/webtools/remora/app/tests/README.txt @@ -0,0 +1,17 @@ +-------------------------------------------------------------------------------- +Cake Unit Test Suite +-------------------------------------------------------------------------------- +$Id: README.txt,v 1.1 2006-08-14 23:54:57 sancus%off.net Exp $ +$Date: 2006-08-14 23:54:57 $ +$LastChangedBy: phpnut $ +-------------------------------------------------------------------------------- + +RUNNING THE TESTS + +All test cases should have the file suffix '.test.php'. + Example: controller.test.php + +All group tests should have the file suffix '.group.php'. + Example: controller.group.php + +This test suite is already in the proper directory structure for you to upload to your application. diff --git a/webtools/remora/app/tests/app/cases/controllers/extensions_controller.test.php b/webtools/remora/app/tests/app/cases/controllers/extensions_controller.test.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/tests/app/cases/controllers/webpage_controller.test.php b/webtools/remora/app/tests/app/cases/controllers/webpage_controller.test.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/tests/app/cases/models/extension.test.php b/webtools/remora/app/tests/app/cases/models/extension.test.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/tests/config.ini.php b/webtools/remora/app/tests/config.ini.php new file mode 100644 index 00000000000..d7fb7cc9bbf --- /dev/null +++ b/webtools/remora/app/tests/config.ini.php @@ -0,0 +1,37 @@ +; +; SVN FILE: $Id: config.ini.php,v 1.1 2006-08-14 23:54:56 sancus%off.net Exp $ +;/** +; * Short description for file. +; * +; * Long description for file +; * +; * PHP versions 4 and 5 +; * +; * CakePHP Test Suite +; * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 +; * Author(s): Larry E. Masters aka PhpNut +; * +; * Portions modifiied from WACT Test Suite +; * Author(s): Harry Fuecks +; * Jon Ramsey +; * Jason E. Sweat +; * Franco Ponticelli +; * Lorenzo Alberton +; * +; * Licensed under The Open Group Test Suite License +; * Redistributions of files must retain the above copyright notice. +; * +; * @filesource +; * @author Larry E. Masters aka PhpNut +; * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 +; * @link http://www.phpnut.com/projects/ +; * @package tests +; * @since CakePHP Test Suite v 1.0.0.0 +; * @version $Revision: 1.1 $ +; * @modifiedby $LastChangedBy: phpnut $ +; * @lastmodified $Date: 2006-08-14 23:54:56 $ +; * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License +; */ + +[output] +TEST_OUTPUT = html \ No newline at end of file diff --git a/webtools/remora/app/tests/lib/cake_reporter.php b/webtools/remora/app/tests/lib/cake_reporter.php new file mode 100644 index 00000000000..0d1f0b28928 --- /dev/null +++ b/webtools/remora/app/tests/lib/cake_reporter.php @@ -0,0 +1,110 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @subpackage tests.libs + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +/** + * Short description for class. + * + * @package tests + * @subpackage tests.libs + * @since CakePHP Test Suite v 1.0.0.0 + */ +class CakeHtmlReporter extends HtmlReporter { + +/** + * Does nothing yet. The first output will + * be sent on the first test start. For use + * by a web browser. + * @access public + */ + function CakeHtmlReporter($character_set = 'ISO-8859-1') { + parent::HtmlReporter($character_set); + } +/** + * Paints the top of the web page setting the + * title to the name of the starting test. + * @param string $test_name Name class of test. + * @access public + */ + function paintHeader($test_name) { + $this->sendNoCacheHeaders(); + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "CakePHP Test Suite v 1.0.0.0 :: $test_name\n"; + print "\n"; + print "\n"; + print "\n\n"; + print "
\n"; + print "
\n"; + print "\"\"
\n"; + print "
\n"; + print "

CakePHP Test Suite v 1.0.0.0

\n"; + print "

$test_name

\n"; + flush(); + } +/** + * Paints the end of the test with a summary of + * the passes and failures. + * @param string $test_name Name class of test. + * @access public + * + */ + function paintFooter($test_name) { + $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green"); + print "
"; + print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount(); + print " test cases complete:\n"; + print "" . $this->getPassCount() . " passes, "; + print "" . $this->getFailCount() . " fails and "; + print "" . $this->getExceptionCount() . " exceptions."; + print "
\n"; + } + + function paintPass($message) { + parent::paintPass($message); + print "Pass: "; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print implode("->", $breadcrumb); + print "->$message
\n"; + } +} + +?> diff --git a/webtools/remora/app/tests/lib/cake_web_test_case.php b/webtools/remora/app/tests/lib/cake_web_test_case.php new file mode 100644 index 00000000000..2798d03ed83 --- /dev/null +++ b/webtools/remora/app/tests/lib/cake_web_test_case.php @@ -0,0 +1,50 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +/** + * Short description + */ + SimpleTestOptions::ignore('CakeWebTestCase'); + +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class CakeWebTestCase extends WebTestCase { +} +?> \ No newline at end of file diff --git a/webtools/remora/app/tests/lib/cli_reporter.php b/webtools/remora/app/tests/lib/cli_reporter.php new file mode 100644 index 00000000000..a041d9e3db0 --- /dev/null +++ b/webtools/remora/app/tests/lib/cli_reporter.php @@ -0,0 +1,116 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + if (! defined('ST_FAILDETAIL_SEPARATOR')) { + define('ST_FAILDETAIL_SEPARATOR', "->"); + } + + if (! defined('ST_FAILS_RETURN_CODE')) { + define('ST_FAILS_RETURN_CODE', 1); + } + + if (version_compare(phpversion(), '4.3.0', '<') || + php_sapi_name() == 'cgi') { + define('STDOUT', fopen('php://stdout', 'w')); + define('STDERR', fopen('php://stderr', 'w')); + register_shutdown_function( + create_function('', 'fclose(STDOUT); fclose(STDERR); return true;')); + } + +/** + * Minimal command line test displayer. Writes fail details to STDERR. Returns 0 + * to the shell if all tests pass, ST_FAILS_RETURN_CODE if any test fails. + */ +class CLIReporter extends SimpleReporter { + var $faildetail_separator = ST_FAILDETAIL_SEPARATOR; + + function CLIReporter($faildetail_separator = NULL) { + $this->SimpleReporter(); + if (! is_null($faildetail_separator)) { + $this->setFailDetailSeparator($faildetail_separator); + } + } + + function setFailDetailSeparator($separator) { + $this->faildetail_separator = $separator; + } +/** + * Return a formatted faildetail for printing. + */ + function &_paintTestFailDetail(&$message) { + $buffer = ''; + $faildetail = $this->getTestList(); + array_shift($faildetail); + $buffer .= implode($this->faildetail_separator, $faildetail); + $buffer .= $this->faildetail_separator . "$message\n"; + return $buffer; + } +/** + * Paint fail faildetail to STDERR. + */ + function paintFail($message) { + parent::paintFail($message); + fwrite(STDERR, 'FAIL' . $this->faildetail_separator . $this->_paintTestFailDetail($message)); + } +/** + * Paint exception faildetail to STDERR. + */ + function paintException($message) { + parent::paintException($message); + fwrite(STDERR, 'EXCEPTION' . $this->faildetail_separator . $this->_paintTestFailDetail($message)); + } +/** + * Paint a footer with test case name, timestamp, counts of fails and exceptions. + */ + function paintFooter($test_name) { + $buffer = $this->getTestCaseProgress() . '/' . $this->getTestCaseCount() . ' test cases complete: '; + + if (0 < ($this->getFailCount() + $this->getExceptionCount())) { + $buffer .= $this->getPassCount() . " passes"; + if (0 < $this->getFailCount()) { + $buffer .= ", " . $this->getFailCount() . " fails"; + } + if (0 < $this->getExceptionCount()) { + $buffer .= ", " . $this->getExceptionCount() . " exceptions"; + } + $buffer .= ".\n"; + fwrite(STDOUT, $buffer); + exit(ST_FAILS_RETURN_CODE); + } else { + fwrite(STDOUT, $buffer . $this->getPassCount() . " passes.\n"); + } + } +} +?> \ No newline at end of file diff --git a/webtools/remora/app/tests/lib/rss_writer_class.php b/webtools/remora/app/tests/lib/rss_writer_class.php new file mode 100644 index 00000000000..8838b987a27 --- /dev/null +++ b/webtools/remora/app/tests/lib/rss_writer_class.php @@ -0,0 +1,389 @@ +error=("required ".$scope." property \"".$property."\" is already set"); + return 0; + } + $required[$property]=1; + $required_properties++; + } + else + { + if(IsSet($optional[$property])) + { + if($optional[$property]) + { + $this->error=("optional ".$scope." property \"".$property."\" is already set"); + return 0; + } + $optional[$property]=1; + } + else + { + if(GetType($colon=strpos($property,":",0))=="integer") + { + $namespace=substr($property,0,$colon); + if(!(!strcmp($namespace,"rdf") || IsSet($this->rssnamespaces[$namespace]))) + $this->error=("the name space of property \"".$property."\" was not declared"); + } + else + $this->error=("\"".$property."\" is not a supported ".$scope." property"); + } + } + if(!($this->adddatatag($property,$noattributes,$properties[$property],$parent,$path))) + return 0; + Next($properties); + $end=(GetType($property=Key($properties))!="string"); + } + if($required_propertieserror=("it was not specified the required ".$scope." property \"".$property."\""); + return 0; + } + Next($required); + $end=(GetType($property=Key($required))!="string"); + } + } + return 1; + } + + /* + * Public functions + * + */ + Function addchannel(&$properties) + { + if(strcmp($this->error,"")) + return 0; + if(strcmp($this->channel,"")) + { + $this->error="a channel was already added"; + return 0; + } + $channel_attributes=array(); + switch($this->specification) + { + case "0.9": + $root="rdf:RDF"; + $attributes=array("xmlns:rdf"=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns"=>"http://my.netscape.com/rdf/simple/0.9/"); + $required=array("description"=>0,"link"=>0,"title"=>0); + $optional=array(); + break; + case "0.91": + $root="rss"; + $attributes=array("version"=>$this->specification); + $required=array("description"=>0,"language"=>0,"link"=>0,"title"=>0); + $optional=array("copyright"=>0,"docs"=>0,"lastBuildDate"=>0,"managingEditor"=>0,"pubDate"=>0,"rating"=>0,"webMaster"=>0); + break; + case "1.0": + if(!strcmp($this->about,"")) + { + $this->error="it was not specified the about URL attribute"; + return 0; + } + $root="rdf:RDF"; + $attributes=array("xmlns:rdf"=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns"=>"http://purl.org/rss/1.0/"); + Reset($this->rssnamespaces); + $end=(GetType($namespace=Key($this->rssnamespaces))!="string"); + for(;!$end;) + { + if(!strcmp($namespace,"rdf")) + { + $this->error="the rdf namespace is being redeclared"; + return 0; + } + $attributes[("xmlns:".$namespace)]=$this->rssnamespaces[$namespace]; + Next($this->rssnamespaces); + $end=(GetType($namespace=Key($this->rssnamespaces))!="string"); + } + $channel_attributes=array("rdf:about"=>$this->about); + $required=array("description"=>0,"link"=>0,"title"=>0); + $optional=array(); + break; + default: + $this->error="it was not specified a supported RSS specification version"; + return 0; + } + $this->addtag($root,$attributes,"",$path,1); + $this->root=$path; + if(!($this->addtag("channel",$channel_attributes,$this->root,$path,1))) + return 0; + if(!($this->addrssproperties($properties,$path,$required,$optional,"channel"))) + return 0; + $this->channel=$path; + return 1; + } + + Function additem(&$properties) + { + if(strcmp($this->error,"")) + return 0; + if(!strcmp($this->channel,"")) + { + $this->error="the channel was not yet added"; + return 0; + } + if(strcmp($this->textinput,"")) + { + $this->error="items can not be added to the channel after defining the textinput"; + return 0; + } + $attributes=array(); + switch($this->specification) + { + case "0.9": + $parent=$this->root; + break; + case "0.91": + $parent=$this->channel; + break; + case "1.0": + if(IsSet($properties["link"])) + $attributes["rdf:about"]=$properties["link"]; + $parent=$this->root; + break; + default: + $this->error="it was not specified a supported RSS specification version"; + return 0; + } + if(!($this->addtag("item",$attributes,$parent,$path,1))) + return 0; + $required=array("link"=>0,"title"=>0); + $optional=array("description"=>0); + if(!($this->addrssproperties($properties,$path,$required,$optional,"item"))) + return 0; + if(!strcmp($this->specification,"1.0")) + { + if(!strcmp($this->itemsequence,"")) + { + $attributes=array(); + if(!($this->addtag("items",$attributes,$this->channel,$path,1) && $this->addtag("rdf:Seq",$attributes,$path,$path,1))) + return 0; + $this->itemsequence=$path; + } + $attributes=array("rdf:resource"=>$properties["link"]); + if(!($this->addtag("rdf:li",$attributes,$this->itemsequence,$path,0))) + return 0; + } + $this->items++; + return 1; + } + + Function addimage(&$properties) + { + if(strcmp($this->error,"")) + return 0; + if(!strcmp($this->channel,"")) + { + $this->error="the channel was not yet added"; + return 0; + } + if(strcmp($this->image,"")) + { + $this->error="the channel image was already associated"; + return 0; + } + if($this->items!=0) + { + $this->error="the image can only be defined before adding the channel items"; + return 0; + } + $attributes=array(); + switch($this->specification) + { + case "0.9": + $parent=$this->root; + break; + case "0.91": + $parent=$this->channel; + break; + case "1.0": + if(IsSet($properties["url"])) + $attributes["rdf:about"]=$properties["url"]; + $parent=$this->root; + break; + default: + $this->error="it was not specified a supported RSS specification version"; + return 0; + } + if(!($this->addtag("image",$attributes,$parent,$path,1))) + return 0; + $this->image=$path; + $required=array("link"=>0,"title"=>0,"url"=>0); + $optional=array("description"=>0,"width"=>0,"height"=>0); + if(!($this->addrssproperties($properties,$this->image,$required,$optional,"image"))) + return 0; + if(!strcmp($this->specification,"1.0")) + { + $attributes=array("rdf:resource"=>$properties["url"]); + return $this->addtag("image",$attributes,$this->channel,$path,0); + } + return 1; + } + + Function addtextinput(&$properties) + { + if(strcmp($this->error,"")) + return 0; + if(!strcmp($this->channel,"")) + { + $this->error="the channel was not yet added"; + return 0; + } + if(strcmp($this->textinput,"")) + { + $this->error="the channel text input was already associated"; + return 0; + } + if($this->items==0 && !$this->allownoitems) + { + $this->error="it were not specified any items before defining the channel text input"; + return 0; + } + $attributes=array(); + switch($this->specification) + { + case "0.9": + $parent=$this->root; + break; + case "0.91": + $parent=$this->channel; + break; + case "1.0": + if(IsSet($properties["link"])) + $attributes["rdf:about"]=$properties["link"]; + $parent=$this->root; + break; + default: + $this->error="it was not specified a supported RSS specification version"; + return 0; + } + if(!($this->addtag("textinput",$attributes,$parent,$path,1))) + return 0; + $this->textinput=$path; + $required=array("description"=>0,"link"=>0,"name"=>0,"title"=>0); + $optional=array(); + if(!($this->addrssproperties($properties,$this->textinput,$required,$optional,"textinput"))) + return 0; + if(!strcmp($this->specification,"1.0")) + { + $attributes=array("rdf:resource"=>$properties["link"]); + return $this->addtag("textinput",$attributes,$this->channel,$path,0); + } + return 1; + } + + Function writerss(&$output) + { + if(strcmp($this->error,"")) + return 0; + if(!strcmp($this->channel,"")) + { + $this->error="it was not defined the RSS channel"; + return 0; + } + if($this->items==0 && !$this->allownoitems) + { + $this->error="it were not defined any RSS channel items"; + return 0; + } + switch($this->specification) + { + case "0.9": + $this->dtdtype="PUBLIC"; + $this->dtddefinition="-//Netscape Communications//DTD RSS 0.9//EN"; + $this->dtdurl="http://my.netscape.com/publish/formats/rss-0.9.dtd"; + break; + case "0.91": + $this->dtdtype="PUBLIC"; + $this->dtddefinition="-//Netscape Communications//DTD RSS 0.91//EN"; + $this->dtdurl="http://my.netscape.com/publish/formats/rss-0.91.dtd"; + break; + case "1.0": + $this->dtdtype=""; + break; + default: + $this->error="it was not specified a supported RSS specification version"; + return 0; + } + return $this->write($output); + } +}; + +} +?> \ No newline at end of file diff --git a/webtools/remora/app/tests/lib/show_passes.php b/webtools/remora/app/tests/lib/show_passes.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/tests/lib/test_manager.php b/webtools/remora/app/tests/lib/test_manager.php new file mode 100644 index 00000000000..590cd4fa245 --- /dev/null +++ b/webtools/remora/app/tests/lib/test_manager.php @@ -0,0 +1,549 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: dho $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class TestManager { + var $_testExtension = '.test.php'; + var $_groupExtension = '.group.php'; + var $usersAppTest = false; + + function TestManager() { + $this->_installSimpleTest(); + if (isset($_GET['app'])) { + $this->usersAppTest = true; + } + } + + function _installSimpleTest() { + vendor('simpletest'.DS.'unit_tester', 'simpletest'.DS.'web_tester', 'simpletest'.DS.'mock_objects'); + require_once(LIB_TESTS.'cake_web_test_case.php'); + } + + function setOutputFromIni($iniFile) { + if (! file_exists($iniFile)) { + trigger_error("Missing configuration file {$iniFile}", E_USER_ERROR); + } + $config = parse_ini_file($iniFile, TRUE); + foreach ($config['output'] as $key => $value) { + define($key, $value); + } + } + + function runAllTests(&$reporter) { + $manager =& new TestManager(); + + if(!empty($manager->usersAppTest)) { + $testCasePath = APP_TEST_CASES . DIRECTORY_SEPARATOR; + } else { + $testCasePath = CORE_TEST_CASES . DIRECTORY_SEPARATOR; + } + $testCases =& $manager->_getTestFileList($testCasePath); + $test =& new GroupTest('All Core Tests'); + + if (isset($_GET['app'])) { + $test =& new GroupTest('All App Tests'); + } else { + $test =& new GroupTest('All Core Tests'); + } + + foreach ($testCases as $testCase) { + $test->addTestFile($testCase); + } + $test->run($reporter); + } + + function runTestCase($testCaseFile, &$reporter) { + $manager =& new TestManager(); + + if(!empty($manager->usersAppTest)) { + $testCaseFileWithPath = APP_TEST_CASES . DIRECTORY_SEPARATOR . $testCaseFile; + } else { + $testCaseFileWithPath = CORE_TEST_CASES . DIRECTORY_SEPARATOR . $testCaseFile; + } + if (! file_exists($testCaseFileWithPath)) { + trigger_error("Test case {$testCaseFile} cannot be found", E_USER_ERROR); + } + $test =& new GroupTest("Individual test case: " . $testCaseFile); + $test->addTestFile($testCaseFileWithPath); + $test->run($reporter); + } + + function runGroupTest($groupTestName, $groupTestDirectory, &$reporter) { + $manager =& new TestManager(); + $filePath = $groupTestDirectory . DIRECTORY_SEPARATOR . + strtolower($groupTestName) . $manager->_groupExtension; + + if (! file_exists($filePath)) { + trigger_error("Group test {$groupTestName} cannot be found at {$filePath}", E_USER_ERROR); + } + + require_once $filePath; + $test =& new GroupTest($groupTestName . ' group test'); + + foreach ($manager->_getGroupTestClassNames($filePath) as $groupTest) { + $test->addTestCase(new $groupTest()); + } + $test->run($reporter); + } + + function addTestCasesFromDirectory(&$groupTest, $directory = '.') { + $manager =& new TestManager(); + $testCases =& $manager->_getTestFileList($directory); + foreach ($testCases as $testCase) { + $groupTest->addTestFile($testCase); + } + } + + function &getTestCaseList($directory = '.') { + $manager =& new TestManager(); + $return = $manager->_getTestCaseList($directory); + return $return; + } + + function &_getTestCaseList($directory = '.') { + $fileList =& $this->_getTestFileList($directory); + $testCases = array(); + foreach ($fileList as $testCaseFile) { + $testCases[$testCaseFile] = str_replace($directory . DS, '', $testCaseFile); + } + return $testCases; + } + + function &_getTestFileList($directory = '.') { + $return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestCaseFile')); + return $return; + } + + function &getGroupTestList($directory = '.') { + $manager =& new TestManager(); + $return = $manager->_getTestGroupList($directory); + return $return; + } + + function &_getTestGroupFileList($directory = '.') { + $return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestGroupFile')); + return $return; + } + + function &_getTestGroupList($directory = '.') { + $fileList =& $this->_getTestGroupFileList($directory); + $groupTests = array(); + + foreach ($fileList as $groupTestFile) { + $groupTests[$groupTestFile] = str_replace($this->_groupExtension, '', basename($groupTestFile)); + } + sort($groupTests); + return $groupTests; + } + + function &_getGroupTestClassNames($groupTestFile) { + $file = implode("\n", file($groupTestFile)); + preg_match("~lass\s+?(.*)\s+?extends GroupTest~", $file, $matches); + if (! empty($matches)) { + unset($matches[0]); + return $matches; + } else { + return array(); + } + } + + function &_getRecursiveFileList($directory = '.', $fileTestFunction) { + $dh = opendir($directory); + if (! is_resource($dh)) { + trigger_error("Couldn't open {$directory}", E_USER_ERROR); + } + + $fileList = array(); + while ($file = readdir($dh)) { + $filePath = $directory . DIRECTORY_SEPARATOR . $file; + if (0 === strpos($file, '.')) { + continue; + } + + if (is_dir($filePath)) { + $fileList = array_merge($fileList, $this->_getRecursiveFileList($filePath, $fileTestFunction)); + } + if ($fileTestFunction[0]->$fileTestFunction[1]($file)) { + $fileList[] = $filePath; + } + } + closedir($dh); + return $fileList; + } + + function _isTestCaseFile($file) { + return $this->_hasExpectedExtension($file, $this->_testExtension); + } + + function _isTestGroupFile($file) { + return $this->_hasExpectedExtension($file, $this->_groupExtension); + } + + function _hasExpectedExtension($file, $extension) { + return $extension == strtolower(substr($file, (0 - strlen($extension)))); + } +} +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class CliTestManager extends TestManager { + + function &getGroupTestList($directory = '.') { + $manager =& new CliTestManager(); + $groupTests =& $manager->_getTestGroupList($directory); + $buffer = "Available Group Test:\n"; + + foreach ($groupTests as $groupTest) { + $buffer .= " " . $groupTest . "\n"; + } + return $buffer . "\n"; + } + + function &getTestCaseList($directory = '.') { + $manager =& new CliTestManager(); + $testCases =& $manager->_getTestCaseList($directory); + $buffer = "Available Test Cases:\n"; + + foreach ($testCases as $testCaseFile => $testCase) { + $buffer .= " " . $testCaseFile . "\n"; + } + return $buffer . "\n"; + } +} +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class TextTestManager extends TestManager { + var $_url; + + function TextTestManager() { + $this->_url = $_SERVER['PHP_SELF']; + } + + function getBaseURL() { + return $this->_url; + } + + function &getGroupTestList($directory = '.') { + $manager =& new TextTestManager(); + $groupTests =& $manager->_getTestGroupList($directory); + + if (1 > count($groupTests)) { + $noGroups = "No test groups set up!\n"; + return $noGroups; + } + $buffer = "Available test groups:\n"; + $buffer .= $manager->getBaseURL() . "?group=all All tests<\n"; + + foreach ($groupTests as $groupTest) { + $buffer .= "
  • " . $groupTest . "&output=txt"."
  • \n"; + } + return $buffer . "\n"; + } + + function &getTestCaseList($directory = '.') { + $manager =& new TextTestManager(); + $testCases =& $manager->_getTestCaseList($directory); + + if (1 > count($testCases)) { + $noTestCases = "No test cases set up!"; + return $noTestCases; + } + $buffer = "Available test cases:\n"; + + foreach ($testCases as $testCaseFile => $testCase) { + $buffer .= $_SERVER['SERVER_NAME']. $manager->getBaseURL()."?case=" . $testCase . "&output=txt"."\n"; + } + return $buffer . "\n"; + } +} +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class HtmlTestManager extends TestManager { + var $_url; + + function HtmlTestManager() { + $this->_url = $_SERVER['PHP_SELF']; + } + + function getBaseURL() { + return $this->_url; + } + + function &getGroupTestList($directory = '.') { + $userApp = ''; + if (isset($_GET['app'])) { + $userApp = '&app=true'; + } + $manager =& new HtmlTestManager(); + $groupTests =& $manager->_getTestGroupList($directory); + + if (isset($_GET['app'])){ + $buffer = "

    Available App Test Groups:

    \n
      "; + } else { + $buffer = "

      Available Core Test Groups:

      \n\n"; + return $buffer; + } + + function &getTestCaseList($directory = '.') { + $userApp = ''; + if (isset($_GET['app'])) { + $userApp = '&app=true'; + } + $manager =& new HtmlTestManager(); + $testCases =& $manager->_getTestCaseList($directory); + + if (1 > count($testCases)) { + $noTestCases = "

      No test cases set up!

      "; + return $noTestCases; + } + if (isset($_GET['app'])) { + $buffer = "

      Available App Test Cases:

      \n
        "; + } else { + $buffer = "

        Available Core Test Cases:

        \n
          "; + } + foreach ($testCases as $testCaseFile => $testCase) { + $buffer .= !class_exists('CakeDummyTestClass') + ? "
        • " . $testCase . "
        • \n" + : "
        • " . $testCase . "
        • \n"; + } + $buffer .= "
        \n"; + return $buffer; + } +} +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class XmlTestManager extends HtmlTestManager { + + function XmlTestManager() { + parent::HtmlTestManager(); + } + + function &getGroupTestList($directory = '.') { + $userApp = ''; + if (isset($_GET['app'])) { + $userApp = '&app=true'; + } + $manager =& new XmlTestManager(); + $groupTests =& $manager->_getTestGroupList($directory); + $rss = & $manager->_getRssWriter(); + + if (1 > count($groupTests)) { + $rss->writeRss($output); + return $output; + } + $properties["title"]="All Tests"; + $properties["description"]="All Tests"; + $properties["link"]='http://'.$_SERVER['SERVER_NAME']. + $manager->getBaseURL()."?group=all&output=xml".$userApp; + $rss->additem($properties); + + foreach ($groupTests as $groupTest) { + $properties["title"]=$groupTest; + $properties["description"]=$groupTest; + $properties["link"]='http://'.$_SERVER['SERVER_NAME']. $manager->getBaseURL(). "?group={$groupTest}&output=xml.$userApp"; + $rss->additem($properties); + } + $rss->writeRss($output); + return $output; + } + + function &getTestCaseList($directory = '.') { + $userApp = ''; + if (isset($_GET['app'])) { + $userApp = '&app=true'; + } + $manager =& new XmlTestManager(); + $testCases =& $manager->_getTestCaseList($directory); + $rss = & $manager->_getRssWriter(); + + if (1 > count($testCases)) { + $rss->writeRss($output); + return $output; + } + + foreach ($testCases as $testCaseFile => $testCase) { + $properties["title"]=$testCase; + $properties["description"]=$testCase; + $properties["link"]='http://'.$_SERVER['SERVER_NAME']. $manager->getBaseURL()."?case=" . urlencode($testCase) . "&output=xml" . $userApp; + // Comment this out for performance? + $properties["dc:date"]=gmdate("Y-m-d\TH:i:sO",filemtime($testCaseFile)); + $rss->additem($properties); + } + $rss->writeRss($output); + return $output; + } + + function &_getRssWriter() { + + $cakeUrl = 'http://'.$_SERVER['SERVER_NAME'].str_replace('index.php','',$_SERVER['PHP_SELF']); + require_once TESTS . 'lib'.DIRECTORY_SEPARATOR.'xml_writer_class.php'; + require_once TESTS . 'lib'.DIRECTORY_SEPARATOR.'rss_writer_class.php'; + $rssWriterObject =& new rss_writer_class(); + $rssWriterObject->specification="1.0"; + $rssWriterObject->about=$cakeUrl."index.php?output=xml"; + $rssWriterObject->stylesheet=$cakeUrl."rss2html.xsl"; + $rssWriterObject->rssnamespaces["dc"]="http://purl.org/dc/elements/1.1/"; + // Channel Properties + $properties=array(); + $properties["title"]="CakePHP Test Suite :: Unit Test Cases"; + $properties["description"]="CakePHP Unit Test Cases"; + $properties["link"]="http://www.cakephp.org/"; + $properties["dc:date"]=gmdate("Y-m-d\TH:i:sO"); + $rssWriterObject->addchannel($properties); + + $properties=array(); + $properties["url"]="http://www.cakephp.org//img/cake.logo.png"; + $properties["link"]="http://www.cakephp.org/"; + $properties["title"]="CakePHP Logo"; + $properties["description"]="CakePHP Test Suite :: CakePHP :: Rapid Development Framework"; + $rssWriterObject->addimage($properties); + + return $rssWriterObject; + } +} +/** + * Short description for class. + * + * @package tests + * @subpackage tests.lib + * @since CakePHP Test Suite v 1.0.0.0 + */ +class RemoteTestManager extends TestManager { + + function RemoteTestManager() { + parent::TestManager(); + } + + function _installSimpleTest() { + parent::_installSimpleTest(); + vendor('simpletest'.DS.'remote'); + } + + function runAllTests(&$reporter, $url = FALSE) { + $groups = RemoteTestManager::getGroupTestList($url); + $T =& new RemoteTestCase($groups['All Tests']); + $T->run($reporter); + } + + function runTestCase($caseFile,& $reporter, $url = FALSE) { + $cases = RemoteTestManager::getTestCaseList($url); + $T =& new RemoteTestCase($cases[$caseFile]); + $T->run($reporter); + } + + function runGroupTest($groupName, &$reporter, $url = FALSE) { + $groups = RemoteTestManager::getGroupTestList($url); + $T =& new RemoteTestCase($groups[$groupName]); + $T->run($reporter); + } + + function & getGroupTestList($url = FALSE) { + if (!$url) { + $url = REMOTE_TEST_HTTP_PATH; + } + + $url .= '?output=xml'; + $manager =& new RemoteTestManager(); + $rss = & $manager->_getRssReader($url); + $groupList = array(); + + foreach ($rss->getItems() as $item) { + $groupList[$item['title']] = $item['link']; + } + return $groupList; + } + + function &getTestCaseList($url = FALSE) { + if (!$url) { + $url = REMOTE_TEST_HTTP_PATH; + } + $url .= '?show=cases&output=xml'; + $manager =& new RemoteTestManager(); + $rss = & $manager->_getRssReader($url); + $caseList = array(); + + foreach ($rss->getItems() as $item) { + $caseList[$item['title']] = $item['link']; + } + return $caseList; + } + + function &_getRssReader($url) { + require_once "XML/RSS.php"; + $rssReader =& new XML_RSS($url); + $status = $rssReader->parse(); + if (PEAR::isError($status) ) { + trigger_error($status->getMessage(),E_USER_WARNING); + } + return $rssReader; + } +} +?> diff --git a/webtools/remora/app/tests/lib/xml_writer_class.php b/webtools/remora/app/tests/lib/xml_writer_class.php new file mode 100644 index 00000000000..fe7aa3609da --- /dev/null +++ b/webtools/remora/app/tests/lib/xml_writer_class.php @@ -0,0 +1,312 @@ +inputencoding,$this->outputencoding)) + $encodeddata=$this->escapedata($data); + else + { + switch(strtolower($this->outputencoding)) + { + case "utf-8": + if(!strcmp(strtolower($this->inputencoding),"iso-8859-1")) + { + $encoded_data=utf8_encode($this->escapedata($data)); + $encodeddata=$encoded_data; + } + else + { + $this->error=("can not encode iso-8859-1 data in ".$this->outputencoding); + return 0; + } + break; + case "iso-8859-1": + if(!strcmp(strtolower($this->inputencoding),"utf-8")) + { + $decoded=utf8_decode($data); + $encodeddata=$this->escapedata($decoded); + } + else + { + $this->error=("can not encode utf-8 data in ".$this->outputencoding); + return 0; + } + break; + default: + $this->error=("can not encode data in ".$this->inputencoding); + return 0; + } + } + return 1; + } + + Function writetag(&$output,$path,$indent) + { + $tag=$this->structure[$path]["Tag"]; + $output.=("<".$tag); + $attributecount=count($this->structure[$path]["Attributes"]); + if($attributecount>0) + { + $attributes=$this->structure[$path]["Attributes"]; + Reset($attributes); + $end=(GetType($key=Key($attributes))!="string"); + for(;!$end;) + { + $output.=(" ".$key."=\"".$attributes[$key]."\""); + Next($attributes); + $end=(GetType($key=Key($attributes))!="string"); + } + } + $elements=$this->structure[$path]["Elements"]; + if($elements>0) + { + $output.=">"; + $doindent=$this->structure[$path]["Indent"]; + $elementindent=(($doindent) ? $this->linebreak.$indent.$this->indenttext : ""); + $element=0; + for(;$element<$elements;) + { + $elementpath=($path.",".strval($element)); + $output.=$elementindent; + if(IsSet($this->nodes[$elementpath])) + { + if(!($this->writetag($output,$elementpath,$indent.$this->indenttext))) + return 0; + } + else + $output.=$this->structure[$elementpath]; + $element++; + } + $output.=((($doindent) ? $this->linebreak.$indent : "").""); + } + else + $output.="/>"; + return 1; + } + + /* + * Public functions + * + */ + Function write(&$output) + { + if(strcmp($this->error,"")) + return 0; + if(!(IsSet($this->structure["0"]))) + { + $this->error="XML document structure is empty"; + return 0; + } + $output=("outputencoding."\"?>".$this->linebreak); + if(strcmp($this->dtdtype,"")) + { + $output.=("structure["0"]["Tag"]." "); + switch($this->dtdtype) + { + case "INTERNAL": + if(!strcmp($this->dtddefinition,"")) + { + $this->error="it was not specified a valid internal DTD definition"; + return 0; + } + $output.=("[".$this->linebreak.$this->dtddefinition.$this->linebreak."]"); + break; + case "SYSTEM": + if(!strcmp($this->dtdurl,"")) + { + $this->error="it was not specified a valid system DTD url"; + return 0; + } + $output.="SYSTEM"; + if(strcmp($this->dtddefinition,"")) + $output.=(" \"".$this->dtddefinition."\""); + $output.=(" \"".$this->dtdurl."\""); + break; + case "PUBLIC": + if(!strcmp($this->dtddefinition,"")) + { + $this->error="it was not specified a valid public DTD definition"; + return 0; + } + $output.=("PUBLIC \"".$this->dtddefinition."\""); + if(strcmp($this->dtdurl,"")) + $output.=(" \"".$this->dtdurl."\""); + break; + default: + $this->error="it was not specified a valid DTD type"; + return 0; + } + $output.=(">".$this->linebreak); + } + if(strcmp($this->stylesheet,"")) + { + if(!strcmp($this->stylesheettype,"")) + { + $this->error="it was not specified a valid stylesheet type"; + return 0; + } + $output.=("stylesheettype."\" href=\"".$this->stylesheet."\"?>".$this->linebreak); + } + if(strcmp($this->generatedcomment,"")) + $output.=("".$this->linebreak); + return $this->writetag($output,"0",""); + } + + Function addtag($tag,&$attributes,$parent,&$path,$indent) + { + if(strcmp($this->error,"")) + return 0; + $path=((!strcmp($parent,"")) ? "0" : ($parent.",".strval($this->structure[$parent]["Elements"]))); + if(IsSet($this->structure[$path])) + { + $this->error=("tag with path ".$path." is already defined"); + return 0; + } + $encodedattributes=array(); + Reset($attributes); + $end=(GetType($attribute_name=Key($attributes))!="string"); + for(;!$end;) + { + $encodedattributes[$attribute_name]=""; + if(!($this->encodedata($attributes[$attribute_name],$encoded_data))) + return 0; + $encodedattributes[$attribute_name]=$encoded_data; + Next($attributes); + $end=(GetType($attribute_name=Key($attributes))!="string"); + } + $this->structure[$path]=array( + "Tag"=>$tag, + "Attributes"=>$encodedattributes, + "Elements"=>0, + "Indent"=>$indent + ); + $this->nodes[$path]=1; + if(strcmp($parent,"")) + $this->structure[$parent]["Elements"]=($this->structure[$parent]["Elements"]+1); + return 1; + } + + Function adddata($data,$parent,&$path) + { + if(strcmp($this->error,"")) + return 0; + if(!(IsSet($this->structure[$parent]))) + { + $this->error=("the parent tag path".$path."is not defined"); + return 0; + } + if(!strcmp($data,"")) + return 1; + $path=($parent.",".strval($this->structure[$parent]["Elements"])); + if(!($this->encodedata($data,$encoded_data))) + return 0; + $this->structure[$path]=$encoded_data; + $this->structure[$parent]["Elements"]=($this->structure[$parent]["Elements"]+1); + return 1; + } + + Function adddatatag($tag,&$attributes,$data,$parent,&$path) + { + return $this->addtag($tag,$attributes,$parent,$path,0) && $this->adddata($data,$path,$datapath); + } +}; + +} +?> \ No newline at end of file diff --git a/webtools/remora/app/tests/rss2html.xsl b/webtools/remora/app/tests/rss2html.xsl new file mode 100644 index 00000000000..7de8d14bc19 --- /dev/null +++ b/webtools/remora/app/tests/rss2html.xsl @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + +<xsl:for-each select="rdf:RDF/rss:channel"> +<xsl:value-of select="rss:description"/> +</xsl:for-each> + + + + + +
        + + + + + + 0 + + +
        +
        + +
        +
        + + +
        + + + + ( + + ) + +
        +
        + +
          +
          + +
        • + + + + + ( + +) +
        • +
          +
          +
          +
        + + +
        + + + POST +
        + + + text + + + + + submit + +
        +
        +
        + + + +
        + +
        \ No newline at end of file diff --git a/webtools/remora/app/tests/test_paths.php b/webtools/remora/app/tests/test_paths.php new file mode 100644 index 00000000000..0094929b561 --- /dev/null +++ b/webtools/remora/app/tests/test_paths.php @@ -0,0 +1,35 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:56 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +/** + * Path to the simpletest directory and unit tests. + */ +define ('CORE_TEST_CASES', TESTS. 'core' .DS. 'cases'); +define ('CORE_TEST_GROUPS', TESTS. 'core' .DS. 'groups'); +define ('APP_TEST_CASES', TESTS. 'app' .DS. 'cases'); +define ('APP_TEST_GROUPS', TESTS. 'app' .DS. 'groups'); +?> \ No newline at end of file diff --git a/webtools/remora/app/tests/tests.php b/webtools/remora/app/tests/tests.php new file mode 100644 index 00000000000..6fc018641eb --- /dev/null +++ b/webtools/remora/app/tests/tests.php @@ -0,0 +1,298 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + error_reporting(E_ALL); + set_time_limit(600); + ini_set('memory_limit','128M'); +/** + * Get root directory + */ + if (!defined('DS')){ + define('DS', DIRECTORY_SEPARATOR); + } + if (!defined('ROOT')){ + define('ROOT', dirname(dirname(dirname(__FILE__))).DS); + } + if (!defined('WWW_ROOT')){ + define('WWW_ROOT', dirname(__FILE__).DS); + } + if (!defined('APP_DIR')){ + define ('APP_DIR', basename(dirname(dirname(__FILE__)))); + } + if (!defined('CORE_PATH')){ + define('CORE_PATH', ROOT.DS); + } + require_once 'cake'.DS.'basics.php'; + require_once 'cake'.DS.'config'.DS.'paths.php'; + require_once TESTS . 'test_paths.php'; + require_once TESTS . 'lib'.DS.'test_manager.php'; + vendor('simpletest'.DS.'reporter'); + if (!isset($_SERVER['SERVER_NAME'])){ + $_SERVER['SERVER_NAME'] = ''; + } + if (empty( $_GET['output'])){ + TestManager::setOutputFromIni(TESTS . 'config.ini.php'); + $_GET['output'] = TEST_OUTPUT; + } +/** + * + * Used to determine output to display + */ + define('CAKE_TEST_OUTPUT_HTML',1); + define('CAKE_TEST_OUTPUT_XML',2); + define('CAKE_TEST_OUTPUT_TEXT',3); + + if (isset($_GET['output']) && $_GET['output'] == 'xml'){ + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_XML); + } elseif (isset($_GET['output']) && $_GET['output'] == 'html') { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_HTML); + } else { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT); + } + + function &CakeTestsGetReporter() { + static $Reporter = NULL; + if ( !$Reporter ){ + switch (CAKE_TEST_OUTPUT){ + + case CAKE_TEST_OUTPUT_XML: + vendor('simpletest'.DS.'xml'); + $Reporter = new XmlReporter(); + break; + case CAKE_TEST_OUTPUT_HTML: + require_once TESTS . 'lib'.DS.'cake_reporter.php'; + $Reporter = new CakeHtmlReporter(); + break; + default: + $Reporter = new TextReporter(); + break; + } + } + return $Reporter; + } + + function CakePHPTestRunMore() { + switch (CAKE_TEST_OUTPUT) { + + case CAKE_TEST_OUTPUT_XML: + break; + case CAKE_TEST_OUTPUT_HTML: + $link = class_exists('Object') ? "

        Run more tests

        \n" + : "

        Run more tests

        \n"; + echo $link; + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + function CakePHPTestCaseList() { + switch (CAKE_TEST_OUTPUT) { + case CAKE_TEST_OUTPUT_XML: + if (isset($_GET['app'])) { + echo XmlTestManager::getTestCaseList(APP_TEST_CASES); + } else { + echo XmlTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + case CAKE_TEST_OUTPUT_HTML: + if (isset($_GET['app'])) { + echo HtmlTestManager::getTestCaseList(APP_TEST_CASES); + } else { + echo HtmlTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + if (isset($_GET['app'])) { + echo TextTestManager::getTestCaseList(APP_TEST_CASES); + } else { + echo TextTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + } + } + + function CakePHPTestGroupTestList() { + switch (CAKE_TEST_OUTPUT) { + + case CAKE_TEST_OUTPUT_XML: + if (isset($_GET['app'])) { + echo XmlTestManager::getGroupTestList(APP_TEST_GROUPS); + } else { + echo XmlTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + case CAKE_TEST_OUTPUT_HTML: + if (isset($_GET['app'])) { + echo HtmlTestManager::getGroupTestList(APP_TEST_GROUPS); + } else { + echo HtmlTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + if (isset($_GET['app'])) { + echo TextTestManager::getGroupTestList(APP_TEST_GROUPS); + } else { + echo TextTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + } + } + + function CakePHPTestHeader() { + switch (CAKE_TEST_OUTPUT) { + + case CAKE_TEST_OUTPUT_XML: + header(' content-Type: text/xml; charset="utf-8"'); + break; + case CAKE_TEST_OUTPUT_HTML: + $header = << + + + + CakePHP Test Suite v 1.0.0.0 + + + +EOF; + echo $header; + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + header(' content-type: text/plain'); + break; + } + } + + function CakePHPTestSuiteHeader() { + switch (CAKE_TEST_OUTPUT) { + + case CAKE_TEST_OUTPUT_XML: + break; + case CAKE_TEST_OUTPUT_HTML: + $groups = class_exists('Object') ? 'groups' : $_SERVER['PHP_SELF'].'?show=groups'; + $cases = class_exists('Object') ? 'cases' : $_SERVER['PHP_SELF'].'?show=cases'; + $suiteHeader = << + +
        +

        CakePHP Test Suite v 1.0.0.0

        +

        Core Test Groups || Core Test Cases

        +

        App Test Groups || App Test Cases

        +EOD; + echo $suiteHeader; + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + function CakePHPTestSuiteFooter() { + switch (CAKE_TEST_OUTPUT) { + + case CAKE_TEST_OUTPUT_XML: + break; + case CAKE_TEST_OUTPUT_HTML: + $footer = << + +
        + + +EOD; + echo $footer; + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + if (isset($_GET['group'])) { + + if ('all' == $_GET['group']) { + TestManager::runAllTests(CakeTestsGetReporter()); + } else { + if (isset($_GET['app'])) { + TestManager::runGroupTest(ucfirst($_GET['group']), APP_TEST_GROUPS, CakeTestsGetReporter()); + } else { + TestManager::runGroupTest(ucfirst($_GET['group']), CORE_TEST_GROUPS, CakeTestsGetReporter()); + } + } + + CakePHPTestRunMore(); + CakePHPTestSuiteFooter(); + exit(); + } + + if (isset($_GET['case'])) { + TestManager::runTestCase($_GET['case'], CakeTestsGetReporter()); + CakePHPTestRunMore(); + CakePHPTestSuiteFooter(); + exit(); + } + + CakePHPTestHeader(); + CakePHPTestSuiteHeader(); + + if (isset($_GET['show']) && $_GET['show'] == 'cases') { + CakePHPTestCaseList(); + } else { + CakePHPTestGroupTestList(); + } + CakePHPTestSuiteFooter(); +?> \ No newline at end of file diff --git a/webtools/remora/app/views/addons/index.thtml b/webtools/remora/app/views/addons/index.thtml new file mode 100644 index 00000000000..4d67f3fbc86 --- /dev/null +++ b/webtools/remora/app/views/addons/index.thtml @@ -0,0 +1 @@ + diff --git a/webtools/remora/app/views/layouts/developers.thtml b/webtools/remora/app/views/layouts/developers.thtml new file mode 100644 index 00000000000..f0384fb1a87 --- /dev/null +++ b/webtools/remora/app/views/layouts/developers.thtml @@ -0,0 +1,26 @@ + + + + + + + Mozilla Add-ons :: Add Features to Mozilla Software + + + +
        + + +

        + +
    +
    + Mozilla is providing links to these applications as a courtesy, and makes no representations regarding the applications or any information related thereto. Any questions, complaints or claims regarding the applications must be directed to the appropriate software vendor. See our Support Page for support information and contacts. +
    + + diff --git a/webtools/remora/app/views/tests/index.thtml b/webtools/remora/app/views/tests/index.thtml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/views/tests/test_all.thtml b/webtools/remora/app/views/tests/test_all.thtml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/.htaccess b/webtools/remora/app/webroot/.htaccess new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css.php b/webtools/remora/app/webroot/css.php new file mode 100644 index 00000000000..709af3424b2 --- /dev/null +++ b/webtools/remora/app/webroot/css.php @@ -0,0 +1,101 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Enter description here... + */ + require(CONFIGS . 'paths.php'); + require(CAKE . 'basics.php'); + require(LIBS . 'folder.php'); + require(LIBS . 'file.php'); + require(LIBS . 'legacy.php'); +/** + * 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); + } + + 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/webtools/remora/app/webroot/css/cake.generic.css b/webtools/remora/app/webroot/css/cake.generic.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/images/arrow.gif b/webtools/remora/app/webroot/css/images/arrow.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/images/container_bg.gif b/webtools/remora/app/webroot/css/images/container_bg.gif new file mode 100755 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/images/logo.gif b/webtools/remora/app/webroot/css/images/logo.gif new file mode 100755 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/images/nav_bg.gif b/webtools/remora/app/webroot/css/images/nav_bg.gif new file mode 100755 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/images/nav_item_bg.gif b/webtools/remora/app/webroot/css/images/nav_item_bg.gif new file mode 100755 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/css/screen.css b/webtools/remora/app/webroot/css/screen.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/favicon.ico b/webtools/remora/app/webroot/favicon.ico new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/actionBarBackground.gif b/webtools/remora/app/webroot/images/actionBarBackground.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/cake.power.png b/webtools/remora/app/webroot/images/cake.power.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/download.gif b/webtools/remora/app/webroot/images/download.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/email.gif b/webtools/remora/app/webroot/images/email.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/header.jpg b/webtools/remora/app/webroot/images/header.jpg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/install.gif b/webtools/remora/app/webroot/images/install.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/remora.png b/webtools/remora/app/webroot/images/remora.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/remora2.png b/webtools/remora/app/webroot/images/remora2.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/sidebarBackground.gif b/webtools/remora/app/webroot/images/sidebarBackground.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/w3c_css.png b/webtools/remora/app/webroot/images/w3c_css.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/images/w3c_xhtml10.png b/webtools/remora/app/webroot/images/w3c_xhtml10.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/index.php b/webtools/remora/app/webroot/index.php new file mode 100644 index 00000000000..08c3b0985e9 --- /dev/null +++ b/webtools/remora/app/webroot/index.php @@ -0,0 +1,87 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @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', 'remora'); + } +/** + * 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', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS); + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } + } + require CORE_PATH . 'cake' . DS . 'bootstrap.php'; + if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { + } else { + $Dispatcher=new Dispatcher(); + $Dispatcher->dispatch($url); + } + if (DEBUG) { + echo ""; + } +?> diff --git a/webtools/remora/app/webroot/js/vendors.php b/webtools/remora/app/webroot/js/vendors.php new file mode 100644 index 00000000000..0ecc632eedd --- /dev/null +++ b/webtools/remora/app/webroot/js/vendors.php @@ -0,0 +1,36 @@ + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot.js + * @since CakePHP v 0.2.9 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Enter description here... + */ + if (is_file('../../vendors/javascript/' . $_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file']))) { + readfile('../../vendors/javascript/' . $_GET['file']); + } +?> diff --git a/webtools/remora/app/webroot/remora.sql b/webtools/remora/app/webroot/remora.sql new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/sample/icon.gif b/webtools/remora/app/webroot/sample/icon.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/sample/screenshot.gif b/webtools/remora/app/webroot/sample/screenshot.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/sample/screenshot2.gif b/webtools/remora/app/webroot/sample/screenshot2.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/sample/screenshot3.gif b/webtools/remora/app/webroot/sample/screenshot3.gif new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webtools/remora/app/webroot/test/index.php b/webtools/remora/app/webroot/test/index.php new file mode 100644 index 00000000000..06e5d148aa7 --- /dev/null +++ b/webtools/remora/app/webroot/test/index.php @@ -0,0 +1,399 @@ + + * Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * Author(s): Larry E. Masters aka PhpNut + * + * Portions modifiied from WACT Test Suite + * Author(s): Harry Fuecks + * Jon Ramsey + * Jason E. Sweat + * Franco Ponticelli + * Lorenzo Alberton + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @author Larry E. Masters aka PhpNut + * @copyright Copyright (c) 2006, Larry E. Masters Shorewood, IL. 60431 + * @link http://www.phpnut.com/projects/ + * @package tests + * @since CakePHP Test Suite v 1.0.0.0 + * @version $Revision: 1.1 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006-08-14 23:54:57 $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +error_reporting(E_ALL); +set_time_limit(600); +ini_set('memory_limit','128M'); +class CakeDummyTestClass +{ + +} + +if (!defined('DS')) +{ + define('DS', DIRECTORY_SEPARATOR); +} + +if (!defined('ROOT')) +{ +//define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; + define('ROOT', dirname(dirname(dirname(dirname(__FILE__)))).DS); +} + +if (!defined('APP_DIR')) +{ +//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; + define ('APP_DIR', basename(dirname(dirname(dirname(__FILE__)))).DS); +} + +/** + * 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'; + define('CAKE_CORE_INCLUDE_PATH', ROOT); +} + + +if (!defined('WEBROOT_DIR')) +{ + define ('WEBROOT_DIR', basename(dirname(dirname(__FILE__)))); +} + +define('WWW_ROOT', dirname(dirname(__FILE__))); + +ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.CAKE_CORE_INCLUDE_PATH.PATH_SEPARATOR.ROOT.DS.APP_DIR.DS); + + + require_once 'cake'.DS.'basics.php'; + require_once 'cake'.DS.'config'.DS.'paths.php'; + require_once TESTS . 'test_paths.php'; + require_once TESTS . 'lib'.DS.'test_manager.php'; + vendor('simpletest'.DS.'reporter'); + + if (!isset( $_SERVER['SERVER_NAME'] )) + { + $_SERVER['SERVER_NAME'] = ''; + } + + if (empty( $_GET['output'])) + { + TestManager::setOutputFromIni(TESTS . 'config.ini.php'); + $_GET['output'] = TEST_OUTPUT; + } + +/** + * + * Used to determine output to display + */ +define('CAKE_TEST_OUTPUT_HTML',1); +define('CAKE_TEST_OUTPUT_XML',2); +define('CAKE_TEST_OUTPUT_TEXT',3); + + if ( isset($_GET['output']) && $_GET['output'] == 'xml' ) + { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_XML); + } + elseif ( isset($_GET['output']) && $_GET['output'] == 'html' ) + { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_HTML); + } + else + { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT); + } + + function & CakeTestsGetReporter() + { + static $Reporter = NULL; + if ( !$Reporter ) + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + vendor('simpletest'.DS.'xml'); + $Reporter = new XmlReporter(); + break; + + case CAKE_TEST_OUTPUT_HTML: + require_once TESTS . 'lib'.DS.'cake_reporter.php'; + $Reporter = new CakeHtmlReporter(); + break; + + default: + $Reporter = new TextReporter(); + break; + } + } + return $Reporter; + } + + function CakePHPTestRunMore() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + break; + case CAKE_TEST_OUTPUT_HTML: + $link = !class_exists('CakeDummyTestClass') + ? "

    Run more tests

    \n" + : + "

    Run more tests

    \n"; + echo $link; + break; + + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + function CakePHPTestCaseList() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + if (isset($_GET['app'])) + { + echo XmlTestManager::getTestCaseList(APP_TEST_CASES); + } + else + { + echo XmlTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + + case CAKE_TEST_OUTPUT_HTML: + if (isset($_GET['app'])) + { + echo HtmlTestManager::getTestCaseList(APP_TEST_CASES); + } + else + { + echo HtmlTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + + case CAKE_TEST_OUTPUT_TEXT: + default: + if (isset($_GET['app'])) + { + echo TextTestManager::getTestCaseList(APP_TEST_CASES); + } + else + { + echo TextTestManager::getTestCaseList(CORE_TEST_CASES); + } + break; + } +} + + function CakePHPTestGroupTestList() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + if (isset($_GET['app'])) + { + echo XmlTestManager::getGroupTestList(APP_TEST_GROUPS); + } + else + { + echo XmlTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + + case CAKE_TEST_OUTPUT_HTML: + if (isset($_GET['app'])) + { + echo HtmlTestManager::getGroupTestList(APP_TEST_GROUPS); + } + else + { + echo HtmlTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + + case CAKE_TEST_OUTPUT_TEXT: + default: + if (isset($_GET['app'])) + { + echo TextTestManager::getGroupTestList(APP_TEST_GROUPS); + } + else + { + echo TextTestManager::getGroupTestList(CORE_TEST_GROUPS); + } + break; + } + } + + function CakePHPTestHeader() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + header(' content-Type: text/xml; charset="utf-8"'); + break; + case CAKE_TEST_OUTPUT_HTML: + $header = << + + + + CakePHP Test Suite v 1.0.0.0 + + + + +EOF; + echo $header; + break; + case CAKE_TEST_OUTPUT_TEXT: + default: + header(' content-type: text/plain'); + break; + } + } + + function CakePHPTestSuiteHeader() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + break; + + case CAKE_TEST_OUTPUT_HTML: + $groups = !class_exists('CakeDummyTestClass') ? 'groups' : $_SERVER['PHP_SELF'].'?show=groups'; + $cases = !class_exists('CakeDummyTestClass') ? 'cases' : $_SERVER['PHP_SELF'].'?show=cases'; + $suiteHeader = << + +
    +

    CakePHP Test Suite v 1.0.0.0

    +

    Core Test Groups || Core Test Cases

    +

    App Test Groups || App Test Cases

    +EOD; + echo $suiteHeader; + break; + + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + + function CakePHPTestSuiteFooter() + { + switch ( CAKE_TEST_OUTPUT ) + { + case CAKE_TEST_OUTPUT_XML: + break; + + case CAKE_TEST_OUTPUT_HTML: + $footer = << + +
    + + +EOD; + echo $footer; + break; + + case CAKE_TEST_OUTPUT_TEXT: + default: + break; + } + } + + +if (isset($_GET['group'])) +{ + if ('all' == $_GET['group']) + { + TestManager::runAllTests(CakeTestsGetReporter()); + } + else + { + if (isset($_GET['app'])) + { + TestManager::runGroupTest(ucfirst($_GET['group']), + APP_TEST_GROUPS, + CakeTestsGetReporter()); + } + else + { + TestManager::runGroupTest(ucfirst($_GET['group']), + CORE_TEST_GROUPS, + CakeTestsGetReporter()); + } + } + + CakePHPTestRunMore(); + CakePHPTestSuiteFooter(); + exit(); +} + +if (isset($_GET['case'])) +{ + TestManager::runTestCase($_GET['case'], CakeTestsGetReporter()); + CakePHPTestRunMore(); + CakePHPTestSuiteFooter(); + exit(); +} + +CakePHPTestHeader(); +CakePHPTestSuiteHeader(); + +if (isset($_GET['show']) && $_GET['show'] == 'cases') +{ + CakePHPTestCaseList(); +} +else +{ + CakePHPTestGroupTestList(); +} +CakePHPTestSuiteFooter(); + +?> \ No newline at end of file diff --git a/webtools/remora/app/webroot/test/rss2html.xsl b/webtools/remora/app/webroot/test/rss2html.xsl new file mode 100644 index 00000000000..616ae06888a --- /dev/null +++ b/webtools/remora/app/webroot/test/rss2html.xsl @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + +<xsl:for-each select="rdf:RDF/rss:channel"> +<xsl:value-of select="rss:description"/> +</xsl:for-each> + + + + + +
    + + + + + + 0 + + +
    +
    + +
    +
    + + +
    + + + + ( + + ) + +
    +
    + +
      +
      + +
    • + + + + + ( + +) +
    • +
      +
      +
      +
    + + +
    + + + POST +
    + + + text + + + + + submit + +
    +
    +
    + + + +
    + +
    \ No newline at end of file