Skip to content

Commit

Permalink
Resovles #288 Adds def vals, int fields and column length check to av…
Browse files Browse the repository at this point in the history
…atars module. (#289)
  • Loading branch information
yuliu authored Aug 18, 2022
1 parent 5943ae2 commit cff261e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion resources/modules/avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@

abstract class Converter_Module_Avatars extends Converter_Module
{
public $default_values = array(
'uid' => 0,
'avatar' => '',
'avatardimensions' => '',
'avatartype' => '',
);

public $integer_fields = array(
'uid',
);

abstract function get_avatar_path();

function pre_setup()
Expand Down Expand Up @@ -68,7 +79,7 @@ public function insert($data)
$data = $converted_values = $this->convert_data($data);

// Should loop through and fill in any values that aren't set based on the MyBB db schema or other standard default values and escape them properly
$insert_array = $this->prepare_insert_array($data);
$insert_array = $this->prepare_insert_array($data, 'users');

unset($insert_array['avatar_type']);

Expand Down

0 comments on commit cff261e

Please sign in to comment.