/**
  * Load params
  */
 function load_from_Request()
 {
     parent::load_from_Request();
     // SPECIAL treatments:
     if (empty($this->param_array['tag_separator'])) {
         // Default name, don't store:
         $this->set('tag_separator', ' ');
     }
 }
예제 #2
0
             // fp> wthis will visually live insert the new widget into the container; it probably SHOULD open the edit properties right away
             send_javascript_message(array('addNewWidgetCallback' => array($edited_ComponentWidget->ID, $container, $edited_ComponentWidget->get('order'), '<a href="' . regenerate_url('blog', 'action=edit&amp;wi_ID=' . $edited_ComponentWidget->ID) . '" class="widget_name">' . $edited_ComponentWidget->get_desc_for_list() . '</a> ' . $edited_ComponentWidget->get_help_link(), $edited_ComponentWidget->get_cache_status(true)), 'editWidget' => array('wi_ID_' . $edited_ComponentWidget->ID)));
             break;
         case 'normal':
         default:
             // take usual action
             header_redirect('?ctrl=widgets&action=edit&wi_ID=' . $edited_ComponentWidget->ID);
             break;
     }
     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