| @@ 67-79 (lines=13) @@ | ||
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | public function disableCommonName($commonName) |
|
| 68 | { |
|
| 69 | $clientConfig = $this->parseConfig($commonName); |
|
| 70 | if (array_key_exists('disable', $clientConfig) && $clientConfig['disable']) { |
|
| 71 | // already disabled |
|
| 72 | return false; |
|
| 73 | } |
|
| 74 | ||
| 75 | $clientConfig['disable'] = true; |
|
| 76 | $this->writeFile($commonName, $clientConfig); |
|
| 77 | ||
| 78 | return true; |
|
| 79 | } |
|
| 80 | ||
| 81 | public function enableCommonName($commonName) |
|
| 82 | { |
|
| @@ 81-94 (lines=14) @@ | ||
| 78 | return true; |
|
| 79 | } |
|
| 80 | ||
| 81 | public function enableCommonName($commonName) |
|
| 82 | { |
|
| 83 | $clientConfig = $this->parseConfig($commonName); |
|
| 84 | if (array_key_exists('disable', $clientConfig) && $clientConfig['disable']) { |
|
| 85 | // it is disabled, enable it |
|
| 86 | $clientConfig['disable'] = false; |
|
| 87 | $this->writeFile($commonName, $clientConfig); |
|
| 88 | ||
| 89 | return true; |
|
| 90 | } |
|
| 91 | ||
| 92 | // it is not disabled |
|
| 93 | return false; |
|
| 94 | } |
|
| 95 | ||
| 96 | public function isDisabled($commonName) |
|
| 97 | { |
|