|
@@ -122,7 +122,7 @@ function delete_player( $player ) {
|
|
|
// Poof
|
|
// Poof
|
|
|
$query = "DELETE FROM maintainer WHERE maintainer = ?";
|
|
$query = "DELETE FROM maintainer WHERE maintainer = ?";
|
|
|
$stmt = $pdo->prepare( $query );
|
|
$stmt = $pdo->prepare( $query );
|
|
|
- $stmt->execute( [$maintainer] );
|
|
|
|
|
|
|
+ $stmt->execute( [$maintainer[0]] );
|
|
|
unset( $_REQUEST['action'] );
|
|
unset( $_REQUEST['action'] );
|
|
|
unset( $_REQUEST['maintainer'] );
|
|
unset( $_REQUEST['maintainer'] );
|
|
|
unset( $_REQUEST['player'] );
|
|
unset( $_REQUEST['player'] );
|
|
@@ -142,6 +142,9 @@ function store_player_properties( $player, $maintainer, $properties ) {
|
|
|
}
|
|
}
|
|
|
$query = "INSERT OR REPLACE INTO player_properties (maintainer, player, property) VALUES (?, ?, ?);";
|
|
$query = "INSERT OR REPLACE INTO player_properties (maintainer, player, property) VALUES (?, ?, ?);";
|
|
|
$stmt = $pdo->prepare( $query );
|
|
$stmt = $pdo->prepare( $query );
|
|
|
|
|
+ if ( ! in_array( 'name', $properties ) ) {
|
|
|
|
|
+ $properties[] = 'name';
|
|
|
|
|
+ }
|
|
|
$json = json_encode( $properties );
|
|
$json = json_encode( $properties );
|
|
|
$stmt->execute( [$maintainer[0], $player, $json] );
|
|
$stmt->execute( [$maintainer[0], $player, $json] );
|
|
|
// Next remove all properties that are in player
|
|
// Next remove all properties that are in player
|