-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,17 @@ public function getName() { | |
* @param IOutput $output | ||
*/ | ||
public function run(IOutput $output) { | ||
$configDir = \OC::$configDir; | ||
$mimetypealiasesFile = $configDir . 'mimetypealiases.json'; | ||
$mimetypemappingFile = $configDir . 'mimetypemapping.json'; | ||
|
||
$this->appendToFile($mimetypealiasesFile, ['application/km' => 'mindmap']); | ||
$this->appendToFile($mimetypemappingFile, ['km' => ['application/km']]); | ||
$this->logger->info("Add .km to mimetype list.", ["app" => "files_mindmap"]); | ||
|
||
$this->updateJS->run(new StringInput(''), new NullOutput()); | ||
$configDir = \OC::$configDir; | ||
$mimetypealiasesFile = $configDir . 'mimetypealiases.json'; | ||
$mimetypemappingFile = $configDir . 'mimetypemapping.json'; | ||
|
||
$this->appendToFile($mimetypealiasesFile, ['application/km' => 'mindmap']); | ||
$this->appendToFile($mimetypemappingFile, ['km' => ['application/km']]); | ||
$this->logger->info("Add .km to mimetype list.", ["app" => "files_mindmap"]); | ||
$this->updateJS->run(new StringInput(''), new NullOutput()); | ||
|
||
$this->logger->info("Copy mindmap icon to core/img directory.", ["app" => "files_mindmap"]); | ||
copy(__DIR__ . '/../../img/mindmap.svg', \OC::$SERVERROOT . '/core/img/filetypes/mindmap.svg'); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ACTom
Author
Owner
|
||
} | ||
|
||
private function appendToFile(string $filename, array $data) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please instead send a PR to the server so we can add the image.