From f8664a38de353265515720a32082355e4c8089aa Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 26 Dec 2012 20:08:35 +0400 Subject: [PATCH] adjusted default application template --- framework/console/create/config.php | 3 --- framework/console/create/default/index-test.php | 1 - .../console/create/default/protected/config/main.php | 16 ++++++++++++++++ .../default/protected/controllers/SiteController.php | 15 +++++++++++++++ .../console/create/default/protected/tests/bootstrap.php | 1 - .../create/default/protected/views/layouts/main.php | 16 ++++++++++++++++ .../create/default/protected/views/site/index.php | 1 + framework/console/create/default/protected/yiic.php | 1 - 8 files changed, 48 insertions(+), 6 deletions(-) delete mode 100644 framework/console/create/default/index-test.php create mode 100644 framework/console/create/default/protected/config/main.php create mode 100644 framework/console/create/default/protected/controllers/SiteController.php delete mode 100644 framework/console/create/default/protected/tests/bootstrap.php create mode 100644 framework/console/create/default/protected/views/layouts/main.php create mode 100644 framework/console/create/default/protected/views/site/index.php delete mode 100644 framework/console/create/default/protected/yiic.php diff --git a/framework/console/create/config.php b/framework/console/create/config.php index 54bcf44..29f0b0b 100644 --- a/framework/console/create/config.php +++ b/framework/console/create/config.php @@ -10,9 +10,6 @@ return array( }, 'permissions' => 0777, ), - 'assets' => array( - 'permissions' => 0777, - ), 'protected/runtime' => array( 'permissions' => 0755, ), diff --git a/framework/console/create/default/index-test.php b/framework/console/create/default/index-test.php deleted file mode 100644 index a814366..0000000 --- a/framework/console/create/default/index-test.php +++ /dev/null @@ -1 +0,0 @@ - 'My Web Application', + + 'components' => array( + // uncomment the following to use a MySQL database + /* + 'db' => array( + 'class' => 'yii\db\dao\Connection', + 'dsn' => 'mysql:host=localhost;dbname=testdrive', + 'username' => 'root', + 'password' => '', + ), + */ + ), +); \ No newline at end of file diff --git a/framework/console/create/default/protected/controllers/SiteController.php b/framework/console/create/default/protected/controllers/SiteController.php new file mode 100644 index 0000000..b47b93c --- /dev/null +++ b/framework/console/create/default/protected/controllers/SiteController.php @@ -0,0 +1,15 @@ +render('index', array( + 'name' => 'Qiang', + )); + } +} \ No newline at end of file diff --git a/framework/console/create/default/protected/tests/bootstrap.php b/framework/console/create/default/protected/tests/bootstrap.php deleted file mode 100644 index b3d9bbc..0000000 --- a/framework/console/create/default/protected/tests/bootstrap.php +++ /dev/null @@ -1 +0,0 @@ - + + + + <?php echo $this->context->pageTitle?> + + +

context->pageTitle?>

+
+ +
+ + + \ No newline at end of file diff --git a/framework/console/create/default/protected/views/site/index.php b/framework/console/create/default/protected/views/site/index.php new file mode 100644 index 0000000..0fb8784 --- /dev/null +++ b/framework/console/create/default/protected/views/site/index.php @@ -0,0 +1 @@ +Hello, ! \ No newline at end of file diff --git a/framework/console/create/default/protected/yiic.php b/framework/console/create/default/protected/yiic.php deleted file mode 100644 index b3d9bbc..0000000 --- a/framework/console/create/default/protected/yiic.php +++ /dev/null @@ -1 +0,0 @@ -