diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 16:50:20 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 17:11:22 +0200 |
commit | 813849e5216cb87121e0f778a734575be6a36052 (patch) | |
tree | 45605ad43e3f751eba51d19f8c6955c3824e8d32 /application/api/controllers/ApiController.php | |
parent | a4af59f47103a3f9c903eeddb1e30ab9cb7344f0 (diff) | |
download | Shaarli-813849e5216cb87121e0f778a734575be6a36052.tar.gz Shaarli-813849e5216cb87121e0f778a734575be6a36052.tar.zst Shaarli-813849e5216cb87121e0f778a734575be6a36052.zip |
Add history entries for API endpoint
CHANGED: datetime is now store as an object in history store file
Diffstat (limited to 'application/api/controllers/ApiController.php')
-rw-r--r-- | application/api/controllers/ApiController.php | 9 |
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 | ||
3 | namespace Shaarli\Api\Controllers; | 3 | namespace Shaarli\Api\Controllers; |
4 | 4 | ||
5 | use Shaarli\Config\ConfigManager; | ||
5 | use \Slim\Container; | 6 | use \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 { |