Ignore:
Timestamp:
03/19/2009 10:39:48 PM (3 years ago)
Author:
amir
Message:

Fixed a bug causing auto translate for readers to fail after the token change.

File:
1 edited

Legend:

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

    r79 r80  
    336336    $url = $home_url . '/index.php'; 
    337337 
    338     //Use base64 encoding to make that when the page is translated (i.e. update_translation) we 
    339     //get back exactlly the same string without having the client decode/encode it in anyway.  
    340     $token = base64_encode($original); 
    341      
    342338    //For use in javascript, make the following changes: 
    343339    //1. Add slashes to escape the inner text 
     
    356352    } 
    357353 
    358     $img = "<img src=\"$plugin_url/translate$add_img.png\" token=\"$token\" alt=\"translate\" id=\"" . IMG_PREFIX . "$segment_id\" 
     354    $img = "<img src=\"$plugin_url/translate$add_img.png\" alt=\"translate\" id=\"" . IMG_PREFIX . "$segment_id\" 
    359355           onclick=\"translate_dialog('$original','$translation','$segment_id'); return false;\" 
    360356           onmouseover=\"hint('$original'); return true;\" 
     
    406402 
    407403    $table_name = $wpdb->prefix . TRANSLATIONS_TABLE; 
    408     $enable_auto_translate = get_option(ENABLE_AUTO_TRANSLATE,1); 
     404    $enable_auto_translate = get_option(ENABLE_AUTO_TRANSLATE,1) && is_translator(); 
    409405} 
    410406 
Note: See TracChangeset for help on using the changeset viewer.