diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
index 0c70654..f0c566c
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
sys/*.sqlite
docs/*
-assets/js/cache/*
\ No newline at end of file
+assets/js/cache/*
+vendor/*
+composer.lock
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/app/classes/controller.php b/app/classes/controller.php
old mode 100644
new mode 100755
index 72b3813..7a699c4
--- a/app/classes/controller.php
+++ b/app/classes/controller.php
@@ -29,37 +29,9 @@ abstract class Controller extends \miniMVC\Controller {
{
parent::__construct();
$this->load_model('meta\data_model');
- $this->load_model('meta\user_model');
-
- $this->session =& \miniMVC\Session::get_instance();
-
- // Check if user is logged in
- $this->check_login_status();
-
- $this->page->build_header();
- }
-
- /**
- * Require user login for access
- */
- private function check_login_status()
- {
- if ( ! isset($this->session->uid))
- {
- // Redirect to login
- }
-
- return;
-
- }
-
- /**
- * Destruct controller and build page footer
- */
- public function __destruct()
- {
- $this->page->set_foot_js_group('js');
- $this->page->build_footer();
+ $db = \miniMVC\db::get_instance();
+
+ $this->page->queries =& $db->queries;
}
}
diff --git a/app/config/config.php b/app/config/config.php
old mode 100644
new mode 100755
index 841e1a9..01cae91
--- a/app/config/config.php
+++ b/app/config/config.php
@@ -31,12 +31,7 @@
| slash.
|
*/
-// Determine the default site url
-$ri = $_SERVER['REQUEST_URI'];
-$ind_pos = stripos($ri, "index.php");
-$default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri;
-$default_baseurl = "//" . str_replace("//", "/", $_SERVER['HTTP_HOST']. $default_path);
-define('BASE_URL', $default_baseurl);
+define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/');
/*
|--------------------------------------------------------------------------
@@ -46,7 +41,7 @@ define('BASE_URL', $default_baseurl);
| This determines whether "index.php" is in generated urls
|
*/
-define('URL_INDEX_FILE', 'index.php/');
+define('URL_INDEX_FILE', '');
/*
|--------------------------------------------------------------------------
diff --git a/app/config/routes.php b/app/config/routes.php
old mode 100644
new mode 100755
index 0e42238..af8a56c
--- a/app/config/routes.php
+++ b/app/config/routes.php
@@ -29,20 +29,22 @@
// --------------------------------------------------------------------------
-return array(
+$routes = [
// Default Paths
- 'default_controller' => 'welcome',
- 'default_module' => 'meta',
- 'delete' => 'meta/welcome/delete',
- 'update' => 'meta/welcome/update_item',
- 'genre' => 'meta/genre/index',
- 'genre/add' => 'meta/genre/add',
- 'genre/add_category' => 'meta/genre/add_category',
- 'category' => 'meta/category/index',
- 'category/add_section' => 'meta/category/add_section',
- 'section' => 'meta/section/index',
- 'section/add_data' => 'meta/section/add_data',
+ 'default_controller' => 'genre',
'404_route' => '',
-);
+];
+
+// Add default routes
+$router->add('home', '/');
+$router->add(null, '/{controller}/{action}/{id}');
+$router->add('no_id', '/{controller}/{action}');
+
+// Custom routes
+$router->add('outline', '/outline');
+$router->add('edit', '/edit');
+$router->add('delete', '/delete');
+$router->addPost('data_add', '/section/add_data');
+$router->addPost('update', '/update');
// End of routes.php
\ No newline at end of file
diff --git a/app/modules/meta/controllers/category.php b/app/modules/meta/controllers/category.php
old mode 100644
new mode 100755
index f461ae5..27b2052
--- a/app/modules/meta/controllers/category.php
+++ b/app/modules/meta/controllers/category.php
@@ -31,7 +31,7 @@ class category extends meta\controller {
/**
* Returns the sections / editing options for a category
*/
- public function index($id = 0)
+ public function detail($id = 0)
{
if ($id === 0)
{
@@ -50,7 +50,7 @@ class category extends meta\controller {
'category_id' => $id
);
- $this->load_view('category_detail', $data);
+ $this->render('category_detail', $data);
}
/**
@@ -74,7 +74,7 @@ class category extends meta\controller {
$this->page->set_message('error', 'Section already exists for this category');
}
- $this->index($id);
+ $this->detail($id);
}
}
diff --git a/app/modules/meta/controllers/genre.php b/app/modules/meta/controllers/genre.php
old mode 100644
new mode 100755
index ba35019..1837d54
--- a/app/modules/meta/controllers/genre.php
+++ b/app/modules/meta/controllers/genre.php
@@ -20,39 +20,20 @@
*/
class genre extends meta\controller {
- /**
- * Initialize the Controller
- */
- public function __construct()
- {
- parent::__construct();
- }
-
/**
* Default controller method
*/
- public function index($id = 0)
+ public function index()
{
- if ($id === 0)
- {
- // Re-route to detail page if the last segment
- // is a valid integer
- $id = (int) miniMVC\get_last_segment();
- }
+ $data = array();
+ $data['genres'] = $this->data_model->get_genres();
- if ($id === 0)
- {
- // Otherwise, display list of genres
- $data = array();
- $data['genres'] = $this->data_model->get_genres();
+ $this->render('genres', $data);
- $this->load_view('genres', $data);
-
- return;
- }
-
- return $this->detail($id);
+ return;
}
+
+ // --------------------------------------------------------------------------
/**
* Adds a new genre
@@ -77,14 +58,23 @@ class genre extends meta\controller {
// Render the basic page
$this->index();
}
+
+ // --------------------------------------------------------------------------
/**
* Returns the categories / editing options for a genre
*
* @param int
*/
- public function detail($id)
+ public function detail($id = 0)
{
+ if ($id === 0)
+ {
+ // Re-route to detail page if the last segment
+ // is a valid integer
+ $id = (int) miniMVC\get_last_segment();
+ }
+
$genre = $this->data_model->get_genre_by_id($id);
$categories = $this->data_model->get_categories($id);
@@ -94,8 +84,10 @@ class genre extends meta\controller {
'genre_id' => $id
);
- $this->load_view('genre_detail', $data);
+ $this->render('genre_detail', $data);
}
+
+ // --------------------------------------------------------------------------
/**
* Adds a category to the current genre
@@ -120,6 +112,97 @@ class genre extends meta\controller {
$this->detail($id);
}
+
+ // --------------------------------------------------------------------------
+
+ /**
+ * Display an outline of the data for a table of contents
+ */
+ public function outline()
+ {
+ $outline_data = $this->data_model->get_outline_data();
+ $this->render('outline', array('outline' => $outline_data));
+ }
+
+ // --------------------------------------------------------------------------
+
+ /**
+ * Get a message for ajax insertion
+ */
+ public function message()
+ {
+ $type = strip_tags($_GET['type']);
+ $message = $_GET['message'];
+
+ $this->page->set_output(
+ $this->page->set_message($type, $message, TRUE)
+ );
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function delete()
+ {
+ $type = strip_tags($_POST['type']);
+
+ $valid_types = ['genre', 'category', 'section', 'data'];
+
+ $res = (in_array($type, $valid_types))
+ ? $this->data_model->delete($type, (int) $_POST['id'])
+ : 0;
+
+ exit(mb_trim($res));
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function edit()
+ {
+ $type = strip_tags($_GET['type']);
+ $id = (int) $_GET['id'];
+
+ if ($this->data_model->is_valid_type($type))
+ {
+ $data = call_user_func(array($this->data_model, "get_{$type}_by_id"), $id);
+
+ $form_array = array(
+ 'name' => is_array($data) ? $data['key'] : "",
+ 'val' => is_array($data) ? $data['value'] : $data,
+ 'type' => $type,
+ 'id' => $id
+ );
+
+ exit($this->load_view('edit_form', $form_array, TRUE));
+ }
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function update()
+ {
+ $id = (int) $_POST['id'];
+ $type = strip_tags($_POST['type']);
+ $name = strip_tags($_POST['name']);
+ $val = (isset($_POST['val'])) ? $_POST['val'] : NULL;
+
+ if ($this->data_model->is_valid_type($type))
+ {
+ if ($type != 'data')
+ {
+ $res = $this->data_model->update($type, $id, $name);
+ }
+ else
+ {
+ $res = $this->data_model->update_data($id, $name, $val);
+ }
+
+ $res = (int) $res;
+
+ exit(mb_trim($res));
+ }
+
+ exit(0);
+ }
}
// End of genre.php
\ No newline at end of file
diff --git a/app/modules/meta/controllers/section.php b/app/modules/meta/controllers/section.php
old mode 100644
new mode 100755
index ec7dc8d..1c33efb
--- a/app/modules/meta/controllers/section.php
+++ b/app/modules/meta/controllers/section.php
@@ -31,7 +31,7 @@ class section extends meta\controller {
/**
* Default controller method
*/
- public function index($id=0)
+ public function detail($id=0)
{
if ($id === 0)
{
@@ -50,7 +50,7 @@ class section extends meta\controller {
'section_id' => $id
);
- $this->load_view('section_detail', $data);
+ $this->render('section_detail', $data);
}
/**
@@ -77,7 +77,7 @@ class section extends meta\controller {
? $this->page->set_message('success', 'Added data')
: $this->page->set_message('error', 'Data already exists');
- $this->index($section_id);
+ $this->detail($section_id);
}
}
diff --git a/app/modules/meta/controllers/welcome.php b/app/modules/meta/controllers/welcome.php
deleted file mode 100644
index e3619ee..0000000
--- a/app/modules/meta/controllers/welcome.php
+++ /dev/null
@@ -1,167 +0,0 @@
-data_model->get_genres();
-
- $this->load_view('genres', $data);
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Authenticate a user
- */
- public function login()
- {
- $this->load_view('login');
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Logout
- */
- public function logout()
- {
-
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Display an outline of the data for a table of contents
- */
- public function outline()
- {
- $outline_data = $this->data_model->get_outline_data();
- $this->load_view('outline', array('outline' => $outline_data));
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Get a message for ajax insertion
- */
- public function message()
- {
- $type = strip_tags($_GET['type']);
- $message = $_GET['message'];
-
- $this->page->set_output(
- $this->page->set_message($type, $message, TRUE)
- );
- }
-
- // --------------------------------------------------------------------------
-
- public function delete()
- {
- $type = strip_tags($_POST['type']);
-
- switch($type)
- {
- case "genre":
- case "category":
- case "section":
- case "data":
- $res = (int) $this->data_model->delete($type, (int) $_POST['id']);
- break;
-
- default:
- $res = 0;
- break;
- }
- die(trim($res));
- }
-
- // --------------------------------------------------------------------------
-
- public function edit()
- {
- $type = strip_tags($_GET['type']);
- $id = (int) $_GET['id'];
-
- if ($this->data_model->is_valid_type($type))
- {
- $data = call_user_func(array($this->data_model, "get_{$type}_by_id"), $id);
-
- $form_array = array(
- 'name' => is_array($data) ? $data['key'] : "",
- 'val' => is_array($data) ? $data['value'] : $data,
- 'type' => $type,
- 'id' => $id
- );
-
- exit($this->load_view('edit_form', $form_array, TRUE));
- }
- }
-
- // --------------------------------------------------------------------------
-
- public function update_item()
- {
- $id = (int) $_POST['id'];
- $type = strip_tags($_POST['type']);
- $name = strip_tags($_POST['name']);
- $val = (isset($_POST['val'])) ? $_POST['val'] : NULL;
-
- if ($this->data_model->is_valid_type($type))
- {
- if ($type != 'data')
- {
- $res = $this->data_model->update($type, $id, $name);
- }
- else
- {
- $res = $this->data_model->update_data($id, $name, $val);
- }
-
- $res = (int) $res;
-
- exit(trim($res));
- }
-
- exit(0);
- }
-}
-
-// End of welcome.php
\ No newline at end of file
diff --git a/app/modules/meta/models/data_model.php b/app/modules/meta/models/data_model.php
old mode 100644
new mode 100755
index 1c5c255..8f64e2e
--- a/app/modules/meta/models/data_model.php
+++ b/app/modules/meta/models/data_model.php
@@ -15,6 +15,8 @@
namespace meta;
+use \miniMVC\db;
+
/**
* Main Model for database interaction
*
@@ -42,9 +44,7 @@ class data_model extends \miniMVC\Model {
public function __construct()
{
parent::__construct();
-
- $this->session =& \miniMVC\Session::get_instance();
- $this->db =& \miniMVC\db::get_instance();
+ $this->db = db::get_instance();
}
// --------------------------------------------------------------------------
@@ -113,7 +113,7 @@ class data_model extends \miniMVC\Model {
->where('id', (int) $id)
->update($type);
- return ( ! empty($query)) ;
+ return (bool) $query;
}
// --------------------------------------------------------------------------
@@ -128,19 +128,13 @@ class data_model extends \miniMVC\Model {
*/
public function update_data($data_id, $key, $val)
{
- try{
- // Save the data
- $this->db->set('key', $key)
- ->set('value', $val)
- ->where('id', (int) $data_id)
- ->update('data');
- }
- catch(\PDOException $e)
- {
- return FALSE;
- }
+ // Save the data
+ $query = $this->db->set('key', $key)
+ ->set('value', $val)
+ ->where('id', (int) $data_id)
+ ->update('data');
- return TRUE;
+ return (bool) $query;
}
// --------------------------------------------------------------------------
@@ -161,13 +155,13 @@ class data_model extends \miniMVC\Model {
->limit(1)
->get();
- // Fetch the data as a workaround
- // for databases that do not support
- // grabbing result counts (SQLite / Firebird)
- $array = $query->fetchAll(\PDO::FETCH_ASSOC);
- if (count($array) < 1)
+ $res = $query->fetch();
+
+ if (count($res) < 1)
{
- $this->db->set('genre', $genre)
+ $id = $this->get_next_id("genre");
+ $this->db->set('id', $id)
+ ->set('genre', $genre)
->insert('genre');
return TRUE;
@@ -195,13 +189,13 @@ class data_model extends \miniMVC\Model {
->limit(1)
->get();
- // Fetch the data as a workaround
- // for databases that do not support
- // grabbing result counts (SQLite / Firebird)
- $array = $query->fetchAll();
- if (count($array)< 1)
+ $res = $query->fetch();
+
+ if (count($res) < 1)
{
- $this->db->set('category', $cat)
+ $id = $this->get_next_id('category');
+ $this->db->set('id', $id)
+ ->set('category', $cat)
->set('genre_id', $genre_id)
->insert('category');
@@ -234,7 +228,9 @@ class data_model extends \miniMVC\Model {
$array = $q->fetchAll();
if (count($array) < 1)
{
- $this->db->set('section', $section)
+ $id = $this->get_next_id('section');
+ $this->db->set('id', $id)
+ ->set('section', $section)
->set('category_id', (int) $category_id)
->insert('section');
@@ -262,10 +258,14 @@ class data_model extends \miniMVC\Model {
->where('key', $key)
->get();
- if ($this->db->num_rows() > 0) return FALSE;
+ $res = $q->fetch();
+
+ if (count($res) > 0) return FALSE;
// Save the data
- $this->db->set('key', $key)
+ $id = $this->get_next_id('data');
+ $this->db->set('id', $id)
+ ->set('key', $key)
->set('value', $val)
->set('section_id', (int) $section_id)
->insert('data');
@@ -274,8 +274,6 @@ class data_model extends \miniMVC\Model {
return TRUE;
}
-
-
// --------------------------------------------------------------------------
// ! Data Retrieval
// --------------------------------------------------------------------------
@@ -290,8 +288,8 @@ class data_model extends \miniMVC\Model {
{
$query = $this->db->select('genre, genre_id, category, category_id')
->from('section s')
- ->join('category c', 'c.id=s.category_id')
- ->join('genre g', 'g.id=c.genre_id')
+ ->join('category c', 'c.id=s.category_id', 'inner')
+ ->join('genre g', 'g.id=c.genre_id', 'inner')
->where('s.id', $section_id)
->get();
@@ -310,7 +308,7 @@ class data_model extends \miniMVC\Model {
$genres = array();
$query = $this->db->select('id, genre')
->from('genre')
- ->order_by('genre', 'asc')
+ ->orderBy('genre', 'asc')
->get();
while($row = $query->fetch(\PDO::FETCH_ASSOC))
@@ -377,6 +375,7 @@ class data_model extends \miniMVC\Model {
$query = $this->db->select('id, category')
->from('category')
->where('genre_id', (int) $genre_id)
+ ->orderBy('category', 'asc')
->get();
while($row = $query->fetch(\PDO::FETCH_ASSOC))
@@ -422,6 +421,7 @@ class data_model extends \miniMVC\Model {
$query = $this->db->select('id, section')
->from('section')
->where('category_id', (int) $category_id)
+ ->orderBy('section', 'asc')
->get();
while($row = $query->fetch(\PDO::FETCH_ASSOC))
@@ -467,6 +467,7 @@ class data_model extends \miniMVC\Model {
$query = $this->db->select('id, key, value')
->from('data')
->where('section_id', (int) $section_id)
+ ->orderBy('key', 'asc')
->get();
while($row = $query->fetch(\PDO::FETCH_ASSOC))
@@ -510,6 +511,7 @@ class data_model extends \miniMVC\Model {
// Get the sections
$s_query = $this->db->from('section')
->where('category_id', (int) $category_id)
+ ->orderBy('section', 'asc')
->get();
$sections = array();
@@ -525,7 +527,8 @@ class data_model extends \miniMVC\Model {
if ( ! empty($sections))
{
$d_query = $this->db->from('data')
- ->where_in('section_id', array_keys($sections))
+ ->whereIn('section_id', array_keys($sections))
+ ->orderBy('key', 'asc')
->get();
while($row = $d_query->fetch(\PDO::FETCH_ASSOC))
@@ -557,62 +560,24 @@ class data_model extends \miniMVC\Model {
public function get_outline_data()
{
// Get the genres
- $g_query = $this->db->from('genre')
+ $query = $this->db->select('g.id, genre,
+ c.id AS cat_id, category,
+ s.id AS section_id, section')
+ ->from('genre g')
+ ->join('category c', 'c.genre_id=g.id', 'inner')
+ ->join('section s', 's.category_id=c.id', 'inner')
+ ->orderBy('genre', 'asc')
+ ->orderBy('category', 'asc')
+ ->orderBy('section', 'asc')
->get();
- $genres = array();
+ $return = array();
- while ($row = $g_query->fetch(\PDO::FETCH_ASSOC))
+ // Create the nested array
+ while ($row = $query->fetch(\PDO::FETCH_ASSOC))
{
- $genres[$row['id']] = $row['genre'];
- }
-
- // Get the categories
- $c_query = $this->db->from('category')
- ->get();
-
- $categories = array();
-
- while($row = $c_query->fetch(\PDO::FETCH_ASSOC))
- {
- $categories[$row['genre_id']][$row['id']] = $row['category'];
- }
-
- // Get the sections
- $s_query = $this->db->from('section')
- ->get();
-
- $sections = array();
-
- while($row = $s_query->fetch(\PDO::FETCH_ASSOC))
- {
- $sections[$row['category_id']][$row['id']] = $row['section'];
- }
-
-
- // Organize into a nested array
- foreach($genres as $genre_id => $genre)
- {
- $return[$genre_id][$genre] = array();
- $g =& $return[$genre_id][$genre];
-
- // Categories for this genre
- if (isset($categories[$genre_id]))
- {
- $g = $categories[$genre_id];
-
- foreach($categories[$genre_id] as $category_id => $category)
- {
- $g[$category_id] = array($category => array());
- $c =& $g[$category_id][$category];
-
- // Sections for this category
- if (isset($sections[$category_id]))
- {
- $c = $sections[$category_id];
- }
- }
- }
+ extract($row);
+ $return[$id][$genre][$cat_id][$category][$section_id] = $section;
}
return $return;
@@ -649,7 +614,7 @@ class data_model extends \miniMVC\Model {
{
$query = $this->db->select('id')
->from($type)
- ->order_by('id', 'DESC')
+ ->orderBy('id', 'DESC')
->limit(1)
->get();
@@ -660,6 +625,77 @@ class data_model extends \miniMVC\Model {
// --------------------------------------------------------------------------
+ /**
+ * Get the next id for database insertion
+ *
+ * @param string $table_name
+ * @param string $field
+ * @return int
+ */
+ public function get_next_id($table_name, $field="id")
+ {
+
+ $query = $this->db->select("MAX($field) as last_id")
+ ->from($table_name)
+ ->limit(1)
+ ->get();
+
+ $row = $query->fetch(\PDO::FETCH_ASSOC);
+
+ if (empty($row))
+ {
+ $id = 1;
+ }
+ else
+ {
+ $id = intval($row['last_id']) + 1;
+ }
+
+ return $id;
+ }
+
+ // --------------------------------------------------------------------------
+
+ public function create_tables()
+ {
+ $tables = [
+ 'genre' => $this->db->util->create_table('genre', [
+ 'id' => 'INT NOT NULL PRIMARY KEY',
+ 'genre' => 'VARCHAR(255)'
+ ]),
+ 'category' => $this->db->util->create_table('category', [
+ 'id' => 'INT NOT NULL PRIMARY KEY',
+ 'genre_id' => 'INT NOT NULL',
+ 'category' => 'VARCHAR(255)'
+ ],[
+ 'genre_id' => ' REFERENCES "genre" '
+ ]),
+ 'section' => $this->db->util->create_table('section', [
+ 'id' => 'INT NOT NULL PRIMARY KEY',
+ 'category_id' => 'INT NOT NULL',
+ 'section' => 'VARCHAR(255)'
+ ],[
+ 'category_id' => ' REFERENCES "category" '
+ ]),
+ 'data' => $this->db->util->create_table('data', [
+ 'id' => 'INT NOT NULL PRIMARY KEY',
+ 'section_id' => 'INT NOT NULL',
+ 'key' => 'VARCHAR(255)',
+ 'value' => 'BLOB SUB_TYPE TEXT'
+ ],[
+ 'section_id' => ' REFERENCES "section"'
+ ])
+ ];
+
+ foreach($tables as $table => $sql)
+ {
+ // Add the table
+ $this->db->query($sql);
+ echo "{$sql};
";
+
+ }
+ }
+
}
// End of data_model.php
\ No newline at end of file
diff --git a/app/modules/meta/models/user_model.php b/app/modules/meta/models/user_model.php
deleted file mode 100644
index 883b40d..0000000
--- a/app/modules/meta/models/user_model.php
+++ /dev/null
@@ -1,120 +0,0 @@
-bcrypt = new \Bcrypt(15);
- $this->db =& \miniMVC\db::get_instance();
- $this->session =& \miniMVC\Session::get_instance();
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Add a user for access
- *
- * @param string
- * @param string
- * @param string
- */
- public function add_user($username, $pass1, $pass2)
- {
- // Check for the existing username
- $query = $this->db->select('username')
- ->from('user')
- ->where('username', $username)
- ->get();
-
- $res = $query->fetch(\PDO::FETCH_ASSOC);
-
- if (empty($res)) return FALSE;
-
- // Verify that passwords match
- if ($pass1 !== $pass2) return FALSE;
-
- // Add user
- $hashed = $this->bcrypt->hash($pass1);
-
- $this->db->set('username', $username)
- ->set('hash', $hashed)
- ->insert('user');
-
- return TRUE;
- }
-
- // --------------------------------------------------------------------------
-
- /**
- * Check and see if the login is valid
- *
- * @param string
- * @param string
- * @return bool
- */
- public function check_login($username, $pass)
- {
- $query = $this->db->from('user')
- ->where('username', $username)
- ->get();
-
- $row = $query->fetch(\PDO::FETCH_ASSOC);
-
- // The user does not exist
- if (empty($row))
- {
- return FALSE;
- }
-
- return $this->bcrypt->verify($pass, $row['hash']);
- }
-
-}
-
-// End of user_model.php
\ No newline at end of file
diff --git a/app/modules/meta/views/category_detail.php b/app/modules/meta/views/category_detail.php
old mode 100644
new mode 100755
index 8bf3609..3e6a40e
--- a/app/modules/meta/views/category_detail.php
+++ b/app/modules/meta/views/category_detail.php
@@ -1,5 +1,5 @@