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:
@@ -135,5 +135,4 @@ class Admin {
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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' );
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -123,5 +123,4 @@ class Session_Handler implements \SessionHandlerInterface {
|
||||
public function close() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -319,5 +319,4 @@ class Session {
|
||||
return 'session_id';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user