From f2a58117ca2da75e5792c4fc56bce7d37a7f9441 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 12 Nov 2011 22:30:42 +0530 Subject: [PATCH] Moving AppModel, AppController, PagesController out of core to app --- .../Cake => app}/Controller/AppController.php | 0 .../Controller/PagesController.php | 0 {lib/Cake => app}/Model/AppModel.php | 0 .../test_app/Controller/AppController.php | 36 ++++++++ .../test_app/Controller/PagesController.php | 82 +++++++++++++++++++ lib/Cake/Test/test_app/Model/AppModel.php | 35 ++++++++ 6 files changed, 153 insertions(+) rename {lib/Cake => app}/Controller/AppController.php (100%) rename {lib/Cake => app}/Controller/PagesController.php (100%) rename {lib/Cake => app}/Model/AppModel.php (100%) create mode 100644 lib/Cake/Test/test_app/Controller/AppController.php create mode 100644 lib/Cake/Test/test_app/Controller/PagesController.php create mode 100644 lib/Cake/Test/test_app/Model/AppModel.php diff --git a/lib/Cake/Controller/AppController.php b/app/Controller/AppController.php similarity index 100% rename from lib/Cake/Controller/AppController.php rename to app/Controller/AppController.php diff --git a/lib/Cake/Controller/PagesController.php b/app/Controller/PagesController.php similarity index 100% rename from lib/Cake/Controller/PagesController.php rename to app/Controller/PagesController.php diff --git a/lib/Cake/Model/AppModel.php b/app/Model/AppModel.php similarity index 100% rename from lib/Cake/Model/AppModel.php rename to app/Model/AppModel.php diff --git a/lib/Cake/Test/test_app/Controller/AppController.php b/lib/Cake/Test/test_app/Controller/AppController.php new file mode 100644 index 000000000..538e27109 --- /dev/null +++ b/lib/Cake/Test/test_app/Controller/AppController.php @@ -0,0 +1,36 @@ +redirect('/'); + } + $page = $subpage = $title_for_layout = null; + + if (!empty($path[0])) { + $page = $path[0]; + } + if (!empty($path[1])) { + $subpage = $path[1]; + } + if (!empty($path[$count - 1])) { + $title_for_layout = Inflector::humanize($path[$count - 1]); + } + $this->set(compact('page', 'subpage', 'title_for_layout')); + $this->render(implode('/', $path)); + } +} diff --git a/lib/Cake/Test/test_app/Model/AppModel.php b/lib/Cake/Test/test_app/Model/AppModel.php new file mode 100644 index 000000000..5a21cda3b --- /dev/null +++ b/lib/Cake/Test/test_app/Model/AppModel.php @@ -0,0 +1,35 @@ +