diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/ko.js | 5 | ||||
-rw-r--r-- | lib/l10n/ko.json | 5 | ||||
-rw-r--r-- | lib/private/DB/Adapter.php | 20 | ||||
-rw-r--r-- | lib/private/DB/AdapterOCI8.php | 2 | ||||
-rw-r--r-- | lib/private/DB/AdapterPgSql.php | 2 | ||||
-rw-r--r-- | lib/private/DB/Connection.php | 29 |
6 files changed, 20 insertions, 43 deletions
diff --git a/lib/l10n/ko.js b/lib/l10n/ko.js index 2ae40fc9454..375f75f4583 100644 --- a/lib/l10n/ko.js +++ b/lib/l10n/ko.js @@ -140,6 +140,7 @@ OC.L10N.register( "The requested share comes from a disabled user" : "요청한 공유가 비활성화된 사용자로부터 수신되었습니다", "The user was not created because the user limit has been reached. Check your notifications to learn more." : "사용자 수 제한에 도달하여 사용자를 만들 수 없습니다. 더 자세한 정보는 알림을 참조하십시오.", "Could not find category \"%s\"" : "분류 \"%s\"을(를) 찾을 수 없습니다", + "Input text" : "텍스트를 입력", "Sunday" : "일요일", "Monday" : "월요일", "Tuesday" : "화요일", @@ -234,12 +235,16 @@ OC.L10N.register( "Storage connection timeout. %s" : "저장소 연결 시간이 초과되었습니다. %s", "Audio input" : "음성 입력", "Confirmation" : "확인", + "Generated response" : "생성된 응답", "Context write" : "컨텍스트 쓰기", "Writes text in a given style based on the provided source material." : "제공된 소스 자료를 기반으로 특정 스타일로 텍스트를 작성합니다.", "Writing style" : "작문 스타일", "Source material" : "소스 자료", "Generate image" : "이미지 생성", "Prompt" : "프롬프트", + "Change Tone" : "톤을 변경", + "Write a text that you want the assistant to rewrite in another tone." : "어시스턴트에 다른 톤으로 다시 쓰고 싶은 텍스트를 쓰기", + "Desired tone" : "희망하는 톤", "Chat" : "대화", "Generates a possible headline for a text." : "내용에 대한 헤드라인을 생성하십시오.", "Text" : "텍스트", diff --git a/lib/l10n/ko.json b/lib/l10n/ko.json index 2c2001dcc04..3fe9b3cdebd 100644 --- a/lib/l10n/ko.json +++ b/lib/l10n/ko.json @@ -138,6 +138,7 @@ "The requested share comes from a disabled user" : "요청한 공유가 비활성화된 사용자로부터 수신되었습니다", "The user was not created because the user limit has been reached. Check your notifications to learn more." : "사용자 수 제한에 도달하여 사용자를 만들 수 없습니다. 더 자세한 정보는 알림을 참조하십시오.", "Could not find category \"%s\"" : "분류 \"%s\"을(를) 찾을 수 없습니다", + "Input text" : "텍스트를 입력", "Sunday" : "일요일", "Monday" : "월요일", "Tuesday" : "화요일", @@ -232,12 +233,16 @@ "Storage connection timeout. %s" : "저장소 연결 시간이 초과되었습니다. %s", "Audio input" : "음성 입력", "Confirmation" : "확인", + "Generated response" : "생성된 응답", "Context write" : "컨텍스트 쓰기", "Writes text in a given style based on the provided source material." : "제공된 소스 자료를 기반으로 특정 스타일로 텍스트를 작성합니다.", "Writing style" : "작문 스타일", "Source material" : "소스 자료", "Generate image" : "이미지 생성", "Prompt" : "프롬프트", + "Change Tone" : "톤을 변경", + "Write a text that you want the assistant to rewrite in another tone." : "어시스턴트에 다른 톤으로 다시 쓰고 싶은 텍스트를 쓰기", + "Desired tone" : "희망하는 톤", "Chat" : "대화", "Generates a possible headline for a text." : "내용에 대한 헤드라인을 생성하십시오.", "Text" : "텍스트", diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php index edd8c1bf023..8f1b8e6d75f 100644 --- a/lib/private/DB/Adapter.php +++ b/lib/private/DB/Adapter.php @@ -28,25 +28,11 @@ class Adapter { /** * @param string $table name * - * @return int id of last insert statement, 0 in case there was no INSERT before or it failed to get the ID + * @return int id of last insert statement * @throws Exception */ - public function lastInsertId($table, bool $allowRetry = true): int { - $return = $this->conn->realLastInsertId($table); - if ($return === 0 && $allowRetry) { - /** - * During a reconnect we are losing the connection and when the - * realLastInsertId call is the one triggering the reconnect, it - * does not return the ID. But inside the reconnect, we were able - * to save the last insert id, so calling it a second time is going - * to be successful. - * We can not return the result on the initial call, as we are already - * way deeper in the stack performing the actual database query on - * the doctrine driver. - */ - return $this->lastInsertId($table, false); - } - return $return; + public function lastInsertId($table) { + return (int)$this->conn->realLastInsertId($table); } /** diff --git a/lib/private/DB/AdapterOCI8.php b/lib/private/DB/AdapterOCI8.php index f5ad9f7c934..0a509090bca 100644 --- a/lib/private/DB/AdapterOCI8.php +++ b/lib/private/DB/AdapterOCI8.php @@ -8,7 +8,7 @@ namespace OC\DB; class AdapterOCI8 extends Adapter { - public function lastInsertId($table, bool $allowRetry = true): int { + public function lastInsertId($table) { if (is_null($table)) { throw new \InvalidArgumentException('Oracle requires a table name to be passed into lastInsertId()'); } diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index b321fcf4715..db48c81c2c5 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -9,7 +9,7 @@ namespace OC\DB; class AdapterPgSql extends Adapter { - public function lastInsertId($table, bool $allowRetry = true): int { + public function lastInsertId($table) { $result = $this->conn->executeQuery('SELECT lastval()'); $val = $result->fetchOne(); $result->free(); diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 4ba2d2a341d..96dd578b2ef 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -92,8 +92,6 @@ class Connection extends PrimaryReadReplicaConnection { protected ShardConnectionManager $shardConnectionManager; protected AutoIncrementHandler $autoIncrementHandler; protected bool $isShardingEnabled; - protected bool $disableReconnect = false; - protected int $lastInsertId = 0; public const SHARD_PRESETS = [ 'filecache' => [ @@ -512,9 +510,9 @@ class Connection extends PrimaryReadReplicaConnection { * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY * columns or sequences. * - * @param ?string $name Name of the sequence object from which the ID should be returned. + * @param string $seqName Name of the sequence object from which the ID should be returned. * - * @return int the last inserted ID, 0 in case there was no INSERT before or it failed to get the ID + * @return int the last inserted ID. * @throws Exception */ public function lastInsertId($name = null): int { @@ -528,13 +526,8 @@ class Connection extends PrimaryReadReplicaConnection { * @internal * @throws Exception */ - public function realLastInsertId($seqName = null): int { - if ($this->lastInsertId !== 0) { - $lastInsertId = $this->lastInsertId; - $this->lastInsertId = 0; - return $lastInsertId; - } - return (int)parent::lastInsertId($seqName); + public function realLastInsertId($seqName = null) { + return parent::lastInsertId($seqName); } /** @@ -903,23 +896,11 @@ class Connection extends PrimaryReadReplicaConnection { if ( !isset($this->lastConnectionCheck[$this->getConnectionName()]) || time() <= $this->lastConnectionCheck[$this->getConnectionName()] + 30 || - $this->isTransactionActive() || - $this->disableReconnect + $this->isTransactionActive() ) { return; } - if ($this->getDatabaseProvider() === IDBConnection::PLATFORM_MYSQL) { - /** - * Before reconnecting we save the lastInsertId, so that if the reconnect - * happens between the INSERT executeStatement() and the getLastInsertId call - * we are able to return the correct result after all. - */ - $this->disableReconnect = true; - $this->lastInsertId = (int)parent::lastInsertId(); - $this->disableReconnect = false; - } - try { $this->_conn->query($this->getDriver()->getDatabasePlatform()->getDummySelectSQL()); $this->lastConnectionCheck[$this->getConnectionName()] = time(); |