-
Notifications
You must be signed in to change notification settings - Fork 12
Hướng dẫn nâng cấp module tương thích bản 4.1.02 lên 4.2.01
Tan Dung Phan edited this page Aug 11, 2017
·
2 revisions
Kiểm tra trong file admin.menu.php của module nếu có sử dụng biến $nv_Cache
cần gọi global biến này
Các phần dưới đây có thể không làm module vẫn chạy được.
Tìm kiếm trong module các phần có dạng:
header('location...
die();
Thay thế bằng:
nv_redirect_location(...
Ví dụ, thay vì viết:
die(json_encode(array(
'status' => 'error',
'input' => $field_input_name,
'mess' => sprintf($lang_module['field_match_type_error'], $row_f['title'])
)));
Nên viết lại thành:
nv_jsonOutput(array(
'status' => 'error',
'input' => $field_input_name,
'mess' => sprintf($lang_module['field_match_type_error'], $row_f['title'])
));
Tìm trong code module để thay thế theo như trên.
Thay ví lúc trước viết die("Noi dung");
hoặc exit("Noi dung");
Nên chuyển sang viết nv_htmlOutput("Noi dung");