Changeset 740


Ignore:
Timestamp:
11/06/12 13:08:30 (2 years ago)
Author:
ofer
Message:

Fixes the bug with the coupling of Chinese simple and traditional, fix bug when upgrading from very old versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WordPress/plugin/transposh/wp/transposh_options.php

    r727 r740  
    136136    private function migrate_old_config() { 
    137137        logger("in migration"); 
    138         if (isset($this->options[OLD_WIDGET_STYLE])) { 
    139             if ($this->options[OLD_WIDGET_STYLE] == 1 && $this->options[OLD_WIDGET_CSS_FLAGS] == 0) { 
    140                 $this->set_widget_file('flags/tpw_flags.php'); 
    141             } 
    142             if ($this->options[OLD_WIDGET_STYLE] == 1 && $this->options[OLD_WIDGET_CSS_FLAGS] == 1) { 
    143                 $this->set_widget_file('flags/tpw_flags_css.php'); 
    144             } 
    145             if ($this->options[OLD_WIDGET_STYLE] == 2 && $this->options[OLD_WIDGET_CSS_FLAGS] == 0) { 
    146                 $this->set_widget_file('flagslist/tpw_list_with_flags.php'); 
    147             } 
    148             if ($this->options[OLD_WIDGET_STYLE] == 2 && $this->options[OLD_WIDGET_CSS_FLAGS] == 1) { 
    149                 $this->set_widget_file('flagslist/tpw_list_with_flags_css.php'); 
    150             } 
     138        if (isset($this->options[OLD_WIDGET_STYLE])) {           
    151139            unset($this->options[OLD_WIDGET_CSS_FLAGS]); 
    152140            unset($this->options[OLD_WIDGET_IN_LIST]); 
     
    477465    function is_editable_language($language) { 
    478466        if ($this->is_default_language($language)) return true; 
    479         return (strpos($this->get_editable_langs(), $language) !== false); 
     467        return (strpos($this->get_editable_langs().',', $language.',') !== false); 
    480468    } 
    481469 
     
    486474    function is_viewable_language($language) { 
    487475        if ($this->is_default_language($language)) return true; 
    488         return (strpos($this->get_viewable_langs(), $language) !== false); 
     476        return (strpos($this->get_viewable_langs().',', $language.',') !== false); 
    489477    } 
    490478 
Note: See TracChangeset for help on using the changeset viewer.