aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/HttpUtils.php3
-rw-r--r--application/Languages.php4
-rw-r--r--application/LinkDB.php15
-rw-r--r--application/NetscapeBookmarkUtils.php5
-rw-r--r--application/Thumbnailer.php5
-rw-r--r--application/config/ConfigPhp.php12
6 files changed, 34 insertions, 10 deletions
diff --git a/application/HttpUtils.php b/application/HttpUtils.php
index ef6f3264..9c438160 100644
--- a/application/HttpUtils.php
+++ b/application/HttpUtils.php
@@ -7,7 +7,8 @@
7 * @param int $timeout network timeout (in seconds) 7 * @param int $timeout network timeout (in seconds)
8 * @param int $maxBytes maximum downloaded bytes (default: 4 MiB) 8 * @param int $maxBytes maximum downloaded bytes (default: 4 MiB)
9 * @param callable|string $curlWriteFunction Optional callback called during the download (cURL CURLOPT_WRITEFUNCTION). 9 * @param callable|string $curlWriteFunction Optional callback called during the download (cURL CURLOPT_WRITEFUNCTION).
10 * Can be used to add download conditions on the headers (response code, content type, etc.). 10 * Can be used to add download conditions on the
11 * headers (response code, content type, etc.).
11 * 12 *
12 * @return array HTTP response headers, downloaded content 13 * @return array HTTP response headers, downloaded content
13 * 14 *
diff --git a/application/Languages.php b/application/Languages.php
index 6a6247c7..b9c5d0e8 100644
--- a/application/Languages.php
+++ b/application/Languages.php
@@ -149,7 +149,9 @@ class Languages
149 } 149 }
150 150
151 try { 151 try {
152 $extension = Translations::fromPoFile($translationPath . $this->language .'/LC_MESSAGES/'. $domain .'.po'); 152 $extension = Translations::fromPoFile(
153 $translationPath . $this->language .'/LC_MESSAGES/'. $domain .'.po'
154 );
153 $extension->setDomain($domain); 155 $extension->setDomain($domain);
154 $this->translator->loadTranslations($extension); 156 $this->translator->loadTranslations($extension);
155 } catch (\InvalidArgumentException $e) { 157 } catch (\InvalidArgumentException $e) {
diff --git a/application/LinkDB.php b/application/LinkDB.php
index 1f7c28cd..4bbc2950 100644
--- a/application/LinkDB.php
+++ b/application/LinkDB.php
@@ -249,11 +249,14 @@ class LinkDB implements Iterator, Countable, ArrayAccess
249 'id' => 1, 249 'id' => 1,
250 'title'=> t('The personal, minimalist, super-fast, database free, bookmarking service'), 250 'title'=> t('The personal, minimalist, super-fast, database free, bookmarking service'),
251 'url'=>'https://shaarli.readthedocs.io', 251 'url'=>'https://shaarli.readthedocs.io',
252 'description'=>t('Welcome to Shaarli! This is your first public bookmark. To edit or delete me, you must first login. 252 'description'=>t(
253 'Welcome to Shaarli! This is your first public bookmark. '
254 .'To edit or delete me, you must first login.
253 255
254To learn how to use Shaarli, consult the link "Documentation" at the bottom of this page. 256To learn how to use Shaarli, consult the link "Documentation" at the bottom of this page.
255 257
256You use the community supported version of the original Shaarli project, by Sebastien Sauvage.'), 258You use the community supported version of the original Shaarli project, by Sebastien Sauvage.'
259 ),
257 'private'=>0, 260 'private'=>0,
258 'created'=> new DateTime(), 261 'created'=> new DateTime(),
259 'tags'=>'opensource software' 262 'tags'=>'opensource software'
@@ -419,8 +422,12 @@ You use the community supported version of the original Shaarli project, by Seba
419 * 422 *
420 * @return array filtered links, all links if no suitable filter was provided. 423 * @return array filtered links, all links if no suitable filter was provided.
421 */ 424 */
422 public function filterSearch($filterRequest = array(), $casesensitive = false, $visibility = 'all', $untaggedonly = false) 425 public function filterSearch(
423 { 426 $filterRequest = array(),
427 $casesensitive = false,
428 $visibility = 'all',
429 $untaggedonly = false
430 ) {
424 // Filter link database according to parameters. 431 // Filter link database according to parameters.
425 $searchtags = isset($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : ''; 432 $searchtags = isset($filterRequest['searchtags']) ? escape($filterRequest['searchtags']) : '';
426 $searchterm = isset($filterRequest['searchterm']) ? escape($filterRequest['searchterm']) : ''; 433 $searchterm = isset($filterRequest['searchterm']) ? escape($filterRequest['searchterm']) : '';
diff --git a/application/NetscapeBookmarkUtils.php b/application/NetscapeBookmarkUtils.php
index e147d326..84dd2b20 100644
--- a/application/NetscapeBookmarkUtils.php
+++ b/application/NetscapeBookmarkUtils.php
@@ -82,7 +82,10 @@ class NetscapeBookmarkUtils
82 $status .= t('has an unknown file format. Nothing was imported.'); 82 $status .= t('has an unknown file format. Nothing was imported.');
83 } else { 83 } else {
84 $status .= vsprintf( 84 $status .= vsprintf(
85 t('was successfully processed in %d seconds: %d links imported, %d links overwritten, %d links skipped.'), 85 t(
86 'was successfully processed in %d seconds: '
87 .'%d links imported, %d links overwritten, %d links skipped.'
88 ),
86 [$duration, $importCount, $overwriteCount, $skipCount] 89 [$duration, $importCount, $overwriteCount, $skipCount]
87 ); 90 );
88 } 91 }
diff --git a/application/Thumbnailer.php b/application/Thumbnailer.php
index 7d0d9c33..37ed97a1 100644
--- a/application/Thumbnailer.php
+++ b/application/Thumbnailer.php
@@ -58,7 +58,10 @@ class Thumbnailer
58 $this->conf->set('thumbnails.enabled', false); 58 $this->conf->set('thumbnails.enabled', false);
59 $this->conf->write(true); 59 $this->conf->write(true);
60 // TODO: create a proper error handling system able to catch exceptions... 60 // TODO: create a proper error handling system able to catch exceptions...
61 die(t('php-gd extension must be loaded to use thumbnails. Thumbnails are now disabled. Please reload the page.')); 61 die(t(
62 'php-gd extension must be loaded to use thumbnails. '
63 .'Thumbnails are now disabled. Please reload the page.'
64 ));
62 } 65 }
63 66
64 $this->wt = new WebThumbnailer(); 67 $this->wt = new WebThumbnailer();
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index 8add8bcd..9625fe1a 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -104,12 +104,20 @@ class ConfigPhp implements ConfigIO
104 104
105 // Store all $conf['config'] 105 // Store all $conf['config']
106 foreach ($conf['config'] as $key => $value) { 106 foreach ($conf['config'] as $key => $value) {
107 $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL; 107 $configStr .= '$GLOBALS[\'config\'][\''
108 . $key
109 .'\'] = '
110 .var_export($conf['config'][$key], true).';'
111 . PHP_EOL;
108 } 112 }
109 113
110 if (isset($conf['plugins'])) { 114 if (isset($conf['plugins'])) {
111 foreach ($conf['plugins'] as $key => $value) { 115 foreach ($conf['plugins'] as $key => $value) {
112 $configStr .= '$GLOBALS[\'plugins\'][\''. $key .'\'] = '.var_export($conf['plugins'][$key], true).';'. PHP_EOL; 116 $configStr .= '$GLOBALS[\'plugins\'][\''
117 . $key
118 .'\'] = '
119 .var_export($conf['plugins'][$key], true).';'
120 . PHP_EOL;
113 } 121 }
114 } 122 }
115 123