From: Mark Gerarts Date: Sun, 1 Oct 2017 12:19:57 +0000 (+0200) Subject: Allow setting of a default note title, see #963 X-Git-Tag: v0.9.2~1^2~5^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=722caa209005a23b0cfba31aa10cd34a45880cec Allow setting of a default note title, see #963 --- diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index 32f6ef6d..7ff2fe67 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 37486414..99b25ba7 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 fb00a9fa..43aab303 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);