Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merging changes from sandboxes
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@856 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
phpnut committed Sep 17, 2005
1 parent 37da997 commit 1dce095
Show file tree
Hide file tree
Showing 35 changed files with 559 additions and 438 deletions.
12 changes: 6 additions & 6 deletions app/views/layouts/default.thtml
@@ -1,18 +1,18 @@
<!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">
<head>
<title><?=$title_for_layout?></title>
<?=$html->charsetTag('UTF-8')?>
<?=$html->cssTag('default')?>
<?=$html->cssTag('forms')?>
<title><?php echo $title_for_layout?></title>
<?php echo $html->charsetTag('UTF-8')?>
<?php echo $html->cssTag('default')?>
<?php echo $html->cssTag('forms')?>
</head>

<body>
<div id="main">
<?=$content_for_layout?>
<?php echo $content_for_layout?>

<p>
<a id="logo" href="http://www.cakephp.org/" target="_new"><img src="/img/pbcake.gif" width="120" height="28" alt="CakePHP : Rapid Development Framework" /></a>
<a id="logo" href="http://www.cakephp.org/" target="_new"><img src="<?php echo $html->url("/img/pbcake.gif"); ?>" width="120" height="28" alt="CakePHP : Rapid Development Framework" /></a>
</p>
</div>
</body>
Expand Down
8 changes: 4 additions & 4 deletions app/views/layouts/flash.thtml
@@ -1,10 +1,10 @@
<!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><?=$page_title?></title>
<title><?php echo $page_title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php if(DEBUG == 0) { ?>
<meta http-equiv="Refresh" content="<?=$time?>;url=<?=$url?>" />
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>" />
<?php } ?>
<style><!--
P { text-align:center; font:bold 1.1em sans-serif }
Expand All @@ -15,7 +15,7 @@ A:HOVER { text-decoration: underline; color:#44E }

<body>

<p><a href="<?=$url?>"><?=$message?></a></p>
<p><a href="<?php echo $url?>"><?php echo $message?></a></p>

</body>
</html>
</html>
18 changes: 9 additions & 9 deletions app/views/pages/home.thtml
@@ -1,10 +1,10 @@
<h1>CakePHP <em>Works!</em></h1><br/>
<hr/>
Your database configuration file is <?= file_exists(CONFIGS.'database.php') ? 'present.'. $filePresent = ' ' : 'not present.';?><br/>
<? $db = DboFactory::getInstance(); ?>
<? if (!empty($filePresent)):?>
Cake <?=$db->connected ? "is able to" : "is not able to" ?> connect to the database.
<?endif?>
Your database configuration file is <?php echo file_exists(CONFIGS.'database.php') ? 'present.'. $filePresent = ' ' : 'not present.';?><br/>
<?php $db = DboFactory::getInstance(); ?>
<?php if (!empty($filePresent)):?>
Cake <?php echo $db->connected ? "is able to" : "is not able to" ?> connect to the database.
<?php endif; ?>
<hr/>
<br/>
<h2>Editing <em>this Page</em></h2>
Expand All @@ -19,10 +19,10 @@ To change the content of this page, edit <code>/app/views/pages/home.thtml</code

<h2>Get <em>Involved</em></h2>
<p>Cake PHP needs you! We have an active user base and are always open to new bug reports or feature ideas!</p><br/>
<?=$html->linkOut('Google Group','http://groups-beta.google.com/group/cake-php')?> &ndash; for public discussions about everything Cake.<br/>
<?=$html->linkOut('Wiki','https://trac.cakephp.org/wiki')?> &ndash; fastest way of getting newest information on Cake PHP.<br/>
<?=$html->linkOut('Report a bug or feature request','https://trac.cakephp.org/newticket')?>.<br/>
<?=$html->linkOut('Roadmap','https://trac.cakephp.org/roadmap')?> &ndash; check our plans for the bright future.<br/>
<?php echo $html->linkOut('Google Group','http://groups-beta.google.com/group/cake-php')?> &ndash; for public discussions about everything Cake.<br/>
<?php echo $html->linkOut('Wiki','https://trac.cakephp.org/wiki')?> &ndash; fastest way of getting newest information on Cake PHP.<br/>
<?php echo $html->linkOut('Report a bug or feature request','https://trac.cakephp.org/newticket')?>.<br/>
<?php echo $html->linkOut('Roadmap','https://trac.cakephp.org/roadmap')?> &ndash; check our plans for the bright future.<br/>
#cakephp on irc.euirc.net for quick help<br/>
</p>
<br/>
Expand Down
3 changes: 3 additions & 0 deletions config/core.php
Expand Up @@ -36,6 +36,9 @@
* - 0: production
* - 1: development
* - 2: full debug with sql
*
* 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);

