Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -135,5 +135,4 @@ class Admin {
</script>
<?php
}
}

View File

@@ -79,6 +79,38 @@ class CLI_Command extends \WP_CLI_Command {
}
}
/**
* Set id as primary key in the Native PHP Sessions plugin table.
*
* @subcommand add-index
*/
public function add_index( $args, $assoc_args ) {
$pantheon_session = new \Pantheon_Sessions();
$resume_point = isset( $assoc_args['start_point'] ) ? $assoc_args['start_point'] : 0;
$pantheon_session->add_index( $resume_point );
}
/**
* Finalizes the creation of a primary key by deleting the old data.
*
* @subcommand primary-key-finalize
*/
public function primary_key_finalize( $args, $assoc_args ) {
$pantheon_session = new \Pantheon_Sessions();
$resume_point = isset( $assoc_args['start_point'] ) ? $assoc_args['start_point'] : 0;
$pantheon_session->primary_key_finalize( $resume_point );
}
/**
* Reverts addition of primary key.
*
* @subcommand primary-key-revert
*/
public function primary_key_revert( $args, $assoc_args ) {
$pantheon_session = new \Pantheon_Sessions();
$resume_point = isset( $assoc_args['start_point'] ) ? $assoc_args['start_point'] : 0;
$pantheon_session->primary_key_revert( $resume_point );
}
}
\WP_CLI::add_command( 'pantheon session', '\Pantheon_Sessions\CLI_Command' );

View File

@@ -42,7 +42,7 @@ class List_Table extends \WP_List_Table {
* Message for no items found
*/
public function no_items() {
_e( 'No sessions found.', 'wp-native-php-sessions' );
esc_html_e( 'No sessions found.', 'wp-native-php-sessions' );
}
/**
@@ -84,5 +84,4 @@ class List_Table extends \WP_List_Table {
return esc_html( $item->$column_name );
}
}
}

View File

@@ -123,5 +123,4 @@ class Session_Handler implements \SessionHandlerInterface {
public function close() {
return true;
}
}

View File

@@ -319,5 +319,4 @@ class Session {
return 'session_id';
}
}
}