Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2023-11-02 21:50:45 +01:00
commit 010464c2a4
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 19 additions and 0 deletions

View file

@ -71,6 +71,12 @@ class profilefield_youtube_update extends \phpbb\db\migration\migration
. $this->db->get_any_char()
);
// We're done if the profile field doesn't exist
if (!$this->db_tools->sql_column_exists($profile_fields_data, $yt_profile_field))
{
return;
}
$this->db->sql_query(
"UPDATE $profile_fields_data SET
$yt_profile_field = $prepend_legacy_youtube_url

View file

@ -87,6 +87,12 @@ class profilefields_update extends \phpbb\db\migration\migration
$yt_profile_field = 'pf_phpbb_youtube';
$has_youtube_url = $this->db->sql_like_expression($this->db->get_any_char() . 'youtube.com/' . $this->db->get_any_char());
// We're done if the profile field doesn't exist
if (!$this->db_tools->sql_column_exists($profile_fields_data, $yt_profile_field))
{
return true;
}
$update_aborted = false;
$sql = 'SELECT user_id, pf_phpbb_youtube
@ -153,6 +159,13 @@ class profilefields_update extends \phpbb\db\migration\migration
$this->db->sql_query($sql);
$yt_profile_field = 'pf_phpbb_youtube';
// We're done if the profile field doesn't exist
if (!$this->db_tools->sql_column_exists($profile_fields_data, $yt_profile_field))
{
return;
}
$prepend_legacy_youtube_url = $this->db->sql_concatenate(
"'https://youtube.com/'", $yt_profile_field
);