MDL-58280 fileconverter_googledrive: Fix cibot complaints

This commit is contained in:
Damyon Wiese
2017-04-20 10:49:17 +08:00
parent 9fe3363301
commit 32f01c546c
4 changed files with 9 additions and 8 deletions
@@ -39,6 +39,7 @@ use \core_files\conversion;
*/
class converter implements \core_files\converter_interface {
/** @var array $imports List of supported import file formats */
private static $imports = [
'doc' => 'application/vnd.google-apps.document',
'docx' => 'application/vnd.google-apps.document',
@@ -49,6 +50,7 @@ class converter implements \core_files\converter_interface {
'pptx' => 'application/vnd.google-apps.presentation'
];
/** @var array $export List of supported export file formats */
private static $exports = [
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'rtf' => 'application/rtf',
@@ -61,8 +63,7 @@ class converter implements \core_files\converter_interface {
/**
* Convert a document to a new format and return a conversion object relating to the conversion in progress.
*
* @param conversion $conversion The file to be converted
* @param string $format The target file format
* @param \core_files\conversion $conversion The file to be converted
* @return this
*/
public function start_document_conversion(\core_files\conversion $conversion) {
@@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for plugin 'fileconverter_example'
* Strings for plugin 'fileconverter_googledrive'
*
* @package fileconverter_example
* @package fileconverter_googledrive
* @copyright 2017 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+2 -2
View File
@@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Test that unoconv is configured correctly
* Test that googledrive is configured correctly
*
* @package fileconverter_unoconv
* @package fileconverter_googledrive
* @copyright 2017 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+2 -2
View File
@@ -3607,7 +3607,7 @@ class curl {
$fp = false;
if (isset($params['file'])) {
$file = $params['file'];
if(is_file($file)) {
if (is_file($file)) {
$fp = fopen($file, 'r');
$size = filesize($file);
$options['CURLOPT_PUT'] = 1;
@@ -3617,7 +3617,7 @@ class curl {
return null;
}
if (!isset($this->options['CURLOPT_USERPWD'])) {
$this->setopt(array('CURLOPT_USERPWD'=>'anonymous: [email protected]'));
$this->setopt(array('CURLOPT_USERPWD' => 'anonymous: [email protected]'));
}
} else {
$options['CURLOPT_CUSTOMREQUEST'] = 'PUT';