Ignore:
Timestamp:
Apr 15, 2009, 8:30:13 PM (16 years ago)
Author:
maron
Message:

Generování addonu pro 2.x.x a 3.x.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r151 r180  
    180180  while($Line = mysql_fetch_array($DbResult))
    181181  {
    182         $Original = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Original'])));
    183         $Translated = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Translation'])));
    184         $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
    185         $Translated = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Translated);
     182                $Original = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Original'])));
     183                $Translated = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Translation'])));
     184        if ($Setting['Export'] == 'Addon-2.x.x') {
     185                $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
     186                $Translated = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Translated);
     187        }
    186188    $Buffer .= 'f("'.addslashes($Line['ShortCut']).'", "'.$Original.'", "'.$Translated.'");'."\n";
    187189  }
     
    191193  while($Line = mysql_fetch_array($DbResult))
    192194  {
    193         $Original = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Original'])));
    194         $Translated = str_replace("\r", '', str_replace("\n", '\r\\'."\n", $Line['Original']));
    195         $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
    196         $Translated = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Translated);
     195                $Original = str_replace("\r", '', str_replace("\n", '\r\\'."\n", addslashes($Line['Original'])));
     196                $Translated = str_replace("\r", '', str_replace("\n", '\r\\'."\n", $Line['Original']));
     197        if ($Setting['Export'] == 'Addon-2.x.x') {
     198                $Original = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Original);
     199                $Translated = str_replace("|Hchannel:%d|h[%s]|h", '[%s]', $Translated);
     200        }
    197201    $Buffer .= 'f("'.addslashes($Line['ShortCut']).'", "'.$Original.'", "'.$Translated.'");'."\n";
    198202  }
     
    595599  MakeLanguageFiles($Setting);
    596600  MakeClientStrings($Setting);
    597   MakeMainScript($Setting);
     601 // MakeMainScript($Setting);
    598602}
    599603
Note: See TracChangeset for help on using the changeset viewer.