Skip to content

Commit

Permalink
Release v0.0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
ACTom committed Sep 22, 2023
1 parent 7116b51 commit 498d13e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 89 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source_dir=$(build_dir)/source
sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(CURDIR)/../../key
version+=0.0.28
version+=0.0.29

all: appstore

Expand Down
7 changes: 2 additions & 5 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Mind Map</name>
<summary>A Mind map editor</summary>
<description><![CDATA[This application enables Nextcloud users to open, save and edit mind map files in the web browser. If enabled, an entry in the New button at the top of the web browser the Mindmap file entry appears. When clicked, a new mindmap file opens in the browser and the file can be saved into the current Nextcloud directory.]]></description>
<version>0.0.28</version>
<version>0.0.29</version>
<licence>agpl</licence>
<author mail="i@actom.me" homepage="https://actom.me">Jingtao Yan</author>
<namespace>Files_MindMap</namespace>
Expand All @@ -18,14 +18,11 @@
<screenshot small-thumbnail="https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3.png</screenshot>
<dependencies>
<nextcloud min-version="20" max-version="27"/>
<nextcloud min-version="20" max-version="28"/>
</dependencies>
<repair-steps>
<install>
<step>OCA\Files_MindMap\Migration\InstallStep</step>
</install>
<uninstall>
<step>OCA\Files_MindMap\Migration\UninstallStep</step>
</uninstall>
</repair-steps>
</info>
26 changes: 1 addition & 25 deletions lib/Migration/InstallStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,6 @@ public function run(IOutput $output) {
if (!file_exists($coreImagePath) || md5_file($coreImagePath) !== md5_file($appImagePath)) {
copy($appImagePath, $coreImagePath);
}
}

if (version_compare($currentVersion, '19.0.0.4', '<')) {
/* Since 19.0.0.beta3, NC has mindmap's mimetype */
$configDir = \OC::$configDir;
$mimetypealiasesFile = $configDir . 'mimetypealiases.json';
$mimetypemappingFile = $configDir . 'mimetypemapping.json';

$this->appendToFile($mimetypealiasesFile, ['application/km' => 'mindmap', 'application/x-freemind' => 'mindmap', 'application/vnd.xmind.workbook' => 'mindmap']);
$this->appendToFile($mimetypemappingFile, ['km' => ['application/km'], 'mm' => ['application/x-freemind'], 'xmind' => ['application/vnd.xmind.workbook']]);
$this->logger->info("Add .km,.mm,.xmind to mimetype list.", ["app" => "files_mindmap"]);
$this->updateJS->run(new StringInput(''), new ConsoleOutput());
}
}

private function appendToFile(string $filename, array $data) {
$obj = [];
if (file_exists($filename)) {
$content = file_get_contents($filename);
$obj = json_decode($content, true);
}
foreach ($data as $key => $value) {
$obj[$key] = $value;
}
file_put_contents($filename, json_encode($obj, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));
}
}
}
58 changes: 0 additions & 58 deletions lib/Migration/UninstallStep.php

This file was deleted.

0 comments on commit 498d13e

Please sign in to comment.