Skip to content

Commit

Permalink
Fix deprecated null value
Browse files Browse the repository at this point in the history
  • Loading branch information
Offerel committed Aug 15, 2023
1 parent ba6bdd0 commit 687f5c6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

### v2.1.6
- Fix deprecated null value

### v2.1.5
- Fix some PHP8 warnings

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://codeberg.org/Offerel/roundcube_primitivenotes",
"type": "roundcube-plugin",
"license": "AGPL-3.0",
"version": "2.1.5",
"version": "2.1.6",
"authors": [
{
"name": "Offerel",
Expand Down
2 changes: 1 addition & 1 deletion js/primitivenotes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Roundcube Notes Plugin
*
* @version 2.1.5
* @version 2.1.6
* @author Offerel
* @copyright Copyright (c) 2023, Offerel
* @license GNU General Public License, version 3
Expand Down
17 changes: 9 additions & 8 deletions primitivenotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Roundcube Notes Plugin
*
* @version 2.1.5
* @version 2.1.6
* @author Offerel
* @copyright Copyright (c) 2023, Offerel
* @license GNU General Public License, version 3
Expand Down Expand Up @@ -67,13 +67,14 @@ function init() {
$this->add_hook('message_compose', array($this, 'note_mail_compose'));
$this->register_handler('plugin.notes_list', array($this, 'notes_list'));

$notes_path = $this->rc->config->get('notes_path', false);
$notes_path = (strpos($notes_path, '%u') === false) ? $notes_path:str_replace('%u', $this->rc->user->get_username(), $notes_path);
$this->notes_path = ($notes_path[-1] != '/') ? $notes_path.'/':$notes_path;

$media_path = $this->notes_path.$this->rc->config->get('media_folder', false);
$this->media_path = ($media_path[-1] != '/') ? $media_path.'/':$media_path;

if ($this->rc->task == 'notes') {
$notes_path = $this->rc->config->get('notes_path', false);
$notes_path = (strpos($notes_path, '%u') === false) ? $notes_path:str_replace('%u', $this->rc->user->get_username(), $notes_path);
$this->notes_path = ($notes_path[-1] != '/') ? $notes_path.'/':$notes_path;
$media_path = $this->notes_path.$this->rc->config->get('media_folder', false);
$this->media_path = ($media_path[-1] != '/') ? $media_path.'/':$media_path;
}

$this->formatter = new IntlDateFormatter($this->rc->get_user_language(), IntlDateFormatter::SHORT, IntlDateFormatter::SHORT);
}

Expand Down

0 comments on commit 687f5c6

Please sign in to comment.