Skip to content

Commit

Permalink
new version 1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
prrvchr committed Nov 4, 2024
1 parent 70bd15c commit d0ed287
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ Although this functionality is only needed for gDriveOOo, it is implemented glob

### What has been done for version 1.1.5:

- Fixed HTTP request parameters to allow updating files on Dropbox servers.
- Fixed HTTP query parameters preventing files from being updated on Dropbox servers.
- Fixed a SQL query preventing a new folder from being created correctly.
- The extension will ask you to install the OAuth2OOo and jdbcDriverOOo extensions in versions 1.3.8 and 1.4.6 respectively minimum.
- Modification of the extension options accessible via: **Tools -> Options... -> Internet -> dDriveOOo** in order to comply with the new graphic charter.

Expand Down
3 changes: 2 additions & 1 deletion README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ Bien que cette fonctionnalité ne soit nécessaire que pour gDriveOOo, elle est

### Ce qui a été fait pour la version 1.1.5:

- Correction des paramètres de la requête HTTP permettant la mise à jour des fichiers sur les serveurs Dropbox.
- Correction des paramètres de requête HTTP empêchant la mise à jour des fichiers sur les serveurs Dropbox.
- Correction d'une requête SQL empêchant la création correcte d'un nouveau dossier.
- L'extension vous demandera d'installer les extensions OAuth2OOo et jdbcDriverOOo en version respectivement 1.3.8 et 1.4.6 minimum.
- Modification des options de l'extension accessibles via : **Outils -> Options... -> Internet -> dDriveOOo** afin de respecter la nouvelle charte graphique.

Expand Down
4 changes: 2 additions & 2 deletions source/dDriveOOo/service/OptionsHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def callHandlerMethod(self, window, event, method):
self._manager.enableShare(bool(event.Source.State))
handled = True
elif method == 'EnableSync':
self._manager.enableTimeout(True)
self._manager.enableSync(True)
handled = True
elif method == 'DisableSync':
self._manager.enableTimeout(False)
self._manager.enableSync(False)
handled = True
elif method == 'ViewData':
self._manager.viewData()
Expand Down
9 changes: 5 additions & 4 deletions source/dDriveOOo/service/pythonpath/ddrive/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,11 @@ def updateItemId(self, database, oldid, response):
return newid

def mergeNewFolder(self, user, oldid, response):
item = self._parseNewFolder(response)
if all(item):
return user.DataBase.updateNewItemId(oldid, *item)
return None
newid = oldid
items = self._parseNewFolder(response)
if all(items):
newid = user.DataBase.updateNewItemId(user.Id, oldid, *items)
return newid

def _parseNewFolder(self, response):
newid = created = modified = None
Expand Down
12 changes: 7 additions & 5 deletions uno/lib/uno/ucb/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ def getMetaData(self, user, item):
data['AtRoot'] = data.get('ParentId') == rootid
return data

def updateNewItemId(self, oldid, newid, created, modified):
def updateNewItemId(self, userid, oldid, newid, created, modified):
call = self._getCall('updateNewItemId')
call.setString(1, oldid)
call.setString(2, newid)
call.setTimestamp(3, created)
call.setTimestamp(4, modified)
call.setString(1, userid)
call.setString(2, oldid)
call.setString(3, newid)
call.setTimestamp(4, created)
call.setTimestamp(5, modified)
call.executeUpdate()
call.close()
return newid

Expand Down
13 changes: 7 additions & 6 deletions uno/lib/uno/ucb/dbqueries.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,15 @@ def getSqlQuery(ctx, name, format=None):
# Create Procedure Query
elif name == 'createUpdateNewItemId':
query = '''\
CREATE PROCEDURE "UpdateNewItemId"(IN ItemId VARCHAR(256),
IN NewId VARCHAR(256),
IN Created TIMESTAMP(6),
IN Modified TIMESTAMP(6))
CREATE PROCEDURE "UpdateNewItemId"(IN USERID VARCHAR(320),
IN OLDID VARCHAR(256),
IN NEWID VARCHAR(256),
IN CREATED TIMESTAMP(6),
IN MODIFIED TIMESTAMP(6))
SPECIFIC "UpdateNewItemId_1"
MODIFIES SQL DATA
BEGIN ATOMIC
UPDATE "Items" SET "ItemId"=NewId, "DateCreated"=Created, "DateModified"=Modified WHERE "ItemId"=ItemId;
UPDATE "Items" SET "ItemId"=NEWID, "DateCreated"=CREATED, "DateModified"=MODIFIED WHERE "UserId"=USERID AND "ItemId"=OLDID;
END;
GRANT EXECUTE ON SPECIFIC ROUTINE "UpdateNewItemId_1" TO "%(Role)s";''' % format

Expand Down Expand Up @@ -599,7 +600,7 @@ def getSqlQuery(ctx, name, format=None):
elif name == 'insertItem':
query = 'CALL "InsertItem"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'
elif name == 'updateNewItemId':
query = 'CALL "UpdateNewItemId"(?,?,?,?)'
query = 'CALL "UpdateNewItemId"(?,?,?,?,?)'

# ShutDown Queries
elif name == 'shutdown':
Expand Down
3 changes: 2 additions & 1 deletion uno/lib/uno/ucb/ucp/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def firstPull(self, user):
return page, count, parameter.SyncToken

def initSharedDocuments(self, user, datetime):
pass # You must implement this method in Provider to be able to handle Shared Documents
# You must implement this method in Provider to be able to handle Shared Documents
pass

def pullUser(self, user):
timestamp = currentDateTimeInTZ()
Expand Down

0 comments on commit d0ed287

Please sign in to comment.