From b57489f3f1d08f600e947c0e535c32bcd2d7f956 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 2 May 2012 20:54:50 -0400 Subject: [PATCH] Remove duplicate template. Also remove double creating the home.ctp file. Fixes #2842 --- lib/Cake/Console/Command/Task/ProjectTask.php | 20 ---- .../Console/Templates/default/views/home.ctp | 113 ------------------ 2 files changed, 133 deletions(-) delete mode 100644 lib/Cake/Console/Templates/default/views/home.ctp diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index 92135906a..03386dc99 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -70,12 +70,6 @@ class ProjectTask extends AppShell { $success = true; if ($this->bake($project)) { $path = Folder::slashTerm($project); - if ($this->createHome($path)) { - $this->out(__d('cake_console', ' * Welcome page created')); - } else { - $this->err(__d('cake_console', 'The Welcome page was NOT created')); - $success = false; - } if ($this->securitySalt($path) === true) { $this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\'')); @@ -220,20 +214,6 @@ class ProjectTask extends AppShell { } } -/** - * Writes a file with a default home page to the project. - * - * @param string $dir Path to project - * @return boolean Success - */ - public function createHome($dir) { - $app = basename($dir); - $path = $dir . 'View' . DS . 'Pages' . DS; - $source = CAKE . 'Console' . DS . 'Templates' . DS . 'default' . DS . 'views' . DS . 'home.ctp'; - include $source; - return $this->createFile($path . 'home.ctp', $output); - } - /** * Generates the correct path to the CakePHP libs that are generating the project * and points app/console/cake.php to the right place diff --git a/lib/Cake/Console/Templates/default/views/home.ctp b/lib/Cake/Console/Templates/default/views/home.ctp deleted file mode 100644 index 424051981..000000000 --- a/lib/Cake/Console/Templates/default/views/home.ctp +++ /dev/null @@ -1,113 +0,0 @@ - -

For updates and important announcements, visit http://cakefest.org

-\n"; -$output .= "

Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!

\n"; -$output .=" - 0): - Debugger::checkSecurityKeys(); -endif; -?> -

-=')): - echo ''; - echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'Your tmp directory is writable.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your tmp directory is NOT writable.'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/core.php ', ''. \$settings['engine'] . 'Engine'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'Your database configuration file is present.'); - \$filePresent = true; - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your database configuration file is NOT present.'); - echo '
'; - echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php'); - echo '
'; - endif; -?> -

- -

- isConnected()): - echo ''; - echo __d('cake_dev', 'Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Cake is NOT able to connect to the database.'); - echo ''; - endif; - ?> -

- -'; - __d('cake_dev', 'PCRE has not been compiled with Unicode support.'); - echo '
'; - __d('cake_dev', 'Recompile PCRE with Unicode support by adding --enable-unicode-properties when configuring'); - echo '

'; - } -?>\n"; -$output .= "

\n"; -$output .= "

\n"; -$output .= "', APP . 'View' . DS . 'Layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');\n"; -$output .= "?>\n"; -$output .= "

\n"; -?>