From: dongsheng Date: Mon, 22 Jun 2009 03:30:25 +0000 (+0000) Subject: "MDL-17473, supported non-js file picker" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6876783acd91f7dd734f174cdc6092a8b4ef4807;p=moodle.git "MDL-17473, supported non-js file picker" --- 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'; } }