diff --git a/application/config/ConfigPlugin.php b/application/config/ConfigPlugin.php index 61a594d3..b3d9752b 100644 --- a/application/config/ConfigPlugin.php +++ b/application/config/ConfigPlugin.php @@ -1,5 +1,6 @@ message = 'An error occurred while trying to save plugins loading order.'; - } -} diff --git a/application/config/exception/PluginConfigOrderException.php b/application/config/exception/PluginConfigOrderException.php new file mode 100644 index 00000000..f9d68750 --- /dev/null +++ b/application/config/exception/PluginConfigOrderException.php @@ -0,0 +1,17 @@ +message = 'An error occurred while trying to save plugins loading order.'; + } +} diff --git a/composer.json b/composer.json index 70b87bb9..57851e53 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "Shaarli\\Api\\": "application/api/", "Shaarli\\Api\\Controllers\\": "application/api/controllers", "Shaarli\\Api\\Exceptions\\": "application/api/exceptions", - "Shaarli\\Config\\": "application/config/" + "Shaarli\\Config\\": "application/config/", + "Shaarli\\Config\\Exception\\": "application/config/exception" } } } diff --git a/index.php b/index.php index 77857d27..3c2bb1d2 100644 --- a/index.php +++ b/index.php @@ -62,6 +62,7 @@ require_once __DIR__ . '/vendor/autoload.php'; require_once 'application/ApplicationUtils.php'; require_once 'application/Cache.php'; require_once 'application/CachedPage.php'; +require_once 'application/config/ConfigPlugin.php'; require_once 'application/FeedBuilder.php'; require_once 'application/FileUtils.php'; require_once 'application/HttpUtils.php'; @@ -1681,6 +1682,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) 'result_count' => count($linksToDisplay), 'search_term' => $searchterm, 'search_tags' => $searchtags, + 'visibility' => ! empty($_SESSION['privateonly']) ? 'private' : '', 'redirector' => $conf->get('redirector.url'), // Optional redirector URL. 'links' => $linkDisp, 'tags' => $LINKSDB->allTags(), diff --git a/tests/config/ConfigPluginTest.php b/tests/config/ConfigPluginTest.php index 22ab927b..deb02c9e 100644 --- a/tests/config/ConfigPluginTest.php +++ b/tests/config/ConfigPluginTest.php @@ -1,9 +1,7 @@ ul { margin: 0 0 0 5px; } +.search-result .label-private { + border: 1px solid white; +} + /** * TOOLS */ diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 9bc3ba1a..94370203 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -89,7 +89,7 @@
{'Nothing found.'|t}
- {elseif="!empty($search_term) or !empty($search_tags)"} + {elseif="!empty($search_term) or !empty($search_tags) or !empty($visibility)"}
@@ -106,6 +106,12 @@ {/loop} {/if} + {if="!empty($visibility)"} + {'with status'|t} + + {$visibility|t} + + {/if}
{/if}