Skip to content

Commit

Permalink
version 0.1.0 - includes tagging in Nextcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
doloresjuliana committed Dec 29, 2018
1 parent 6186880 commit 7eb78c8
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"default": "0",
"fieldname": "last_id_tag",
"fieldtype": "Int",
"hidden": 0,
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
Expand Down Expand Up @@ -555,7 +555,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2018-12-27 13:04:20.202860",
"modified": "2018-12-29 20:10:24.121216",
"modified_by": "Administrator",
"module": "Nextcloud",
"name": "Nextcloud Settings",
Expand Down
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/__init__.py
100644 → 100755
Empty file.
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/nextcloud_tags.js
100644 → 100755
Empty file.
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/nextcloud_tags.json
100644 → 100755
Empty file.
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/nextcloud_tags.py
100644 → 100755
Empty file.
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/test_nextcloud_tags.js
100644 → 100755
Empty file.
Empty file modified pibiapp/nextcloud/doctype/nextcloud_tags/test_nextcloud_tags.py
100644 → 100755
Empty file.
7 changes: 4 additions & 3 deletions pibiapp/nextcloud/nextcloud_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def nextcloud_insert(doc, method=None):
# Excluded module
if module in nc.excludedmodules: return
site = frappe.local.site
local_fileobj = "./" + site + doc.file_url
if doc.is_private: local_fileobj = "./" + site + doc.file_url
else: local_fileobj = "./" + site + "/public" + doc.file_url
fileobj = local_fileobj.split('/')
uu = len(fileobj) - 1
# get path
Expand All @@ -142,7 +143,7 @@ def nextcloud_insert(doc, method=None):
permit = 1
data_json = nc.ocs.createShare(pathglobal,shareType,shareWith=module,publicUpload=True,password=None,permissions=permit)
# add public Share in Nextcloud
if nc.sharepublic:
if nc.sharepublic or doc.is_private == False:
shareType = 3
data_json = nc.ocs.createShare(pathglobal,shareType)
if data_json == "":
Expand All @@ -151,7 +152,7 @@ def nextcloud_insert(doc, method=None):
data_string = json.dumps(data_json)
decoded = json.loads(data_string)
fileid = str(decoded["ocs"]["data"]["file_source"])
if nc.sharepublic:
if nc.sharepublic or doc.is_private == False:
urllink = str(decoded["ocs"]["data"]["url"])
else:
urllink = nc.url + "/f/" + fileid
Expand Down
Empty file modified pibiapp/nextcloud/tagpropfind.xml
100644 → 100755
Empty file.

0 comments on commit 7eb78c8

Please sign in to comment.