Last active
August 29, 2015 14:05
-
-
Save mikestecker/792bce5f9ec4d925e7dd to your computer and use it in GitHub Desktop.
Fix for 'Call to undefined method Cp::set_variable()' in Channel Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In 'channel_search/mcp.channel_search.php' replace line 102 which is: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_module_name')); | |
With this: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_module_name')); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_module_name'); | |
} | |
and now around line 139, remove: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_manage_rules') . ' > ' . $rule->row('search_id')); | |
replace with: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_manage_rules') . ' > ' . $rule->row('search_id')); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_manage_rules') . ' > ' . $rule->row('search_id'); | |
} | |
now around line 179, remove: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_new_rule') . ' > ' . $rule->get_title()); | |
replace with: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_new_rule') . ' > ' . $rule->get_title()); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_new_rule') . ' > ' . $rule->get_title(); | |
} | |
now around line 219, remove: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_edit_rule') . ' > ' . $rule->get_title()); | |
replace with: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_edit_rule') . ' > ' . $rule->get_title()); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_edit_rule') . ' > ' . $rule->get_title(); | |
} | |
now around line 317, remove: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_new_search')); | |
replace with: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_new_search')); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_new_search'); | |
} | |
lastly around line 340, remove: | |
$this->EE->cp->set_variable('cp_page_title', lang('channel_search_edit_search')); | |
replace with: | |
if ( version_compare( APP_VER, '2.6.0', '<' ) ) { | |
ee()->cp->set_variable('cp_page_title', lang('channel_search_edit_search')); | |
} else { | |
ee()->view->cp_page_title = lang('channel_search_edit_search'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment