Permalink
Browse files

Merging changes from revisions [337] [338] [339] [340] [341]

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@342 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
phpnut committed Jul 10, 2005
1 parent 7791b8d commit 6460f6e83fd0aee4719f796bd82db140cf405daa
Showing with 13,985 additions and 13,694 deletions.
  1. +2 −2 .htaccess
  2. +19 −19 app/controllers/pages_controller.php
  3. +5 −5 app/controllers/tests_controller.php
  4. +3 −3 app/views/layouts/default.thtml
  5. +4 −4 app/views/layouts/test.thtml
  6. +10 −10 app/views/pages/home.thtml
  7. +14 −14 config/database.php.default
  8. +1 −1 config/paths.php
  9. +14 −14 config/tags.php
  10. +36 −38 index.php
  11. +467 −467 libs/bake.php
  12. +98 −98 libs/basics.php
  13. +32 −32 libs/cache.php
  14. +330 −318 libs/controller.php
  15. +387 −387 libs/dbo.php
  16. +84 −84 libs/dbo/dbo_adodb.php
  17. +101 −101 libs/dbo/dbo_generic.php
  18. +144 −85 libs/dbo/dbo_mysql.php
  19. +121 −121 libs/dbo/dbo_pear.php
  20. +93 −93 libs/dbo/dbo_postgres.php
  21. +163 −163 libs/dbo/dbo_sqlite.php
  22. +65 −65 libs/dbo_factory.php
  23. +246 −246 libs/dispatcher.php
  24. +37 −37 libs/file.php
  25. +199 −199 libs/flay.php
  26. +95 −95 libs/folder.php
  27. +641 −637 libs/helpers/html.php
  28. +115 −114 libs/inflector.php
  29. +10 −10 libs/log.php
  30. +585 −368 libs/model.php
  31. +108 −108 libs/neat_array.php
  32. +30 −30 libs/neat_string.php
  33. +59 −59 libs/object.php
  34. +106 −106 libs/router.php
  35. +51 −51 libs/template.php
  36. +91 −91 libs/time.php
  37. +470 −470 libs/view.php
  38. +29 −29 public/css.php
  39. +13 −13 public/index.php
  40. +1 −1 public/js/vendors.php
  41. +48 −48 scripts/test.php
  42. +25 −25 tests/libs/controller.php
  43. +72 −72 tests/libs/dbo.php
  44. +45 −45 tests/libs/dbo_factory.php
  45. +78 −78 tests/libs/flay.php
  46. +121 −121 tests/libs/folder.php
  47. +216 −216 tests/libs/helpers/html.php
  48. +53 −53 tests/libs/inflector.php
  49. +34 −34 tests/libs/neat_array.php
  50. +44 −44 tests/libs/router.php
  51. +779 −779 vendors/csspp/csspp.php
  52. +3 −3 vendors/javascript/prototype.js
  53. +13 −13 vendors/rephlux/cli_reporter.php
  54. +4 −4 vendors/simpletest/LICENSE
  55. +116 −116 vendors/simpletest/authentication.php
  56. +514 −514 vendors/simpletest/browser.php
  57. +4 −4 vendors/simpletest/docs/en/index.html
  58. +1 −1 vendors/simpletest/docs/en/reporter_documentation.html
  59. +3 −3 vendors/simpletest/docs/en/web_tester_documentation.html
  60. +9 −9 vendors/simpletest/docs/fr/group_test_documentation.html
  61. +2 −2 vendors/simpletest/docs/fr/index.html
  62. +1 −1 vendors/simpletest/docs/fr/reporter_documentation.html
  63. +3 −3 vendors/simpletest/docs/fr/web_tester_documentation.html
  64. +167 −167 vendors/simpletest/dumper.php
  65. +66 −66 vendors/simpletest/encoding.php
  66. +69 −69 vendors/simpletest/errors.php
  67. +312 −312 vendors/simpletest/expectation.php
  68. +108 −108 vendors/simpletest/extensions/pear_test_case.php
  69. +61 −61 vendors/simpletest/extensions/phpunit_test_case.php
  70. +311 −311 vendors/simpletest/form.php
  71. +307 −307 vendors/simpletest/frames.php
  72. +393 −393 vendors/simpletest/http.php
  73. +640 −640 vendors/simpletest/mock_objects.php
  74. +181 −181 vendors/simpletest/options.php
  75. +411 −411 vendors/simpletest/page.php
  76. +369 −369 vendors/simpletest/parser.php
  77. +51 −51 vendors/simpletest/remote.php
  78. +113 −113 vendors/simpletest/reporter.php
  79. +159 −159 vendors/simpletest/runner.php
  80. +216 −216 vendors/simpletest/scorer.php
  81. +153 −153 vendors/simpletest/shell_tester.php
  82. +277 −277 vendors/simpletest/simple_test.php
  83. +115 −115 vendors/simpletest/socket.php
  84. +600 −600 vendors/simpletest/tag.php
  85. +158 −158 vendors/simpletest/unit_tester.php
  86. +235 −235 vendors/simpletest/url.php
  87. +220 −220 vendors/simpletest/user_agent.php
  88. +731 −731 vendors/simpletest/web_tester.php
  89. +295 −295 vendors/simpletest/xml.php
