From 722caa209005a23b0cfba31aa10cd34a45880cec Mon Sep 17 00:00:00 2001 From: Mark Gerarts Date: Sun, 1 Oct 2017 14:19:57 +0200 Subject: [PATCH] Allow setting of a default note title, see #963 --- application/config/ConfigManager.php | 1 + doc/md/Shaarli-configuration.md | 1 + index.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index 32f6ef6..7ff2fe6 100644 --- a/application/config/ConfigManager.php +++ b/application/config/ConfigManager.php @@ -317,6 +317,7 @@ class ConfigManager $this->setEmpty('general.header_link', '?'); $this->setEmpty('general.links_per_page', 20); $this->setEmpty('general.enabled_plugins', self::$DEFAULT_PLUGINS); + $this->setEmpty('general.default_note_title', 'Note: '); $this->setEmpty('updates.check_updates', false); $this->setEmpty('updates.check_updates_branch', 'stable'); diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md index 3748641..99b25ba 100644 --- a/doc/md/Shaarli-configuration.md +++ b/doc/md/Shaarli-configuration.md @@ -55,6 +55,7 @@ _These settings should not be edited_ - **links_per_page**: Number of shaares displayed per page. - **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). - **enabled_plugins**: List of enabled plugins. +- **default_note_title**: Default title of a new note. ### Security diff --git a/index.php b/index.php index fb00a9f..43aab30 100644 --- a/index.php +++ b/index.php @@ -1443,7 +1443,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) if ($url == '') { $url = '?' . smallHash($linkdate . $LINKSDB->getNextId()); - $title = 'Note: '; + $title = $conf->get('general.default_note_title', 'Note: '); } $url = escape($url); $title = escape($title);