- Timestamp:
- Apr 8, 2020, 7:27:09 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Core.php
r883 r884 150 150 function Link($Target) 151 151 { 152 $Remaining = substr($Target, strlen($this->BaseURL)); 152 if (substr($Target, 0, strlen($this->BaseURL)) == $this->BaseURL) 153 $Remaining = substr($Target, strlen($this->BaseURL)); 154 else $Remaining = $Target; 153 155 $TargetParts = explode('/', $Remaining); 154 if ((count($TargetParts) > 0) and ($TargetParts[0] == '')) 156 if ((count($TargetParts) > 0) and ($TargetParts[0] == '')) 155 157 array_splice($TargetParts, 0, 1); 156 158 if (count($TargetParts) > 0) -
trunk/Application/Version.php
r883 r884 7 7 8 8 $Version = '1.0'; 9 $Revision = 88 3; // Subversion revision9 $Revision = 884; // Subversion revision 10 10 $DatabaseRevision = 873; // Database structure revision 11 11 $ReleaseDate = strtotime('2020-04-08'); -
trunk/Application/View.php
r881 r884 40 40 foreach ($this->System->Bars['Top'] as $BarItem) 41 41 $Bar .= call_user_func($BarItem); 42 42 if (trim($Bar) != '') $Output .= $Bar; 43 43 else $Output .= ' '; 44 44 … … 54 54 '<div class="verticalmenu"><ul>'; 55 55 foreach ($this->System->Menu as $MenuItem) 56 { 56 57 if (!isset($this->System->User) or $this->System->User->Licence($MenuItem['Permission'])) 57 58 { … … 63 64 $MenuItem['Link'].'"'.$OnClick.'>'.$MenuItem['Title'].'</a></li>'; 64 65 } 65 $Output .= '</ul></div>'; 66 return $Output; 66 } 67 $Output .= '</ul></div>'; 68 return $Output; 67 69 } 68 70 … … 101 103 foreach ($this->System->Bars['Left'] as $BarItem) 102 104 $Bar .= call_user_func($BarItem); 103 105 if (trim($Bar) != '') $Output .= $Bar; 104 106 else $Output .= ' '; 105 107 -
trunk/Modules/Admin/Admin.php
r880 r884 127 127 // '(Select `ID` FROM `'.$Group['TablePrefix'].'` as `sub2` WHERE `sub2`.`Language` = 0 AND `T`.`Entry` = `sub2`.`Entry` AND `T`.`VersionStart` = `sub2`.`VersionStart`)'. 128 128 ' '; //LIMIT 1000 129 //echo $sql;130 129 $DbResult = $this->System->Database->query($sql); 131 130 echo ': <br />'.$Group['TablePrefix'].': <br />'; … … 161 160 ' WHERE `T`.`Language` = 0 '. 162 161 ' ORDER BY `T`.`VersionStart`'; //LIMIT 1000 163 //echo $sql;164 162 $DbResult = $this->System->Database->query($sql); 165 163 echo ': <br />'.$Group['TablePrefix'].': '; … … 169 167 ' WHERE `T`.`Language` = 0 AND `T`.`VersionStart` > '.$line['VersionEnd'].' AND `T`.`Entry` = '.$line['Entry']. 170 168 ' ORDER BY `T`.`VersionStart` LIMIT 1'; //LIMIT 1000 171 // echo $sql;172 169 $DbResult2 = $this->System->Database->query($sql); 173 if ($DbResult2->num_rows > 0) { 170 if ($DbResult2->num_rows > 0) 171 { 174 172 $line2 = $DbResult2->fetch_assoc(); 175 173 176 174 $Same = true; 177 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) { 175 foreach ($TranslationTree[$Group['Id']]['Items'] as $Column) 176 { 178 177 if ($this->StripText($line[$Column['Column']]) <> $this->StripText($line2[$Column['Column']])) 179 178 $Same = false; 180 179 } 181 if ($Same) { 180 if ($Same) 181 { 182 182 echo $line['ID'].'='.$line2['ID'].' ('; 183 183 // $this->System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `Take` = NULL WHERE ID='.$line2['ID']); … … 186 186 ' WHERE `T`.`Entry` = '.$line['Entry'].' AND (`T`.`Take` = '.$line['ID'].' OR `T`.`Take` = '.$line2['ID'].') '; 187 187 $DbResult3 = $this->System->Database->query($sql); 188 while ($line3 = $DbResult3->fetch_assoc()) { 188 while ($line3 = $DbResult3->fetch_assoc()) 189 { 189 190 echo $line3['ID'].' '; 190 191 $this->System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `VersionEnd` = '.$line2['VersionEnd'].', `VersionStart` = '.$line['VersionStart'].', `Take` = '.$line['ID'].' WHERE ID='.$line3['ID']); … … 207 208 208 209 $Output = ''; 209 if (array_key_exists('GameVersion', $_GET)) { 210 if (array_key_exists('GameVersion', $_GET)) 211 { 210 212 $_SESSION['GameVersion'] = $_GET['GameVersion']; 211 213 } … … 221 223 $Output .= 'vloženo <br />'; 222 224 } 223 if (array_key_exists('id', $_GET)) { 225 if (array_key_exists('id', $_GET)) 226 { 224 227 $Group = $TranslationTree[$_GET['id']]; 225 228 // $Output .= '<form action="?action=dbcstructure&id='.$Group['Id'].'">'; … … 242 245 $Line = $File->ReadLine(); 243 246 244 for ($i = 0; $i < substr_count($Line, ','); $i++) { 247 for ($i = 0; $i < substr_count($Line, ','); $i++) 248 { 245 249 $Output .= $i; 246 250 $Output .= '</td><td>'; 247 251 } 248 252 $Output .= '</td></tr><tr><td>'; 249 for ($i = 0; $i < substr_count($Line, ','); $i++) { 253 for ($i = 0; $i < substr_count($Line, ','); $i++) 254 { 250 255 foreach ($Group['Items'] as $GroupItem) 251 256 $Output .= ' <a href="'.$this->System->Link('/admin/?action=dbcstructure&id='. … … 259 264 $Output .= str_replace(',', '</td><td>', $Line); 260 265 $Output .= '</td></tr><tr><td>'; 261 for ($i = 0; $i < 50; $i++) { 266 for ($i = 0; $i < 50; $i++) 267 { 262 268 $Line = $File->ReadLine(); 263 269 $Output .= str_replace(',', '</td><td>', $Line); … … 267 273 $Output .= '</td></tr>'; 268 274 $Output .= '</table>'; 269 } else { 275 } else 276 { 270 277 $DbResult = $this->System->Database->query('SELECT * FROM `ClientVersion`'); 271 278 while ($Version = $DbResult->fetch_assoc()) -
trunk/Modules/Export/ProcessTask.php
r880 r884 167 167 echo('Packing files...'."\n"); 168 168 $this->SetProgress(70); 169 $workdir = str_replace('/', DIRECTORY_SEPARATOR, $Export->TempDir);169 $workdir = str_replace('/', DIRECTORY_SEPARATOR, $Export->TempDir); 170 170 $this->MPQPack($workdir.'lua'); 171 171 $this->SetProgress(80); -
trunk/Modules/Log/Log.php
r881 r884 125 125 $this->Title = T('System log'); 126 126 $Output = ''; 127 if (array_key_exists('type', $_GET) and (is_numeric($_GET['type']))) $_SESSION['type'] = $_GET['type'] * 1; 128 else if (!array_key_exists('type', $_SESSION)) $_SESSION['type'] = ''; 127 if (array_key_exists('type', $_GET)) 128 { 129 if (is_numeric($_GET['type'])) $_SESSION['type'] = $_GET['type'] * 1; 130 else $_SESSION['type'] = ''; 131 } else if (!array_key_exists('type', $_SESSION)) $_SESSION['type'] = ''; 129 132 130 133 if (array_key_exists('group', $_GET)) $_SESSION['group'] = $_GET['group']; -
trunk/Modules/User/Options.php
r880 r884 53 53 '</form>'; 54 54 55 $Output .= ' 55 $Output .= '<fieldset><legend>'.T('Translation team').'</legend>'; 56 56 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `Team`'); 57 $Output .= '<a href=" team/?action=create">'.T('Create team').'</a><br />'.58 '<a href=" team/?action=leave">'.T('Leave team').'</a><br />'.59 '<br /><form action=" team/" method="get">'.57 $Output .= '<a href="'.$this->System->Link('/team/?action=create').'">'.T('Create team').'</a><br />'. 58 '<a href="'.$this->System->Link('/team/?action=leave').'">'.T('Leave team').'</a><br />'. 59 '<br /><form action="'.$this->System->Link('/team/').'" method="get">'. 60 60 '<input type="hidden" name="action" value="gointeam"/>'. 61 61 '<select name="id">'; … … 66 66 $Output .= '>'.htmlspecialchars($LineTeam['Name']).'</option>'; 67 67 } 68 $Output .= '</select> <input type="submit" value="'.T('Enter').'" /> 69 </form>'; 70 $Output .= '</fieldset>'; 68 $Output .= '</select>'. 69 '<input type="submit" value="'.T('Enter').'" />'. 70 '</form>'; 71 '</fieldset>'; 71 72 return $Output; 72 73 } -
trunk/Modules/User/Registration.php
r880 r884 103 103 if (array_key_exists('Language', $_POST)) $Language = $_POST['Language'] * 1; 104 104 else $Language = ''; 105 if (array_key_exists('ClientVersion', $_POST)) $PreferredVersion = $_POST['ClientVersion'] * 1; 105 if (array_key_exists('ClientVersion', $_POST) and is_numeric($_POST['ClientVersion'])) 106 $PreferredVersion = $_POST['ClientVersion'] * 1; 106 107 else $PreferredVersion = ''; 107 108 if ($PreferredVersion == '') $PreferredVersion = 'NULL'; -
trunk/Modules/User/User.php
r880 r884 257 257 // Refresh time of last access 258 258 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('ActivityTime' => 'NOW()')); 259 } else { 259 } else 260 { 260 261 if (GetRemoteAddress() != '') $HostName = gethostbyaddr(GetRemoteAddress()); 261 262 else $HostName = ''; … … 313 314 $UserId = $this->Database->insert_id; 314 315 $this->Database->query('INSERT INTO `UserTrace` (`User`, `LastIP`, `UserAgent`) '. 315 316 316 'VALUES ('.$UserId.', "'.GetRemoteAddress().'", '. 317 '"'.$this->Database->real_escape_string($_SERVER['HTTP_USER_AGENT']).'")'); 317 318 } 318 319 } -
trunk/Packages/Common/Locale.php
r880 r884 153 153 foreach ($this->Texts->Data as $Index => $Item) 154 154 { 155 if (is_array($Item)) continue; 155 156 $DbResult = $Database->select('Locale', '*', '(`Original` ='.$Database->quote($Index). 156 157 ') AND (`Language`='.($Language['Id']).')'); 157 158 if ($DbResult->num_rows > 0) 158 $Database->update('Locale', '(`Language`='.($Language['Id']).') AND '. 159 '(`Original` ='.$Database->quote($Index).')', array('Translated' => $Item)); 160 else $Database->insert('Locale', array('Language' => $Language['Id'], 161 'Original' => $Index, 'Translated' => $Item)); 159 { 160 $Database->update('Locale', '(`Language`='.($Language['Id']).') AND '. 161 '(`Original` ='.$Database->quote($Index).')', array('Translated' => $Item)); 162 } else 163 { 164 $Database->insert('Locale', array('Language' => $Language['Id'], 165 'Original' => $Index, 'Translated' => $Item, 'Fuzzy' => 0)); 166 } 162 167 } 163 168 }
Note:
See TracChangeset
for help on using the changeset viewer.