From 615a28597e26928de0f7855119562bfee2458839 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 10 Sep 2008 03:10:42 +0000 Subject: [PATCH] MDL-16403 1. move boxnet lib to moodle lib folder 2. fix a notice --- repository/boxnet/boxlibphp5.php => lib/boxlib.php | 12 ++++++++++-- portfolio/type/boxnet/lib.php | 2 +- repository/boxnet/repository.class.php | 7 +++++-- 3 files changed, 16 insertions(+), 5 deletions(-) rename repository/boxnet/boxlibphp5.php => lib/boxlib.php (98%) diff --git a/repository/boxnet/boxlibphp5.php b/lib/boxlib.php similarity index 98% rename from repository/boxnet/boxlibphp5.php rename to lib/boxlib.php index 8bc2df1e52..14aec630e3 100755 --- a/repository/boxnet/boxlibphp5.php +++ b/lib/boxlib.php @@ -262,11 +262,19 @@ class boxclient { break; case 'FOLDER_NAME': - $ret_array['folder_type'] = $a['value']; + $ret_array['folder_name'] = $a['value']; + break; + + case 'FOLDER_TYPE_ID': + $ret_array['folder_type_id'] = $a['value']; break; case 'SHARED': - $ret_array['shared'] = $a['value']; + if(!empty($a['value'])){ + $ret_array['shared'] = $a['value']; + }else{ + $ret_array['shared'] = false; + } break; case 'PASSWORD': $ret_array['password'] = $a['value']; diff --git a/portfolio/type/boxnet/lib.php b/portfolio/type/boxnet/lib.php index e84fa997fb..1ed05c056d 100644 --- a/portfolio/type/boxnet/lib.php +++ b/portfolio/type/boxnet/lib.php @@ -1,6 +1,6 @@ libdir.'/filelib.php'); -require_once($CFG->dirroot.'/repository/boxnet/boxlibphp5.php'); +require_once($CFG->libdir.'/boxlib.php'); class portfolio_plugin_boxnet extends portfolio_plugin_push_base { diff --git a/repository/boxnet/repository.class.php b/repository/boxnet/repository.class.php index 2ff416c499..0440cf1096 100755 --- a/repository/boxnet/repository.class.php +++ b/repository/boxnet/repository.class.php @@ -8,7 +8,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -require_once($CFG->dirroot.'/repository/boxnet/'.'boxlibphp5.php'); +require_once($CFG->libdir.'/boxlib.php'); class repository_boxnet extends repository{ private $box; @@ -187,8 +187,11 @@ class repository_boxnet extends repository{ $e4->type = 'password'; $e4->name = 'boxpassword'; + $e5->type = 'popup'; + $e5->url = 'http://dongsheng.moodle.com/m20/repository/callback.php'; + $ret = array(); - $ret['login'] = array($e1, $e2, $e3, $e4); + $ret['login'] = array($e1, $e2, $e3, $e4, $e5); return $ret; } else { echo $str; -- 2.39.5