projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring in UploadFile.class.php to simplify things.
[timetracker.git]
/
WEB-INF
/
lib
/
ttFileHelper.class.php
diff --git
a/WEB-INF/lib/ttFileHelper.class.php
b/WEB-INF/lib/ttFileHelper.class.php
index
997634f
..
45b5b23
100644
(file)
--- a/
WEB-INF/lib/ttFileHelper.class.php
+++ b/
WEB-INF/lib/ttFileHelper.class.php
@@
-79,7
+79,7
@@
class ttFileHelper {
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->register_uri);
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->register_uri);
- curl_setopt($ch, CURLOPT_POST,
count($fields)
);
+ curl_setopt($ch, CURLOPT_POST,
true
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@
-152,7
+152,7
@@
class ttFileHelper {
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->putfile_uri);
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->putfile_uri);
- curl_setopt($ch, CURLOPT_POST,
count($fields)
);
+ curl_setopt($ch, CURLOPT_POST,
true
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@
-230,7
+230,7
@@
class ttFileHelper {
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->deletefile_uri);
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->deletefile_uri);
- curl_setopt($ch, CURLOPT_POST,
count($fields)
);
+ curl_setopt($ch, CURLOPT_POST,
true
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@
-275,8
+275,6
@@
class ttFileHelper {
}
// deleteEntityFiles - deletes all files associated with an entity.
}
// deleteEntityFiles - deletes all files associated with an entity.
- // TODO: decide whether deleteGroupFiles and deleteOrgFiles should be
- // separate functions.
function deleteEntityFiles($entity_id, $entity_type) {
global $i18n;
function deleteEntityFiles($entity_id, $entity_type) {
global $i18n;
@@
-304,7
+302,7
@@
class ttFileHelper {
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->deletefiles_uri);
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->deletefiles_uri);
- curl_setopt($ch, CURLOPT_POST,
count($fields)
);
+ curl_setopt($ch, CURLOPT_POST,
true
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@
-466,7
+464,7
@@
class ttFileHelper {
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->getfile_uri);
// Set the url, number of POST vars, POST data.
curl_setopt($ch, CURLOPT_URL, $this->getfile_uri);
- curl_setopt($ch, CURLOPT_POST,
count($fields)
);
+ curl_setopt($ch, CURLOPT_POST,
true
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);