mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-58280 fileconverter_googledrive: Fix cibot complaints
This commit is contained in:
parent
9fe3363301
commit
32f01c546c
@ -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
|
||||
*/
|
||||
|
@ -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 <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
@ -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: noreply@moodle.org'));
|
||||
$this->setopt(array('CURLOPT_USERPWD' => 'anonymous: noreply@moodle.org'));
|
||||
}
|
||||
} else {
|
||||
$options['CURLOPT_CUSTOMREQUEST'] = 'PUT';
|
||||
|
Loading…
x
Reference in New Issue
Block a user