Skip to content

Commit 588ec2a

Browse files
committed
refactor
1 parent 126e37a commit 588ec2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nodebb.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ class NodeBB {
1717
public function __construct() {
1818
global $hcpp;
1919
$hcpp->nodebb = $this;
20-
$hcpp->add_action( 'csrf_verified', [ $this, 'csrf_verified' ] ); // Initial POST
20+
$hcpp->add_action( 'hcpp_csrf_verified', [ $this, 'hcpp_csrf_verified' ] ); // Initial POST
2121
$hcpp->add_action( 'hcpp_invoke_plugin', [ $this, 'setup' ] );
2222
$hcpp->add_action( 'priv_add_database', [ $this, 'priv_add_database' ] );
23-
$hcpp->add_action( 'render_page', [ $this, 'render_page' ] );
23+
$hcpp->add_action( 'hcpp_render_page', [ $this, 'hcpp_render_page' ] );
2424
}
2525

2626
// Intercept form submission to flag database creation
27-
public function csrf_verified() {
27+
public function hcpp_csrf_verified() {
2828
if ( isset( $_REQUEST['app'] ) && $_REQUEST['app'] == 'NodeBB' && isset( $_REQUEST['webapp_database_create'] ) ) {
2929
if ( isset( $_SESSION['look'] ) ) {
3030
touch( '/tmp/nodebb_pgsql_' . $_SESSION['look'] );
@@ -120,7 +120,7 @@ public function setup( $args ) {
120120
}
121121

122122
// Customize the install page
123-
public function render_page( $args ) {
123+
public function hcpp_render_page( $args ) {
124124
global $hcpp;
125125
if ( $args['page'] !== 'setup_webapp') return $args;
126126
if ( strpos( $_SERVER['REQUEST_URI'], '?app=NodeBB' ) === false ) return $args;

0 commit comments

Comments
 (0)