Skip to content

backport home storage to stable5 - #5630

Merged
DeepDiver1975 merged 1 commit into
stable5from
backport_home_storage_stable5
Oct 31, 2013
Merged

DeepDiver1975 merged 1 commit into
stable5from
backport_home_storage_stable5

Conversation

@butonic

@butonic butonic commented Oct 30, 2013

Copy link
Copy Markdown
Contributor

backport of #5591 for stable5 necessary for user backends that implement getHome(). fixes #5045

@icewind1991 I tried to backport this because I need it for a customer migration. please review

@karlitschek @DeepDiver1975 @VicDeo please review

@karlitschek

Copy link
Copy Markdown
Contributor

👍

Comment thread lib/files/cache/cache.php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of error this will fail as $result is an instance of MDB2_Error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we postpone that to another PR? Because I would rather fix that for all occurences in this file by throwing a correct DatabaseException when an error has been returned. The exception however want's the plain sql query as the second parameter, so I have to remember that as a variable. Or I backport executeAudited from master (which is no longer needed there because doctrine will throw exceptions on all occasions). ... I guess I'll backport executeAudited().

"Thomas Müller" [email protected] schrieb:

@@ -67,6 +67,19 @@ public function getNumericStorageId() {
return $this->numericId;
}

  • public static function storageExists($storageId) {
  •    if (strlen($storageId) > 64) {
    
  •        $storageId = md5($storageId);
    
  •    }
    
  •    $query = \OC_DB::prepare('SELECT `numeric_id` FROM
    
    *PREFIX*storages WHERE id = ?');
  •    $result = $query->execute(array($storageId));
    
  •    if ($row = $result->fetchRow()) {
    

in case of error this will fail as $result is an instance of MDB2_Error


Reply to this email directly or view it on GitHub:
https://github.com/owncloud/core/pull/5630/files#r7316104

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

db errors added with #5640

@ghost

ghost commented Oct 30, 2013

Copy link
Copy Markdown

@ghost ghost assigned butonic Oct 31, 2013
@DeepDiver1975

Copy link
Copy Markdown
Contributor

tested 👍

DeepDiver1975 added a commit that referenced this pull request Oct 31, 2013
@DeepDiver1975
DeepDiver1975 merged commit 640a1f2 into stable5 Oct 31, 2013
@DeepDiver1975
DeepDiver1975 deleted the backport_home_storage_stable5 branch October 31, 2013 10:32
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants