- Timestamp:
- Apr 8, 2010, 8:12:13 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r427 r428 30 30 { 31 31 //echo($DbRow['Name'].', '); 32 $UnionItems[] = 'SELECT `T`.`User`, `T`.`ID`, `T`.`ModifyTime`, '.$DbRow['Id'].' AS `Group`, "'.addslashes($DbRow['Name']).'" AS `GroupName`, `T`.`Take` FROM `'.$DbRow['TablePrefix'].'` AS `T`'.33 ' WHERE (`T`.`Complete` = 1) AND (`T`.`Language` != 0) LIMIT '.$Count;32 $UnionItems[] = 'SELECT * FROM(SELECT `T`.`User`, `T`.`ID`, `T`.`ModifyTime`, '.$DbRow['Id'].' AS `Group`, "'.addslashes($DbRow['Name']).'" AS `GroupName`, `T`.`Take` FROM `'.$DbRow['TablePrefix'].'` AS `T`'. 33 ' WHERE (`T`.`Complete` = 1) AND (`T`.`Language` != 0) ORDER BY `T`.`ModifyTime` DESC LIMIT '.$Count.') AS `T`'; 34 34 } 35 35 $Query = 'SELECT `TT`.*, `User`.`Name` AS `UserName` FROM ('.implode(' UNION ', $UnionItems).') AS `TT`'. -
trunk/save.php
r427 r428 49 49 if($DbResult2->num_rows > 0) 50 50 { 51 // Update existed user translation 51 52 $ExistedText = $DbResult2->fetch_assoc(); 52 $Values = '`Language` = '.$Language.', `ModifyTime` = NOW()'; 53 53 $Values = '`Language` = '.$Language; 54 55 $UpdateModifyTime = false; 54 56 $Completable = true; 55 57 $CompleteParts = $ExistedText['CompleteParts']; … … 58 60 if($GroupItem['Visible'] == 1) 59 61 { 62 if($SourceText[$GroupItem['Column']] != $ExistedText[$GroupItem['Column']]) 63 $UpdateModifyTime = true; 64 60 65 if($EnglishFound[$GroupItem['Column']] == $EnglishText[$GroupItem['Column']]) 66 { 61 67 if(array_key_exists($GroupItem['Column'], $_POST)) 62 68 { … … 64 70 $CompleteParts |= (1 << ($GroupItem['Sequence'] - 1)); 65 71 } 72 } 66 73 if((($CompleteParts & (1 << ($GroupItem['Sequence'] - 1))) == 0) and ($EnglishFound[$GroupItem['Column']] != '')) $Completable = false; 67 74 } … … 79 86 } 80 87 $Values .= ', `Complete`='.$NewComplete.', `CompleteParts` = '.$CompleteParts; 88 89 if($UpdateModifyTime) $Values .= ', `ModifyTime` = NOW()'; 81 90 82 91 // Update user translation
Note:
See TracChangeset
for help on using the changeset viewer.