Skip to content

Commit

Permalink
new version 1.0.6 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prrvchr committed Dec 28, 2023
1 parent a60eabf commit c94f68a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
46 changes: 23 additions & 23 deletions source/mDriveOOo/service/pythonpath/mdrive/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ def _parseSharedFolder(self, request, parameter, parent, timestamp):
def parseRootFolder(self, parameter, content):
return self.parseItems(content.User.Request, parameter, content.Link)

def parseItems(self, request, parameter):
def parseItems(self, request, parameter, link=''):
readonly = versionable = False
addchild = rename = True
path = link = ''
path = ''
while parameter.hasNextPage():
response = request.execute(parameter)
if response.Ok:
Expand Down Expand Up @@ -407,20 +407,20 @@ def getRequestParameter(self, request, method, data=None):
parameter.Url += '/me/drive/sharedWithMe'

elif method == 'getFolderContent':
if data.Link is None:
url = '/me/drive/items/%s/children' % data.Id
else:
if data.Link:
url = '/drives/%s/items/%s/children' % (data.Link, data.Id)
else:
url = '/me/drive/items/%s/children' % data.Id
print("Provider.getFolderContent() Url: %s" % url)
parameter.Url += url
parameter.setQuery('$select', g_itemfields)
parameter.setQuery('$top', g_pages)

elif method == 'getDocumentLocation':
if data.Link is None:
url = '/me/drive/items/%s/content' % data.Id
else:
if data.Link:
url = '/drives/%s/items/%s/content' % (data.Link, data.Id)
else:
url = '/me/drive/items/%s/content' % data.Id
parameter.Url += url
print("Provider.getRequestParameter() Name: %s - Url: %s" % (parameter.Name, parameter.Url))
parameter.NoRedirect = True
Expand Down Expand Up @@ -450,10 +450,10 @@ def getRequestParameter(self, request, method, data=None):

elif method == 'createNewFolder':
parameter.Method = 'POST'
if data.get('Link') is None:
url = '/me/drive/items/%s/children' % data.get('ParentId')
else:
if data.get('Link'):
url = '/drives/%s/items/%s/children' % (data.get('Link'), data.get('ParentId'))
else:
url = '/me/drive/items/%s/children' % data.get('ParentId')
parameter.Url += url
parameter.setJson('name', data.get('Title'))
# FIXME: We need to bee able to construct a JSON object like:
Expand All @@ -464,19 +464,19 @@ def getRequestParameter(self, request, method, data=None):

elif method == 'getUploadLocation':
parameter.Method = 'POST'
if data.get('Link') is None:
url = '/me/drive/items/%s/createUploadSession' % data.get('Id')
else:
if data.get('Link'):
url = '/drives/%s/items/%s/createUploadSession' % (data.get('Link'), data.get('Id'))
else:
url = '/me/drive/items/%s/createUploadSession' % data.get('Id')
parameter.Url += url
print("Provider.getUploadLocation() Parameter.Json: '%s'" % parameter.Json)

elif method == 'getNewUploadLocation':
parameter.Method = 'POST'
if data.get('Link') is None:
url = '/me/drive/items/%s:/%s:/createUploadSession' % (data.get('ParentId'), data.get('Title'))
else:
if data.get('Link'):
url = '/drives/%s/items/%s:/%s:/createUploadSession' % (data.get('Link'), data.get('ParentId'), data.get('Title'))
else:
url = '/me/drive/items/%s:/%s:/createUploadSession' % (data.get('ParentId'), data.get('Title'))
parameter.Url += url
parameter.setJson('item/@odata.type', 'microsoft.graph.driveItemUploadableProperties')
parameter.setJson('item/@microsoft.graph.conflictBehavior', 'replace')
Expand All @@ -491,18 +491,18 @@ def getRequestParameter(self, request, method, data=None):

elif method == 'uploadFile':
parameter.Method = 'PUT'
if data.get('Link') is None:
url = '/me/drive/items/%s/content' % data.get('Id')
else:
if data.get('Link'):
url = '/drives/%s/items/%s/content' % (data.get('Link'), data.get('Id'))
else:
url = '/me/drive/items/%s/content' % data.get('Id')
parameter.Url += url

elif method == 'uploadNewFile':
parameter.Method = 'PUT'
if data.get('Link') is None:
url = '/me/drive/items/%s:/%s:/content' % (data.get('ParentId'), data.get('Title'))
else:
if data.get('Link'):
url = '/drives/%s/items/%s:/%s:/content' % (data.get('Link'), data.get('ParentId'), data.get('Title'))
else:
url = '/me/drive/items/%s:/%s:/content' % (data.get('ParentId'), data.get('Title'))
parameter.Url += url
return parameter

2 changes: 1 addition & 1 deletion uno/lib/uno/ucb/hsqldb/TableColumn.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Table|Column|Type|Default|Options|Primary|Unique|ForeignTable|ForeignColumn
1|8|TIMESTAMP(6)|CURRENT_TIMESTAMP(6)|NOT NULL|false|false||
1|9|VARCHAR(100)|'application/octet-stream'|NOT NULL|false|false||
1|10|BIGINT|0|NOT NULL|false|false||
1|11|VARCHAR(256)|NULL||false|false||
1|11|VARCHAR(256)|''||false|false||
1|12|BOOLEAN|FALSE|NOT NULL|false|false||
1|13|SMALLINT|0|NOT NULL|false|false||
1|15|SMALLINT|0|NOT NULL|false|false||
Expand Down

0 comments on commit c94f68a

Please sign in to comment.