From d5901aa09cb9bb3b0fc6a06d0b34efe0098cc0e3 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 27 Nov 2018 17:17:41 +0800 Subject: [PATCH] MDL-64206 core: updated FB logo URL --- lib/classes/oauth2/api.php | 2 +- lib/db/upgrade.php | 18 ++++++++++++++++++ version.php | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/classes/oauth2/api.php b/lib/classes/oauth2/api.php index 6c39562e996..63d56b7357f 100644 --- a/lib/classes/oauth2/api.php +++ b/lib/classes/oauth2/api.php @@ -76,7 +76,7 @@ class api { // Facebook is a custom setup. $record = (object) [ 'name' => 'Facebook', - 'image' => 'https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png', + 'image' => 'https://facebookbrand.com/wp-content/uploads/2016/05/flogo_rgb_hex-brc-site-250.png', 'baseurl' => '', 'loginscopes' => 'public_profile email', 'loginscopesoffline' => 'public_profile email', diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 4594cbace40..8f4d5df2ff6 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2314,5 +2314,23 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2018051702.02); } + if ($oldversion < 2018051703.06) { + // Update the FB logo URL. + $oldurl = 'https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png'; + $newurl = 'https://facebookbrand.com/wp-content/uploads/2016/05/flogo_rgb_hex-brc-site-250.png'; + + $updatesql = "UPDATE {oauth2_issuer} + SET image = :newimage + WHERE image = :oldimage"; + $params = [ + 'newimage' => $newurl, + 'oldimage' => $oldurl + ]; + + $DB->execute($updatesql, $params); + + upgrade_main_savepoint(true, 2018051703.06); + } + return true; } diff --git a/version.php b/version.php index fe91f193385..5e1921879ec 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2018051703.05; // 20180517 = branching date YYYYMMDD - do not modify! +$version = 2018051703.06; // 20180517 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes.