Skip to content

Commit ee1b0b7

Browse files
committed
rebrand
1 parent 473ff85 commit ee1b0b7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

webdav.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class WebDAV {
1919
public function __construct() {
2020
global $hcpp;
2121
$hcpp->webdav = $this;
22-
$hcpp->add_action( 'cg_pws_generate_website_cert', [ $this, 'cg_pws_generate_website_cert' ] );
22+
$hcpp->add_action( 'dev_pw_generate_website_cert', [ $this, 'dev_pw_generate_website_cert' ] );
2323
$hcpp->add_action( 'post_change_user_shell', [ $this, 'post_change_user_shell' ] );
2424
$hcpp->add_action( 'hcpp_invoke_plugin', [ $this, 'hcpp_invoke_plugin' ] );
2525
$hcpp->add_action( 'post_delete_user', [ $this, 'post_delete_user' ] );
@@ -43,16 +43,16 @@ public function hcpp_plugin_enabled( $plugin ) {
4343
}
4444

4545
// Intercept the certificate generation and copy over ssl certs for the webdav domain.
46-
public function cg_pws_generate_website_cert( $cmd ) {
47-
if ( strpos( $cmd, '/webdav-' ) !== false && strpos( $cmd, '/cg_pws_ssl && ') !== false ) {
46+
public function dev_pw_generate_website_cert( $cmd ) {
47+
if ( strpos( $cmd, '/webdav-' ) !== false && strpos( $cmd, '/dev_pw_ssl && ') !== false ) {
4848

4949
// Omit the v-delete-web-domain-ssl, v-add-web-domain-ssl, and v-add-web-domain-ssl-force cmds.
5050
global $hcpp;
5151
$path = $hcpp->delLeftMost( $cmd, '/usr/local/hestia/bin/v-add-web-domain-ssl' );
5252
$path = '/home' . $hcpp->delLeftMost( $path, '/home' );
53-
$path = $hcpp->delRightMost( $path, '/cg_pws_ssl &&' );
53+
$path = $hcpp->delRightMost( $path, '/dev_pw_ssl &&' );
5454
$cmd = $hcpp->delRightMost( $cmd, '/usr/local/hestia/bin/v-delete-web-domain-ssl ' );
55-
$cmd .= " mkdir -p $path/ssl ; cp -r $path/cg_pws_ssl/* $path/ssl ";
55+
$cmd .= " mkdir -p $path/ssl ; cp -r $path/dev_pw_ssl/* $path/ssl ";
5656
$cmd = $hcpp->do_action( 'webdav_generate_website_cert', $cmd );
5757
}
5858
return $cmd;
@@ -197,14 +197,14 @@ public function setup( $user ) {
197197
);
198198
file_put_contents( $ssl_conf, $content );
199199

200-
// Generate website cert if it doesn't exist for Personal Web Server edition.
201-
if ( property_exists( $hcpp, 'cg_pws' ) ) {
200+
// Generate website cert if it doesn't exist for Devstia Preview edition.
201+
if ( property_exists( $hcpp, 'dev_pw' ) ) {
202202
if ( !is_dir( "/home/$user/conf/web/webdav-$user.$domain/ssl" ) ) {
203-
$hcpp->cg_pws->generate_website_cert( $user, ["webdav-$user.$domain"] );
203+
$hcpp->dev_pw->generate_website_cert( $user, ["webdav-$user.$domain"] );
204204
}
205205
}else{
206206

207-
// Force SSL on non-Personal Web Server edition.
207+
// Force SSL on non-Devstia Preview edition.
208208
$force_ssl_conf = "/home/$user/conf/web/webdav-$user.$domain/nginx.forcessl.conf";
209209
$content = "return 301 https://\$host\$request_uri;";
210210
file_put_contents( $force_ssl_conf, $content );

0 commit comments

Comments
 (0)