From c8b51a9e4a513aca1b6e61aa1d863d3fe8f48c4c Mon Sep 17 00:00:00 2001 From: rollox Date: Tue, 22 Sep 2015 01:34:49 +0100 Subject: [PATCH] $this->EE->cp->set_variable was deprecated in 2.6 --- mcp.disqus.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mcp.disqus.php b/mcp.disqus.php index 39dd148..af3bf41 100644 --- a/mcp.disqus.php +++ b/mcp.disqus.php @@ -62,8 +62,12 @@ public function __construct() */ public function index() { - $this->EE->cp->set_variable('cp_page_title', - lang('disqus_module_name')); + // $this->EE->cp->set_variable was deprecated in 2.6 + if (version_compare(APP_VER, '2.6', '>=')) { + $this->EE->view->cp_page_title = lang('disqus_module_name'); + } else { + $this->EE->cp->set_variable('cp_page_title', lang('disqus_module_name')); + } /** * This is the addons home page, add more code here! @@ -72,7 +76,12 @@ public function index() $this->EE->load->library('javascript'); $this->EE->load->library('table'); $this->EE->load->helper('form'); - $this->EE->cp->set_variable('cp_page_title', $this->EE->lang->line('disqus_module_name')); + // $this->EE->cp->set_variable was deprecated in 2.6 + if (version_compare(APP_VER, '2.6', '>=')) { + $this->EE->view->cp_page_title = $this->EE->lang->line('disqus_module_name'); + } else { + $this->EE->cp->set_variable('cp_page_title', $this->EE->lang->line('disqus_module_name')); + } $vars['action_url'] = 'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=disqus'; $vars['form_hidden'] = NULL; @@ -165,4 +174,4 @@ private function save_settings(){ } /* End of file mcp.disqus.php */ -/* Location: /system/expressionengine/third_party/disqus/mcp.disqus.php */ \ No newline at end of file +/* Location: /system/expressionengine/third_party/disqus/mcp.disqus.php */