Expand Down
2 changes: 1 addition & 1 deletion config/tags.ini.php
Expand Up @@ -99,7 +99,7 @@
tableRow = "<tr%s>%s</tr>"

; Tag template for a CSS link tag.
css = "<link rel="%s" type="text/css" href="%s" />"
css = "<link rel="%s" type="text/css" href="%s" %s/>"

; Tag template for a charset meta-tag.
charset = "<meta http-equiv="Content-Type" content="text/html; charset=%s" />"
Expand Down
2 changes: 1 addition & 1 deletion index.php
@@ -1,5 +1,5 @@
<?php
/* SVN FILE: $Id:$ */
/* SVN FILE: $Id$ */

/**
* Short description for file.
Expand Down
2 changes: 1 addition & 1 deletion libs/bake.php
Expand Up @@ -444,7 +444,7 @@ function getModelFn ($name)
}

/**
* Creates a test for a given model.
* Creates a test for given model.
*
* @param string $name
* @return boolean
Expand Down
82 changes: 73 additions & 9 deletions libs/basics.php
Expand Up @@ -32,7 +32,7 @@
*/

/**
* Basic defines
* Basic defines for timing functions.
*/
define('SECOND', 1);
define('MINUTE', 60 * SECOND);
Expand Down Expand Up @@ -103,8 +103,8 @@ function loadController ($name)
/**
* Lists PHP files in given directory.
*
* @param string $path Path to scan for files
* @return array List of files in directory
* @param string $path Path to scan for files
* @return array List of files in directory
*/
function listClasses($path)
{
Expand All @@ -115,7 +115,7 @@ function listClasses($path)
/**
* Loads configuration files
*
* @return boolean True on success.
* @return boolean Success
*/
function config ()
{
Expand Down Expand Up @@ -160,7 +160,7 @@ function uses ()
}

/**
* Require given files in the VENDORS directory. Function takes optional number of parameters.
* Require given files in the VENDORS directory. Takes optional number of parameters.
*
* @param string $name Filename without the .php part.
*
Expand All @@ -175,10 +175,12 @@ function vendor($name)
}

/**
* Setup a debug point.
* Print out debug information about given variable.
*
* Only runs if DEBUG level is non-zero.
*
* @param boolean $var
* @param boolean $show_html
* @param boolean $var Variable to show debug information for.
* @param boolean $show_html If set to true, the method prints the debug data in a screen-friendly way.
*/
function debug($var = false, $show_html = false)
{
Expand Down Expand Up @@ -271,4 +273,66 @@ function array_combine($a1, $a2)
}
}

?>
function h($text)
{
return htmlspecialchars($text);
}


function a()
{
$args = func_get_args();
return $args;
}


function ha()
{
$args = func_get_args();

for($l=0 ; $l<count($args) ; $l++)
{
$a[$args[$l]] = $l+1<count($args) ? $args[$l+1] : null;
$l++;
}
return $a;
}


function e($text)
{
echo $text;
}

function pr($var)
{
if(DEBUG > 0)
{
echo "<pre>";
print_r($var);
echo "</pre>";
}
}

function params($p)
{

if(!is_array($p) || count($p) == 0)
{
return null;
}
else
{
if(is_array($p[0]) && count($p) == 1)
{
return $p[0];
}
else
{
return $p;
}
}

}

?>

0 comments on commit 1dce095

Please sign in to comment.