/** * Prepare display params * * @param array MUST contain at least the basic display params */ function init_display($params) { parent::init_display($params); // Disable "allow blockcache" because this widget uses the selected items $this->disp_params['allow_blockcache'] = 0; }
} break; case 'update': case 'update_edit': // Update Settings // Check that this action request is not a CSRF hacked request: $Session->assert_received_crumb('widget'); $edited_ComponentWidget->load_from_Request(); if (!param_errors_detected()) { // Update settings: $edited_ComponentWidget->dbupdate(); $Messages->add(T_('Widget settings have been updated'), 'success'); switch ($display_mode) { case 'js': // js reply $edited_ComponentWidget->init_display(array()); $methods = array(); $methods['widgetSettingsCallback'] = array($edited_ComponentWidget->ID, $edited_ComponentWidget->get_desc_for_list(), $edited_ComponentWidget->get_cache_status(true)); if ($action == 'update') { // Close window after update, and don't close it when user wants continue editing after updating $methods['closeWidgetSettings'] = array(); } else { // Scroll to messages after update $methods['showMessagesWidgetSettings'] = array(); } send_javascript_message($methods, true); break; } $action = 'list'; $Session->set('fadeout_id', $edited_ComponentWidget->ID); header_redirect('?ctrl=widgets&blog=' . $Blog->ID, 303);
/** * Prepare display params * * @param array MUST contain at least the basic display params */ function init_display($params) { parent::init_display($params); if ($this->disp_params['item_visibility'] == 'all') { // Don't cache the widget when we display the images of posts with ALL statuses $this->disp_params['allow_blockcache'] = 0; } }
/** * Prepare display params * * @param array MUST contain at least the basic display params */ function init_display($params) { $params = array_merge(array('featured_intro_before' => '', 'featured_intro_after' => ''), $params); parent::init_display($params); }
/** * Prepare display params * * @param array MUST contain at least the basic display params */ function init_display($params) { $params = array_merge(array('search_input_before' => '', 'search_input_after' => '', 'search_submit_before' => '', 'search_submit_after' => ''), $params); parent::init_display($params); }