Skip to content

Commit 3bd8a3b

Browse files
author
Bitwasp
committed
Display results on items page..see previous commit
1 parent 7634563 commit 3bd8a3b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

application/controllers/admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ public function delete_item($hash) {
833833
$message = $this->bw_messages->prepare_input($info, $details);
834834
$this->messages_model->send($message);
835835

836-
$this->session->flashdata('returnMessage',json_encode('message','The selected item has been removed'));
836+
$this->session->set_flashdata('returnMessage',json_encode(array('message' =>'The selected item has been removed')));
837837
redirect('items');
838838
} else {
839839
$data['returnMessage'] = 'Unable to delete that item at this time.';

application/controllers/items.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public function index($page = 0) {
3636
$data['title'] = 'Items';
3737
$data['page'] = 'items/index';
3838

39+
$info = (array)json_decode($this->session->flashdata('returnMessage'));
40+
if(count($info) !== 0)
41+
$data['returnMessage'] = $info['message'];
42+
3943
$items_config = array();
4044
$items_per_page = 4;
4145
$data['links'] = $this->items_model->pagination_links($items_config, site_url('items'), 2);
@@ -61,9 +65,6 @@ public function category($hash, $page = 0) {
6165
if($data['category'] == FALSE)
6266
redirect('items');
6367

64-
$info = (array)json_decode($this->session->flashdata('returnMessage'));
65-
if(count($info) !== 0)
66-
$data['returnMessage'] = $info['message'];
6768

6869
$data['title'] = 'Items by Category: '.$data['category']['name'];
6970
$data['custom_title'] = 'Category: '.$data['category']['name'];

version.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bitwasp_created_time=1393865117
1+
bitwasp_created_time=1393865418

0 commit comments

Comments
 (0)