Changeset 381 for trunk/import/import_lua.php
- Timestamp:
- Mar 13, 2010, 9:42:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import/import_lua.php
r366 r381 13 13 { 14 14 echo('<br />'.$Group['Name'].'<br />'); 15 if($Group['LastVersion'] < $BuildNumber) 16 { 15 17 $File = new FileStream(); 16 18 $File->OpenFile('../source/'.$import_version.'/lua/'.$Group['LuaFileName'].'.lua'); … … 22 24 if(strpos($Line, '=') !== false) 23 25 { 24 $LineParts = explode(';', $Line); 25 $LineParts2 = explode('=', $LineParts[0]); 26 $Value['ShortCut'] = trim($LineParts2[0]); 27 $Value['Text'] = addslashes(stripslashes(substr(trim($LineParts2[1]), 1, -1))); 28 $Value['Comment'] = addslashes(stripslashes(substr(trim($LineParts[1]), 3))); 26 $LineParts = explode('=', $Line, 2); 27 $Value['ShortCut'] = trim($LineParts[0]); 28 $Line = substr(trim($LineParts[1]), 1); 29 $TempLine = str_replace('\"', ' ', $Line); // Temporary remove slashed quotes 30 $Value['Text'] = addslashes(stripslashes(substr($Line, 0, strpos($TempLine, '"')))); 31 $Line = trim(substr($Line, strpos($TempLine, '"') + 2)); // Skip closing quote and semicolon 32 $Value['Comment'] = addslashes(stripslashes(substr($Line, 3))); // Skip " --" 33 print_r($Value); 29 34 30 35 $Columns = ''; … … 88 93 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 89 94 $Database->SQLCommand('UPDATE `Group` SET `LastVersion` = "'.$BuildNumber.'", `LastImport` = NOW() WHERE `Id`='.$Group['Id']); 95 } else echo('Již importován pro verzi '.$import_version); 90 96 } 91 97 }
Note:
See TracChangeset
for help on using the changeset viewer.