From 70663e580354e6c7fbe6c381786ba72b70a89c60 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 10 Jun 2012 19:14:35 +0200 Subject: [PATCH] API respects the private flag --- htdocs/application/controllers/api.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/application/controllers/api.php b/htdocs/application/controllers/api.php index 47b8e5e..ebb62b9 100755 --- a/htdocs/application/controllers/api.php +++ b/htdocs/application/controllers/api.php @@ -44,6 +44,11 @@ class Api extends Main $_POST['lang'] = 'text'; } $_POST['code'] = $this->input->post('text'); + + if ($this->config->item('private_only')) + { + $_POST['private'] = 1; + } $paste_url = $this->pastes->createPaste(); $data['msg'] = base_url() . $paste_url; $this->load->view('view/api', $data);