Skip to content

Commit 9e292b8

Browse files
committed
Revert "Try to add option to remove media"
This reverts commit f5cd5e2.
1 parent 385ee63 commit 9e292b8

File tree

13 files changed

+10
-40
lines changed

13 files changed

+10
-40
lines changed

CHANGELOG.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
### v1.5.9
2-
- Try to add option to remove media
3-
41
### v1.5.8
52
- Changed Markdown Editor to [EasyMD v2.13.0](https://github.com/ionaru/easy-markdown-editor)
63
- Removed rarely used code styles

config.inc.php.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ $config['default_format'] = 'md'; // default format, you can choose between 'htm
66
$config['yaml_support'] = true; // set to true, if you want enable yaml support
77
$config['yaml_start'] = '---'; // the yaml header should starts as the first sign in a markdown note and is marked by default with '---'
88
$config['yaml_end'] = '---'; // the signs which marks the end of the yaml header
9-
$config['rm_md_media'] = false; // if set to yes, embedded media will be removed
109
?>

localization/de_DE.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ $labels['note_formattxt'] = 'Normaler Text';
1818
$labels['ariallabelnewoptions'] = 'Optionen';
1919
$labels['note_defaultformat'] = 'Standard Format';
2020
$labels['note_yamls'] = 'Aktiviere YAML';
21-
$labels['note_rmedia_md'] = 'Lösche automatisch eingbettete Medien mit Markdown Files';
2221
?>

localization/en_US.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ $labels['note_formattxt'] = 'Pure Text';
1818
$labels['ariallabelnewoptions'] = 'Options';
1919
$labels['note_defaultformat'] = 'Default Format';
2020
$labels['note_yamls'] = 'Enable YAML';
21-
$labels['note_rmedia_md'] = 'Remove automatically embedded Media with Markdown Files';
2221
?>

localization/es_AR.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ $labels['note_formattxt'] = 'Texto Plano';
1818
$labels['ariallabelnewoptions'] = 'Opciones';
1919
$labels['note_defaultformat'] = 'Formato estándar';
2020
$labels['note_yamls'] = 'Activa YAML';
21-
$labels['note_rmedia_md'] = 'Elimina automáticamente los medios incrustados con Markdown Files';
2221
?>

localization/pt_BR.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ $labels['note_formathtml'] = 'HTML';
1616
$labels['note_formatmd'] = 'Remarcar';
1717
$labels['note_formattxt'] = 'Texto puro';
1818
$labels['ariallabelnewoptions'] = 'Opções';
19-
$labels['note_rmedia_md'] = 'Exclua automaticamente a mídia incorporada com arquivos Markdown';
2019
?>

localization/ru_RU.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ $labels['note_formattxt'] = 'Текстовая заметка';
1818
$labels['ariallabelnewoptions'] = 'Параметры';
1919
$labels['note_defaultformat'] = 'Стандартный формат';
2020
$labels['note_yamls'] = 'Активировать YAML';
21-
$labels['note_rmedia_md'] = 'Автоматическое удаление встроенного мультимедиа с помощью файлов Markdown';
2221
?>

notes.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Roundcube Notes Plugin
44
*
5-
* @version 1.5.9
5+
* @version 1.5.8
66
* @author Offerel
77
* @copyright Copyright (c) 2021, Offerel
88
* @license GNU General Public License, version 3
@@ -313,17 +313,6 @@
313313
$file = $notes_path.$_POST["fileid"];
314314

315315
if(file_exists($file)) {
316-
if(substr ($file, -3) == ".md" && boolval($rcmail->config->get('rm_md_media', false))) {
317-
$fcontent = file_get_contents($file);
318-
$mpath = dirname($file);
319-
preg_match_all('/(?:!\[(.*?)\]\((.*?)\))/m', $fcontent, $mediaFiles, PREG_SET_ORDER, 0);
320-
foreach($mediaFiles as $mKey => $mFile) {
321-
if(!unlink($mpath.ltrim($mFile[2],'.'))) {
322-
error_log('PrimitiveNotes: Couldn\'t delete media file. Please check your directory permissions.');
323-
}
324-
}
325-
}
326-
327316
if(!unlink($file)) {
328317
error_log('PrimitiveNotes: Couldn\'t delete note. Please check your directory permissions.');
329318
}

primitivenotes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Roundcube Notes Plugin
33
*
4-
* @version 1.5.9
4+
* @version 1.5.8
55
* @author Offerel
66
* @copyright Copyright (c) 2021, Offerel
77
* @license GNU General Public License, version 3

primitivenotes.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)