Commit 34aeb9bd authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Bug 1600668: Support for new Google Drive folders URLs

Change-Id: I71818f1bded211ecae5d16d07fef0a433e095cd4
behatnotneeded: Can't test Google embeds in Behat
(cherry picked from commit 0e48b3bd)
(cherry picked from commit 784bafb4)
(cherry picked from commit 6b7af633)
parent 2a46bcf7
......@@ -106,12 +106,24 @@ class PluginBlocktypeGoogleApps extends SystemBlocktype {
// $2 - id, key, etc. of the collection
array(
'match' => '#.*docs.google.com/([a-zA-Z0-9\_\-\.\/]*)leaf\?id=([a-zA-Z0-9\_\-]+).*#',
'url' => $httpstr . '://docs.google.com/$1leaf?id=$2',
'url' => $httpstr . '://drive.google.com/$1folderview?id=$2',
'type' => 'spanicon',
),
array(
'match' => '#.*docs.google.com/([a-zA-Z0-9\_\-\.\/]*)open\?id=([a-zA-Z0-9\_\-]+).*#',
'url' => $httpstr . '://docs.google.com/$1open?id=$2',
'url' => $httpstr . '://drive.google.com/$1folderview?id=$2',
'type' => 'spanicon',
),
// drive.google.com/folderview or drive.google.com/open - Google Drive folders
// (formerly Google Docs collections)
array(
'match' => '#.*drive.google.com/([a-zA-Z0-9\_\-\.\/]*)open\?id=([a-zA-Z0-9\_\-]+).*#',
'url' => $httpstr . '://drive.google.com/$1folderview?id=$2',
'type' => 'spanicon',
),
array(
'match' => '#.*drive.google.com/([a-zA-Z0-9\_\-\.\/]*)folderview\?id=([a-zA-Z0-9\_\-]+).*#',
'url' => $httpstr . '://drive.google.com/$1folderview?id=$2',
'type' => 'spanicon',
),
// docs.google.com/present - Google presentation incl. custom domain presentation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment