From 4ea8cb5bef2bc67dab4784be9f45557763eda10f Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 17 Jan 2021 18:57:26 +0800 Subject: [PATCH] try to change onedrive to sharepoint --- common.php | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/common.php b/common.php index 92b0631..99d089e 100644 --- a/common.php +++ b/common.php @@ -238,7 +238,7 @@ function main($path) if (isset($_GET['AddDisk'])) { if ($_SERVER['admin']) { if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php'; - $drive = new $_GET['AddDisk']($_COOKIE['disktag']); + $drive = new $_GET['AddDisk']($_GET['disktag']); return $drive->AddDisk(); } else { $url = $_SERVER['PHP_SELF']; @@ -406,11 +406,18 @@ function driveisfine($tag, &$drive = null) else return false; } -function baseclassofdrive() +function baseclassofdrive($d = null) { global $drive; - if (!$drive) return false; - return $drive->show_base_class(); + if (!$d) $dr = $drive; + else $dr = $d; + if (!$dr) return false; + return $dr->show_base_class(); +} + +function extendShow_diskenv($drive) +{ + return $drive->ext_show_innerenv(); } function pass2cookie($name, $pass) @@ -1261,6 +1268,8 @@ function EnvOpt($needUpdate = 0) } foreach ($disktags as $disktag) { if ($disktag!='') { + $disk_tmp = null; + $diskok = driveisfine($disktag, $disk_tmp); $html .= '
Driver | -' . getConfig('Driver', $disktag) . ' | +' . getConfig('Driver', $disktag); + if (baseclassofdrive($disk_tmp)=='Onedrive') $html .= ' Change Driver type' . getconstStr(' ') . ''; + $html .= ' |
shareurl | ' . $tmp . ' | |
Site | ' . getConfig('sharepointSite', $disktag) . ' | |
siteid | ' . $tmp . ' | |
' . $ext_env . ' | ' . getConfig($ext_env, $disktag) . ' |