]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-17473, supported non-js file picker"
authordongsheng <dongsheng>
Mon, 22 Jun 2009 03:30:25 +0000 (03:30 +0000)
committerdongsheng <dongsheng>
Mon, 22 Jun 2009 03:30:25 +0000 (03:30 +0000)
repository/picasa/repository.class.php

index 7be37a3c06d24c8bb369385076a63694f77234d1..c325e41707b3a92589f92a4cb6ff98a02cdbceb4 100644 (file)
@@ -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 '<a target="_blank" href="'.$authurl.'">Login</a>';
         }
     }