Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions mcp.widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function __construct()
$this->EE->javascript->output('WIDGET_URL = "'.html_entity_decode(WIDGET_URL).'";');
$this->EE->javascript->compile();

$this->data = new StdClass;
$this->data->base = WIDGET_URL;

$this->EE->load->library('widget');
Expand All @@ -65,7 +66,7 @@ public function index()
$this->EE->cp->load_package_js('widgets');

// Show the current page to be WIDGET
$this->EE->cp->set_variable('cp_page_title', lang('widgets_module_name'));
$this->EE->view->cp_page_title = lang('widgets_module_name');

// Firstly, install any uninstalled widgets
$uninstalled_widgets = $this->EE->widget->list_uninstalled_widgets();
Expand Down Expand Up @@ -124,7 +125,7 @@ public function update_order()
public function add_instance()
{
$this->EE->cp->set_breadcrumb(WIDGET_URL, lang('widgets_module_name'));
$this->EE->cp->set_variable('cp_page_title', lang('widgets_add_instance'));
$this->EE->view->cp_page_title = lang('widgets_add_instance');

$this->EE->input->post('cancel') and $this->EE->functions->redirect(WIDGET_URL);

Expand Down Expand Up @@ -187,7 +188,7 @@ public function add_instance()
public function edit_instance()
{
$this->EE->cp->set_breadcrumb(WIDGET_URL, lang('widgets_module_name'));
$this->EE->cp->set_variable('cp_page_title', lang('widgets_edit_instance'));
$this->EE->view->cp_page_title = lang('widgets_edit_instance');

// Capture posted back data
$title = $this->EE->input->post('title');
Expand Down Expand Up @@ -249,7 +250,7 @@ public function edit_instance()
public function copy_instance()
{
$this->EE->cp->set_breadcrumb(WIDGET_URL, lang('widgets_module_name'));
$this->EE->cp->set_variable('cp_page_title', lang('widgets_copy_instance'));
$this->EE->view->cp_page_title = lang('widgets_copy_instance');

// Get instance ID
$instance_id = $this->EE->input->get_post('instance_id');
Expand Down Expand Up @@ -284,7 +285,7 @@ public function copy_instance()
public function delete_instance()
{
$this->EE->cp->set_breadcrumb(WIDGET_URL, lang('widgets_module_name'));
$this->EE->cp->set_variable('cp_page_title', lang('widgets_delete_instance'));
$this->EE->view->cp_page_title = lang('widgets_delete_instance');

$id = $this->EE->input->get_post('instance_id');

Expand Down Expand Up @@ -332,7 +333,7 @@ public function delete_instance()
public function delete_area()
{
$this->EE->cp->set_breadcrumb(WIDGET_URL, lang('widgets_module_name'));
$this->EE->cp->set_variable('cp_page_title', lang('widgets_delete_area'));
$this->EE->view->cp_page_title = lang('widgets_delete_area');

$id = $this->EE->input->get_post('area_id');

Expand Down Expand Up @@ -391,7 +392,7 @@ public function details()
// WTF you talkin 'bout?
$widget or $this->EE->functions->redirect(WIDGET_URL);

$this->EE->cp->set_variable('cp_page_title', $widget->title);
$this->EE->view->cp_page_title = lang('widgets_module_name');

$this->data->widget =& $widget;

Expand Down