Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Ditched table prefixes

* Updated Fuel to v1.0
  • Loading branch information...
commit a9912ee6f22ffac3b915f0ce06493305d7548868 1 parent 3b20a0b
@abdelm authored
View
14 database.sql
@@ -1,6 +1,6 @@
-DROP TABLE IF EXISTS `sw_users`;
+DROP TABLE IF EXISTS `users`;
-CREATE TABLE `sw_users` (
+CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -15,9 +15,9 @@ CREATE TABLE `sw_users` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-DROP TABLE IF EXISTS `sw_articles`;
+DROP TABLE IF EXISTS `articles`;
-CREATE TABLE `sw_articles` (
+CREATE TABLE `articles` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT '0',
`category_id` int(11) DEFAULT NULL,
@@ -30,9 +30,9 @@ CREATE TABLE `sw_articles` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-DROP TABLE IF EXISTS `sw_categories`;
+DROP TABLE IF EXISTS `categories`;
-CREATE TABLE `sw_categories` (
+CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL DEFAULT '0',
`name` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -40,4 +40,4 @@ CREATE TABLE `sw_categories` (
`created_at` bigint(20) DEFAULT NULL,
`updated_at` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
View
6 fuel/app/classes/controller/articles.php
@@ -70,7 +70,8 @@ public function action_add()
}
else
{
- Session::set_flash('error', 'Something went wrong, please try again!');
+ Session::set_flash('error', 'Something went wrong, '.
+ 'please try again!');
}
Response::redirect('articles/add');
@@ -109,7 +110,8 @@ public function action_edit($id)
}
else
{
- Session::set_flash('error', 'Something went wrong, please try again!');
+ Session::set_flash('error', 'Something went wrong, '.
+ 'please try again!');
}
Response::redirect('articles/edit/'.$article->id);
View
5 fuel/app/classes/controller/common.php
@@ -37,7 +37,10 @@ public function before()
public function action_404()
{
- $messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?');
+ $messages = array('
+ Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?'
+ );
+
$data['title'] = $messages[array_rand($messages)];
// Set a HTTP 404 output header
View
2  fuel/app/classes/model/article.php
@@ -10,7 +10,7 @@ class Model_Article extends Orm\Model {
);
protected static $_properties = array(
- 'id',
+ 'id',
'user_id',
'category_id',
'title',
View
3  fuel/app/config/config.php
@@ -189,8 +189,7 @@
* );
*/
'packages' => array(
- 'orm',
- 'auth',
+ //'orm',
),
/**
View
10 fuel/app/config/db.php
@@ -22,7 +22,7 @@
'password' => '',
'persistent' => false,
),
- 'table_prefix' => 'sw_',
+ 'table_prefix' => '',
'charset' => 'utf8',
'caching' => false,
'profiling' => false,
@@ -32,7 +32,7 @@
'type' => 'mysql',
'connection' => array(
'hostname' => 'localhost',
- 'database' => 'fuel_prod',
+ 'database' => 'stationwagon',
'username' => 'root',
'password' => '',
'persistent' => false,
@@ -47,7 +47,7 @@
'type' => 'mysql',
'connection' => array(
'hostname' => 'localhost',
- 'database' => 'fuel_test',
+ 'database' => 'stationwagon',
'username' => 'root',
'password' => '',
'persistent' => false,
@@ -62,7 +62,7 @@
'type' => 'mysql',
'connection' => array(
'hostname' => 'localhost',
- 'database' => 'fuel_stage',
+ 'database' => 'stationwagon',
'username' => 'root',
'password' => '',
'persistent' => false,
@@ -82,4 +82,4 @@
);
-/* End of file db.php */
+/* End of file db.php */
View
24 fuel/app/config/form.php
@@ -1,24 +0,0 @@
-<?php
-/**
- * Fuel is a fast, lightweight, community driven PHP5 framework.
- *
- * @package Fuel
- * @version 1.0
- * @author Fuel Development Team
- * @license MIT License
- * @copyright 2010 - 2011 Fuel Development Team
- * @link http://fuelphp.com
- */
-
-return array(
- 'prep_value' => true,
- 'auto_id' => true,
- 'auto_id_prefix' => 'form_',
- 'form_method' => 'post',
- 'form_template' => "\t\t{form_open}\n{fields}\n\t\t{form_close}\n",
- 'field_template' => "\t\t\t{label} {field}\n",
- 'multi_field_template' => "\t\t\t{group_label}{required}\n {fields}\t\t\t{label} {field}{fields}",
- 'required_mark' => '*',
-);
-
-/* End of file form.php */
View
7 fuel/app/views/categories/add.php
@@ -20,7 +20,10 @@
</div>
<div class="input submit">
- <?php echo Form::submit(array('value' => 'Add Category')); ?>
+ <?php echo Form::submit(array(
+ 'name' => 'category_add',
+ 'value' => 'Add Category',
+ )); ?>
</div>
-<?php echo Form::close(); ?>
+<?php echo Form::close(); ?>
Please sign in to comment.
Something went wrong with that request. Please try again.