View
@@ -1,5 +1,5 @@
<IfModule mod_rewrite.c>
RewriteEngine on
- RewriteRule ^$ public/ [L]
- RewriteRule (.*) public/$1 [L]
+ RewriteRule ^$ public/ [L]
+ RewriteRule (.*) public/$1 [L]
</IfModule>
@@ -36,32 +36,32 @@ class PagesController extends PagesHelper{
*
* @var unknown_type
*/
- var $helpers = array('html', 'ajax');
-
+ var $helpers = array('html', 'ajax');
+
/**
* Displays a view
*
*/
- function display()
- {
- if (!func_num_args())
- {
- $this->redirect('/');
- }
+ function display()
+ {
+ if (!func_num_args())
+ {
+ $this->redirect('/');
+ }
- $path = func_get_args();
-
- if (!count($path))
- {
- $this->redirect('/');
- }
+ $path = func_get_args();
+
+ if (!count($path))
+ {
+ $this->redirect('/');
+ }
- $this->set('page', $path[0]);
- $this->set('subpage', empty($path[1])? null: $path[1]);
- $this->set('title', ucfirst($path[count($path)-1]));
- $this->render(join('/', $path));
- }
+ $this->set('page', $path[0]);
+ $this->set('subpage', empty($path[1])? null: $path[1]);
+ $this->set('title', ucfirst($path[count($path)-1]));
+ $this->render(join('/', $path));
+ }
}
@@ -29,11 +29,11 @@ class TestsController extends TestsHelper {
* Runs all library and application tests
*
*/
- function test_all ()
- {
- $this->layout = null;
- require_once SCRIPTS.'test.php';
- }
+ function test_all ()
+ {
+ $this->layout = null;
+ require_once SCRIPTS.'test.php';
+ }
}
?>
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
<head>
- <title><?=$title_for_layout?></title>
- <?=$html->charsetTag('UTF-8')?>
- <?=$html->cssTag('default')?>
+ <title><?=$title_for_layout?></title>
+ <?=$html->charsetTag('UTF-8')?>
+ <?=$html->cssTag('default')?>
</head>
<body>
@@ -34,14 +34,14 @@ background-color:#F8F8F8;
padding:.5em 1em .5em 2em;
}
TR.info .ok {
- color:Green;
+ color:Green;
}
TR.info .not {
- color:Red;
+ color:Red;
}
TR.info EM {
- color:Gray;
- font-style:normal;
+ color:Gray;
+ font-style:normal;
}
TR.unkn TD {
background-color:#FF0;
View
@@ -11,12 +11,12 @@
<h2>Features</h2>
<ul>
- <li>Compatibile with PHP4 and PHP5.</li>
- <li>Supplies integrated <acronym title="Create, Read, Update, Delete">CRUD</acronym> for databases.</li>
- <li>Pretty URL's that work with and without mod_rewrite.</li>
- <li>Fast, flexible templating (PHP syntax with helper methods).</li>
- <li>Suported database-types: MySQL, PostgreSQL and SQLIte</li>
- <li>Suported webservers: Apache (others will most likely also work)</li>
+ <li>Compatibile with PHP4 and PHP5.</li>
+ <li>Supplies integrated <acronym title="Create, Read, Update, Delete">CRUD</acronym> for databases.</li>
+ <li>Pretty URL's that work with and without mod_rewrite.</li>
+ <li>Fast, flexible templating (PHP syntax with helper methods).</li>
+ <li>Suported database-types: MySQL, PostgreSQL and SQLIte</li>
+ <li>Suported webservers: Apache (others will most likely also work)</li>
</ul>
<p>Cake is still in its early infancy, but we are proceeding in good direction &ndash; table joins will most probably get added in 0.9.3 release, and better support for user-defined settings is also underway.</p>
@@ -26,10 +26,10 @@
<p>Cake PHP needs you! We have already quiet active user base, but we are allways open to new bug reports or feature ideas!</p>
<ul>
- <li><?=$html->linkOut('Google Group','http://groups-beta.google.com/group/cake-php')?> &ndash; for public discussions about everything Cake.</li>
- <li><?=$html->linkOut('Wiki','https://trac.cakephp.org/wiki')?> &ndash; fastest way of getting newest information on Cake PHP.</li>
- <li><?=$html->linkOut('Report a bug or feature request','https://trac.cakephp.org/newticket')?>.</li>
- <li><?=$html->linkOut('Roadmap','https://trac.cakephp.org/roadmap')?> &ndash; check our plans for the bright future.</li>
+ <li><?=$html->linkOut('Google Group','http://groups-beta.google.com/group/cake-php')?> &ndash; for public discussions about everything Cake.</li>
+ <li><?=$html->linkOut('Wiki','https://trac.cakephp.org/wiki')?> &ndash; fastest way of getting newest information on Cake PHP.</li>
+ <li><?=$html->linkOut('Report a bug or feature request','https://trac.cakephp.org/newticket')?>.</li>
+ <li><?=$html->linkOut('Roadmap','https://trac.cakephp.org/roadmap')?> &ndash; check our plans for the bright future.</li>
</ul>
<p>Soon there will be oficial <?=$html->linkOut('Cake PHP website','http://www.cakephp.org/')?>, so stay tuned.</p>
@@ -21,21 +21,21 @@
*/
class DATABASE_CONFIG
{
- var $default = array(
- 'driver' => 'mysql',
- 'host' => 'localhost',
- 'login' => 'www',
- 'password' => '',
- 'database' => 'project_name'
- );
+ var $default = array(
+ 'driver' => 'mysql',
+ 'host' => 'localhost',
+ 'login' => 'www',
+ 'password' => '',
+ 'database' => 'project_name'
+ );
- var $test = array(
- 'driver' => 'mysql',
- 'host' => 'localhost',
- 'login' => 'www-test',
- 'password' => '',
- 'database' => 'project_name-test'
- );
+ var $test = array(
+ 'driver' => 'mysql',
+ 'host' => 'localhost',
+ 'login' => 'www-test',
+ 'password' => '',
+ 'database' => 'project_name-test'
+ );
}
?>
View
@@ -23,7 +23,7 @@
*/
if(!defined('ROOT'))
{
- define ('ROOT', '../');
+ define ('ROOT', '../');
}
/**
View
@@ -34,32 +34,32 @@
/**
* Tag template for an input type='text' tag.
*/
-define('TAG_INPUT', '<input name="data[%s]" %s/>');
+define('TAG_INPUT', '<input name="data[%s][%s]" %s/>');
/**
* Tag template for an input type='hidden' tag.
*/
-define('TAG_HIDDEN', '<input type="hidden" name="data[%s]" %s/>');
+define('TAG_HIDDEN', '<input type="hidden" name="data[%s][%s]" %s/>');
/**
* Tag template for a textarea tag.
*/
-define('TAG_AREA', '<textarea name="data[%s]"%s>%s</textarea>');
+define('TAG_AREA', '<textarea name="data[%s][%s]"%s>%s</textarea>');
/**
* Tag template for a input type='checkbox ' tag.
*/
-define('TAG_CHECKBOX', '<label for="tag_%s"><input type="checkbox" name="data[%s]" id="tag_%s" %s/>%s</label>');
+define('TAG_CHECKBOX', '<label for="tag_%s"><input type="checkbox" name="data[%s][%s]" id="tag_%s" %s/>%s</label>');
/**
* Tag template for a input type='radio' tag.
*/
-define('TAG_RADIOS', '<label for="tag_%s"><input type="radio" name="data[%s]" id="tag_%s" %s/>%s</label>');
+define('TAG_RADIOS', '<label for="tag_%s"><input type="radio" name="data[%s][%s]" id="tag_%s" %s/>%s</label>');
/**
* Tag template for a select opening tag.
*/
-define('TAG_SELECT_START', '<select name="data[%s]"%s>');
+define('TAG_SELECT_START', '<select name="data[%s][%s]"%s>');
/**
* Tag template for an empty select option tag.
@@ -74,32 +74,32 @@
/**
* Tag template for a closing select tag.
*/
-define('TAG_SELECT_END', '</select>');
+define('TAG_SELECT_END', '</select>');
/**
* Tag template for a password tag.
*/
-define('TAG_PASSWORD', '<input type="password" name="data[%s]" %s/>');
+define('TAG_PASSWORD', '<input type="password" name="data[%s][%s]" %s/>');
/**
* Tag template for a file input tag.
*/
-define('TAG_FILE', '<input type="file" name="%s" %s/>');
+define('TAG_FILE', '<input type="file" name="%s" %s/>');
/**
* Tag template for a submit button tag.
*/
-define('TAG_SUBMIT', '<input type="submit" %s/>');
+define('TAG_SUBMIT', '<input type="submit" %s/>');
/**
* Tag template for an image tag.
*/
-define('TAG_IMAGE', '<img src="%s" alt="%s" %s/>');
+define('TAG_IMAGE', '<img src="%s" alt="%s" %s/>');
/**
* Tag template for a table header tag.
*/
-define('TAG_TABLE_HEADER', '<th%s>%s</th>');
+define('TAG_TABLE_HEADER', '<th%s>%s</th>');
/**
* Tag template for table headers row tag.
@@ -109,12 +109,12 @@
/**
* Tag template for a table cell tag.
*/
-define('TAG_TABLE_CELL', '<td%s>%s</td>');
+define('TAG_TABLE_CELL', '<td%s>%s</td>');
/**
* Tag template for a table row tag.
*/
-define('TAG_TABLE_ROW', '<tr%s>%s</tr>');
+define('TAG_TABLE_ROW', '<tr%s>%s</tr>');
/**
* Tag template for a CSS link tag.
View
@@ -46,43 +46,41 @@
* As mod_rewrite (or .htaccess files) is not working, we need to take care
* of what would normally be rewrited, i.e. the static files in /public
*/
-if (empty($_GET['url']) || ($_GET['url'] == '/'))
-{
- require (ROOT.'public/index.php');
-}
-else
-{
- $elements = explode('/index.php?url=', $_SERVER['REQUEST_URI']);
- $base = $elements[0].'/public';
- $path = $elements[1];
-
- $filename = ROOT.'public'.str_replace('/', DS, $path);
- $url = $base.$path;
-
- if (file_exists($filename))
- {
- if (preg_match('/^.*\.([a-z]+)$/i', $filename, $ext))
- {
- switch ($ext[1])
- {
- case 'jpg':
- case 'jpeg':
- header('Content-type: image/jpeg');
- break;
-
- case 'css':
- header('Content-type: text/css');
- }
- }
-
- print (file_get_contents($filename));
- die();
- }
- else
- {
- require (ROOT.'public/index.php');
- }
-}
-
+ if (empty($_GET['url']) || ($_GET['url'] == '/'))
+ {
+ require (ROOT.'public/index.php');
+ }
+ else
+ {
+ $elements = explode('/index.php?url=', $_SERVER['REQUEST_URI']);
+ $base = $elements[0].'/public';
+ $path = $elements[1];
+
+ $filename = ROOT.'public'.str_replace('/', DS, $path);
+ $url = $base.$path;
+ if (file_exists($filename))
+ {
+ if (preg_match('/^.*\.([a-z]+)$/i', $filename, $ext))
+ {
+ switch ($ext[1])
+ {
+ case 'jpg':
+ case 'jpeg':
+ header('Content-type: image/jpeg');
+ break;
+
+ case 'css':
+ header('Content-type: text/css');
+ }
+ }
+
+ print (file_get_contents($filename));
+ die();
+ }
+ else
+ {
+ require (ROOT.'public/index.php');
+ }
+ }
?>
Oops, something went wrong.

0 comments on commit 6460f6e

Please sign in to comment.