Skip to content

Commit

Permalink
Merge branch 'bug/class'
Browse files Browse the repository at this point in the history
  • Loading branch information
cambell-prince committed Jun 24, 2019
2 parents 6fc5a1e + ce2bc5b commit 5d75407
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions backend/SGW_LetsEncrypt.pm
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ sub _init

# testmode enables the mocked certbot-auto that creates self-signed certificates
# enabled = 1, disabled = 0
$self->{'testmode'} = 1;
$self->{'testmode'} = 0;

$self->{'db'} = iMSCP::Database->factory();
$self->{'httpd'} = Servers::httpd->factory();
Expand Down Expand Up @@ -357,7 +357,7 @@ sub _addCertificate
# Call certbot-auto to create the key and certificate under /etc/letsencrypt
my $certbot = 'certbot-auto';
if ($self->{'testmode'}) {
$certbot = $main::imscpConfig{'PLUGINS_DIR'}.'/LetsEncrypt/backend/certbot-auto-test.pm';
$certbot = $main::imscpConfig{'PLUGINS_DIR'}.'/SGW_LetsEncrypt/backend/certbot-auto-test.pm';
}
my ($stdout, $stderr);
my $command = $certbot . " certonly --apache --no-bootstrap --non-interactive -v -d " . escapeShell($certName);
Expand Down
10 changes: 5 additions & 5 deletions frontend/client/letsencrypt.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* i-MSCP LetsEncrypt plugin
* i-MSCP SGW_LetsEncrypt plugin
* Copyright (C) 2017 Cambell Prince <[email protected]>
*
* This program is free software; you can redistribute it and/or
Expand All @@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

namespace LetsEncrypt;
namespace SGW_LetsEncrypt;

use iMSCP_Events as Events;
use iMSCP_Events_Aggregator as EventManager;
use iMSCP_Plugin_LetsEncrypt as LetsEncrypt;
use iMSCP_Plugin_SGW_LetsEncrypt as SGW_LetsEncrypt;
use iMSCP_pTemplate as TemplateEngine;
use PDO;

Expand Down Expand Up @@ -203,14 +203,14 @@ function letsencrypt_generateSubdomains($tpl)
EventManager::getInstance()->dispatch(Events::onClientScriptStart);
check_login('user');

if (!LetsEncrypt::customerHasLetsEncrypt(intval($_SESSION['user_id']))) {
if (!SGW_LetsEncrypt::customerHasLetsEncrypt(intval($_SESSION['user_id']))) {
showBadRequestErrorPage();
}

$tpl = new TemplateEngine();
$tpl->define_dynamic(array(
'layout' => 'shared/layouts/ui.tpl',
'page' => '../../plugins/LetsEncrypt/themes/default/view/client/letsencrypt.tpl',
'page' => '../../plugins/SGW_LetsEncrypt/themes/default/view/client/letsencrypt.tpl',
'page_message' => 'layout',
'domain_list' => 'page',
'domain_item' => 'domain_list',
Expand Down
12 changes: 6 additions & 6 deletions frontend/client/letsencrypt_edit.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* i-MSCP - internet Multi Server Control Panel
* Copyright (C) 2010-2017 by i-MSCP Team
* i-MSCP SGW_LetsEncrypt plugin
* Copyright (C) 2017 Cambell Prince <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

namespace LetsEncrypt;
namespace SGW_LetsEncrypt;

use iMSCP_Events as Events;
use iMSCP_Events_Aggregator as EventManager;
use iMSCP_Plugin_LetsEncrypt as LetsEncrypt;
use iMSCP_Plugin_SGW_LetsEncrypt as SGW_LetsEncrypt;
use iMSCP_pTemplate as TemplateEngine;
use iMSCP_Database;
use PDO;
Expand Down Expand Up @@ -244,7 +244,7 @@ function client_editLetsEncrypt()
EventManager::getInstance()->dispatch(Events::onClientScriptStart);
check_login('user');

if (!LetsEncrypt::customerHasLetsEncrypt(intval($_SESSION['user_id']))) {
if (!SGW_LetsEncrypt::customerHasLetsEncrypt(intval($_SESSION['user_id']))) {
showBadRequestErrorPage();
}

Expand All @@ -256,7 +256,7 @@ function client_editLetsEncrypt()
$tpl = new TemplateEngine();
$tpl->define_dynamic(array(
'layout' => 'shared/layouts/ui.tpl',
'page' => '../../plugins/LetsEncrypt/themes/default/view/client/letsencrypt_edit.tpl',
'page' => '../../plugins/SGW_LetsEncrypt/themes/default/view/client/letsencrypt_edit.tpl',
'page_message' => 'layout'
));
$tpl->assign(array(
Expand Down
6 changes: 3 additions & 3 deletions info.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* i-MSCP LetsEncrypt plugin
* i-MSCP SGW_LetsEncrypt plugin
* Copyright (C) 2017 Cambell Prince <[email protected]>
*
* This program is free software; you can redistribute it and/or
Expand All @@ -21,9 +21,9 @@
return array(
'author' => 'Cambell Prince',
'email' => '[email protected]',
'version' => '1.5.0',
'version' => '1.5.1',
'require_api' => '1.0.5',
'date' => '2019-03-25',
'date' => '2019-06-24',
'name' => 'SGW_LetsEncrypt',
'desc' => 'Plugin that provides LetsEncrypt SSL certificates.',
'url' => 'https://github.com/saygoweb/imscp-plugin-letsencrypt'
Expand Down

0 comments on commit 5d75407

Please sign in to comment.