From a0a2de012191de14ba6b011f2f3cde1896707ab2 Mon Sep 17 00:00:00 2001 From: jolyjokerz Date: Sat, 14 Mar 2015 17:35:25 +0100 Subject: [PATCH] General Update 6-2 Comment lines cleared. --- application/controllers/admin/category.php | 12 +++++----- application/controllers/admin/currency.php | 9 +++----- application/controllers/admin/module.php | 11 ++++----- application/controllers/admin/option.php | 23 ++++++++----------- application/controllers/admin/order.php | 9 +++----- application/controllers/admin/product.php | 11 +++------ .../controllers/admin/product_option.php | 15 ++++-------- application/controllers/admin/settings.php | 3 +-- 8 files changed, 35 insertions(+), 58 deletions(-) diff --git a/application/controllers/admin/category.php b/application/controllers/admin/category.php index e823285..49a6da4 100644 --- a/application/controllers/admin/category.php +++ b/application/controllers/admin/category.php @@ -69,8 +69,8 @@ public function Add(){ if($_POST){ - $add = false; - //$add = $this->category_model->add($_POST); + + $add = $this->category_model->add($_POST); if($add){ $this->session->set_flashdata('action_message', 'New Category added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -98,8 +98,8 @@ public function update(){ $this->load->model('admin/category_model'); if($_POST){ - $update = false; - //$update = $this->category_model->update($this->uri->segment(4), $_POST); + + $update = $this->category_model->update($this->uri->segment(4), $_POST); if($update){ $this->session->set_flashdata('action_message', 'Category updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -116,8 +116,8 @@ public function delete(){ $this->load->model('admin/category_model'); if(intval($this->uri->segment(4)) > 0){ - $delete = false; - //$delete = $this->category_model->delete($this->uri->segment(4)); + + $delete = $this->category_model->delete($this->uri->segment(4)); if($delete){ $this->session->set_flashdata('action_message', 'Category deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/currency.php b/application/controllers/admin/currency.php index 5938ae2..2ec286b 100644 --- a/application/controllers/admin/currency.php +++ b/application/controllers/admin/currency.php @@ -49,8 +49,7 @@ public function Add(){ $this->load->model('admin/currency_model'); if($_POST){ - $add = false; - //$add = $this->currency_model->add($_POST); + $add = $this->currency_model->add($_POST); if($add){ $this->session->set_flashdata('action_message', 'New Currency added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -69,8 +68,7 @@ public function update(){ $this->load->model('admin/currency_model'); if($_POST){ - $update = false; - //$update = $this->currency_model->update($this->uri->segment(4), $_POST); + $update = $this->currency_model->update($this->uri->segment(4), $_POST); if($update){ $this->session->set_flashdata('action_message', 'Currency updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -89,8 +87,7 @@ public function delete(){ $this->load->model('admin/currency_model'); - $delete = false; - //$delete = $this->currency_model->delete($this->uri->segment(4)); + $delete = $this->currency_model->delete($this->uri->segment(4)); if($delete){ $this->session->set_flashdata('action_message', 'Currency deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/module.php b/application/controllers/admin/module.php index a4337bc..d59952d 100644 --- a/application/controllers/admin/module.php +++ b/application/controllers/admin/module.php @@ -41,8 +41,8 @@ public function add(){ $this->load->model('admin/module_model'); if($_POST){ - $add = false; - //$add = $this->module_model->add($_POST); + + $add = $this->module_model->add($_POST); if($add){ $this->session->set_flashdata('action_message', 'New Module added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -61,8 +61,8 @@ public function detail(){ $this->load->model('admin/module_model'); if($_POST){ - $update = false; - //$update = $this->module_model->update($_POST); + + $update = $this->module_model->update($_POST); if($update){ $this->session->set_flashdata('action_message', 'Module updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -84,8 +84,7 @@ public function detail(){ public function delete(){ $this->load->model('admin/module_model'); - $delete = false; - //$delete = $this->module_model->delete($this->uri->segment(4)); + $delete = $this->module_model->delete($this->uri->segment(4)); if($delete){ $this->session->set_flashdata('action_message', 'Module deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/option.php b/application/controllers/admin/option.php index 3707f82..31f371e 100644 --- a/application/controllers/admin/option.php +++ b/application/controllers/admin/option.php @@ -50,8 +50,7 @@ public function add(){ $data["options"] = $this->option_model->get_option_list(); if($_POST){ - $add = false; - //$add = $this->option_model->add_new_option($_POST); + $add = $this->option_model->add_new_option($_POST); if($add){ $this->session->set_flashdata('action_message', 'New option added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -74,8 +73,8 @@ public function add_new_value(){ $data["option_id"] = $this->uri->segment(4); if($_POST){ - $add_value = false; - //$add_value = $this->option_model->add_new_value($_POST); + + $add_value = $this->option_model->add_new_value($_POST); if($add_value){ $this->session->set_flashdata('action_message', 'New option value added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -94,8 +93,7 @@ public function add_new_value(){ public function delete(){ $this->load->model('admin/option_model'); - $delete_option = false; - //$delete_option = $this->option_model->delete_option($this->uri->segment(4)); + $delete_option = $this->option_model->delete_option($this->uri->segment(4)); if($delete_option){ $this->session->set_flashdata('action_message', 'Option deleted!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -112,8 +110,8 @@ public function value_update(){ $this->load->model('admin/option_model'); if($_POST){ - $update_value = false; - //$update_value = $this->option_model->value_update($_POST); + + $update_value = $this->option_model->value_update($_POST); if($update_value){ $this->session->set_flashdata('action_message', 'Option value updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -130,11 +128,10 @@ public function value_update(){ public function add_value(){ $this->load->model('admin/product_option_model'); - if($_POST){ - $add_value_next = false; - //$add_value_next = $this->product_option_model->add_new_value($_POST); + + $add_value_next = $this->product_option_model->add_new_value($_POST); if($add_value_next){ $this->session->set_flashdata('action_message', 'New option value added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -152,9 +149,7 @@ public function add_value(){ public function delete_value(){ $this->load->model('admin/product_option_model'); - - $delete_value = false; - //$delete_value = $this->product_option_model->delete_value($this->uri->segment(4)); + $delete_value = $this->product_option_model->delete_value($this->uri->segment(4)); if($delete_value){ $this->session->set_flashdata('action_message', 'Value deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/order.php b/application/controllers/admin/order.php index 8eed188..aed7a37 100644 --- a/application/controllers/admin/order.php +++ b/application/controllers/admin/order.php @@ -42,8 +42,7 @@ public function detail(){ $this->load->model('admin/order_model'); if($_POST){ - $update_comment = false; - //$update_comment = $update = $this->order_model->update_comment($_POST); + $update_comment = $update = $this->order_model->update_comment($_POST); if($update_comment){ $this->session->set_flashdata('action_message', 'Order comment updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -75,8 +74,7 @@ public function product_add(){ $this->load->model('admin/order_model'); if($_POST){ - $add_product = false; - //$add_product = $this->order_model->productadd($_POST); + $add_product = $this->order_model->productadd($_POST); if($add_product){ $this->session->set_flashdata('action_message', 'New product added in Order!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -93,8 +91,7 @@ public function product_add(){ public function product_delete(){ $this->load->model('admin/order_model'); - $delete_product = false; - //$delete_product = $this->order_model->productdelete($this->uri->segment(4)); + $delete_product = $this->order_model->productdelete($this->uri->segment(4)); if($delete_product){ $this->session->set_flashdata('action_message', 'Product deleted in Order!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/product.php b/application/controllers/admin/product.php index 616d220..91b1a0d 100644 --- a/application/controllers/admin/product.php +++ b/application/controllers/admin/product.php @@ -73,8 +73,7 @@ public function Add(){ if($_POST){ - $add = false; - //$add = $this->product_model->add($_POST); + $add = $this->product_model->add($_POST); if($add){ $this->session->set_flashdata('action_message', 'New product added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -102,8 +101,7 @@ public function update(){ $this->load->model('admin/product_model'); if($_POST){ - $update = false; - //$update = $this->product_model->update($this->uri->segment(4), $_POST); + $update = $this->product_model->update($this->uri->segment(4), $_POST); if($update){ $this->session->set_flashdata('action_message', 'Product updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -122,10 +120,7 @@ public function update(){ public function delete(){ $this->load->model('admin/product_model'); - - - $delete = false; - //$delete = $this->product_model->delete($this->uri->segment(4)); + $delete = $this->product_model->delete($this->uri->segment(4)); if($delete){ $this->session->set_flashdata('action_message', 'Product deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/product_option.php b/application/controllers/admin/product_option.php index b8665dd..74e5615 100644 --- a/application/controllers/admin/product_option.php +++ b/application/controllers/admin/product_option.php @@ -45,8 +45,7 @@ public function add(){ $data["options"] = $this->product_option_model->get_option_type_list(); if($_POST){ - $add_new_option = false; - //$add_new_option = $this->product_option_model->add_new_option($_POST); + $add_new_option = $this->product_option_model->add_new_option($_POST); if($add_new_option){ $this->session->set_flashdata('action_message', 'New Product Option added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -63,8 +62,7 @@ public function add(){ public function delete(){ $this->load->model('admin/product_option_model'); - $delete = false; - //$delete = $this->product_option_model->delete($this->uri->segment(4)); + $delete = $this->product_option_model->delete($this->uri->segment(4)); if($delete){ $this->session->set_flashdata('action_message', 'Product Option deleted!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -81,8 +79,7 @@ public function value_update(){ $this->load->model('admin/product_option_model'); if($_POST){ - $update_value = false; - //$update_value = $this->product_option_model->value_update($_POST); + $update_value = $this->product_option_model->value_update($_POST); if($update_value){ $this->session->set_flashdata('action_message', 'Product Option value updated!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -101,8 +98,7 @@ public function add_value(){ $this->load->model('admin/product_option_model'); if($_POST){ - $add_new_value = false; - //$add_new_value = $this->product_option_model->add_new_value($_POST); + $add_new_value = $this->product_option_model->add_new_value($_POST); if($add_new_value){ $this->session->set_flashdata('action_message', 'Product Option new value added!'); $this->session->set_flashdata('action_message_type', 'success'); @@ -119,8 +115,7 @@ public function add_value(){ public function delete_value(){ $this->load->model('admin/product_option_model'); - $delete_value = false; - //$delete_value = $this->product_option_model->delete_value($this->uri->segment(4)); + $delete_value = $this->product_option_model->delete_value($this->uri->segment(4)); if($delete_value){ $this->session->set_flashdata('action_message', 'Product Option value deleted!'); $this->session->set_flashdata('action_message_type', 'success'); diff --git a/application/controllers/admin/settings.php b/application/controllers/admin/settings.php index 55f5b0e..d50814e 100644 --- a/application/controllers/admin/settings.php +++ b/application/controllers/admin/settings.php @@ -24,8 +24,7 @@ public function detail(){ $this->load->model('admin/currency_model'); if($_POST){ - $update = false; - //$update = $this->settings_model->update(1, $_POST); + $update = $this->settings_model->update(1, $_POST); if($update){ $this->session->set_flashdata('action_message', 'Settings updated!'); $this->session->set_flashdata('action_message_type', 'success');