aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api/controllers/Info.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-05-25 15:52:27 +0200
committerArthurHoaro <arthur@hoa.ro>2020-01-18 09:55:59 +0100
commitcf92b4dd1521241eefc58eaf6dcd202cd83969d8 (patch)
tree9d6f6f4dc9eabe111c3ba5609eea8b22cd5a23aa /application/api/controllers/Info.php
parent336a28fa4a09b968ce4705900bf57693e672f0bf (diff)
downloadShaarli-cf92b4dd1521241eefc58eaf6dcd202cd83969d8.tar.gz
Shaarli-cf92b4dd1521241eefc58eaf6dcd202cd83969d8.tar.zst
Shaarli-cf92b4dd1521241eefc58eaf6dcd202cd83969d8.zip
Apply the new system (Bookmark + Service) to the whole code base
See https://github.com/shaarli/Shaarli/issues/1307
Diffstat (limited to 'application/api/controllers/Info.php')
-rw-r--r--application/api/controllers/Info.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/application/api/controllers/Info.php b/application/api/controllers/Info.php
index f37dcae5..12f6b2f0 100644
--- a/application/api/controllers/Info.php
+++ b/application/api/controllers/Info.php
@@ -2,6 +2,7 @@
2 2
3namespace Shaarli\Api\Controllers; 3namespace Shaarli\Api\Controllers;
4 4
5use Shaarli\Bookmark\BookmarkFilter;
5use Slim\Http\Request; 6use Slim\Http\Request;
6use Slim\Http\Response; 7use Slim\Http\Response;
7 8
@@ -26,8 +27,8 @@ class Info extends ApiController
26 public function getInfo($request, $response) 27 public function getInfo($request, $response)
27 { 28 {
28 $info = [ 29 $info = [
29 'global_counter' => count($this->linkDb), 30 'global_counter' => $this->bookmarkService->count(),
30 'private_counter' => count_private($this->linkDb), 31 'private_counter' => $this->bookmarkService->count(BookmarkFilter::$PRIVATE),
31 'settings' => array( 32 'settings' => array(
32 'title' => $this->conf->get('general.title', 'Shaarli'), 33 'title' => $this->conf->get('general.title', 'Shaarli'),
33 'header_link' => $this->conf->get('general.header_link', '?'), 34 'header_link' => $this->conf->get('general.header_link', '?'),