Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix encoding bug and rename root action name #24

Merged
merged 1 commit into from

1 participant

@otiai10
Owner

文字化けはMySQLのデータ作るときに参照されてたMySQLのcnfだったから、アプリ的な編集は無い

@otiai10 otiai10 merged commit 52876a6 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 2, 2013
This page is out of date. Refresh to see the latest.
View
12 fuel/app/classes/controller/welcome.php → fuel/app/classes/controller/top.php
@@ -15,7 +15,7 @@
//use Model\Sampletable;
/**
- * The Welcome Controller.
+ * The Top Controller.
*
* A basic controller example. Has examples of how to set the
* response body and status.
@@ -23,7 +23,7 @@
* @package app
* @extends Controller
*/
-class Controller_Welcome extends Controller
+class Controller_Top extends Controller
{
/**
@@ -37,9 +37,9 @@ public function action_index()
// TODO: use model
//$query=DB::select()->from(‘animes’)->execute();
//$res = Model_Sampletable::find_all();
- $rows = DB::query('SELECT * FROM animes')->execute()->as_array();
+ $rows = DB::query('SELECT * FROM animes ORDER BY id')->execute()->as_array();
//_var_dump($res);
- $view = ViewModel::forge('welcome/index');
+ $view = ViewModel::forge('top/index');
$view->set('list', $rows);
return Response::forge($view);
}
@@ -53,7 +53,7 @@ public function action_index()
*/
public function action_hello()
{
- return Response::forge(ViewModel::forge('welcome/hello'));
+ return Response::forge(ViewModel::forge('top/hello'));
}
/**
@@ -64,6 +64,6 @@ public function action_hello()
*/
public function action_404()
{
- return Response::forge(ViewModel::forge('welcome/404'), 404);
+ return Response::forge(ViewModel::forge('top/404'), 404);
}
}
View
2  fuel/app/classes/view/welcome/404.php → fuel/app/classes/view/top/404.php
@@ -16,7 +16,7 @@
* @package app
* @extends ViewModel
*/
-class View_Welcome_404 extends ViewModel
+class View_Top_404 extends ViewModel
{
/**
* Prepare the view data, keeping this in here helps clean up
View
2  fuel/app/classes/view/welcome/hello.php → fuel/app/classes/view/top/hello.php
@@ -16,7 +16,7 @@
* @package app
* @extends ViewModel
*/
-class View_Welcome_Hello extends ViewModel
+class View_Top_Hello extends ViewModel
{
/**
* Prepare the view data, keeping this in here helps clean up
View
2  fuel/app/classes/view/welcome/index.php → fuel/app/classes/view/top/index.php
@@ -16,7 +16,7 @@
* @package app
* @extends ViewModel
*/
-class View_Welcome_Index extends ViewModel
+class View_Top_Index extends ViewModel
{
/**
* Prepare the view data, keeping this in here helps clean up
View
8 fuel/app/config/routes.php
@@ -1,7 +1,7 @@
<?php
return array(
- '_root_' => 'welcome/index', // The default route
- '_404_' => 'welcome/404', // The main 404 route
+ '_root_' => 'top/index', // The default route
+ '_404_' => 'top/404', // The main 404 route
- 'hello(/:name)?' => array('welcome/hello', 'name' => 'hello'),
-);
+ 'hello(/:name)?' => array('top/hello', 'name' => 'hello'),
+);
View
0  fuel/app/views/welcome/404.php → fuel/app/views/top/404.php
File renamed without changes
View
0  fuel/app/views/welcome/hello.php → fuel/app/views/top/hello.php
File renamed without changes
View
4 fuel/app/views/welcome/index.php → fuel/app/views/top/index.php
@@ -17,14 +17,14 @@
</div>
<div class="container">
<div class="hero-unit">
- <h1><?php echo $test; ?>今期アニメ、</h1><h1>ちゃんと見てる?</h1>
+ <h1>topにしてみた//今期アニメ、</h1><h1>ちゃんと見てる?</h1>
<p><!-- 忙しくて見てないひとも、<br>オープニングとエンディングテーマだけでも聞いて、ライバルに差を付けろ!! --></p>
<p><a class="btn btn-primary btn-large" href="http://docs.fuelphp.com">見れてない(´・ω・`)</a></p>
</div>
<div class="row">
<div class="span4">
<h2>Get Started</h2>
- <p><?php foreach($list as $k => $v){ echo $v['title'] . "<br>"; } ?></p>
+ <p><?php foreach($list as $k => $v){ echo $v['id'] . $v['title'] . "<br>"; } ?></p>
<p>The controller generating this page is found at <code>APPPATH/classes/controller/welcome.php</code>.</p>
<p>This view can be found at <code>APPPATH/views/welcome/index.php</code>.</p>
<p>You can modify these files to get your application started quickly.</p>
Something went wrong with that request. Please try again.