]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-17474, repository plugin, add check_login to construct function"
authordongsheng <dongsheng>
Wed, 27 May 2009 03:35:58 +0000 (03:35 +0000)
committerdongsheng <dongsheng>
Wed, 27 May 2009 03:35:58 +0000 (03:35 +0000)
repository/googledocs/repository.class.php
repository/lib.php
repository/picasa/repository.class.php

index b8a2c2a0091358813a8844cc8602f0a8cd1f1824..76bd238a4cafa2234e75c9d03e0194f3c5b2e952 100644 (file)
@@ -22,10 +22,6 @@ class repository_googledocs extends repository {
             $gauth = new google_authsub(false, $googletoken); // will throw exception if fails
             google_docs::set_sesskey($gauth->get_sessiontoken(), $USER->id);
         }
-
-        # fixme - we are not checking login before all functions in the repo api.. eg search
-        # MDL-17474
-        $this->check_login();
     }
 
     public function check_login() {
index f425866ad3f90fd1b099033b599d266c0c65077a..ae4096f79de7b3fe37426c81a408dc264ccedcf7 100644 (file)
@@ -1099,6 +1099,7 @@ abstract class repository {
             $this->options[$n] = $v;
         }
         $this->name = $this->get_name();
+        $this->check_login();
         $this->super_called = true;
     }
 
index 7a88d87eca98c4e1278e09e62fb3e9d7c9748e6e..7be37a3c06d24c8bb369385076a63694f77234d1 100644 (file)
@@ -22,10 +22,6 @@ class repository_picasa extends repository {
             $gauth = new google_authsub(false, $googletoken); // will throw exception if fails
             google_picasa::set_sesskey($gauth->get_sessiontoken(), $USER->id);
         }
-
-        # fixme - we are not checking login before all functions in the repo api.. eg search
-        # MDL-17474
-        $this->check_login();
     }
 
     public function check_login() {