Added Invoice/SSL download recording, other misc fixes
This commit is contained in:
14
modules/ssl/classes/Controller/SSL.php
Normal file
14
modules/ssl/classes/Controller/SSL.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides SSL management
|
||||
*
|
||||
* @package SSL
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_SSL extends Controller_TemplateDefault {
|
||||
}
|
||||
?>
|
@@ -9,7 +9,7 @@
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_User_SSL extends Controller_TemplateDefault_User {
|
||||
class Controller_User_SSL extends Controller_SSL {
|
||||
protected $secure_actions = array(
|
||||
'download'=>FALSE,
|
||||
);
|
||||
@@ -37,6 +37,13 @@ class Controller_User_SSL extends Controller_TemplateDefault_User {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Log the download
|
||||
$smo = $so->service_memo;
|
||||
$smo->service_id = $so->id;
|
||||
$smo->account_id = $this->ao->id;
|
||||
$smo->memo = sprintf('SSL Certificate %s Downloaded.',$so->plugin()->serial());
|
||||
$smo->save();
|
||||
|
||||
$file = sprintf('%s/%s.pkcs12',Kohana::$config->load('config')->tmpdir,$so->name());
|
||||
openssl_pkcs12_export_to_file($so->plugin()->cert,$file,$so->plugin()->pk,$passwd,array('extracerts'=>$so->plugin()->cacerts()));
|
||||
$x = file_get_contents($file);
|
||||
|
Reference in New Issue
Block a user