Ignore:
Timestamp:
Feb 3, 2011, 12:47:28 AM (13 years ago)
Author:
plg
Message:

feature 2180: remove the localization configuration tab

Location:
extensions/ContactForm/classes
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/classes/cf_config.class.php

    r8909 r9070  
    1111  protected $db_key = null;
    1212  protected $db_comment = null;
    13   protected $config_lang;
    1413 
    1514  /* ************************ */
     
    3938  }
    4039 
    41   function get_config_lang() {
    42     return $this->config_lang;
    43   }
    44  
    45   function get_lang_value($item, $language=null) {
    46     if (null == $language) {
    47       global $user;
    48       $language = $user['language'];
    49     }
    50     $value = $this->config_lang->get_value($language, $item);
    51     if (empty($value)) {
    52       cf_switch_to_default_lang();
    53       $value = l10n($item);
    54       cf_switch_back_to_user_lang();
    55     }
    56     return $value;
    57   }
    58  
    5940  /* ************************ */
    6041  /* ** Loading methods    ** */
     
    6243 
    6344  function load_config() {
    64     $this->config_lang = null;
    6545    if (null != $this->db_key) {
    6646      $query = '
     
    7454        if(is_string($row[0])) {
    7555          $this->config_values = unserialize($row[0]);
    76           if (isset($this->config_values['config_lang'])) {
    77             $this->config_lang = $this->config_values['config_lang'];
    78             $this->config_values['config_lang'] = null;
    79           }
    8056        }
    8157      }
    8258    }
    83 //    CF_Log::add_debug($this->config_lang, 'CF_Config::load_config');
    8459    $this->load_default_config();
    8560  }
    8661 
    8762  protected function load_default_config() {
    88     if (null == $this->config_lang) {
    89       $this->config_lang = new CF_Config_Lang();
    90       $this->config_values['config_lang'] = null;
    91       CF_Log::add_debug($this->config_lang,'CF_Config::load_default_config');
    92     }
    93     $this->config_lang->set_default_values();
    94     $this->config_lang->update_keys();
    9563    foreach (CF_Config::$default_config as $key => $value) {
    9664      if (!isset($this->config_values[$key])) {
     
    10876      return false;
    10977    }
    110     $this->config_values['config_lang'] = $this->config_lang;
     78
     79    unset($this->config_values['config_lang']);
     80   
    11181    if (!isset($this->config_values[CF_CFG_COMMENT])) {
    11282      $this->set_value(CF_CFG_COMMENT, CF_CFG_DB_COMMENT);
  • extensions/ContactForm/classes/cf_plugin.class.php

    r8909 r9070  
    5353   
    5454    $cf_values = array(
    55         'TEXT'  => $this->config->get_lang_value('contact_form_link'),
     55        'TEXT'  => l10n('contact_form_link'),
    5656        'URL'   => make_index_url(array('section' => CF_URL_PARAMETER)),
    5757      );
     
    7575    if (!isset($block_mbMenu->data[CF_MENUBAR_KEY])) {
    7676      $contact_form_menu = array(
    77           'TITLE' => $this->config->get_lang_value('contact_form_title'),
    78           'NAME'  => $this->config->get_lang_value('contact_form'),
     77          'TITLE' => l10n('contact_form_title'),
     78          'NAME'  => l10n('contact_form'),
    7979          'URL'   => make_index_url(array('section' => CF_URL_PARAMETER)),
    8080        );
     
    165165    global $template;
    166166    $cf_link = array(
    167         'TEXT'  => $this->config->get_lang_value('contact_form_link'),
     167        'TEXT'  => l10n('contact_form_link'),
    168168        'URL'   => make_index_url(array('section' => CF_URL_PARAMETER)),
    169169      );
Note: See TracChangeset for help on using the changeset viewer.