API respects the private flag

This commit is contained in:
Claude 2012-06-10 19:14:35 +02:00
parent fbb7227772
commit 70663e5803

View File

@ -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);