mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
bake 1.2 fixes, skel and css updates
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3627 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5f88da5d70
commit
ff847150e2
4 changed files with 36 additions and 19 deletions
|
@ -236,7 +236,6 @@ margin-left: 140px;
|
|||
#flashMessage, .error, .error_message {
|
||||
color:#900;
|
||||
font-size: 16px;
|
||||
background-color: #fff;
|
||||
margin: 8px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
@ -64,11 +64,21 @@
|
|||
case '-project':
|
||||
$project = true;
|
||||
$projectPath = $argv[$i + 1];
|
||||
$app = $argv[$i + 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!$app) $app = $argv[1];
|
||||
if($project) $app = $projectPath;
|
||||
if(!$app) {
|
||||
$app = $argv[1];
|
||||
}
|
||||
if(!is_dir($app)) {
|
||||
$project = true;
|
||||
$projectPath = $app;
|
||||
|
||||
}
|
||||
if($project) {
|
||||
$app = $projectPath;
|
||||
}
|
||||
$shortPath = str_replace($root, '', $app);
|
||||
$shortPath = str_replace('../', '', $shortPath);
|
||||
$shortPath = str_replace('//', '/', $shortPath);
|
||||
|
@ -1095,6 +1105,7 @@ class Bake {
|
|||
$otherPluralName = $this->__pluralName($associationName);
|
||||
|
||||
$actions .= "\t\t\t\t\$this->set('{$otherPluralName}', \$this->{$currentModelName}->{$otherModelName}->generateList());\n";
|
||||
$actions .= "\t\t\t\tif(empty(\$this->data['{$associationName}']['{$associationName}'])) { \$this->data['{$associationName}']['{$associationName}'] = null; }\n";
|
||||
$actions .= "\t\t\t\t\$this->set('selected_{$otherPluralName}', \$this->data['{$associationName}']['{$associationName}']);\n";
|
||||
}
|
||||
}
|
||||
|
@ -2070,11 +2081,11 @@ class Bake {
|
|||
*
|
||||
* @param string $projectPath
|
||||
*/
|
||||
function project($projectPath) {
|
||||
function project($projectPath = null) {
|
||||
if($projectPath != '') {
|
||||
while ($this->__checkPath($projectPath) === true) {
|
||||
$projectPath = $this->getInput('Directory exists please choose another name:');
|
||||
$this->__buildDirLayout($projectPath);
|
||||
$this->__buildDirLayout(null, null);
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
|
@ -2169,7 +2180,7 @@ class Bake {
|
|||
} elseif (strtolower($looksGood) == 'q' || strtolower($looksGood) == 'quit') {
|
||||
$this->stdout('Bake Aborted.');
|
||||
} else {
|
||||
$this->project($projectPath);
|
||||
$this->project();
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -1,28 +1,36 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>CakePHP : <?php echo $title_for_layout;?></title>
|
||||
<link rel="shortcut icon" href="<?php echo $html->url('/favicon.ico')?>" type="image/x-icon" />
|
||||
<title>CakePHP: the PHP Rapid Development Framework: <?php echo $title_for_layout;?></title>
|
||||
<?php echo $html->charset('UTF-8');?>
|
||||
<link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
|
||||
<?php echo $html->css('cake.generic');?>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1>CakePHP Rapid Development</h1>
|
||||
<h1>CakePHP: the PHP Rapid Development Framework</h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
<?php if ($this->controller->Session->check('Message.flash'))
|
||||
{
|
||||
$this->controller->Session->flash();
|
||||
}
|
||||
echo $content_for_layout;
|
||||
<?php
|
||||
if($session->check('Message.flash')):
|
||||
$session->flash();
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php echo $content_for_layout;?>
|
||||
|
||||
</div>
|
||||
<div id="footer">
|
||||
|
||||
<a href="http://www.cakephp.org/" target="_new">
|
||||
<?php echo $html->image('cake.power.png', array('alt'=>"CakePHP : Rapid Development Framework", 'border'=>"0"));?>
|
||||
</a>
|
||||
<?php echo $html->link(
|
||||
$html->image('cake.power.png', array('alt'=>"CakePHP: the PHP Rapid Development Framework", 'border'=>"0")),
|
||||
'http://www.cakephp.org/',
|
||||
array('target'=>'_new'),
|
||||
null,
|
||||
false
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -236,7 +236,6 @@ margin-left: 140px;
|
|||
#flashMessage, .error, .error_message {
|
||||
color:#900;
|
||||
font-size: 16px;
|
||||
background-color: #fff;
|
||||
margin: 8px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue