aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api/controllers/ApiController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-05-07 17:40:17 +0200
committerGitHub <noreply@github.com>2017-05-07 17:40:17 +0200
commitb4189928f84758e1589715dfe04e2d966a4f3b88 (patch)
treef17b8fa91fe8244fed7a913d64ce3220551916ff /application/api/controllers/ApiController.php
parenta4af59f47103a3f9c903eeddb1e30ab9cb7344f0 (diff)
parentb86aeccf6a99a9617c66cded7252a33b1df560cd (diff)
downloadShaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.tar.gz
Shaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.tar.zst
Shaarli-b4189928f84758e1589715dfe04e2d966a4f3b88.zip
Merge pull request #858 from ArthurHoaro/api/history-entries
Add history entries for API endpoint
Diffstat (limited to 'application/api/controllers/ApiController.php')
-rw-r--r--application/api/controllers/ApiController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/application/api/controllers/ApiController.php b/application/api/controllers/ApiController.php
index f35b923a..3be85b98 100644
--- a/application/api/controllers/ApiController.php
+++ b/application/api/controllers/ApiController.php
@@ -2,6 +2,7 @@
2 2
3namespace Shaarli\Api\Controllers; 3namespace Shaarli\Api\Controllers;
4 4
5use Shaarli\Config\ConfigManager;
5use \Slim\Container; 6use \Slim\Container;
6 7
7/** 8/**
@@ -19,7 +20,7 @@ abstract class ApiController
19 protected $ci; 20 protected $ci;
20 21
21 /** 22 /**
22 * @var \ConfigManager 23 * @var ConfigManager
23 */ 24 */
24 protected $conf; 25 protected $conf;
25 26
@@ -29,6 +30,11 @@ abstract class ApiController
29 protected $linkDb; 30 protected $linkDb;
30 31
31 /** 32 /**
33 * @var \History
34 */
35 protected $history;
36
37 /**
32 * @var int|null JSON style option. 38 * @var int|null JSON style option.
33 */ 39 */
34 protected $jsonStyle; 40 protected $jsonStyle;
@@ -45,6 +51,7 @@ abstract class ApiController
45 $this->ci = $ci; 51 $this->ci = $ci;
46 $this->conf = $ci->get('conf'); 52 $this->conf = $ci->get('conf');
47 $this->linkDb = $ci->get('db'); 53 $this->linkDb = $ci->get('db');
54 $this->history = $ci->get('history');
48 if ($this->conf->get('dev.debug', false)) { 55 if ($this->conf->get('dev.debug', false)) {
49 $this->jsonStyle = JSON_PRETTY_PRINT; 56 $this->jsonStyle = JSON_PRETTY_PRINT;
50 } else { 57 } else {