From 6876783acd91f7dd734f174cdc6092a8b4ef4807 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Mon, 22 Jun 2009 03:30:25 +0000 Subject: [PATCH] "MDL-17473, supported non-js file picker" --- repository/picasa/repository.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/repository/picasa/repository.class.php b/repository/picasa/repository.class.php index 7be37a3c06..c325e41707 100644 --- a/repository/picasa/repository.class.php +++ b/repository/picasa/repository.class.php @@ -43,16 +43,19 @@ class repository_picasa extends repository { return false; } - public function print_login($ajax = true){ + public function print_login(){ global $CFG; - if($ajax){ + $returnurl = $CFG->wwwroot.'/repository/ws.php?callback=yes&repo_id='.$this->id; + $authurl = google_authsub::login_url($returnurl, google_picasa::REALM); + if($this->options['ajax']){ $ret = array(); $popup_btn = new stdclass; $popup_btn->type = 'popup'; - $returnurl = $CFG->wwwroot.'/repository/ws.php?callback=yes&repo_id='.$this->id; - $popup_btn->url = google_authsub::login_url($returnurl, google_picasa::REALM); + $popup_btn->url = $authurl; $ret['login'] = array($popup_btn); return $ret; + } else { + echo 'Login'; } } -- 2.39.5