@@ -26,8 +26,8 @@ |
||
26 | 26 | $server = \OC::$server; |
27 | 27 | |
28 | 28 | $controller = new \OC\OCS\Provider( |
29 | - 'ocs_provider', |
|
30 | - $server->getRequest(), |
|
31 | - $server->getAppManager() |
|
29 | + 'ocs_provider', |
|
30 | + $server->getRequest(), |
|
31 | + $server->getAppManager() |
|
32 | 32 | ); |
33 | 33 | echo $controller->buildProviderList()->render(); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <h2 class="title"><?php p($l->t('App update required')); ?></h2> |
5 | 5 | <?php } else { ?> |
6 | 6 | <h2 class="title"><?php p($l->t('%s will be updated to version %s', |
7 | - array($_['productName'], $_['version']))); ?></h2> |
|
7 | + array($_['productName'], $_['version']))); ?></h2> |
|
8 | 8 | <?php } ?> |
9 | 9 | <?php if (!empty($_['appsToUpgrade'])) { ?> |
10 | 10 | <div class="infogroup"> |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | - /** @var array $_ */ |
|
3 | - /** @var \OCP\IL10N $l */ |
|
2 | + /** @var array $_ */ |
|
3 | + /** @var \OCP\IL10N $l */ |
|
4 | 4 | |
5 | 5 | style('core', ['styles', 'header']); |
6 | 6 | ?> |
@@ -31,32 +31,32 @@ |
||
31 | 31 | \OC::$server->getSession()->close(); |
32 | 32 | |
33 | 33 | if (isset($_GET['query'])) { |
34 | - $query = $_GET['query']; |
|
34 | + $query = $_GET['query']; |
|
35 | 35 | } else { |
36 | - $query = ''; |
|
36 | + $query = ''; |
|
37 | 37 | } |
38 | 38 | if (isset($_GET['inApps'])) { |
39 | - $inApps = $_GET['inApps']; |
|
40 | - if (is_string($inApps)) { |
|
41 | - $inApps = array($inApps); |
|
42 | - } |
|
39 | + $inApps = $_GET['inApps']; |
|
40 | + if (is_string($inApps)) { |
|
41 | + $inApps = array($inApps); |
|
42 | + } |
|
43 | 43 | } else { |
44 | - $inApps = array(); |
|
44 | + $inApps = array(); |
|
45 | 45 | } |
46 | 46 | if (isset($_GET['page'])) { |
47 | - $page = (int)$_GET['page']; |
|
47 | + $page = (int)$_GET['page']; |
|
48 | 48 | } else { |
49 | - $page = 1; |
|
49 | + $page = 1; |
|
50 | 50 | } |
51 | 51 | if (isset($_GET['size'])) { |
52 | - $size = (int)$_GET['size']; |
|
52 | + $size = (int)$_GET['size']; |
|
53 | 53 | } else { |
54 | - $size = 30; |
|
54 | + $size = 30; |
|
55 | 55 | } |
56 | 56 | if($query) { |
57 | - $result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size); |
|
58 | - OC_JSON::encodedPrint($result); |
|
57 | + $result = \OC::$server->getSearch()->searchPaged($query, $inApps, $page, $size); |
|
58 | + OC_JSON::encodedPrint($result); |
|
59 | 59 | } |
60 | 60 | else { |
61 | - echo 'false'; |
|
61 | + echo 'false'; |
|
62 | 62 | } |
@@ -31,97 +31,97 @@ |
||
31 | 31 | use OC\Setup; |
32 | 32 | |
33 | 33 | class SetupController { |
34 | - /** @var Setup */ |
|
35 | - protected $setupHelper; |
|
36 | - /** @var string */ |
|
37 | - private $autoConfigFile; |
|
34 | + /** @var Setup */ |
|
35 | + protected $setupHelper; |
|
36 | + /** @var string */ |
|
37 | + private $autoConfigFile; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param Setup $setupHelper |
|
41 | - */ |
|
42 | - function __construct(Setup $setupHelper) { |
|
43 | - $this->autoConfigFile = \OC::$configDir.'autoconfig.php'; |
|
44 | - $this->setupHelper = $setupHelper; |
|
45 | - } |
|
39 | + /** |
|
40 | + * @param Setup $setupHelper |
|
41 | + */ |
|
42 | + function __construct(Setup $setupHelper) { |
|
43 | + $this->autoConfigFile = \OC::$configDir.'autoconfig.php'; |
|
44 | + $this->setupHelper = $setupHelper; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @param $post |
|
49 | - */ |
|
50 | - public function run($post) { |
|
51 | - // Check for autosetup: |
|
52 | - $post = $this->loadAutoConfig($post); |
|
53 | - $opts = $this->setupHelper->getSystemInfo(); |
|
47 | + /** |
|
48 | + * @param $post |
|
49 | + */ |
|
50 | + public function run($post) { |
|
51 | + // Check for autosetup: |
|
52 | + $post = $this->loadAutoConfig($post); |
|
53 | + $opts = $this->setupHelper->getSystemInfo(); |
|
54 | 54 | |
55 | - // convert 'abcpassword' to 'abcpass' |
|
56 | - if (isset($post['adminpassword'])) { |
|
57 | - $post['adminpass'] = $post['adminpassword']; |
|
58 | - } |
|
59 | - if (isset($post['dbpassword'])) { |
|
60 | - $post['dbpass'] = $post['dbpassword']; |
|
61 | - } |
|
55 | + // convert 'abcpassword' to 'abcpass' |
|
56 | + if (isset($post['adminpassword'])) { |
|
57 | + $post['adminpass'] = $post['adminpassword']; |
|
58 | + } |
|
59 | + if (isset($post['dbpassword'])) { |
|
60 | + $post['dbpass'] = $post['dbpassword']; |
|
61 | + } |
|
62 | 62 | |
63 | - if(isset($post['install']) AND $post['install']=='true') { |
|
64 | - // We have to launch the installation process : |
|
65 | - $e = $this->setupHelper->install($post); |
|
66 | - $errors = array('errors' => $e); |
|
63 | + if(isset($post['install']) AND $post['install']=='true') { |
|
64 | + // We have to launch the installation process : |
|
65 | + $e = $this->setupHelper->install($post); |
|
66 | + $errors = array('errors' => $e); |
|
67 | 67 | |
68 | - if(count($e) > 0) { |
|
69 | - $options = array_merge($opts, $post, $errors); |
|
70 | - $this->display($options); |
|
71 | - } else { |
|
72 | - $this->finishSetup(); |
|
73 | - } |
|
74 | - } else { |
|
75 | - $options = array_merge($opts, $post); |
|
76 | - $this->display($options); |
|
77 | - } |
|
78 | - } |
|
68 | + if(count($e) > 0) { |
|
69 | + $options = array_merge($opts, $post, $errors); |
|
70 | + $this->display($options); |
|
71 | + } else { |
|
72 | + $this->finishSetup(); |
|
73 | + } |
|
74 | + } else { |
|
75 | + $options = array_merge($opts, $post); |
|
76 | + $this->display($options); |
|
77 | + } |
|
78 | + } |
|
79 | 79 | |
80 | - public function display($post) { |
|
81 | - $defaults = array( |
|
82 | - 'adminlogin' => '', |
|
83 | - 'adminpass' => '', |
|
84 | - 'dbuser' => '', |
|
85 | - 'dbpass' => '', |
|
86 | - 'dbname' => '', |
|
87 | - 'dbtablespace' => '', |
|
88 | - 'dbhost' => 'localhost', |
|
89 | - 'dbtype' => '', |
|
90 | - ); |
|
91 | - $parameters = array_merge($defaults, $post); |
|
80 | + public function display($post) { |
|
81 | + $defaults = array( |
|
82 | + 'adminlogin' => '', |
|
83 | + 'adminpass' => '', |
|
84 | + 'dbuser' => '', |
|
85 | + 'dbpass' => '', |
|
86 | + 'dbname' => '', |
|
87 | + 'dbtablespace' => '', |
|
88 | + 'dbhost' => 'localhost', |
|
89 | + 'dbtype' => '', |
|
90 | + ); |
|
91 | + $parameters = array_merge($defaults, $post); |
|
92 | 92 | |
93 | - \OC_Util::addVendorScript('strengthify/jquery.strengthify'); |
|
94 | - \OC_Util::addVendorStyle('strengthify/strengthify'); |
|
95 | - \OC_Util::addScript('setup'); |
|
96 | - \OC_Template::printGuestPage('', 'installation', $parameters); |
|
97 | - } |
|
93 | + \OC_Util::addVendorScript('strengthify/jquery.strengthify'); |
|
94 | + \OC_Util::addVendorStyle('strengthify/strengthify'); |
|
95 | + \OC_Util::addScript('setup'); |
|
96 | + \OC_Template::printGuestPage('', 'installation', $parameters); |
|
97 | + } |
|
98 | 98 | |
99 | - public function finishSetup() { |
|
100 | - if( file_exists( $this->autoConfigFile )) { |
|
101 | - unlink($this->autoConfigFile); |
|
102 | - } |
|
103 | - \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); |
|
104 | - \OC_Util::redirectToDefaultPage(); |
|
105 | - } |
|
99 | + public function finishSetup() { |
|
100 | + if( file_exists( $this->autoConfigFile )) { |
|
101 | + unlink($this->autoConfigFile); |
|
102 | + } |
|
103 | + \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); |
|
104 | + \OC_Util::redirectToDefaultPage(); |
|
105 | + } |
|
106 | 106 | |
107 | - public function loadAutoConfig($post) { |
|
108 | - if( file_exists($this->autoConfigFile)) { |
|
109 | - \OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO); |
|
110 | - $AUTOCONFIG = array(); |
|
111 | - include $this->autoConfigFile; |
|
112 | - $post = array_merge ($post, $AUTOCONFIG); |
|
113 | - } |
|
107 | + public function loadAutoConfig($post) { |
|
108 | + if( file_exists($this->autoConfigFile)) { |
|
109 | + \OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO); |
|
110 | + $AUTOCONFIG = array(); |
|
111 | + include $this->autoConfigFile; |
|
112 | + $post = array_merge ($post, $AUTOCONFIG); |
|
113 | + } |
|
114 | 114 | |
115 | - $dbIsSet = isset($post['dbtype']); |
|
116 | - $directoryIsSet = isset($post['directory']); |
|
117 | - $adminAccountIsSet = isset($post['adminlogin']); |
|
115 | + $dbIsSet = isset($post['dbtype']); |
|
116 | + $directoryIsSet = isset($post['directory']); |
|
117 | + $adminAccountIsSet = isset($post['adminlogin']); |
|
118 | 118 | |
119 | - if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) { |
|
120 | - $post['install'] = 'true'; |
|
121 | - } |
|
122 | - $post['dbIsSet'] = $dbIsSet; |
|
123 | - $post['directoryIsSet'] = $directoryIsSet; |
|
119 | + if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) { |
|
120 | + $post['install'] = 'true'; |
|
121 | + } |
|
122 | + $post['dbIsSet'] = $dbIsSet; |
|
123 | + $post['directoryIsSet'] = $directoryIsSet; |
|
124 | 124 | |
125 | - return $post; |
|
126 | - } |
|
125 | + return $post; |
|
126 | + } |
|
127 | 127 | } |
@@ -29,46 +29,46 @@ |
||
29 | 29 | use \OCP\IUserManager; |
30 | 30 | |
31 | 31 | class UserController extends Controller { |
32 | - /** |
|
33 | - * @var IUserManager |
|
34 | - */ |
|
35 | - protected $userManager; |
|
32 | + /** |
|
33 | + * @var IUserManager |
|
34 | + */ |
|
35 | + protected $userManager; |
|
36 | 36 | |
37 | - public function __construct($appName, |
|
38 | - IRequest $request, |
|
39 | - IUserManager $userManager |
|
40 | - ) { |
|
41 | - parent::__construct($appName, $request); |
|
42 | - $this->userManager = $userManager; |
|
43 | - } |
|
37 | + public function __construct($appName, |
|
38 | + IRequest $request, |
|
39 | + IUserManager $userManager |
|
40 | + ) { |
|
41 | + parent::__construct($appName, $request); |
|
42 | + $this->userManager = $userManager; |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Lookup user display names |
|
47 | - * |
|
48 | - * @NoAdminRequired |
|
49 | - * |
|
50 | - * @param array $users |
|
51 | - * |
|
52 | - * @return JSONResponse |
|
53 | - */ |
|
54 | - public function getDisplayNames($users) { |
|
55 | - $result = array(); |
|
45 | + /** |
|
46 | + * Lookup user display names |
|
47 | + * |
|
48 | + * @NoAdminRequired |
|
49 | + * |
|
50 | + * @param array $users |
|
51 | + * |
|
52 | + * @return JSONResponse |
|
53 | + */ |
|
54 | + public function getDisplayNames($users) { |
|
55 | + $result = array(); |
|
56 | 56 | |
57 | - foreach ($users as $user) { |
|
58 | - $userObject = $this->userManager->get($user); |
|
59 | - if (is_object($userObject)) { |
|
60 | - $result[$user] = $userObject->getDisplayName(); |
|
61 | - } else { |
|
62 | - $result[$user] = $user; |
|
63 | - } |
|
64 | - } |
|
57 | + foreach ($users as $user) { |
|
58 | + $userObject = $this->userManager->get($user); |
|
59 | + if (is_object($userObject)) { |
|
60 | + $result[$user] = $userObject->getDisplayName(); |
|
61 | + } else { |
|
62 | + $result[$user] = $user; |
|
63 | + } |
|
64 | + } |
|
65 | 65 | |
66 | - $json = array( |
|
67 | - 'users' => $result, |
|
68 | - 'status' => 'success' |
|
69 | - ); |
|
66 | + $json = array( |
|
67 | + 'users' => $result, |
|
68 | + 'status' => 'success' |
|
69 | + ); |
|
70 | 70 | |
71 | - return new JSONResponse($json); |
|
71 | + return new JSONResponse($json); |
|
72 | 72 | |
73 | - } |
|
73 | + } |
|
74 | 74 | } |
@@ -34,28 +34,28 @@ |
||
34 | 34 | |
35 | 35 | class RemoveCertificate extends Base { |
36 | 36 | |
37 | - /** @var ICertificateManager */ |
|
38 | - protected $certificateManager; |
|
39 | - |
|
40 | - public function __construct(ICertificateManager $certificateManager) { |
|
41 | - $this->certificateManager = $certificateManager; |
|
42 | - parent::__construct(); |
|
43 | - } |
|
44 | - |
|
45 | - protected function configure() { |
|
46 | - $this |
|
47 | - ->setName('security:certificates:remove') |
|
48 | - ->setDescription('remove trusted certificate') |
|
49 | - ->addArgument( |
|
50 | - 'name', |
|
51 | - InputArgument::REQUIRED, |
|
52 | - 'the file name of the certificate to remove' |
|
53 | - ); |
|
54 | - } |
|
55 | - |
|
56 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
57 | - $name = $input->getArgument('name'); |
|
58 | - |
|
59 | - $this->certificateManager->removeCertificate($name); |
|
60 | - } |
|
37 | + /** @var ICertificateManager */ |
|
38 | + protected $certificateManager; |
|
39 | + |
|
40 | + public function __construct(ICertificateManager $certificateManager) { |
|
41 | + $this->certificateManager = $certificateManager; |
|
42 | + parent::__construct(); |
|
43 | + } |
|
44 | + |
|
45 | + protected function configure() { |
|
46 | + $this |
|
47 | + ->setName('security:certificates:remove') |
|
48 | + ->setDescription('remove trusted certificate') |
|
49 | + ->addArgument( |
|
50 | + 'name', |
|
51 | + InputArgument::REQUIRED, |
|
52 | + 'the file name of the certificate to remove' |
|
53 | + ); |
|
54 | + } |
|
55 | + |
|
56 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
57 | + $name = $input->getArgument('name'); |
|
58 | + |
|
59 | + $this->certificateManager->removeCertificate($name); |
|
60 | + } |
|
61 | 61 | } |
@@ -34,64 +34,64 @@ |
||
34 | 34 | |
35 | 35 | class ListCertificates extends Base { |
36 | 36 | |
37 | - /** @var ICertificateManager */ |
|
38 | - protected $certificateManager; |
|
39 | - /** @var IL10N */ |
|
40 | - protected $l; |
|
37 | + /** @var ICertificateManager */ |
|
38 | + protected $certificateManager; |
|
39 | + /** @var IL10N */ |
|
40 | + protected $l; |
|
41 | 41 | |
42 | - public function __construct(ICertificateManager $certificateManager, IL10N $l) { |
|
43 | - $this->certificateManager = $certificateManager; |
|
44 | - $this->l = $l; |
|
45 | - parent::__construct(); |
|
46 | - } |
|
42 | + public function __construct(ICertificateManager $certificateManager, IL10N $l) { |
|
43 | + $this->certificateManager = $certificateManager; |
|
44 | + $this->l = $l; |
|
45 | + parent::__construct(); |
|
46 | + } |
|
47 | 47 | |
48 | - protected function configure() { |
|
49 | - $this |
|
50 | - ->setName('security:certificates') |
|
51 | - ->setDescription('list trusted certificates'); |
|
52 | - parent::configure(); |
|
53 | - } |
|
48 | + protected function configure() { |
|
49 | + $this |
|
50 | + ->setName('security:certificates') |
|
51 | + ->setDescription('list trusted certificates'); |
|
52 | + parent::configure(); |
|
53 | + } |
|
54 | 54 | |
55 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
56 | - $outputType = $input->getOption('output'); |
|
57 | - if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
|
58 | - $certificates = array_map(function (ICertificate $certificate) { |
|
59 | - return [ |
|
60 | - 'name' => $certificate->getName(), |
|
61 | - 'common_name' => $certificate->getCommonName(), |
|
62 | - 'organization' => $certificate->getOrganization(), |
|
63 | - 'expire' => $certificate->getExpireDate()->format(\DateTime::ATOM), |
|
64 | - 'issuer' => $certificate->getIssuerName(), |
|
65 | - 'issuer_organization' => $certificate->getIssuerOrganization(), |
|
66 | - 'issue_date' => $certificate->getIssueDate()->format(\DateTime::ATOM) |
|
67 | - ]; |
|
68 | - }, $this->certificateManager->listCertificates()); |
|
69 | - if ($outputType === self::OUTPUT_FORMAT_JSON) { |
|
70 | - $output->writeln(json_encode(array_values($certificates))); |
|
71 | - } else { |
|
72 | - $output->writeln(json_encode(array_values($certificates), JSON_PRETTY_PRINT)); |
|
73 | - } |
|
74 | - } else { |
|
75 | - $table = new Table($output); |
|
76 | - $table->setHeaders([ |
|
77 | - 'File Name', |
|
78 | - 'Common Name', |
|
79 | - 'Organization', |
|
80 | - 'Valid Until', |
|
81 | - 'Issued By' |
|
82 | - ]); |
|
55 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
56 | + $outputType = $input->getOption('output'); |
|
57 | + if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
|
58 | + $certificates = array_map(function (ICertificate $certificate) { |
|
59 | + return [ |
|
60 | + 'name' => $certificate->getName(), |
|
61 | + 'common_name' => $certificate->getCommonName(), |
|
62 | + 'organization' => $certificate->getOrganization(), |
|
63 | + 'expire' => $certificate->getExpireDate()->format(\DateTime::ATOM), |
|
64 | + 'issuer' => $certificate->getIssuerName(), |
|
65 | + 'issuer_organization' => $certificate->getIssuerOrganization(), |
|
66 | + 'issue_date' => $certificate->getIssueDate()->format(\DateTime::ATOM) |
|
67 | + ]; |
|
68 | + }, $this->certificateManager->listCertificates()); |
|
69 | + if ($outputType === self::OUTPUT_FORMAT_JSON) { |
|
70 | + $output->writeln(json_encode(array_values($certificates))); |
|
71 | + } else { |
|
72 | + $output->writeln(json_encode(array_values($certificates), JSON_PRETTY_PRINT)); |
|
73 | + } |
|
74 | + } else { |
|
75 | + $table = new Table($output); |
|
76 | + $table->setHeaders([ |
|
77 | + 'File Name', |
|
78 | + 'Common Name', |
|
79 | + 'Organization', |
|
80 | + 'Valid Until', |
|
81 | + 'Issued By' |
|
82 | + ]); |
|
83 | 83 | |
84 | - $rows = array_map(function (ICertificate $certificate) { |
|
85 | - return [ |
|
86 | - $certificate->getName(), |
|
87 | - $certificate->getCommonName(), |
|
88 | - $certificate->getOrganization(), |
|
89 | - $this->l->l('date', $certificate->getExpireDate()), |
|
90 | - $certificate->getIssuerName() |
|
91 | - ]; |
|
92 | - }, $this->certificateManager->listCertificates()); |
|
93 | - $table->setRows($rows); |
|
94 | - $table->render(); |
|
95 | - } |
|
96 | - } |
|
84 | + $rows = array_map(function (ICertificate $certificate) { |
|
85 | + return [ |
|
86 | + $certificate->getName(), |
|
87 | + $certificate->getCommonName(), |
|
88 | + $certificate->getOrganization(), |
|
89 | + $this->l->l('date', $certificate->getExpireDate()), |
|
90 | + $certificate->getIssuerName() |
|
91 | + ]; |
|
92 | + }, $this->certificateManager->listCertificates()); |
|
93 | + $table->setRows($rows); |
|
94 | + $table->render(); |
|
95 | + } |
|
96 | + } |
|
97 | 97 | } |
@@ -33,36 +33,36 @@ |
||
33 | 33 | |
34 | 34 | class ImportCertificate extends Base { |
35 | 35 | |
36 | - /** @var ICertificateManager */ |
|
37 | - protected $certificateManager; |
|
36 | + /** @var ICertificateManager */ |
|
37 | + protected $certificateManager; |
|
38 | 38 | |
39 | - public function __construct(ICertificateManager $certificateManager) { |
|
40 | - $this->certificateManager = $certificateManager; |
|
41 | - parent::__construct(); |
|
42 | - } |
|
39 | + public function __construct(ICertificateManager $certificateManager) { |
|
40 | + $this->certificateManager = $certificateManager; |
|
41 | + parent::__construct(); |
|
42 | + } |
|
43 | 43 | |
44 | - protected function configure() { |
|
45 | - $this |
|
46 | - ->setName('security:certificates:import') |
|
47 | - ->setDescription('import trusted certificate') |
|
48 | - ->addArgument( |
|
49 | - 'path', |
|
50 | - InputArgument::REQUIRED, |
|
51 | - 'path to the certificate to import' |
|
52 | - ); |
|
53 | - } |
|
44 | + protected function configure() { |
|
45 | + $this |
|
46 | + ->setName('security:certificates:import') |
|
47 | + ->setDescription('import trusted certificate') |
|
48 | + ->addArgument( |
|
49 | + 'path', |
|
50 | + InputArgument::REQUIRED, |
|
51 | + 'path to the certificate to import' |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | |
55 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
56 | - $path = $input->getArgument('path'); |
|
55 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
56 | + $path = $input->getArgument('path'); |
|
57 | 57 | |
58 | - if (!file_exists($path)) { |
|
59 | - $output->writeln('<error>certificate not found</error>'); |
|
60 | - return; |
|
61 | - } |
|
58 | + if (!file_exists($path)) { |
|
59 | + $output->writeln('<error>certificate not found</error>'); |
|
60 | + return; |
|
61 | + } |
|
62 | 62 | |
63 | - $certData = file_get_contents($path); |
|
64 | - $name = basename($path); |
|
63 | + $certData = file_get_contents($path); |
|
64 | + $name = basename($path); |
|
65 | 65 | |
66 | - $this->certificateManager->addCertificate($certData, $name); |
|
67 | - } |
|
66 | + $this->certificateManager->addCertificate($certData, $name); |
|
67 | + } |
|
68 | 68 | } |